Suspension simulation guide: Difference between revisions

From GTMS
Line 26: Line 26:
* '''Step Function''' (step): computes and plots the step response of a dynamic system. step automatically determines the time steps and duration of the simulation based on the system dynamics. The input is a transfer function and the output is a plot of ___ over time.  
* '''Step Function''' (step): computes and plots the step response of a dynamic system. step automatically determines the time steps and duration of the simulation based on the system dynamics. The input is a transfer function and the output is a plot of ___ over time.  
** Example
** Example
*** input: B=step(X)
*** input: S=step(X)
*** output: figure __
*** output: figure __
*'''Bode Function''' (bode): computers and plots bode frequency response. The input is a transfer function and the output is a plot of phase (deg) and magnitude (dB) over frequency (rad/s)
*'''Bode Function''' (bode): computers and plots bode frequency response. The input is a transfer function and the output is a plot of phase (deg) and magnitude (dB) over frequency (rad/s)
**Example
*** input: B=bode(X)
*** output: figure __


== Quarter car ==
== Quarter car ==
We will first explore the quarter car code.
We will first explore the quarter car code.

Revision as of 23:52, 24 October 2025

Quarter car freebody diagram

This is general suspension simulation guide. The force of springs is Fs=-kx. The force of dampers is Fd=-cv. We will be using dot notion to represent derivatives. For example, if x denotes position of a object, ẋ (x-dot) is the velocity of the object, and (x-double-dot) is the acceleration of the object.

Quarter Car

The simplest form to explain the physics of suspension simulation is the quarter car. A quarter car model contains the sprung mass (chassis), coilover spring, the damper (dashpot), unsprung mass, and the tire spring. The tire spring exist because... the tire is a spring and has a stiffness. The sprung mass is supported by the coilover spring and the damper which are connected to the unsprung mass. The unsprung mass is supported by the tire spring.

Coding

All MATLAB files can be found on our Github under the vehicle_sim repository.

Toolboxes

Go to Home -> Environment -> Add-Ons -> Get Add-Ons. Search for and install the following toolboxes:

  • Control System Toolbox
  • DSP System Toolbox
  • Model Predictive Control Toolbox
  • RF Toolbox
  • Signal Processing Toolbox
  • Communications Toolbox

Important MATLAB functions

  • Transfer Function (tf): The first input of the transfer function is the numerator and the second is the denominator. Each input is split into coefficients for descending powers of 's'. The output of the tf function is a ratio of polynomials in the Laplace variable 's'. This output can then be analyzed for system properties.
    • Example:
      • input: num=[2 5] dem=[1 2 3] X = tf(num, dem)
      • output: X=2s+51s2+2s+3
  • Step Function (step): computes and plots the step response of a dynamic system. step automatically determines the time steps and duration of the simulation based on the system dynamics. The input is a transfer function and the output is a plot of ___ over time.
    • Example
      • input: S=step(X)
      • output: figure __
  • Bode Function (bode): computers and plots bode frequency response. The input is a transfer function and the output is a plot of phase (deg) and magnitude (dB) over frequency (rad/s)
    • Example
      • input: B=bode(X)
      • output: figure __

Quarter car

We will first explore the quarter car code.