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

Process Modelling, Simulation and Control for Chemical Engineers.

Solved
problems. Chapter 13: Frequency domain analysis of closed loop systems:
Part I.
This document contains my own solutions to the problems proposed at the end of each chapter of
the book ”Process Modelling, Simulation and Control for Chemical Engineers”, Second Edition,
by William L. Luyben. As such, I can’t guarantee that the proposed solutions are free from errors.
Think about them as a starting point for developing or as a means of checking your own solutions.
Any comments or corrections will be appreciated. Contact me at francisco.angel.rod@gmail.com
The computer programs developed for this chapter (Python) are available at:
https://www.dropbox.com/sh/dn9noegfkn87uba/AAA7YN3Wr F55n61zNa6DouRa?dl=0

Problem 1
(a) Make Bode, Nyquist, and Nichols plots of the system with K = 1:

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

(b) Find the value of gain that gives a phase margin of 45◦ . What is the gain margin?.

(c) Find the value of gain that gives a gain margin of 2. What is the phase margin?.
(d) Find the value of gain that gives a maximum closed loop log modulus of +2 dB. What are the
gain and phase margins with this value of gain?
(e) Find the Ziegler Nichols settings for this process and calculate the gain and phase margins and
maximum closed loop log moduli that they give for P, PI and PID controllers.

Solution
(a)
1
GB(wj) =
1 − 8w2 + j(6.5w − 2.5w3 )

Nyquist, Bode, and Nichols plots are shown in Figures 1, 2 and 3, respectively, for w from 0.01
to 100, GB(wj) start at 0.997 − 0.0648j and end at −1.28 ∗ 10−8 + 4.00 ∗ 10−7 j.

Figure 1: Nyquist plot.

1
Figure 2: Bode plot.

Figure 3: Nichols plot.

(b)
1 − 8w2 + j(2.5w3 − 6.5w)
GB(wj) = K
1 + 26.25w2 + 31.5w4 + 6.25w6

We want both the imaginary and real parts of GB to be equal to − 2/2:

2 1 − 8w2
− =K (1)
2 1 + 26.25w2 + 31.5w4 + 6.25w6

2 2.5w3 − 6.5w
− =K (2)
2 1 + 26.25w2 + 31.5w4 + 6.25w6
Combining equation (1) and (2) we get:
−2.5w3 − 8w2 + 6.5w + 1 = 0

The solution is w = 0.782, K = 5.50. The intersection with the real axis corresponds to
Im(GB) = 0:
2.5w3 − 6.5w = 0

The solution is w = 1.61. The gain margin is:


1
= 3.60
|GB|w=1.61,K=5.50

2
(c) At the intersection with the real axis (w = 1.61), the magnitude of GB must be equal to 0.5:
|1 − 8w2 |
K = 0.5
1+ 26.25w2 + 31.5w4 + 6.25w6
The solution is K = 9.9. To determine the phase margin, first we must determine the frequency
that makes the magnitude of GB equal to 1:
9.9
√ =1 (3)
1 + 26.25w2 + 31.5w4 + 6.25w6
The solution is w = 1.13. The phase margin is:
|2.5w3 − 6.5w|
 
P M = tg −1 = 0.388 (= 22.2◦ ) (4)
|1 − 8w2 |
(d) The magnitude of the closed loop transfer function is:
K
p = 10L/20
1 + 2K + K 2 + (26.25 − 16K)w2 + 31.5w4 + 6.25w6
Given a value of K, the maximum value of L and the corresponding value of frequency wr are
determined. An interval halving procedure was implemented, the results are:
Iter K wr L
1 5.000 0.840 1.951
2 5.100 0.850 2.105
3 5.050 0.845 2.028
4 5.025 0.842 1.990
5 5.037 0.844 2.009
6 5.031 0.843 1.999

For proportional control, the magnitude |GB| is proportional to K, so:


9.9
GBK=5.03 = GBK=9.9 = 3.94
5.03
To determine the value of frequency that corresponds to |GB| = 1, equation (3) is solved
with K = 5.03. The result is w = 0.734, the phase margin is determined from equation (4),
P M = 0.852 (48.8◦ ).
(e) The Ziegler Nichols settings are:

P PI PID
K Ku /2 Ku /2.2 Ku /1.7
τI Pu /1.2 Pu /2
τD Pu /8
Where Ku is the ultimate gain and Pu is the ultimate period. The characteristic equation is:
K
1+ =0
(s + 1)(5s + 1)(0.5s + 1)
Replacing a root r = wj and separating the real and imaginary parts we get:
−2.5w3 + 6.5w = 0
−8w2 + 1 + Ku = 0

The solution is Ku = 19.8, w = 2.6, Pu = 3.90. The Ziegler Nichols controller parameters
are:
P PI PID
K 9.9 9 11.6
τI 3.25 1.95
τD 0.487

3
Proportional control

The case with K = 9.9 was solved in (b), GM=2, PM=0.388, Lmax
c is 8.96 for w = 1.21.

Proportional integral control

