Desired Bode plot shape

36
Desired Bode plot shape 0 -90 -180 0dB gc High low freq gain for steady state tracki Low high freq gain for noise attenuation Sufficient PM near gc for stability Low freq ess, type High freq Noise immu Want high gain Want low gain Mid freq Speed, BW Want sufficient Phase margin Use low pass filters Use PI or lag control Use lead or PD control PM+Mp=70 Mr, Mp

description

Desired Bode plot shape. High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near w gc for stability. Want high gain. Use PI or lag control. w gc. High freq Noise immu. w. Mid freq Speed, BW. 0dB. Low freq ess , type. - PowerPoint PPT Presentation

Transcript of Desired Bode plot shape

Page 1: Desired Bode plot shape

Desired Bode plot shape

0

-90

-180

0dB

gc

High low freq gain for steady state trackingLow high freq gain for noise attenuationSufficient PM near gc for stability

Low freqess, type

High freqNoise immu

Want high gain

Want low gain

Mid freqSpeed, BW

Want sufficientPhase margin

Use low pass filters

Use PI or lag control

Use lead or PD control

PM+Mp=70

Mr, Mp

Page 2: Desired Bode plot shape

Overall Loop shaping strategy• Determine mid freq requirements

– Speed/bandwidth gc

– Overshoot/resonance PMd

• Use PD or lead to achieve PMd@ gc

• Use overall gain K to enforce gc

• PI or lag to improve steady state tracking– Use PI if type increase neede – Use lag if ess needs to be reduced

• Use low pass filter to reduce high freq gain

Page 3: Desired Bode plot shape

Proportional controller design• Obtain open loop Bode plot

• Convert design specs into Bode plot req.

• Select KP based on requirements:

– For improving ess: KP = Kp,v,a,des / Kp,v,a,act

– For fixing Mp: select gcd to be the freq at which PM is sufficient, and KP = 1/|G(jgcd)|

– For fixing speed: from td, tr, tp, or ts requirement, find out n, let gcd = (0.65~0.8)*n and KP = 1/|G(jgcd)|

Page 4: Desired Bode plot shape

gcd

gcd

gcd

gcd

gcd

gcd

From specs, find and

( )

a few degrees

tan( ) /

1/ (1 ) ( )

; ( )

( ) ( ) ( ) / 1 ( ) ( )

Perform c.l. step response, tune C

d

D

P D s j

D D P P D

cl

PM

PM angle G j

PM PMd PM

T PM

K T s G s

K T K C s K K s

G s C s G s C s G s

(s) as needed

PD control design

Page 5: Desired Bode plot shape

PD control design Variation

• Restricted to using KP = 1

• Meet Mp requirement

• Find gc and PM

• Find PMd

• Let = PMd – PM + (a few degrees)

• Compute TD = tan()/wgcd

• KP = 1; KD=KPTD

Page 6: Desired Bode plot shape

Lead Design • From specs => PMd and gcd

• From plant, draw Bode plot

