第8讲现代控制系统分析设计
更新时间:2024-01-11 01:18:01 阅读量: 教育文库 文档下载
- 现代控制系统pdf推荐度:
- 相关推荐
1.控制系统模型 ............................................................................................................................................. 3
例8_1 ...................................................................................................................................................... 3 例8_2 ...................................................................................................................................................... 4 例8_3 ...................................................................................................................................................... 6 例8_4 ...................................................................................................................................................... 8 例8_5 ...................................................................................................................................................... 9 例8_6 .....................................................................................................................................................10 例8_7 .....................................................................................................................................................11 2.控制系统的时域分析 .............................................................................................................................13
例8_8 .....................................................................................................................................................13 例8_9 .....................................................................................................................................................14 例8_10 ...................................................................................................................................................15 例8_11 ...................................................................................................................................................16 例8_12 ...................................................................................................................................................17 例8_13 ...................................................................................................................................................19 例8_14 ...................................................................................................................................................20 例8_15 ...................................................................................................................................................22 3.控制系统的根轨迹 .................................................................................................................................23
例8_16 ...................................................................................................................................................23 例8_17 ...................................................................................................................................................24 例8_18 ...................................................................................................................................................25 例8_19 ...................................................................................................................................................26 4.控制系统的频域分析 .....................................................................................................................28 例8_20 ...................................................................................................................................................28 例8_21 ...................................................................................................................................................30 例8_22 ...................................................................................................................................................31 例8_23 ...................................................................................................................................................32 例8_24 ...................................................................................................................................................33 例8_25 ...................................................................................................................................................34 例8_26 ...................................................................................................................................................35 例8_27 ...................................................................................................................................................37 例8_28 ...................................................................................................................................................38 例8_29 ...................................................................................................................................................40 例8_30 ...................................................................................................................................................42 例8_31 ...................................................................................................................................................43 例8_32 ...................................................................................................................................................45 例8_33 ...................................................................................................................................................47 例8_34 ...................................................................................................................................................49 例8_35 ...................................................................................................................................................50 例8_36 ...................................................................................................................................................51 例8_37 ...................................................................................................................................................52 例8_38 ...................................................................................................................................................53 例8_39 ...................................................................................................................................................54 例8_40 ...................................................................................................................................................56 例8_41 ...................................................................................................................................................57 例8_42 ...................................................................................................................................................58 6.最优控制器设计 .....................................................................................................................................59
例8_43 ...................................................................................................................................................59 例8_44 ...................................................................................................................................................60
例8_45 ...................................................................................................................................................61 例8_46 ...................................................................................................................................................62 例8_47 ...................................................................................................................................................64 例8_48 ...................................................................................................................................................66 例8_49 ...................................................................................................................................................68 例8_50 ...................................................................................................................................................70 例8_51 ...................................................................................................................................................71 例8_52 ...................................................................................................................................................73
1.控制系统模型 例8_1
设系统的零极点增益模型为:
H(s)?6(s?3)(s?1)(s?2)(s?5)
求系统的传递函数及状态空间模型。 解: k=6; z=[-3];
p=[-1,-2,-5];
[num,den]=zp2tf(z,p,k); [a,b,c,d]=zp2ss(z,p,k); printsys(num,den); printsys(a,b,c,d);
num/den =
6 s + 18
----------------------- s^3 + 8 s^2 + 17 s + 10 a =
x1 x2 x3 x1 -1.00000 0 0 x2 2.00000 -7.00000 -3.16228 x3 0 3.16228 0 b =
u1 x1 1.00000 x2 1.00000 x3 0 c =
x1 x2 x3 y1 0 0 1.89737 d =
u1 y1 0
例8_2
给定离散系统的状态空间方程,
?00???2.8?1.4?1???1.4??0?000??x(k)???u(k)?x(k?1)?? ???1.8?0.3?1.4?0.6??1??????000.60???0???y(k)??0001?x(k)?求传递函数模型和零极点模型,并判断其稳定性。 解:
a=[-2.8 -1.4 0 0; 1.4 0 0 0; -1.8 -0.3 -1.4 -0.6; 0 0 0.6 0;]; b=[1;0; 1; 0]; c=[0 0 0 1]; d=[0];
[num,den]=ss2tf(a,b,c,d); [z,p,k]=ss2zp(a,b,c,d) pzmap(p,z);
title('Pole-Zero Map');
z =
-0.5000 + 1.1358i -0.5000 - 1.1358i p =
-1.4000 + 0.0000i -1.4000 - 0.0000i -1.0606 -0.3394 k =
0. 6000
回目录
Pole-Zero Map1.510.5Imag Axis0-0.5-1-1.5-1.4-1.2-1-0.8-0.6Real Axis-0.4-0.20 回目录
8_3
已知两个系统
???x??01??0?1????1?2??x1???1?u1
?y1??13?x?1?u1???x??01???x?0?2?2?????1?31?u2
?y?1?4?x??2?2求按串联、并联、单位负反馈、单位正反馈连接时的系统状态方程。 解:
a1=[0,1;-1,-2]; b1=[0;1]; c1=[1,3]; d1=[1];
a2=[0,1;-1,-3]; b2=[0;1]; c2=[1,4]; d2=[0];
sys1=ss(a1,b1,c1,d1); sys2=ss(a2,b2,c2,d2);
title='Series state space matrix' sys=series(sys2,sys1)
title='parallel state space matrix'
[a,b,c,d]=parallel(a1,b1,c1,d1,a2,b2,c2,d2) title='Negative Feedback state space matrix' [a,b,c,d]=feedback(a1,b1,c1,d1,a2,b2,c2,d2) title='positive Feedback state space matrix' [a,b,c,d]=feedback(a1,b1,c1,d1,a2,b2,c2,d2,+1)
title =
Series state space matrix a =
x1 x2 x3 x4 x1 0 1 0 0 x2 -1 -2 1 4 x3 0 0 0 1 x4 0 0 -1 -3 b =
u1 x1 0 x2 0 x3 0 x4 1 c =
x1 x2 x3 x4
例 y1 1 3 1 4 d =
u1 y1 0
Continuous-time model. title =
parallel state space matrix a =
0 1 0 0 -1 -2 0 0 0 0 0 1 0 0 -1 -3 b = 0 1 0 1 c =
1 3 1 4 d = 1 title =
Negative Feedback state space matrix a =
0 1 0 0 -1 -2 -1 -4 0 0 0 1 1 3 -2 -7 b = 0 1 0 1 c =
1 3 -1 -4 d = 1 title =
positive Feedback state space matrix a =
0 1 0 0 -1 -2 1 4 0 0 0 1 1 3 0 1 b = 0 1 0 1 c =
1 3 1 4 d = 1 回目录
例8_4
时不变系统
???31??11??x?x???1?3??11?u????? ??11??y???x?1?1???判别系统的能控性和能观性。
解:
a=[-3,1;1,-3]; b=[1,1;1,1]; c=[1,1;1,-1]; cam=ctrb(a,b); rcam=rank(cam) oam=obsv(a,c); roam=rank(oam) rcam = 1 roam =
2
回目录
例8_5
线性系统
H(s)?当?分别取-1,0,+1 时,判别系统的可控性和可观性,并求出相应的状态方程。 解:
for alph=[-1:1]; alph
num=[1,alph];
den=[1 10 27 18];
[a b c d]=tf2ss(num,den); cam=ctrb(a,b); rcam=rank(cam) oam=obsv(a,c); coam=rank(oam) end;
alph = -1 rcam = 3 coam = 3 alph = 0 rcam = 3 coam = 3 alph = 1 rcam = 3 coam = 2
回目录
s??
s3?10s2?27s?18
例8_6
利用Lyapunov方程确定线性时不变系统
?1??x1?2x2?x ???x2?x1?4x2的稳定性。 解:a??1?2????
1?4??令q=I,求解Lyapunov方程
ap?paT??q
然后确定p的正定性来证实系统的稳定性。
a=[-1,-2;1,-4]; q=[1,0;0,1]; p=lyap(a,q); detp=det(p)
detp =
0.0567
回目录
例8_7
对连续模型
H(s)?6(s?3)
(s?1)(s?2)(s?5)采用MATLAB提供的各种函数进行离散化处理,得到稍有差异的状态方程。 解:
disp('Contunue system'); k=6; z=[-3];
p=[-1,-2,-5];
[a,b,c,d]=zp2ss(z,p,k); %discrete system t=0.1;
disp('Discrete system --using c2d'); [a1,b1]=c2d(a,b,t)
disp('Discrete system--using c2dm with zoh'); [a2,b2,c2,d2]=c2dm(a,b,c,d,t,'zoh')
disp('Discrete system--using c2dm with foh'); [a3,b3,c3,d3]=c2dm(a,b,c,d,t,'foh')
disp('Discrete system--using c2dm with Tustin'); [a4,b4,c4,d4]=c2dm(a,b,c,d,t,'tustin')
Contunue system
Discrete system --using c2d a1 =
0.9048 0 0 0.1338 0.4651 -0.2237 0.0243 0.2237 0.9602 b1 =
0.0952 0.0784 0.0135
Discrete system--using c2dm with zoh a2 =
0.9048 0 0 0.1338 0.4651 -0.2237 0.0243 0.2237 0.9602 b2 =
0.0952 0.0784 0.0135 c2 =
0 0 1.8974 d2 = 0
Discrete system--using c2dm with foh a3 =
0.9048 0 0 0.1338 0.4651 -0.2237 0.0243 0.2237 0.9602 b3 =
0.0906
0.0611 0.0240 c3 =
0 0 1.8974 d3 =
0.0089
Discrete system--using c2dm with Tustin a4 =
0.9048 0 0 0.1385 0.4545 -0.2300 0.0219 0.2300 0.9636 b4 =
0.9524 0.7965 0.1259 c4 =
0.0021 0.0218 0.1863 d4 =
0.0119 回目录
2.控制系统的时域分析 例8_8
典型二阶系统
2?n H(s)?22s?2??ns??n其中?n为自然频率(无阻尼振荡频率),?为相对阻尼系数。试绘制出?n?6,?分别为
0.1,0.2,…,1.2,2.0时的单位阶跃响应。 解: wn=6;
kosi=[0.1:0.1:1.0,2.0]; figure(1); hold on;
for kos=kosi num=wn.^2;
den=[1,2*kos*wn,wn.^2]; step(num,den) end;
%title('Step response'); hold off;
Step ResponseFrom: U(1)1.81.61.41.2AmplitudeTo: Y(1)10.80.60.40.200246810Time (sec.) 回目录
例8_9
对典型二阶系统
2?n H(s)?22s?2??ns??n绘制出当??0.7,?n取2,4,6,8,10,12时的单位阶跃响应。
w=[2:2:12]; kos=0.7; figure(1); hold on; for wn=w
num=wn.^2;
den=[1,2*kos*wn,wn.^2]; step(num,den) end;
%title('Step response'); hold off;
Step ResponseFrom: U(1)1.41.21AmplitudeTo: Y(1)0.80.60.40.2000.511.522.533.54Time (sec.) 回目录
例8_10
求三阶系统
5(s2?5s?6)H(s)?3 2s?6s?10s?8的单位阶跃响应。 解:
num=[5 25 30]; den=[1 6 10 8]; figure
step(num,den);
title('Step response'); hold off; Step responseFrom: U(1)4.543.53AmplitudeTo: Y(1)2.521.510.500123456Time (sec.) 回目录
例8_11
求典型二阶系统
2?n H(s)?22s?2??ns??n当??0.7,?n?6时的单位冲激响应。
解: wn=6; kos=0.7; figure(1); num=wn.^2;
den=[1,2*kos*wn,wn.^2]; figure
impulse(num,den)
title('Impulse response');
Impulse responseFrom: U(1)32.52AmplitudeTo: Y(1)1.510.50-0.500.511.5Time (sec.) 回目录
例8_12
有高阶系统
????1.6?0.900??1????0.9000??0??x?????0.40.5?0.5?2.45??x????u????002.450??1? ??y??1111?x??0?求单位阶跃响应,单位冲激响应激零输入响应(设初始状态x0??1解:
a=[2.25,-5,-1.25,-0.5;2.25,-4.25,-1.25,-0.25; 0.25,-0.5,-1.25,-1;1.25,-1.75,-0.25,-0.75]; b=[4,6;2,4;2,2;0,2]; c=[0,0,0,1;0,2,0,2]; d=zeros(2,2); figure;
subplot(2,2,1); step(a,b,c,d);
axis([0,6,-0.5,2.5]); %title('Step Response'); subplot(2,2,2); impulse(a,b,c,d);
%title('Impulse response'); subplot(2,2,3);
%axis([0,6,-0.5,2.5]); x0=[1;1;1;-1];
initial(a,b,c,d,x0);
%title('Intial response'); subplot(2,2,4); pzmap(a,b,c,d);
%title('Pole-Zero Map') ;
1?1?T)1
Step ResponseFrom: U(1)2To: Y(1)Impulse ResponseFrom: U(1)2To: Y(1)From: U(2)From: U(2)Amplitude010500481204812Amplitude10-2200To: Y(2)To: Y(2)-200481204812Time (sec.)Initial Condition Results 1To: Y(1)Time (sec.)Pole zero map10.5Imag AxisAmplitude0-120-20510150-0.5-1-1.5To: Y(2)Time (sec.)-1-0.5Real Axis0
回目录
例8_13
多输入多输出系统
??5?1.25?2.25??2.25?4.25?1.25?x?????0.25?0.5?1.25???1.25?1.75?0.25???000y???020???0.5??46??24??0.25??x???u?1??22???? ?0.75??02?1?x2??求单位阶跃响应和单位冲激响应。
解:
a=[2.25,-5,-1.25,-0.5;2.25,-4.25,-1.25,-0.25; 0.25,-0.5,-1.25,-1;1.25,-1.75,-0.25,-0.75]; b=[4,6;2,4;2,2;0,2]; c=[0,0,0,1;0,2,0,2]; d=zeros(2,2); figure(1);
step(a,b,c,d); figure(2);
impulse(a,b,c,d); Impulse ResponseFrom: U(1)2From: U(2)To: Y(1)10Amplitude-11510To: Y(2)50-50481204812Time (sec.)回目录
例8_14
连续系统
?00???1.6?0.9?1???0.9??0?000??x???u????x?0.5?0.5?2.45??0.4?1? ?????002.450???0???y??1111?x?以t=0.5s采样周期,采用双线性变换算法转换为离散系统,然后求出离散系统的单位阶跃响应、单位冲激响应及零输入响应(设初始状态x0T??111?1?)。
解:
a1=[-1.6,-0.9,0,0;0.9,0,0,0;
0.4,0.5,-5.0,-2.45;0,0,2.45,0]; b1=[1;0;1;0]; c1=[1,1,1,1]; d1=[0]; t=0.5;
[a,b,c,d]=c2dm(a1,b1,c1,d1,t,'tustin'); figure(1);
subplot(2,2,1); dstep(a,b,c,d); subplot(2,2,2); dimpulse(a,b,c,d); subplot(2,2,3); x0=[1;1;1;-1];
dinitial(a,b,c,d,x0); axis([0 6 0.5 2.5]); subplot(2,2,4);
[z,p,k]=ss2zp(a,b,c,d,1); zplane(z,p);
Step ResponseFrom: U(1)20.6Impulse ResponseFrom: U(1)AmplitudeAmplitude1.50.4To: Y(1)10.50To: Y(1)0.20-0.205101520250369121518Time (sec.)Initial Condition Results 1Time (sec.)1Imaginary Part0102030Amplitude0.50-0.5-1-1-0.500.5Real Part1To: Y(1)0.50-0.5Time (sec.) 回目录
例8_15
离散二阶系统
H(z)?0.632 2z?1.368z?0.568求当输入幅值为±1的方波信号时系统的输出响应。 解:
num=0.632;
den=[1 ,-1.368,0.568];
u1=[ones(1,50),-1*ones(1,50)]; u=[u1,u1,u1]; figure(1);
dlsim(num,den,u);
%title('Discrete System Simulation');
Step ResponseFrom: U(1)20.6Impulse ResponseFrom: U(1)AmplitudeAmplitude1.50.4To: Y(1)10.50To: Y(1)0.20-0.205101520250369121518Time (sec.)Initial Condition Results 1Time (sec.)Linear Simulation Results 100AmplitudeTo: Y(1)To: Y(1)0.5Amplitude500-50-1000-0.501020300100200Time (sec.)Time (sec.)回目录 3.控制系统的根轨迹 例8_16
设开环系统
H(s)?k(3s?1)
s(2s?1)绘制出通过单位负反馈构成的闭环系统的根轨迹。 解:
num=[3 1]; den=[2 1 0];
rlocus(num,den);
title('Root locus');
Root locus10.80.60.40.2Imag Axis0-0.2-0.4-0.6-0.8-1-1-0.8-0.6-0.4-0.200.2Real Axis0.40.60.81 回目录
例8_17
设开环系统
H(s)?k(s?5)
s(s?2)(s?3)绘制出闭环系统的根轨迹,并确定交点处的增益k。 解:
num=[1 5];
den=[1 5 6 0]; rlocus(num,den);
%title('Root locus'); [k,p]=rlocfind(num,den) gtext('k=0.5'); 108642Imag Axis0-2-4-6-8-10-6-5-4-3-2Real Axis-1012回目录
例8_18
已知开环系统传递函数
H(s)?k
s4?16s3?36s2?80s绘制出闭环系统的根轨迹。 解: num=[1];
den=[1 16 36 80 0]; rlocus(num,den);
%title('Root locus'); 15105Imag Axis0-5-10-15-15-10-5Real Axis05 回目录
例8_19
已知开环系统传递函数
H(s)?k(s?2) 22(s?4s?3)解:
num=[1 2]; den1=[1 4 3];
den=conv(den1,den1); figure(1);
rlocus(num,den);
%title('Root locus'); [k,p]=rlocfind(num,den) %Checking the stability k=55;
figure(2); num1=k*[1 2]; den=[1 4 3];
den1=conv(den,den);
[num,den]=cloop(num1,den1,-1); impulse(num,den);
%title('Impulse Response (k=55)'); %Checking the stability figure(3); k=k+1; k=56;
num1=k*[1 2]; den=[1 4 3];
den1=conv(den,den);
[num,den]=cloop(num1,den1,-1); impulse(num,den);
%title('Impulse Response (k=56)');
Error in ==> D:\\MATLABR11\\toolbox\\control\\rlocfind.m
On line 58 ==> [k,poles] = rlocfind(tf(a,b),varargin{:});
642Imag Axis0-2-4-6-4-3-2-1Real Axis012回目录 4.控制系统的频域分析 例8_20
典型二阶系统
2?n H(s)?22s?2??ns??n绘制出?取不同值时的Bode图。
wn=6;
kosi=[0.1:0.1:1.0]; w=logspace(-1,1,100); figure(1); num=[wn.^2]; for kos=kosi
den=[1 2*kos*wn wn.^2];
[mag,pha,w1]=bode(num,den,w); subplot(2,1,1); hold on;
semilogx(w1,mag); subplot(2,1,2); hold on;
semilogx(w1,pha); end;
subplot(2,1,1); grid on;
xlabel('Frequency (rad/sec)'); ylabel('Gain dB'); subplot(2,1,2); grid on;
xlabel('Frequency (rad/sec)'); ylabel('Phase deg'); hold off;
6Gain dB4200123456Frequency (rad/sec)789100-50-100-150-200Phase deg0123456Frequency (rad/sec)78910 回目录
例8_21
有系统
H(s)?绘制出系统的Bode图。 k=100; z=[-4];
p=[0 -0.5 -50 -50];
[num,den]=zp2tf(z,p,k); %subplot(2,1,1); grid on;
%subplot(2,1,2); %grid on;
bode(num,den);
title('Bode plot'); 6100(s?4)s(s?0.5)(s?50)2
Gain dB4200123456Frequency (rad/sec)Bode plot78910Magnitude (dB)Phase (deg)2000-200-90-180-270-101210101010Frequency (Hz)回目录
例8_22
系统传递函数模型为
H(s)?s?1?0.5se 3(s?2)求出有理传递函数的频率响应,然后在同一张图上绘出以四阶pade近似表示的系统频率响应。 num=[1 1];
den=conv([1 2],conv([1,2],[1,2])); w=logspace(-1,2); t=0.5;
[m1,p1]=bode(num,den,w); p1=p1-t*w'*180/pi; [n2,d2]=pade(t,4); numt=conv(n2,num); dent=conv(den,d2);
[m2,p2]=bode(numt,dent,w); subplot(2,1,1);
semilogx(w,20*log10(m1),w,20*log10(m2),'r--'); subplot(2,1,2);
semilogx(w,p1,w,p2,'r--'); subplot(2,1,1); grid on;
title('Bode plot');
xlabel('Frequency (rad/sec)'); ylabel('Gain dB'); subplot(2,1,2); grid on;
xlabel('Frequency (rad/sec)');
ylabel('Phase deg'); Bode plot0-20Gain dB-40-60-80-100-110010010Frequency (rad/sec)1102Phase deg-1000-2000-3000-4000-11010010Frequency (rad/sec)1102 回目录
例8_23
离散二阶系统
H(z)?0.632
z2?1.368z?0.568求系统的离散Bode图 num=0.632;
den=[1 ,-1.368,0.568]; grid on;
dbode(num,den,0.1);
title('Discrete Bode Plot'); Discrete Bode PlotFrom: U(1)2010Phase (deg); Magnitude (dB)0-10-201000To: Y(1)-100-200-300-400110Frequency (rad/sec) 回目录
例8_24
开环系统
H(s)?50
(s?5)(s?2)绘制出系统的Nyquist曲线,并判别系统的稳定性,最后求出闭环系统的单位冲激响应。 k=50; z=[];
p=[-1,-5,2];
[num,den]=zp2tf(z,p,k); figure(1);
nyquist(num,den);
title('Nyquist Plot'); figure(2);
[num1,den1]=cloop(num,den); impulse(num1,den1);
title('Impulse Response');
Impulse ResponseFrom: U(1)1050-5AmplitudeTo: Y(1)-10-15-20-25-30-3500.511.522.5Time (sec.) 回目录
例8_25
开环系统
H(s)?50
(s?1)(s?5)(s?2)绘制出系统的Nyquist曲线,并判别系统的稳定性,最后求出闭环系统的单位冲激响应。 k=50; z=[];
p=[-1,-5,2];
[num,den]=zp2tf(z,p,k); figure(1);
nyquist(num,den);
title('Nyquist Plot'); figure(2);
[num1,den1]=cloop(num,den); impulse(num1,den1);
title('Impulse Response'); Impulse ResponseFrom: U(1)1050-5AmplitudeTo: Y(1)-10-15-20-25-30-3500.511.522.5Time (sec.) 回目录
例8_26
线性系统状态空间模型
?100??0?0???0??0?011??x???u????x?001??0?0? ??????62.5?213.8?204.2?54???1???y??1562187500x??绘制出系统的Bode图和Nyquist曲线,判断系统的稳定性,并绘制闭环系统的单位冲激响应进行验证。
a=[0,1,0,0;0,0,1,0;0,0,0,1;-62.5,-213.8,-204.2,-54]; b=[0,0,0,1]';
c=[1562,1875,0,0]; d=0;
w=logspace(-1,1); figure(1);
bode(a,b,c,d,1,w); title('Bode Plot'); figure(2);
nyquist(a,b,c,d,1,w); title('Nyquist plot'); [z,p,k]=ss2zp(a,b,c,d); p
figure(3);
[a1,b1,c1,d1]=cloop(a,b,c,d); impulse(a1,b1,c1,d1);
title('Impulse Response');
p =
-50.0011 -2.4969 -1.0027 -0.4992
Impulse ResponseFrom: U(1)5432AmplitudeTo: Y(1)10-1-2-300.511.522.533.544.55Time (sec.) 回目录
例8_27
离散系统
H(z)?0.632 2z?1.368z?0.568绘制出系统的Nyquist曲线,判别闭环系统的稳定性,并绘制出闭环系统的单位冲激响应。 num=0.632;
den=[1 ,-1.368,0.568]; [z,p,k]=tf2zp(num,den); p
dnyquist(num,den,0.1);
title('Discrete Nyquist Plot'); figure(2)
[num1,den1]=cloop(num,den); dimpulse(num1,den1);
title('Discrete Impulse Response');
p =
0.6840 + 0.3165i 0.6840 - 0.3165i Discrete Impulse ResponseFrom: U(1)8642AmplitudeTo: Y(1)0-2-4-6-8051015202530Time (sec.)
回目录
例8_28
一多环系统,
G(s)?r(s)16.7s (0.85s?1)(0.25s?1)(0.0625s?1)y(s)10GainG(s)其结构如图,试用Nyquist曲线判断系统的稳定性。
k1=16.7/0.0125; z1=[0];
p1=[-1.25 -4 -16];
[num1,den1]=zp2tf(z1,p1,k1); [num,den]=cloop(num1,den1); [z,p,k]=tf2zp(num,den); p
figure(1);
nyquist(num,den);
title('Nyquist Plot'); figure(2)
[num2,den2]=cloop(num,den); impulse(num2,den2);
title('Impulse Response');
p =
-10.5969 +36.2148i -10.5969 -36.2148i -0.0562
Impulse ResponseFrom: U(1)201510AmplitudeTo: Y(1)50-5-10-1500.10.20.30.40.50.6Time (sec.) 回目录
例8_29
非线性系统
??ax?bu?x??u?f(?) ???cx?其中
??2.1?1.87?0.2030.894??1??1.0?0?000??b???,c??00?1?2? a??100??0?0?????0010???0?k1??f(?)?k2?
当?k1,k2?的(1/2,2/3)或[1,2]时,判断非线性系统的绝对稳定性。
a=[-2.1,-1.87,-0.203,0.894;1,0,0,0;0,1,0,0;0,0,1,0]; b=[1,0,0,0]'; c=[0,0,-1,-2]; d=0;
[num,den]=ss2tf(a,b,c,d); num=-1*num;
[z,p,k]=tf2ss(num,den); p
figure(1);
nyquist(num,den);
title('Nyquist Plot');
p = 1 0 0 0
Nyquist PlotFrom: U(1)0.40.30.2Imaginary Axis0.1To: Y(1)0-0.1-0.2-0.3-0.4-2.5-2-1.5-1-0.50Real Axis 回目录
4. 极点配置和观测器设计
例8_30
系统开环传递函数为
G(s)?16.7s
(0.8s?1)(0.25s?1)(0.0625s?1)绘制出Nickols图。 k1=16.7/0.0125; z1=[0];
p1=[-1.25 -4 -16];
[num,den]=zp2tf(z1,p1,k1); figure(1);
nichols(num,den);
axis([-360,0,-40,40]); ngrid('New');
title('Nickols Plot'); Nickols PlotFrom: U(1)40200Open-Loop Gain (dB)-20To: Y(1)-40-60-80-100-200-150-100-50050100Open-Loop Phase (deg) 回目录
例8_31
被控对象
H(s)?10
(s?1)(s?2)(s?3)设计反馈控制器u=-kx,使闭环系统的极点为?1??2?j23,?2??2?j23,
?3?10。
%Pole Placement--using transformation matrix %
disp('Pole placement--using transformation matrix'); a=[0,1,0;0,0,1;-6,-11,-6]; b=[0;0;10]; %Step1
cam=ctrb(a,b);
disp('The rank of controllability matrix'); rc=rank(cam); %Step2
beta=poly(a); %Step3
a1=beta(2); a2=beta(3); a3=beta(4);
w=[a2,a1,1;a1,1,0;1,0,0]; t=cam*w; %Step4
j=[-2+2*sqrt(3)*i, 0, 0; 0,-2-2*sqrt(3)*i,0; 0,0,-10]; alph=poly(j); aa1=alph(2); aa2=alph(3); aa3=alph(4); %Step 5
k=[aa3-a3,aa2-a2,aa1-a1]*(inv(t)) %
%Pole Placement ---using Ackermann's formula %
disp('Pole Placement ---using Ackermann''s formula'); a=[0,1,0;0,0,1;-6,-11,-6]; b=[0;0;10]; %Step1
cam=ctrb(a,b);
disp('The rank of controllability matrix'); rc=rank(cam); %Step2
j=[-2+2*sqrt(3)*i, 0, 0; 0,-2-2*sqrt(3)*i,0; 0,0,-10]; alph=poly(j); %Step3
phi=polyvalm(alph,a); %step 4
k=[0,0,1]*(inv(cam))*phi %
%Pole Placement --using place function in Matlab
%
disp('Pole Placement --using place function in Matlab'); p=[-2+2*sqrt(3)*i,-2-2*sqrt(3)*i,-10]; k=place(a,b,p)
Pole placement--using transformation matrix The rank of controllability matrix k =
15.4000 4.5000 0.8000
Pole Placement ---using Ackermann's formula The rank of controllability matrix k =
15.4000 4.5000 0.8000
Pole Placement --using place function in Matlab k =
15.4000 4.5000 0.8000 回目录
例8_32
含积分环节的类型1伺服系统,设对象为
H(s)?1
s(s?1)(s?2)设计控制器u=-kx+k1r,使闭环系统具有极点?2?j23,-10。
%Pole Placement--using transformation matrix %
disp('Pole placement--using transformation matrix');
disp('Pole Placement --using place function in Matlab'); a=[0,1,0;0,0,1;0,-2,-3]; b=[0;0;1]; c=[1 0 0]; d=[0];
disp('The rank of controllability matrix'); rc=rank(ctrb(a,b))
p=[-2+2*sqrt(3)*i,-2-2*sqrt(3)*i,-10]; k=place(a,b,p) a1=a-b*k; b1=b*k(1); c1=c; d1=d;
figure(1);
step(a1,b1,c1,d1);
title('Step Response of Designed Servoi System'); figure(2);
[y,x,t]=step(a1,b1,c1,d1); plot(t,x);
title('Step Response curves for x1,x1,x3'); grid on;
Pole placement--using transformation matrix
Pole Placement --using place function in Matlab The rank of controllability matrix rc = 3
place: ndigits= 15 k =
160.0000 54.0000 11.0000
Step Response curves for x1,x1,x31050-500.511.522.53 回目录
例8_33
不含积分环节的类型1伺服系统设计。对车载倒立摆系统实现控制,使小车位置作为输出的闭环系统具有极点:?1?j3,-5,-5,-5,-5。 根据牛顿第二定律,可得线性化模型:
???(M?m)g??u?Ml? ???Mx?u?mg??
Tsign of inverted pendulum control system %
% Using pole placement Ackermann %
%Modelling
a=[0,1,0,0;20.601,0,0,0;0,0,0,1;-0.4905,0,0,0]; b=[0;-1;0;0.5]; c=[0,0,1,0]; d=[0];
a1=[a,zeros(4,1);-c,0]; b1=[b;0];
%Check the controllability
disp('The rank of controllability matrix'); rc=rank(ctrb(a1,b1))
p=[-1+sqrt(3)*i,-1-sqrt(3)*i,-5,-5,-5]; k=acker(a1,b1,p) %Step Response k1=k(1:4); ki=-k(5);
ac=[a-b*k1,b*ki;-c,0]; bc=[0,0,0,0,1]'; cc=[c,0]; dc=[0]; figure(1);
v=[0,5,-0.4,1.4]; step(ac,bc,cc,dc); axis(v);
title('Step Response of inverted pendulum System'); xlabel('Sec');
ylabel('Output y=x3'); figure(2);
[y,x,t]=step(ac,bc,cc,dc); plot(t,x);
legend('x1','x2','x3','x4','x5');
title('Step Response curves for x1,x1,x3,x4,x5'); xlabel('Sec');
ylabel('x1,x2,x3,x4,x5'); grid on;
The rank of controllability matrix rc = 5 k =
-157.6336 -35.3733 -56.0652 -36.7466 50.9684
Step Response curves for x1,x1,x3,x4,x51.41.210.8x1,x2,x3,x4,x5x1x2x3x4x50.60.40.20-0.2-0.40123Sec456 回目录
例8_34
开环系统
??ax?bu?x ?y?cx?其中
?0??0?,c??100? ????1??设计全阶状态观测器,使观测器得闭环极点为?2?j23,-5。
Tsign of full-order state observer %
a=[0,1,0;0,0,1;-6,-11,-6]; b=[0;0;1]; c=[1,0,0]; d=[0];
%Check the controllability
disp('The rank of observability matrix'); rc=rank(obsv(a,c))
% Constrt the dual system (a1,b1,c1) a1=a'; b1=c'; c1=b';
%Silve K using poles placement -Ackermann p=[-2+2*sqrt(3)*i,-2-2*sqrt(3)*i,-5]; k=acker(a1,b1,p);
%Obtain the state of obser gain ke
ke=k'
The rank of observability matrix rc = 3 ke =
3.0000 7.0000 -1.0000 回目录
10??0a??001?,b??????6?11?6??
例8_35
被控对象
1??0?0?x???x??1?u
20.60????y??10?x设计调节器使闭环极点为?1.8?j2.4,而起状态不可测,因此设计状态观测器使其闭环极点
为-8,-8。
Tsign of regulator and state observer %
a=[0,1;20.6,0]; b=[0;1]; c=[1,0]; d=[0];
%Check the controllability and observability disp('The rank of controllability matrix'); rc=rank(ctrb(a,b))
disp('The rank of observability matrix'); ro=rank(obsv(a,c)) Tsign the regulator
p=[-1.8+2.4*i,-1.8-2.4*i]; k=acker(a,b,p)
Tsign the state observer a1=a';b1=c';c1=b'; p1=[-8,-8];
k1=acker(a1,b1,p1);
ke=k1'
The rank of controllability matrix rc = 2
The rank of observability matrix ro = 2 k =
29.6000 3.6000 ke =
16.0000
84.6000 回目录
正在阅读:
第8讲现代控制系统分析设计01-11
经典英文告白语录02-07
春天的脚步作文500字作文600字06-16
哈工大机械设计大作业螺旋传动设计千斤顶01-01
德力西CDJ1-Z3系列数字式电机软起动器2012年1月(第二版)10-07
台湾与大陆中小学教师 信息素养培训现状及评价之比较研究05-27
2019年共青团团务知识竞赛试题库及答案(完整版)06-17
2011年美国国立神经病语言障碍卒中研究所和AD及相关疾病协会(NIN05-28
端午节童谣大全07-31
营销策划案例分析期末复习综合练习11-19
- exercise2
- 铅锌矿详查地质设计 - 图文
- 厨余垃圾、餐厨垃圾堆肥系统设计方案
- 陈明珠开题报告
- 化工原理精选例题
- 政府形象宣传册营销案例
- 小学一至三年级语文阅读专项练习题
- 2014.民诉 期末考试 复习题
- 巅峰智业 - 做好顶层设计对建设城市的重要意义
- (三起)冀教版三年级英语上册Unit4 Lesson24练习题及答案
- 2017年实心轮胎现状及发展趋势分析(目录)
- 基于GIS的农用地定级技术研究定稿
- 2017-2022年中国医疗保健市场调查与市场前景预测报告(目录) - 图文
- 作业
- OFDM技术仿真(MATLAB代码) - 图文
- Android工程师笔试题及答案
- 生命密码联合密码
- 空间地上权若干法律问题探究
- 江苏学业水平测试《机械基础》模拟试题
- 选课走班实施方案
- 控制系统
- 分析
- 现代
- 设计