K(τI s + 1)
GB =
τI s(2.5s3 + 8s2 + 6.5s + 1)
9s + 2.77
=
s(2.5s3 + 8s2 + 6.5s + 1)
−9.02w − 65.1w3 + j(−2.77 − 36.3w2 + 22.5w4 )
GB(wj) = (5)
w(1 + 26.25w2 + 31.5w4 + 6.25w6 )

To determine GM first we calculate the value of w that corresponds to the intersection with
the real axis:

−2.77 − 36.3w2 + 22.5w4 = 0

The solution is: w = 1.299, |GB|w=1.299 = 0.719, GM = 1.39. To determine PM first we


determine the value of frequency that makes |GB| equal to 1:

7.68 + 283w2 + 2368w4 + 2600w6 + 506w8
|GB| = =1
w(1 + 26.25w2 + 31.5w4 + 6.25w6 )

The solution is w = 1.09, replacing in equation (5) we get:

GB = −0.991 − 0.149j
P M = tg −1 (0.149/0.991) = 0.149

Lmax
c is equal to 17.1 for w = 1.12.

Proportional integral derivative control

K(τI τD s2 + τI s + 1)
GB =
τI s(2.5s3 + 8s2 + 6.5s + 1)
5.65s2 + 11.6s + 5.95
=
s(2.5s3 + 8s2 + 6.5s + 1)
−27.1w − 41.2w3 − 14.1w5 + j(−5.95 − 22.2w2 − 16.2w4 )
GB(wj) = (6)
w(1 + 26.3w2 + 31.5w4 + 6.25w6 )

The transfer function doesn’t intersect the real axis, so the are no meaningful GM value. To
determine PM first we determine the value of frequency that makes |GB| equal to 1:

−27.1w − 41.2w3 − 14.1w5 + j(−5.95 − 22.2w2 − 16.2w4 )


|GB| = =1
w(1 + 26.25w2 + 31.5w4 + 6.25w6 )

The solution is w = 1.26, replacing in equation (6) we get:

GB = −0.871 − 0.443j
P M = tg −1 (0.149/0.991) = 0.471

Lmax
c is equal to 6.41 for w = 1.16.

Code(s) used: P1LcMax.py P1ZN.py P1Plots.py

4
Problem 2
(a) Make Bode, Nyquist, and Nichols plots of the system with K = 1:

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

(b) Find the value of gain that gives a phase margin of 45◦ . What is the maximum closed loop
log modulus with this value of gain?
(c) Find the value of gain that gives a maximum closed loop log modulus of +2 dB. What is the
phase margin with this value of gain?

Solution
(a) Nyquist, Bode and Nichols plots are shown in Figures 4, 5 and 6. For w from 0.01 to 100,
GB(wj) start at 0.997-0.0549j and end at −8.00 ∗ 10−6 − 1.00 ∗ 10−3 j.

Figure 4: Nyquist plot.

Figure 5: Bode plot.

(b)
1 − 2w2 − j(5.5w + 2.5w3 )
GB(wj) = K
1 + 26w2 + 25w4

5
Figure 6: Nichols plot.


Both the real and imaginary parts must be equal to −0.5 2:

1 − 2w2 2
K 2 4
=−
1 + 26w + 25w 2

5.5w + 2.5w3 2
−K 2 4
=−
1 + 26w + 25w 2

There is no meaningful solution for the values of w and K.


(c) Figure 7 shows the value of Lmax
c as function of controller gain, in the range analyzed, there
is no value of K for which Lmax
c = 2.

Figure 7: Lmax
c as function of K.

Code(s) used: P2Plots.py P2LcMax.py

Problem 3
(a) Make Bode, Nyquist, and Nichols plots of the system with K = 1:
K(−3s + 1)
GB =
(s + 1)(5s + 1)

(b) Find the ultimate gain and frequency.

6
(c) Find the value of gain that gives a phase margin of 45◦ .
(d) Find the value of gain that gives a gain margin of 2.
(e) Find the value of gain that gives a maximum closed loop log modulus of +2 dB.

Solution
(a) Nyquist, Bode and Nichols plots are shown in Figures 8, 9 and 10. For w from 0.01 to 100,
GB(wj) start at 0.995-0.0898j and end at −9.20 ∗ 10−5 + 6.00 ∗ 10−3 j.

Figure 8: Nyquist plot.

Figure 9: Bode plot.

(b) The characteristic equation is:

K(1 − 3s)
1+ =0
(s + 1)(5s + 1)

Replacing a root r = wj and separating the real and imaginary parts we get:

1 + K − 5w2 = 0
(6 − 3K)w = 0

The solution is K = 2, w = 0.775.

7
Figure 10: Nichols plot.

(c)
1 − 23w2 + j(−9w + 15w3 )
GB(wj) = K
1 + 26w2 + 25w4
The real and imaginary parts must satisfy:

1 − 23w2 2
K = −
1 + 26w2 + 25w4 2

−9w + 15w3 2
K = −
1 + 26w2 + 25w4 2
The solution is w = 0.398, K = 1.54.
(d) At the intersection with the real axis, the magnitude of GB must be equal to 0.5:
−9w + 15w3 = 0
1 − 23w2
K = −0.5
1 + 26w2 + 25w4
The solution is w = 0.775, K = 1.
(e) An interval halving procedure was used, the results are:

