Presentation is loading. Please wait.

Presentation is loading. Please wait.

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 

Similar presentations


Presentation on theme: "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 "— Presentation transcript:

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  gc for stability   Low freq High freq Want high gain Want low gain Mid freq Want sufficient Phase margin Use low pass filters Use PI or lag control Use lead or PD control BW, t d, t r, t p, t s PM=70-Mp To meet type and e ss requirement

2 Overall Loop shaping strategy PD or lead to add more PM @  gcd –Both PD and lead has positive phase Overall gain K to enforce  gcd –By shifting gain plot up and down PI or lag to increase low freq gain –But both has negative phase, –Place PI or lag at low enough freq (z < 10  gcd ) Low pass filter to reduce high freq gain –For noise attenuation, but negative phase –Place LPF at high enough freq (p > 10  gcd )

3 Proportional controller design Obtain open loop Bode plot Convert design specs into Bode plot req. Select K P based on requirements: –For improving ess: K P = K p,v,a,des / K p,v,a,act –For fixing Mp: select  gcd to be the freq at which PM is sufficient, and K P = 1/|G(j  gcd )| –For fixing speed: from td, tr, tp, or ts requirement, find out  n, let  gcd = (0.65~0.8)*  n and K P = 1/|G(j  gcd )|

4 PD control design

5 PD control design Variation Restricted to using K P = 1 Meet M p requirement Find  gc and PM Find PM d Let  = PMd – PM + (a few degrees) Compute T D = tan(  )/w gcd K P = 1; K D =K P T D

6 Lead Design From specs => PM d and  gcd From plant, draw Bode plot Find PM have = 180 + angle(G(j  gcd ))  PM = PM d - PM have + a few degrees Choose  =p lead /z lead so that  max =  PM and it happens at  gcd

7 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 from KG(s), find PMd from specs 3.Let phi_max = PMd – PM +5~7, find alpha 4.Place phi_max a little higher than wgc

8 Lag and lead-lag Design Steps From plant, draw Bode plot From specs => PM d 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 (finite, nonzero) K p,v,a-have with K and C above Find K p,v,a-des from ess specs z lag /p lag = K p,v,a-des /K p,v,a-have Let z lag =  gcd /10~20, depending on PM room Compute p lag

9 Basic PI Design Steps From plant, draw Bode plot From specs => PM d 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 K P = K And K I = K  gcd /10~20, depending on extra PM room to spare Need to increase type to make a nonzero ess to be zero. But no requirement on ess after type increase.

10 PI Design with ess specs From plant, draw Bode plot From specs => K v,a-des, PM d and  gcd –For required ess, K v,a-des =1/ess –With C(s)=1/s, compute K v,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 K P = K, KI des = K v,a-des /K v,a-have –If KI des <= K  gcd /5~20, done, let K I = KI des –Else, increase  gcd and go back to previous step Need to increase type by 1 to make a nonzero ess to be zero, and after type increase, there is further requirement on ess.

11 Want Mp <= 16% Steady state error <= 0.1 for ramp input. Analysis: steady state error <= 0.1 for ramp implies that the system type must be 1 or higher. Original system is type 0, so need PI control. Ess to ramp = 10. Previous design leaves Kv = KI*500/5 = 100KI = 4.44 Example KI=0.0444

12

13 ess>0.1

14 In the previous design, KI=0.0444 is already at the maximum of the range K  gcd /5~20, But KIdes = 0.1, which is a factor of 10/4.22 larger. So need to increase KP. Hence, try letting KI = KIdes = 0.1, and make KP larger by 10/4.22.

15 KP = KP*0.1/KI; KI =0.1; ngc = conv(n, [KP KI]); dgc = conv(d, [1 0]); figure(1); margin(ngc,dgc); grid; [ncl,dcl]=feedback(ngc,dgc,1,1); figure(2);step(ncl,dcl); grid; figure(3); step(ncl,[dcl 0]); grid; Ramp response Old KI, new KI

16

17 ess = 0.1

18 Can play with KP, but difficult to achieve the best KP

19 PI Design with PD Design Steps From required ess, K v,a-des =1/ess With C(s)=1/s, compute K v,a-have Let KI = K v,a-des /K v,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 PM d –Let  = PMd – PM + (a few degrees) –Compute T D = tan(  )/w gcd K P = KI*T D

