clear; % 清除变量
num=100;
den=[1 11 0];
G0s=tf(num,den) %G0(s)的脉冲传递函数
Z=[0.333 0.586];
P=[1 -0.578];
K=3.97;
Dz=zpk(Z,P,K,'Ts',0.1) %控制器D(z)
G0z=c2d(G0s,0.1,'zoh') %G0z=Z(Gh(s)*G0(s))
Gz=Dz*G0z %开环脉冲传递函数
faiz=feedback(Gz,1); %闭环脉冲传递函数,1表示反馈,本题为单位负反馈
%num=[0 0 -710.3 - 1.352e004 - 3.973e004 2.556e005];
%den=[1 81.25 2872 4.63e004 2.557e005 0 ];
Z=[0];
P=[1];
K=3.97;
Hz=zpk(Z,P,K,'Ts',0.1) %控制器D(z)
faiz2=faiz*Hz;
t=0:0.1:10;
c=step(faiz2,t);
plot(t,c,'.',t,t,'-')
grid;
title('Unit-Ramp Response ')
xlabel('t Sec')
ylabel('Input and Output')