Design system with Bode Hany Ferdinando Dept. of Electrical Eng. Petra Christian University.
-
Upload
bryce-ferguson -
Category
Documents
-
view
216 -
download
1
Transcript of Design system with Bode Hany Ferdinando Dept. of Electrical Eng. Petra Christian University.
Design system with BodeDesign system with BodeHany FerdinandoHany FerdinandoDept. of Electrical Eng.Dept. of Electrical Eng.
Petra Christian UniversityPetra Christian University
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 22
General OverviewGeneral Overview
Bode vs Root Locus designBode vs Root Locus design Information from open-loop freq. responseInformation from open-loop freq. response Lead and lag compensatorLead and lag compensator
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 33
Bode vs Root LocusBode vs Root Locus
Root Locus method gives direct Root Locus method gives direct information on the transient response of information on the transient response of the closed-loop systemthe closed-loop system
Bode gives indirect informationBode gives indirect information In control system, the transient response In control system, the transient response
is important. For Bode, it is represented is important. For Bode, it is represented indirectly as phase and gain margin, indirectly as phase and gain margin, resonant peak magnitude, gain crossover, resonant peak magnitude, gain crossover, static error constantstatic error constant
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 44
Open-loop Freq. ResponseOpen-loop Freq. Response
Low-freq. regionLow-freq. region indicates the steady-state indicates the steady-state behavior of the closed-loop systembehavior of the closed-loop system
Medium-freq. regionMedium-freq. region indicates the relative indicates the relative stabilitystability
High-freq. regionHigh-freq. region indicates the complexity indicates the complexity of the systemof the system
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 55
Lead and Lag CompensatorLead and Lag Compensator
Lead Compensator:Lead Compensator: It yields an improvement in transient response It yields an improvement in transient response
and small change in steady-state accuracyand small change in steady-state accuracy It may attenuate high-freq. noise effectIt may attenuate high-freq. noise effect
Lag Compensator:Lag Compensator: It yields an improvement in steady-state It yields an improvement in steady-state
accuracyaccuracy It suppresses the effects of high-freq. noise It suppresses the effects of high-freq. noise
signalsignal
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 66
Lead CompensatorLead Compensator
Ts
Ts
KTs
TsKsG ccc
1
1
1
1)(
(0 < (0 < < 1) < 1)
The minimal value of a is limited by the The minimal value of a is limited by the construction of lead compensator. Usually, it construction of lead compensator. Usually, it is taken to be about 0.05is taken to be about 0.05
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 77
Lead CompensatorLead Compensator
1.1. Define KDefine Kcc = K then then = K then then
2.2. With gain K, draw the Bode diagram and With gain K, draw the Bode diagram and evaluate the phase marginevaluate the phase margin
1
1)(
Ts
TsKsGc
)(1
1)(
1
1)(
1
1)()( 1 sG
Ts
TssKG
Ts
TssG
Ts
TsKsGsGc
Determine gain K to satisfy the Determine gain K to satisfy the requirement on the given static error requirement on the given static error constantconstant
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 88
Lead CompensatorLead Compensator
3.3. Determine the phase-lead angle to be Determine the phase-lead angle to be added to the system (added to the system (mm), add additional ), add additional
5-125-12oo to it to it
4.4. Use to determine the Use to determine the attenuation factor attenuation factor . Find . Find cc in G in G11(s) as (s) as |G|G11(s)| = -(s)| = -20 log(1/20 log(1/√√) and ) and cc is is 1/(√1/(√T)T)
5.5. Find zero (1/T) and pole (1/Find zero (1/T) and pole (1/T)T)
1
1sin m
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 99
Lead CompensatorLead Compensator
6.6. Calculate KCalculate Kcc = K/ = K/
7.7. Check the gain margin to be sure it is Check the gain margin to be sure it is satisfactorysatisfactory
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1010
Lead Compensator - exampleLead Compensator - example
It is desired that the Kv is 20/sIt is desired that the Kv is 20/s Phase margin 50Phase margin 50oo Gain margin at least 10 dBGain margin at least 10 dB
)2(
4)(
sssG
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1111
Lead Compensator - exampleLead Compensator - example
)(1
1)(
1
1)(
1
1)()( 1 sG
Ts
TssKG
Ts
TssG
Ts
TsKsGsGc
202)2(
4
1
1lim
)(1
1lim)(
1
1lim)()(lim
0
01
00
Kss
Ks
Ts
Ts
sKGTs
TsssG
Ts
TsssGssG
s
ssc
s
K = 10K = 10
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1212
Lead Compensator - exampleLead Compensator - example
-50
0
50M
agni
tude
(dB
)
10-1
100
101
102
-180
-135
-90
Pha
se (
deg)
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 18 deg (at 6.17 rad/sec)
Frequency (rad/sec)
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1313
Lead Compensator - exampleLead Compensator - example
Gain margin is infinity, the system requires Gain margin is infinity, the system requires gain margin at least 10 dB.gain margin at least 10 dB.
Phase margin is 18Phase margin is 18oo, the system requires , the system requires 5050oo, therefore there is additional 32, therefore there is additional 32oo for for phase marginphase margin
It is necessary to add 32It is necessary to add 32oo with 5-12 with 5-12oo as as explained before…it is chosen 5explained before…it is chosen 5oo 37 37oo
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1414
Lead Compensator - exampleLead Compensator - example
Sin 37Sin 37oo = 0.602, then = 0.602, then = 0.25 = 0.25
|G|G11(s)| = -20 log (s)| = -20 log (1/(1/√√))
5.002.6)2(
40
25.0
1log20
)2(
40
dBjj
jj
cc
cc
cc = 8.83 rad/s = 8.83 rad/s new crossover freq. new crossover freq.
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1515
Lead Compensator - exampleLead Compensator - example
cc = 1/( = 1/(√√T), then 1/T = T), then 1/T =
cc√√zero = 4.415zero = 4.415
Pole = 1/(Pole = 1/(T) = T) = cc//√√ = 17.66 = 17.66
KKcc = K/ = K/ = 10/0.25 = 40 = 10/0.25 = 40
)2(
4
66.17
415.440)()(
)2(
41
1
)()(
sss
ssGsG
ssT
s
Ts
KsGsG
c
cc
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1616
Lead Compensator - exampleLead Compensator - example
-100
-50
0
50M
agni
tude
(dB
)
10-1
100
101
102
103
-180
-135
-90
Pha
se (
deg)
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 49.6 deg (at 8.83 rad/sec)
Frequency (rad/sec)
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1717
Lead Compensator - exampleLead Compensator - exampleclear;
K = 10;
num = 4; den = [1 2 0];
margin(K*num,den)
[Gm,Pm] = margin(K*num,den)
new_Pm = 50 - Pm + 5;
new_Pm_rad = new_Pm*pi/180;
alpha = (1 - sin(new_Pm_rad))/(1 + sin(new_Pm_rad))
Wc = 8.83;
zero = Wc*sqrt(alpha); pole = Wc/sqrt(alpha);
Kc = K/alpha;
figure; margin(conv(4*Kc,[1 zero]),conv([1 2 0],[1 pole]))
Clear variable
Gain from Kv
Plot margin
Get Gm & Pm
New Pm in deg
New Pm in rad
alpha
From calculation
Get zero & pole
Compensator gain
Plot final result
Original system
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1818
Lag CompensatorLag Compensator
Ts
Ts
KTs
TsKsG ccc
1
1
1
1)(
(( > 1) > 1)
With b > 1, its pole is closer to the origin than With b > 1, its pole is closer to the origin than its zero isits zero is
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 1919
Lag CompensatorLag Compensator
1.1. Assume Assume
KKcc = K = K
Ts
Ts
KTs
TsKsG ccc
1
1
1
1)(
)(1
1)(
1
1)(
1
1)()( 1 sG
Ts
TssKG
Ts
TssG
Ts
TsKsGsGc
Calculate gain K for required static error Calculate gain K for required static error constant or you can draw it in Bode constant or you can draw it in Bode diagramdiagram
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 2020
Lag CompensatorLag Compensator
2.2. if the phase margin of KG(s) does not if the phase margin of KG(s) does not satisfy the specification, calculate satisfy the specification, calculate mm! It is ! It is
mm = 180 – required_phase_margin (don’t = 180 – required_phase_margin (don’t
forget to add 5-12 to the required phase forget to add 5-12 to the required phase margin). Find margin). Find cc for the new for the new mm!!
3.3. Choose Choose = 1/T (zero of the = 1/T (zero of the compensator) 1 octave to 1 decade compensator) 1 octave to 1 decade below below cc..
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 2121
Lag CompensatorLag Compensator
4.4. At At cc, determine the attenuation to bring , determine the attenuation to bring
the magnitude curve down to 0 dB. This the magnitude curve down to 0 dB. This attenuation is equal to -20 log (attenuation is equal to -20 log (). From ). From this point, we can calculate the pole, this point, we can calculate the pole, 1/(1/(T)T)
5.5. Calculate the gain KCalculate the gain Kcc as K/ as K/
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 2222
Lag Compensator - exampleLag Compensator - example
It is desired that the Kv is 5/sIt is desired that the Kv is 5/s Phase margin 40Phase margin 40oo Gain margin at least 10 dBGain margin at least 10 dB
)15.0)(1(
4)(
ssssG
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 2323
Lag Compensator - exampleLag Compensator - example
)15.0)(1(
1
1
1
)15.0)(1(
1
1
1)()(
sssTs
TsK
sssTs
TsKsGsG cc
K = KK = Kcc
)15.0)(1(
1
1
1)()(lim
0
sssTs
TssKsGssGK c
sv
With Kv = 5, K = 5With Kv = 5, K = 5
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 2424
Lag Compensation - exampleLag Compensation - example
-150
-100
-50
0
50
100M
agni
tude
(dB
)
10-2
10-1
100
101
102
-270
-225
-180
-135
-90
Pha
se (
deg)
Bode DiagramGm = -4.44 dB (at 1.41 rad/sec) , Pm = -13 deg (at 1.8 rad/sec)
Frequency (rad/sec)
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 2525
Lag Compensation - exampleLag Compensation - example
The required phase margin is 40The required phase margin is 40oo, , therefore, fm = -180therefore, fm = -180oo + 40 + 40oo + 10 + 10oo = -130 = -130oo
Angle of GAngle of G11(s) is -130(s) is -130oo, , cc = 0.49 rad/s = 0.49 rad/s
= 1/T = 0.2= 1/T = 0.2cc = 0.098 rad/s = 0.098 rad/s
At At cc, the attenuation to bring down the , the attenuation to bring down the
magnitude curve to 0 dB is -18.9878 dB magnitude curve to 0 dB is -18.9878 dB (rounded to -19 dB)(rounded to -19 dB)
From -20log(From -20log() = -19, ) = -19, is 8.9125 is 8.9125
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 2626
Lag Compensation - exampleLag Compensation - example
Pole of the compensator is 1/(Pole of the compensator is 1/(T), with 1/T T), with 1/T = 0.098, the pole is 0.011= 0.098, the pole is 0.011
Kc = K/b, and Kc = 0.561Kc = K/b, and Kc = 0.561
Design System with Bode - Hany FerdinandoDesign System with Bode - Hany Ferdinando 2727
Lag Compensation - exampleLag Compensation - exampleK = 5;
num = 1;
den = conv([1 1 0],[0.5 1]);
margin(K*num,den)
[Gm,Pm] = margin(K*num,den);
new_Pm = (-180 + 40 + 10)*pi/180; %rad
wc = 0.49;
att = -(20*log10(5/abs(i*wc*(i*wc+1)*(i*0.5*wc+1))))
beta = 10^(att/-20)
zero = 0.2*wc
pole = zero/beta
Kc = K/beta
GainGain
Plot marginPlot margin
Get gain and phase marginGet gain and phase margin
Find new phase marginFind new phase margin