Matlab与控制系统仿真部分习题答案.docVIP

  • 121
  • 0
  • 约6.34千字
  • 约 29页
  • 2019-03-26 发布于湖北
  • 举报
【4.2】 程序: num=[5,0];den=conv([1,1],conv([1,2],[1,3])); [numc,denc]=cloop(num,den); [z,p,k]=tf2zp(numc,denc); [A,B,C,D]=tf2ss(numc,denc); g_zp=zpk(z,p,k) g_tf=tf(numc,denc) g_ss=ss(A,B,C,D) 运行结果: Zero/pole/gain: 5 s ---------------------------------- (s+0.4432) (s^2 + 5.557s + 13.54) Transfer function: 5 s ---------------------- s^3 + 6 s^2 + 16 s + 6 a = x1 x2 x3 x1 -6 -16 -6 x2 1 0 0 x3 0 1 0 b = u1 x1 1 x2 0 x3 0 c = x1 x2 x3 y1 0 5 0 d = u1 y1 0 【4.3】程序: A=[0 0 0 -1;1 0 0 -2;0 1 0 -3;0 0 1 -4]; B=[0;0;0;1]; C=[1 0 0 0]; g_ss=ss(A,B,C,D) [num,den]=ss2tf(A,B,C,D); g_tf=tf(num,den) [z,p,k]=ss2zp(A,B,C,D); g_zpk=zpk(z,p,k) 运行结果: a = x1 x2 x3 x4 x1 0 0 0 -1 x2 1 0 0 -2 x3 0 1 0 -3 x4 0 0 1 -4 b = u1 x1 0 x2 0 x3 0 x4 1 c = x1 x2 x3 x4 y1 1 0 0 0 d = u1 y1 0 Continuous-time model. Transfer function: -3.109e-015 s^3 - s^2 - 3.331e-015 s - 4.441e-016 ------------------------------------------------- s^4 + 4 s^3 + 3 s^2 + 2 s + 1 Zero/pole/gain: - s^2 ---------------------------------------------- (s+0.6724) (s+3.234) (s^2 + 0.0936s + 0.4599) 【5.1】 程序 num=[0,10]; den=conv([1,0],[1,7,17]); [numc,denc]=cloop(num,den,-1); G=tf(numc,denc) [y,t]=step(G); plot(t,y,b-) C=dcgain(G); n=1; while y(n)0.1*C n=n+1; end m=1; while y(m)0.9*C m=m+1; end risetime=t(m)-t(n) [Y,k]=max(y); percentovershoot=100*(Y-C)/C i=length(t); while(y(i)0.98*C)(y(i)1.02*C) i=i-1; end settlingtime=t(i) 运行结果: Transfer function: 10 ----------------------- s^3 + 7 s^2 + 17 s + 10 risetime = 2.7312 percentovershoot = -0.4399 settlingtime = 5.1372 图: 程序 k=[10,100,1000]; t=linspace(1,20,200); num=1; den=conv([1,0],[1,7,17]); for j=1:3; s1=tf(num*k(j),den); sys=feedback(s1

文档评论(0)

1亿VIP精品文档

相关文档