Main Content

Reference Generator

Generate maneuver reference signals

Description

The Reference Generator block sets the parameters that configure the maneuver and 3D simulation environment. By default, the block is set for the constant radius maneuver with the 3D simulation engine environment disabled.

Model

Use the Maneuver parameter to specify the type of maneuver. After you select the maneuver, use the parameters to specify the maneuver settings. By default:

  • Use maneuver-specific driver, initial position, and scene — Set to on

  • Maneuver start time — Set to 3s

  • Longitudinal velocity reference — Set to 30s

  • Longitudinal entrance velocity setpoint units — Set to mph

Maneuver Setting

Implementation

Double Lane Change

Double-Lane Change Maneuver

  • Vehicle width — Lane signals for the Visualization subsystem; used for the left and right lane boundaries

  • Lateral reference data — Lateral reference trajectory as a function of the longitudinal distance

  • Distance after target speed to begin reference — Start the maneuver at specified distance after the vehicle reaches the target speed

Increasing Steer

Slowly Increasing Steering Maneuver

  • Handwheel rate — Linear rate to increase steering wheel angle

  • Maximum handwheel angle — Maximum steering wheel angle

Swept Sine

Swept-Sine Steering Maneuver

  • Steering amplitude — Sinusoidal wave amplitude

  • Final frequency — Cut off frequency to stop the maneuver

Sine with Dwell

In the test, the vehicle:

  • Accelerates until it hits a target velocity.

  • Maintains the target velocity.

  • Responds to a sinusoidal with dwell steering command.

  • Steer frequency — Sinusoidal wave frequency

  • Steer amplitude — Sinusoidal wave amplitude

  • Dwell time — Dwell time

Constant Radius

Constant Radius Maneuver

  • Radius value — Turn radius

3D Engine

The 3D engine implements the 3D simulation environment. Vehicle Dynamics Blockset™ integrates the 3D simulation environment with Simulink® so that you can query the world around the vehicle for virtually testing perception, control, and planning algorithms. For 3D engine requirements, see 3D Visualization Engine Requirements and Limitations. To enable the 3D engine, on the 3D Engine tab, select Enabled.

To position the vehicle in the scene:

  1. Select the position initialization method:

    • Recommended for scene — Set the initial vehicle position to values recommended for the scene

    • User-specified — Set your own initial vehicle position

  2. Click Update the model workspaces with the initial values to overwrite the initial vehicle position in the model workspaces with the applied values.

Ports

Input

expand all

Bus containing vehicle feedback signals, including velocity, acceleration, and steering wheel torque.

Output

expand all

Bus containing the visualization reference signals, including longitudinal and lateral displacement, and steering.

Bus containing the vehicle reference signals, including longitudinal and lateral displacement, and steering.

Bus containing vehicle location feedback signals, including position.

Parameters

expand all

Configuration

Specify the scene type.

Specify the name of the 3D scene.

Target velocity.

Units for target velocity.

Time, in s.

Constant Radius

Radius value, in m.

Turn direction.

Lateral acceleration threshold, in g.

Stop simulation if vehicle exceeds lateral acceleration threshold.

Double Lane Change

Inertial longitudinal position of gate entrance, in m.

Distance after target speed to begin reference, in m.

Vehicle width, in m.

The left and right lane boundaries are a function of the Vehicle width parameter.

Lateral offset, in m.

Lateral reference position breakpoints, in m.

Use the Lateral reference position breakpoints and Lateral reference data parameters to specify the lateral reference trajectory as a function of the longitudinal distance.

Use the Lateral reference position breakpoints and Lateral reference data parameters to specify the lateral reference trajectory as a function of the longitudinal distance.

Increasing Steer

Handwheel rate, in deg/s.

Maximum handwheel angle, in deg.

Steering hold, in s.

Lateral acceleration threshold, in g.

Stop simulation if vehicle exceeds lateral acceleration threshold.

Swept Sign

Sweep time, in s.

Sinusoidal steering amplitude, in deg.

Cut off frequency to stop the maneuver, in Hz.

Sign with Dwell

Steer frequency, in Hz.

Sinusoidal steering amplitude, in deg.

Dwell time, in s.

3D Engine

Enable 3D visualization.

Specify the name of the 3D scene.

Graphics frame rate, in s. The graphics frame rate is the inverse of the sample time.

Use vehicle positions that are recommended for the scene.

Specify to set your own initial vehicle position values.

Initial vehicle CG position along the earth-fixed X-axis, in m.

Initial vehicle CG position along the earth-fixed Y-axis, in m.

Initial vehicle CG position along the earth-fixed Z-axis, in m.

Rotation of the vehicle-fixed frame about the earth-fixed X-axis (roll), in rad.

Rotation of the vehicle-fixed frame about the earth-fixed Y-axis (pitch), in rad.

Rotation of the vehicle-fixed frame about the earth-fixed Z-axis (yaw), in rad.

Introduced in R2019a