Control Systems U4 (TEL306)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 81

TEL 306/05

Control Systems

Unit 4
Analogue Control
Systems Design
Contents
Unit overview 1

Unit outcomes 5

4.1 Discrete-state controller 6

Introduction 6

Control mechanisms and applications 7

Suggested answers to activity 10

4.2 PID Controller design 12

Introduction 12

PID control theory 12

Examples of PID controller design 20

Ziegler-Nichols II tuning method 27

Suggested answers to activities 35

4.3 Phase compensator design 43

Introduction 43

Phase lead compensator 45

Phase lag compensator 53

Lead-lag compensator 59

Suggested answer to activity 70

Summary of Unit 4 76

References 78
Unit Overview
A general closed loop control system can be represented in the block
diagram as depicted in Figure 4.1. It consists of three main blocks which
are the sensor, the process and the controller. Each block contains a
transfer function that defines the characteristics of the components.
In the previous units, you have gained the skills on deriving transfer
function models for processes and analysing the behaviours of the
systems including the stability. Those analyses are crucial to estimate
the performance of the designed system. In the case when the system
behaviour is below the expectation, controllers are designed to improve
the system performance. In this unit, three categories of the controllers
will be explored, namely the discrete-state controller, the Proportional-
Integral-Derivative (PID) controller and the phase compensator.

The system in the real world always appears to be more complicated


than the examples that we learnt. For instance, a swimming pool water
treatment system as illustrated in Figure 4.2 comprises a controller, two
types of sensors namely a pH sensor and an Oxidation Reduction Potential
(ORP) sensor, two types of actuators, namely a heater and various pumps
serving different purposes. The pool is subjected to many disturbances
that deviate the actual pool conditions from the ideal conditions. These
disturbances include the sunlight exposure, the ambient temperature,
the sweat, dirt, and other chemical contaminants from the bathers,
leaves and insects that impact the pool water chemistry. Constructing
a block diagram considering all those input-output parameters and
disturbances may result in a complicated Multi-Input-Multi-Output
(MIMO) representation as shown in Figure 4.3.

UNIT 4 Analogue control systems design 1


Controller Process
Setpoint, R(s) Error, E(s) Input, U(s) Output, Y(s)
U(s) Y(s) 1
=K =
E(s) U(s) ts + 1

Sensor
Measurement, D(s)
B(s) 1
=
Y(s) ts + 100

Figure 4.1 Block diagram for a general control system

Controlling the pool water conditions is essential to maintain the pool


water cleanliness and bather comfort. However, designing a MIMO
controller could be very challenging as the interrelationships between
the various input and output (I/O) parameters may be difficult to identify.
Furthermore, the efficiency of the controller drops in handling multiple
I/O parameters, due to the limited processing power to support the
complicated configurations. The capability of a controller can be
analogised to the capability of a student in the classroom. Under an
ideal learning condition where the student (the controller) is not being
distracted, he/she can focus and hence learn very well. At the moment
when he/she receives notifications on his/her mobile Apps, the student
may lose focus on his/her study as he/she would be busy attending those
notifications. In a research study on the interactions between technology
and learning, excessive use of cellphone is found to give a negative
impact on the attention and learning in the classroom (Mendoza et al.,
2018). Most of the time, we have over-estimated our capability in handling
multiple tasks concurrently and this actually affects our job performance.
Therefore, for the sake of yourself and your fellow classmates, it is a very
good habit to switch off the phone during lectures to gain full attention
to the study.

2 TEL 306/05 Control Systems


Figure 4.2 Schematic of pool water treatment system
Source: Sensorex, Inc. https://sensorex.com/pool-chemistry/

Various disturbances

EpH Pacid Actual pH value


pH setpoint
MIMO Psanitizer Pool water +
ORP setpoint + EORP + Actual ORP value
− controller Pwater treatment

pH sensor

ORP sensor

Figure 4.3 Block diagram of MIMO pool water treatment system

Similar to the strategy of switching off the phone to avoid distraction, one
of the solutions to improve the efficiency of the controller is by decoupling
the MIMO system into a number of Single-Input-Single-Output (SISO)
systems so that each system could be controlled separately. The validity
of decoupling the parameters could be verified by studying the correlation
and dependence of each I/O parameter based on the experimental I/O
data. The corresponding I/O parameters could be decoupled only if
a relatively low correlation is found. Using the example of pool water
controlling system, if applying the electric power to the pH pump, Pacid,
does not change the ORP value (output) of the pool water, we can say that
both parameters have a low correlation and hence could be decoupled.

UNIT 4 Analogue control systems design 3


The same analysis is applicable for the electric power to the ORP pump,
Psanitizer, and the pH value (output) of the pool water too. Successful
decoupling of the I/O parameters produces two sets of SISO systems
as shown in Figure 4.4 (a) and Figure 4.4 (b). A simpler controller could be
then designed based on the need of each SISO system. In this unit, the
study will emphasise only on designing controllers for the SISO systems.

Disturbances

ORP setpoint EORP ORP Psanitizer ORP Actual ORP value


Controller treatment

ORP sensor

(a) Block diagram of SISO ORP level treatment system

Disturbances

pH setpoint EpH pH PpH pH Actual pH value


Controller treatment

pH sensor

(b) Block diagram of SISO pH level treatment system

Figure 4.4

Web Reference

For more information on the methods of correlation and


dependence, you may visit this website:

https://en.wikipedia.org/wiki/Correlation_and_dependence

4 TEL 306/05 Control Systems


Unit Outcomes
By the end of Unit 4, you should be able to:

1. Identify the operating mechanism and applications of


discrete-state controllers.

2. Design the Proportional-Integral-Derivative (PID)


controllers.

3. Design the phase compensators.

4. Compare the performances of the controllers.

UNIT 4 Analogue control systems design 5


4.1 Discrete-state Controller
Introduction
A discrete-state controller is the controller that feeds a discrete input
force function to the process. The discrete input force function could be
in the simplest form of only two states (On-Off), or in multiple states such
as High, Medium, Low or Off. Examples of discrete input force function
that could be found in our daily activities are as follows:

1. Water pump is switched On or Off;

2. Fan speed is switched to Low, Medium, High or Off;

3. Door is opened or closed;

4. Signal to a digital input port of a microcontroller is High or Low.

Discrete-state controllers have been widely applied in the industries


where the control systems are specified in a series of events. For example,
in the food processing industry, the following sequence of events are
designed to ensure that the bowl is filled with the right amount of food:

If the weight of the bowl is out of the tolerance Stop the conveyor belt
motor On the pneumatic valve to eject the bowl to the reject bin.

A Programmable Logic Controller (PLC) is a device that is commonly


used as a discrete-state controller.

6 TEL 306/05 Control Systems


Control mechanisms and applications
The operating mechanism of a discrete-state controller is generally
switching either On state or Off state on the process as depicted in
Figure 4.5. Therefore, a discrete-state controller could be also called an
On-Off controller or a Bang-bang controller as a “bang-bang” sound is
produced during the operation especially when controlling the pneumatic
actuators.

The fully On or fully Off characteristic of the discrete-state controller


makes its implementation simple and convenient. In some cases, it is
considered as an optimal control. For instance, the shortest (optimal)
time to boil the water is to fully switch on the heater power and to switch
it off when it reaches the boiling point. However, for a process with
great inertia, the discrete-state controller exhibits a limitation where an
oscillating error signal around the desired setpoint is unavoidable. The
oscillation is often saw-tooth shaped as illustrated in Figure 4.6. The error
band is determined by the inertia of the process and the setting of the
tolerance. Setting a tighter tolerance on one hand will produce a narrower
error band which means a more accurate output, but on another hand,
will shorten the actuator life span due to frequent on/off switching.

Setpoint Error On/Off Actual output


Process

Sensor

Figure 4.5 Block diagram of an On-Off (Bang-bang) control system

UNIT 4 Analogue control systems design 7


ON OFF ON OFF ON OFF ON
Temperature

Set
Error band
Point

Figure 4.6 Example of time response for the discrete-state temperature control
system

Activity 4.1

A simple temperature control system is illustrated in the figure