• Find PMhave = 180 + angle(G(jgcd)

• PM = PMd - PMhave + a few degrees

• Choose =plead/zlead so that max =PM and it happens at gcd

1

gcdgcdgcd

gcdgcd

max

max

)/()()(

*,/

sin1

sin1

leadlead

leadlead

pjjGzjK

pz

Page 7: Desired Bode plot shape

Alternative use of lead1.Select K so that KG(s) meet ess req.

2.Find wgc and PM, also find PMd

3.Determine phi_max, and alpha

4.Place phi_max a little higher than wgc

maxgc gc

max

1 sin/ , *

1 sin

( )

lead lead

lead lead lead

lead lead lead

z p

p s z s zC s K K

z s p s p

0.25 0.75gc gc/ ,Or: *lead leadz p

Page 8: Desired Bode plot shape

Lag and lead-lag Design Steps• From plant, draw Bode plot

• From specs => PMd and gcd

– If there is speed or BW req, gcd, • In this case, if PM not enough, design PD or lead

– Otherwise, choose gcd to have PM>PMd

• Find K to enforce gcd:

• Find Kp,v,a-have with K and C above

• Find Kp,v,a-des from ess specs

• zlag/plag = Kp,v,a-des/Kp,v,a-have

• Let zlag= gcd/5~20, depending on PM room

• Compute plag

lead

lead

s zC

s p

1C

1

gcd )(

jCGK

Page 9: Desired Bode plot shape

Basic PI Design Steps• From plant, draw Bode plot

• From specs => PMd and gcd

– If there is speed or BW req, gcd, • In this case, if PM not enough, design PD or lead

– Otherwise, choose gcd to have PM>PMd

• Find K to enforce gcd:

• Let KP = K

• And KI = Kgcd/5~20, depending on extra PM room to spare

1

gcd( )K CG j

Need to increase type to make a nonzero ess to be zero. But no requirement on ess after type increase.

Page 10: Desired Bode plot shape

PI Design with ess specs• From plant, draw Bode plot

• From specs => Kv,a-des, PMd and gcd

– For required ess, Kv,a-des =1/ess

– With C(s)=1/s, compute Kv,a-have

– If there is speed or BW req, gcd, • In this case, if PM not enough, design PD or lead

– Otherwise, choose gcd to have PM>PMd

• Find K to enforce gcd:

• Let KP = K, KIdes= Kv,a-des/Kv,a-have

– If KIdes <= Kgcd/5~20, done, let KI = KIdes

– Else, increase gcd and go back to previous step

1

gcd )(

jCGK

Need to increase type by 1 to make a nonzero ess to be zero, and after type increase, there is further requirement on ess.

Page 11: Desired Bode plot shape

PI Design with PD Design Steps• From required ess, Kv,a-des =1/ess

• With C(s)=1/s, compute Kv,a-have

• Let KI = Kv,a-des/Kv,a-have

• Multiply G(s) by KI/s

• Do a PD design for KIG(s)/s, with DC gain=1:– Find gc and PM

– Find PMd

– Let = PMd – PM + (a few degrees)

– Compute TD = tan()/wgcd

• KP = KI*TD

Page 12: Desired Bode plot shape

Alternative PI Design Steps• For required ess, Kv,a-des =1/ess

• With C(s)=1/s, compute Kv,a-have

• Let KI = Kv,a-des/Kv,a-have

• Rewrite char eq: (KP + KI/s)G(s) + 1=0• KP*n/d + KI*n/d/s +1 = 0• KP *n*s + KI*n+d*s =0, KP*n*s/(KI*n+d*s) + 1 =0• So do a KP design for n*s/(KI*n+d*s), with KI above

– Draw Bode plot for n*s/(KI*n+d*s)– Select max PM frequency– Compute KP to make that frequency wgc

Page 13: Desired Bode plot shape

C(s) Gp(s)

Two d.o.f. Control design

C1(s) Gp(s)

C2(s)

C1(s) = C(s) – C2(s)

rd

e y++

+

_ _

Page 14: Desired Bode plot shape

• Loop transfer function is still C(s)Gp(s)

• TF from d to y: Gp(s)/(1+C(s)Gp(s))

• TF from r to y: C1(s)Gp(s)/(1+C1(s)Gp(s) +C2(s)Gp(s))=C1(s)Gp(s)/(1+C(s)Gp(s))

– Design C(s) to achieve desired loop shape– Split C(s) into C1 and C2– Dual loop implementation to individually

control disturbance TF and reference TF

Page 15: Desired Bode plot shape

Dual loop control to increase type• Recall: type with respect to r = #integrators

in TF from e to where r enters– This = #integrator in C1 + #integrator in inner loop– Therefore, choose C2 so that #integrators in inner

loop is more than #integrators in Gp(s)

• Overall loop TF not affected• Input/output TF Poles not affected• Input/output TF Zeros affected• Steady state tracking improved

Page 16: Desired Bode plot shape

• Inner loop TF

• Not easy to see in this general form

• But simply pick C2 to cancel one or two lowest order terms in Gp

• See example

2 2

( ) ( )

1 ( ) ( ) ( ) ( ) ( )p p

p p p

G s n s

C s G s d s C s n s

Page 17: Desired Bode plot shape

C2(s)

y

_

1

( 2)s s

-2

y

_

1

2s1

s

C2 = -2s

1

s

2

1

s

22 2( ) ( ) ( ) ( 2) ( )

set

p pd s C s n s s s C s s

Implement as:

Page 18: Desired Bode plot shape

Example• Design problem from text book

• But our solution is much more meaningful and much easier– Plant TF Gp(s) = 10/s(s+1)– Specs:

• Mp <19%, but >2%• Ts <1 sec• Ess to step, ramp, acc all = 0

Page 19: Desired Bode plot shape

s=tf('s');Gp=10/s/(s+1);figure; margin(Gp); grid;ts = 1; %specificationt=linspace(0,3*ts,301);Gcl=Gp/(1+Gp); figure; step(Gcl,t); grid;%specification for Mp is 2% to 19%%can use the mid point as initial targetMp=10;zeta=0.6; %for Mp=10%sigma=4/ts; %no tolerance band is given, so use 2%wn=sigma/zeta;wgcd=0.7*wn;Gwgc = evalfr(Gp, j*wgcd);PM=angle(Gwgc)/pi*180 + 180;

Page 20: Desired Bode plot shape

PMd = 70 - Mp + 10; %add 10 deg because we need PI laterDPM = PMd - PM; %phase margin deficiencyz_PD = wgcd /tan(DPM*pi/180); %PD controlK = 1/abs(evalfr((s+z_PD)*Gp,j*wgcd));C=K*(s+z_PD);figure; margin(C*Gp); grid; %Bode with PDfigure; step(C*Gp/(1+C*Gp),t); grid;%now add PI, place zero of PI at wgcd/10%Mp target of 10% together with 10 deg extra PMd%can tolerate a little more phase delay from PI.z_PI = wgcd/10;C=C*(s+z_PI)/s; %multiply PI and PDfigure; margin(C*Gp); grid;figure; step(C*Gp/(1+C*Gp),t); grid;

Page 21: Desired Bode plot shape

-100

-50

0

50

100

Mag

nit

ud

e (d

B)

10-2

10-1

100

101

102

-180

-135

-90

Ph

ase

(deg

)Bode Diagram

Gm = Inf dB (at Inf rad/sec) , Pm = 18 deg (at 3.08 rad/sec)

Frequency (rad/sec)

Plant Bode plot

Page 22: Desired Bode plot shape

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8Step Response

Time (sec)

Am

plit

ud

e

Original step response

Page 23: Desired Bode plot shape

-40

-20

0

20

40

60

80M

agn

itu

de

(dB

)

10-2

10-1

100

101

102

-120

-110

-100

-90

Ph

ase

(deg

)Bode Diagram

Gm = Inf , Pm = 70 deg (at 4.67 rad/sec)

Frequency (rad/sec)

Bode plot after PD

Page 24: Desired Bode plot shape

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4Step Response

Time (sec)

Am

plit

ud

e

Step response with initial PD

Page 25: Desired Bode plot shape

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4Step Response

Time (sec)

Am

plit

ud

e

Step response after PD

Ts is two large, need to increase wgc by 1.5X

Page 26: Desired Bode plot shape

-50

0

50

100M

agn

itu

de

(dB

)

10-2

10-1

100

101

102

-180

-135

-90

Ph

ase

(deg

)Bode Diagram

Gm = -Inf dB (at 0 rad/sec) , Pm = 64.4 deg (at 4.69 rad/sec)

Frequency (rad/sec)

Page 27: Desired Bode plot shape

wgc=0.7*wn*1.6;

z_PI = wgc/20;

Page 28: Desired Bode plot shape

-40

-20

0

20

40

60

80M

agn

itu

de

(dB

)

10-2

10-1

100

101

102

-130

-120

-110

-100

-90

Ph

ase

(deg

)Bode Diagram

Gm = Inf , Pm = 70 deg (at 7.47 rad/sec)

Frequency (rad/sec)

Wgc increased from 4.47 to 7.47

After PD

Page 29: Desired Bode plot shape

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4Step Response

Time (sec)

Am

plit

ud

e

Ts is now about right

After PD

Page 30: Desired Bode plot shape

-50

0

50

100M

agn

itu

de

(dB

)

10-2

10-1

100

101

102

-180

-135

-90

Ph

ase

(deg

)

Bode DiagramGm = -Inf dB (at 0 rad/sec) , Pm = 67.2 deg (at 7.47 rad/sec)

Frequency (rad/sec)

After PID

Page 31: Desired Bode plot shape

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4Step Response

Time (sec)

Am

plit

ud

e

After PID

Ts is OKMp is OK

Page 32: Desired Bode plot shape

-0.1

y

_

10

1s1

s_PI

PD+0.1s

C2(s) = -0.1s

Page 33: Desired Bode plot shape

-0.1

y

_

10

1s1

s_

PI*PD+0.1s

Page 34: Desired Bode plot shape

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4

System: untitled1Time (seconds): 0.4Amplitude: 1.22

Step Response

Time (seconds)

Am

plit

ud

e

The 2 DOF implementation caused 5% additional overshoot.

Increase PMd by 7 to target 15% Mp

Page 35: Desired Bode plot shape

… …Mp=10; zeta=0.6; %for Mp=10%sigma=4/ts; %no tolerance band is given, so use 2%wn=sigma/zeta;wgcd=0.7*wn*1.6;Gwgc = evalfr(Gp, j*wgcd);PM=angle(Gwgc)/pi*180 + 180;PMd = 70 - Mp + 17; %add 10 deg because we need PI laterDPM = PMd - PM; %phase margin deficiencyz_PD = wgcd /tan(DPM*pi/180); %PD controlK = 1/abs(evalfr((s+z_PD)*Gp,j*wgcd));C=K*(s+z_PD);… ….z_PI = wgcd/20;C=C*(s+z_PI)/s; %multiply PI and PDfigure; margin(C*Gp); grid;figure; step(C*Gp/(1+C*Gp),t); grid;figure; step((C+0.1*s)*Gp/(1+C*Gp),t); grid;

Page 36: Desired Bode plot shape

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4

System: untitled1Time (seconds): 0.43Amplitude: 1.18

Step Response

Time (seconds)

Am

plit

ud

e