Design of sampled data control systems 5th lecture
1. Assist. Prof. Dr. Khalaf S. Gaeid
Electrical Engineering Department
Tikrit University
gaeidkhalaf@gmail.com
+9647703057076
Design of sampled data
control systems
2. 1. Root Locus
2. Construction Rules for Root Locus
3.Controller types:
4.Pole-Zero cancellation
5.Design Procedure
6.Simulink Implementation
7.Assignments
Contents
3. In addition to determining the stability of the system, the root
locus can be used to design the damping ratio (ζ) and natural
frequency (ωn) of a feedback system. Lines of constant
natural frequency can be drawn radially from the origin and
lines of constant damping ratio can be drawn as arccosine
whose center points coincide with the origin.
By selecting a point along the root locus that coincides with a
desired damping ratio and natural frequency, a gain K can be
calculated and implemented in the controller. More elaborate
techniques of controller design using the root locus are
available in most control textbooks: for instance, lag, lead, PI,
PD and PID controllers can be designed approximately with
this technique.
1. Root Locus
4. In fact, the root locus method provides the engineer with a
measure of the sensitivity of the roots of the system to a
variation in the parameter being considered.
The root locus technique may be used to great advantage in
conjunction with the Routh-Hurwitz criterion.
The root locus method provides graphical information, and
therefore an approximate sketch can be used to obtain
qualitative information concerning the stability and
performance of the system.
5. 2. Construction Rules for Root Locus
Root locus construction rules for digital systems are same as
that of continuous time systems.
1. The root locus is symmetric about real axis. Number of
root locus branches equals the number of open loop poles.
2. The root locus branches start from the open loop poles at
K= 0 and ends at open loop zeros at K=∞. In absence of open
loop zeros, the locus tends to ∞ when K → ∞.
Number of branches that tend to ∞ is equal to difference
between the number of poles and number of zeros.
3. A portion of the real axis will be a part of the root locus if
the number of poles plus number of zeros to the right of that
portion is odd.
4. If there are n open loop poles and m open loop zeros then
n−m root locus branches tend to ∞ along the straight line
asymptotes drawn from a single point s=σ which is called
centroid of the loci.
6. σ=∑real parts of the open loop poles−∑real parts of the open
loop zeros/n−m
Angle of asymptote
φq=180o(2q+ 1)/n−m , q= 0,1,...,n−m−1
5. Breakaway (Break in) points or the points of multiple roots
are the solution of the following equation:
dK/dz= 0
where
K is expressed as a function of z from the characteristic
equation. This is a necessary but not sufficient condition.
One has to check if the solutions lie on the root locus.
6. The intersection (if any) of the root locus with the unit
circle can be determined from the Routh array.
7. 7. The angle of departure from a complex open loop pole is
given by
φp= 180o+φ
where
Φ is the net angle contribution of all other open loop poles
and zeros to that pole.
ψi’s are the angles contributed by zeros and γj’s are the
angles contributed by the poles.
8. The angle of arrival at a complex zero is given by
φz= 180o−φ
where
Φ is same as in the above rule.
9. The gain at any point z0 on the root locus is given by
8. The controller design in continuous domain using
root locus is based on the approximation that the
closed loop system has a complex conjugate pole
pair which dominates the system behaviour.
Similarly for a discrete time case also the controller
will be designed based on the concept of a dominant
pole pair.
9. 3.Controller types:
We have already studied different variants of controllers such
as PI, PD,PID etc.
We know that PI controller is generally used to improve
steady state performance whereas PD controller is used to
improve the relative stability or transient response.
Similarly a phase lead compensator improves the dynamic
performance whereas a lag compensator improves the
steady state response
10. 4.Pole-Zero cancellation
A common practice in designing controllers in s-plane or z-
plane is to cancel the undesired poles or zeros of plant
transfer function by the zeros and poles of controller.
New poles and zeros can also be added in some
advantageous locations. However, one has to keep in mind
that pole-zero cancellation scheme does not always provide
satisfactory solution. Moreover, if the undesired poles are
near jω-axis, in exact cancellation, which is almost inevitable
in practice, may lead to a marginally stable or even unstable
closed loop system.
For this reason one should never try to cancel an unstable
pole.
11. 5.Design Procedure:
Consider a compensator of the form K(z+a)/(z+b). It will be a
lead compensator if the zero lies on the right of the pole.
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.
12. 7. Compute the location of the controller pole to provide the
required angle.
8. Find out the gain K from the magnitude criterion as can be
shown in the next flowchart.
The following example will illustrate the design procedure.
Example1
Consider the closed loop discrete control system as shown
in Figure 1. Design a digital controller
13. Performance
specification
desired closed loop
pole
ws is 8−10 times wd
angle contributions of
all open loop poles
and zeros
S z
contribution by the
controller
location of the
controller pole
controller zero in a
suitable location
gain K from the
magnitude criterion
Flowchart of the controller design
14. such that the dominant closed loop poles have a damping
ratio ξ= 0.5 and settling time ts= 2 sec for 2% tolerance band.
Take the sampling period as T= 0.2 sec.
The dominant pole pair in continuous domain is
−ξωn±jωn√1−ξ2
Where ωn is the natural undamped frequency.Given that settling time
ts=4/ξωn=4/0.5ωn= 2 sec.
Thus,ωn= 4 & Damped frequency
ωd= 4√1−0.52= 3.46
Sampling frequency { ωs=2π/T=2π/0.2= 31 . 4}
Since 31.4/3.46= 9.07, we get approximately 9 samples per
cycle of the damped oscillation. The closed loop poles in s-
plane
s1,2=−ξωn±jωn√1−ξ2= −2±j3.46
15. Thus the closed loop poles in z-plane
z1,2=exp(T(−2±j3.46))
|z|=e−T ξ ωn=exp(−0.4) = 0.676
<z=Tωd= 0.2×3.464 = 0.69 rad = 39.690
Thus,
z1,2= 0.67639.70∼=0.52±j0.43
G(z) =Z[(1−e−0.2s/s)*1/s(s+ 1)]=
(1−z−1)Z[1/s2(s+ 1)]∼=0.02(z+ 0.93)/(z−1)(z−0.82)
16.
17. The root locus of the uncompensated system (without
controller) is shown in Figure 2. It is clear from the root locus
plot that the uncompensated system is stable for a very small
range of K.
18. Pole zero map of the uncompensated system is shown in
Figure 3 . Sum of angle contributions at the desired pole is
A=θ1−θ2−θ3, where
Θ1 is the angle by the zero,−0.93, and θ2 and θ3 are the angles
contributed by the two poles,0.82 and 1 respectively.
19. From the pole zero map as shown in Figure 3, the angles can
be calculated as:
θ1= 16.5o, θ2= 124.9o and θ3= 138.1o.
Net angle contribution is
A= 16.5o−124.9o−138.1o= −246.5o.
But from angle criterion a point will lie on root locus if the
total angle contribution at that point is ±180o.
Angle deficiency is:
−246.5o+180o=−66.5O Controller pulse transfer function must
provide an angle of 66.5o. Thus we need a Lead
Compensator.
Let us consider the following compensator.
20. GD(z) =K(z+a)/(z+b)
If we place controller zero at z= 0.82 to cancel the pole there,
we can avoid some of the calculations involved in the design.
Then the controller pole should provide an angle of
124.9o−66.5o=58.4o.
Once we know the required angle contribution of the
controller pole, we can easily calculate the pole location as
follows.
The pole location is already assumed at z=−b. Since the
required angle is greater than
tan−1(0.43/0.52) = 39.6O
we can easily say that the pole must lie on the right half of
the Unit circle. Thus b should be negative. To satisfy angle
criterion,
21. tan−1(0.43)/(0.52− |b|)= 58.4o
or,0.43/0.52− |b|= tan(58.4o) = 1.625
or, 0.52− |b|=0.43/1.56= 0.267
or,
|b|= 0.52−0.267 = 0.253
Thus,
b=−0.253
The controller is then written as
GD(z) =K(z−0.82)/(z−0.253).
The root locus of the compensated system (with controller) is
shown in Figure 4.
22. If we compare Figure 4 with Figure 2, it is evident that stable
region of K is much larger for the compensated system than
the uncompensated system. Next we need to calculate K
from the magnitude criterion.
Magnitude criterion:
∣∣∣∣0.02K(z+ 0.93)/(z−0.253)(z−1)∣∣∣∣z=0.52+j0.43= 1
or,
K=∣∣∣∣(z−0.253)(z−1)/0.02(z+ 0.93)∣∣∣∣z=0.52+j0.43
=|0.52 +j0.43−0.253||0.52 +j0.43−1|/0.02|0.52 +j0.43 +0.93|=
10.75
23.
24. Thus the required controller is
GD(z) = 10.75(z−0.82)/(z−0.253).
The SIMULINK block to compute the output response is
shown in Figure 5.
All discrete blocks in the SIMULINK model should have same
sampling period which is 0.2 sec in this example.
25.
26. Example 2
First order type 1 system with loop gain
L(z)=1/Z−1
•Obtain the root locus plot.
•Obtain the critical gain.
The solution in Matlab will be
>> num=[0 0 1];
>> den=[0 1 -1];
>> h=tf(num,den);
>> sys_d=tf(num,den,-1);
>> rlocus(sys_d);
28. Design a proportional controller for the digital system with a
sampling period T=0.1 s to obtain a damped natural
frequency of 5 rad/sec, a time constant of 0.5 s and a
damping ratio of 0.7
29. First the example can be solved directly by Matlab software
as follows
>> g=tf(num, den, T) % sampling period T
>> rlocus(g) % Root locus plot
>> zgrid(zeta, wn) % Plot contours
% zeta= vector of damping ratios
% wn = vector of undamped natural
% frequencies>> num=[0 0 1];
>> den=[1 -1.5 0.5];
>> h=tf(num,den,0.1);
>> sysd=tf(num,den,0.1);
>> rlocus(sysd);
>>zgrid;
>>axis equal;
30. Using the root locus rules gives the root locus plot of figure7
Which can be obtained using the MATLAB command rlocus.
The root locus lies entirely in the right hand plane.
The breakaway point can be determined σ=0.75
The critical gain now occurs at the intersection of the root
locus with the unit circle.
31. To obtain the critical gain , first write the closed loop
characteristic equation
𝑧 − 1 𝑧 − 0.5 + 𝐾 = 𝑧2 − 1.5𝑧 + 𝐾 + 0.5 = 0
On the unit circle , the closed loop poles are complex
conjugate and of magnitude unity.
Hence , the magnitude of the poles satisfies the equation
𝑧1,2
2
= 𝐾𝑐𝑟 + 0.5 = 1
The critical gain is equal to 0.5 , which from the closed loop
characteristic equation , corresponds to unit circle pole at
𝑧1,2 = 0.75 ± 𝑗0.661 as can be seen in Fig.7.
33. After some preliminary calculations , the design results can
be easily obtained using the rlocus command of MATLAB.
Using MATLAB: rlocus
a) 𝜔 𝑑=5 rad/s
angle of the pole = 𝜔 𝑑 𝑇 =5 × 0.1= 0.5 rad =28.65°
b) 𝜏 = 0.5 𝑠:
1/𝑇𝑠 = Ƈ𝜔 𝑛=1/0.5=2 rad/s
Pole magnitude = exp(-Ƈ𝜔 𝑛T)=0.82
34. c) Ƈ given can be used directly to get the results of the gain
and the undamped natural frequency 𝜔 𝑛.
The higher gain designs are associated with a low damping
ratio and a more oscillatory response.
Using MATLAB , we obtain the results shown in table 1.
35. Design Gain Ƈ 𝝎 𝒏 𝒓𝒂𝒅/𝒔
a) 𝝎 𝒅=5 rad/s 0.23 0.3 5.24
b) 𝝉 = 𝟎. 𝟓 𝒔 0.17 0.4 4.60
c) Ƈ = 𝟎. 𝟕 0.10 0.7 3.63
Table1. Proportional Controller design results
36. Root Locus
RealAxis
ImaginaryAxis
-1 -0.5 0 0.5 1 1.5
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
System: sysd
Gain: 0
Pole: 0.5
Damping: 1
Overshoot (%): 0
Frequency (rad/s): 6.93
System: sysd
Gain: 0
Pole: 1
Damping: -1
Overshoot (%): 0
Frequency (rad/s): 0
System: sysd
Gain: 0.504
Pole: 0.75 - 0.665i
Damping: -0.00298
Overshoot (%): 101
Frequency (rad/s): 7.25
0.1/T
0.2/T
0.3/T
0.4/T
0.5/T
0.6/T
0.7/T
0.8/T
0.9/T
1/T
0.1/T
0.2/T
0.3/T
0.4/T
0.5/T
0.6/T
0.7/T
0.8/T
0.9/T
1/T
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Figure 8.The root locus of the second order system with grid
37. 𝑮𝑯 𝒛 =
𝟏
(𝒛 − 𝟏)(𝒛 − 𝟎. 𝟓)
Results in table 1 can be obtained analytically using the characteristic
equation for a complex conjugate poles
𝒛 𝟐 − 𝟐 𝐜𝐨𝐬(𝝎 𝒅 𝑻)𝒆−Ƈ𝝎 𝒏 𝑻 𝒛 + 𝒆−𝟐Ƈ𝝎 𝒏 𝑻
Closed loop characteristic equation
𝒛 𝟐 − 𝟏. 𝟓𝒛 + 𝑲 + 𝟎. 𝟓
So 𝒛 𝟐 − 𝟏. 𝟓𝒛 + 𝑲 + 𝟎. 𝟓 = 𝒛 𝟐 − 𝟐 𝐜𝐨𝐬(𝝎 𝒅 𝑻)𝒆−Ƈ𝝎 𝒏 𝑻 𝒛 + 𝒆−𝟐Ƈ𝝎 𝒏 𝑻
Equating coefficients
𝒛 𝟏: 𝟏. 𝟓 = 𝟐 𝐜𝐨𝐬(𝝎 𝒅 𝑻)𝒆−Ƈ𝝎 𝒏 𝑻
𝒛 𝟎
: 𝑲 + 𝟎. 𝟓 = 𝒆−𝟐Ƈ𝝎 𝒏 𝑻
Analytical solution of the Example 3
41. Assignment1: investigate the effect of controller gain K and
sampling time T on the relative stability of the closed loop
system as shown below(try T=0.5 ,T=1 and T=2)sec and
check the steady state error at each case.
42. Assignment 2. You have to design a discrete controller C(z) for the
plant P(z) and the given feedback structure in the following figure.
P(z) =(αz+β)/(z2+γz+δ),
With α≠ 0, β ≠ 0,γ,δ ∈ R, and T= 1s
Assume the controller is C(z) =kp, with kp ∈R+
Where do the poles of the TF of the closed-loop control
system T(z) =L(z)/1+L(z) converge to for kp= 0 and for kp→∞?