below. The heater is switched off when it reached the set
temperature and switched on again when the actual temperature
dropped below the setpoint.

1. Draw a block diagram to show the control structure of the


temperature control system.

8 TEL 306/05 Control Systems


2. Sketch the time response for the temperature control system,
given that the setpoint is at 289.6°C.

UNIT 4 Analogue control systems design 9


Summary

A discrete-state controller is the controller that feeds a discrete


input force function to the process. It could be in binary states or
in multiple states. The controllers are easy to design and widely
applied in industries where the control systems are specified
in a series of events. A PLC is normally adopted as a device of
the controller and the control function is in the form of a ladder
diagram. In some cases, the operating mechanism of the discrete-
state controller is considered as an optimal control. However, it
suffers a main drawback of oscillatory steady state output defined
as the error band.

Suggested answers to activity

Feedback

Activity 4.1

1. The block diagram of the temperature control system can be


constructed as follows:

Electric Actual
Setpoint Error Discrete-state power Water heating temperature
controller process

Temperature
sensor

10 TEL 306/05 Control Systems


2. The time response for the system is as illustrated below:

ON OFF ON OFF ON OFF ON


Temperature

Set 289.6°C
Error
Point
band

UNIT 4 Analogue control systems design 11


4.2 PID Controller Design
Introduction
The system with a discrete-state controller unavoidably exhibits an error
band which is especially obvious for a large inertia process such as
liquid heating process and turn-table positioning. In the case where an
error band is undesirable, a continuous control should be implemented.
A continuous controller compares the actual process output with the
setpoint, calculates the error and feeds a continuous input force function
to the process to reduce the error.

PID control theory


In this section, a basic yet practical continuous controller, namely a PID
controller will be introduced. There are five basic configurations for the
PID controller as follows:

1. Proportional controller (P)

2. Integral controller (I)

3. Proportional + Integral controller (PI)

4. Proportional + Derivative controller (PD)

5. Proportional + Integral + Derivative controller (PID)

It should be noted that the Derivative controller (D) does not exist as the
D term considers only the rate of change of the error. The D-controller
lacks the error magnitude to drive the output to the setpoint.

12 TEL 306/05 Control Systems


Proportional controller (P)

The Proportional controller (P) is the most basic but produces the most
impact on the control system. As the name suggested, the P controller
generates input force function, U(s), to the process with the magnitude
calculated based on the error signal, E(s) and the gain, Kp, as shown in
Figure 4.7(a). The effect of a P controller with various gain, Kp, is depicted
in Figure 4.7(b). It is observed that the higher the gain, Kp, the faster the
system responds but with more overshoots. A high proportional gain, Kp,
results in a large change in the U(s) for a given change in the E(s). If the
proportional gain is too high, the system could be unstable. In contrast,
a small gain results in a small output response to a large input error. The
control action of the P controller, Gc, could be expressed as:

U(s)
Gc = = Kp
E(s)

Setpoint E(s) U(s)


Gc = Kp Process

(a) Block diagram of P controller

(b) Effect of P controller at various gain, Kp

Figure 4.7

UNIT 4 Analogue control systems design 13


Integral controller (I)

The Integral controller (I) accumulates the instantaneous error over


time and gives the accumulated offset that should have been corrected
previously. The accumulated error is then multiplied by the integral
gain, Ki, and added to the controller output. The block diagram of the I
controller is depicted in Figure 4.8(a). The effect of the I controller with
various gain, Ki, is illustrated in Figure 4.8(b). It is observed that the I
controller is very effective in reducing the steady state error as the final
value of the system converges to the setpoint. However, the higher the
gain, Ki, the more overshooting and oscillating responses occur. The
response of I controller is slower than the response of P controller as
depicted in Figure 4.7(b) to reach the steady state condition. The control
action of the I controller, Gc, could be expressed as:

U(s) 1 1
Gc(s) = = = Ki
E(s) Ti s s

1
where Ki = , Ti is the integral constant.
Ti

The control action in differential equation is:

1
Gc(t) = Ki ∫ e(t)dt = ∫ e(t)dt
Ti

14 TEL 306/05 Control Systems


Setpoint E(s) Ki U(s)
Gc = Process
s

(a) Block diagram of I controller

(b) Effect of I controller at various gain, Ki

Figure 4.8

Proportional Integral controller (PI)

It has been studied that the P controller alone will generate a fast
response but exhibit steady state error especially in cases which involve
high inertia processes such as the position control of a heavy turn-table.
Upon reaching the setpoint, the error signal, E(s), becomes too small
to a limit that is too weak to drive the motor. The motor stops and the
setpoint can never be reached. Adding the integral term as shown in
Figure 4.9(a) will eliminate the residual steady-state error and result in
a much desired performance of fast and minimal steady state error as
depicted in Figure 4.9(b).

UNIT 4 Analogue control systems design 15


The control action of the PI controller, Gc, could be expressed as:

U(s) 1 1
Gc(s) = = Kp + = Kp + Ki
E(s) Ti s s

The control action in differential equation is:

1
Gc(t) = Kp[e(t) + ∫ e(t)dt]
Ti

Setpoint E(s) 1 U(s)


Gc = Kp + Process
Ti s

(a) Block diagram of PI controller

(b) Effect of PI controller

Figure 4.9

16 TEL 306/05 Control Systems


Proportional Derivative controller (PD)

It has been studied that increasing the gain, Kp, of the P controller will result
in a fast but overshooting response. In some cases, the overshooting and
oscillatory response is undesirable. One of the solutions is by adding a
Derivative term to the P controller, forming a PD controller as shown in
Figure 4.10(a). The derivative term provides an adjustable damping to the
system. This would indirectly affect the transient response as depicted
in Figure 4.10(b).

The control action of the PD controller, Gc, could be expressed as:

U(s)
Gc(s) = = Kp + sTd = Kp + Kd s
E(s)

The control action in differential equation is:

[
Gc(t) = Kp e(t) + Td
de(t)
dt ]

UNIT 4 Analogue control systems design 17


Setpoint E(s) U(s)
Gc = Kp + Kd s Process

(a) Block diagram of PD controller

(b) Effect of PD controller

Figure 4.10

Proportional Integral Derivative controller (PID)

Both proportional and integral controllers are driven by the error signal,
E(s). Due to the time delay of the feedback, this causes the controllers
to "over-react", hence causing overshoot in the output response. The
overshooting problem could be solved by adding a derivative term to
the PI controller as depicted in Figure 4.11(a). The resultant controller
is called a PID controller and its step response is illustrated in Figure
4.11(b). Comparatively, the response is the fastest, without overshoot,
less oscillation and converges to the setpoint in a shorter time period.

18 TEL 306/05 Control Systems


The control action of the PID controller, Gc, could be expressed as:

U(s) 1 1
Gc(s) = = Kp + + sTd = Kp + Ki + Kd s
E(s) Ti s s

The control action in differential equation is:

[
Gc(t) = K e(t) +
1
Ti
∫e(t)dt + Td
de(t)
dt ]
Setpoint E(s) 1 U(s)
Gc = Kp + Ki + Kd s Process
s

(a) Block diagram of PID controller

(b) Effect of PID controller

Figure 4.11

UNIT 4 Analogue control systems design 19


Examples of PID controller design
Example 1

The mathematical model of a simple thermal system consisting of an


insulated tank of water (as shown in Figure 4.12) is given by:

dTw(t)
= c[Ta − Tw(t)] + u(t)
dt

where Tw is the temperature of the water, u is the rate of heat supplied,


Ta is the ambient temperature.

Heater

Water Ta
Tw

Insulation

Figure 4.12 Simple thermal system

1. By setting the process output, y(t) = Tw(t) − Ta and u(t) as the


input, derive the transfer function for the process.

2. We wish to regulate the temperature of the water to a fixed


value Tref = 50°C by adjusting the rate of heat supplied by the
heater, u(t). Assuming that c = 0.1s−1, design an open loop
control u(t) = uref that will achieve this objective.

3. Design a PI controller that will permit to obtain the desired


objective. Choose the proportional and the integral gains such
that the closed loop poles are both located at −0.2.

