Lane Change
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
xdot — Vehicle longitudinal velocity
scalar
Vehicle longitudinal velocity in the body fixed frame, specified as a scalar, in m/s.
Data Types: double
X — Longitudinal position vehicle center of mass
scalar
Longitudinal position of the vehicle center of mass in the global coordinate frame, specified as a scalar, in m.
Data Types: double
Y — Lateral position vehicle center of mass
scalar
Lateral position of the vehicle center of mass in the global coordinate frame, specified as a scalar, in m.
Data Types: double
psi — Vehicle yaw angle
scalar
Vehicle yaw angle with respect to the global coordinate system, specified as a scalar, in m.
Data Types: double
Output
DrvRef — Driver reference data
bus
Driver reference data, returned as a bus containing these block values.
Signal | Description | Units |
---|---|---|
| Longitudinal reference velocity | m/s |
| Lateral reference displacement | m |
| Vehicle global longitudinal reference position | m |
| Vehicle global lateral reference position | m |
| Vehicle global yaw reference position | rad |
| Reference path curvature | 1/m |
| Reference path curvature gradient | 1/m^2 |
Data Types: bus
DrvCmd — Driver command data
bus
Driver command data, returned as a bus containing these block values.
Signal | Description | Units | |
---|---|---|---|
|
| Boolean signal used to override driver model steering commands | one |
| Handwheel angle | one | |
| Boolean signal used to override driver model steering commands
with zero when value is | one | |
| Boolean signal used to hold the current driver model steering
output when | one | |
|
| Boolean signal used to override driver model acceleration commands | one |
| Normalized accelerator input | one | |
| Boolean signal used to hold the current driver model acceleration
output when | one | |
| Boolean signal used to override driver model acceleration
commands with zero when value is | one | |
|
| Boolean signal used to override driver model deceleration commands | one |
| Normalized decelerator or brake input | one | |
| Boolean signal used to hold the current driver model deceleration
output when | one | |
| Boolean signal used to override driver model deceleration
commands with zero when value is | one | |
| Normalized handbrake or park brake input | one | |
|
| Command to specify the transmission mode | one |
| Command to specify manual gear number or automatic transmission shifter position | one | |
| Command to upshift | one | |
| Command to downshift | one | |
| 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.
Data Types: bus
Info — Information data
bus
Information data, returned as a bus containing these block values.
Signal | Description | Units |
---|---|---|
| Left lane boundary | m |
| Right lane boundary | m |
| Lateral reference displacement | m |
| Vehicle global longitudinal reference position | m |
| Vehicle global lateral reference position | m |
Dependencies
To enable this parameter, select Output info bus.
Data Types: bus
Parameters
To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.
Lane change type, changeType — Type of lane change to conduct
Double lane change (ISO 3888-1)
(default) | Obstacle avoidance (ISO 3888-2)
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, tStart [s] — Start time
3
(default) | positive scalar
Inertial longitudinal position of gate extrance, XGate [m] — Global longitudinal position of start of gate entry
176
(default) | scalar
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 |
Longitudinal entrance velocity setpoint, velRef — Target velocity
35
(default) | positive scalar
Longitudinal entrance velocity setpoint units, velRefUnit [] — Units
mph
(default)
Distance after target speed to begin reference, xStart [m] — Longitudinal offset
2
(default) | scalar
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 |
Vehicle width, vehWidth [m] — Nominal vehicle width
2
(default) | positive scalar
Lateral offset, nomLatOffset [m] — Nominal lateral offset
0
(default) | scalar
Lateral reference position breakpoints, latRefbp [m] — Longitudinal path breakpoints
1-by-n vector (default)
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 reference data, latRef [m] — Lateral path reference points
1-by-7 vector (default)
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 |
Use reference data — Option to use reference data
on
(default) | off
Stop simulation on course exit — Option to stop simulation on course exit
off
(default) | on
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 |
Output info bus — Option to output info bus
off
(default) | on
Instantiate 3D cones (Simulation 3D Scene Configuration required) — Option to instantiate 3D cones
off
(default) | on
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
See Also
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)