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. Before simulating the longitudinal motorcycle braking test in the 3D environment:

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

Accelerator and Braking

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 and anti-lock braking systems (ABS).

Note

Some controllers implement Stateflow® logic. The reference application runs without Stateflow by default, but any logic modification requires Stateflow.

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.

Accelerator and Braking

Use the Acceleration and Braking block to generate accelerator and brake commands to conduct a straight line maneuver. The acceleration begins at the specified rate until the vehicle achieves the longitudinal velocity setpoint. The vehicle controller maintains the longitudinal velocity setpoint for the specified time or distance. The controller then decelerates the vehicle.

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.

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.

Note

You must also set the 3D Engine block parameter 3D Engine to Enabled.

Constant (default)

Implements a constant friction coefficient scaling factor.

Controllers

The Controllers subsystem generates engine torque, transmission gear, and brake 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 torque command exceeds the limited engine torque command, the ECU sets the engine torque command to the commanded torque.

Transmission Control

The Transmission Controller subsystem 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. The controller includes these variants.

VariantDescription

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.

Slip Control ABS for Motorcycles (default)

Slip control ABS control when you simulate the maneuver. The slip control ABS controller uses logic-switching based on wheel deceleration and vehicle acceleration to control the braking pressure at each wheel.

Consider using slip control ABS control to prevent wheel lock-up, decrease braking distance, or maintain yaw stability during the maneuver.

The default slip control ABS parameters are set to work on roads that have either:

  • Constant friction coefficient scaling factor of 0.6.

  • Split friction coefficient scaling factors of 0.6 and 0.8.

To specify the road surface, see Environment.

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 Longitudinal

Motorcycle with two wheels implemented with Simscape™ Multibody™.

Engine SubsystemDescription

Mapped

Simple Engine

Implements a simplified V2 naturally aspirated motorcycle engine.

Steering, Transmission, Driveline, and Brakes Subsystem

Description

Two Wheels Chain Driven

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

Pitch Rate, Brake Pressure, Velocity, Accel Scope

  • PitchRate — Yaw rate versus time

  • BrkPrs — Brake pressure versus time

    • BrkPrs:1 — Front wheel

    • BrkPrs:2 — Rear wheel

  • Velocity

    • <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

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

| | | |

Topics