Main Content

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 ElementDescriptionVariants

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 Predictive.

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:

  • Body, suspension, and wheels

  • Engine

  • Steering, transmission, driveline, and brakes

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.

EnvironmentVariantDescription

Ground Feedback

3D Engine

Uses Simulation 3D Terrain Sensor block to implement ray tracing in 3D environment.

Constant (default)

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.

VariantDescription

Transmission Controller

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.

Driver - No Clutch (default)

Open loop transmission control. The controller sets the gear command to the gear request.

PRNDL Controller

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.

Paddles

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.

VariantDescription

Bang Bang ABS

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

Open loop brake control. The controller sets the brake pressure command to a reference brake pressure based on the brake command.

Five-State ABS for Motorcycle (default)

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.

VariantDescription

Rear Diff Controller

Implements a controller that generates the differential pressure command based on the:

  • Steer angle

  • Vehicle pitch

  • Brake command

  • Wheel speed

  • Gear

  • Vehicle acceleration

No Control (default)

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.

SubsystemVariantDescription

Body, Suspension, Wheels

Longitudinal (default)

Motorcycle with two wheels:

Simscape Multibody

Simscape Multibody

Motorcycle with two wheels implemented with Simscape™ Multibody™.

Engine SubsystemVariantDescription

Engine

Mapped (default)

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.

ElementDescription

Driver Commands

Driver commands:

  • Handwheel angle

  • Acceleration command

  • Brake command

Vehicle Response

Motorcycle response:

  • Engine speed

  • Motorcycle speed

  • Longitudinal acceleration

  • ABS indicator

Yaw Rate, Brake Pressure, Velocity, Accel Scope block

  • <q> — Yaw rate versus time

  • BrkPrs — Brake pressure versus time

    • BrkPrs:1 — Front wheel

    • BrkPrs:2 — Rear wheel

  • Signals

    • <xdot> — Longitudinal vehicle velocity versus time

    • VehWhlSpd:1 — Front wheel velocity versus time

    • VehWhlSpd:2 — Rear wheel velocity versus time

    • LngRef — Longitudinal reference velocity

  • <ax> — Longitudinal acceleration versus time

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.

KeyCamera View

1

Back left

Image showing key commands and corresponding camera view

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.

KeyCamera 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:

  • Position lag, based on the vehicle translational acceleration

  • Rotation lag, based on the vehicle rotational velocity

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

| | | |

Related Topics