Iter K wr L
1 1.100 0.653 1.547
2 1.150 0.663 2.324
3 1.125 0.658 1.935
4 1.138 0.660 2.129
5 1.131 0.659 2.032
6 1.128 0.659 1.983
7 1.130 0.659 2.008
8 1.129 0.659 1.996
9 1.129 0.659 2.002

Code(s) used: P3LcMax.py P3Plots.py

Problem 4
Repeat Problem 3 for the system:
 
1 −3s + 1
GB = K 1 +
2s (s + 1)(5s + 1)

8
Solution
(a) Nyquist, Bode and Nichols plots are shown in Figures 11, 12 and 13. For w from 0.1 to 100,
GB(wj) start at -2.90-3.75j and end at −6.20 ∗ 10−5 + 6.00 ∗ 10−3 j.

Figure 11: Nyquist plot.

Figure 12: Bode plot.

(b) The characteristic equation is:

K(1 − 3s)(1 + 2s)


1+ =0
2s(s + 1)(5s + 1)

Replacing a root r = wj and separating the real and imaginary parts we get:

−10w3 + (2 − K)w = 0
−(12 − 6K)w2 + 1 = 0

The solution is K = 0.709, w = 0.359.


(c)
−7w − 31w3 + j(−1 + 5w2 + 30w4 )
GB(wj) = K
2w(1 + 26w2 + 25w4 )

9
Figure 13: Nichols plot.

The real and imaginary parts must satisfy:



−7w − 31w3 2
K 2 4
=−
2w(1 + 26w + 25w ) 2

−1 + 5w2 + 30w4 2
K 2 4
=−
2w(1 + 26w + 25w ) 2

The solution is w = 0.123, K = 0.265.


(d) At the intersection with the real axis, the magnitude of GB must be equal to 0.5:
−1 + 5w2 + 30w4 = 0
−1 + 5w2 + 30w4
K = −0.5
2w(1 + 26w2 + 25w4 )

The solution is w = 0.343, K = 0.413.


(e) An interval halving procedure was used, the results are:

Iter K wr L
1 0.250 0.133 2.094
2 0.225 0.116 1.445
3 0.238 0.125 1.765
4 0.244 0.129 1.928
5 0.247 0.131 2.011
6 0.245 0.130 1.969
7 0.246 0.130 1.990
8 0.246 0.130 2.000

Code(s) used: P4LcMax.py P4Plots.py

Problem 5
How would you use the ”Z-P=N” theorem to develop a test for open loop stability?

Solution
For an open loop transfer function G(wj), we want to determine if there are poles in the right
hand plane, in this case we count the encirclements around the origin N , when w goes from 0 to
∞, and use information about the number of zeroes Z, to determine the number of poles P .

10
Problem 6
A process has GM and GL open loop transfer functions that are first order lags and gains: τM , τL ,
KM , KL . Assume τM twice τL . Sketch the log modulus Bode plot for the closed loop load transfer
function when:
(a) A proportional only feedback controller is used with Kc KM = 8.

(b) A PI controller is used, with τI = τM and the same gain as above.

Solution
(a)
 −1
GL KL 8
L= = 1+
1 + GM B τL s + 1 2τL s + 1

Evaluating at s = wj we get:

GL 9 + 20τL2 w2 + j(7τL w − 4τL3 w3 )


(wj) = KL
1 + GM B 81 + 85τL2 w2 + 4τL4 w4

The Bode plot is shown in Figure 14, for w from 0.01 to 100, L(wj) start at 0.111+8.99∗10−4 j
and end at 4.61 ∗ 10−4 − 9.59 ∗ 10−3 j.
(b)
 
8 1 8
GM B = 1+ =
2τL s + 1 2τL s 2τL s
GL 2KL τL s
=
1 + GM B 8(1 + τL s)
GL 2KL τL w(τL w + j)
(wj) =
1 + GM B 8(2 + τL2 w2 )

The Bode plot is shown in Figure 14, for w from 0.01 to 100, L(wj) start at 2.70 ∗ 10−5 +
2.60 ∗ 10−3 j and end at 0.250 + 2.40 ∗ 10−3 j.

Code(s) used: P6Plots.py

Figure 14: Bode plot for proportional control, K = 1.0, τL = 1.04.

11
Figure 15: Bode plot for proportional integral control, K = 1.0, τI = 2.08, τL = 1.04.

Problem 7
(a) Sketch Bode, Nichols, and Nyquist plots of the closed loop servo and closed loop load transfer
functions of the process:
1
GL = GM =
10s + 1
 
1
B =6 1+
6s

(b) Calculate the phase margin and maximum closed loop log modulus for the system.

Solution
(a)
GM B 1 + 6s
=M =
1 + GM B 10s2 + 7s + 1
GM B 1 + 32w2 − wj(1 + 60w2 )
(wj) =
1 + GM B 1 + 29w2 + 100w4
GL s
=L= 2
1 + GM B 10s + 7s + 1
GL 7w2 + wj(1 − 10w2 )
(wj) =
1 + GM B 1 + 29w2 + 100w4

