Azzera filtri
Azzera filtri

I have created a state space model for a pitch and bounce model of a vehicle, and I need help figuring out why one of my bode plots is not working and the other one is.

7 visualizzazioni (ultimi 30 giorni)
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);

Risposte (1)

Sam Chak
Sam Chak il 16 Gen 2023
I provided some explanations below based on your queries about sys_2 and sys_3.
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);
% State-space
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)
sys_1 = A = x1 x2 x3 x4 x5 x6 x7 x8 x1 0 1 0 0 0 0 0 0 x2 -65.55 1.063 -31.53 -2.621 25.73 2.613 39.82 3.676 x3 0 0 0 1 0 0 0 0 x4 55.64 -1.704 41.01 -11.7 -20.41 -2.073 -40.92 -3.778 x5 0 0 0 0 0 1 0 0 x6 164.3 16.69 -200.4 -20.36 -1355 -16.69 0 0 x7 0 0 0 0 0 0 0 1 x8 323.6 29.88 511.3 47.21 -2305 -29.88 0 0 B = u1 u2 x1 0 0 x2 0 0 x3 0 0 x4 0 0 x5 0 0 x6 1190 0 x7 0 0 x8 1981 0 C = x1 x2 x3 x4 x5 x6 x7 x8 y1 1 0 0 0 0 0 0 0 y2 0 0 0 0 1 0 0 0 y3 0 0 0 0 0 0 1 0 D = u1 u2 y1 0 0 y2 0 0 y3 0 0 Continuous-time state-space model.
Explanation #1
Look at your Input Matrix above. The entire column for the Input Signal are filled with zeros. This means that has no effect on the system. That's why the transfer function sys_3 is zero.
[num1,den1] = ss2tf(A,B,C,D,1);
[num2,den2] = ss2tf(A,B,C,D,2);
sys_2 = tf(num1(1,:),den1(1,:))
sys_2 = 1.039e04 s^5 + 2.48e05 s^4 + 1.209e06 s^3 - 1.327e06 s^2 + 3.84e07 s + 2.618e08 ------------------------------------------------------------------------------------------------------------- s^8 + 27.32 s^7 + 1523 s^6 + 1.839e04 s^5 + 5.049e05 s^4 + 1.034e07 s^3 + 4.92e07 s^2 + 9.102e07 s + 5.237e08 Continuous-time transfer function.
sys_3 = tf(num2(1,:),den2(1,:))
sys_3 = 0 Continuous-time transfer function.
step(sys_2,sys_3);
bode(sys_2,sys_3);
Explanation #2
Look at the eigenvalues of Matrix above. Some have positive real parts. That means that system is unstable. This can also be verified from the poles of sys_2.
eig(A)
ans =
-11.5574 +32.4538i -11.5574 -32.4538i 7.8309 +19.9411i 7.8309 -19.9411i -13.9416 + 0.0000i -6.3666 + 0.0000i 0.2185 + 3.2838i 0.2185 - 3.2838i
pole(sys_2)
ans =
-11.5574 +32.4538i -11.5574 -32.4538i 7.8309 +19.9411i 7.8309 -19.9411i -13.9416 + 0.0000i -6.3666 + 0.0000i 0.2185 + 3.2838i 0.2185 - 3.2838i

Categorie

Scopri di più su Programming in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by