请参看,不知对否!
[n1,d1]=pade(0.72,4);
[n3,d3]=pade(0.3,4);
[n4,d4]=pade(1.29,4); %%%Simulate time delay by pade
num1=[0.1134];
den1=[1.78,4.48,1];
num1=conv(n1,num1);
den1=conv(d1,den1);
sys1=tf(num1,den1); %%%Computer sys1 tf
num2=[0.924];
den2=[2.07,1];
sys2=tf(num2,den2); %%%Computer sys2 tf
num3=[0.337];
den3=[0.361,1.09,1];
num3=conv(n3,num3);
den3=conv(d3,den3);
sys3=tf(num3,den3); %%%Computer sys3 tf
num4=[-0.318];
den4=[2.93,1];
num1=conv(n4,num4);
den1=conv(d4,den4);
sys4=tf(num4,den4); %%%Computer sys4 tf
sys=[sys1,sys2;sys3,sys4];
figure;
step(sys); %%%Step response
% u1=1-e(-t)sin(3t+1),u2=sin(t)cos(t+2)
t=0:0.01:5;
u1=1-exp(-t).*sin(3*t+1);
u2=sin(t).*cos(t+2); %%% Input signal
u=[u1;u2];
figure;
y=lsim(sys,u,t);
plot(t,y); %%% Output figure |