%File ham chinh deds0.m function zc=dedW0(t,y)
global wn %Khai bao bien toan bo
%Khoi luong va mo men quan tinh cua cac bo phan (kg), (kg.m2)
Ml=40*10^3; m=1.12*10^3; J=[Ml*(2*7+5)^2]/12; j=720;
%Do cung cua lo xo va do can nhot cua giam chan(N/m), (Ns/m)
kt=2.36*10^6; kb=2.13*10^6; ct=120*10^3;cb=30*10^3;
% Van toc cua toa xe (m/s)
v=(100*1000)/3600;
%Tan so goc kich thich tu mat duong (rad/s)
w=(2*3.14*v)/12.5;
%Khoang cach cua 2 truc va hai coi chuyen(m)
L=7; l=1.1;
%Chieu dai mot doan ray(m)
Lr=12.5;
%Phuong trinh nhap nho mat duong duoi cac banh xe
y1=0.015*sin(w*t);
y4=0.015*sin(w*t-8.134);
%Van toc cua nhap nho mat duong duoi cac banh xe
y1c=0.015*w*cos(w*t); y2c=0.015*w*cos(w*t-1.106); y3c=0.015*w*cos(w*t-7.037); y4c=0.015*w*cos(w*t-8.134); %Ma tran F F1=kb*(y1+y2)+cb*(y1c+y2c); F2=l*kb*(y1-y2)+cb*(y1c-y2c); F3=0; F4=0; F5=kb*(y3+y4)+cb*(y3c+y4c); F6=l*kb*(y3-y4)+cb*(y3c-y4c);
% Ma tran quan tinh
M=[m 0 0 0 0 0; 0 j 0 0 0 0; 0 0 Ml 0 0 0; 0 0 0 J 0 0; 0 0 0 0 m 0; 0 0 0 0 0 j];
%Ma tran do cung
K=[2*kb+kt 0 -kt -L*kt 0 0; 0 2*l^2*kb 0 0 0 0; -kt 0 2*kt 0 -kt 0; -L*kt 0 0 2*L^2*kt L*kt 0; 0 0 -kt L*kt 2*kb+kt 0; 0 0 0 0 0 2*(l^2)*kb];
%Ma tran can nhot
C=[2*cb+ct 0 -ct -L*ct 0 0; 0 2*(l^2)*cb 0 0 0 0; -ct 0 2*ct 0 -ct 0; -L*ct 0 0 2*L^2*ct L*ct 0; 0 0 -ct L*ct 2*cb+ct 0; 0 0 0 0 0 2*(l^2)*cb];
% Vector luc kich thich
F=[F1 F2 F3 F4 F5 F6]';
O1=zeros(6); % Ma tran 0 co 6x6
Mn=inv(M); % Ma tran nghich dao cua [M]
E=eye(6); % Ma tran don vi co 6x6
O2=zeros(6,1); % Vecto 0 co 5x1
[X,W]=eig(K,M); % Xac dinh vecto rieng va tri rieng cua he
wn=sqrt(W); % Tan so dao dong tu do cua he % Ma tran [A]
A=[O1 E;-Mn*K -Mn*C];
% Vec to f0
f0=Mn*F;
% Vec to f
f=[O2;f0];
% Phuong trinh trang thai
zc=A*y+f;
%File chinh dedW.m
%CHUONG TRINH TINH DAO DONG CUA HE NHIEU BAC TU DO global wn %Khai bao bien toan bo
tf=6; %Thoi gian dao dong
z0=[0 .0 0 .0 0 .0 0 .0 0 .0 0 .0]'; %Dieu kien ban dau
[t,z]=ode45('dedW0',tf,z0);
% tinh do em diu toa xe khach % Van toc cua toa xe (m/s)
v=(100*1000)/3600;
%Tan so goc kich thich tu mat duong (rad/s)
w=(2*3.14*v)/12.5;
%Khoang cach cua 2 truc va hai coi chuyen(m)
L=7; l=1.1;
%Chieu dai mot doan ray(m)
Lr=12.5;
n=v/Lr; % tan so dao dong cua he
X=z(:,3)+L*z(:,4); % bien do dao dong cua than xe
n1=size(X);
Xmax=max(X(n1-500:n1)) % bien do max
disp('Do em diu cua toa xe la: ') W=2.7*(Xmax*0.325*n^7)^(1/10)
Do em diu cua toa xe la: W =
2.6344