MATLAB实验结果文档

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

%ex7_1fy.m
num=[3,2,1,4,2];den=[3,5,1,2,2,1]; r=roots(den),pzmap(num,den)
-2
-1.5-1
-0.500.5
-1-0.8-0.6-0.4-0.200.20.4
0.60.8
1P ole-Zero Map
Real Axis
I m a g i n a r y A x i s
%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)
-1
-0.5
00.5
1
-1
-0.8-0.6-0.4-0.200.20.4
0.60.8
1Real Part
I m a g i n a r y P a r t
%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('System is Unstable'); else
disp('System is Stable'); end
1 1.5
2 2.5
3 3.54
-5
-4-3-2-1012
3
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=[1 8 36 40 0];[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%
012345678910
0.2
0.4
0.6
0.8
1
1.2
1.4
%ex7_7fy.m
wn=6;zeta=[0.2:0.2:1.0,2.0];figure(1);hold on for k=zeta;num=wn.^2;den=[1,2*k*wn,wn.^2]; step(num,den);
end ;title('Step Response');hold off
00.51 1.52 2.53 3.54 4.55
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Step Response
Time (sec)
A m p l i t u d e
%7_8fy.m
w=[2:2:12];zeta=0.7; figure(1);hold on for wn=w num=wn.^2;
den=[1,2*zeta*wn,wn.^2]; step(num,den) end
title('Step Respone');hold off
00.51 1.52 2.53 3.54 4.55
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Step Respone
Time (sec)
A m p l i t u d e
%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)
00.511.5
2
From: In(1)
T o : O u t (1)024*******
2468
10T o : O u t (2
)
From: In(2)
0246810
12
Step Response
Time (sec)
A m p l i t u d e
%ex7_10fy.m
num=[3.4,1.5];den=[1,-1.6,0.8];dstep(num,den); title('Piscrete Step Response')
%ex7_16.m
num=1;den=conv([1,0],conv([1,1],[1,2])); rlocus(num,den),[K,poles]=rlocfind(num,den)
Select a point in the graphics window%ex7_16.m num=1;den=conv([1,0],conv([1,1],[1,2])); rlocus(num,den),[K,poles]=rlocfind(num,den)
Select a point in the graphics
window
05101520253035404550
5
10
15
20
25
30
35
40
P iscrete Step Response
Time (sec)
A m p l i t u d e
%ex7_16.m
num=1;den=conv([1,0],conv([1,1],[1,2])); rlocus(num,den),[K,poles]=rlocfind(num,den)
Select a point in the graphics window
-0.9668 + 0.0373i K =
0.0499
poles =
-2.0241 -0.9500 -0.0260
-6
-5-4-3-2-1012
-4-3
-2
-1
1
2
3
4
Root Locus
Real Axis
I m a g i n a r y A x i s
7.19
num=0.5;den=[1,2,0.5];nyquist(num,den)
-1
-0.8-0.6-0.4-0.200.20.40.60.81
Nyquist Diagram
Real Axis
I m a g i n a r y A x i s
num=50;den=conv([1,5],[1,-2]);nyquist(num,den)
-5
-4.5-4-3.5-3-2.5-2-1.5-1-0.50
-1.5-1
-0.5
0.5
1
1.5
Nyquist Diagram
Real Axis
I m a g i n a r y A x i s。

相关文档
最新文档