Trailer body with translational and rotational motion
Vehicle Dynamics Blockset / Vehicle Body
The Trailer Body 6DOF block implements a rigid twoaxle or threeaxle trailer body model that calculates longitudinal, lateral, vertical, pitch, roll, and yaw motion. The block accounts for body mass, inertia, aerodynamic drag, road incline, and weight distribution between the axle hardpoint locations due to suspension and external forces and moments.
Use the Inertial Loads parameters to analyze the trailer dynamics under different loading conditions. To specify the number of trailer axles, use the Number of axles parameter.
To create additional input ports, under Input signals, select these block parameters.
Parameter  Input Port  Description 

Front hitch forces  FhF  Hitch force applied to the body at the front hitch location, FhF_{x}, FhF_{y}, and FhF_{z}, in the vehiclefixed frame 
Front hitch moments  MhF  Hitch moment at the front hitch location, MhF_{x}, MhF_{y}, and MhF_{z}, about the vehiclefixed frame 
Rear hitch forces  FhR  Hitch force applied to the body at the rear hitch location, FhR_{x}, FhR_{y}, and FhR_{z}, in the vehiclefixed frame 
Rear hitch moments  MhR  Hitch moment at the rear hitch location, MhR_{x}, MhR_{y}, and MhR_{z}, about the vehiclefixed frame 
To analyze the vehicle dynamics under different loading conditions, use the Inertial Loads parameters. You can specify these loads:
Front end
Overhead
Front left and front right
Rear left and rear right
Rear end
For each of the loads, you can specify the mass, location, and inertia.
The illustrations provide the load locations and vehicle parameter dimensions. The table provides the corresponding location parameter sign settings.
This table summarizes the parameter settings that specify the load locations indicated by the dots. For the location, the block uses this distance vector:
Front axle to load, along the vehiclefixed xaxis
Vehicle centerline to load, along the vehiclefixed yaxis
Front axle to load, along the vehiclefixed zaxis
Load  Parameter  Example Location 

Front end  Distance vector from front axle, z1R 

Overhead  Distance vector from front axle, z2R 

Front left  Distance vector from front axle, z3R 

Front right  Distance vector from front axle, z4R 

Rear left  Distance vector from front axle, z5R 

Rear right  Distance vector from front axle, z6R 

Rear end  Distance vector from front axle, z7R 

