MATLAB & Simulink for Dynamic System Analysis & Control

by

 

19 Dec 2007 (Updated )

An instruction package for Control Toolbox, Simulink and SimMechanics in Mech. Eng. Control Course

car_suspension_init.m
L1=1;
L2=1.5;
L=L1+L2;
I_G=.1;
m=3;

k1=100;
c1=2;
k2=50;
c2=1.5;

v=10;
IC=[0 0 0 0]';

E=[1 0    0     0
   0 1    0     0
   0 0 m*L2/L m*L1/L
   0 0  I_G/L  -I_G/L];

a=[ 0     0      1      0
    0     0      0      1
  -k1    -k2    -c1    -c2
 -L1*k1 L2*k2 -L1*c1 L2*c2];

b=zeros(4,4);
b(3:4,:)=[k1    c1     k2     c2
        L1*k1 L1*c1 -L2*k2 -L2*c2];
    
A=inv(E)*a;
B=inv(E)*b;

C=[1   0   0  0
   0   1   0  0
 L2/L L1/L 0  0
  1/L -1/L 0  0];

D=zeros(4,4);

sys=dss(a,b,C,D,E);

Contact us