Simulation 3D Trailer
Libraries:
Vehicle Dynamics Blockset /
Vehicle Scenarios /
Sim3D /
Sim3D Vehicle /
Components
Description
Note
Simulating models with the Simulation 3D Trailer block requires Simulink® 3D Animation™.
The Simulation 3D Trailer block implements a trailer with one, two or three axles in the 3D simulation environment.
To use the Simulation 3D Trailer block, ensure that the Simulation
3D Scene Configuration block is in your model. If you set the Sample
time parameter of the Simulation 3D Trailer block to
-1
, the block uses the sample time specified in the Simulation 3D
Scene Configuration block.
The block input uses the vehicle Z-down right-handed (RH) Cartesian coordinate system defined in SAE J6701. The coordinate system is inertial and initially aligned with the vehicle geometric center:
X-axis — Points forward along vehicle longitudinal axis
Y-axis — Points to the right along vehicle lateral axis
Z-axis — Points downward
Tip
Verify that the Simulation 3D Trailer block executes before the Simulation 3D Scene Configuration block. That way, Simulation 3D Vehicle prepares the signal data before the Unreal Engine® 3D visualization environment receives it. To check the block execution order, right-click the blocks and select Properties. On the General tab, confirm these Priority settings:
Simulation 3D Scene Configuration —
0
Simulation 3D Trailer —
-1
For more information about execution order, see Control and Display Execution Order.
Examples
Three-Axle Tractor Towing a Three-Axle Trailer
Simulates three-axle tractor towing a three-axle trailer for commercial trucking applications. Implements hitch subsystem, sinusoidal wave steering or braking test, and axle torque applied to tractor rear wheels.
Ports
Input
Translation — Vehicle translation
5
-by-3
array (default) | 7
-by-3
array | 3
-by-3
array
Vehicle and wheel translation, in m. The array dimensions are
3
-by-3
for a one-axle trailer,
5
-by-3
for a two-axle trailer, and
7
-by-3
for a three-axle trailer, where:
Translation(1,1)
,Translation(1,2)
, andTranslation(1,3)
— Vehicle translation along the inertial vehicle Z-down X-, Y-, and Z-axes, respectively.Translation(...,1)
,Translation(...,2)
, andTranslation(...,3)
— Wheel translation relative to vehicle, along the vehicle Z-down X-, Y-, and Z-axes, respectively.
The signal contains translation information according to the axle and wheel locations.
For a one-axle trailer:
Translation | Array Element | Translation Axis |
---|---|---|
Vehicle, Xv | Translation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Yv | Translation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Zv | Translation(1,3) | Inertial vehicle Z-down Z-axis |
Left wheel, XL | Translation(2,1) | Vehicle Z-down X-axis |
Left wheel, YL | Translation(2,2) | Vehicle Z-down Y-axis |
Left wheel, ZL | Translation(2,3) | Vehicle Z-down Z-axis |
Right wheel, XR | Translation(3,1) | Vehicle Z-down X-axis |
Right wheel, YR | Translation(3,2) | Vehicle Z-down Y-axis |
Right wheel, ZR | Translation(3,3) | Vehicle Z-down Z-axis |
For a two-axle trailer:
Translation | Array Element | Translation Axis |
---|---|---|
Vehicle, Xv | Translation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Yv | Translation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Zv | Translation(1,3) | Inertial vehicle Z-down Z-axis |
Front left wheel, XFL | Translation(2,1) | Vehicle Z-down X-axis |
Front left wheel, YFL | Translation(2,2) | Vehicle Z-down Y-axis |
Front left wheel, ZFL | Translation(2,3) | Vehicle Z-down Z-axis |
Front right wheel, XFR | Translation(3,1) | Vehicle Z-down X-axis |
Front right wheel, YFR | Translation(3,2) | Vehicle Z-down Y-axis |
Front right wheel, ZFR | Translation(3,3) | Vehicle Z-down Z-axis |
Rear left wheel, XRL | Translation(4,1) | Vehicle Z-down X-axis |
Rear left wheel, YRL | Translation(4,2) | Vehicle Z-down Y-axis |
Rear left wheel, ZRL | Translation(4,3) | Vehicle Z-down Z-axis |
Rear right wheel, XRR | Translation(5,1) | Vehicle Z-down X-axis |
Rear right wheel, YRR | Translation(5,2) | Vehicle Z-down Y-axis |
Rear right wheel, ZRR | Translation(5,3) | Vehicle Z-down Z-axis |
For a three-axle trailer:
Translation | Array Element | Translation Axis |
---|---|---|
Vehicle, Xv | Translation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Yv | Translation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Zv | Translation(1,3) | Inertial vehicle Z-down Z-axis |
Front left wheel, XFL | Translation(2,1) | Vehicle Z-down X-axis |
Front left wheel, YFL | Translation(2,2) | Vehicle Z-down Y-axis |
Front left wheel, ZFL | Translation(2,3) | Vehicle Z-down Z-axis |
Front right wheel, XFR | Translation(3,1) | Vehicle Z-down X-axis |
Front right wheel, YFR | Translation(3,2) | Vehicle Z-down Y-axis |
Front right wheel, ZFR | Translation(3,3) | Vehicle Z-down Z-axis |
Middle left wheel, XML (for three-axle trailer) | Translation(4,1) | Vehicle Z-down X-axis |
Middle left wheel, YML | Translation(4,2) | Vehicle Z-down Y-axis |
Middle left wheel, ZML | Translation(4,3) | Vehicle Z-down Z-axis |
Middle right wheel, XMR | Translation(5,1) | Vehicle Z-down X-axis |
Middle right wheel, YMR | Translation(5,2) | Vehicle Z-down Y-axis |
Middle right wheel, ZMR | Translation(5,3) | Vehicle Z-down Z-axis |
Rear left wheel, XRL | Translation(6,1) | Vehicle Z-down X-axis |
Rear left wheel, YRL | Translation(6,2) | Vehicle Z-down Y-axis |
Rear left wheel, ZRL | Translation(6,3) | Vehicle Z-down Z-axis |
Rear right wheel, XRR | Translation(7,1) | Vehicle Z-down X-axis |
Rear right wheel, YRR | Translation(7,2) | Vehicle Z-down Y-axis |
Rear right wheel, ZRR | Translation(7,3) | Vehicle Z-down Z-axis |
Rotation — Vehicle rotation
5
-by-3
array (default) | 7
-by-3
array | 3
-by-3
array
Vehicle and wheel rotation, in rad. The array dimensions are
3
-by-3
for a one-axle trailer,
5
-by-3
for a two-axle trailer, and
7
-by-3
for a three-axle trailer, where:
Rotation(1,1)
,Rotation(1,2)
, andRotation(1,3)
— Vehicle rotation about the inertial vehicle Z-down X-, Y-, and Z-axes, respectively.Rotation(...,1)
,Rotation(...,2)
, andRotation(...,3)
— Wheel rotation relative to vehicle, about the vehicle Z-down X-, Y-, and Z-axes, respectively.
The signal contains rotation information according to the axle and wheel locations.
For a one-axle trailer:
Rotation | Array Element | Rotation Axis |
---|---|---|
Vehicle, Rollv | Rotation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Pitchv | Rotation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Yawv | Rotation(1,3) | Inertial vehicle Z-down Z-axis |
Left wheel, RollL | Rotation(2,1) | Vehicle Z-down X-axis |
Left wheel, PitchL | Rotation(2,2) | Vehicle Z-down Y-axis |
Left wheel, YawL | Rotation(2,3) | Vehicle Z-down Z-axis |
Right wheel, RollR | Rotation(3,1) | Vehicle Z-down X-axis |
Right wheel, PitchR | Rotation(3,2) | Vehicle Z-down Y-axis |
Right wheel, YawR | Rotation(3,3) | Vehicle Z-down Z-axis |
For a two-axle trailer:
Rotation | Array Element | Rotation Axis |
---|---|---|
Vehicle, Rollv | Rotation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Pitchv | Rotation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Yawv | Rotation(1,3) | Inertial vehicle Z-down Z-axis |
Front left wheel, RollFL | Rotation(2,1) | Vehicle Z-down X-axis |
Front left wheel, PitchFL | Rotation(2,2) | Vehicle Z-down Y-axis |
Front left wheel, YawFL | Rotation(2,3) | Vehicle Z-down Z-axis |
Front right wheel, RollFR | Rotation(3,1) | Vehicle Z-down X-axis |
Front right wheel, PitchFR | Rotation(3,2) | Vehicle Z-down Y-axis |
Front right wheel, YawFR | Rotation(3,3) | Vehicle Z-down Z-axis |
Rear left wheel, RollRL | Rotation(4,1) | Vehicle Z-down X-axis |
Rear left wheel, PitchRL | Rotation(4,2) | Vehicle Z-down Y-axis |
Rear left wheel, YawRL | Rotation(4,3) | Vehicle Z-down Z-axis |
Rear right wheel, RollRR | Rotation(5,1) | Vehicle Z-down X-axis |
Rear right wheel, PitchRR | Rotation(5,2) | Vehicle Z-down Y-axis |
Rear right wheel, YawRR | Rotation(5,3) | Vehicle Z-down Z-axis |
For a three-axle trailer:
Rotation | Array Element | Rotation Axis |
---|---|---|
Vehicle, Rollv | Rotation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Pitchv | Rotation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Yawv | Rotation(1,3) | Inertial vehicle Z-down Z-axis |
Front left wheel, RollFL | Rotation(2,1) | Vehicle Z-down X-axis |
Front left wheel, PitchFL | Rotation(2,2) | Vehicle Z-down Y-axis |
Front left wheel, YawFL | Rotation(2,3) | Vehicle Z-down Z-axis |
Front right wheel, RollFR | Rotation(3,1) | Vehicle Z-down X-axis |
Front right wheel, PitchFR | Rotation(3,2) | Vehicle Z-down Y-axis |
Front right wheel, YawFR | Rotation(3,3) | Vehicle Z-down Z-axis |
Middle left wheel, RollML | Rotation(4,1) | Vehicle Z-down X-axis |
Middle left wheel, PitchML | Rotation(4,2) | Vehicle Z-down Y-axis |
Middle left wheel, YawML | Rotation(4,3) | Vehicle Z-down Z-axis |
Middle right wheel, RollMR | Rotation(5,1) | Vehicle Z-down X-axis |
Middle right wheel, PitchMR | Rotation(5,2) | Vehicle Z-down Y-axis |
Middle right wheel, YawMR | Rotation(5,3) | Vehicle Z-down Z-axis |
Rear left wheel, RollRL | Rotation(6,1) | Vehicle Z-down X-axis |
Rear left wheel, PitchRL | Rotation(6,2) | Vehicle Z-down Y-axis |
Rear left wheel, YawRL | Rotation(6,3) | Vehicle Z-down Z-axis |
Rear right wheel, RollRR | Rotation(7,1) | Vehicle Z-down X-axis |
Rear right wheel, PitchRR | Rotation(7,2) | Vehicle Z-down Y-axis |
Rear right wheel, YawRR | Rotation(7,3) | Vehicle Z-down Z-axis |
Parameters
Type — Trailer type
Two-axle trailer
(default) | Three-axle trailer
| One-axle trailer
Name — Name of vehicle
SimulinkVehicle1
(default) | character vector
Name of vehicle. By default, when you use the block in your model, the block sets
the Name parameter to
SimulinkVehicle
. The value of
X
depends on the number of
Simulation 3D Vehicle with Ground Following and Simulation 3D
Vehicle blocks that you have in your model.X
Initial array values to translate vehicle per part, Translation — Vehicle initial translation
zeros( 5, 3 ) (default) | zeros( 7, 3 ) | zeros( 3, 3 )
Initial vehicle and wheel translation, in m. The array dimensions are
3
-by-3
for a one-axle trailer,
5
-by-3
for a two-axle trailer and
7
-by-3
for a three-axle trailer, where:
Translation(1,1)
,Translation(1,2)
, andTranslation(1,3)
— Initial vehicle translation along the inertial vehicle Z-down coordinate system X-, Y-, and Z-axes, respectively.Translation(...,1)
,Translation(...,2)
, andTranslation(...,3)
— Initial wheel translation relative to vehicle, along the vehicle Z-down X-, Y-, and Z-axes, respectively.
The signal contains translation information according to the axle and wheel locations.
For a one-axle trailer:
Translation | Array Element | Translation Axis |
---|---|---|
Vehicle, Xv | Translation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Yv | Translation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Zv | Translation(1,3) | Inertial vehicle Z-down Z-axis |
Left wheel, XL | Translation(2,1) | Vehicle Z-down X-axis |
Left wheel, YL | Translation(2,2) | Vehicle Z-down Y-axis |
Left wheel, ZL | Translation(2,3) | Vehicle Z-down Z-axis |
Right wheel, XR | Translation(3,1) | Vehicle Z-down X-axis |
Right wheel, YR | Translation(3,2) | Vehicle Z-down Y-axis |
Right wheel, ZR | Translation(3,3) | Vehicle Z-down Z-axis |
For a two-axle trailer:
Translation | Array Element | Translation Axis |
---|---|---|
Vehicle, Xv | Translation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Yv | Translation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Zv | Translation(1,3) | Inertial vehicle Z-down Z-axis |
Front left wheel, XFL | Translation(2,1) | Vehicle Z-down X-axis |
Front left wheel, YFL | Translation(2,2) | Vehicle Z-down Y-axis |
Front left wheel, ZFL | Translation(2,3) | Vehicle Z-down Z-axis |
Front right wheel, XFR | Translation(3,1) | Vehicle Z-down X-axis |
Front right wheel, YFR | Translation(3,2) | Vehicle Z-down Y-axis |
Front right wheel, ZFR | Translation(3,3) | Vehicle Z-down Z-axis |
Rear left wheel, XRL | Translation(4,1) | Vehicle Z-down X-axis |
Rear left wheel, YRL | Translation(4,2) | Vehicle Z-down Y-axis |
Rear left wheel, ZRL | Translation(4,3) | Vehicle Z-down Z-axis |
Rear right wheel, XRR | Translation(5,1) | Vehicle Z-down X-axis |
Rear right wheel, YRR | Translation(5,2) | Vehicle Z-down Y-axis |
Rear right wheel, ZRR | Translation(5,3) | Vehicle Z-down Z-axis |
For a three-axle trailer:
Translation | Array Element | Translation Axis |
---|---|---|
Vehicle, Xv | Translation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Yv | Translation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Zv | Translation(1,3) | Inertial vehicle Z-down Z-axis |
Front left wheel, XFL | Translation(2,1) | Vehicle Z-down X-axis |
Front left wheel, YFL | Translation(2,2) | Vehicle Z-down Y-axis |
Front left wheel, ZFL | Translation(2,3) | Vehicle Z-down Z-axis |
Front right wheel, XFR | Translation(3,1) | Vehicle Z-down X-axis |
Front right wheel, YFR | Translation(3,2) | Vehicle Z-down Y-axis |
Front right wheel, ZFR | Translation(3,3) | Vehicle Z-down Z-axis |
Middle left wheel, XML (for three-axle trailer) | Translation(4,1) | Vehicle Z-down X-axis |
Middle left wheel, YML | Translation(4,2) | Vehicle Z-down Y-axis |
Middle left wheel, ZML | Translation(4,3) | Vehicle Z-down Z-axis |
Middle right wheel, XMR | Translation(5,1) | Vehicle Z-down X-axis |
Middle right wheel, YMR | Translation(5,2) | Vehicle Z-down Y-axis |
Middle right wheel, ZMR | Translation(5,3) | Vehicle Z-down Z-axis |
Rear left wheel, XRL | Translation(6,1) | Vehicle Z-down X-axis |
Rear left wheel, YRL | Translation(6,2) | Vehicle Z-down Y-axis |
Rear left wheel, ZRL | Translation(6,3) | Vehicle Z-down Z-axis |
Rear right wheel, XRR | Translation(7,1) | Vehicle Z-down X-axis |
Rear right wheel, YRR | Translation(7,2) | Vehicle Z-down Y-axis |
Rear right wheel, ZRR | Translation(7,3) | Vehicle Z-down Z-axis |
Initial array values to rotate vehicle per part, Rotation — Vehicle initial rotation
zeros( 5, 3 ) (default) | zeros( 7, 3 ) | zeros( 3, 3 )
Initial vehicle and wheel rotation, about the vehicle Z-down X-, Y-, and Z-axes, in rad.
The array dimensions are 5
-by-3
for a two-axle
trailer and 7
-by-3
for a three-axle trailer, where:
Rotation(1,1)
,Rotation(1,2)
, andRotation(1,3)
— Initial vehicle rotation about the inertial vehicle Z-down coordinate system X-, Y-, and Z-axes, respectively.Rotation(...,1)
,Rotation(...,2)
, andRotation(...,3)
— Initial wheel rotation relative to the vehicle, about the vehicle Z-down X-, Y-, and Z-axes, respectively.
The signal contains translation information according to the axle and wheel locations.
For a one-axle trailer:
Rotation | Array Element | Rotation Axis |
---|---|---|
Vehicle, Rollv | Rotation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Pitchv | Rotation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Yawv | Rotation(1,3) | Inertial vehicle Z-down Z-axis |
Left wheel, RollL | Rotation(2,1) | Vehicle Z-down X-axis |
Left wheel, PitchL | Rotation(2,2) | Vehicle Z-down Y-axis |
Left wheel, YawL | Rotation(2,3) | Vehicle Z-down Z-axis |
Right wheel, RollR | Rotation(3,1) | Vehicle Z-down X-axis |
Right wheel, PitchR | Rotation(3,2) | Vehicle Z-down Y-axis |
Right wheel, YawR | Rotation(3,3) | Vehicle Z-down Z-axis |
For a two-axle trailer:
Rotation | Array Element | Rotation Axis |
---|---|---|
Vehicle, Rollv | Rotation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Pitchv | Rotation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Yawv | Rotation(1,3) | Inertial vehicle Z-down Z-axis |
Front left wheel, RollFL | Rotation(2,1) | Vehicle Z-down X-axis |
Front left wheel, PitchFL | Rotation(2,2) | Vehicle Z-down Y-axis |
Front left wheel, YawFL | Rotation(2,3) | Vehicle Z-down Z-axis |
Front right wheel, RollFR | Rotation(3,1) | Vehicle Z-down X-axis |
Front right wheel, PitchFR | Rotation(3,2) | Vehicle Z-down Y-axis |
Front right wheel, YawFR | Rotation(3,3) | Vehicle Z-down Z-axis |
Rear left wheel, RollRL | Rotation(4,1) | Vehicle Z-down X-axis |
Rear left wheel, PitchRL | Rotation(4,2) | Vehicle Z-down Y-axis |
Rear left wheel, YawRL | Rotation(4,3) | Vehicle Z-down Z-axis |
Rear right wheel, RollRR | Rotation(5,1) | Vehicle Z-down X-axis |
Rear right wheel, PitchRR | Rotation(5,2) | Vehicle Z-down Y-axis |
Rear right wheel, YawRR | Rotation(5,3) | Vehicle Z-down Z-axis |
For a three-axle trailer:
Rotation | Array Element | Rotation Axis |
---|---|---|
Vehicle, Rollv | Rotation(1,1) | Inertial vehicle Z-down X-axis |
Vehicle, Pitchv | Rotation(1,2) | Inertial vehicle Z-down Y-axis |
Vehicle, Yawv | Rotation(1,3) | Inertial vehicle Z-down Z-axis |
Front left wheel, RollFL | Rotation(2,1) | Vehicle Z-down X-axis |
Front left wheel, PitchFL | Rotation(2,2) | Vehicle Z-down Y-axis |
Front left wheel, YawFL | Rotation(2,3) | Vehicle Z-down Z-axis |
Front right wheel, RollFR | Rotation(3,1) | Vehicle Z-down X-axis |
Front right wheel, PitchFR | Rotation(3,2) | Vehicle Z-down Y-axis |
Front right wheel, YawFR | Rotation(3,3) | Vehicle Z-down Z-axis |
Middle left wheel, RollML | Rotation(4,1) | Vehicle Z-down X-axis |
Middle left wheel, PitchML | Rotation(4,2) | Vehicle Z-down Y-axis |
Middle left wheel, YawML | Rotation(4,3) | Vehicle Z-down Z-axis |
Middle right wheel, RollMR | Rotation(5,1) | Vehicle Z-down X-axis |
Middle right wheel, PitchMR | Rotation(5,2) | Vehicle Z-down Y-axis |
Middle right wheel, YawMR | Rotation(5,3) | Vehicle Z-down Z-axis |
Rear left wheel, RollRL | Rotation(6,1) | Vehicle Z-down X-axis |
Rear left wheel, PitchRL | Rotation(6,2) | Vehicle Z-down Y-axis |
Rear left wheel, YawRL | Rotation(6,3) | Vehicle Z-down Z-axis |
Rear right wheel, RollRR | Rotation(7,1) | Vehicle Z-down X-axis |
Rear right wheel, PitchRR | Rotation(7,2) | Vehicle Z-down Y-axis |
Rear right wheel, YawRR | Rotation(7,3) | Vehicle Z-down Z-axis |
Sample time — Sample time
-1
(default) | scalar
Sample time, Ts. The graphics frame rate is the inverse of the sample time.
References
[1] Vehicle Dynamics Standards Committee. Vehicle Dynamics Terminology. SAE J670. Warrendale, PA: Society of Automotive Engineers, 2008.
[2] Technical Committee. Road vehicles — Vehicle dynamics and road-holding ability — Vocabulary. ISO 8855:2011. Geneva, Switzerland: International Organization for Standardization, 2011.
Version History
Introduced in R2020bR2024a: Requires Simulink 3D Animation
Simulating models with the Simulation 3D Trailer block requires Simulink 3D Animation.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)