Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs...

46
Proportional control design 1. Draw R.L. for given plant 2. Draw desired region for poles from specs 3. Pick a point on R.L. and in desired region Use ginput to get point and convert to complex # 4. Compute 5. Obtain closed-loop TF 6. Obtain step response and compute specs 7. Decide if modification is needed 0 1 s d s n K D P G s G K 1 1 nump=…; denp= …; sysp=tf(nump, denp); rlocus(sysp); use your program from several weeks ago to do all these syscl = feedback(sysc*sysp,1); Gpd=evalfr(sysp,pd); K=1/Gpd; sysc = K; [x,y]=ginput(1); pd=x+j*y;

Transcript of Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs...

Page 1: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Proportional control design

1. Draw R.L. for given plant

2. Draw desired region for poles from specs

3. Pick a point on R.L. and in desired region• Use ginput to get point and convert to complex #

4. Compute

5. Obtain closed-loop TF

6. Obtain step response and compute specs

7. Decide if modification is needed

01sd

snK

DPGsGK

11

nump=…; denp= …; sysp=tf(nump, denp); rlocus(sysp);

use your program from several weeks ago to do all these

syscl = feedback(sysc*sysp,1);

Gpd=evalfr(sysp,pd);K=1/Gpd;sysc = K;

[x,y]=ginput(1); pd=x+j*y;

Page 2: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Design steps:

1. From specs, draw desired region for pole.Pick from region, not on RL

2. Compute

3. Select

4. Select:

dd jp dpG dd pGzpz s.t.

dd pGz tan i.e.

DP

ddD

KzKpGzp

K1

Gpd=evalfr(sysp,pd)phi=pi - angle(Gpd)

z=abs(real(pd))+abs(imag(pd)/tan(phi));

Kd=1/abs(pd+z)/abs(Gpd);Kp=z*Kd;

PD controller design

[x,y]=ginput(1); pd=x+j*y;

Page 3: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Lead Control:

1. Draw R.L. for G2. From specs draw region for desired c.l.

poles3. Select pd from region

4. LetPick –z somewhere below pd on –Re axisLetSelect

dd jp

dpG

121 ,zpd 2 s.t. ppp d 2tan i.e. dp

• Approximation to PD• Same usefulness as PD

0

zpps

zsKsC

dd

d

dpdp

zdp pGzp

pp

pGK

1Let

ps

zsKsC

:is controllerYour

[x,y]=ginput(1); z=abs(x);phi1=angle(pd+z); phi2=phi1-phi;

[x,y]=ginput(1); pd=x+j*y;

Gpd=evalfr(sysp,pd)phi=pi - angle(Gpd)

p=abs(real(pd))+abs(imag(pd)/tan(phi2));

K=abs((pd+p)/(pd+z)/Gpd);

sysc=tf(K*[1 z],[1 p]);Hold on;rlocus(sysc*sysp);

Page 4: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Alternative Lead Control1. Draw R.L. for G2. From specs draw region for desired c.l.

poles3. Select pd from region

4. Let

Select

