Vehicle Body
Two-axle vehicle with longitudinal dynamics and motion and adjustable mass, geometry, and drag properties
- Library:
Simscape / Driveline / Tires & Vehicles
Description
The Vehicle Body block represents a two-axle vehicle body in longitudinal motion. The vehicle can have the same or a different number of wheels on each axle. For example, two wheels on the front axle and one wheel on the rear axle. The vehicle wheels are assumed identical in size. The vehicle can also have a center of gravity (CG) that is at or below the plane of travel.
The block accounts for body mass, aerodynamic drag, road incline, and weight distribution between axles due to acceleration and road profile. Optionally include pitch and suspension dynamics. The vehicle does not move vertically relative to the ground.
The block has an option to include an externally-defined mass and an externally-defined inertia. The mass, inertia, and center of gravity of the vehicle body can vary over the course of simulation in response to system changes.
Model
The vehicle axles are parallel and form a plane. The longitudinal, x, direction lies in this plane and perpendicular to the axles. If the vehicle is traveling on an incline slope, β, the normal, z, direction is not parallel to gravity but is always perpendicular to the axle-longitudinal plane.
This figure and table define the vehicle motion model variables.
Vehicle Dynamics and Motion
Vehicle Model Variables
Symbol | Description |
---|---|
g | Gravitational acceleration |
β | Incline angle |
m | Mass of the vehicle |
h | Height of vehicle center of gravity (CG) above the ground |
a, b | Distance of front and rear axles, respectively, from the normal projection point of vehicle CG onto the common axle plane |
Vx | Velocity of the vehicle. When Vx > 0, the vehicle moves forward. When Vx < 0, the vehicle moves backward. |
Vw | Wind speed. When Vw > 0, the wind is headwind. When Vw < 0, the wind is tailwind. |
n | Number of wheels on each axle |
Fxf, Fxr | Longitudinal forces on each wheel at the front and rear ground contact points, respectively |
Fzf, Fzr | Normal load forces on each wheel at the front and rear ground contact points, respectively |
A | Effective frontal vehicle cross-sectional area |
Cd | Aerodynamic drag coefficient |
ρ | Mass density of air |
Fd | Aerodynamic drag force |
Equations
The vehicle motion is a result of the net effect of all the forces and torques acting on it. The longitudinal tire forces push the vehicle forward or backward. The weight mg of the vehicle acts through its center of gravity (CG). Depending on the incline angle, the weight pulls the vehicle to the ground and pulls it either backward or forward. Whether the vehicle travels forward or backward, aerodynamic drag slows it down. For simplicity, the drag is assumed to act through the CG.
Zero normal acceleration and zero pitch torque determine the normal force on each front and rear wheel.
The wheel normal forces satisfy .
If you include an externally-defined mass or inertia, the equations are shifted by the weighted value of the input.
Pitch acceleration depends on three torque components and the inertia of the vehicle:
Where:
ɑ is the pitch acceleration.
f is the longitudinal force.
h is the height of the center of gravity when measured parallel to the z-axis.
J is the inertia.
If you choose a linear model for suspension stiffness and damping, the block uses small angle approximation for pitch calculations. If you choose a table lookup model, the block uses the vectors that you specify calculate pitch dynamics. For hard stop equations, see Translational Hard Stop.
Variables
Use the Variables tab to set the priority and initial target values for the block variables before simulating. For more information, see Set Priority and Initial Target for Block Variables.
Limitations and Assumptions
The Vehicle Body block lets you model only longitudinal dynamics, parallel to the ground and oriented along the direction of motion. The vehicle is assumed to be in pitch and normal equilibrium. The block does not model pitch or vertical movement. As such, the equations assume that the wheels never lose contact. This constraint can result in negative normal forces.
Ports
Input
W
— Headwind speed, m/s
scalar
Physical signal input port for headwind speed.
beta
— Road incline angle, rad
scalar
Physical signal input port for road incline angle.
CG
— Center of gravity, m
two-element vector
Physical signal input port for the center of gravity, in m, of the externally-defined mass relative to the CG of the vehicle body.
Dependencies
This port is visible only when the Externally-defined
additional mass parameter in the
Main settings is set to
On
.
M
— Mass, kg
scalar
Physical signal input port for the mass, in kg, of the externally-defined mass.
Dependencies
This port is visible only when the Externally-defined
additional mass parameter in the
Main settings is set to
On
.
J
— External moment of inertia, kg*m^2
scalar
Physical signal input port for the moment of inertia, in kg*m^2, of the externally-defined mass.
Dependencies
This port is visible only when the Externally-defined
additional mass parameter in the
Main settings and the Pitch
dynamics parameter in the Pitch
settings are both set to On
.
Output
V
— Longitudinal velocity, m/s
scalar
Physical signal output port for vehicle longitudinal velocity in the vehicle reference frame.
NF
— Front axle normal force, N
scalar
Physical signal output port for normal force on the front axle. Wheel forces are considered positive if acting downwards.
NR
— Rear axle normal force, N
scalar
Physical signal output port for normal force on the rear axle. Wheel forces are considered positive if acting downwards.
Conserving
H
— Horizontal motion
mechanical translational
Conserving port associated with the horizontal motion of the vehicle body. Connect tire traction motion to this port.
Parameters
Main
Mass
— Vehicle mass
1200
kg
(default)
Mass of the vehicle.
Number of wheels per axle
— Wheel count
2
(default) | scalar number or a two-element array
Wheel counts on the front and rear axles. If the input is a scalar
number, the wheel counts of the front and rear axles are assumed the
same. For example, if the input is 2
, then the front
and rear axles are each assumed to have two wheels.
If the input is a two-element array, the first number is the
front-axle wheel count and the second number the rear-axle wheel count.
For example, if the input is the array [2,1]
, then
the front axle is assumed to have two wheels and the rear axle one
wheel.
Horizontal distance from CG to front axle
— CG-to-front axle distance
1.4
m
(default)
Horizontal distance, a, from the center of gravity to the front wheel axle of the vehicle.
Horizontal distance from CG to rear axle
— CG-to-rear axle distance
1.6
m
(default)
Horizontal distance, b, from the center of gravity to the rear wheel axle of the vehicle.
CG height above ground
— CG-to-ground distance
0.5
m
(default)
Distance, h, between the center of gravity of the vehicle and the ground.
Gravitational acceleration
— Gravitational acceleration
9.81
m/s^2
(default)
Acceleration due to gravitational force acting at the center of gravity of the vehicle.
Externally-defined additional mass
— Variable mass option
Off
(default) | On
Option to include as time- or event-variant mass that affects the mass and CG of the vehicle body.
Dependencies
The CG, M, and
J ports are visible only when this
parameter is set to On
. Exposure of the
J port also requires that you select
On
for the Pitch
dynamics parameter in the Pitch
settings.
Negative normal force warning
— Warning
Off
(default) | On
To see a warning when the block calculates negative values for normal
force during simulation, select On
. The block
can generate negative forces because the equations assume that the
wheels never lose contact.
Drag
Frontal area
— Effective cross-sectional area
3
m^2
(default)
Effective cross-sectional area, A, presented by the vehicle in longitudinal motion. The block uses this value to calculate the aerodynamic drag force on the vehicle.
Drag coefficient
— Aerodynamic drag coefficient
0.4
(default)
Aerodynamic drag coefficient, Cd. The block uses this value to calculate the aerodynamic drag force on the vehicle.
Air density
— Ambient air density
1.18
kg/m^3
(default)
Density of the air that surrounds the vehicle.
Pitch
The table shows how the visibility of some parameters depends on the option that you choose for other parameters. To learn how to read the table, see Parameter Dependencies.
Pitch Parameter Dependencies
Pitch | ||
---|---|---|
Pitch dynamics — Choose
Off or
On | ||
Off | On | |
Pitch moment of inertia | ||
Suspension model — Choose
Linear or By table
lookup | ||
Linear | By table lookup | |
Front suspension stiffness | Front suspension stiffness force vector | |
Front suspension damping | Front suspension deformation vector | |
Rear suspension stiffness | Front suspension damping force vector | |
Rear suspension damping | Front suspension velocity vector | |
Rear suspension stiffness force vector | ||
Rear suspension deformation vector | ||
Rear suspension damping force vector | ||
Rear suspension velocity vector | ||
Interpolation method | ||
Extrapolation method | ||
Hard stop — Choose
Off or
On | ||
Off | On | |
Front upper bound | ||
Front lower bound | ||
Front contact stiffness | ||
Front contact damping | ||
Rear upper bound | ||
Rear lower bound | ||
Rear contact stiffness | ||
Rear contact damping | ||
Initial pitch | ||
Initial pitch rate |
Pitch dynamics
— Pitch dynamics modelling
Off
(default) | On
Option to model pitch dynamics.
Dependencies
Selecting On
for this parameter enables
parameters for:
Suspension model
Hard-stop model
Initial pitch conditions
The J port is visible only when this
parameter is set to On
. Exposure of the
J port also requires that you select
On
for the
Externally-defined additional mass
parameter in the Main settings.
For more information, see the Pitch Parameter Dependencies table.
Pitch moment of inertia
— Pitch moment of inertia
4000
kg/m^2
(default) | positive scalar
Moment of inertia for pitch calculations.
Dependencies
This parameter is enabled when you set Pitch
dynamics to On
.
For more information, see the Pitch Parameter Dependencies table.
Suspension model
— Suspension parameterization method
Linear
(default) | Table lookup
Parameterization method for suspension modeling.
You parameterize the suspension using stiffness and damping data. To
specify the data using scalar values, select
Linear
. To specify the data using vector
values, select By table lookup
.
Dependencies
This parameter is enabled when you set Pitch
dynamics to On
.
For more information, see the Pitch Parameter Dependencies table.
Front suspension stiffness
— Front suspension stiffness
1e4
N/m
(default) | positive scalar
Front suspension stiffness per axle.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
Linear
For more information, see the Pitch Parameter Dependencies table.
Front suspension damping
— Front suspension damping
1e4
N/(m/s)
(default) | positive scalar
Front suspension damping per axle.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
Linear
For more information, see the Pitch Parameter Dependencies table.
Rear suspension stiffness
— Rear suspension stiffness
1e4
N/m
(default) | positive scalar
Rear suspension stiffness per axle.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
Linear
For more information, see the Pitch Parameter Dependencies table.
Rear suspension damping
— Rear suspension damping
1e4
N/(m/s)
(default) | positive scalar
Rear suspension damping per axle.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
Linear
For more information, see the Pitch Parameter Dependencies table.
Front suspension stiffness force vector
— Front suspension stiffness force
[-2000, -1000, 0, 1000, 2000]
N
(default) | increasing vector
Stiffness force of the front suspension. Specify the output values for the lookup table as a vector. The number of elements in the output vector must be the same as the number of elements in the input vector. The input vector parameter is the Front suspension deformation vector parameter.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Front suspension deformation vector
— Front suspension deformation
[-.4, -.2, 0, .2, .4]
m
(default) | increasing vector
Deformation of the front suspension specified in terms of displacement. Specify the input values for the lookup table as a vector. The values of the elements in the vector must increase from left to right. The minimum number of elements in the vector depends on the interpolation method that you select. For linear interpolation, provide at least two elements. For smooth interpolation, provide at least three elements. The output vector parameter is the Front suspension stiffness force vector parameter.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Front suspension damping force vector
— Front suspension damping force
[-200, -100, 0, 100, 200]
N
(default) | increasing vector
Damping force of the front suspension. Specify the output values for the lookup table as a vector. The number of elements in the output vector must be the same as the number of elements in the input vector. The input vector parameter is the Front suspension velocity vector parameter.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Front suspension velocity vector
— Front suspension velocity
[-4, -2, 0, 2, 4]
m/s
(default) | increasing vector
Velocity of the front suspension. Specify the input values for the lookup table as a vector. The values of the elements in the vector must increase from left to right. The minimum number of elements in the vector depends on the interpolation method that you select. For linear interpolation, provide at least two elements. For smooth interpolation, provide at least three elements. The output vector parameter is the Front suspension damping force vector parameter.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Rear suspension stiffness force vector
— Rear suspension stiffness force
[-2000, -1000, 0, 1000, 2000]
N
(default) | increasing vector
Stiffness force of the rear suspension. Specify the output values for the lookup table as a vector. The number of elements in the output vector must be the same as the number of elements in the input vector. The input vector parameter is the Rear suspension deformation vector parameter.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Rear suspension deformation vector
— Rear suspension deformation
[-.4, -.2, 0, .2, .4]
m
(default) | increasing vector
Deformation of the rear suspension specified in terms of displacement. Specify the input values for the lookup table as a vector. The values of the elements in the vector must increase from left to right. The minimum number of elements in the vector depends on the interpolation method that you select. For linear interpolation, provide at least two elements. For smooth interpolation, provide at least three elements. The output vector parameter is the Rear suspension stiffness force vector parameter.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Rear suspension damping force vector
— Rear suspension damping force
[-200, -100, 0, 100, 200]
N
(default) | increasing vector
Damping force of the rear suspension. Specify the output values for the lookup table as a vector. The number of elements in the output vector must be the same as the number of elements in the input vector. The input vector parameter is the Rear suspension velocity vector parameter.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Rear suspension velocity vector
— Rear suspension velocity
[-4, -2, 0, 2, 4]
m/s
(default) | increasing vector
Velocity of the rear suspension. Specify the input values for the lookup table as a vector. The values of the elements in the vector must increase from left to right. The minimum number of elements in the vector depends on the interpolation method that you select. For linear interpolation, provide at least two elements. For smooth interpolation, provide at least three elements. The output vector parameter is the Rear suspension damping force vector parameter.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Interpolation method
— Interpolation method
linear
(default) | smooth
Interpolation methods for approximating the output value when the input value is between two consecutive grid points are:
Linear
— Select this default option to get the best performance. Provide at least two values per dimension.Smooth
— Select this option to produce a continuous curve with continuous first-order derivatives. Provide at least three values per dimension.
For more information on interpolation algorithms, see the PS Lookup Table (1D) block reference page.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Extrapolation method
— Extrapolation method
linear
(default) | smooth
Extrapolation method for determining the output value when the input value is outside the range specified in the argument list are:
Linear
— Produces a curve with continuous first-order derivatives in the extrapolation region and at the boundary with the interpolation region.Nearest
— Produces an extrapolation that does not go above the highest point in the data or below the lowest point in the data.
For more information on extrapolation algorithms, see the PS Lookup Table (1D) block reference page.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Suspension model to
By table lookup
For more information, see the Pitch Parameter Dependencies table.
Hard stop
— Hard-stop modeling option
Off
(default) | On
Option to model hardstops for the front and rear suspension.
Dependencies
This parameter is enabled when you set the Pitch
dynamics to On
:
Selecting On
for this parameter enables
parameters for the front and rear hard stops:
Upper bound
Lower bound
Contact stiffness
Contact damping
For more information, see the Pitch Parameter Dependencies table.
Front upper bound
— Hardstop front suspension upper bound
.25
(default)
Upper bound of the hard stop for the front suspension.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Hard stop to
On
For more information, see the Pitch Parameter Dependencies table.
Front lower bound
— Vehicle front lower bound
-.25
(default)
Lower bound of the hard stop for the front suspension.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Hard stop to
On
For more information, see the Pitch Parameter Dependencies table.
Front contact stiffness
— Vehicle front contact stiffness
1e6
(default)
Contact stiffness of the hard stop for the front suspension.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Hard stop to
On
For more information, see the Pitch Parameter Dependencies table.
Front contact damping
— Vehicle front contact damping
150
(default)
Contact damping of the hard stop for the front suspension.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Hard stop to
On
For more information, see the Pitch Parameter Dependencies table.
Rear upper bound
— Vehicle rear upper bound
.25
(default)
Upper bound of the hard stop for the rear suspension.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Hard stop to
On
For more information, see the Pitch Parameter Dependencies table.
Rear lower bound
— Vehicle rear lower bound
-.25
(default)
Lower bound of the hard stop for the rear suspension.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Hard stop to
On
For more information, see the Pitch Parameter Dependencies table.
Rear contact stiffness
— Vehicle rear contact stiffness
1e6
(default)
Contact stiffness of the hard stop for the rear suspension.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Hard stop to
On
For more information, see the Pitch Parameter Dependencies table.
Rear contact damping
— Vehicle rear contact damping
150
(default)
Contact damping of the hard stop for the rear suspension.
Dependencies
This parameter is enabled when you set both of these options:
Pitch dynamics to
On
Hard stop to
On
For more information, see the Pitch Parameter Dependencies table.
Initial pitch
— Pitch at the beginning of the simulation
0
rad
(default)
Pitch at the beginning of the simulation.
Dependencies
This parameter is enabled when you set Pitch
dynamics to On
.
For more information, see the Pitch Parameter Dependencies table.
Initial pitch rate
— Pitch rate at the beginning of the simulation
0
rad/s
(default)
Pitch rate at the beginning of the simulation.
Dependencies
This parameter is enabled when you set Pitch
dynamics to On
.
For more information, see the Pitch Parameter Dependencies table.
Model Examples
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)