20 TEL 306/05 Control Systems


Solution

1. The transfer function of the process can be derived as follows:


By setting y(t) = Tw(t) − Ta, we have

dy(t) d[Tw(t) − Ta]


= = c[−Tw(t) + Ta] + u(t)
dt dt
dTa
Since Ta is a constant, =0
dt

dy(t) d[Tw(t)]
 = = c[−y(t)] + u(t) = −0.5y(t) + u(t)
dt dt

By taking the Laplace transform, we get

sY(s) + 0.5Y(s) = U(s)

Hence,

Y(s) 1 2
G(s) = = =
U(s) s + 0.5 2s + 1

2. The open loop control system can be designed as follows:

dTref
= 0.5[Ta − Tref] + uref
dt
Since T ref = 50°C, and assuming ambient temperature,
Ta = 25°C,
0 = 0.5[25 − 50] + uref

Therefore,
uref = 12.5 Watt

UNIT 4 Analogue control systems design 21


3. The PI controller to match the desired performance can be
designed as follows:

The transfer function of the PI controller is:

ki
Gc(s) = kp +
s

The closed loop transfer function is given by:

GcG(s)
T(s) =
1 + GcG(s)

=
( ki
kp + )( )
1
s s+c

1 + kp +
( )( )
ki
s s+c
1

kp s + ki
=
s2 + (c + kp)s + ki

We wish that:

(s + 0.2)2 ≡ s2 + (0.1 + kp)s + ki


s2 + 0.4s + 0.04 ≡ s2 + (0.1 + kp)s + ki

By comparing the left and right equations,


0.4s = (0.1 + kp)s  kp = 0.3
ki = 0.04

22 TEL 306/05 Control Systems


Example 2

A linear system is depicted by the following block diagram:

R(s) 1 Y(s)
Gc(s)
s − 3s + 2
2

Figure 4.13 Block diagram of a linear system

1. Determine if the open loop system is stable for the control


action, Gc(s) = K.

2. Design a PID controller for the above system. Give the


conditions on the proportional, integral and derivative gains
so that the closed-loop poles are located at −1, −2 and −3 on
the left-half of the s-plane.

Solution

1. The open loop transfer function for the system could be derived
as:

1
T(s) = Gc(s)G(s) = K •
s2 − 3s + 2

UNIT 4 Analogue control systems design 23


The stability of the system could be determined by finding the
poles, p, of the system as:

s2 − 3s + 2 = 0
∴p1 = 1, p2 = 2

Since the poles are located on the right-half of the s-plane, the
system is unstable.

2. The transfer function for the PID controller is:

1 Kd s2 + Kp s + Ki
Gc(s) = Kp + Ki + Kd s =
s s

The closed loop transfer function including the PID is therefore:

Gc G(s)
T(s) =
1 + GcG(s)

=
( Ki
Kp +
s )(
+ K ds 2
1
s − 3s + 2 )
1 + Kp +
( Ki
s
+ K ds 2
)(
1
s − 3s + 2 )
Kd s2 + Kp s + Ki
= 3
s + (Kd − 3)s2 + (Kp + 2) + Ki

The closed loop poles are desired to be placed at −1, −2 and


−3, so that:

s3 + (Kd − 3)s2 + (Kp + 2)s + Ki ≡ (s + 1)(s + 2)(s + 3)


= s3 + 6s2 + 11s + 6

24 TEL 306/05 Control Systems


Hence
Kd − 3 = 6 ⇒ Kd = 9
Kp + 2 = 11 ⇒ Kp = 9
Ki = 6

The PID controller is therefore:

1
Gc(s) = 9 + 6 + 9s
s

Activity 4.2

A control system is shown in Figure 4.14, where Gc(s) is the


controller, D(s) is a disturbance, R(s) and Y(s) are the input and
output, respectively.

D(s)
+
+ +
R(s) 2 Y(s)
∑ Gc(s) ∑
s + 0.5

Figure 4.14 Block diagram of a linear system

1. Give the time domain expression and the transfer function


of a PID controller.

2. Explain briefly the properties of each term of a PID controller.

UNIT 4 Analogue control systems design 25


3. Consider a P controller with Gc(s) = K (constant), find the
steady-state error of the system for R(s) = 1/s and D(s) = 1/s.

4. Now, consider a PI controller with Gc(s) = K + 1/s, find the


steady-state error for R(s) = 1/s and D(s) = 1/s.

5. Comment on the performance of using the PI controller over


that of the P controller.

Activity 4.3

An electrical circuit is given in Figure 4.15:

i(t) L = 10H

u(t) R = 2Ω y(t)

Figure 4.15 An LR electric circuit

Design a PI controller that will allow you to achieve the objective


such that the closed loop transfer function is given by:

Y(s) 1
G(s) = =
Yr ef (s) s + 1

26 TEL 306/05 Control Systems


Ziegler-Nichols II tuning method
The previous section demonstrated the analytical way of designing the
PID controller when the model of the process is available. It should be
remarked that the choice of the controller’s configuration is based on
the characteristics of the process and the expectation of the system
designer. It is not always true that using all three terms (PID) should
give an optimal result. Calculating the gains of three terms could be
challenging for a complicated process and might also give rise to the
problem of over-fitting. An experienced PID controller designer would
attempt to achieve the desired performance by first using the most basic
configuration, which is the P controller for the robustness of the design.
Other terms are added only when the need arise.

For a complicated process, the model might not be practical to obtain.


Designing a PID controller in this situation could be done based on the
experience and by means of trial and error. Finding the suitable gains
for each term could be very time consuming and challenging. In this
section, Ziegler-Nichols II (ZNII) method is proposed as a guidance for
the gain tuning under this situation, which could be summarised into
three steps as follows:

Step 1: Increase the proportional gain, K, for the closed loop system to
drive the system into sustained oscillation (marginally stable). Record
the gain as the critical gain, Kc.

Step 2: From the marginally stable graph, measure the time period for
one oscillatory cycle. Record the critical time, Tc.

Step 3: Referring to the ZNII table below, calculate the parameters for
the controller of the choice.

The calculated values could be served as the reference for the tuning
process. Fine tuning by means of trial and error could be carried out to
further improve the performance of the controller.

UNIT 4 Analogue control systems design 27


Kp Ti Td

P-controller only 0.5Kc


5Tc
PI-controller 0.45Kc
6
Tc
PID-controller 0.6Kc 0.5Tc
(tight control) 8
Kc Tc
PID-controller 0.5Tc
(some overshoot) 3 3
PID-controller 0.2Kc 0.3Tc 0.5Tc
(no overshoot)

Table 4.1 PID tuning using ZNII


Source: Microstar Laboratories, http://www.mstarlabs.com/control/znrule.html

Web Reference

For more information on other PID tuning methods, you may visit
this website:

https://en.wikipedia.org/wiki/PID_controller

Example 3

Design a PID controller for the closed loop system as depicted in Figure
4.16 using the ZNII method so that "some overshoot" occurs at the output.

28 TEL 306/05 Control Systems


R(s) 8 Y(s)
Gc(s)
2s3 + 7s2 + 10s + 3

Figure 4.16 A third order closed loop system

Solution

In this example, we will use the software simulator, VisSim 6.0, as an aid
to demonstrate the ZNII tuning method.

Step 1: Add a proportional controller to the process. Increase the gain of


the proportional controller until the system reaches the marginally stable
condition where a sustained oscillatory output is observed as shown in
Figure 4.17. The output plot is shown in greater detail in Figure 4.18.

Figure 4.17 Marginally stable condition

UNIT 4 Analogue control systems design 29


Tc

Figure 4.18 The time period for a cycle of oscillation

Step 2: The critical gain of the proportional controller, Kc, is recorded to


be 3.93 and the time period of one cycle of oscillation, Tc, is measured
to be 2.84.

Step 3: Calculate the parameters of the PID controller (Kp, Ti and Td)
using the ZNII table below. The corresponding row is highlighted based
on the expectation of the design.

The parameters of the PID could be calculated as follows:

Kp = 0.33Kc = 0.33 * 3.93 = 1.2969


