Longitudinal Motorcycle Braking Test
This reference application represents an in-plane longitudinal motorcycle undergoing a braking test. You can create your own versions, establishing a framework to test that your motorcycle meets the design requirements under normal and extreme driving conditions. Use this reference application in ride and handling studies and chassis controls development to characterize the vehicle dynamics of a motorcycle during a braking test.
To test advanced driver assistance systems (ADAS) and automated driving (AD) perception, planning, and control software, you can run the maneuver in a 3D environment. For the 3D visualization engine platform requirements and hardware recommendations, see Unreal Engine Simulation Environment Requirements and Limitations.
To create and open a working copy of the longitudinal motorcycle braking test reference application, enter
This table summarizes the blocks and subsystems in the reference application. Some subsystems contain variants.
Reference Application Element | Description | Variants |
---|---|---|
Straight Maneuver Reference Generator | Generates accelerator and brake commands to conduct a straight line maneuver. The acceleration begins at the specified rate until the motorcycle achieves the longitudinal velocity setpoint. The motorcycle controller maintains the longitudinal velocity setpoint for the specified time or distance. The controller then decelerates the motorcycle. Optionally, specify fault conditions before braking during a test. If the motorcycle speed, steering angle, or yaw rate is not within the allowable range before braking, the block sets a fault condition. | NA |
Longitudinal Rider | Implements the rider model that the reference application uses to generate acceleration, braking, gear, and steering commands. By default, Longitudinal Rider
subsystem use is the Longitudinal Driver block with
Control type, cntrlType set to
| NA |
Environment | Implements wind and road forces, including a constant or split friction coefficient scaling factor. | ✓ |
Controllers | Implements controllers for engine control units (ECUs), transmissions, anti-lock braking systems (ABS), and active differentials. | ✓ |
Motorcycle Vehicle | Implements the:
| ✓ |
Visualization | Provides the motorcycle trajectory, rider response, and 3D visualization. To enable 3D visualization, set the 3D Engine block parameter 3D Engine to Enabled. Note Simulating models in the 3D visualization environment requires Simulink® 3D Animation™.
For the minimum 3D visualization environment hardware requirements, see Unreal Engine Simulation Environment Requirements and Limitations. | ✓ |
To override the default variant, on the Modeling tab, in the Design section, click the drop-down and select Variant Manager. In the Variant Manager, navigate to the variant that you want to use. Right-click and select Set as Label Mode Active Choice.
Straight Maneuver Reference Generator
The Straight Maneuver Reference Generator block generates accelerator and brake commands to conduct a straight line maneuver. The acceleration begins at the specified rate until the motorcycle achieves the longitudinal velocity setpoint. The motorcycle controller maintains the longitudinal velocity setpoint for the specified time or distance. The controller then decelerates the motorcycle.
Use the Maneuver Parameters to specify the maneuver start time, velocity setpoint, acceleration, and deceleration.
Optionally, on the Tracking Parameters tab, select Enable fault tracking before braking. Use the parameters to specify fault conditions before braking. If the motorcycle speed, steering angle, or yaw rate is not within the allowable range before braking, the block sets a fault condition.
For more information, see Straight Maneuver Reference Generator.
Longitudinal Rider
The Longitudinal Rider subsystem implements the rider
model that the reference application uses to generate acceleration, braking, gear, and
steering commands. By default, Longitudinal Rider subsystem use is the
Longitudinal Driver block with Control type,
cntrlType set to Predictive
.
Environment
The Environment subsystem implements wind and road forces. The reference application has these ground feedback variants.
Environment | Variant | Description |
---|---|---|
Ground Feedback |
| Uses Simulation 3D Terrain Sensor block to implement ray tracing in 3D environment. |
| Implements a constant friction coefficient scaling factor. |
Controllers
The Controllers subsystem generates engine torque, transmission gear, brake pressure, and differential pressure commands.
ECU
The ECU controller generates the engine torque command. The controller prevents
over-revving the engine by limiting the engine torque command to the value specified
by model workspace variable EngRevLim
. By default, the value is
7000 rpm. If the differential torque command exceeds the limited engine torque
command, the ECU sets the engine torque command to the commanded differential
torque.
Transmission Control
The Transmission Controller subsystem generates the transmission gear command. The controller includes these variants.
Variant | Description |
---|---|
| Implements a transmission control module (TCM) that uses Stateflow® logic to generate the gear command based on the motorcycle acceleration, wheel speed, and engine speed. |
| Open loop transmission control. The controller sets the gear command to the gear request. |
| Implements a transmission control module (TCM) that uses Stateflow logic to generate the gear command based on the motorcycle acceleration, brake command, wheel speed, engine speed, and gear request. |
| Implements a paddle controller that uses the motorcycle acceleration and engine speed to generate the gear command. |
Brake Pressure Control
The Brake Controller subsystem implements a Brake Pressure Control subsystem to generate the brake pressure command. The Brake Pressure Control subsystem has these variants.
Variant | Description |
---|---|
| Implements an ABS feedback controller that switches between two states to regulate wheel slip. The bang-bang control minimizes the error between the actual slip and desired slip. For the desired slip, the controller uses the slip value at which the mu-slip curve reaches a peak value. This desired slip value is optimal for minimum braking distance. |
| Open loop brake control. The controller sets the brake pressure command to a reference brake pressure based on the brake command. |
| Five-state ABS control when you simulate the brake test. The five-state ABS controller uses logic-switching based on wheel deceleration and motorcycle acceleration to control the braking pressure at each wheel. Consider using five-state ABS control to prevent wheel lock-up, decrease braking distance, or maintain yaw stability during the maneuver. The default ABS parameters are set to work on roads that have a constant friction coefficient scaling factor of 1. |
Active Differential Control
The Active Differential Control subsystem generates the differential pressure command. To calculate the command, the subsystem has these variants.
Variant | Description |
---|---|
| Implements a controller that generates the differential pressure command based on the:
|
| Does not implement a controller. Sets the differential pressure command to 0. |
Motorcycle Vehicle
The Motorcycle Vehicle subsystem has an engine, controllers, and a vehicle body with two wheels. Specifically, the motorcycle contains these subsystems.
Subsystem | Variant | Description |
---|---|---|
Body, Suspension, Wheels |
| Motorcycle with two wheels:
|
Simscape Multibody |
| Motorcycle with two wheels implemented with Simscape™ Multibody™. |
Engine Subsystem | Variant | Description |
---|---|---|
Engine |
| Implemented with Simple Engine block. |
Steering, Transmission, Driveline, and Brakes Subsystem | Description | |
---|---|---|
Two Wheels Chain Driven | Transmission | Implements an ideal fixed gear transmission. |
Motorcycle Chain | Implements the dynamic effects of a motorcycle chain on the Motorcycle Body Longitudinal In-Plane block, including dynamic tension and moment drive coupling. |
Visualization
When you run the simulation, the Visualization subsystem provides rider and motorcycle response information. The reference application logs motorcycle signals during the maneuver, including steering, motorcycle and engine speed, and lateral acceleration. By default, the Yaw Rate, Brake Pressure, Velocity, Accel Scope block shows the signals as the simulation runs. You can use the Simulation Data Inspector to import the logged signals and examine the data.
Element | Description |
---|---|
Driver Commands | Driver commands:
|
Vehicle Response | Motorcycle response:
|
Yaw Rate, Brake Pressure, Velocity, Accel Scope block |
|
If you enable 3D visualization on the Reference Generator block 3D Engine tab by selecting Enabled, you can view the vehicle response in the Simulation 3D Viewer.
To smoothly change the camera views, use these key commands.
Key | Camera View | |
---|---|---|
1 | Back left |
|
2 | Back | |
3 | Back right | |
4 | Left | |
5 | Internal | |
6 | Right | |
7 | Front left | |
8 | Front | |
9 | Front right | |
0 | Overhead |
For additional camera controls, use these key commands.
Key | Camera Control |
---|---|
Tab | Cycle the view between all vehicles in the scene. |
Mouse scroll wheel | Control the camera distance from the vehicle. |
L | Toggle a camera lag effect on or off. When you enable the lag effect, the camera view includes:
This lag enables improved visualization of overall vehicle acceleration and rotation. |
F | Toggle the free camera mode on or off. When you enable the free camera mode, you can use the mouse to change the pitch and yaw of the camera. This mode enables you to orbit the camera around the vehicle. |
See Also
3D Engine | Straight Maneuver Reference Generator | Motorcycle Body Longitudinal In-Plane | Motorcycle Chain | Simulation 3D Terrain Sensor