The Nyquist, Bode and Nichols plot for the servo transfer function are shown in Figures 16, 17
and 18, for w from 0.01 to 100, M (wj) start at 1-0.01j and end at 3.20 ∗ 10−5 − 6.00 ∗ 10−3 j.
The Nyquist, Bode and Nichols plot for the load transfer function are shown in Figures 19,
20 and 21, for w from 0.01 to 100, L(wj) start at 6.98 ∗ 10−4 + 9.96 ∗ 10−3 j and end at
7.00 ∗ 10−6 − 1.00 ∗ 10−3 j.
(b) We are searching for the value of frequency that makes |GM B| equal to 1.
1 + 6wj
GM B(wj) =
−10w2 + wj
r
1 + 36w2
|GM B(wj)| = =1
w2 + 100w4

The solution is w=0.614, at that value of frequency, GM B = −0.103 − 0.995j and P M =


1.47 (84.1◦ ). Lcmax for the servo closed loop is 0.265 at wr = 0.156, Lcmax for the load closed

12
loop is -16.9 at wr = 0.316, plots of Lc for both servo and load closed loops versus frequency
are shown in Figure 22.
Code(s) used: P7LcMax.py P7Plots.py

Figure 16: Nyquist plot, servo closed loop.

Figure 17: Bode plot, servo closed loop.

Problem 8
Using a first order Pade approximation of deadtime, find the ultimate gain and frequency of the
system:
Ke−0.5s
GB =
s+1
Compare with the exact result K = 3.9, w = 3.7.

Solution
Using the Pade approximation:
1 + 0.5x
exp(x) ≈
1 − 0.5x

13
Figure 18: Nichols plot, servo closed loop.

Figure 19: Nyquist plot, load closed loop.

K (1 − 0.25s)
GB =
(s + 1) (1 + 0.25s)
1 − 0.5625w2 + wj(−1.50 + 0.0625w2 )
GB(wj) = K
1 + 1.0625w2 + 0.0625w4
The stability limit corresponds to GB = −1 + 0j:

−1.50 + 0.0625w2 = 0
1 − 0.5625w2
K = −1
1 + 1.0625w2 + 0.0625w4
The solution is K = 5.00, w = 4.90, the results differ by around 30%.

Problem 9
(a) Draw Bode, Nyquist, and Nichols plots of the system:
K
GB =
(s + 1)(s + 5)(s − 0.5)

(b) Use the Nyquist stability criterion to find the values of K for which the system is closed loop
stable.

14
Figure 20: Bode plot, load closed loop.

Figure 21: Nichols plot, load closed loop.

Solution
(a)

2.5 + 5.5w2 + jw(2 − w2 )


GB(wj) = −K
6.25 + 31.5w2 + 26.25w4 + w6
Nyquist, Bode and Nichols plots are shown in Figures 23, 24 and 25, respectively, for w from
0.01 to 100 and K = 2.5, GB(wj) starts at −1.00 − 8.00 ∗ 10−3 j and end at −1.37 ∗ 10−7 +
2.49 ∗ 10−6 j.
(b) The Nyquist stability limit corresponds to GB equal to -1+0j:

w(2 − w2 ) = 0
2.5 + 5.5w2
−K = −1
6.25 + 31.5w2 + 26.25w4 + w6

There are two solutions: w1 = 0 and K1 = 2.5 and w22 = 2 and K2 = 13.5. The transfer
function has one pole, from the shape of the Nyquist plot we conclude:
• If K < K1 , there are no encirclements, Z = 0 + P = 1, the system is unstable.
• If K1 < K < K2 , there is a negative encirclement, Z = −1 + P = 0, the system is stable.

15
Figure 22: Lc versus frequency.

• If K2 < K, there is a positive encirclement, Z = 1 + P = 2, the system is unstable.

Code(s) used: P9Plots.py

Figure 23: Nyquist plot.

Problem 10
(a) Make Nyquist and Bode plots of the open loop transfer function:

K
GB =
s2 (s+ 1)

(b) Is this system closed loop stable? Will using a PI controller stabilize it?
(c) Will a lead lag element used as a feedback controller provide enough phase angle advance to
meet a 45◦ phase margin specification?
(d) Find the values of τ and K that give a 45◦ phase margin. What is the gain margin?
 
τs + 1
B=K
(τ /20)s + 1

16
Figure 24: Bode plot.

Figure 25: Nichols plot.

Solution
(a)
−1 + wj
GB(wj) = K
w2 (1 + w2 )

Nyquist and Bode plots are shown in Figures 26 and 27, for w from 0.1 to 10, K = 1, GB(wj)
start at −99.0 + 9.90j and end at −9.90 ∗ 10−5 + 9.90 ∗ 10−4 j.
(b) The system is unstable, the curve in the Nyquist plot (Figure 26) pass over the (-1,0) point.
A PI controller transfer function is:
 
j
B(wj) = K 1 −
τw
A Bode plot for the PI controller is shown in Figure 28, K = 1, τ = 1.01. The PI contributes
−π/2 angle at low frequencies and 0 angle at high frequencies, so there is no way to move the
system curve to the stable zone.
(c) A lead lag element transfer function is:
1 + ατ 2 w2 + (1 − α)τ wj
B(wj) = K
1 + (ατ w)2