dd jp

)(),( dpd ppGd

2222 21

dd pp

21 tan;tan dd pz

dd

d

dpdp

zdp pGzp

pp

pGK

1

ps

zsKsC

:is controllerYour

phipd=angle(pd);phi1=(phipd+phi)/2; phi2=phi1-phi;

Page 5: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Lag Design steps

1. Draw R.L. for G(s).

2. From specs, draw desired pole region

3. Select pd on R.L. & in region

4. Get

5. With that K, compute error constant(Kpa, Kva, Kaa) from KG(s)

6. From specs, compute Kpd, Kvd, Kad

dpGK

1

Kdes = 1/ess; sysol = sysc*sysp;[nol, dol]=tfdata(sysol,'v');dn0=dol(dol~=0); Kact=nol(end)/dn0(end);

P

Page 6: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

7. If Kact > Kdes , done

else: pick

8. Re-compute

9. Closed-loop simulation & tuning as necessary

20~5

Re dpz

act

des

Kp z

K

1

p zddp pd

KG p

z=-real(pd)/…;

p=z*Kact/Kdes/(1+…);

0.05 or 0.1

K from 8 should be ~1, so 8 is normally skipped.

Page 7: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

First PI design (a special Lag design):

1. Draw R.L. for G(s)

2. From specs, draw desired region

3. Pick pd on R.L. & in region

4. i. Choose

ii. Choose

5.

6. Simulate & tune

20~5

Re dpz

sGs

zssz

0slim s.t. tsrequiremen meets sse

PI

pss

zsP KzKsG

K

d

,

1

PI Design steps

Page 8: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Alternative PI design• Since PI = PD/s,

• Can first multiply system by 1/s

• Then design using PD

• The overall controller is the controller you designed divided by s

Page 9: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Overall controller design

1. Draw R.L. for G(s), hold graph

2. Draw desired region for closed-loop poles based on desired specs

3. If R.L. goes through region, pick pd on R.L. and in region. Go to step 7.

C(s) Gp(s)R(s) E(s) Y(s)U(s)

Page 10: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

4. Pick pd in region (near corner but inside region for safety margin)

5. Compute angle deficiency:

6. a. PD control, choose zpd such that

then

dpG

pdd zp

pdzssC

Page 11: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

6. b. Lead control: choose zlead, plead such that

You can select zlead & compute plead. Or you can use the “bisection” method to compute z and p.

Then

leadd

leadd

pp

zp

lead

lead

ps

zssC

If < 60~70 deg, a single stage of PD or lead will work.If > 80~90 deg, use a two-lead or PD-lead controller.

Page 12: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

7. Compute overall gain:

8. If there is no steady-state error requirement, go to 14.

9. With K from 7, evaluate error constant that you already have:

dps

sGsCK

1

0

lim Na

sK s KC s G s

avp ,,

2,1,0

Page 13: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

The 0, 1, 2 should match p, v, a

This is for lag control.

For PI:

s

zssGsCKsK pi

sa

*lim0

control. PI theis wheres

zs pi

Page 14: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

10.Compute desired error const. from specs:

11.For PI : set K*a = K*d & solve for zpi

For lag : pick zlag & let

advdpdss KKKe

1or ,

1or

1

1

d

alaglag K

Kzp

lag

lagpi

ps

zs

s

zssC

or

Page 15: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

12.Re-compute K (this step may be unnecessary)

13. 14.Get closed-loop T.F. Do step

response analysis.15.If not satisfactory, go back to 3

and redesign.

dps

sGsCsCK

1

sCsCKsC

Page 16: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

If we have both PI and PD we have PID control:

s

zszsK

s

KsKKsC

pipd

IDP

)(

KKD :where

pipdP zzKK

pipdI zKzK

Page 17: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

If we have both Lead and Lag, we have lead-lag control:

lag

lag

lead

lead

ps

zs

ps

zsKsC

lead lead

lag lag

lead lead lag lag

where: z 0

p 0

z p

p

z

p z

Page 18: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Control System Implementation

C(s) Gp(s)R(s) E(s) Y(s)U(s)

Controller Actuator

ReferenceCommand error

outputcontrol

Plant

Sensor

disturbanceinput

noise

+ _ plantinput

Page 19: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

PC-in-the-loop Control

PowerAmp

Actuator

ReferenceCommand output

Plant

Sensor

disturbanceinput

A/D

D/APC

I/OI/O

All control algorithms implemented in PC (could be Matlab Real-Time)

Needs data acquisition system, including A/D and D/A

Needs power amplifier

Signal conditioner

and amplifier

Page 20: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

-Controller based control

PowerAmp

Actuator

ReferenceCommand output

Plant

Sensor

disturbanceinput

-Controller I/O

I/O

Very similar architecture to PC-in-the-loop control

All control algorithms implemented in -controller

-controller has its own A/D and D/A, but make sure resolution is OK

Still needs power amplifier, because -controller outputs weak signal

Signal conditioner

and amplifier

Page 21: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Power electronic based control

Op Ampcircuit

Actuator

ReferenceCommand

outputPlant

Sensor

disturbanceinput

Differenceamplifier

Analog operation, fastest

Inexpensive

All algorithms in circuit hardware

Op Amp circuits for various controllers are given in book

No sampling and aliasing issues

Page 22: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Difference AmplifierExample circuit:

eR1

R2

R3

R4

+−

r

y

Page 23: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Op-amp controller circuit:

1. Proportional:

eKeRR

RRu P

13

24

13

24

RR

RRKP

−+ −

+

e

R1

R2

R3

R4

u

Page 24: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

2. Integral:

131

4

CRR

RK I

ses

K I sesCRR

Rsu

113

4 1

−+ −

+

e

R1

C1

R3

R4

u

Page 25: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

3. Derivative control:

123

4 CRR

RKD

sseKD sesCRR

Rsu 12

3

4

−+ −

+

e

C1R3

R4

u

R2

Page 26: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

4. PD controller:

123

4

13

24 , CRR

RK

RR

RRK DP

sesKK DP sesCRR

R

R

Rsu 111

1

2

3

4

−+ −

+

e

C1R3

R4

u

R2

R1

Page 27: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

5. PI controller:

213

4

13

24 1,

CRR

RK

RR

RRK IP

ses

KK IP

se

sCR

sCR

R

R

R

Rsu

22

22

1

2

3

4 1

−+ −

+

e

R1

C1

R3

R4

u

R2

Page 28: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

6. PID controller:

213

412

3

4

22

11

13

24 ,,1CRR

RKCR

R

RK

CR

CR

RR

RRK IDP

ses

KsKK I

DP

se

sCR

sCRsCR

R

R

R

Rsu

22

2211

1

2

3

4 11

−+ −

+

e

R1

C2

R3

R4

u

R2

C1

Page 29: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

7. Lead or lag controller:

221123

14 1,

1,

CRp

CRz

CR

CRK

seps

zsKse

sCR

sCR

RR

RRsu

1

1

22

11

13

24 seCRs

CRs

CR

CR

22

11

23

14

1

1

−+ −

+

e

R1R3

R4

u

R2

C1

C2

Page 30: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

If R1C1 > R2C2

then z < pThis is lead controller

If R1C1 < R2C2

then z > pThis is lag controller

Page 31: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

8. Lead-lag controller:

se

sCRR

sCR

sCR

sCRR

RR

RRsu

lag

242

22

lead

11

131

35

46

1

1

1

1

11131 CRCRR 24222 CRRCR

−+ −

+

e

R1

R3

R6

u

R2

C1

C2

R4

R5

Page 32: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

seps

zs

ps

zsK

2

2

1

1

42

2

1

31

35

46

RR

R

R

RR

RR

RRK

lead11

111

1311 CR

pCRR

z

lag11

2422

222 CRR

pCR

z

Page 33: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Example:

Want:

Solution: Draw R.L.

0step to,%5 ssP eM

criticalnot speed

7.0%5 PM

cone 45

C(s) Gp(s)

)3)(1(

1

ssGp

Page 34: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.
Page 35: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Clearly, R.L. pass through desired region.

Pick (right on boundary)

Choose

22 jpd

4.05

Re dpz

4.0z

5.5

1

dpss

zsPsG

K

s

ssC

4.05.5

Page 36: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Step response: ess = 0

No MP (no overshoot)

fast rise to 0.85, then very sluggish to 1

Tune 1: KP ↑ to 2.5 KP

0,%5~4 ssP eM

sluggish but , fast sr tt

3

2,

3

Repick :2 Tune z

pz d

Page 37: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

dpss

zsPsG

K

1

sluggish less

0PM

PP KK 5.1 Now

ssP eM no,%5

fastermuch st

smaller" dip"

Page 38: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

best1

5.1

3

Re

dpss

zsP

d

sGK

pz

PP

d

KK

pz

5.25

Re

dpss

zsP

d

sGK

pz

15

Re

• None unique solution• Design is a creative process guided by science

Page 39: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Example:

Want:

%5PM

sec01.0rt

0.2acc to sse

aircraft2.361

4500

sssG

sec025.0st

C(s) G (s)

Page 40: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Sol: G(s) is type 1Since we want finite ess to unit acc,

we need the compensated systemto be type 2C(s) needs to have in it

s

1

52.0

11lim 2

0s

ss

a esGsCsK

7.0%5 :From PM

45 of cone

Page 41: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

1604

025.0 From s

s tt

18001.0

8.101.0 From nrt

160180 jpd

Page 42: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Draw R.L., it passes through the desired region.

Pick pd on R.L. & in Region

pick pd = – 180 + j160

Now choose z to meet Ka:

180240 dn p

2.361

4500lim 2

0

sss

zsKsK P

sa

5361

4500 zKP

Page 43: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Also:

dpss

zsPsG

K

1

4500

3612

zp

pp

d

dd

dd pzp Re if

134500

361

dd pp

0309.04500

3615

PKz

symmetryby dp

Page 44: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Pick z = 0.03

Do step resp. of closed-loop:

Is it good enough?

s

ssC

03.013

025.00236.0 st%5%84.3 PM

?01.00105.0 rt

2.01911.01

acc to a

ss Ke

Page 45: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

Design goal: 01.0rt025.0st

%5PM

Page 46: Proportional control design 1.Draw R.L. for given plant 2.Draw desired region for poles from specs 3.Pick a point on R.L. and in desired region Use ginput.

If tr = 0.0105 not satisfactorywe need to reduce tr by ≈ 5%

%5by ,1

nn

rt

2,but dPdn pKp

%5by increasetry PK

0232.0st

%49.4 :step Do PM0099.0rt

sse