In practice, the stability of a mathematical model is not sufficient to guarantee acceptable system performance or even to guarantee the stability of the physical system that the model represents. This is because of the approximate nature of mathematical models and our imperfect knowledge of the system parameters. We therefore need to determine how far the system is from instability. This degree of stability is known as relative stability. To keep our discussion simple, we restrict it to open-loop stable systems where zero encirclements guarantee stability. For open-loop stable systems that are nominally closed-loop stable, the distance from instability can be measured by the distance between the set of points of the Nyquist plot and the point (−1, 0).
Typically, the distance between a set of points and the single point (−1, 0) is defined as the minimum distance over the set of points. However, it is more convenient to define relative stability in terms of two distances: a magnitude distance and an angular distance. The two distances are given in the following definitions.
Definition 4.5: Gain margin. The gain margin is the gain perturbation that makes the
system marginally stable. ■
figure 4.10
Nyquist plot of the furnace transfer function.
–1 –0.8 –0.6 –0.4 –0.2 0 0.2 0.4 0.6 0.8 1 –0.8
–0.6 –0.4 –0.2 0 0.2 0.4 0.6 0.8
Real Axis
Re[G(jw)]
Im[G(jw)]
Imaginary Axis
Definition 4.6: phase margin. The phase margin is the negative phase perturbation
that makes the system marginally stable. ■
The two stability margins become clearer by examining the block diagram of Figure 4.11. If the system has a multiplicative gain perturbation ΔG(z) = ΔK, then the gain margin is the magnitude of ΔK that makes the system on the verge of instability. If the system has a multiplicative gain perturbation ΔG(z) = e−jΔq, then the gain margin is the lag angle Δq that makes the system on the verge of instability. Clearly, the perturbations corresponding to the gain margin and phase margin are limiting values, and satisfactory behavior would require smaller model perturbations.
The Nyquist plot of Figure 4.12 shows the gain margin and phase margin for a given polar plot (the positive frequency portion of the Nyquist plot). Recall that each point on the plot represents a complex number, which is represented by a
figure 4.11
Model perturbation ΔG(s).
∆G(z) G(z) +
− R(s) C(z)
figure 4.12
Nyquist plot with phase margin and gain margin.
PM
Imaginary Axis
1/GM 1
0 –1 –2
–2 –1.8 –1.6 –1.4 –1.2 –0.8 –0.6 –0.4 –0.2 0 Real Axis–1
–3 –4
–5 Re[G(jw)]
Im[G(jw)]
vector from the origin. Scaling the plot with a gain ΔK results in scaled vectors without rotation. Thus, the vector on the negative real axis is the one that reaches the point (−1, 0) if appropriately scaled, and the magnitude of that vector is the reciprocal of the gain margin. On the other hand, multiplication by e−jΔq rotates the plot clockwise without changing the magnitudes of the vectors, and it is the vector of magnitude unity that can reach the point (−1, 0) if rotated by the phase margin.
For an unstable system, a counterclockwise rotation or a reduction in gain is needed to make the system on the verge of instability. The system will have a negative phase margin and a gain margin less than unity, which is also negative if it is expressed in decibels—that is, in units of 20 log{|G(jw)|}. The polar plot of a system with negative gain margin and phase margin is shown in Figure 4.13.
The gain margin can be obtained analytically by equating the imaginary part of the frequency response to zero and solving for the real part. The phase margin can be obtained by equating the magnitude of the frequency response to unity and solving for angle, and then adding 180°. However, because only approximate values are needed in practice, it is easier to use MATLAB to obtain both margins.
In some cases, the intercept with the real axis can be obtained as the value where z = −1 provided that the system has no pole at −1 (i.e., the frequency response has no discontinuity at the folding frequency ws/2).
It is sometimes convenient to plot the frequency response using the Bode plot, but the availability of frequency response plotting commands in MATLAB reduces the necessity for such plots. The MATLAB commands for obtaining frequency
figure 4.13
Nyquist plot with negative gain margin (dBs) and phase margin.
Imaginary Axis
1 0.5 0 –0.5
–1.5 –2
–3 –2.5 –2 –1.5 –0.5 0
Real Axis–1 –1
Re[G(jw)]
Im[G(jw)]
response plots (which work for both continuous-time and discrete-time systems) are
>> nyquist(gd) % Nyquist plot
>> bode(gd) % Bode plot
It is also possible to find the gain and phase margins with the command
>> [gm,pm] = margin(gd) An alternative form of the command is
>> margin(gd)
The latter form shows the gain margin and phase margin on the Bode plot of the system. We can also obtain the phase margin and gain margin using the Nyquist plot by clicking on the plot and selecting
Characteristics All stability margins
The concepts of the gain margin and phase margin and their evaluation using MATLAB are illustrated by the following example.
example 4.10
Determine the closed-loop stability of the digital control system for the furnace model of Example 3.4 with a discrete-time first-order actuator of the form
G za( )= z
− 0 9516
0 9048 .
.
and a sampling period of 0.01. If an amplifier of gain K = 5 is added to the actuator, how does the value of the gain affect closed-loop stability?
solution
We use MATLAB to obtain the z-transfer function of the plant and actuator:
G z z
z z z
ZAS( )= +
− + −
10− 4 711 4 644
2 875 2 753 0 8781
5
3 2
. .
. . .
The Nyquist plot for the system, Figure 4.14, is obtained with no additional gain and then for a gain K = 5. We also show the plot in the vicinity of the point (−1, 0) in Figure 4.15 from which we see that the system with K = 5 encircles the point twice clockwise.
We count the encirclements by starting away from the point (−1, 0) and counting the lines crossed as we approach it. We cross the gray curve twice and at each crossing the arrow indicates that the line is moving from our right to our left (i.e., two clockwise encircle- ments). The system is unstable and the number of closed-loop poles outside the unit circle is given by
figure 4.14
Nyquist plot for the furnace and actuator (K = 1, black, K = 5, gray).
–5 0 5 10 15 20 25 30 35 40 45 50
–25 –20 –15 –10 –5 0 5 10 15 20 25
Real Axis
Imaginary Axis
Re[G(jw)]
figure 4.15
Nyquist plot for the furnace and actuator in the vicinity of the point (−1, 0) (K = 1, black, K = 5, gray).
Real Axis
Imaginary Axis
–5 –4.5 –4 –3.5 –3 –2.5 –2 –1.5 –1 –0.5 0 –2
–1.5 –1 –0.5 0 0.5 1 1.5 2
System: untitled1 Real: –1.41 Imag: 0.000741 Frequency (rad/sec): –5.33
System: gdt Real: –0.795 Imag: –0.624 Frequency (rad/sec): 2.59
Re[G(jw)]
Im[G(jw)]
Z= −( N)+P
= +2 0
For the original gain of unity, the intercept with the real axis is at a magnitude of approximately 0.28 and can be increased by a factor of about 3.5 before the system becomes unstable.
At a magnitude of unity, the phase is about 38 degrees less negative than the instability value of −180°. We therefore have a gain margin of about 3.5 and a phase margin of about 38 degrees. Using MATLAB, we find approximately the same values for the margins
>> [gm,pm] = margin(gtd) gm = 3.4817 pm = 37.5426
Thus, an additional gain of over 3 or an additional phase lag of over 37° can be tolerated without causing instability. However, such perturbations may cause a significant deteriora- tion in the time response of the system. Perturbations in gain and phase may actually occur upon implementing the control, and the margins are needed for successful implementation.
In fact, the phase margin of the system is rather low, and a controller may be needed to improve the response of the system.
To obtain the Bode plot showing the phase margin and gain margin of Figure 4.16, we use the following command.
figure 4.16
Phase margin and gain margin for the oven control system shown on the Bode plot.
–80 –70 –60 –50 –40 –30 –20 –1010200
Magnitude (dB)
10–1 100 101 102
–360 –315 –270 –225 –180 –135 –90 –45 0
Phase (deg)
GM = 10.8 dB (at 6.25 rad/sec), PM = 37.5 deg (at 2.6 rad/sec)
Frequency (rad/sec) GM
PM
>> margin(gtd)
1. The phase margin for unity gain shown on the plot is as obtained with the first form of the command margin, but the gain margin is in dBs. The values are nevertheless identi- cal as verified with the MATLAB command
>> 20*log10(gm) ans = 10.8359
2. The gain margin and phase margin can also be obtained using the Nyquist command as shown in Figure 4.17.
figure 4.17
Phase margin and gain margin for the oven control system shown on the Nyquist plot.
Real Axis
Imaginary Axis
–1 –0.9 –0.8 –0.7 –0.6 –0.5 –0.4 –0.3 –0.2 –0.1 0 –6
–4 –2 0 2 4 6
System: gdt Phase Margin (deg): 37.5 Delay Margin (samples): 25.2 At frequency (rad/sec): 2.6 Closed-Loop Stable? Yes
System: gdt Gain Margin (dB): 10.8 At frequency (rad/sec): 5.25 Closed-Loop Stable? Yes
Re[G(jw)]
Im[G(jw)]
example 4.11
Determine the closed-loop stability of the digital control system for the position control system with analog transfer function
G s( )= s s ( + )
10 1
and with a sampling period of 0.01. If the system is stable, determine the gain margin and the phase margin.
solution
We first obtain the transfer function for the analog plant with ADC and DAC. The transfer function is given by
G z z
z z
ZAS( )= × +
−
( )( − )
4 983 10− 0 9967
1 0 99
. 4 .
.
Note that the transfer function has a pole at unity because the analog transfer function has a pole at the origin or is type I. Although such systems require the use of the modified Nyquist contour, this has no significant impacts on the steps required for stability testing using the Nyquist criterion. The Nyquist plot obtained using the MATLAB command nyquist is shown in Figure 4.18.
The plot does not include the large semicircle corresponding to the small semicircle on the modified contour of Figure 4.9. However, this does not prevent us from investigating stability. It is obvious that the contour does not encircle the point (−1, 0) because the point is to the left of the observer moving along the polar plot (lower half). In addition, we can reach the (−1, 0) point without crossing any of the lines of the Nyquist plot. The system is stable because the number of closed-loop poles outside the unit circle is given by
Z= −( N)+P
= + =0 0 0
figure 4.18
Nyquist plot for the position control system of Example 4.11.
Real Axis
Imaginary Axis
–7 –6 –5 –4 –3 –2 –1 0
–10 –8 –6 –4 –2 0 2 4 6 8 10
System: gd Phase Margin (deg): 17.1 Delay Margin (samples): 9.67 At frequency (rad/sec): 3.08 Closed-Loop Stable? Yes
System: gd Gain Margin (dB): 26 At frequency (rad/sec): 14.1 Closed-Loop Stable? Yes
Re[G(jw)]
Im[G(jw)]
The gain margin is 17.1°, and the phase margin is 26 dB. The gain margin and phase margin can also be obtained using the margin command as shown in Figure 4.19.
resOurces
Franklin, G. F., J. D. Powell, and M. L. Workman, Digital Control of Dynamic Systems, Addison-Wesley, 1990.
Gupta, S. C., and L. Hasdorff, Fundamentals of Automatic Control, Wiley, 1970.
Jury, E. I., Theory and Applications of the z-Transform Method, Krieger, 1973.
Kuo, B. C., Digital Control Systems, Saunders, 1992.
Ogata, K., Digital Control Engineering, Prentice Hall, 1987.
Oppenheim, A. V., A. S. Willsky, and I. T. Young, Signals and Systems, Prentice Hall, 1983.
Ragazzini, J. R., and G. F. Franklin, Sampled-Data Control Systems, McGraw-Hill, 1958.
PrOblems
4.1 Determine the asymptotic stability and the BIBO stability of the following systems:
(a) y k( +2)+0 8. y k( +1)+0 07. y k( )=2u k( +1)+0 2. u k( ) k=0 1 2, , , . . . (b) y k( +2)−0 8. y k( +1)+0 07. y k( )=2u k( +1)+0 2. u k( ) k=0 1 2, , , . . . (c) y k( +2)+0 1. y k( +1)+0 9. y k( )=3 0. u k( ) k=0 1 2, , , . . .
figure 4.19
Bode diagram with phase margin and gain margin for the position control system of Example 4.11.
–150 –100 –50 0 50 100
Magnitude (dB)
10–2 10–1 100 101 102 103
–270 –225 –180 –135 –90
Phase (deg)
GM = 26 dB (at 14.1 rad/sec), PM = 17.1 deg (at 3.08 rad/sec)
Frequency (rad/sec)
4.2 Biochemical reactors are used in different processes such as waste treatment and alcohol fermentation. By considering the dilution rate as the manipulated variable and the biomass concentration as the measured output, the bio- chemical reactor can be modeled by the following transfer function in the vicinity of an unstable steady-state operating point3:
G s( )= s
− +
5 8644 5 888 1
. .
Determine GZAS(z) with a sampling rate T = 0.1, and then consider the feedback controller
C z z
( )= − −z
− 1 017
1 .
Verify that the resulting feedback system is not internally stable.
4.3 Use the Routh-Hurwitz criterion to investigate the stability of the following systems:
(a) G z z
z z
( )= ( − )
( − )( − )
5 2
0 1. 0 8.
(b) G z z
z z
( )= ( + )
( − )( − )
10 0 1
0 7 0 9
.
. .
4.4 Repeat Problem 4.3 using the Jury criterion.
4.5 Obtain the impulse response for the systems shown in Problem 4.3, and verify the results obtained using the Routh-Hurwitz criterion. Also determine the exponential rate of decay for each impulse response sequence.
4.6 Use the Routh-Hurwitz criterion to find the stable range of K for the closed- loop unity feedback systems with loop gain
(a) G z K z
z z
( )= ( − )
( − )( − )
1 0 1. 0 8.
(b) G z K z
z z
( )= ( + )
( − )( − )
0 1
0 7 0 9
.
. .
4.7 Repeat Problem 4.6 using the Jury criterion.
4.8 Use the Jury criterion to determine the stability of the following polynomials:
(a) z5+ 0.2z4+ z2+ 0.3z − 0.1 = 0
(b) z5− 0.25z4+ 0.1z3+ 0.4z2+ 0.3z − 0.1 = 0
4.9 Determine the stable range of the parameter a for the closed-loop unity feedback systems with loop gain
(a) G z z
z a z
( )= ( − )
( − )( − )
1 1 1
0 8 .
.
(b) G z z
z a z
( )= ( + )
( − )( − )
1 2 0 1
0 9
. .
.
3B. W. Bequette, Process Control: Modeling, Design, and Simulation, Prentice Hall, 2003.
4.10 For a gain of 0.5, derive the gain margin and phase margin of the systems shown in Problem 4.5 analytically. Let T = 1 with no loss of generality because the value of wT in radians is all that is needed for the solution. Explain why the phase margin is not defined for the system shown in Problem 4.6(a).
Hint: The gain margin is obtained by finding the point where the imaginary part of the frequency response is zero. The phase margin is obtained by finding the point where the magnitude of the frequency response is unity.
cOmPuter exercises
4.11 Write a computer program to perform the Routh-Hurwitz test using a suitable CAD tool.
4.12 Write a computer program to perform the Jury test using a suitable CAD tool.
4.13 Write a computer program that uses the Jury test program in Exercise 4.12 to determine the stability of a system with an uncertain gain K in a given range [Kmin, Kmax]. Verify the answers obtained for Problem 4.6 using your program.
4.14 Show how the program written for Exercise 4.13 can be used to test the stability of a system with uncertain zero location. Use the program to test the effect of a ±20% variation in the location of the zero for the systems shown in Problem 4.6, with a fixed gain equal to half the critical value.
4.15 Show how the program written for Exercise 4.13 can be used to test the stability of a system with uncertain pole location. Use the program to test the effect of a ±20% variation in the location of the first pole for the systems shown in Problem 4.6, with a fixed gain equal to half the critical value.
4.16 Simulate the closed-loop systems shown in Problem 4.6 with a unit step input and (a) gain K equal to half the critical gain and (b) gain K equal to the critical gain. Discuss their stability using your simulation results.
4.17 For unity gain, obtain the Nyquist plots of the systems shown in Problem 4.6 using MATLAB and determine the following:
(a) The intersection with the real axis using the Nyquist plot and then using the Bode plot
(b) The stable range of positive gains K for the closed-loop unity feedback systems
(c) The gain margin and phase margin for a gain K = 0.5
4.18 For twice the nominal gain, use MATLAB to obtain the Nyquist and Bode plots of the systems of the oven control system of Example 4.10 with a sampling period of 0.01 and determine the following:
(a) The intersection with the real axis using the Nyquist plot and then using the Bode plot
(b) The stable range of additional positive gains K for the closed-loop unity feedback systems
(c) The gain margin and phase margin for twice the nominal gain 4.19 In many applications, there is a need for accurate position control at the
nanometer scale. This is known as nanopositioning and is now feasible because of advances in nanotechnology. The following transfer function represents a single-axis nanopositioning system4:
G s s s
s s s
( )= × ( + + × )
+ + ×
( ) +
4 29 10 631 2 9 4 10
178 2 6 10 412 3
10 2 6
2 6 2
. . .
. . ss
s s
s s s
+ ×
( )
+ + ×
( )
+ + ×
( )( + )
16 10 638 8 45 10
209 7 56 10 5818
6
2 6
2 6
. .
(a) Obtain the DAC-analog system-ADC transfer function for a sampling period of 100 ms, and determine its stability using the Nyquist criterion.
(b) Obtain the DAC-analog system-ADC transfer function for a sampling period of 1 ms, and determine its stability using the Nyquist criterion.
(c) Plot the closed-loop step response of the system of (b), and explain the stability results of (a) and (b) based on your plot.
4A. Sebastian and S. M. Salapaka, Design methodologies of robust nano-positioning, IEEE Trans.
Control Systems Tech., 13(6), 2005.
5
Analog Control System Design
Objectives
After completing this chapter, the reader will be able to do the following:
1. Obtain root locus plots for analog systems.
2. Characterize a system’s step response based on its root locus plot.
3. Design proportional (P), proportional-derivative (PD), proportional-integral (PI), and proportional-integral-derivative (PID) controllers in the s-domain.
4. Tune PID controllers using the Ziegler-Nichols approach.
Analog controllers can be implemented using analog components or approxi- mated with digital controllers using standard analog-to-digital transformations. In addition, direct digital control system design in the z-domain is very similar to the s-domain design of analog systems. Thus, a review of classical control design is the first step toward understanding the design of digital control systems. This chapter reviews the design of analog controllers in the s-domain and prepares the reader for the digital controller design methods presented in Chapter 6. The reader is assumed to have had some exposure to the s-domain and its use in control system design.