17
Figure 26: Nyquist plot.

Figure 27: Bode plot.

A Bode plot of the lead lag element is shown in Figure 29, K = 1, τ = 1.01, α = 0.05, at
intermediate frequencies the lead lag elements contributes enough angle to displace the system
curve to the stable zone.
(d)

−(0.95 + 0.05τ )τ w2 − 1 + wj(1 − 0.95τ + 0.05τ 2 w2 )


GB(wj) = K
w2 (1 + (1 + 2.5 ∗ 10−3 τ 2 )w2 + 2.5 ∗ 10−3 τ 2 w4 )
For a phase angle of π/4, we require:

−(0.95 + 0.05τ )τ w2 − 1 2
K 2 =− (1)
w (1 + (1 + 2.5 ∗ 10−3 τ 2 )w2 + 2.5 ∗ 10−3 τ 2 w4 ) 2

w(1 − 0.95τ + 0.05τ 2 w2 ) 2
K 2 2 2 2 4
=− (2)
w (1 + (1 + 2.5 ∗ 10 τ )w + 2.5 ∗ 10 τ w )
−3 −3 2
We have three parameters (K, τ , w) and two equations, so we set w = 0.1, and solve for τ
from the equation that results after combining equation 1 and equation 2:

0.05w2 (w + 1)τ 2 + 0.95wτ (w − 1)τ + w + 1 = 0

The solution is τ = 14.15, and from equation 1 we get K = 0.005813. A Bode plot of the system
is shown in Figure 30. To calculate the gain margin, we determine the value of frequency for

18
Figure 28: Bode plot, PI controller.

Figure 29: Bode plot, lead lag element.

which the imaginary part of GB(wj) is zero:

w(1 − 0.95τ + 0.05τ 2 w2 ) = 0

The solution is w = 1.115, at that value of frequency |GB| = 0.03878 and GM = 25.79.

Code(s) used: P10Plots.py

Problem 11
Find the largest value of deadtime D that can be tolerated in a process

G = e−Ds /s

and still achieve a 45◦ phase margin with a feedback controller having a reset time constant τI = 1
minute. Find the value of gain K that gives 45◦ of phase margin with the value of deadtime found
above.

19
Figure 30: Bode plot, system plus lead lag control element.

Solution
With B = K/s, we have:

e−Ds
GB = K
s2
− cos(Dw) + j sin(Dw)
GB(wj) = K
w2
For a 45◦ degree phase margin we have:

− cos(Dw) 2
K 2
=− (1)
w √2
sin(Dw) 2
K =− (2)
w2 2
Combining equation 1 and 2 we get:

− cos(Dw) = sin(Dw)

The solution is Dw = 3π/4. Replacing in equation (1) we get K = 9π 2 /(16D2 ).

Problem 12
A process consists of two transfer functions in series. The first, GM 1 , relates the manipulated
variable M to the variable x1 and is a steady state gain of 1 and two first order lags in series with
equal time constants of 1 minute.
1
GM 1 =
(s + 1)2
The second, GM 2 , relates x1 to the controlled variable x2 and is a steady state gain of 1 and a first
order lag with a time constant of 5 minutes.
1
GM 2 =
5s + 1
If a single proportional controller is used to control x2 by manipulating M , determine the gain
that gives a phase margin of 45 degrees. What is the maximum closed log modulus when this gain
is used?

20
Solution
K
GB =
5s3 + 11s2 + 7s + 1
1 − 11w2 − wj(7 − 5w2 )
GB(wj) = K
1 + 27w2 + 51w4 + 25w6
For a π/4 margin we have:

1 − 11w2 2
K = − (1)
1 + 27w2 + 51w4 + 25w6 2

−7w + 5w3 2
K = − (2)
1 + 27w2 + 51w4 + 25w6 2
Combining equation (1) and equation (2) we get:
1 + 7w − 11w2 − 5w3 = 0
The solution is w = 0.613, K = 4.44, Lmax
c = 2.89 at wr = 0.711 (Figure 31).
Code(s) used: P12LcMax.py

Figure 31: Lc versus w.

Problem 13
Suppose we want to use a cascade control system in the process considered in Problem 12. The
secondary or slave loop will control x1 by manipulating M . The primary or master loop will control
x2 by changing the setpoint xset
1 of the secondary controller.

(a) Design a proportional secondary controller K1 that gives a phase margin of 45 degrees for the
seconday loop.
(b) Using a value of gain for the secondary loop of K1 = 6.82, design the master proportional
controller (K2 ) that gives a phase margin of 45 degrees for the primary loop.
(c) What is the maximum closed loop log modulus for the primary loop when this value of gain is
used?

Solution
(a) For the secondary loop we have:
1 − w2 − 2wj
GM 1 B(wj) = K1
1 + 2w2 + w4

21
As in problem 12, for a 45 degree phase margin we have:

1 − w2 2
K1 = −
1 + 2w2 + w4 2