Ti = 0.5Tc = 0.5 * 2.84 = 1.4286
Td = 0.33Tc = 0.33 * 2.84 = 0.9429

30 TEL 306/05 Control Systems


Kp Ti Td

P-controller only 0.5Kc


5Tc
PI-controller 0.45Kc
6
Tc
PID-controller 0.6Kc 0.5Tc
(tight control) 8
Kc Tc
PID-controller 0.5Tc
(some overshoot) 3 3
PID-controller 0.2Kc 0.3Tc 0.5Tc
(no overshoot)

Replacing these values into the transfer function of the PID controller
would give:

Kp[s2TiTd + sTi + 1]
=
sTi

1.2969(1.347s2 + 1.4286s + 1)
=
1.4286s

The overall transfer function of the open loop system with the PID
controlled is:

= [
1.2969(1.347s2 + 1.4286s + 1)
1.4286s
* ][ 8
2s3 + 7s2 + 10s + 3 ]
= [
7.2625(1.347s2 + 1.4286s + 1)
2s4 + 7s3 + 10s2 + 3s ]

UNIT 4 Analogue control systems design 31


Implementing this PID controller to the system would give an output
response as shown in Figure 4.19. The output response of the system with
the PID controller is faster, has no steady-state error, and has a minimal
overshoot. The combination of the Kp, Ti and Td values found using the
ZNII method might not be the best solution. The ZNII tuning method are
done empirically and are too generalised to cater for the subtle differences
of each individual process. Fine tuning on trail and error basis is usually
recommended to improve the system performance. The PID controller
after fine tuning is illustrated in Figure 4.20. The system output as shown
in Figure 4.21 indicates that the tuned output is slightly faster, has less
overshoot, and converges to the final value sooner.

Figure 4.19 The original system compared with the PID controlled system,
using the "some overshoot" parameter.

32 TEL 306/05 Control Systems


Figure 4.20 Comparison of PID parameters before and after fine tuning

Figure 4.21 Comparison on the system response before and after fine tuning

UNIT 4 Analogue control systems design 33


Activity 4.4

A process transfer function is given as below:

Y(s) 1
G(s) = = 3
U(s) s + 6s2 + 5s

Design a PID controller using the ZNII method to achieve a fast


response with maximum overshoot of 25%.

Summary

The performance of a system can be improved by using the PID


controllers, which could be in the configuration of P controller, I
controller, PI controller, PD controller and PID controller.

The proportional term, P, increases the speed of the system


response but does not eliminate the steady-state error. The integral
term, I, eliminates the steady-state error but gives oscillatory
and overshooting response. The derivative term, D, damps the
response of the system to reduce the overshoot and causes
less oscillatory response. When the three terms are collectively
used, the system is known as the PID controller. The choice of
the configuration should be justified by the characteristics of
the system and the expectation of the system designer. It is not
always true that the PID controller with all three terms should give
the optimal result. Calculating the gains of three terms could be
challenging for a complicated process and might also give rise to
the problem of over-fitting.

34 TEL 306/05 Control Systems


The Ziegler-Nichols II Method (ZNII) offers an alternative way
of tuning the PID gain. The ZNII does not require in-depth
understanding of the process. The required information for the
tuning mechanism could be obtained from the experimental data.
The suggested values of the gains are then read from the ZNII
table. Fine tuning by trial and error is recommended to improve
the performance of the controller.

Suggested answers to activities

Feedback

Activity 4.2

1. Time domain expression:


t
de(t)
u(t) = Kpe(t) + Ki ∫e(t)dt + Kd
0 dt

Transfer function:

Ki
Gc(s) = Kp + + Kd s
s

2. Proportional: Improves speed of response but results in


steady state error.
Integral: Minimises steady state error but slows down the
response.
Derivative: Minimises the overshoot and oscillating output
and improves the speed of convergence.

UNIT 4 Analogue control systems design 35


3. The closed loop transfer function when Gc(s) = k :

2k 2
Y(s) = R(s) + D(s)
s + 0.5 + 2k s + 0.5 + 2k

Steady state error, ess(s):

E(s) = R(s) − Y(s)

2k 2
E(s) = R(s) − R(s) + D(s)
s + 0.5 + 2k s + 0.5 + 2k

[
= 1−
2k
s + 0.5 + 2k ]
R(s) +
2
s + 0.5 + 2k
D(s)

ess(s) = lim SE(s)


s→0

= lim s
s→0 [ s + 0.5
s + 0.5 + 2k
R(s) −
2
s + 0.5 + 2k
D(s) ]
When R(s) = 1/s and D(s) = 1/s

ess(s) = lim s
s→0 [ s + 0.5
()
1
s + 0.5 + 2k s

2
s + 0.5 + 2k ( )]
1
s

0.5 2
ess(s) = −
0.5 + 2k 0.5 + 2k

36 TEL 306/05 Control Systems


4. The closed loop transfer function when Gc(s) = k + 1/s:

2ks + 2 2s
Y(s) = R(s) + D(s)
s2 + (0.5 + 2k)s + 2 s2 + (0.5 + 2k)s + 2

Steady state error:

E(s) = R(s) − Y(s)

2ks + 2 2s
E(s) = R(s) − R(s) + D(s)
s2 + (0.5 + 2k)s + 2 s2 + (0.5 + 2k)s + 2

[
= 1−
2ks + 2
s2 + (0.5 + 2k)s + 2 ]
R(s) +
2s
s2 + (0.5 + 2k)s + 2
D(s)

ess(s) = lim SE(s)


s→0

[
= 2
s2 + 0.5s
s + (0.5 + 2k)s + 2
R(s) + 2
2s
s + (0.5 + 2k)s + 2
D(s) ]
When R(s) = 1/s and D(s) = 1/s

ess(s) = lim s 2
s→0 [ s2 + 0.5s
s + (0.5 + 2k)s + 2 () 1
s

+
2s
s2 + (0.5 + 2k)s + 2 ( )]
1
s
ess(s) = 0

5. It can be seen that a PI controller as in part (d), has effectively


removed the steady state error as compared to a P controller
as in part (c), regardless of whether there is a disturbance.

UNIT 4 Analogue control systems design 37


Activity 4.3

The transfer function for the electric circuit could be derived by


using voltage divider rule:

Z1
Y(s) = U(s)
Z1 + Z2

Y(s) R 2 1
G(s) = = = =
U(s) R + Ls 10s + 2 5s + 1

The transfer function of the PI controller is:

ki
Gc(s) = kp +
s
The closed loop transfer function is given by:

GcG(s)
T(s) =
1 + GcG(s)

=
(kp + )( )
ki 1
s 5s + 1

1 + kp +
( )( )
ki 1
s 5s + 1

k ps + k i
=
5s2 + (1 + kp)s + ki

To achieve the desired closed loop transfer function,

k ps + k i 1
= ≡
5s2 + (1 + kp)s + ki s + 1

38 TEL 306/05 Control Systems


We need to perform pole-zero cancellation such that kps + ki is
cancelled out. This could be done by choosing:

kp = 5
ki = 1

Hence:

5s + 1 5s + 1 5s + 1 1
= = = ≡
5s2 + (1 + 5)s + 1 5s2 + 6s + 1 (5s + 1)(s + 1) s + 1

The transfer function of the PI controller is therefore:


ki 1
Gc(s) = kp + =5+
s s

Activity 4.4

The block diagram of the closed loop system is illustrated in the


figure below:

R(s) 1 Y(s)
Gc(s)
s + 6s2 + 5s
3

The ZNII method is as follows:

Step 1: Increase the proportional gain k to a critical value that


drives the closed loop system to a marginally stable condition.
The closed loop transfer function with the P controller is:

K
T(s) =
s3 + 6s2 + 5s + K

UNIT 4 Analogue control systems design 39


The characteristic equation, CE, of the system is therefore:
CE = s3 + 6s2 + 5s + K = 0

We may use Routh-Hurwitz stability criterion to calculate the


critical gain, Kc, that drives the system to the limit of marginally
stable situation.

Forming the Routh array

s3 1 5
s2 6 K

s1 30 − K
6
s0 K

Observing the coefficients of the first column of the Routh array,


