Digital Control Systems Lecture Summary #4 This summary discussed some graphical methods their use to determine the stability the stability margins of closed loop systems. A. Nyquist criterion Nyquist criterion is a graphical method that allows to determine the number of poles of the closed loop system that are outside the unit circle. It can be used to test stability in the frequency domain. The method is applied to the open loop transfer function allows obtaining information about the closed loop system. The Nyquist method uses the Cauchy principle of arguments. In addition to stability, the Nyquist criterion allows to deduce stability margins. Stability margins provide good information for frequency domain controller design. We assume we know the number of open loop poles outside the unit circle; we denote this number by P. The number of closed loop poles outside the unit circle is denoted by Z is unknown. Let N be the number of counterclockwise encirclements of point (, ) in the complex plane, ( N) the number of clockwise encirclements of the same point. The following theorem is based on the Cauchy principle of arguments: Theorem: Nyquist criterion: Assuming the open loop transfer function C(z)G za (z) has P poles outside the unit circle the number of counterclockwise encirclements is N (thus ( N) is the number of clockwise encirclements). The closed loop system has Z poles outside the unit circle with B. Examples Z = P N () The Nyquist diagrams for these examples are shown in figure. ) System : The open loop system: z +.5 () The open loop pole is.5, thus, P =. From the Nyquist diagram: N =. Thus Z = the system is unstable. This can be verified from the closed loop transfer function, which is given by (3) z +.5 The closed loop pole is.5, which is clearly outside the unit circle. ) System : The open loop system: z.5 (4) The open loop pole is.5, thus, P =. From the Nyquist diagram: N =. Thus Z = the system is stable. This can be verified from the closed loop transfer function, which is given by (5) z +.5 The closed loop pole is.5, which is clearly inside the unit circle. 3) System 3: The open loop system: z.5z +. (6) The open loop poles are.5 ± j.9, thus, P =. From the Nyquist diagram: N =. Thus Z = the system is unstable. This can be verified from the closed loop transfer function, which is given by z (7).5z +. The closed loop poles are.5 ±.86i, which are outside the unit circle because their magnitude is.48. 4) System 4: The open loop system: z.5z. (8) The open loop poles are.653,.53, thus, P =. From the Nyquist diagram we have: N =. Thus Z = the system is stable. This can be verified from the closed loop transfer function, which is given by z (9).5z +.9 The closed loop poles have magnitude.9487, the poles are inside the unit circle. The Nyquist diagrams are shown in figure. In system 4, you noticed that the system is barely stable (closed loop poles magnitude at.95). This leads us to the notion of stability margins. C. Stability margins Stability margin is a measure of the relative stability of the closed loop system. It has two components: a gain margin a phase margin. A system may be specified to have minimum stability margins. For example, we want the system to have a phase margin of at least 5 o,
Digital Control, spring 8 Summary 4 System System Real Axis Real Axis System 3 System 4 Real Axis Real Axis 3 Fig.. Nyquist Examples Fig.. Top: illustration of the disturbance, bottom: A simple proportional control or the gain margin of at least 5db. The gain margin phase margin are defined as follows: Gain margin G m : The gain margin can be defined as the gain disturbance that makes the system marginally stable. Phase margin P m : The phase margin can be defined as the phase disturbance that makes the system marginally stable. With reference to figure, the disturbance is given by L(z), which could be a pure gain, or a complex function. It is possible to obtain the phase margin the gain margin from the Nyquist plot (right click then go to characteristics). The gain margin corresponds to 8 o crossing, which corresponds to the intersection with the negative real axis. The system is less stable when the crossing is closer to (, ). Thus the gain margin is measured based on the distance along the negative real axis to point (, ). Phase margin corresponds to the angle measured along the unit circle to reach point (, ). Gain phase margins can be deduced from the Bode plot as well. The gain margin is the gain at angle 8 of the system to reach the db line. The phase margin is the phase at db to reach 8 o. Examples of gain phase margins are shown in figure 3, where the gain margin corresponds to point P the phase margin corresponds to point P. Left click on these points shows the numerical values for G m P m. Note that G m is in db. D. Root locus With reference to figure bottom, the root locus can be define as a plot of the closed loop poles as the gain varies (from zero to ). The starting points of the root locus are the open loop poles.
Digital Control, spring 8 Summary 4.5 Bode Diagram 8 6 Phase (deg) Magnitude (db) 4 4 45 9 P System: L Gain Margin (db): 3.5 At frequency (rad/sec): 3.4 System: L Phase Margin (deg): 75.5 Delay Margin (samples): At frequency (rad/sec):.3.5 P.5 System: L Gain Margin (db): 3.5 At frequency (rad/sec): 3.4 System: L Phase Margin (deg): 75.5 Delay Margin (samples): At frequency (rad/sec):.3 35 P P 8 Frequency (rad/sec).5.5.5.5 Real Axis Fig. 3. Gain phase margins using the Bode plot the Nyquist diagram ) Example: By h, sketch the root locus for L (z) = z +.5 () L (z) = () z.5 The first step to solve is to obtain the closed loop transfer function, solve for the poles as a function of the gain, then plot the poles as varies. The intersection of the root locus with the unit circle is of particular importance because it gives the value of for which the system becomes unstable. For example, for system (), the closed loop system is given by z +.5 + the pole location is given by () z =.5 (3) To sketch the root locus, we simply vary plot the pole locations in the complex plane. From the root locus of systems () () shown in figures 4 5, these systems become marginally stable for =.5 =.5, respectively. STEADY STATE ERROR One of the goals of control systems is to minimize the steady state error. The steady state error is the difference as time goes to infinity between the desired input the output. An example is shown in figure 6 where the desired input is a unit step. In this particular case, the steady state error is e( ) =.4. Consider figure 7 showing a closed loop system with unity feedback. L(z) is the open loop transfer function. It includes the controller, the ZOH the analog system, that is C(z)G za (z) (4) The steady state error can be obtained using the final value theorem ( z ) E(z) (5) z or (z ) R(z) (6) z z ( + L(z)) Without loss of generality, we can write L(z) as follows where N(z) (z ) n D(z) n is a positive integer, n. N() D() (7) Here n defines the type of the system. For example when n =, the system is of type. When n =, the system is of type. Now we examine the effect of stard reference inputs on the steady state error. Combining (6) (7), we get or z z( + (z )R(z) N(z) (n ) n D(z) ) (8) z (z ) n+ D(z)R(z) (z ) n D(z) + N(z) (9) It is clear that the steady state error depends on the type of the system of course on the input. E. Sampled step input For a unit step input, we have R(z) = z z ) For n =, we have: e( ) = () D() D() + N() = + L() = () + p p is called the position error constant. 3
Digital Control, spring 8 Summary 4.8.6 Root Locus.4...4 System: L Gain:.5 Pole: Damping:.377 Overshoot (%): Frequency (rad/sec): 3.4 System: L Gain:.37 Pole:.87 Damping:.95 Overshoot (%): 87 Frequency (rad/sec): 3. System: L Gain: Pole:.5 Damping:.5 Overshoot (%): 5 Frequency (rad/sec): 3..6.8.5.5.5 Real Axis Fig. 4. Root locus for system L in equation () Root Locus.5.5.5 System: L Gain:.5 Pole:. Damping:.8 Overshoot (%): Frequency (rad/sec): 3.4 System: L Gain:.77 Pole:.49 Damping: Overshoot (%): Frequency (rad/sec):.79.5.5.5.5.5 Real Axis Fig. 5. Root locus for system L in equation () 4
Digital Control, spring 8 Summary 4 Response.5.5 r(k) y(k) e( ) e(k) = r(k) y(k) 5 5 Time (seconds) Fig. 6. An illustration of the steady state error. The input r(k) is a unit step, the output is y(k). ) For n =, we have: z ) For n =, we have z thus (z ) D(z) T z (z ) D(z) + N(z) (z ) = (6) (z ) D(z) T z (z ) D(z) + N(z) (z ) (7) e( ) = T D() N() (8) The velocity error constant can be defined in this case as v = lim (z )L(z) (9) z T When the error for a ramp input is constant (different from zero), we have e( ) = / v. 3) For n z (z ) n+ D(z) T z (z ) n D(z) + N(z) (z ) (3) (z ) n D(z) z (z ) n D(z) + N(z) = (3) G. Example Consider the following system G za (z) = (z.5) (3) C(z) = (33) ) Find the steady state error for a unit step. Fig. 7. Block diagram of a unity feedback system ) For n, we have z z (z ) n+ D(z) z (z ) n D(z) + N(z) (z ) n D(z) z (z ) n D(z) + N(z) because n, we have () (3) e( ) = (4) Solution The system is of type zero. For a unit step we have [ ] z (z ) z z + (z.5) z z.5 z.5 + (34) (35) e( ) =.5.5 + =.5 (36).5 + The steady state error can be reduced by increasing the gain. For =, the closed loop response is shown in figure 8. For this value of the gain, e( ) =.33. This is clearly confirmed on figure 8. Recall that there is a constraint on the values of, we can use only values of for which the system maintains stability. F. Ramp input For a unit ramp input, we have R(z) = T z (z ) (5) 5 H. Example Consider the following system G za (z) = (z +.8)(z ) (37)
Digital Control, spring 8 Summary 4 Step Response.4 Step Response. Amplitude.8.6 e( ) =.33 Amplitude.8.6 e( ) =.4.4...5.5 Time (sec).5.5 Time (sec) Fig. 8. Closed loop step response for example Fig. 9. Closed loop step response for example C(z) = (38) ) Find the steady state error for a unit step. ) Find the steady state error for a unit ramp. 5 4 Linear Simulation Results Solution ) The system is of type one, for a unit step we have [ ] z (z ) (39) z z + (z )(z+.8) z (z +.8)(z ) (z )(z +.8) + (4) e( ) = (4) The steady state error is zero does not depend on the gain. The closed loop response is shown in figure 9, the error is zero which confirms the previous results. ) When the input is a unit ramp, we have [ T z (z ) z (z ) ] + (z )(z+.8) [ ] T z(z )(z +.8) z (z ) (z )(z +.8) + (4) (43) e( ) = T.8 (44) The steady state error can be reduced by increasing the gain or reducing the sampling time. The closed loop response for a ramp is shown in figure for a gain = a sampling time T =.s. Matlab code to plot the step response is shown below. Amplitude 3 e( ) Time (sec) 3 4 5 Fig.. Closed loop ramp response for example I. In conclusion ) For a unit step { +L() e( ) = = + p for n = for n ) For a ramp input e( ) = with lim z (45) p = L() (46) for n = T (z ) v for n = for n (47) (z )L(z) v = lim (48) z T 3) When we talk about steady state error, we assume that the system is stable. Steady state error does not make 6
Digital Control, spring 8 Summary 4 sense if the system is unstable. 4) The fact that the time response of the system increases in figure does not imply instability of the system. 5) The analysis done here assumes a unity feedback. Thus the equations are not valid for a non-unity feedback. L = tf([],[ -.5],.) CL = feedback(l, ) step(cl) %Step response 7