To determine the vehicle motion, the block implements calculations for the rigid body vehicle dynamics, wind drag, inertial loads, and coordinate transformations. The bodyfixed and vehiclefixed coordinate systems are the same.
The block considers the rotation of a bodyfixed coordinate frame about a flat earthfixed inertial reference frame. The origin of the bodyfixed coordinate frame is the vehicle center of gravity of the body.
The block uses this equation to calculate the translational motion of the bodyfixed coordinate frame, where the applied forces [F_{x} F_{y} F_{z}]^{T} are in the bodyfixed frame, and the mass of the body, m, is assumed to be constant.
$$\begin{array}{l}{\overline{F}}_{b}=\left[\begin{array}{c}{F}_{x}\\ {F}_{y}\\ {F}_{z}\end{array}\right]=m\left({\dot{\overline{V}}}_{b}+\overline{\omega}\times {\overline{V}}_{b}\right)\\ \\ {\overline{M}}_{b}=\left[\begin{array}{c}L\\ M\\ N\end{array}\right]=I\dot{\overline{\omega}}+\overline{\omega}\times (I\overline{\omega})\\ \\ I=\left[\begin{array}{ccc}{I}_{xx}& {I}_{xy}& {I}_{xz}\\ {I}_{yx}& {I}_{yy}& {I}_{yz}\\ {I}_{zx}& {I}_{zy}& {I}_{zz}\end{array}\right]\end{array}$$
To determine the relationship between the bodyfixed angular velocity vector, [p q r]^{T}, and the rate of change of the Euler angles, $$[\begin{array}{ccc}\dot{\varphi}\text{\hspace{0.05em}}\text{\hspace{0.17em}}& \dot{\theta}\text{\hspace{0.17em}}\text{\hspace{0.05em}}\text{\hspace{0.05em}}& \dot{\psi}\end{array}{]}^{T}$$, the block resolves the Euler rates into the bodyfixed frame.
$$\left[\begin{array}{c}p\\ q\\ r\end{array}\right]=\left[\begin{array}{c}\dot{\varphi}\\ 0\\ 0\end{array}\right]+\left[\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\varphi & \mathrm{sin}\varphi \\ 0& \mathrm{sin}\varphi & \mathrm{cos}\varphi \end{array}\right]\left[\begin{array}{c}0\\ \dot{\theta}\\ 0\end{array}\right]+\left[\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\varphi & \mathrm{sin}\varphi \\ 0& \mathrm{sin}\varphi & \mathrm{cos}\varphi \end{array}\right]\left[\begin{array}{ccc}\mathrm{cos}\theta & 0& \mathrm{sin}\theta \\ 0& 1& 0\\ \mathrm{sin}\theta & 0& \mathrm{cos}\theta \end{array}\right]\left[\begin{array}{c}0\\ 0\\ \dot{\psi}\end{array}\right]\equiv {J}^{1}\left[\begin{array}{c}\dot{\varphi}\\ \dot{\theta}\\ \dot{\psi}\end{array}\right]$$
Inverting J gives the required relationship to determine the Euler rate vector.
$$\left[\begin{array}{c}\dot{\varphi}\\ \dot{\theta}\\ \dot{\psi}\end{array}\right]=J\left[\begin{array}{c}p\\ q\\ r\end{array}\right]\text{\hspace{0.17em}}=\left[\begin{array}{ccc}1& (\mathrm{sin}\varphi \mathrm{tan}\theta )& (\mathrm{cos}\varphi \mathrm{tan}\theta )\\ 0& \mathrm{cos}\varphi & \mathrm{sin}\varphi \\ 0& \frac{\mathrm{sin}\varphi}{\mathrm{cos}\theta}& \frac{\mathrm{cos}\varphi}{\mathrm{cos}\theta}\end{array}\right]\left[\begin{array}{c}p\\ q\\ r\end{array}\right]$$
The applied forces and moments are the sum of the drag, gravitational, external, and suspension forces.
$$\begin{array}{l}{\overline{F}}_{b}=\left[\begin{array}{c}{F}_{x}\\ {F}_{y}\\ {F}_{z}\end{array}\right]=\left[\begin{array}{c}{F}_{d}{}_{{}_{x}}\\ {F}_{d}{}_{{}_{y}}\\ {F}_{d}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{F}_{g}{}_{{}_{x}}\\ {F}_{g}{}_{{}_{y}}\\ {F}_{g}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{F}_{ext}{}_{{}_{x}}\\ {F}_{ext}{}_{{}_{y}}\\ {F}_{ext}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{F}_{FL}{}_{{}_{x}}\\ {F}_{FL}{}_{{}_{y}}\\ {F}_{FL}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{F}_{FR}{}_{{}_{x}}\\ {F}_{FR}{}_{{}_{y}}\\ {F}_{FR}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{F}_{ML}{}_{{}_{x}}\\ {F}_{ML}{}_{{}_{y}}\\ {F}_{ML}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{F}_{MR}{}_{{}_{x}}\\ {F}_{MR}{}_{{}_{y}}\\ {F}_{MR}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{F}_{RL}{}_{{}_{x}}\\ {F}_{RL}{}_{{}_{y}}\\ {F}_{RL}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{F}_{RR}{}_{{}_{x}}\\ {F}_{RR}{}_{{}_{y}}\\ {F}_{RR}{}_{{}_{z}}\end{array}\right]\\ \\ {\overline{M}}_{b}=\left[\begin{array}{c}{M}_{x}\\ {M}_{y}\\ {M}_{z}\end{array}\right]=\left[\begin{array}{c}{M}_{d}{}_{{}_{x}}\\ {M}_{d}{}_{{}_{y}}\\ {M}_{d}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{M}_{ext}{}_{{}_{x}}\\ {M}_{ext}{}_{{}_{y}}\\ {M}_{ext}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{M}_{FL}{}_{{}_{x}}\\ {M}_{FL}{}_{{}_{y}}\\ {M}_{FL}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{M}_{FR}{}_{{}_{x}}\\ {M}_{FR}{}_{{}_{y}}\\ {M}_{FR}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{M}_{ML}{}_{{}_{x}}\\ {M}_{ML}{}_{{}_{y}}\\ {M}_{ML}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{M}_{MR}{}_{{}_{x}}\\ {M}_{MR}{}_{{}_{y}}\\ {M}_{MR}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{M}_{RL}{}_{{}_{x}}\\ {M}_{RL}{}_{{}_{y}}\\ {M}_{RL}{}_{{}_{z}}\end{array}\right]+\left[\begin{array}{c}{M}_{RR}{}_{{}_{x}}\\ {M}_{RR}{}_{{}_{y}}\\ {M}_{RR}{}_{{}_{z}}\end{array}\right]+{\overline{M}}_{F}\end{array}$$
Calculation  Implementation 

