Professional Documents
Culture Documents
Lag & Lead Compensator (PID-Controller) Design Techniques, Simulation & analysis methods with Bode Plot by MATLAB
Tariq MASOOD.CH Qatar Petroleum Dukhan Qatar Prof. Dr. Suhail A. Qureshi University of Engineering & Technology Lahore Pakistan Dr. Abdel-Aty Edris Manager Power Delivery (R&D) EPRI USA Prof. Dr. Abdul Jabber Khan Rachna College of Engineering &Technology Gujranwala Pakistan Prof. Dr. RK Aggarwal University of Bath Bath _ UK Yacob Y. Al-Mulla IEEE Chair Doha Qatar
Keywords: Compensator design structure Compensator gain attenuation zeros & poles gain crossover frequency
A. Introduction: The purpose of lag/lead compensator design in the frequency domain generally is to satisfy the specification on steady state accuracy and phase margin. The overall philosophy in the design procedure presented here is for the compensator to adjust the phase curve to establish a gain-crossover frequency for the disturbing system determining the phase of the loop transfer function L(s) at arbitrary points on the s-plane is an important skill for those students who are in introductory control subject. Evans showed that the magnitude and phase of the transfer function can be determined from the pole-zero map using simple vector geometry [1],[2]. For example the magnitude an phase of a transfer function of the from:
1 0.5
Bode Diagrams
From: U(1)
0 -0.5 -1 3 x 10-15
To: Y(1)
s1
rp
rz
0 10-1
100
101
Frequency (rad/sec)
L( s) =
sz s p
Page 2 of 8
Figure 1. Vector geometry for finding the magnitude and phase. The quantity s1-p is presented by a vector whose length is rp and magnitude is equal to rz/rp
Pole zero map 2 1.5 1 0.5 Imag Axis 0 -0.5 -1 -1.5 -2 -2 -1.5 -1 -0.5 0 Real Axis 0.5 1 1.5 2
Figure 2. Pole-zero phase map of L(s) = 1/(s+1) the transfer function pole is shown at s= -1. the blue arrows point in the direction of the phase of L (s) for the value of the base of the arrow. Characteristics of lag compensator:This relates to phase lag Low frequencies uses gain reduction to shift the zero-crossing to the left introduces phase lag at frequencies below wc reduces bandwidth very large amount of compensation possible increase transient response time Suppress high frequencies noise effects Appreciable improvement in ess steady state accuracy Characteristics of lead compensator: This relates to phase lead High frequencies uses phase advance at the zero-crossing increases high frequency gain and shifts wc to the right increases bandwidth limited amount of compensation possible uses phase advance at the zero-crossing improve transient response Accentuates high frequencies noise Small effect ess
s 1 ( s + Zo ) zo + 1 the final = G Com _ Lag = Kc s + po s po + 1 control will be significant s + 1 G Com _ Lag = Kc s + 1 e.g. typical bode plot lag compensator is Kc = 1; P0=0.4; Z0= 2.5 so = 2.5 / 0.4 = 6.25 1 1 hereby changing the gain merely moves = = Z 0 p 0 the magnitude curve by 20log10|Kc|. The major contribution from the lag compensator is the constant attenuation in magnitude at high frequencies and zero phase shifts at high frequencies. Bode plot transfer function for the lag compensator is 0. 4 s + 1 G lag compensato r = Kc 2.25 s + 1
Bode Diagrams Gm = Inf, Pm=180 deg. (at 5.2684e-009 rad/sec)
0
-5
-10
100
101
Frequency (rad/sec)
B. Design procedure of LAG Compensator:1. Compensator design structure the basic lag compensator comprises with gain, one pole and one zero, therefore based on specific structure of the compensator it will reflect as.
2. How to Determine the Compensator Gain. In the design procedure, the first step is to deter mine the valve of Kc. The gain is used to satisfy steady-state error specification. Therefore, the gain can be computed as given below. K x required e ss Plant Where the Kx is the = Kc = e ss Specified K x plant corresponding error constant of the system and ess is the steady state error for particular type of input, such as step or ramp. The steady state error and error constant are (assuming that the closed-loop system is bounded-input and bounded output. e.g. the steady state error which has been specified = 0.05 when the reference input is a unit ramp function, this requires an error constant Kx-required = 1/0.05 = 20. Assume 200 that plant transfer function G p(s) = (s + 4 )(s + 5 ) which is type of "0" then the compensator must have a one pole at zero. The error constant is K=200/(4X5) = 10 so the steady state error for a ramp input is 1/10=0.1 resulting in compensator required gain has value of Kc =0.1/0.05 = = 20/10 =2
Page 3 of 8
Example # (1) PM (phase margin) 40; and ess (steady60 state error) 0.05 ramp input. G =
p(s)
( s + 1)( s + 2)( s + 3)
Bode Diagrams
From: U(1) 50
-50
-100 0
To: Y(1)
-100
-200
-300 10-1
100
101
102
Frequency (rad/sec)
margin (jw/zc +1)/(jw/pc+1) = 0 degrees. Therefore the low-frequency parts of the curves will be unchanged the steady state error specification will be remain satisfied. 4. Gain crossover Frequency technique The definition of gain crossover frequency is that where omega is |G(jw)|=1 in absolute value or |G(jw)|=0 in dB value. The purpose of lag compensator's pole and zero combination is to drop the magnitude of the transfer function. The main goal of the lag compensator is to adjust the magnitude curve as per requirement with shifting the phase curve. Eventually, the phase margin is increased 5-10 degree to account that the lag compensator is not ideal. Therefore the gain crossover frequency, which has been compensated (compensated)) phase shift angle will be = -180 +PMspecified+10. E.g. if the phase margin specified 40 degree then the phase shift angle will be -130 degree with above equation. This (compensated)) is the frequency where the magnitude of the compensated system |Gc_lag(jw) Gp(jw)| =1 --> 0dB.
Gc _ lag ( jw) =
jw jw
1 +1 G p _( jw) = jw( jw + 2) pc + 1
zc
To: Y(1)
5. How to determine the attenuation Once the compensated gain crossover frequency has been determined, then the amount of attenuation has been provided by lag compensator must be evaluated as given below. Eventual, the all frequencies which are greater then 4*zc, the higher frequencies (relative to zc) will be
Time (sec.)
Amplitude
Kc=2
Bode Diagrams
From: U(1) 50
attenuated by -20log10() =10 e.g. the PM 40 and ess steady-state-error is 0.05 ramp input.
G jcompensate d dB 20
G p(s) =
-50
-100 0
To: Y(1)
-100
-200
-300 10-1
100
101
102
Frequency (rad/sec)
3. How to determine bode plot technique:In this step plot the magnitude and phase as function of frequency omega for the series combination of compensator gain or any compensator poles at s=0. bode plot transfer function will be used to determine the values of zeros and poles as well as if more then one stage compensation is required. Magnitude (jw) vs. frequency on a scale log and phase in degree vs. frequency on a log scale. The values of zeros and poles will be chosen to satisfy the phase margin and crossover frequency specification. If the w =0 the magnitude |(jw/zc +1)/(jw/pc +1)|= 1 and this will be equal to 0 dB. Similar the phase
compensator = 1/0.05 = 20 and the plant gain is K plant = 60/1.2.3 = 10 therefore the compensator gain will reflect: 20/10 = 2dB However, the new equation will emerge as given below. The attenuation angle will be equal to 50 by 20log (10)^33.4/24 the answer is 46.6 attenuation of the given angle. This is too large for the single stage compensation in fact it required two compensators for this transfer function. If 10 then lag compensator needs to be used to prevent any excessively large component values and limit the undesired phase shift. In other case if the > 10 then we need couple of identical series compensator stages to accomplish to above object.
Page 4 of 8
2 10 < total 100 nstage 3 100 < total 1000 n, 10n 1 < 10n total
would be given attenuation stage = can also be divided in two K c _ stage =
50 = 7.1 . The gain
Bode Diagrams Gm=0.0095492 dB (at 10.005 rad/sec), Pm=0.60167 deg. (at 9.9997 rad/sec)
20 0 -20 -40 -60 -80 0
e.g.: if the value = 50 assumed to be too large, then two stages of compensation can be used. Then the each stage
-100
2 = 1.414
-200
6. How to determine the zeros and poles This is last step to design the transfer function of the lag compensator, whereas to determine the values of the pole and zero. Eventually in last step Ive already determine the ratio of . Firstly, well choose to place the compensator zero and then compute the pole location from pc = zc/ and
-300 10-2
10-1
100
101
102
Frequency (rad/sec)
zc =
compensated
10n stage
Model design Lag-lag compensators:To meet the following specifications as listed below. Closed loop bandwidth, BW 1 rad/sec (PM) Phase margin 30 degree (GM)Gain margin 10 dB (ess) Steady-state-error due to a unit step input 0.01. Consider the system:- G plant =
This is not very compatible result, since the resonant peak at = 10 rad/sec is a causing the bode plot to experience crossovers of the 0dB point and thus, wc, GM and pM are not very much definable. Step 3: need to use the some sort of controller to push the resonant peak below the 0dB line. Therefore, well use LAG controller. Objective: to push the lag in a position such the downward sloping magnitude contributions of the lag silky the peak. Therefore the peak sits in between the lag zero and pole.
10 ( s + 0.1) s 2 + s + 100
Step 1: first of all open loop bode plot has been plotted as given below.
Bode Diagrams Gm=20.01 dB (at 10.005 rad/sec), Pm=180 deg. (at 1.2702e-008 rad/sec)
0 -20 -40
-60
Step Response
-80 5 -100 0 4 From: U(1)
-100
Amplitude
-200
2 To: Y(1)
-300 10-2
10-1
100
101
102
Frequency (rad/sec)
Step 2: the gain k has been used to desired crossover frequency. PM phase margin 20 decibel scale B therefore the change in to 20log |Hw| =HdB = 20 Log10 |Hw| = 10 20 = 10 therefore the K = 10
20
-1
-2
Time (sec.)
G plant = k
10 ( s + 0.1) s 2 + s + 100
Page 5 of 8
Step Response
From: U(1) 10 9 8 7 6 To: Y(1) 5 4 3 2 1 0 0 20 40 60 80 100 120 140 160 180 200
Bode Diagrams Gm=13.881 dB (at 9.3755 rad/sec), Pm=68.598 deg. (at 1.1122 rad/sec)
50
-50
Amplitude
10-1
100
101
102
Time (sec.)
Frequency (rad/sec)
Firstly, I'll calculate the steady state error to diminish possible instability of the loop.
1 1 e ss = lim(s 0 )s ( ) s 1 + kk 2 lag (s )G (s ) ( s + 1)(s + 0.1)(s 2 + s + 100) = lim(s 0) (s + 2)(s + 0.1)(s 2 + s + 100) + 10(10)(0.126)(s + 20)
=0.074 This does not satisfy the steady state error requirement, so add another LAG at low frequencies to compensate this. Insofar the steady state error equation will become as below. Step 4: herewith, well use other gain value to regain our original cross over of 1 rad/sec From the above bode plot to obtain the crossover frequency of 1 rad/sec, we need to subtract 18 dB from the magnitude plot. PM phase margin -18 decibel scale B therefore the change in to 20log |Hw| =HdB = -18 Log10 |Hw| = 10 20 = 0.126 therefore the valve of K = 0.126 Therefore, function
18
1 1 e ss = lim(s 0)s ( ) s 1 + kk 2 lag (s )Lag 2 ( s )G (s ) ( s +1)(s + 0.1)(s 2 + s +100)(s + p) = lim(s 0) (s + 2)(s + 0.1)(s 2 + s +100)(s + p) +10(10)(0.126)(s + 20)(s + z ) 20 p < 0.01 20 p + 252 z z < 7.86 in order to stratify the transfer p
Then the steady state error will be as =0.008 The final control Lag-Lag compensator will be as formulated below-
D( s ) = KK 2 Lag ( s ) Lag 2( s )
Final control:
Page 6 of 8
e ss =
-50
1 R( s) = 1 + KG p ( s )
G plant ( s ) =
10-2 10-1 100 101 102
40 s + 2s + 0
2
1.2
Amplitude
To: Y(1)
0.8
0.6
0.4
0.2
-180 10-2
10-1
100
101
0 0 1 2 3 4 5 6
Frequency (rad/sec)
Time (sec.)
PMold = 180 deg -90 deg atan(6.2/2) PMold = 18 degree Suppose the m phase advance angle is 20 degree and the attenuation angle will be formulated as below:
sin( m ) =
1 +1
20 log
= 3.01 2
1
Which satisfy all the requirements? Model design Lead-lag compensators:To meet the following specifications as listed below. (PM) Phase margin >45 degree (ess) Steady-state-error <5%. Consider the system:- G plant ( s ) = Steady state-error
1 s (s + 2) )
m _ uncompensated= 45+20+5= 30degree Lag angle = -180+30 = -150degree which correspondence to 3.5 rad/sec crossover frequency c = 3.5 rad/sec and the ' = 4 -20log() = -12 dB Gain in reduction= |1/'|dB +1/2||dB Gain reduction = -12+3 = - 9 dB lead time constant 1 := c := 3.5 3.5 2 = 0.202
1
Page 7 of 8
Step Response
From: U(1) 1.4
1 + s 1 + 2 0.2s 1 + 0.4s Glead = = = 1 + s 1 + 0.2 s 1 + 0.2s 1 + s 1 + 2.86 s 1 + 2.86 s Fi Glag = = = 1 + s 1 + 4 2.86s 1 + 11.44 s
nal compensator is:
1.2
Amplitude
To: Y(1)
0.8
0.6
0.4
0.2
Time (sec.)
10-2
10-1
100
101
102
Frequency (rad/sec)
Conclusion:Using pole-zero phase maps help to determine the phase of the transfer function from a plot of the poles and zeros. In this paper we have described some holistic techniques which are dealing with design laglead compensators (PID Control). We have extended some useful classical control design techniques developed for a fixed system to the case where vectors of uncertain parameters are present in the control system. We have supposed that the parameters appear linearly in the characteristic polynomial. This allows us to exactly construct the Bode plot envelopes using the most composite segments. We have also shown how bounds for the extremal gain and phase margins for such systems may be found easily from these segments. Based on these calculations suitable compensation can be designed to improve the worst case values of these margins. The results given here should be viewed as a start towards a more complete and complicated control theory of variant design doctrines which can be dealt with lead-lag, lag-lag compensators designing core perceptions.
10-1
100
101
102
REFERENCES:1) Frankline, Powell and Emami Feedback Control of dynamics control system 4th edition. 2) G.J Thaler, automatic control systems 1989 3) J.J Dazzo and C.H Houpis, Linear control system analysis and design McGraw-Hill 4th edition, 1995. 4) I.H.Keel and S.P Bhattacharyya Robust Parametric Classical Control design, Trans IEEE on automatic control, VOL. 39,No.& July, 1994. 5) [4] Kent H.Lundberg Pole Zeros phase map feature IEEE Control systems magazine Ferruary-2005
Frequency (rad/sec)
Page 8 of 8
6) Kai Shing Yeung, King W. Wong and Kan-Lin Chen A Non-Trial-and-Errot method for laglead compensator design, IEEE Trans on education Vol.41, No.1 February 1998. 7) Thomas J.Cavicchi Phase Margin Revisited: Phase-Root Locus, Bode Plots and Phase Shifters, IEEE Tran on education, Vol. 46, No. 1 February 2003. 8) Raymond C. Garcia and Bonnie S.Heck Enhancing Classical Controls Education via Interactive GUI Design IEEE Control System, June 1999. 9) W.R. Evans, control system synthesis by root locus method, Trans AIEE, vol 69, pp, 66-69, 1950. 10) W.R. Evans, control system dynamic New york:McGraw-Hill,1954, pp,99-100.