we found that for a marginally case:

30 − K
=0
6
K = 30

Therefore,
= Kc, = 30

To find the frequency of oscillation, we need to substitute s = jw


and K = 30 into the CE:

CE = ( jw)3 + 6( jw)2 + 5( jw) + 30 = 0


= 6(5 – w2) + jw(5 – w2) = 0

Hence
w2 = 5
w = √5

40 TEL 306/05 Control Systems


The time period of one cycle of oscillation is therefore:

1
w = 2
Tc

2p
Tc = = 2.8099
w

Referring to the highlighted row of the table below:

Kp = 0.33Kc = 0.33 * 30 = 9.9


Ti = 0.5Tc = 0.5 * 2.81 = 1.4
Td = 0.33Tc = 0.33 * 2.81 = 0.9273

Kp Ti Td

P-controller only 0.5Kc


5Tc
PI-controller 0.45Kc
6
Tc
PID-controller 0.6Kc 0.5Tc
(tight control) 8

Kc Tc
PID-controller 0.5Tc
(some overshoot) 3 3

PID-controller 0.2Kc 0.3Tc 0.5Tc


(no overshoot)

Replacing these values into the transfer function of the PID


controller would give:

Kp[s2TiTd + sTi + 1]
=
sTi

1.2969[1.347s2 + 1.4286s + 1]
=
1.4286s

UNIT 4 Analogue control systems design 41


The overall transfer function of the open loop system with the PID
controller is:

= [ 9.9(1.2982s2 + 1.4s + 1]
1.4s ][
* 3
1
s + 6s2 + 5s ]
= [ 9.9(1.2982s2 + 1.4s + 1]
]
1.4s4 + 8.4s3 + 7s2 + 1.4s

The step response of the closed loop system with the designed
PID controller is illustrated in Figure 4.22. The response is fast and
with overshoot of less than 25%. Fine tuning is unnecessary as
the requirement is fulfilled.

Figure 4.22 The step response of the system with PID controller

42 TEL 306/05 Control Systems


4.3 Phase Compensator
Design
Introduction
The first step in designing a controller is finding the suitable gain (as
in P controller) to meet the required performance. In many cases,
however, adjusting the gain alone may not be desirable as it causes
other complications such as increasing percentage of overshoot or
steady state error. It is then necessary to incorporate additional devices
or components to alter the system characteristics locally at specific
range of frequency to meet the various requirements simultaneously. This
technique is called compensation and the devices or components are
called compensators. The compensators may be electric, mechanical,
hydraulic, pneumatic or other forms of network. In this section, we will
focus on the compensators in the form of passive electric circuits, namely
lead, lag and lead-lag compensators. The circuits for the phase lead and
phase lag compensators with the impedances are illustrated in Figure
4.23(a) and Figure 4.23(b) respectively. The general transfer function of
the phase compensators can be derived as:

1 1 + ats
Gc(s) = ∙
a 1 + ts
where a and t are the constants of the compensators defined by the
circuit configurations as depicted in Figure 4.23(a) and Figure 4.23(b)
respectively. If a > 1, the phase lead will dominate and this is a phase
lead compensator. Conversely, if a < 1, the phase lag will dominate
and this is a phase lag compensator. Both compensators could also be
cascaded to form a lead-lag compensator.

UNIT 4 Analogue control systems design 43


(a) Phase lead compensator (b) Phase lag compensator

Figure 4.23

The design of the compensator is conventionally carried out in the


frequency domain with the aid of a Bode plot. It is recalled that a Bode
plot consists of two plots as shown in Figure 4.24, namely the magnitude
plot and the phase plot with the x-axis indicating the frequency in rad/s.

GM ≈8dB

PM ≈35°

Figure 4.24 A Bode plot consists of Magnitude plot (top) and Phase plot
(bottom)

44 TEL 306/05 Control Systems


Phase lead compensator
The principle of a phase lead compensator is to improve the phase margin
(PM) at a specific range of frequencies. It could be done by selecting a
value of a which results in a value of desired phase, m as depicted in
Figure 4.25 sufficient to increase the PM to the required value. It is then
to find the best position along the frequency axis (x-axis) to place the
m by calculating the correct value of t.

The open loop transfer function of a phase lead compensator is written as:

1 1 + ats 1 1
Gc(s) = ∙ = ∙ (1 + ats) ∙
a 1 + ts a 1 + ts

where a > 1. The transfer function in the frequency domain is:

1 1
Gc( jw) = ∙ (1 + atjw) ∙
a 1 + tjw

The gain modulus, |G(w)|, of the compensator is thus:

1 1
|Gc(w)| = ∙ √1 + (atw)2 ∙
a √1 + (tw)2

Convert the gain modulus in unit dB,


|Gc(w)|dB = −20 log(a) + 20 log(√1 + (atw)2) − 20 log(√1 + (tw)2)

The phase angle:

[
(w) = − 0° + tan−1
atw
1
− tan−1
tw
1 ]

UNIT 4 Analogue control systems design 45


The Bode plot of the phase lead compensator is depicted in Figure 4.25.
Observing the Bode plot, we may deduce that:

1. Phase angle is zero at low and high frequencies and this means
that the circuit is only effective within the range of frequencies
of 1/t and 1/t. The values of t and  must be determined to
give the correct range of effective frequencies.

2. Since  > 1, then the phase is always positive and this means
that it will reduce the phase (phase lead) in a system in the
range of effective frequencies.

3. The amount of phase lead obtained depends upon the


separation of the break frequencies, wz = 1/t and wd = 1/t. If
both the break frequencies are placed wide apart, the numerator
will be allowed to contribute virtually all its available 90° of the
phase lead before the denominator phase lag decreases the
phase back to the value of zero at high frequency. If, however,
both the break frequencies are close together, their effects
cancel each other out and little phase lead is obtained.
Gain dB

1/at 1/t
Frequency (rad/sec)
Phase deg

m

wm

Figure 4.25 Bode plot for a phase lead compensator

46 TEL 306/05 Control Systems


The amount of phase lead is determined by , and the phase advance
is related to  by:

a −1
sin(m ) =
a+1

The frequency at which the maximum phase lead occurred is:

wm =
√ 1 1
· =
1
at t t√a
rad/s

A general guideline for designing a phase lead compensator is given


below (John, 1996):

1. Determine the gain, K, to satisfy the requirement such as the


steady state error tolerance and the bandwidth needed.

2. Construct Bode plot and measure the PM.

3. Determine the values of a and m.

4. Calculate the frequency at which the maximum phase lead is


to be located , wm.

5. Calculate the t value.

6. Substitute the a and t values into the phase lead compensator


transfer function. Redraw the Bode plot and check if the
PM fulfils the requirement. If not, the procedures are repeated
by appropriate adjustment to the gain, K, and phase allowance
of the m.

UNIT 4 Analogue control systems design 47


Example 4

Consider a paint spraying robot control system with the process transfer
function as shown below:

Controller Compensator
R(s) 20 10 Y(s)
K Gc(s)
s + 20 s(s + 5)

Figure 4.26 Paint spraying robot control system

Determine a suitable value for the P controller, K, and the transfer function
for the phase lead compensator, Gc(s). The system is required to have a
bandwidth of at least 1 Hz and a PM of 45°.

Solution

Following the guideline provided, the first step is to determine the gain,
K, of the P controller to satisfy the requirement on the bandwidth. The
bandwidth of the uncompensated system with the gain, K = 1, could
be determined by constructing the Bode plot as shown in Figure 4.27
indicated as the solid line. The bandwidth is measured from the Bode
plot as 2 rad/s at the 0 dB crossover frequency. The required bandwidth
must be more than 1 Hz, which is equivalent to 6.28 rad/s, based on the
calculation below:

w = 2f = 2(3.142)(1) = 6.284 ≈ 6.28 rad/s

The current system is therefore not fulfiling the bandwidth requirement.

48 TEL 306/05 Control Systems


From the Bode plot, at 6.28 rad/s, the gain is measured to be 15 dB,
which is equivalent to gain, K as:

20 log(K) = 15 dB → K ≈ 5.65