−2w 2
K1 = −
1 + 2w2 + w4 2
The solution is w = 2.41 and K1 = 6.83.
(b) The master closed loop transfer function is:

GM 1 K1 GM 2 K2 xset
2
x2 =
1 + GM 1 K1 (1 + GM 2 K2 )

For a 45 degree phase margin we have:



GM 1 K1 (1 + GM 2 K2 ) = −0.5 2(1 + j)

1 + K2 + (24 − 11K2 )w2 − 25w4 2
K1 −
1 + 27w2 + 51w4 + 25w6 2

w(−2 − K2 + (5K2 − 50)w2 ) 2
K1 −
1 + 27w2 + 51w4 + 25w6 2

The solution is w = 2.41, K2 = 0.00561.


(c) The closed loop transfer function is:

GM 1 K 1 GM 2 K2 K1 K2
(wj) =
1 + GM 1 K1 (1 + GM 2 K2 ) 1 + K1 + K1 K2 − 11w2 + wj(7 + 5K1 − 5w2 )

Which reach a maximum when w → 0.

Code(s) used: P13Code.py

Problem 14
A process has the following transfer function:
1
G=
(τ s + 1)2

It is controlled using a PI controller with τI set equal to τ .


(a) Sketch a root locus plot and calculate the controller gain that gives a closed loop damping
coefficient of 0.4.
(b) Sketch Bode, Nyquist, and Nichols plots of GB.
(c) Calculate analytically the gain that gives a phase margin of 45◦ and check your answer graph-
ically.

(d) Determine the values of the maximum closed loop log modulus for the two values of gains from
(a) and (c).

Solution
(a)

K
GB =
τ 2 s2+ τs

22
The characteristic equation is:
τ 2 s2 + τ s + K = 0
A root locus plot is shown in Figure 32, for K from 0 to 2, τ = 2.03, the roots start at (0,
-0.493) and end at (-0.246+0.652j, -0.246-0.652j). Comparing the characteristic equation with
the standard form we get:
K/τ 2 = 1/τp2
1/τ = 2ζ/τp
The solution is K = 1/(4ζ 2 ) = 1.563.

Figure 32: Root locus plot.

(b) The Nyquist, Bode and Nichols plots are shown in Figures 33, 34 and 35, respectively, for
K = 1.414, τ = 2.03, w from 0.1 to 100, GB(wj) starts at −1.358 − 6.691j and end at
−3.432 ∗ 10−5 − 1.691 ∗ 10−7 j.

Figure 33: Nyquist plot.

(c)
−K(τ w + j)
GB(wj) =
τ w(τ 2 w2 + 1)

The solution is τ w = 1, K = 2.

23
Figure 34: Bode plot.

Figure 35: Nichols plot.

(d)

K
Lc = p
K2 + τ 2 (1 − 2K)w2 + τ 4 w4

For K = 1.563, Lmax


c = 2.697 at wr = 0.5079, for K = 1.414, Lmax
c = 2.350 at wr = 0.4709,
curves of Lc versus w are shown in Figure 36.

Code(s) used: P14Code.py

Problem 15
An open loop unstable, second order process has one positive pole at 1/τ1 and one negative pole
at −1/τ2 . If a proportional controller is used and if τ1 < τ2 , show by using a root locus plot and
then by using the Nyquist stability criterion that the system is always unstable.

24
Figure 36: Lc versus w.

Solution
Root locus analysis
The characteristic equation is:

1 + BG = 0
K
1+ =0
(τ1 s − 1)(τ2 s + 1)
τ1 τ2 s2 − (τ2 − τ1 )s − 1 + K = 0

The roots of the characteristic equation are:


p
τ2 − τ1 ± (τ2 − τ1 )2 − 4τ1 τ2 (K − 1)
r=
2τ1 τ2
 s 
τ2 − τ 1  4τ1 τ2 (K − 1) 
r= 1± 1−
2τ1 τ2 τ2 − τ1

For K > 1, the second term inside the square root is positive, the characteristic equation roots
will always have a positive real part, making the system unstable. For K < 1, the second term
inside the square root is negative, at least one of the roots of the characteristic equation is positive,
making the system unstable. For K = 1, the characteristic equation roots are 0 and (τ2 −τ1 )/(τ1 τ2 ),
and the system is unstable.

Nyquist stability criterion

K(−1 − τ1 τ2 w2 + (τ2 − τ1 )wj)


BG(wj) =
1 + (τ12 + τ22 )w2 + τ12 τ22 w4

The curve starts at (−K, 0). The imaginary part is positive for w > 0. For K > 1, there is a
positive encirclement. Because the open loop transfer function has a pole, from:

N =Z −P
1=Z −1

So the closed loop transfer function has two zeros, and the system is unstable. For K < 1, there
are no encirclements, so: 0 = Z − 1, the closed loop transfer function has one zero, and the system

25
is unstable. A root locus plot (τ1 = 1.04, τ2 = 1.3 ∗ τ1 , K from 0 to 2) is shown in Figure 37 and
a Nyquist plot (τ1 = 1.04, τ2 = 1.3 ∗ τ1 , w from 0.001 to 10) is shown in Figure 38.
Code(s) used: P15Plots.py

