Upload
nchubccl
View
236
Download
0
Embed Size (px)
Citation preview
8/2/2019 Laboratory in Automatic Control Lab10
1/16
Laboratory in Automatic Control
LAB 10
System Design Using Classical Methods
8/2/2019 Laboratory in Automatic Control Lab10
2/16
Design a Lead Compensator (1/8)
As shown in the following figure, desire a steady-state error
of less than 10% to a ramp input, Kv=10 and the leadcompensator to meet certain performance specifications: (1)
settling time (with a 2% criterion) Ts
8/2/2019 Laboratory in Automatic Control Lab10
3/16
Design a Lead Compensator (2/8)
The steady-state error to a unit ramp input is
where
Consider a simple gain controller
then
1ss
v
eK
0lim 5 10 50
c cvs
G s G sK s
s s s
cG s K
10 500
50
v
KK K
8/2/2019 Laboratory in Automatic Control Lab10
4/16
Design a Lead Compensator (3/8)
Solving for and using
We thus obtain the phase margin requirement:
n
21
. . % 100exp 10 0.59
43 2.26
s n
n
P O
T
60
0.01
pm
Textbook P.521
8/2/2019 Laboratory in Automatic Control Lab10
5/16
Design a Lead Compensator (4/8)
MATLAB code
k=500;numg=[1]; deng=[1 15 50 0];sysg=tf(numg,deng); sys=k*sysg;[Gm,Pm,Wcg,Wcp]=margin(sys); % Compute phase margin.
Phi=(60-Pm)*pi/180; % Additional phase lead.alpha=(1+sin(Phi))/(1-sin(Phi)); %Compute alpha. Textbook P.591[mag,phase,w]=bode(sys);mag_save(1,:)=mag(:,:,:);M=-10*log10(alpha)*ones(length(w),1);
semilogx(w,20*log10(mag_save),w,M,'--')xlabel('Frequency (rad/sec)'),ylabel('Magnitude (dB)')hold onsemilogx([0.9 9 90],[20 0 -20],'--'),grid on
8/2/2019 Laboratory in Automatic Control Lab10
6/16
Design a Lead Compensator (5/8)
Uncompensated
3.
25
5c
K sG s
s
10log
8/2/2019 Laboratory in Automatic Control Lab10
7/16
Design a Lead Compensator (6/8)
MATLAB code
numg=[1];deng=[1 15 50 0];dengc=[1 25];for K=1:50:2000
numgc=K*[1 3.5];sysg=tf(numg,deng);sysgc=tf(numgc,dengc);sys1=series(sysgc,sysg);[Gm,Pm,Wg,Wc]=margin(sys1);if(Pm
8/2/2019 Laboratory in Automatic Control Lab10
8/16
Design a Lead Compensator (7/8)
8/2/2019 Laboratory in Automatic Control Lab10
9/16
Design a Lead Compensator (8/8)
The final lead compensator design is
Resulting in a 20% steady-state error to a ramp input
1801 3.525
csG s
s
8/2/2019 Laboratory in Automatic Control Lab10
10/16
Design a Lag Compensator (1/6)
As shown in the following figure, desire a steady-state error
of less than 10% to a ramp input, Kv=10 and the lagcompensator to meet certain performance specifications: (1)
settling time (with a 2% criterion) Ts
8/2/2019 Laboratory in Automatic Control Lab10
11/16
Design a Lag Compensator (2/6)
Solving for and using
We thus obtain the phase margin requirement
21
. . % 100exp 10 0.59
43 2.26
s n
n
P O
T
600.01
pm
n
8/2/2019 Laboratory in Automatic Control Lab10
12/16
Design a Lag Compensator (3/6)
MATLAB code
numg=[1]; deng=[1 15 50 0];sysg=tf(numg,deng);clf;% Clear current figurerlocus(sysg); hold onzeta=0.5912; wn=2.2555;x=[-10:0.1:-zeta*wn];y=-(sqrt(1-zeta^2)/zeta)*x;xc=[-10:0.1:-zeta*wn];c=sqrt(wn^2-xc.^2);plot(x,y,':',x,-y,':',xc,c,':',xc,-c,':')axis([-15,1,-10,10]);rlocfind(sysg)
Plot performance regions on locus.
8/2/2019 Laboratory in Automatic Control Lab10
13/16
Design a Lag Compensator (4/6)
Compute
Select
Uncompensated K
100.1
103
10.1
comp
uncomp
v
v
K
K
zp z
p
0.1
0.01
z
p
8/2/2019 Laboratory in Automatic Control Lab10
14/16
Design a Lag Compensator (5/6)
MATLAB code
numg=[1]; deng=[1 15 50 0];sysg=tf(numg,deng);numgc=[1 0.1]; dengc=[1 0.01];sysgc=tf(numgc,dengc);
sys=series(sysgc,sysg);clf;rlocus(sysg); hold onzeta=0.5912; wn=2.2555;x=[-10:0.1:-zeta*wn];y=-(sqrt(1-zeta^2)/zeta)*x;
xc=[-10:0.1:-zeta*wn];c=sqrt(wn^2-xc.^2);plot(x,y,':',x,-y,':',xc,c,':',xc,-c,':')axis([-15,1,-10,10]);
Compensated root locus remainsalmost unchanged.
8/2/2019 Laboratory in Automatic Control Lab10
15/16
Design a Lag Compensator (6/6)
MATLAB code
K=100;numg=[1]; deng=[1 15 50 0];sysg=tf(numg,deng);numgc=K*[1 0.1]; dengc=[1 0.01];
sysgc=tf(numgc,dengc);syso=series(sysgc,sysg);sys=feedback(syso,[1]);step(sys);[gm,pm,wg,wp]=margin(syso);
pm
8/2/2019 Laboratory in Automatic Control Lab10
16/16
Lab 10 Homework
Consider the control system shown in Figure. Design a lead
compensator using bode plot methods to meet the followingspecifications: (1) percent overshoot for a step input