How quarter car modeling on MATLAB?
32 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1240747/image.jpeg)
I am trying to model the quarter suspension model in Inman's engineering vibration book in MATLAB, but I have not made any progress. The vehicle will move on the sinusoidal path as in the figure and the height of the road is 5 cm.
I want to plot the largest vibration amplitude of the vehicle for the speed range v=[0 200] km/h and the total vibration for r=0.3 for the time interval t=[0 20] s. The average vehicle weight will be M=1000 kg. I predict the spring stiffness to be K=140 kN/m, damping coefficient c=900 Ns/m.
2 个评论
Image Analyst
2022-12-22
Do you have any formulas at all? The Crystal Ball Toolbox is still under development so I cannot currently see your engineering vibration book.
采纳的回答
Sam Chak
2022-12-23
编辑:Sam Chak
2022-12-23
I prefer the simulation-based numerical solution over the formula-based analytical solution in the example because there is no graph provided in your image.
By Newton's 2nd law, we should get
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1241202/image.png)
where the disturbance force
caused by the wavy road surface is given by
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1241207/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1241212/image.png)
Thus, the model can be rewritten as
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1241217/image.png)
where the road surface is given by
. I believe you can use calculus to find
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1241222/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1241227/image.png)
The following is based on the info in Example 2.4.2 (provided by you).
tspan = linspace(0, 20, 20001);
x0 = [0 0]; % initial rest condition
[t, x] = ode45(@quarterCar, tspan, x0);
plot(t, x(:,1)), grid on, xlabel('Time, [seconds]'), ylabel('Deflection, [meter]')
title('Deflection experienced by the car')
% Maximum deflection experienced by the car (same as in Example 2.4.2)
dmax = max(x(:,1)) - min(x(:,1))
% Quarter Car suspension model
function xdot = quarterCar(t, x)
xdot = zeros(2, 1);
% Example 2.4.2
m = 1007; % mass of car
c = 2000; % damping coefficient
k = 4e4; % stiffness coefficient
h = 1; % road height in cm
v = 20; % car velocity (fixed speed)
% Original Problem
% m = 1000; % mass of car
% c = 900; % damping coefficient
% k = 140e3; % stiffness coefficient
% h = 5; % road height in cm
% v = (200/20)*t; % car velocity ramp up from 0 to 200 km/h in 20 seconds
% Standard formulas and state-space model (1st-order ODE form)
wb = 0.2909*v; % formula given in Example 2.4.2
a = (h/2)/100; % sinusoidal amplitude in m
d = k*a*sin(wb*t) + c*a*wb*cos(wb*t); % disturbance due to wavy road surface
A = [0 1; -k/m -c/m]; % state matrix
B = [0; 1/m]; % input matrix
xdot = A*x + B*d;
end
12 个评论
更多回答(1 个)
Sulaymon Eshkabilov
2022-12-23
Hi,
Your system equation is: M*ddx+C*dx+K*x = F(t) and you are studying a forced vibration.
There are a few different ways how to model and solve this spring-mass-damper system.
(1) To obtain an analytical solution, use a symbolic math function: dsolve()
(2) To obtain an analytical solution, use symbolic math functions: laplace(), ilaplace()
(3) To obtain a numerical solution, use ode solvers: ode45, ode23, ode113, etc
(4) To obtain a numerical solution, use Simulink modelling: ode45, ode23, ode113, etc
(5) To obtain a numerical solution, write a code using Euler, Runge-Kutta and other methods
(6) To obtain a numerical solution, use control toolbox functions: tf(), lsim()
There are a few nice sources how to model and solve this spring-mass-damper system.
(6) https://www.mathworks.com/matlabcentral/fileexchange/95288-mass-spring-damper-1-dof
Nice sim demo: https://www.mathworks.com/matlabcentral/fileexchange/94585-mass-spring-damper-systems
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assembly 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!