Figure 37: Root locus plot.

Figure 38: Nyquist plot.

Problem 16
A process has the open loop transfer function G = K/(s(τ s + 1)). A proportional only controller
is used. Calculate analytically the closed loop damping coefficient that is equivalent to a phase
marging of 45 degrees. What is the maximum closed loop log modulus when the controller gain
that gives a 45 degree phase margin is used?

Solution

τw + j
G(wj) = −K
w(τ 2 w2 + 1)

26
For a phase margin of 45 degrees we require:

τw 2
−K 2 2
=−
w(τ w + 1) 2

1 2
−K =−
w(τ 2 w2 + 1) 2

The solution is τ w = 1, K = 2/τ . From the characteristic equation we get:

2/τ 2 = 1/τp2
1/τ = 2ζ/τp

The solution is τp = τ /1.190, ζ = 0.420. The closed loop transfer function magnitude is:

2
|M | = q √
2 + (1 − 2 2)τ 2 w2 + τ 4 w4

The maximum corresponds to a value of the derivative equal to 0:



d|M |2 2(2(1 − 2 2)τ w + 4τ 3 w3 )
= √ =0
d(τ w) (2 + (1 − 2 2)τ 2 w2 + τ 4 w4 )2
The solution is τ 2 w2 = 0.9142, |M | = 1.311, Lmax
c = 2.352.

Problem 17
A process has the open loop transfer function:
Ke−Ds
G=
τs + 1
where K = 1, τ = 1, D = 0.3.
(a) Draw the Bode plot for the openloop system.
(b) What is the ultimate gain and ultimate frequency of this system?
(c) Using the Ziegler Nichols settings, draw a Bode plot for GB when a PI controller is used on
this process.

Solution
(a) A Bode plot is shown in Figure 39.
(b)
cos(0.3w) − w sin(0.3w) − j(sin(0.3w) + w cos(0.3w))
G(wj) = K
1 + w2
The stability limit corresponds to G = −1:
cos(0.3w) − w sin(0.3w)
K = −1
1 + w2
sin(0.3w) + w cos(0.3w)
K =0
1 + w2
The solution is Ku = 5.890, wu = 5.805, Pu = 1.082.
(c) The Ziegler Nichols settings are: K = 2.677, τI = 0.9020. A Bode plot for the system under
proportional integral control is shown in Figure 40.
Code(s) used: P17Plots.py

27
Figure 39: Bode plot.

Figure 40: Bode plot, proportional integral control.

Problem 18
250 gpm of cold 70 ◦ F liquid is fed into a 500 gallon perfectly mixed tank. The tank is heated by
steam which condenses in a jacket surrounding the vessel. The heat of condensation of the steam
is 950 BT U/lbm . The liquid in the tank is heated to 180 ◦ F under steady state conditions and
continuously whithdrawn from the tank to mantain a constant level. Heat capacity of the liquid
is 0.9 BT U/lbm ◦ F , density is 8.33 lbm /gal.
The control valve on the steam has linear installed characteristics and passes 500 lbm /min when
wide open. An electronic temperature transmitter (range: 50-250 ◦ F ) is used. A temperature
measurement lag of 10 seconds and a heat transfer lag of 20 seconds can be assumed. A proportional
only temperature controller is used.

(a) Derive a mathematical model of the system.


(b) Derive the open loop transfer functions between the output variable temperature (T ) and the
two input variables steam flow rate (Fs ) and liquid inlet temperature (T0 ).
(c) Sketch a root locus plot for the closed loop system.

(d) What are the ultimate gain and ultimate frequency wu ?


(e) If a PI controller were used with τI = 5/wu , what value of controller gain would give a
maximum closed loop modulus of 2 decibels?

28
(f) What are the gain margin and phase margin with the controller settings of part (e)?

Solution
(a) The energy balance is:
V dT Q
= T0 − T + (1)
F dt F ρCp
The heat transfer rate, Q, is related to the steam flow Fs , considering the heat transfer lag:
3Fs λ
Q= (2)
s+3
Replacing equation (2) into equation (1), changing to deviation variables, and inserting the
numerical values of the parameters, we get:
1.521Fs
2sT = + T0 − T
(s + 3)
1.521Fs T0
T = + (3)
(2s + 1)(s + 3) 2s + 1

(b) From equation (3), the transfer functions are:


T 1.521
=
Fs (2s + 1)(s + 3)
T 1
=
T0 2s + 1

(c) The steam flow is related to the signal to the valve x, and the temperature transmitter signal
as:
Fs = 500x
 
500 set 6T
Fs = K T − (4)
200 s+6
Replacing equation (4) into equation (3) we get:
3.8025K(s + 6)T set + (s + 3)(s + 6)T0
T =
2s3 + 19s2 + 45s + 18 + 22.815K
A root locus plot is shown in Figure 41, for K from 0 to 17.9, the roots start at [-6, -3, -0.5]
and end at [-9.50, -2.47+4.74j, -2.47-4.74j].
(d) From the characteristic equation we get:
−2w3 + 45w = 0
−19w2 + 18 + 22.815K = 0
The solution is K = 17.9, wu = 4.74.
(e) The PI controller is:
 