Setting the P controller gain, K = 5.65 offsets the Magnitude curve


(dashed line) upwards and also shifted the 0 dB crossover frequency
to the right as indicated by the arrows in Figure 4.27. The bandwidth
requirement is now fulfilled with the crossover frequency at 6.28 rad/s.
However, the new bandwidth has reduced the PM to only 19°. As the
system requires 45° PM, a phase lead compensator is required.

Figure 4.27 Bode plot of uncompensated system for gain, K = 1 and K = 5.65

The phase lead compensator could be designed by calculating the


values of a and m. The phase angle to be compensated, m, could be
calculated as:

m = Required PM − Actual PM + Phase error allowance

UNIT 4 Analogue control systems design 49


Phase error allowance is normally in between 5% to 10%. Let’s set the
phase error allowance as 5°, the phase angle to be compensated, m, is:

m = 45° – 19° + 5° = 31°

To calculate the value of a, we may use the following equation:

a −1
sin(m ) =
a+1

a −1
sin(31°) =
a+1

a −1
0.515 =
a+1
a = 3.12

Substitute a = 3.12 into the transfer function for the phase lead
compensator,

1 1 + 3.12ts
Gc(s) = ·
3.12 1 + ts
To determine the value of t, we need to find the frequency at which
the maximum phase lead, wm, is to be located. At high frequency, the
magnitude of the compensator is:

20 log a = 20 log(3.12) ≈ 10 dB

The maximum phase lead, wm, should be located at the frequency where
the magnitude is half of the magnitude of compensator at high frequency,
which is where the magnitude is 10/2 = 5dB. Referring to the dashed
line in Figure 4.27, the frequency at 5 dB is approximately 11.3 rad/s.
Therefore, the value of t could be calculated as:

50 TEL 306/05 Control Systems


wm =
√ 1 1
· =
1
at t t√a
rad/s

1
11.3 = rad/s
t√3.12
t = 0.05 s

Substitute the a and t values into the phase lead compensator transfer
function yield:

1 1 + 3.12(0.05)s 1 + 0.16s
Gc(s) = · = 0.32 ·
3.12 1 + 0.05s 1 + 0.05s

As the phase lead compensator causes an attenuation of the gain of


0.32, the P controller gain, K, must be increased by a factor of 1/0.32 to
compensate for the attenuation. Hence, the P controller gain, K, should
be updated as:

1
K = 5.65 ∙ = 17.7
0.32

The complete system with the P controller and the phase lead
compensator is illustrated in Figure 4.28(a) and (b). The Bode plot is
redrawn as shown in Figure 4.29. Both requirements on the bandwidth
and the PM are satisfied.

UNIT 4 Analogue control systems design 51


P Controller Compensator
R(s) 1 + 0.16s 20 10 Y(s)
+ 17.7 0.32 ·
− 1 + 0.05s s + 20 s(s + 5)

(a) Complete system with P controller and phase lead compensator

(b) Bode plot for the system with P controller and phase lead
compensator

Figure 4.28

52 TEL 306/05 Control Systems


Phase lag compensator
The transfer function of a phase lag compensator is identical to the
phase lead compensator except a < 1. The Bode plot of the phase lag
compensator is illustrated in Figure 4.29. The phase is always negative
and at first glance, adding this compensator to the system appears
to make the response worse. An important note, however, is that at
high frequencies, the phase lag will be zero but the gain is reduced by
−20log a. This is the principle of a phase lag compensator to utilise the
characteristic of high frequency attenuation to decrease the magnitude
in the region of the 0dB crossover frequency, thus reducing the gain
crossover frequency and increasing the PM. The guideline to design a
phase lag compensator could be summarised as follows:

1. Obtain the value for K which satisfies the bandwidth or steady


state error requirement and plot the corresponding Bode Plot.

2. Find the gain crossover frequency, wc, that coincides with the
desired phase angle to be compensated, m.

3. Read the gain of the uncompensated system, Kc, at this


frequency, wc.

4. Calculate a using equation 20 log a = Kc.

5. Select t so that the higher corner frequency is one decade


below wc, i.e. 1/(at) = 0.1wc.

6. Substitute the a and t values into the phase lag compensator


transfer function. Redraw the Bode plot to validate the design.

UNIT 4 Analogue control systems design 53


Figure 4.29 Bode plot for a phase lag compensator

Example 5

A feedback control system is illustrated in the block diagram as shown


below:

Controller Compensator
R(s) 1 1 Y(s)
K Gc(s)
5s + 1 (s + 1)(0.5 s + 1)

Figure 4.30 A feedback control system with phase lag compensator

Design a P controller with suitable gain, K, and a phase lag compensator,


Gc(s) to achieve a PM of 45° and a steady state error, ess not exceeding
2.5%.

54 TEL 306/05 Control Systems


Solution

The open loop transfer function for an uncompensated system where


Gc(s) = 1 is given as:

K
G(s) =
(5s + 1)(s + 1)(0.5s + 1)

Since this is a type 0 system, a steady state error exists if a unit step

1
input, R(s) = , is applied. We may use the static constant for a positional
s
error, Kp (refer to Unit 2) as:
K
Kp = lim G(s) = lim =K
s→0 s→0 (5s + 1)(s + 1)(0.5s + 1)

The steady state error is required to be not exceeding 2.5%, hence:



1
ess = 0.025 =
1+K
0.025 + 0.025K = 1
K  40

The frequency responses of the system for the P controller when K =


1 and K = 40 are indicated in Figure 4.31 as solid and dashed curves
respectively. It is noted the system becomes unstable when K = 40 as
the PM is measured to be −18°. A phase lag compensator is needed to
improve the system.

The phase lag compensator could be designed by calculating the values


of a and m. The phase angle to be compensated, m, could be calculated
as:

m = Required PM + Phase error allowance

UNIT 4 Analogue control systems design 55


Let’s set the phase error allowance to be 5°, the phase angle to be
compensated, m, is:

m = 45° + 5° = 50°

The frequency with the m = 50° can be read from Figure 4.31 as wc
= 0.7 rad/s. The magnitude at this frequency, wc is measured to be
approximately, Kc = 18.6 dB as indicated in the Magnitude plot. The a
can now be calculated as:

20 log a = −Kc → a = 0.12

The higher corner frequency is one decade below wc, hence:

1/(at) = 0.1wc → t = 119 ≈ 120

Figure 4.31 Bode plot for the system with P controller gain, K = 1 and K = 40

56 TEL 306/05 Control Systems


Substitute the a and t values into the phase lag compensator transfer
function yield:

1 1 + ats
Gc(s) = ·
a 1 + ts

1 1 + 0.12(120)s 1 + 14s
Gc(s) = · = 8.33 ·
0.12 1 + 120s 1 + 120s

As the phase lag compensator causes an amplification of the gain of


8.33, the P controller gain, K, must be decreased by the factor of 8.33
to compensate for the amplification. Hence, the P controller gain, K,
should be updated as:

40
K= = 4.8
8.33

The complete system with P controller and the phase lag compensator
is illustrated in Figure 4.32. The Bode plot is redrawn as shown in Figure
4.33. The PM of 45° is satisfied.

P Controller Compensator
R(s) 1 + 14s 1 1 Y(s)
4.8 8.33
1 + 120s 5s + 1 (s + 1)(0.5 s + 1)

Figure 4.32 A complete system with P controller and phase lag compensator

UNIT 4 Analogue control systems design 57


PM = 45°

Figure 4.33 Bode plot of the complete system with P controller and phase lag
compensator

The step response of the system when K = 40 is illustrated in Figure 4.34.


It is observed that the steady state error requirement is fulfilled with less
than 2.5% error.

58 TEL 306/05 Control Systems


ess = 2.5%

Figure 4.34 Step response for the complete system with P controller gain and
phase lag compensator.

Lead-lag compensator
A lead-lag compensator cascades both the phase lead compensator and
the phase lag compensator in series. By carefully designing the lead-lag
compensator, it is possible to achieve a compromise in a way of:

1. Improve the performance of the response at low frequency


range via the effect from the phase lag compensator such as
reducing the steady state error.

