www.pudn.com > controlsystem.ZIP > EX3007.M
% Example 3.7
%
% Continue system
disp('Continue System')
k=6;
z=[-3];
p=[-1,-2,-5];
[a,b,c,d]=zp2ss(z,p,k)
% Discrete system
t=0.1;
disp('Discrete System -- using c2d ')
[a1,b1]=c2d(a,b,t)
disp('Discrete System -- using c2dm with zoh ')
[a2,b2,c2,d2]=c2dm(a,b,c,d,t,'zoh')
disp('Discrete System -- using c2dm with foh ')
[a3,b3,c3,d3]=c2dm(a,b,c,d,t,'foh')
disp('Discrete System -- using c2dm with Tustin ')
[a4,b4,c4,d4]=c2dm(a,b,c,d,t,'tustin')
% the result
Continue System
a =
-1.0000 0 0
2.0000 -7.0000 -3.1623
0 3.1623 0
b =
1
1
0
c =
0 0 1.8974
d =
0
Discrete System -- using c2d
a1 =
0.9048 0 0
0.1338 0.4651 -0.2237
0.0243 0.2237 0.9602
b1 =
0.0952
0.0784
0.0135
Discrete System -- using c2dm with zoh
a2 =
0.9048 0 0
0.1338 0.4651 -0.2237
0.0243 0.2237 0.9602
b2 =
0.0952
0.0784
0.0135
c2 =
0 0 1.8974
d2 =
0
Discrete System -- using c2dm with foh
a3 =
0.9048 0 0
0.1338 0.4651 -0.2237
0.0243 0.2237 0.9602
b3 =
0.0906
0.0611
0.0240
c3 =
0 0 1.8974
d3 =
0.0089
Discrete System -- using c2dm with Tustin
a4 =
0.9048 0 0
0.1385 0.4545 -0.2300
0.0219 0.2300 0.9636
b4 =
0.9524
0.7965
0.1259
c4 =
0.0021 0.0218 0.1863
d4 =
0.0119