I have inserted the A,B,C, and D matrix which will constitute as my state-space model. the issue that i have is that i am able to display the bode plot for sys_2 but not for sys_3. It seems that the system is not working for some reason for sys_2 and the values are all zero. I am not sure as to what i am doing wrong. what i did notice is that the numerator in sys_3 is all 0 but i am not sure as to what that would mean or as to how i would fix it.
for reference:
This is the state space equation for the vehicle body : ((-ks1-ks2)/ms) (-(cs1-cs2)/ms) ((ks1*lf-ks2*lr)/ms) ((cs1*lf-cs2*lr)/ms) (ks1/ms) (cs1/ms) (ks2/ms) (cs2/ms);
This is the state-space equation for the front axle :(ks1/mu1) (cs1/mu1) (-ks1*lf/mu1) (-cs1*lf/mu1) (-(ks1/mu1)-(kt1/mu1)) (-cs1/mu1) 0 0;
This is the state-space equation for the rear axle : (ks2/mu2) (cs2/mu2) (ks2*lr/mu2) (cs2*lr/mu2) (-(ks2/mu2)-(kt2/mu2)) (-cs2/mu2) 0 0
i do not require this equation and so it is not needed for my bode plot: (((ks2*(lf*2))/is)-((cs2*(lr*2))/is)) (((cs1*(lf))/is)-((cs2*(lr))/is)) (((-ks1*(lf*2))/is)+((ks2*(lr*2))/is)) (((-cs1*(lf*2))/is)-((cs2*(lr*2))/is)) (-ks1*lf/is) (-cs1*lf/is) (-ks2*lr/is) (-cs2*lr/is)
i am looking to show the bode plot of the vehicle body ( unsprung mass) and the axles( front and rear). so its basically 2 bode plots. any help is appreciated. as of now i can only display the bode plot of sys_2 and not sys_3 as sys_3 apparently has zero value based on what i can see.
ks1=34500;
ks2=53400;
ms=1341;
mu1=210;
mu2=165;
cs1=3504;
cs2=4930;
lf=1.22;
lr=1.58;
kt1=250000;
kt2=326880;
is=(1.24^2)*(1341);
A = [0 1 0 0 0 0 0 0;
((-ks1-ks2)/ms) (-(cs1-cs2)/ms) ((ks1*lf-ks2*lr)/ms) ((cs1*lf-cs2*lr)/ms) (ks1/ms) (cs1/ms) (ks2/ms) (cs2/ms);
0 0 0 1 0 0 0 0;
(((ks2*(lf*2))/is)-((cs2*(lr*2))/is)) (((cs1*(lf))/is)-((cs2*(lr))/is)) (((-ks1*(lf*2))/is)+((ks2*(lr*2))/is)) (((-cs1*(lf*2))/is)-((cs2*(lr*2))/is)) (-ks1*lf/is) (-cs1*lf/is) (-ks2*lr/is) (-cs2*lr/is);
0 0 0 0 0 1 0 0;
(ks1/mu1) (cs1/mu1) (-ks1*lf/mu1) (-cs1*lf/mu1) (-(ks1/mu1)-(kt1/mu1)) (-cs1/mu1) 0 0;
0 0 0 0 0 0 0 1;
(ks2/mu2) (cs2/mu2) (ks2*lr/mu2) (cs2*lr/mu2) (-(ks2/mu2)-(kt2/mu2)) (-cs2/mu2) 0 0];
B = [0 0;0 0;0 0;0 0;0 0;(kt1/mu1) 0;0 0;(kt2/mu2) 0];
C = [1 0 0 0 0 0 0 0; 0 0 0 0 1 0 0 0; 0 0 0 0 0 0 1 0];
D = [0 0;0 0;0 0];
sys_1 = ss(A,B,C,D);
[num1,den1] = ss2tf(A,B,C,D,1);
[num2,den2] = ss2tf(A,B,C,D,2);
sys_2 = tf(num1(1,:),den1(1,:));
sys_3 = tf(num2(1,:),den2(1,:));
step(sys_2,sys_3);
bode(sys_2,sys_3);