2. Improve the performance of the response at high frequency


range via the effect from the phase lead compensator such as
shorter rise time and less percentage of overshoot.

UNIT 4 Analogue control systems design 59


The transfer function of the lead-lag compensator is therefore given as:

1 + at1s 1 + bt2s
Gc(s) = ·
1 + t 1s 1 + t 2s
where a > 1, b < 1 and t1 > t2

To implement a lead-lag compensator, the lead compensator is first


designed to achieve the desired transient response, and followed by
a lag compensator to improve the steady-state response of the lead-
compensated system.

Example 6

Consider a closed loop control system with the plant transfer function
as shown below:

Controller Compensator
R(s) 2(2s + 1) Y(s)
K Gc(s)
s(5s + 1)(0.2s + 1)(0.014s + 1)

Figure 4.35 Case study for lead-lag compensator control system

Determine a suitable value for the P controller, K, and the transfer function
for the lead-lag compensator, Gc(s). The system is required to have a
steady state error not exceeding 2%, a PM of 55° and the bandwidth
of 5 rad/s.

60 TEL 306/05 Control Systems


Solution

First, let’s design the phase lead compensator. The first step is to
determine the gain, K, of the P controller to satisfy the requirement of
steady state error. Since this is a type 1 system, the closed loop system
will have zero steady-state error for a step input, and a finite steady-state
error for a ramp input.

1
When a unit ramp input, R(s) = , is applied, the static constant is:
s2
Kv = lim s G(s)
s→0

As the required steady state error is 2% or 0.02, therefore the gain, K,


required for the P controller could be calculated as:

1 1
ess = = = 0.02
Kv 2K(2s + 1)
lim s
s→0 s(5s + 1)(0.2s + 1)(0.014s + 1)

1
0.02 =
2K
K = 25

The frequency responses of the system for the P controller when K = 1


and K = 25 are indicated in Figure 4.36. The system is required to have a
bandwidth of 5 rad/s. The PM corresponding to the 5 rad/s is measured
to be 37° for the system with K = 25. To meet the required PM of 55°,
the lead part of the compensator will need to increase the phase at the
5 rad/s by an amount of:

m = Required PM – Actual PM + Phase error allowance

Let’s set the phase error allowance to be 10°, hence:


m = 55° – 37° + 10° = 28°

UNIT 4 Analogue control systems design 61


Figure 4.36 Bode plot of uncompensated system for gain, K = 1 and K = 25

To calculate the value of a, we may use the following equation:

a−1
sin(m) =
a+1

a−1
sin(28°) =
a+1

a−1
0.47 =
a+1
a = 2.7

62 TEL 306/05 Control Systems


Substitute a = 2.7 into the transfer function for the lead part of the
compensator,

1 1 + 2.7t1s
Gc(s) = ·
2.7 1 + t 1s

To determine the value of t, we need find the frequency at which the


maximum phase lead, wm, to be located. At high frequency, the magnitude
of the compensator is:

20 log a = 20 log(2.7) = 9 dB

The maximum phase lead, wm, should be located at frequency when the
magnitude is half of the magnitude of compensator at high frequency,
which is the frequency at the magnitude of 9/2 = 4.5dB. Referring to the
red line in Figure 4.36, the frequency at 4.5 dB is approximately 15 rad/s.
Therefore, the value of t could be calculated as:

wm =
√ 1 1
· =
1
at1 t1 t1√a
rad/s

1
15 = rad/s
t1√2.7
t1 = 0.04 s

Substitute the a and t1 values into the transfer function for the lead part
of the compensator:

1 1 + 2.7(0.04)s 1 + 0.11s
Gc(s) = · = 0.37 ·
2.7 1 + 0.04s 1 + 0.04s

As the lead part of the compensator causes an attenuation of the gain


of 0.37, the P controller gain, K, must be increased by the factor of
1/0.37 to compensate for the attenuation. Hence, the P controller gain,
K, should be updated as:

UNIT 4 Analogue control systems design 63


1
K = 25 ∙ = 67.6
0.37

The Bode plot with the lead compensated is shown as dashed curve
in Figure 4.37. The PM of 55° is achieved at the frequency of 5 rad/s.
However, the Magnitude plot indicates that the gain is more than 0 dB at
this frequency. The lag part of the compensator must provide this amount
of attenuation in order to make 5 rad/s actually be the gain crossover
frequency, wc. The magnitude at wc is measured to be approximately,
Kc = 13 dB as indicated in the Magnitude plot in Figure 4.37. The b can
now be calculated as:

20 log b = −Kc → b = 0.22

The higher corner frequency is one decade below wc, hence:

1
= 0.1wc → t2 = 9.1 ≈ 9
bt2

Substituting the b and t2 values into the transfer function for the lag part
of the compensator yields:

1 1 + bt2s
Gc(s) = ∙
b 1 + t 2s

1 1 + 0.22(9)s 1 + 1.98s
Gc(s) = ∙ = 4.55 ∙
0.22 1 + 9s 1 + 9s

64 TEL 306/05 Control Systems


Figure 4.37 Bode plot for the system with and without lead compensation at
K = 25.

As the phase lag compensation causes an amplification of the gain of


4.55, the P controller gain, K, must be decreased by the factor of 4.55 to
compensate for the amplification. Hence, the overall P controller gain, K,
considering the phase lead and lag compensation should be updated as:

1 1
K = 25 ∙ ∙ ≈ 15
0.37 4.55

The complete system with P controller and the lead-lag compensator is


illustrated in Figure 4.38. The Bode plot is redrawn as shown in Figure
4.39. The bandwidth is now at 5 rad/s with the PM of 55° as required.

UNIT 4 Analogue control systems design 65


Controller Compensator
R(s) 1 + 0.11s 1 + 1.98s 2(2s + 1) Y(s)
15 ·
1 + 0.04s 1 + 9s s(5s + 1)(0.2s + 1)(0.014s + 1)

Figure 4.38 A complete system with P controller and lead-lag compensator

Figure 4.39 Bode plot of the original system and the complete system with P
controller and lead-lag compensator

The step responses of the systems are illustrated in Figure 4.40. As both
systems are type 1 systems, they exhibit zero steady state error as per
discussed in Unit 2. The system with the lead-lag compensator, however,
has lower rise time and converges to the final value sooner. The significant
contribution of the lead-lag compensator could be observed in Figure 4.41
when the systems are subjected to a ramp input. It responses faster and
converges to a final value within 2% of steady state error. The original

66 TEL 306/05 Control Systems


system is slow and shows an obvious steady state error. The design of
the P controller with the lead-lag compensator is therefore concluded
to be effective to satisfy all the expectations.

Figure 4.40 Comparison on time responses of the systems for a step input

UNIT 4 Analogue control systems design 67


Figure 4.41 Comparison on time response of the systems for a ramp input

Activity 4.5

An open loop process transfer function is given as below:

Y(s) 1
G(s) = =
U(s) (10s + 1)(s + 1)

The system is required to have a PM of 45° and a steady state


error not exceeding 1%. Determine the appropriate gain for the
P controller, K. If the requirements are not satisfied with the P
controller, you may design a suitable phase lead compensator
for the system.

68 TEL 306/05 Control Systems


Reading

In this unit, the phase compensator design is demonstrated by


using the Bode plot as the analytical tool. To gain knowledge on
other methods of designing the phase compensator, please refer
to:

Richard, C. D. & Robert, H. B. (2011). Modern control systems


(12th ed.). Boston: Pearson, Chapter 10.

Summary

It has been demonstrated that different configurations of phase


compensators could be designed to alter the characteristics
of the system at a specific range of frequencies. A phase lead
compensator is used to improve the transient response in the
aspect of reducing the percentage of overshoot and speed up the
response time. This could be done by extending the bandwidth
and increasing the phase margin at certain frequency. The broader
bandwidth, however, makes the system subjected to more noises.
A phase lag compensator on the other hand improves the steady
state response by means of improving the stability and reducing
the steady state error. This could be done by reducing the system
bandwidth to increase the phase margin of the system. Narrower
bandwidth, however, causes the system to respond slower. A
compromise can be achieved by means of a lead-lag compensator
via cascading both the phase lead compensator and the phase
lag compensator.

