Control Systems U4 (TEL306)
Control Systems U4 (TEL306)
Control Systems U4 (TEL306)
Control Systems
Unit 4
Analogue Control
Systems Design
Contents
Unit overview 1
Unit outcomes 5
Introduction 6
Introduction 12
Introduction 43
Lead-lag compensator 59
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.
Sensor
Measurement, D(s)
B(s) 1
=
Y(s) ts + 100
Various disturbances
pH sensor
ORP sensor
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.
Disturbances
ORP sensor
Disturbances
pH sensor
Figure 4.4
Web Reference
https://en.wikipedia.org/wiki/Correlation_and_dependence
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.
Sensor
Set
Error band
Point
Figure 4.6 Example of time response for the discrete-state temperature control
system
Activity 4.1
Feedback
Activity 4.1
Electric Actual
Setpoint Error Discrete-state power Water heating temperature
controller process
Temperature
sensor
Set 289.6°C
Error
Point
band
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.
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)
Figure 4.7
U(s) 1 1
Gc(s) = = = Ki
E(s) Ti s s
1
where Ki = , Ti is the integral constant.
Ti
1
Gc(t) = Ki ∫ e(t)dt = ∫ e(t)dt
Ti
Figure 4.8
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).
U(s) 1 1
Gc(s) = = Kp + = Kp + Ki
E(s) Ti s s
1
Gc(t) = Kp[e(t) + ∫ e(t)dt]
Ti
Figure 4.9
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).
U(s)
Gc(s) = = Kp + sTd = Kp + Kd s
E(s)
[
Gc(t) = Kp e(t) + Td
de(t)
dt ]
Figure 4.10
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.
U(s) 1 1
Gc(s) = = Kp + + sTd = Kp + Ki + Kd s
E(s) Ti s s
[
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
Figure 4.11
dTw(t)
= c[Ta − Tw(t)] + u(t)
dt
Heater
Water Ta
Tw
Insulation
dy(t) d[Tw(t)]
= = c[−y(t)] + u(t) = −0.5y(t) + u(t)
dt dt
Hence,
Y(s) 1 2
G(s) = = =
U(s) s + 0.5 2s + 1
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
ki
Gc(s) = kp +
s
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:
R(s) 1 Y(s)
Gc(s)
s − 3s + 2
2
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
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.
1 Kd s2 + Kp s + Ki
Gc(s) = Kp + Ki + Kd s =
s s
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
1
Gc(s) = 9 + 6 + 9s
s
Activity 4.2
D(s)
+
+ +
R(s) 2 Y(s)
∑ Gc(s) ∑
s + 0.5
−
Activity 4.3
i(t) L = 10H
u(t) R = 2Ω y(t)
Y(s) 1
G(s) = =
Yr ef (s) s + 1
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.
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.
Solution
In this example, we will use the software simulator, VisSim 6.0, as an aid
to demonstrate the ZNII tuning method.
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.
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 ]
Figure 4.19 The original system compared with the PID controlled system,
using the "some overshoot" parameter.
Figure 4.21 Comparison on the system response before and after fine tuning
Y(s) 1
G(s) = = 3
U(s) s + 6s2 + 5s
Summary
Feedback
Activity 4.2
Transfer function:
Ki
Gc(s) = Kp + + Kd s
s
2k 2
Y(s) = R(s) + D(s)
s + 0.5 + 2k s + 0.5 + 2k
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)
= 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
2ks + 2 2s
Y(s) = R(s) + D(s)
s2 + (0.5 + 2k)s + 2 s2 + (0.5 + 2k)s + 2
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)
[
= 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
Z1
Y(s) = U(s)
Z1 + Z2
Y(s) R 2 1
G(s) = = = =
U(s) R + Ls 10s + 2 5s + 1
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
k ps + k i 1
= ≡
5s2 + (1 + kp)s + ki s + 1
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
Activity 4.4
R(s) 1 Y(s)
Gc(s)
s + 6s2 + 5s
3
K
T(s) =
s3 + 6s2 + 5s + K
s3 1 5
s2 6 K
s1 30 − K
6
s0 K
30 − K
=0
6
K = 30
Therefore,
= Kc, = 30
Hence
w2 = 5
w = √5
1
w = 2
Tc
2p
Tc = = 2.8099
w
Kp Ti Td
Kc Tc
PID-controller 0.5Tc
(some overshoot) 3 3
Kp[s2TiTd + sTi + 1]
=
sTi
1.2969[1.347s2 + 1.4286s + 1]
=
1.4286s
= [ 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
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.
Figure 4.23
GM ≈8dB
PM ≈35°
Figure 4.24 A Bode plot consists of Magnitude plot (top) and Phase plot
(bottom)
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
1 1
Gc( jw) = ∙ (1 + atjw) ∙
a 1 + tjw
1 1
|Gc(w)| = ∙ √1 + (atw)2 ∙
a √1 + (tw)2
[
(w) = − 0° + tan−1
atw
1
− tan−1
tw
1 ]
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.
1/at 1/t
Frequency (rad/sec)
Phase deg
m
wm
a −1
sin(m ) =
a+1
wm =
√ 1 1
· =
1
at t t√a
rad/s
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)
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:
20 log(K) = 15 dB → K ≈ 5.65
Figure 4.27 Bode plot of uncompensated system for gain, K = 1 and K = 5.65
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:
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
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.
(b) Bode plot for the system with P controller and phase lead
compensator
Figure 4.28
2. Find the gain crossover frequency, wc, that coincides with the
desired phase angle to be compensated, m.
Example 5
Controller Compensator
R(s) 1 1 Y(s)
K Gc(s)
5s + 1 (s + 1)(0.5 s + 1)
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)
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:
Figure 4.31 Bode plot for the system with P controller gain, K = 1 and K = 40
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
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
Figure 4.33 Bode plot of the complete system with P controller and phase lag
compensator
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 + at1s 1 + bt2s
Gc(s) = ·
1 + t 1s 1 + t 2s
where a > 1, b < 1 and t1 > t2
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)
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.
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
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
a−1
sin(m) =
a+1
a−1
sin(28°) =
a+1
a−1
0.47 =
a+1
a = 2.7
1 1 + 2.7t1s
Gc(s) = ·
2.7 1 + t 1s
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
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:
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
1 1
K = 25 ∙ ∙ ≈ 15
0.37 4.55
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
Figure 4.40 Comparison on time responses of the systems for a step input
Activity 4.5
Y(s) 1
G(s) = =
U(s) (10s + 1)(s + 1)
Summary
Feedback
Activity 4.5
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)
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.
−1
sin(m) =
a+1
−1
sin(36°) =
a+1
−1
0.588 =
a+1
a = 3.85
1 1 + 3.85ts
Gc(s) = ·
3.85 1 + ts
20 log a = 20 log(3.85) ≈ 12 dB
wm =
√ 1 1
· =
1
at t t√a
rad/s
1
5= rad/s
t√3.85
t = 0.1 s
1 1 + 3.85(0.1)s 1 + 0.39s
Gc(s) = · = 0.26 ·
3.85 1 + 0.1s 1 + 0.1s
1
K = 99 ∙ = 380
0.26
P Controller Compensator
R(s) 1 + 0.39s 1 Y(s)
380 0.26 ·
1 + 0.01s (10s + 1)(s + 1)
Figure 4.46 Step responses of the original system and the compensated
system
Summary
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.
COURSE COORDINATOR
Dr. Magdalene Goh Wan Ching
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.
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.