460 likes | 862 Views
Lead Controller Design. p lead. z lead. 20log(Kz lead /p lead ). Lead Design. From specs => PM d and w gcd From plant, draw Bode plot Find PM have = 180 + angle(G(j w gcd ) D PM = PM d - PM have + a few degrees
E N D
plead zlead 20log(Kzlead/plead)
Lead Design • From specs => PMd and wgcd • From plant, draw Bode plot • Find PMhave = 180 + angle(G(jwgcd) • DPM = PMd - PMhave + a few degrees • Choose a=plead/zlead so that fmax = DPM and it happens at wgcd
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;
n=[50000]; d=[1 60 500 0]; figure(1); margin(n,d); Mp = 16/100; zeta =0.5; PMd = 100*zeta + 3; BW=20; w_gcd = BW*0.7; PM = pi+angle(polyval(n,j*w_gcd)/polyval(d,j*w_gcd)); 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(polyval(n,j*w_gcd)/polyval(d,j*w_gcd))); 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); figure(3); margin(ncl*1.414,dcl);
After design Before design
Closed-loop Bode plot Magnitude plot shifted up 3dB So, gc is BW
n=[50]; d=[1/5 1 0]; figure(1); clf; margin(n,d); grid; hold on; Mp = 20/100; zeta = sqrt((log(Mp))^2/(pi^2+(log(Mp))^2)); PMd = zeta * 100 + 10; 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/sqrt(alpha); p=w_gcd*sqrt(alpha); ngc = 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;
n=[50]; d=[1/5 1 0]; figure(1); clf; margin(n,d); grid; hold on; Mp = 20/100; zeta = sqrt((log(Mp))^2/(pi^2+(log(Mp))^2)); PMd = zeta * 100 + 10; 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); p=w_gcd*alpha^.75; %sqrt(alpha); ngc = 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;
n=[1]; d=[1/5/200 1/5+1/200 1 0]; figure(1); clf; margin(n,d); grid; hold on; zeta = 0.4; PMd = 100*zeta + 3; ess2ramp= 0.01; Kvd=1/ess2ramp; Kva = n(end)/d(end-1); Kzp = Kvd/Kva; figure(1); margin(Kzp*n,d); grid; [GM,PM,wgc,wpc]=margin(Kzp*n,d); w_gcd=wgc; phimax = (PMd-PM)*pi/180; alpha=(1+sin(phimax))/(1-sin(phimax)); z=w_gcd/alpha^.25; %z=w_gcd/sqrt(alpha); p=w_gcd*alpha^.75; %p=w_gcd*sqrt(alpha); ngc = conv(n, alpha*Kzp*[1 z]); dgc = conv(d, [1 p]); figure(1); 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;
n=[1]; d=[1/5/200 1/5+1/200 1 0]; figure(1); clf; margin(n,d); grid; hold on; zeta = 0.4; PMd = 100*zeta + 10; ess2ramp= 0.01; Kvd=1/ess2ramp; Kva = n(end)/d(end-1); Kzp = Kvd/Kva; figure(1); margin(Kzp*n,d); grid; [GM,PM,wgc,wpc]=margin(Kzp*n,d); w_gcd=wgc; phimax = (PMd-PM)*pi/180; alpha=(1+sin(phimax))/(1-sin(phimax)); z=w_gcd/alpha^.25; %z=w_gcd/sqrt(alpha); p=w_gcd*alpha^.75; %p=w_gcd*sqrt(alpha); ngc = conv(n, alpha*Kzp*[1 z]); dgc = conv(d, [1 p]); figure(1); 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;