UNIT 4 Analogue control systems design 69


Suggested answers to activity

Feedback

Activity 4.5

The first step is to determine the gain, K, of the P controller to


satisfy the steady state requirement of not exceeding 1%. Since
this is a type 0 system, a steady state error exists if a unit step

1
input, R(s) = , is applied. We may use the static constant for a
s
positional error (refer to Unit 2) as:

K
Kp = lim G(s) = lim =K
s→0 s→0 (10s + 1)(s + 1)

The steady state error is required to be not exceeding 1%, hence:

1
ess = 0.01 =
1+K
0.01 + 0.01K = 1
K = 99

The step responses of the systems are shown in Figure 4.42. The
P controller with gain of K = 99 seems fulfilling the requirement
of 1% steady state error, but the response is with large overshoot
and oscillatory. We will investigate the frequency response of the
system by using the Bode plot.

70 TEL 306/05 Control Systems


Figure 4.42 Step responses of systems for gains, K = 1 (original) and
K = 99

Setting the P controller gain, K = 99 offsets the Magnitude curve


(dashed line) upwards and also shifted the 0 dB crossover frequency
to the right as illustrated in Figure 4.43. The new bandwidth has
reduced the PM to only 19°. As the system requires 45° PM, a
phase lead compensator is required.

The phase lead compensator could be designed by calculating


the values of a and m. Let’s set the phase error allowance as 10°,
the phase angle to be compensated, m, is:

m = 45° – 19° + 10° = 36°

UNIT 4 Analogue control systems design 71


To calculate the value of a, we may use the following equation:

−1
sin(m) =
a+1

−1
sin(36°) =
a+1

−1
0.588 =
a+1
a = 3.85

Figure 4.43 Bode plot of uncompensated system for gain, K = 1 and


K = 5.65

72 TEL 306/05 Control Systems


Substituting a = 3.85 into the transfer function of the phase lead
compensator yields,

1 1 + 3.85ts
Gc(s) = ·
3.85 1 + ts

To determine the value of t, we need find the frequency at which


the maximum phase lead, wm, is to be located. At high frequency,
the magnitude of the compensator is:

20 log a = 20 log(3.85) ≈ 12 dB

The maximum phase lead, wm, should be located at frequency


when the magnitude is half of the magnitude of compensator at
high frequency, which is at frequency with the magnitude of 12/2
= 6 dB. Referring to the dashed line in Figure 4.43, the frequency
at 6 dB is approximately 5 rad/s. Therefore, the value of t could
be calculated as:

wm =
√ 1 1
· =
1
at t t√a
rad/s

1
5= rad/s
t√3.85
t = 0.1 s

Substitute the a and t values into the phase lead compensator


transfer function:

1 1 + 3.85(0.1)s 1 + 0.39s
Gc(s) = · = 0.26 ·
3.85 1 + 0.1s 1 + 0.1s

UNIT 4 Analogue control systems design 73


As the phase lead compensator causes an attenuation of the gain
of 0.26, the P controller gain, K, must be increased by the factor of
1/0.26 to compensate for the attenuation. Hence, the P controller
gain, K, should be updated as:

1
K = 99 ∙ = 380
0.26

The complete system with P controller and the phase lead


compensator is illustrated in Figure 4.44.

P Controller Compensator
R(s) 1 + 0.39s 1 Y(s)
380 0.26 ·
1 + 0.01s (10s + 1)(s + 1)

Figure 4.44 Complete system with P controller and phase lead


compensator

The Bode plot is redrawn as shown in Figure 4.45. The PM is now


more than 45°. Both requirements on the bandwidth and the PM
are satisfied. The step response of the complete system in Figure
4.46 indicates that the output of the system converges to the final
value with steady state error not exceeding 1%, slight overshoot
and less oscillatory. All the requirements are now satisfied.

74 TEL 306/05 Control Systems


Figure 4.45 Bode plot for the system with P controller and phase lead
compensator

Figure 4.46 Step responses of the original system and the compensated
system

UNIT 4 Analogue control systems design 75


Summary of Unit 4

Summary

1. Three categories of controllers are studied in this unit, namely


the discrete-state controller, the Proportional-Integral-
Derivative (PID) controller and the phase compensator.

2. Real world systems tend to be MIMO. Designing controllers to


handle MIMO systems could be complicated. One of the
solutions is by decoupling the MIMO system into a number
of SISO systems. A simpler controller could be then designed
based on the need of each SISO system. The unit covers
only on designing controllers for the SISO systems.

3. A discrete-state controller is the controller that feeds a


discrete input force function to the process. It is also called
as an On-Off controller or a Bang-bang controller.

4. Discrete-state controllers are easy to design and widely


applied in the industries where the control systems are
specified in a series of events. PLCs are commonly used to
implement the discrete-state control system.

5. In some cases, the operating mechanism of the discrete-state


controller is considered as an optimal control. However, it
suffers a main drawback of oscillatory steady state output
defined as the error band.

6. PID controllers provide continuous control of the process


to achieve a smoother performance. Five basic configurations
of PID controllers are studied, namely the P controller,
I controller, PI controller, PD controller and PID controller.

76 TEL 306/05 Control Systems


7. The proportional (P) term improves speed of response but
results in steady state error. The integral (I) term minimises
steady state error but slow down the response. The derivative
(D) term reduces the overshoot and oscillatory response.

8. The gains of each term could be calculated analytically if the


process model is available. However, Ziegler-Nichols II
Method (ZNII) offers an alternative way of determining the
PID gain by means of empirical method.

9. A phase compensator is the additional device or component


to alter the system characteristics locally at specific range
of frequency to meet the various requirements simultaneously.

10. Three forms of phase compensators, namely lead, lag and


lead-lag compensators are studied. The operating principles
and the performances of the compensators are elaborated.

UNIT 4 Analogue control systems design 77


References
John, S. (1996). Essentials of control. London: Addison Wesley Longman
Limited.

Mendoza, J. S., Pody, B. C., Lee, S., Kim, M., & McDonough, I. M. (2018).
The effect of cellphones on attention and learning: The influences of time,
distraction, and nomophobia. Computers in Human Behavior, 86, 52 – 60.

Microstar Laboratories. (1999). Ziegler-Nichols Tuning Rules for PID.


Retrieved from http://www.mstarlabs.com/control/znrule.html.

Nise, N. S. (2011). Control systems engineering (6th ed.). Hoboken, NJ:


Wiley.

Richard, C. D. & Robert, H. B. (2011). Modern control systems (12th ed.).


Boston: Pearson.

78 TEL 306/05 Control Systems


COURSE TEAM
Course Team Coordinator: Dr. Magdalene Goh Wan Ching
Content Writer: Dr. Robin Tan Leong Ping
Instructional Designer: Ms. Jeanne Chow
Academic Member: Dr. Mohd Hezri Bin Marzaki

COURSE COORDINATOR
Dr. Magdalene Goh Wan Ching

EXTERNAL COURSE ASSESSOR


Associate Professor Dr. Yeap Kim Ho, Universiti Tunku Abdul Rahman

PRODUCTION
In-house Editor: Ms. Jeanne Chow
Graphic Designer: Ms. Valerie Ooi

Wawasan Open University is Malaysia’s first private not-for-profit tertiary institution dedicated to
adult learners. It is funded by the Wawasan Education Foundation, a tax-exempt entity established
by the Malaysian People’s Movement Party (Gerakan) and supported by the Yeap Chor Ee Charitable
and Endowment Trusts, other charities, corporations, members of the public and occasional grants
from the Government of Malaysia.

The course material development of the university is funded by Yeap Chor Ee Charitable and
Endowment Trusts.

© 2019 Wawasan Open University

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or
transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise,
without prior written permission from WOU.

Wawasan Open University [DU013(P)]


Wholly owned by Wawasan Open University Sdn. Bhd. (700364-W)
54, Jalan Sultan Ahmad Shah, 10050 Penang.
Tel: (604) 2180333 Fax: (604) 2279214
Email: [email protected]
Website: www.wou.edu.my

You might also like