MATLAB实验结果文档.docx
《MATLAB实验结果文档.docx》由会员分享,可在线阅读,更多相关《MATLAB实验结果文档.docx(10页珍藏版)》请在冰点文库上搜索。
MATLAB实验结果文档
%ex7_1fy.m
num=[3,2,1,4,2];den=[3,5,1,2,2,1];
r=roots(den),pzmap(num,den)
%ex7_2fy.m
num0=[5,4,1,.06,-3,0.5];den0=[1,0,0,0,0,0];[num,den]=cloop(num0,den0);
r=roots(den),zplane(num,den)
%ex7_3fy.m
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];
P=plot(A);r=roots(P),ii=find(real(r)>0);n=length(ii);
if(n>0)
disp('SystemisUnstable');
else
disp('SystemisStable');
end
7.5
[u,t]=gensig('square',5,30,0.1);
>>plot(t,u),axis([0,30,-0.5,1.5])
7.6
num0=20;den0=[1836400];[num,den]=cloop(num0,den0);
t=0:
0.1:
10;[y,x,t]=step(num,den,t);plot(t,y);
M=((max(y)-1)/1)*100;disp(['最大超调量M=',num2str(M),'%'])
最大超调量M=2.5546%
%ex7_7fy.m
wn=6;zeta=[0.2:
0.2:
1.0,2.0];figure
(1);holdon
fork=zeta;num=wn.^2;den=[1,2*k*wn,wn.^2];
step(num,den);
end;title('StepResponse');holdoff
%7_8fy.m
w=[2:
2:
12];zeta=0.7;
figure
(1);holdon
forwn=w
num=wn.^2;
den=[1,2*zeta*wn,wn.^2];
step(num,den)
end
title('StepRespone');holdoff
%ex7_9fy.m
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)
%ex7_10fy.m
num=[3.4,1.5];den=[1,-1.6,0.8];dstep(num,den);
title('PiscreteStepResponse')
%ex7_16.m
num=1;den=conv([1,0],conv([1,1],[1,2]));
rlocus(num,den),[K,poles]=rlocfind(num,den)
Selectapointinthegraphicswindow%ex7_16.m
num=1;den=conv([1,0],conv([1,1],[1,2]));
rlocus(num,den),[K,poles]=rlocfind(num,den)
Selectapointinthegraphicswindow
%ex7_16.m
num=1;den=conv([1,0],conv([1,1],[1,2]));
rlocus(num,den),[K,poles]=rlocfind(num,den)
Selectapointinthegraphicswindow
-0.9668+0.0373i
K=
0.0499
poles=
-2.0241
-0.9500
-0.0260
7.19
num=0.5;den=[1,2,0.5];nyquist(num,den)
num=50;den=conv([1,5],[1,-2]);nyquist(num,den)