Load masses and inertias  The block uses the parallel axis theorem to resolve the individual load masses and inertias with the vehicle mass and inertia. $${J}_{ij}={I}_{ij}+m({\leftR\right}^{2}{\delta}_{ij}{R}_{i}{R}_{j})$$ 
Gravitational forces, F_{g}  The block uses the direction cosine matrix (DCM) to transform the gravitational vector in the inertialfixed frame to the bodyfixed frame. 
Drag forces, F_{d}, and moments, M_{d}  To determine a relative airspeed, the block subtracts the wind speed from the vehicle center of mass (CM) velocity. Using the relative airspeed, the block determines the drag forces. $$\begin{array}{l}\overline{w}=\sqrt{{({\dot{x}}_{b}{w}_{x})}^{2}+{({\dot{x}}_{y}{w}_{x})}^{2}+{({w}_{z})}^{2}}\\ \\ {F}_{dx}=\frac{1}{2TR}{C}_{d}{A}_{f}{P}_{abs}{(}^{\overline{w}}\\ {F}_{dy}=\frac{1}{2TR}{C}_{s}{A}_{f}{P}_{abs}{(}^{\overline{w}}\\ {F}_{dz}=\frac{1}{2TR}{C}_{l}{A}_{f}{P}_{abs}{(}^{\overline{w}}\end{array}$$ Using the relative airspeed, the block determines the drag moments. $$\begin{array}{l}{M}_{dr}=\frac{1}{2TR}{C}_{rm}{A}_{f}{P}_{abs}{(}^{\overline{w}}(a+c)\\ {M}_{dp}=\frac{1}{2TR}{C}_{pm}{A}_{f}{P}_{abs}{(}^{\overline{w}}(a+c)\\ {M}_{dy}=\frac{1}{2TR}{C}_{ym}{A}_{f}{P}_{abs}{(}^{\overline{w}}(a+c)\end{array}$$ 
External forces, F_{in}, and moments, M_{in}  The external forces and moments are input via ports FExt and MExt. 
Suspension forces and moments  The block assumes that the suspension forces and moments act on these hardpoint locations:

The equations use these variables.
$$x,\dot{x},\ddot{x}$$  Vehicle CM displacement, velocity, and acceleration along the vehiclefixed xaxis 
$$y,\dot{y},\ddot{y}$$  Vehicle CM displacement, velocity, and acceleration along the vehiclefixed yaxis 
$$z,\dot{z},\ddot{z}$$  Vehicle CM displacement, velocity, and acceleration along the vehiclefixed zaxis 
φ  Rotation of the vehiclefixed frame about the earthfixed Xaxis (roll) 
θ  Rotation of the vehiclefixed frame about the earthfixed Yaxis (pitch) 
ψ  Rotation of the vehiclefixed frame about the earthfixed Zaxis (yaw) 
F_{FLx}, F_{FLy}, F_{FLz}  Suspension forces applied to the front left hardpoint along the vehiclefixed x, y, and zaxes 
F_{FRx}, F_{FRy}, F_{FRz}  Suspension forces applied to the front right hardpoint along the vehiclefixed x, y, and zaxes 
F_{MLx}, F_{MLy}, F_{MLz}  Suspension forces applied to the middle left hardpoint along the vehiclefixed x, y, and zaxes 
F_{MRx}, F_{MRy}, F_{MRz}  Suspension forces applied to the middle right hardpoint along the vehiclefixed x, y, and zaxes 
F_{RLx}, F_{RLy}, F_{RLz}  Suspension forces applied to the rear left hardpoint along the vehiclefixed x, y, and zaxes 
F_{RRx}, F_{RRy}, F_{RRz}  Suspension forces applied to the rear right hardpoint along the vehiclefixed x, y, and zaxes 
M_{FLx}, M_{FLy}, M_{FLz}  Suspension moment applied to the front left hardpoint about the vehiclefixed x, y, and zaxes 
M_{FRx}, M_{FRy}, M_{FRz}  Suspension moment applied to the front right hardpoint about the vehiclefixed x, y, and zaxes 
M_{MLx}, M_{MLy}, M_{MLz}  Suspension moment applied to the middle left hardpoint about the vehiclefixed x, y, and zaxes 
M_{MRx}, M_{MRy}, M_{MRz}  Suspension moment applied to the middle right hardpoint about the vehiclefixed x, y, and zaxes 
M_{RLx}, M_{RLy}, M_{RLz}  Suspension moment applied to the rear left hardpoint about the vehiclefixed x, y, and zaxes 
M_{RRx}, M_{RRy}, M_{RRz}  Suspension moment applied to the rear right hardpoint about the vehiclefixed x, y, and zaxes 
F_{extx}, F_{exty}, F_{extz}  External forces applied to the vehicle CM along the vehiclefixed x, y, and zaxes 
F_{dx}, F_{dy}, F_{dz}  Drag forces applied to the vehicle CM along the vehiclefixed x, y, and zaxes 
M_{extx}, M_{exty}, M_{extz}  External moment about the vehicle CM about the vehiclefixed x, y, and zaxes 
M_{dx}, M_{dy}, M_{dz}  Drag moment about the vehicle CM about the vehiclefixed x, y, and zaxes 
I  Vehicle body moments of inertia 
a, b, c  Distance of the front, middle, and rear axles, respectively, from the normal projection point of the vehicle CM onto the common axle plane 
h  Height of the vehicle CM above the axle plane 
d  Lateral distance from the geometric centerline to the center of mass along the vehiclefixed yaxis 
hh_f, hh_r  Height of the front and rear hitches, respectively, above the axle plane along the vehiclefixed zaxis 
dh_f, dh_r  Longitudinal distance of the front and rear hitches, respectively, from the normal projection point of the vehicle CM onto the common axle plane 
hl_f, hl_r  Lateral distance from center of mass to the front and rear hitches, respectively, along the vehiclefixed yaxis 
w_{F}, w_{M}, w_{R}  Front, middle, and rear track widths, respectively 
C_{d}  Air drag coefficient acting along the vehiclefixed xaxis 
C_{s}  Air drag coefficient acting along the vehiclefixed yaxis 
C_{l}  Air drag coefficient acting along the vehiclefixed zaxis 
C_{rm}  Air drag roll moment acting about the vehiclefixed xaxis 
C_{pm}  Air drag pitch moment acting about the vehiclefixed yaxis 
C_{ym}  Air drag yaw moment acting about the vehiclefixed zaxis 
A_{f}  Frontal area 
R  Atmospheric specific gas constant 
T  Environmental air temperature 
P_{abs}  Environmental absolute pressure 
w_{x}, w_{y}, w_{z}  Wind speed along the vehiclefixed x, y, and zaxes 
W_{x}, W_{y}, W_{z}  Wind speed along inertial X, Y, and Zaxes 
[1] Gillespie, Thomas. Fundamentals of Vehicle Dynamics. Warrendale, PA: Society of Automotive Engineers (SAE), 1992.