20 %Alternative PI control by PD design clear all; n=[0 0 500]; d=[1 6 5]; ess2ramp = 0.1; Kvd = 1/ess2ramp; Kva = n(end)/d(end); %after introducing 1/s KI = Kvd/Kva; %multiplying G(s) by KI/s and get new Bode ni=KI*n; di=[d 0]; figure(1); clf; margin(ni,di); hold on; grid; [GM,PM,wpc,wgc]=margin(ni,di); PMd=54+6; phi = (PMd-PM)*pi/180; Td = tan(phi)/wgc; KP=KI*Td; ngc = conv(n, [KP KI]); dgc=di; figure(1); margin(n,d); margin(ngc,dgc); [ncl,dcl]=feedback(ngc,dgc,1,1); figure(3);step(ncl,dcl); grid;

21

22

23 clear all; n=[0 0 500]; d=[1 6 5]; ess2ramp = 0.1; Kvd = 1/ess2ramp; Kva = n(end)/d(end); %after introducing 1/s KI = Kvd/Kva; %multiplying G(s) by KI/s and get new Bode ni=KI*n; di=[d 0]; figure(1); clf; margin(ni,di); hold on; grid; [GM,PM,wpc,wgc]=margin(ni,di); PMd=50+3; phi = (PMd-PM)*pi/180; Td = tan(phi)/wgc; KP=KI*Td; ngc = conv(n, [KP KI]); dgc=di; figure(1); margin(n,d); margin(ngc,dgc); [ncl,dcl]=feedback(ngc,dgc,1,1); figure(3);step(ncl,dcl); grid;

24

25

26 Alternative PI Design Steps For required ess, K v,a-des =1/ess With C(s)=1/s, compute K v,a-have Let KI = K v,a-des /K v,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

27 %Alternative PI control example clear all; n=[0 0 500]; d=[1 6 5]; %note same length ess2ramp = 0.1; Kvd = 1/ess2ramp; Kva = n(end)/d(end); %after introducing 1/s KI = Kvd/Kva; %get TF after closing the G(s) and KI/s loop ni=[n 0]; di=[d 0]+KI*[0 n]; figure(1); clf; margin(ni,di); grid; x=ginput(1); w_gcd = x(1); %get desired w_gc KP = 1/abs(polyval(ni,j*w_gcd)/polyval(di,j*w_gcd)); ngc = conv(n, [KP KI]); dgc = conv(d, [1 0]); figure(2); margin(n,d); hold on; margin(ngc,dgc); [ncl,dcl]=feedback(ngc,dgc,1,1); figure(3);step(ncl,dcl); grid;

28 Pick wgc here

29

30

31

32

33

34

35

36 Numerical sweep of KP indicates that ~30% Mp is about the best one can achieve. We conclude that it is impossible to meet the specifications with a PI controller. Both of our design procedures came very close to the best achievable. Of course, we can fix the excessive overshoot with an additional lead design.

37 Want Mp <= 16% Steady state error <= 0.1 for ramp input. Overall design: 1.Ess2ramp <=0.1,  PI with KI=1/0.1*5/500=0.1 2.Close the I-loop and select KP for best PM shape,  KP = 0.084 3.Use a lead controller with DC gain = 1 to reduce Mp from 30% to <= 16%

38 clear all; n=[0 0 500]; d=[1 6 5]; ess2ramp = 0.1; Kvd = 1/ess2ramp; Kva = n(end)/d(end); %after introducing 1/s KI = Kvd/Kva; %get TF after closing the G(s) and KI/s loop ni=[n 0]; di=[d 0]+KI*[0 n]; figure(1); clf; margin(ni,di); grid; x=ginput(1); w_gcd = x(1); %get desired w_gc KP = 1/abs(polyval(ni,j*w_gcd)/polyval(di,j*w_gcd)); ngc = conv(n, [KP KI]); dgc = conv(d, [1 0]); figure(2); margin(n,d); hold on; margin(ngc,dgc); [ncl,dcl]=feedback(ngc,dgc,1,1); figure(3);step(ncl,dcl); grid;

39 %follow with a lead controller with DC gain =1 %to make Mp=30% ==> Mp<=16% [GM,PM,wpc,wgc]=margin(ngc,dgc); w_gcd=wgc; PMd=54+6; phimax = (PMd-PM)*pi/180; alpha=(1+sin(phimax))/(1-sin(phimax)); zlead=w_gcd/alpha^.25; plead=w_gcd*alpha^.75; ngcc = conv(ngc, alpha*[1 zlead]); dgcc = conv(dgc, [1 plead]); figure(2); margin(ngcc,dgcc); grid; [ncl,dcl]=feedback(ngcc,dgcc,1,1); figure(5);step(ncl,dcl); grid; figure(6);step(ncl,[dcl 0]); grid; %ramp response

40 Original system After PI alone With PI and lead

41 Mp <= 16% is met.

42

43 Ess=0.1 y=t


Download ppt "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 "

Similar presentations


Ads by Google