1
B =K 1+
1.054s
Replacing in the system model equation we get:
(4.0078Ks2 + 27.850Ks + 22.815K)T set + (1.054s3 + 10.486s2 + 27.972s + 18)T0
T = (5)
2.108s4 + 20.026s3 + 47.43s2 + (18.972 + 24.047K)s + 22.815K

An interval halving procedure was implemented for the T /T set transfer function, the results
are:

29
Figure 41: Root locus plot.

Iter K wr L
1 1.100 0.745 1.991
2 1.150 0.776 2.090
3 1.125 0.760 2.041
4 1.113 0.753 2.016
5 1.106 0.749 2.004
6 1.103 0.747 1.998
7 1.105 0.748 2.001

(f) Replacing K = 1.105 into equation (5) we get:

(4.4287s2 + 30.774s + 25.211)T set + (1.054s3 + 10.486s2 + 27.972s + 18)T0


T =
2.108s4 + 20.026s3 + 47.43s2 + 45.544s + 25.211
Both phase and gain margin are evaluated for the T /T set transfer function:

T −9.3357w6 − 353.08w4 + 94.161w2 + 635.59 + wj(−23.818w4 − 753.03w2 − 372.37)


(wj) =
T set 4.4437w8 + 201.08w6 + 531.77w4 − 317.26w2 + 635.59
To evaluate gain margin, we require the imaginary part of T /T set to be 0:

−23.818w4 − 753.03w2 − 372.37 = 0

There is no meaningful solution, so there is no meaningful value of GM. To evaluate PM, we


require the magnitude of T /T set to be 1:

19.613w4 + 723.74w2 + 635.59
√ =1
4.4437w + 201.08w6 + 531.77w4 − 317.26w2 + 635.59
8

4.4437w8 + 201.08w6 + 512.16w4 − 1041 = 0

There are two solutions w = 0 and w = 1.1507 which corresponds to T /T set equal to 1 and
0.0734-0.997j, respectively, with phase margins π and 1.64.

Code(s) used: P18LcMax.py P18Plots.py

Problem 19
Prepare a plot of closed loop damping coefficient versus phase margin for a process with an open
loop transfer function
K
GB =
(τ s + 1)2

30
Solution
The characteristic equation is:

τ 2 s2 + 2τ s + 1 + K

From the characteristic equation we get:


1+K 1
= 2
τ2 τp
2 2ζ
=
τ τp

The solution is ζ = 1/ 1 + K.

K
GB(wj) =
1 − τ 2 w2 + 2wj

PM is evaluated at the point where |GB| = 1:

K
|GB| = √ =1
1+ 2τ 2 w2 + τ 4 w4
1 + 2τ 2 w2 + τ 4 w4 − K 2 = 0
τ 2 w2 = K − 1

So K >= 1. The phase margin is the angle of GB(w = K − 1/τ ) with the negative horizontal
axis:
 √ 
−2 K − 1
P M = π − arctan K <= 2
2−K
 √ 
−2 K − 1
P M = arctan K>2
2−K

A plot of damping coefficient versus phase margin, with K as a parameter, is shown in Figure 42,
K goes from 1 to 15.

Figure 42: Damping coefficient versus phase margin.

Code(s) used: P19Plots.py

31
Problem 20
A process has the following transfer function relating controlled and manipulated variables:
1
G=
(s + 1)2

If a proportional only controller is used, what value of controller gain will give a maximum closed
loop log modulus of 2 dB.
(a) Solve this problem analytically.

(b) Check your answer graphically using Bode and Nichols plots.
(c) Draw a root locus plot and determine the closed loop damping coefficient for the value of gain
found in (a) and (b) above.

Solution
(a)

GB K
= 2 (1)
1 + GB s + 2s + 1 + K
GB K
(wj) =
1 + GB −w2 + 2wj + 1 + K
GB K
(wj) = |Gc | = p
1 + GB 1 + 2K + K + 2(1 − K)w2 + w4
2

First, we determine the frequency at which Lc is maximized:

d|Gc |2 K 2 (4(1 − K)w + 4w3 )


=− =0 (2)
dw (1 + 2K + K 2 + 2(1 − K)w2 + w4 )2
0 = 4(1 − K)w + 4w3
w2 = K − 1

Here we are assuming momentarily that K > 1. Replacing equation (2) into equation (1) we
get:

K
= 100.1
2
K = 6.340

From equation (2), w = 2.311.

(b) Bode and Nichols plots are shown in Figures 43 and 44, respectively, for K = 6.340, for w from
0.1 to 10, the roots start at 0.864-0.0236j and end at -0.0654-0.0141j.
(c) The characteristic equation is:

s2 + 2s + 1 + K = 0

From this we get:

1 + K = 1/τp2
2ζ/τp = 2

The solution is ζ = τp = 1/ 1 + K = 0.3691. A root locus plot is shown in Figure 45.

32
Figure 43: Bode plot.

Figure 44: Nichols plot.

Figure 45: Root locus plot.

33

You might also like