Top Banner
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
41

Desired Bode plot shape 0 -90 -180 0dB gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

Dec 17, 2015

Download

Documents

Ashley Young
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

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 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

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 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

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 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

2

1

( ) (1 )

( ) (1 )

Gain: 20 log(| ( ) |) 20 log( )

20 log( 1

Phase: ( ) (1 ) tan ( )

DP D P

P

DP D P

P

P

D

P

D D

P P

KC s K K s K s

K

KC j K K j K j

K

C j K

K

K

K KC j j

K K

PD Controller

Page 5: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

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 6: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

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 7: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

lead

lead

ps

zsKsC

)(

Lead Controller Design

00 Kzp leadlead

lead

lead

pj

zjKjC

)(

0)(tan)(tan

)()()(

11

leadlead

leadlead

pz

pjzjjC

Page 8: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

101520253035404550

Mag

nit

ud

e (d

B)

10-2

10-1

100

101

102

103

0

30

60

90

Ph

ase

(deg

)Bode Diagram

Frequency (rad/sec)

zlead

plead

leadlead zp

20log(Kzlead/plead)lead

leadz

p

)(tan)(tan 11max lea d

lea d

lea d

lea d

pz

zp

Goal: select z and p so that max phase lead is at desired wgc and max phase lead = PM defficiency!

max

max

1 sinLet

1 sin

gcd gcd/ , *lead leadz p

Page 9: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 10: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

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 11: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

Lead design example• Plant transfer function is given by:

• n=[50000]; d=[1 60 500 0];

• Desired design specifications are:– Step response overshoot <= 16%– Closed-loop system BW>=20;

Page 12: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

n=[50000]; d=[1 60 500 0]; G=tf(n,d);figure(1); margin(G); Mp_d = 16/100; PMd = 70 – Mp_d ;BW_d=20;w_gcd = BW_d*0.7; Gwgc=evalfr(G, j*w_gcd);PM = pi+angle(Gwgc);phimax= PMd*pi/180-PM;alpha=(1+sin(phimax))/(1-sin(phimax));zlead= w_gcd/sqrt(alpha);plead=w_gcd*sqrt(alpha);K=sqrt(alpha)/abs(Gwgc);ngc = conv(n, K*[1 zlead]);dgc = conv(d, [1 plead]);figure(1); hold on; margin(ngc,dgc); hold off;[ncl,dcl]=feedback(ngc,dgc,1,1);figure(2); step(ncl,dcl);

Page 13: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

-100

-50

0

50M

agn

itu

de

(dB

)

10-1

100

101

102

103

-270

-225

-180

-135

-90

Ph

ase

(deg

)

Bode DiagramGm = 13.8 dB (at 38.3 rad/sec) , Pm = 53 deg (at 14 rad/sec)

Frequency (rad/sec)

Before designAfter design

Page 14: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

-150

-100

-50

0

50M

agn

itu

de

(dB

)

10-1

100

101

102

103

104

-270

-180

-90

0

Ph

ase

(deg

)

Bode DiagramGm = 8.8 dB (at 38.3 rad/sec) , Pm = 40.6 deg (at 25.2 rad/sec)

Frequency (rad/sec)

Closed-loop Bode plot by:

Magnitude plot shifted up 3dBSo, gc is BW

margin(ncl*1.414,dcl);

Page 15: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

0 0.1 0.2 0.3 0.4 0.5 0.6 0.70

0.2

0.4

0.6

0.8

1

1.2

1.4Step Response

Time (sec)

Am

plit

ud

e

Page 16: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

Alternative use of lead• Use Lead and Proportional together

– To fix overshoot and ess– No speed requirement

1.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

Page 17: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

Alternative lead design example• Plant transfer function is given by:

• n=[50]; d=[1/50 1 0];

• Desired design specifications are:– Step response overshoot <= 20%– Steady state tracking error for ramp input <=

1/200;

– No speed requirements– No settling concern– No bandwidth requirement

Page 18: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

n=[50]; d=[1/5 1 0];figure(1); clf; margin(n,d); grid; hold on;Mp = 20;PMd = 70 – Mp + 7;ess2ramp= 1/200; Kvd=1/ess2ramp;Kva = n(end)/d(end-1); Kzp = Kvd/Kva;figure(2); margin(Kzp*n,d); grid;[GM,PM,wpc,wgc]=margin(Kzp*n,d);w_gcd=wgc; phimax = (PMd-PM)*pi/180;alpha=(1+sin(phimax))/(1-sin(phimax));z=w_gcd/alpha^.25; %sqrt(alpha); %phimax located higherp=w_gcd*alpha^.75; %sqrt(alpha); %than wgcngc = conv(n, alpha*Kzp*[1 z]); dgc = conv(d, [1 p]);figure(3); margin(tf(ngc,dgc)); grid;[ncl,dcl]=feedback(ngc,dgc,1,1);figure(4); step(ncl,dcl); grid;figure(5); margin(ncl*1.414,dcl); grid;

Page 19: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

-40

-20

0

20

40

60M

agn

itu

de

(dB

)

10-1

100

101

102

-180

-135

-90

Ph

ase

(deg

)

Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 18 deg (at 15.4 rad/sec)

Frequency (rad/sec)

Page 20: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

-20

0

20

40

60M

agn

itu

de

(dB

)

10-1

100

101

102

-180

-150

-120

-90

Ph

ase

(deg

)

Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 9.04 deg (at 31.4 rad/sec)

Frequency (rad/sec)

Page 21: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

-50

0

50

Mag

nit

ud

e (d

B)

10-1

100

101

102

103

104

-180

-150

-120

-90

Ph

ase

(deg

)

Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 52.3 deg (at 50.1 rad/sec)

Frequency (rad/sec)

Page 22: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.160

0.2

0.4

0.6

0.8

1

1.2

1.4Step Response

Time (sec)

Am

plit

ud

e

Page 23: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

-80

-60

-40

-20

0

20M

agn

itu

de

(dB

)

100

101

102

103

104

-180

-135

-90

-45

0

Ph

ase

(deg

)

Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 77.5 deg (at 82.2 rad/sec)

Frequency (rad/sec)

Page 24: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

-100

-50

0

50

Mag

nit

ud

e (d

B)

10-1

100

101

102

103

104

-180

-135

-90

Ph

ase

(deg

)

Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 52.3 deg (at 50.1 rad/sec)

Frequency (rad/sec)

Page 25: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

Lead design tuning example

C(s) G(s)

2

1( )

( 5)G s

s s

Design specifications: rise time <=2 secovershoot <16%

Page 26: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 27: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 28: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 29: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 30: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 31: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 32: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 33: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 34: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 35: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 36: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 37: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near
Page 38: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

4. Go back and take wgcd = 0.6*wn so that tr is not too small

Desired tr < 2 secWe had tr = 1.14 in the previous 4 designs

Page 39: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

n=[1]; d=[1 5 0 0]; G=tf(n,d);Mp_d = 16; %in percentagePMd = 70 - Mp_d + 4; %use Mp + PM =70tr_d = 2; wnd = 1.8/tr_d; w_gcd = 0.6*wnd;Gwgc=evalfr(G, j*w_gcd);PM = pi+angle(Gwgc);phimax= PMd*pi/180-PM;alpha=(1+sin(phimax))/(1-sin(phimax));zlead= w_gcd/sqrt(alpha);plead=w_gcd*sqrt(alpha);K=sqrt(alpha)/abs(Gwgc);ngc = conv(n, K*[1 zlead]);dgc = conv(d, [1 plead]);[ncl,dcl]=feedback(ngc,dgc,1,1);stepchar(ncl,dcl); gridfigure(2); margin(G); hold on; margin(ngc,dgc); hold off; grid

Page 40: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

-200

-100

0

100

200M

ag

nit

ud

e (

dB

)

10-3

10-2

10-1

100

101

102

103

-270

-225

-180

-135

-90

Ph

ase (

deg

)Bode Diagram

Gm = 22.3 dB (at 3.45 rad/sec) , Pm = 60 deg (at 0.54 rad/sec)

Frequency (rad/sec)

Page 41: Desired Bode plot shape 0 -90 -180 0dB  gc High low freq gain for steady state tracking Low high freq gain for noise attenuation Sufficient PM near

0 5 10 15 20 25 30 350

0.2

0.4

0.6

0.8

1

1.2

1.4

Time (sec)

Am

pli

tud

eUnit Step Response

ts=20.9 tp=5.85

Mp=16.5%ess tolerance band: +-2%

td=1.56

tr=1.95

yss=1

ess=0