. The frequency response of the plant in a unity feedback control systems is shown in Figure. a) What is the static velocity error coefficient K v for the system? b) A lead compensator with a transfer function Ts G() s = K α Ts is introduced in the forward path with α = 0. and /T = 0 rads/s =. What gain K is required to obtain a crossover frequency ω c = 3.6 rads/s? c) With the lead compensator in place, a lag compensator with a transfer function Ts G() s = K β Ts is to be used to restore K v to its original value. What values of K and β are required? d) Place the pole of the lag compensator at 3.6 rads / s and sketch the compensated frequency response on the graph Figure. e) Determine approximately the gain and phase margins of the system with the lag/lead compensation. 0 0 0 0 Magnitude 0-0 - 0-3 0-4 0-5 0 0 0 0 0 3 Frequency (rad/s)
-50-00 -50 Phase (deg) -00-50 -300-350 -400 0 0 0 0 0 3 Frequency (rad/s) (a) Static velocity error coefficient K v By inspection, low-frequency response is of the form K v /s (amplitude-ratio slope = decade/decade; phase = 90º). At ω =, A(ω) = 00 K v = 00 s. (b) Lead compensator To make full use of the MATLAB tools, we should identify a transfer function model from the given plant frequency response. We can see amplitude-ratio slope changes of at 0 rad/s, and at 00 rad/s, with corresponding phase changes of 90º and 80º respectively. Hence we can infer that the transfer function is of the form 00 Gs () = s s s s + 0 + ς 00 00 The damping ratio can be found from the 'quality factor' Q = ς, which is the departure of the second-order factor from the asymptote at ω = ω n =00 rad/s: By inspection Q = 0.4/0. = ζ = 0.5. Hence, we can define the plant transfer function thus: G = tf(00, conv([/0 0], [/00^ *0.5/00 ])); G = zpk(g) Zero/pole/gain: 0000000 ----------------------------- s (s+0) (s^ + 50s e004)
We want to find the gain K of the lead compensator s /0+ G() s = K s /00 such that the unity-gain crossover frequency ω c = 3.6 rad/s. So, define the lead compensator with a gain of : G = tf([/0 ], [/00 ]) Transfer function: 0.05 s ---------- 0.0 s Invoke sisotool with G as the plant: sisotool(g) Let's customise the tool to suit the present problem: hide the root-locus tool (de-select Root Locus in the View menu), and select the Natural frequency format for the compensator (Compensators/Format ). Right click and select Grid. The design pane should now look like this: 3
Import the lead compensator G into the block C (File/Import ): Now, drag the magnitude plot down until the crossover frequency (displayed along with the Phase Margin on the phase plot) is 3.6 rad/s: The required compensator gain is displayed in the Current Compensator box: K = 0.303; (c) Lag compensator The Bode gain (and hence the velocity error coefficient) of the open-loop transfer function has been reduced by a factor K = 0.303. To restore it to the initial value of 00, the gain K of the lag compensator Ts G() s = K β Ts must be set to K = /K K = 3.3003 4
The high-frequency gain of the lag compensator is K /β. Hence, to restore the open-loop magnitude in the crossover region, we require K /β (approximate, because this is the asymptotic value, which may not apply exactly at the crossover frequency). So, we'll set β to this value and adjust the value later: beta = K beta = 3.3003 (d) Effect of lag compensator With the lag compensator pole at s = /βt = 3. 6 rad/s, we have T = /beta/3.6 T = 0.0959 and the transfer function of the lag compensator is G = tf(k*[t ], [beta*t ]); G = zpk(g) ; Zero/pole/gain: (s+0.43) --------- (s+3.6) To include the lag compensator in sisotool, we could import G*G into the block C or, alternatively, edit the compensator within sisotool: Click on the Current Compensator box, use the Add Real Zero and Add Real Pole buttons to locate the compensator pole and zero, and adjust the compensator gain to K K = : 5
Note that the crossover frequency has not been precisely recovered. We could drag the lag compensator zero (effectively adjusting β) until the frequency is displayed as 3.6 rad/s: K v = 00 ω c = 3.6 With the lag compensator pole at 3.6 rad/s and the zero adjusted to rad/s, the adjusted value of β is: beta = /3.6 beta = 3.480 (e) Stability margins The gain and phase margins can be read off directly as 5.54 db and 49º, respectively. In absolute ratio terms, GM = 0^(5.54/0) GM =.893 General comments It is instructive to look at the contributions of the lead and lag compensators to the overall open-loop transfer function: G = tf(k*[/0 ], [/00 ]); G = tf(k*[/ ], [/3.6 ]); bode(g, G*G, G*K*G*G), grid legend('g', 'G*G', 'G*G*G') 6
00 Bode Diagram 50 Magnitude (db) 0-50 -00-50 Phase (deg) -00-90 -80-70 G G*G G*G*G -360 0-0 0 0 0 0 3 0 4 Frequency (rad/sec) The blue curves show that if the feedback loop was closed with proportional control so as to give the desired K v = 00, the crossover frequency would be 47.8 rad/s and the phase margin would be only 5.5º. With the lead compensator (green curves), the phase was boosted in the desired crossover region (around 3.6 rad/s), but the loop gain had to be reduced to get gain crossover at this frequency. The resulting phase margin was a healthy 6.5º, but at the expense of reducing K v to 30.3 s. The lag compensator was introduced (red curves) to boost the low-frequency magnitude back to its previous level, while maintaining the crossover conditions. The lag compensator was positioned at sufficiently low frequencies so that its residual phase lag at the crossover frequency was quite small (about 3.5º), thereby not too seriously compromising the phase margin gained by using the lead compensator. 7