Main Content

Simulation 3D Trailer

Implement trailer in 3D environment

Since R2020b

  • Simulation 3D Trailer block

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 Configuration0

  • Simulation 3D Trailer-1

For more information about execution order, see Control and Display Execution Order.

Examples

Ports

Input

expand all

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), and Translation(1,3) — Vehicle translation along the inertial vehicle Z-down X-, Y-, and Z-axes, respectively.

  • Translation(...,1), Translation(...,2), and Translation(...,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=[XvYvZvXLYLZLXRYRZR]

TranslationArray ElementTranslation 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=[XvYvZvXFLYFLZFLXFRYFRZFRXRLYRLZRLXRRYRRZRR]

TranslationArray ElementTranslation 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=[XvYvZvXFLYFLZFLXFRYFRZFRXMLYMLZMLXMRYMRZMRXRLYRLZRLXRRYRRZRR]

TranslationArray ElementTranslation 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

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), and Rotation(1,3) — Vehicle rotation about the inertial vehicle Z-down X-, Y-, and Z-axes, respectively.

  • Rotation(...,1), Rotation(...,2), and Rotation(...,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=[RollvPitchvYawvRollLPitchLYawLRollRPitchRYawR]

RotationArray ElementRotation 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=[RollvPitchvYawvRollFLPitchFLYawFLRollFRPitchFRYawFRRollRLPitchRLYawRLRollRRPitchRRYawRR]

RotationArray ElementRotation 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=[RollvPitchvYawvRollFLPitchFLYawFLRollFRPitchFRYawFRRollMLPitchMLYawMLRollMRPitchMRYawMRRollRLPitchRLYawRLRollRRPitchRRYawRR]

RotationArray ElementRotation 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

expand all

Vehicle Parameters

Trailer type. For the trailer dimensions, see:

Name of vehicle. By default, when you use the block in your model, the block sets the Name parameter to SimulinkVehicleX. 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.

Initial Values

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), and Translation(1,3) — Initial vehicle translation along the inertial vehicle Z-down coordinate system X-, Y-, and Z-axes, respectively.

  • Translation(...,1), Translation(...,2), and Translation(...,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=[XvYvZvXLYLZLXRYRZR]

TranslationArray ElementTranslation 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=[XvYvZvXFLYFLZFLXFRYFRZFRXRLYRLZRLXRRYRRZRR]

TranslationArray ElementTranslation 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=[XvYvZvXFLYFLZFLXFRYFRZFRXMLYMLZMLXMRYMRZMRXRLYRLZRLXRRYRRZRR]

TranslationArray ElementTranslation 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 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), and Rotation(1,3) — Initial vehicle rotation about the inertial vehicle Z-down coordinate system X-, Y-, and Z-axes, respectively.

  • Rotation(...,1), Rotation(...,2), and Rotation(...,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=[RollvPitchvYawvRollLPitchLYawLRollRPitchRYawR]

RotationArray ElementRotation 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=[RollvPitchvYawvRollFLPitchFLYawFLRollFRPitchFRYawFRRollRLPitchRLYawRLRollRRPitchRRYawRR]

RotationArray ElementRotation 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=[RollvPitchvYawvRollFLPitchFLYawFLRollFRPitchFRYawFRRollMLPitchMLYawMLRollMRPitchMRYawMRRollRLPitchRLYawRLRollRRPitchRRYawRR]

RotationArray ElementRotation 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, 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 R2020b

expand all