ControlSystem2 PDF
ControlSystem2 PDF
References
[1] Katsuhiko Ogata, Modern Control Engineering, 5th Edition, Prentice Hall, 2010.
[2] Katsuhiko Ogata, Dicrete-time Control Systems, 2nd edition. Prentice Hall, 1995.
1
Summary
The primary goal of this course is to teach students the basic principles for analyzing and
designing a computer control system. The main topics of the course are as follows
- Structure of a computer control system, signal conversion and processing,
- The Z transform,
- Transfer function and state space representation,
- Stability and performance of discrete time control system,
- Design of control system using PID control, pole placement control, state feedback control,
linear quadratic control, phase-lead and phase-lag compensation.
Grading:
- Project: 30%
- Quizzes and Homework: 20%.
- Final Exam: 50%
2
Chapter 1: Introduction
1.1 Examples
1) Example 1: In a typical radar application, it is necessary to point the
radar antenna toward the target and follow its movements. The
antenna has two independent angular motions: one about the vertical
axis in which the azimuth angle is varied, and the other about the
horizontal axis in which the elevation angle is varied (Fig.1.1).
Fig.1.2 describes an azimuthal servomechanism for steering of
antenna. Fig.1.1. Antenna [1]
Fig.1.3. Variable Speed DC Drive using Phase Controlled Rectifier (α: SCR firing angle)
- Variable Speed DC Drive using Chopper: the speed of the DC motor is regulated by adjusting
the duty cycle α
3
3) Example 3: Fig. 1.5 describes the hardware
features of a PC-based liquid-level control
system. Liquid is pumped into the cylindrical tank
from the sump. The inflow to the tank can be
controlled by adjusting the rotary valve V1. The
outflow from the tank goes back into the sump.
The probe used for measurement of liquid level
consists of two concentric cylinders. The liquid
partially occupies the space between the
cylinders, with air in the remaining part. This
device acts like two capacitors in parallel, one
with dielectric constant of air and the other with
that of the liquid. Thus the variation of the liquid
level causes variation of the electrical capacity
measured between the cylinder. The change in the Fig.1.5. Liquid-Level Control System [1]
capacitance causes a change in the bridge output
voltage which is fed to the PC through an
amplifier circuit [1]
4
Fig.1.8. Operations performed by a DA converter: sampled sequence and analog output from
ZOH (Y1: digital words, Y2: discrete-time signal, Y3: analog signal)
a b
Fig.1.9. a) Organization of a successive approximation AD converter
b) Code sequence for a three-bit successive approximation
5
Chapter 2: Signal Conversion and Processing
2.1 Quantization
Quantization level Q is the range between two adjacent decision points
Q = Full scale range / 2n
where n is the number of bits. Since the digital signal can assume only a finite number of levels,
the analog number must be rounded off to the nearest digital level and any AD conversion
involves quantization error which varies between 0 and ±Q/2. Suppose that the quantization error
is distributed uniformly between ±Q/2, then its mean value is zero and its variance is Q2/12.
Fig.2.1. Quantization
1 +∞ jkωs t 2π
Fourier series: s(t) = ∑ e
T k = −∞
where ωs =
T
1 +∞
1 +∞
y*(t) = y(t)s(t) =
T
∑ y(t)e
k = −∞
jkω s t
⇒ Y*(s) = ∑ Y(s − jkωs )
T k = −∞
Shanon’s sampling theorem: ωs ≥ 2ωmax
6
1 − e −Ts
⇒ GZOH(s) =
s
Fig.2.4. Sample and hold (Zero Order Hold and First Order Hold)
G1(z) = Z{GZOH(s)G(s)}
G(s): Transfer function of the plant
K(z): Transfer function of the control algorithm
7
Example: Find the transfer function of the closed loop system and deduce the difference
equation. Given
1
G(s) =
s +1
u(kT) = u((k-1)T) + 5e((k-1)T)
T = 0.02s
1 − e −Ts
Let G1(s) = GZOH(s)G(s) = = G2(s)(1 – e-Ts)
s(s + 1)
1 1 1
Where G2(s) = = -
s(s + 1) s s +1
z z
G2(z) = Z{G2(s)} = -
z − 1 z − e−T
z −1 1 − e −T 0.02
G1(z) = G2(z)(1 – z-1) = 1 - = =
−T −T z − 0.98
z−e z−e
5z −1 5
u(kT) = u((k-1)T) + 5e((k-1)T) ⇒ U(z) = z-1U(z) + 5z-1E(z) ⇒ K(z) = =
−1 z −1
1− z
G1 ( z ) K ( z ) 0.1 0. 1 0.1z −2
H(z) = = = =
1 + G1 ( z ) K ( z ) (z − 0.98)(z − 1) + 0.1 z 2 − 1.98z + 1.08 1 − 1.98z −1 + 1.08z − 2
⇒ y(k) = 1.98y(k-1) – 1.08y(k-2) + 0.1r(k-2)
For notational simplicity we note y(k) instead of y(kT).
8
Chapter 3: The Z Transform
3.1 Definition
+∞
- Two-sided z transform: X(z) = ∑ x ( k )z − k
k = −∞
+∞
- One-sided z transform: X(z) = ∑ x (k )z − k
k =0
Example:
+∞ +∞
1 z
x(k) = ak ⇒ X(z) = ∑ a k z−k = ∑ (az −1)k = 1 − az−1 =
z−a
k =0 k =0
With region of convergence (ROC): |az-1| < 1 ⇒ |z| > |a|: outside of the circle (0, |a|)
1 z
e-at e-akT
s+a z - e-aT
1 Tz
t kT
s2 (z - 1) 2
2 T 2 z(z + 1)
t2 (kT)2
s3 (z - 1)3
1 Te − aT z
te-at kTe-akT
(s + a) 2 (z − e −aT ) 2
ωo e− aTsin(ωo T)z
e sin(ωot)
-at
e -akT
sin(ωokT)
(s + a) 2 + ω o2 z 2 - 2e-aT cos(ωo T)z + e- 2aT
9
Observe that if pS is a pole of X(s) then pZ = e p s T is a pole of X(z).
ωo
Example: X(s) = has poles pS = -a ± jωo
(s + a) 2 + ω o2
e −aTsin(ωoT)z
⇒ X(z) = has poles pZ = exp(psT) = e-aTe± jωoT
2 -aT - 2aT
z - 2e cos(ωoT)z + e
Fig.3.1
+∞ +∞ +∞ +∞
y(k) = x(k-n) ⇒ Y(z) = ∑ y(k)z-k = ∑ x(k-n)z-k = z-n ∑ x(k-n)z-(k-n) = z-n ∑ x(i)z-i
k =0 k =0 k =0 i = −n
+∞ −1 −1
= z-n ∑ x(i)z-i + z-n ∑ x(i)z-i = z-nX(z) + ∑ x(i)z-(i+n)
i =0 i = −n i = −n
+∞ +∞ +∞ +∞
y(k) = x(k+n) ⇒ Y(z) = ∑ y(k)z-k = ∑ x(k+n)z-k = zn ∑ x(k+n)z-(k+n) = zn ∑ x(i)z-i
k =0 k =0 k =0 i=n
+∞ n −1 n −1
= zn ∑ x(i)z-i - zn ∑ x(i)z-i = znX(z) - ∑ x(i)z-(i-n)
i =0 i=0 i=0
10
3.3 The inverse Z transform
Assume that x(k) = 0 ∀k < 0 (causal signal). Find x(k) given X(z).
2) Computational method
10z + 5 10z + 5 X (z)
Ex: X(z) = = = where U(z) = 1 = Z{δo(k)}
(z − 1)(z − 0.2) z 2 − 1.2z + 0.2 U(z )
⇒ x(k) = 1.2x(k-1) – 0.2x(k-2) + 10δo(k-1) + 5δo(k-2) where δo(k) is the Kronecker delta
⇒ x(0) = 0, x(1) = 10, x(2) = 17, …
10z + 5
Example: X(z) =
(z − 1)(z − 0.2)
(10z + 5) z k
X(z)zk-1 = ⇒ x(k) = K1 + K2 + K3
z( z − 1)(z − 0.2)
11
(10z + 5)z k 25, k = 0
K1 = lim z → 0 {zX(z)zk-1} = lim z → 0 =
(z − 1)(z − 0.2) 0, k ≠ 0
(10z + 5) z k 15
K2 = lim z → 1 {(z - 1)X(z)zk-1} = lim z → 1 = = 18.75
z ( z − 0. 2) 0.8
(10z + 5)z k 7
K3 = lim z → 0.2 {(z – 0.2)X(z)zk-1} = lim z → 0.2 = 0.2k = -43.75(0.2k)
z (z − 1) − 0.16
⇒ x(0) = 25 + 18.75 - 43.75 = 0
x(1) = 18.75 – 43.75(0.2) = 10
x(2) = 18.75 – 43.75(0.22) = 17
...
12
Chapter 4. Description of Discrete Time System
Poles and zeros: G(z) has poles at 0.5 ± j0.4 and a zero at -3
G (z) 2z + 6 14.63 - 14.63z + 16.63
Impulse response: = = +
2
z z(z − z + 0.41) z z 2 − z + 0.41
- 14.63z 2 + 16.63z - 14.63(z 2 − 1.1367 z)
⇒ G(z) = 14.63 + = 14.63 +
z 2 − z + 0.41 z 2 − z + 0.41
e -2aT
= 0.41 ⇒ e = 0.64
-aT
2z + 6 2z + 6
Fig.4.1: Impulse response of G(z) = Fig.4.2: Step response of G(z) = 2
z − z + 0.41
2
z − z + 0.41
z G (z )z (2z + 6)z
Step response: U(z) = ⇒ Y(z) = =
z −1 z −1 (z - 1)(z 2 − z + 0.41)
Y(z) 2z + 6 19.51 - 19.51z + 2
⇒ = = +
z 2
(z - 1)(z − z + 0.41) z - 1 z 2 - z + 0.41
13
19.51z - 19.51(z 2 - 0.1z)
⇒ Y(z) = +
z -1 z 2 - z + 0.41
19.51z - 19.51(z 2 - e −aT cos(ωo T)z) - 19.51e − aTsin(ωo T)z
= + +
z - 1 z 2 - 2e − aT cos(ωo T)z + e − 2aT z 2 - 2e − aT cos(ωo T)z + e − 2aT
⇒ y(k) = 19.51x1(k) - 19.51(0.64)kcos(0.6747k) – 19.51(0.64)ksin(0.6747k)
Static gain: G(1) = 19.51
Difference equation: (z2 – z + 0.41)Y(z) = (2z + 6)U(z)
⇒ (1– z-1 + 0.41z-2)Y(z) = (2z-1 + 6z-2)U(z)
⇒ y(k) = y(k-1) – 0.41y(k-2) + 2u(k-1) + 6u(k-2)
Poles: eigenvalues of A
14
Commandability: The system is commandable (controllable) if there exists a control signal u(k)
which transfers an initial state xo to a final state xf in finite time.
Define the nxn matrix: MC = [B, AB, A2B … An-1B]
System commandable ⇔ det(MC) ≠ 0
Observability: The system is observable if, given the output y(k) over a finite number of
sampling periods, it is possible to determine the initial state vector x(0).
C
CA
Define the nxn matrix: MO =
M
n −1
CA
System observable ⇔ det(MO) ≠ 0
15
Chapter 5. Stability and performance of discrete-time control system
5.1 Stability
Stability condition: |pole| < 1 ∀pole
1 1
Ex: G1(z) = : stable G2(z) = : unstable
z − 0. 9 z − 1.1
1 1
G3(z) = : stable G4(z) = : unstable
(z − 0.5) 2 + 0.4 2 (z − 0.8) 2 + 0.7 2
1 1
G3(z) = : stable G4(z) = : unstable
(z − 0.5)(z − 0.7) (z − 0.5)(z − 1.1)
16
5.4 Root locus
The root locus is the path of the roots of the characteristic equation traced out in the z-plane as a
system parameter is changed.
Fig 5.1
B(z)
Open loop system: G(z) =
A(z)
m n
B(z) = b o ∏ (z − z i ) , A(z) = ∏ (z − p i ) , n = order of A(z), m = order of B(z)
i =1 i =1
kB(z)
Closed loop system: H(z) =
A(z) + kB(z)
Characteristic polynomial: P(z) = A(z) + kB(z)
17
n m
1
n − m
∑ p j − ∑ zi
1 n m n m
p − z = z − j =1 i =1
z 1 − ∑ p j − ∑ z i
1
Since
z j =1
≈ z 1 −
∑
(n − m)z j =1
j ∑ i
n−m
i =1 i =1
n m
∑ p j − ∑ zi j
2 r +1
π
j =1 i =1 n −m n −m
We have z − ≈ kb o e
n−m
n m
∑ p j − ∑ zi j
2 r +1
π
j=1 i =1 n −m n −m
⇒ z ≈ + kb o e
n−m
The asymptotes are centered at a point on the real axis given by
n m
∑ p j − ∑ zi
j=1 i =1
R=
n−m
The angle of the asymptotes with respect to the real axis is
(2r + 1) π
α=
n−m
r = 0, 1, … , n-m-1
Fig.5.2
1
E(z) = R(z)
1 + G1 (z)K (z )
Assume that the closed loop system is stable. The steady state error is
(z − 1)R (z)
ess = lim z→1 {(1-z-1)E(z)} = lim z→1 { }
z(1 + G1 ( z)K (z ))
18
2) Case 2: unit ramp input
Tz T 1
r(k) = kT1(k) ⇒ R(z) = ⇒ ess = lim z→1 { } =
(z − 1) 2 (z − 1)G1 ( z)K (z) Kv
1
Where Kv = lim z→1 {(z-1)G1(z)K(z)} is the static velocity error constant.
T
ess = 0 ⇔ Kv = ∞ ⇔ G1(z)K(z) has a double pole at 1 (double integrator)
Fig.5.3
The peak time is the time required for the response to reach the first peak of the overshoot.
Delay time is the time required for the response to reach half the final value the first time.
The rise time is the time required for the response to rise from 10% to 90% of its final value.
19
1
z = eTs ⇒ s= ln(z)
T
Let ps = -ξωn ± j ω n 1 − ξ 2 then pz = exp(psT) = exp(-ξωnT ± j ω n T 1 − ξ 2 )
⇒ pz = exp(-ξωnT)∠± ω n T 1 − ξ 2
Fig.5.4: Specification of the region in the z plane that corresponds to a desirable region in s plane
20
Chapter 6. Design of Control System
21
1
With G(s) = , Fig.6.3, 4, 5 show the effects of increasing a parameter independently
2
s + 2s + 5
22
2) Tuning PID controller
The Ziegler Nichols 1st method
Table 6.1
KP TI TD
T
P
LYo
0.9T
PI 3.3L
LYo
1.2T
PID 2L 0.5L
LYo
Increase the gain of the proportional controller until K = Ko the system output oscillates with
period To
23
kT
There are three methods for approximating the last term ∫ edt
( k −1)T
kT
* ∫ edt ≈ e(k-1)T ⇒ uI(k) = uI(k-1) + KIe(k-1)T
( k −1)T
z −1
The transfer function of the integral term is KIT
1 − z −1
kT
* ∫ edt ≈ e(k)T ⇒ uI(k) = uI(k-1) + KIe(k)T
( k −1)T
1
The transfer function of the integral term is KIT
1 − z −1
kT
1 KT
* ∫ edt ≈ 2
[e(k) + e(k-1)]T ⇒ uI(k) = uI(k-1) + I [e(k) + e(k-1)]
2
( k −1)T
K I T 1 + z −1
The transfer function of the integral term is
2 1 − z −1
It depends on the approximation method that we have several versions of discrete-time PID
controller, for example
K IT z + 1 K D z − 1
K(z) = K P + +
2 z -1 T z
1
4) Example: G(s) =
2
s + 2s + 5
10 5s
Continuous time PID control with KP = 5, KI = 10, KD = 5: K(s) = 5 + +
s 0.01s + 1
z +1 z −1
Discrete time PID control with T = 0.01 s: K(z) = 5 + 0.05 + 500
z -1 z
24
6.2 Pole Placement Control
Fig 6.8
B(z) D(z)
Consider the control system in Fig.6.8 with G1(z) = and K(z) =
A(z) C(z)
The characteristic polynomial of the closed loop system
P(z) = A(z)C(z) + B(z)D(z)
Given G1(z). Find K(z) such that the closed loop system has desired poles.
1
Example: G1(z) = (unstable plant).
z−2
Determine K(z) such that P(z) has roots at 0.8 ± j0.4 .(stable closed loop system).and the steady-
state error is ess = 0 as r = const.
A(z) = z – 2
B(z) = 1
⇒ C(z) = z - 1 (Integrator, C(z) has the same order as A(z))
D(z) = d1z + d2 (order of D(z) ≤ order of C(z))
⇒ P(z) = A(z)C(z) + B(z)D(z)
= z2 + (d1-3)z + 2 + d2
= (z – 0.8)2 + 0.42 = z2 – 1.6z + 0.8
⇒ d1 = 1.4, d2 = -1.2
1.4z - 1.2 0.2
⇒ K(z) = = 1.4 + (PI controller)
z −1 z −1
25
x(k + 1) A 0 x(k) B 0
x (k + 1) = - TC I x (k) + 0 u(k) + T r(k)
I I
3) Observer
x ( k + 1) = Ax ( k ) + Bu ( k )
The plant
y(k ) = Cx ( k ) + Du ( k )
x̂ (k + 1) = Ax̂ (k ) + Bu (k ) + K o [ y(k ) − ŷ(k )]
The observer
ŷ(k ) = Cx̂ (k ) + Du (k )
Let ~x (k) = x(k) - x̂ (k)
⇒ ~x (k+1) = A ~ x (k) – KOC ~ x (k) = AO ~ x (k)
where AO = A - KOC
Find KO such that AO has desired poles.
Condition: The plant is observable (or at least detectable)
J=
1 +∞ T
(
∑ x (k )Qx (k ) + u T (k )Ru (k )
2 k =0
)
where R is positive definite and Q is semi-positive definite.
The optimal control law is
u(k) = -KCx(k)
where KC = (R + BTPB)-1BTPA
and P is symmetric, positive definite matrix, solution to the algebraic Riccati equation
P = Q + ATPA - ATPB(R + BTPB)-1BTPA
A matlab routine to solve the algebraic Riccati equation
P = zeros(2,2); % initialize P, assume that the system has order 2
for k = 1:10 % iterate 10 times
P = Q + A'*P*A - A'*P*B*inv(R + B'*P*B)*B'*P*A;
end
26
1) Principle
Fig.6.9
The transfer function of the closed loop system
G1 ( z ) K ( z )
H(z) =
1 + G1 ( z ) K ( z )
If p is a pole of H(z) then 1 + G1(p)K(p) = 0
⇒ |G1(p)K(p)| = 1 and arg{G1(p)K(p)} = -180°
⇒ |G1(p)K(p)| = 1 and arg{K(p)} = - arg{G1(p)} - 180°
z − zc
The compensator: K(z) = KC
z − pc
Phase-lead compensator: zc > pc (the zero lies on the right of the pole)
Phase-lag compensator: zc < pc (the zero lies on the left of the pole)
Principle:
- The phase-lead compensator will enlarge the gain crossover frequency and increase the phase
margin. However, the gain margin can not be designed from the phase-lead compensator.
- The phase-lag compensator will reduce the gain crossover frequency to where the phase
margin is satisfied.
- Cascade a phase-lag compensator with a phase-lead compensator to change the overall system
characteristics. The phase-lag compensator increases the low-frequency gain. The phase-lead
compensator increases the bandwidth and stability margin.
2) Phase-lead compensation
Design Procedure
1. Calculate the desired closed loop pole pairs based on design criteria.
2. Map the s-domain poles to z-domain.
3. Check if the sampling frequency is 8−10 times the desired damped frequency of oscillation.
4. Calculate the angle contributions of all open loop poles and zeros to the desired closed loop
pole.
5. Compute the required contribution by the controller transfer function to satisfy angle
criterion.
6. Place the controller zero in a suitable location and calculate the required angle contribution of
the controller pole.
7. Compute the location of the controller pole to provide the required angle.
8. Find out the gain K from the magnitude criterion
10
Example 1: Consider the system in Fig.6.9 with G(s) = , the sampling interval T = 0.1s.
s(s + 5)
Find K(z) such that the closed loop system has dominant poles with damping ratio ξ = 0.707 and
natural frequency ωn = 2.
0.21z + 0.18 0.21(z + 0.857)
We have: G1(z) = Z{G(s)GZOH(s)} = =
(z − 1)(z − 0.607) (z − 1)(z − 0.607)
27
The desired dominant poles (continuous-time): ps = -ξωn ± jωn 1 − ξ 2
The desired dominant poles (discrete-time): pz = exp(Tps)
7
Example 2: Given the system in Fig.6.9 with G(s) = , the sampling interval T = 0.1s.
s( 2.2s + 1)
Find K(z) such that the closed loop system has dominant poles pz = 0.8595 ± j0.1224
0.34(z − 0.0853)
G1(z) = Z{G(s)GZOH(s)} =
(z − 1)( z − 0.9556)
28
Fig.6.11: Root Locus of the Control System with Proportional Controller Ko
|G1(pz)| = 9.19
arg{G1(pz)} = arg{pz - 0.0853} - arg{pz - 1} - arg{pz - 0.9556}
= arg{0.7742 + j0.1224} - arg{-0.1405 + j0.1224} - arg{-0.0961 + j0.1224}
= 8.984 - 138.94 - 128.14 = -258.1°
Since arg{K(pz)} = - arg{G1(pz)} - 180° = 78.1°
Let’s choose zc = 0.9556 (to get a pole-zero cancellation). We have
p − 0.9556 − 0.0961 + j0.1224
K(pz) = KC z = KC
pz − pc 0.8595 + j0.1224 − p c
arg{K(pz)} = arg{pz - zc} - arg{pz - pc}
= arg{-0.0961 + j0.1224} - arg{0.8595 - pc + j0.1224}
= 128.1° - arg{0.8595 - pc + j0.1224}
⇒ arg{0.8595 - pc + j0.1224} = 128.1 – arg{K(p*)} = 128.1° – 78.1° = 50°
0.1224
⇒ = tan(50°) = 1.1918
0.8595 − p c
⇒ 0.8595 - pc = 0.1027 ⇒ pc = 0.7568
p * −0.9556 − 0.0961 + j0.1224
|K(p*)| = KC| | = KC| | = 0.974KC
p * −pc 0.1027 + j0.1224
Since |G1(p*)K(p*)| = 1 ⇒ 8.9514KC = 1 ⇒ Kc = 0.1117
z − 0.9556
⇒ K(z) = 0.1117
z − 0.7568
3) Phase-Lag Compensation
10
Example: Consider the system in Fig.6.9 with G(s) = , the sampling interval T = 0.1s.
s(s + 5)
Find K(z) such that the closed loop system has static velocity error constant Kv* = 100.
0.21z + 0.18 0.21(z + 0.857)
G1(z) = Z{G(s)GZOH(s)} = =
(z − 1)( z − 0.607) (z − 1)(z − 0.607)
29
The characteristic equation before compensation:
1+G1(z) = 0 ⇒ (z-1)(z-0.607)+0.21z+0.18 = z2 - 1.397z + 0.787 = 0 ⇒ p = 0.6985 + 0.5469i
The static velocity error constant before compensation:
1 0.21(z + 0.857)
Kv = limz→1(1-z-1)G1(z) = 10limz→1(1-z-1) = 9.92
T (z − 1)(z − 0.607)
We have
1 − pc K
β= = v = 0.0992
1− zc K *v
We choose zc = 0.99 (so that the influence of zc on the closed loop system is negligible). It
follows that
1 - pc = 0.0992(1 – 0.99) ⇒ pc = 0.999
On the other hand
|G1(p*)K(p*)| = 1 ⇒ Kc = 1.
z − 0 . 99
K(z) =
z − 0 . 999
4) Design Example
1
Example 1: Given the transfer function of the plant G(s) =
s(s + 2)
Design a digital control scheme for the system to meet the following specifications
- The velocity error constant Kv = 6,
- The peak overshoot to step input Mp ≤ 15% and
- The settling time T2% ≤ 5s.
30
0.01758(z + 0.876)
G1(z) = Z{G1(s)GZOH(s)} =
(z − 0.67)(z − 1)
If we apply a proportional controller Ko as in Fig.6.12, the root locus of the closed loop system
as Ko varies from 0 to +∞ is given in Fig.6.13. It can be seen that the desired dominant poles pz
are very close to the root locus. This means the transient accuracy requirements are almost
satisfied by gain adjustment only. In fact, the characteristic polynomial of the closed loop system
in Fig.6.12 is
P(z) = (z – 0.67)(z – 1) + 0.01758Ko(z + 0.876)
Replacing z by 0.8235 ± jy, we have
P(0.8235+jy) = (0.8235 + jy – 0.67)( 0.8235 + jy – 1) + 0.01758Ko(0.8235 + jy + 0.876)
= (0.1535 + jy)( -0.1765 + jy) + 0.01758Ko(1.6995 + jy)
= -0.0271 - j0.023y - y2 + 0.0299Ko + j0.01758Koy = 0
⇒ - 0.0271 - y2 + 0.0299Ko = 0
- 0.023 + 0.01758Ko = 0
⇒ Ko = 1.31 and y = 0.2573
With Ko = 1.31, the poles 0.8235 ± j0.2573 on the root locus provide a better performance than
pz = 0.8235 ± j0.2191. However the static velocity error constant
1 0.115(z + 0.876)
Kv = lim z→1 { (z-1)G1(z)} = lim z→1 { } = 0.6538
T (z − 0.67)
is smaller than the desired value (which is 6).
Fig.6.12
To overcome the problem, we introduce a compensator that raises the system Kv by a factor of
6/0.6538 = 9.18 without appreciably affecting the root locus plot in the vicinity of the dominant
poles. This can be realized by the following lag compensator
z − 0. 9
K(z) = 1.31
z − 0.99
Both the pole and zero of K(z) are very close to z = 1. The angle contributed by the compensator
pole is canceled out by the compensator zero. Therefore K(z) does not appreciably disturb the
root locus plot in the vicinity of the dominant poles. It raises the system Kv by a factor of
(1-0.9)/(1-0.99) = 10.
31
Fig.6.13: Root locus of uncompensated system Fig.6.14: Root locus of compensated system
Example 2: Consider again the system of the example 1 but with the following control
specifications
- The velocity error constant Kv ≥ 2.5,
- Damping ratio ξ = 0.5 and
- The settling time T2% ≤ 2s.
32
|G1(pz)K(pz)| = 0.0868Ko0.901 = 1 ⇒ Ko = 12.8
z − 0.67
K(z) = 12.8
z − 0.2462
The static velocity error constant
1
Kv = lim z→1 { (z-1)G1(z)K(z)} = 2.8
T
Fig.6.15: Root Locus of Uncompensated System Fig.6.16: Root Locus of Compensated System
33
Exercise
1.1 Propose a digital control system to replace the following continuous-time control system
a) Speed control system in Fig.E1.1. b) Position control system in Fig.E1.2.
1.2 Find the mathematic model of the following system and propose a digital controller.
a) Magnetic levitation system (Fig.E1.3) b) Two-wheeled autonomous robot (Fig.E1.4)
c) Airplane (Fig.E1.5) d) Ball and beam system (Fig.E1.6)
34
Fig.E1.5: Airplane Fig.E1.6: Ball and beam system
2.1 Consider the digital control system in Fig.E2.1 where G(s) is the transfer function of the plant,
the sampling period is T = 0.05s, the control algorithm is defined as
u(k) = u(k-1) + 0.5e(k-1)
Y(z)
Find the transfer function of the closed loop system H(z) = . Find y(k) if r(k) = 1(k).
R (z)
1 1 1 1
a) G(s) = b) G(s) = c) G(s) = d) G(s) =
s+2 (s + 1)(s + 0.5) (s + 1) 2 s −1
Fig.E2.1
4.1 Find the transfer function of the following systems. Is the system strictly proper?
a) y(k) = 1.6y(k-1) - 0.8y(k-2) + 6u(k-1) + 8u(k-2)
b) y(k) = 1.6y(k-1) - 0.8y(k-2) + 7u(k) + 6u(k-1) + 8u(k-2)
35
4.2 Find the poles, the zeros, the impulse response and the step response of the following systems
z z 6z + 8
a) G(z) = b) G(z) = c) G(z) =
z − 0.8 z 2 − 1. 6 z + 0. 8 z 2 − 1. 6 z + 0. 8
8z 1 6 z
d) G(z) = e) G(z) = + f) G(z) =
2
z − 1.5z + 0.56 z − 0.8 z − 1.6z + 0.8
2
(z − 0.8) 2
4.4 Find the transfer function of the following systems. Is the system strictly proper?
x(k+1) = Ax(k) + Bu(k)
y(k) = Cx(k) + Du(k)
0 1 1
a) A= , B = , C = [6 8], D=5
1.2 − 0.5 2
0 1 0 1
b)
A= 0 0 1 , B = 2 , C = [6 8 7],
D=0
− 2 − 3 − 4 5
c) A = 0.8, B = 6, C = 8, D = 7
1
5.1 Consider the system in Fig.E.5.1 where G(s) = , K(z) = Ko = constant (proportional
s − 0.2
control), and the sampling interval is T = 0.1s.
Fig.E5.1
Y (z)
a) Find the transfer function of the closed loop system H(z) = .
R (z)
b) Find Ko such that the closed loop system is stable.
1 Ko
5.2 Consider the system in Fig.E5.1 where G(s) = , K(z) = where Ko = constant
(s + 1) 2 z −1
(integral control), and the sampling interval is T = 0.02s.
Y (z)
a) Find the transfer function of the closed loop system H(z) =
R (z)
b) Find Ko such that the closed loop system is stable
5.3 Sketch the root locus of the system in Fig.E5.2 as Ko varies from 0 to +∞.
1 z - 0.5
a) G1(z) = b) G1(z) =
(z − 0.8)(z − 0.9) (z − 0.8)(z − 0.9)
36
1 z - 0.5
c) G1(z) = d) G1(z) =
(z − 0.8)(z − 0.9)(z - 1) (z − 0.8)(z − 0.9)(z − 1)
Fig.E5.2
1
6.1 Consider the control system in Fig.E6.1 with G(s) = .
s(2s + 1)
z − z c1
a) K(z) = K1(z) = KC1 is a phase lead controller. Find the sampling interval T and K1(z)
z − p c1
such that the closed loop system has dominant poles with damping ratio ξ = 0.707 and
natural frequency ωn = 2 rad/s.
z − z c2
b) K(z) = K2(z)K1(z), where K1(z) is determined in question a and K2(z) = KC2 is a
z − p c2
phase lag controller. With the same sampling interval T as in question a, find K2(z) such that
the static velocity.error constant of the system is 5 times higher than the one obtained in
question a.
c) Simulate the control system on matlab/simulink.
Fig.E6.1
Go K T z +1
6.2 Consider the control system in Fig E6.1 with G(s) = , K(z) = KP + I (PI control).
s +1 2 z −1
Find the sampling interval T and K(z) such that the closed loop system has dominant poles with
damping ratio ξ = 0.707 and natural frequency ωn = 2 rad/s. Simulate the control system on
matlab/simulink.
37
0 1 0
x (k + 1) = x (k ) + u (k )
− 8 6 1
y(k ) = [1 0]x (k )
a) Find the poles of the system. Is the system stable?
b) Find the state feedback control such that the closed loop system has all poles at 0.8.
c) Find the state observer which has all poles at 0.6.
d) Sketch the observer feedback control system. Find the poles of the system.
Project
Go
Consider the control system in Fig.1 with G(s) = , the sampling interval T = (a/5) s
(as − 1) 2
1) Find the transfer function G1(z) of the equivalent system in Fig.2. Plot the impulse response
and the step response of G1(z). Find the poles and the zeros of G1(z). Is G1(z) stable?
2) Find the controller K(z) such that the closed loop system has steady-state error ess = 0 as r =
const and has dominant poles with ξ = 0.707 and ωn = 2 (choose other poles of the closed
loop system if necessary). Simulate the control system with r being a unit step.
3) Find a state space representation of G1(z). Is the state space model controllable and
observable?
4) Find a state feedback controller such that the closed loop system has steady-state error ess = 0
as r = const and has dominant poles with ξ = 0.707 and ωn = 2 (choose other poles of the
closed loop system if necessary). Simulate the control system with r being a unit step.
5) Find a state observer which has all poles at 0.4. Sketch the control system with the state
feedback matrix obtained in question d and the obtained state observer. Find the poles of the
control system. Simulate the control system with r being a unit step.
6) Find the linear quadratic controller such that the closed loop system has steady-state error ess
= 0 as r = const (choose the weighting matrices Q and R). Simulate the control system with r
being a unit step.
Fig 1
Fig 2
38
Group 20
tt 1 2 3 4 5 6 7 8 9 10
a 1 2 3 4 5 6 7 8 9 10
Go 1 2 3 4 5 6 7 8 9 1
tt 11 12 13 14 15 16 17 18 19 20
a 1 2 3 4 5 6 7 8 9 10
Go 2 3 4 5 6 7 8 9 1 2
tt 21 22 23 24 25 26 27 28 29 30
a 1 2 3 4 5 6 7 8 9 10
Go 3 4 5 6 7 8 9 1 2 3
tt 31 32 33 34 35 36 37 38 39 40
a 1 2 3 4 5 6 7 8 9 10
Go 4 5 6 7 8 9 1 2 3 4
tt 41 42 43 44 45 46 47 48 49 50
a 1 2 3 4 5 6 7 8 9 10
Go 5 6 7 8 9 1 2 3 4 5
Group 21
tt 1 2 3 4 5 6 7 8 9 10
a 1 2 3 4 5 6 7 8 9 10
Go 6 7 8 9 1 2 3 4 5 6
tt 11 12 13 14 15 16 17 18 19 20
a 1 2 3 4 5 6 7 8 9 10
Go 7 8 9 1 2 3 4 5 6 7
tt 21 22 23 24 25 26 27 28 29 30
a 1 2 3 4 5 6 7 8 9 10
Go 8 9 1 2 3 4 5 6 7 8
tt 31 32 33 34 35 36 37 38 39 40
a 1 2 3 4 5 6 7 8 9 10
Go 9 1 2 3 4 5 6 7 8 9
39
MATLAB FUNCTIONS
A = [1 3 2]
B = [2 4]
B 2s + 4
S = tf(B,A) % define the system S with the transfer function =
A s 2 + 3s + 2
nyquist(S) % plot the Nyquist diagram of the system S
bode(S) % plot the Bode diagram of the system S
impulse(S) % plot the impulse response of the system S
step(S) % plot the step response of the system S
ltiview('bode',S)
rlocus
40