Skip to content

jscans12/chassis-dynamics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chassis-Dynamics

Prerequisites

You must have MATLAB R2019a or later (earlier versions may work but are untested), and also must have the h5io package on your MATLAB path. The h5io package can be found either on GitHub or the MATLAB FileExchange.

Examples

This repository comes with several example files, as described below:

Contents

Create a world model:

  • examples/sim_models/environments/warm_day.m

Create a road model:

  • examples/sim_models/roads/cobblestone.m

Create a vehicle model:

  • examples/sim_models/vehicles/minivan.m

Run a sample simulation:

  • examples/send_it.m - go over a jump, demonstrate wheel contact
  • examples/left_side_speedbump.m - starts left front wheel on a speed bump, demonstrate IC solver
  • examples/skidpad_and_bump.m - hits a speed bump while turning, demonstrates lateral acceleration
  • examples/cobblestone_road.m - runs the cobblestone road, demonstrates time consuming solve

Sample output

Here we run the sample file examples/send_it.m to test an example simulation. The required dependencies should be included in the repository. Upon running the simulation, a results file called "simulation.hdf5" will be created on the user's desktop. Additionally, two plots and one video file will be created. The plots allow the user to inspect CG and wheel motion, while the video file is a full visualization of the simulation.

Sample Plots:

CG Motion Wheel Motion

Screenshot of Video:

Video Capture

Model Overview

This is a chassis simulation tool written purely in MATLAB. It is currently intended to primarily simulate ride dynamics. Note all units are assumed to be in SI.

Vehicle Model

Currently the only available model is the "simple_car", which is a 4-corner car model. It includes suspension components found in most road vehicles.

Chassis Model

The tire is modelled as a spring/damper in parallel. Tire outer diameter is intersected with the road profile. The point of greatest vertical penetration into the circle is used to define ground profile input to the model.

Tire Model

The following parameters are needed to create a typical simple vehicle model, but some level of front/rear asymmetry is supported by the code if needed:

Dimensional

  • Wheelbase
  • Track width

Inertial

  • Sprung mass
  • Sprung moment of inertia
  • CG location from front axle and ground plane
  • Front unsprung mass
  • Rear unsprung mass

Aerodynamic

  • Aerodynamic center of pressure
  • Aerodynamic scaled coefficients

Suspension, Corners

  • Front spring rate
  • Rear spring rate
  • Front damping coefficient
  • Rear damping coefficient
  • Front motion ratio
  • Rear motion ratio

Suspension, Roll

  • Front antiroll rate
  • Rear antiroll rate

Tires

  • Tire radius
  • Tire spring rate
  • Tire damping coefficient

World Model

The external world is modeled with simple ambient conditions:

  • Temperature
  • Atmospheric pressure
  • Relative humidity

Road Model

Currently the only available road model is the "simple_road", which prescribes a path for the vehicle as described below. The path must include the following vectors:

  • Time
  • Distance forward
  • Yaw rate
  • Left road profile vertical displacement
  • Right road profile vertical displacement

The above described parameters are sufficient to create a ride dynamics simulation.

Solver Overview

Currently the only available solver is the "roadload" solver, which simulates ride dynamics. This will be described below.

Solution Formulation

In general, we put the problem in state-space formulation and solve in MATLAB using ODE45. The equations below detail how to reformulate the typical equations of motion for use with this solver, which in general requires some matrix partitioning.

EOM

Mass, stiffness, and damping matrices come from the vehicle model detailed above. An eventual goal of this page will be to detail the derivation of the matrices, but I lost those notes so the code will have to suffice for the time being. See the KGG, MGG, and BGG functions in the class chassis_dynamics.sequence.roadload.residual for more details on the final form of these matrices in the meantime. The only nonlinearity included at the moment is tire contact with the road, which causes occasional updates of the stiffness and damping matrices.

About

Chassis dynamics simulation tool written in MATLAB

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages