Main Content

Lane Change

Generate commands to conduct lane change maneuvers

Since R2024b

  • Lane change block icon

Libraries:
Vehicle Dynamics Blockset / Vehicle Scenarios / Drive Cycle and Maneuvers

Description

The Lane Change block generates commands to conduct lane change maneuvers, with the ability to choose from the double-lane change (ISO 3888-1) or obstacle avoidance (ISO 3888-2) maneuvers. After the vehicle reaches the target longitudinal velocity, the block holds the acceleration constant for the double-lane change maneuver or commands a zero-acceleration signal for the obstacle avoidance maneuver. Then, generates a lateral reference trajectory as a function of the longitudinal displacement. The block also generates signals indicating the left and right lane boundaries as a function of the specified track width.

You must set the initial longitudinal position of the vehicle in your model to a reasonable distance from the gate and specify these block parameters to ensure the vehicle reaches the target velocity before arriving at the gate:

  • Inertial longitudinal position of gate entrance, XGate [m]

  • Longitudinal entrance velocity setpoint, velRef

  • Distance after target speed to begin reference, xStart [m]

Note

For information on the reference generator block used in the double-lane change reference application, see Reference Generator.

Ports

Input

expand all

Vehicle longitudinal velocity in the body fixed frame, specified as a scalar, in m/s.

Data Types: double

Longitudinal position of the vehicle center of mass in the global coordinate frame, specified as a scalar, in m.

Data Types: double

Lateral position of the vehicle center of mass in the global coordinate frame, specified as a scalar, in m.

Data Types: double

Vehicle yaw angle with respect to the global coordinate system, specified as a scalar, in m.

Data Types: double

Output

expand all

Driver reference data, returned as a bus containing these block values.

SignalDescriptionUnits

LngRef

Longitudinal reference velocity

m/s

LtrRef

Lateral reference displacement

m

XRef

Vehicle global longitudinal reference position

m

YRef

Vehicle global lateral reference position

m

PhiRef

Vehicle global yaw reference position

rad

CurvRef

Reference path curvature

1/m

CurvGradRef

Reference path curvature gradient

1/m^2

Data Types: bus

Driver command data, returned as a bus containing these block values.

SignalDescriptionUnits

SteerCmd

EnblSteerCmd

Boolean signal used to override driver model steering commands

one

SteerCmd

Handwheel angle

one

SteerZero

Boolean signal used to override driver model steering commands with zero when value is true

one

SteerHld

Boolean signal used to hold the current driver model steering output when true

one

AccelCmd

EnblAccelCmd

Boolean signal used to override driver model acceleration commands

one

AccelCmd

Normalized accelerator input

one

AccelHld

Boolean signal used to hold the current driver model acceleration output when true

one

AccelZero

Boolean signal used to override driver model acceleration commands with zero when value is true

one

DecelCmd

EnblDecelCmd

Boolean signal used to override driver model deceleration commands

one

DecelCmd

Normalized decelerator or brake input

one

DecelHld

Boolean signal used to hold the current driver model deceleration output when true

one

DecelZero

Boolean signal used to override driver model deceleration commands with zero when value is true

one

HndBrkCmd

Normalized handbrake or park brake input

one

TransCmd

TransModeCmd

Command to specify the transmission mode

one

GearCmd

Command to specify manual gear number or automatic transmission shifter position

one

UpShiftCmd

Command to upshift

one

DwnShiftCmd

Command to downshift

one

ClutchCmd

Normalized clutch open command for manual transmissions

one

Note

By default, the TransCmd bus is not actively used. Use a Bus Assignment block to override the TransCmd bus to customize and extend the scenario.

Block diagram where the Bus Assignment block overrides the TransModeCmd output from the Lane Change block.

Data Types: bus

Information data, returned as a bus containing these block values.

SignalDescriptionUnits

LeftBnd

Left lane boundary

m

RightBnd

Right lane boundary

m

LtrlRef

Lateral reference displacement

m

XRef

Vehicle global longitudinal reference position

m

YRef

Vehicle global lateral reference position

m

Dependencies

To enable this parameter, select Output info bus.

Data Types: bus

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Type of lane change to conduct [[1],[2]].

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: changeType
Values: Double lane change (ISO 3888-1) (default) | Obstacle avoidance (ISO 3888-2)
Data Types: character vector

Maneuver start time, in s.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: tStart
Values: 3 (default) | positive scalar
Data Types: double

Global longitudinal position of the start of the gate entry, in m.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: XGate
Values: 176 (default) | scalar
Data Types: double

Target velocity.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: velRef
Values: 35 (default) | positive scalar
Data Types: double

Units for target velocity.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: velRefUnit
Values: mph (default) | character vector
Data Types: character vector

Longitudinal offset from which to shift the nominal path, in m.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: xStart
Values: 2 (default) | scalar
Data Types: double

Nominal vehicle width, in m.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: vehWidth
Values: 2 (default) | positive scalar
Data Types: double

Nominal lateral offset, in m.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: nomLatOffset
Values: 0 (default) | scalar
Data Types: double

Longitudinal path breakpoints that correspond to the lateral reference points latRef, specified as a 1-by-n vector, in m.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter:
Values: 1-by-7 vector (default)
Data Types: double

Lateral path reference points that correspond to the path longitudinal breakpoints latRefbp, specified as a 1-by-7 vector, in m.

Dependencies

To enable this parameter, select Use reference data.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: latRef
Values: 1-by-7 vector (default)
Data Types: double

Select this parameter to use reference data.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: centerSwitch
Values: on (default) | off
Data Types: character vector

Select this parameter to stop simulation on course exit.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: xSimStop
Values: off (default) | on
Data Types: character vector

Select this parameter to output info bus.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: extInfo
Values: off (default) | on
Data Types: character vector

Select this parameter to instantiate 3D cones. The Simulation 3D Scene Configuration block is required.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: use3DCones
Values: off (default) | on
Data Types: character vector

References

[1] "Passenger cars — Test track for a severe lane-change manoeuvre." International Organization for Standardization. https://www.iso.org/standard/67973.html.

[2] "Passenger cars — Test track for a severe lane-change manoeuvre." International Organization for Standardization. https://www.iso.org/standard/57253.html.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2024b