Info
此问题已关闭。 请重新打开它进行编辑或回答。
Change from continuous model to discrete model
2 次查看(过去 30 天)
显示 更早的评论
This is my code describe continuous system
%Parameter Massa
m1 = 8095; % massa train set 1 dalam kg
m2 = 8500; % massa train set 2 dalam kg
g = 10;
%Parameter Gaya
f1 = 205.10^3; % dalam N
f2 = 302.10^3; % dalam N
c_0_1 = 0.01176;
c_1_1 = 0.00077616;
c_2_1 = 4.48 ;
c_0_2 = 0.01176 ;
c_1_2 = 0.00077616;
c_2_2 = 4.48;
v_0 = 300;
hstar = 120;
a_1 = -1./m1.*(c_1_1 + 2.*c_2_1.*v_0);
a_2 = -1./m2.*(c_1_2 + 2.*c_2_2.*v_0);
a_1_head = 1-(a_1.*hstar);
a_2_head = 1-(a_2.*hstar);
b = 1;
p_1 = -1./m1.*(c_0_1 - c_2_1.*(v_0).^2);
p_2 = -1./m2.*(c_0_2 - c_2_2.*(v_0).^2);
A = [0 a_1_head 0 0;
0 0 0 0;
0 (a_2_head - 1) 0 a_2_head;
0 0 0 0
];
B = [-b.*hstar 0;
b 0;
0 -b.*hstar;
-b b
];
U_t = [f1; f2;];
C = [1 0 0 0;
0 1 0 0;
0 0 1 0;
0 0 0 1;];
W = [((a_1 - 1).*v_0) - (p_1.*hstar);
0;
((a_2 - 1).*v_0) - (p_2.*hstar);
((a_1 - 1).*v_0) - (p_1.*hstar);
];
W in my continuous system i assume as D
i want to change to discrete use this code
first i find the ss_model
ss_model = ss(double(A),double(B),C,W);
But there is an error
Error using ss (line 345)
The values of the "b" and "d" properties must be matrices with the same number of columns.
Error in AREtrial2 (line 66)
ss_model = ss(double(A),double(B),C,W);
The plan after i get the ss_model i use c2d to convert to discrete model
d_sys = c2d(ss_model,0.1);
But before i use c2d i need help about the error
and is that right my methode to change from continuous model to discrete model
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!