Three-Axle Tractor Towing Two Three-Axle Trailers
This example shows how to simulate a three-axle tractor towing two three-axle trailers for a commercial trucking application. The model implements hitch subsystems, sinusoidal wave steering input, and an axle torque applied to the rear wheels of the tractor.
To view the simulation in the 3D visualization environment, use the Vehicle Monitor 3D variant. Simulating models in the 3D visualization environment requires Simulink® 3D Animation™. Right-click the Vehicle Monitor block and select Variant > Label Mode Active Choice > Vehicle Monitor 3D. See Run Simulation in 3D Visualization Environment.
To implement the tractor and trailers, by default, the three DOF model uses the Vehicle Body 3DOF and Trailer Body 3DOF blocks. You can use the Toggle Between 3DOF and 6DOF button to configure a six DOF model that uses the Vehicle Body 6 DOF block, Trailer Body 6DOF blocks, and a 6DOF hitch subsystem. See Six Degrees-of-Freedom Model.
Model
Run Simulation
On the Simulation tab, click Run. As the simulation runs, the Vehicle Position window provides the trace of the tractor and trailer.
Three-Axle Tractor Subsystem
To steer and drive the tractor, the three-axle tractor subsystem uses a sinusoidal wave steering input and an axle torque applied to the rear wheels. The subsystem includes models for the wheels, suspension, and vehicle body.
Three-Axle Trailer Subsystems
The three-axle trailer subsystems include models for the wheels, suspension, and the trailer body.
Hitch Subsystems
When you select the three DOF model variant, the hitch model allows relative longitudinal, lateral, and yaw motion between the tractor and trailer. To limit the longitudinal and lateral motion, the hitch model implements a stiff translational spring-damper in the xy plane of the vehicle-fixed reference frame. The resulting spring-damper forces approximately limits the relative motion between the tractor and trailer to yaw rotation about a vertical axis at the hitch connection point. The hitch model transfers the vertical hitch force from the trailer to the tractor.
When you select the six DOF model variant, the hitch model allows relative longitudinal, lateral, vertical, and yaw motion between the tractor and trailer. The hitch model implements another translational spring-damper along the z -axis of the vehicle-fixed reference frame. The effects of hitch moments due to the relative rotations of the hitches are considered negligible.
Spring forces are linear functions of the planar distance from the tractor hitch location to the first trailer front hitch location in the inertial reference frame.
Damper forces are linear functions of the planar velocity from the tractor hitch location to the first trailer front hitch location in the inertial reference frame.
Three-Axle Dolly Subsystem
The three-axle dolly subsystem includes models for the wheels and suspension. To implement the dolly, the subsystem uses a Trailer Body block. If you enable the 3D environment, the model uses the Simulation 3D Dolly block to visualize the dolly.
Run Simulation in 3D Visualization Environment
In the Vehicle Monitor subsystem, use the Vehicle Monitor 3D variant to visualize the tractor and trailer in the 3D simulation environment.
Right-click the Vehicle Monitor block and select Variant > Label Mode Active Choice > Vehicle Monitor 3D.
2. Click Run. In the AutoVrtlEnv
window, view the tractor and trailer in the 3D visualization environment. You can use the key numbers to change camera views of the tractor and trailer. For example, press 7 for a front left camera view.
Six Degrees-of-Freedom Model
To implement a 6 DOF tractor, trailers, and hitch model, click Toggle Between 3DOF and 6DOF. Then, on the Simulation tab, click Run.
To view the simulation in the 3D visualization environment, use the Vehicle Monitor 3D variant.
See Also
Trailer Body 3DOF | Trailer Body 6DOF | Vehicle Body 3DOF | Vehicle Body 6DOF | Simulation 3D Dolly