Constant Radius
Libraries:
Vehicle Dynamics Blockset /
Vehicle Scenarios /
Drive Cycle and Maneuvers
Description
The Constant Radius block generates an open-loop longitudinal velocity
reference and a reference pose using vehicle feedback to track a constant radius path, which
is helpful to characterize a vehicle’s roll and understeer responses, usually at various
speeds. You can use these references directly with the Predictive Driver
block with the Lateral control type, controlTypeLat parameter set to
Stanley
. You can also vary the radius and direction of travel and
optionally stop the simulation at a specified lateral acceleration limit.
Ports
Input
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
ay — Vehicle lateral acceleration
scalar
Vehicle lateral acceleration needed to stop the simulation, specified as a scalar, in gee.
Dependencies
To enable this parameter, select Stop simulation at lateral acceleration threshold.
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
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.
Maneuver start time, tStart [s] — Start time
2
(default) | positive scalar
Longitudinal velocity setpoint, velRef — Target velocity
35
(default) | positive scalar
Longitudinal velocity setpoint units, velRefUnit [] — Units
mph
(default)
R — Radius to be tracked
100
(default) | positive scalar
Initial longitudinal position, X_o [m] — Initial longitudinal start point
0
(default) | scalar
Initial longitudinal start point of the circular reference in global coordinates, 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: | X_o |
Values: | 0 (default) | scalar |
Data Types: | double |
Initial lateral position, Y_o [m] — Initial lateral start point
0
(default) | scalar
Initial lateral start point of the circular reference in global coordinates, 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: | Y_o |
Values: | 0 (default) | scalar |
Data Types: | double |
Initial yaw angle, psi_o [rad] — Starting heading angle
0
(default) | scalar
Starting heading angle of the circular reference in global coordinates, in rad.
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: | psi_o |
Values: | 0 (default) | scalar |
Data Types: | double |
Distance between inside and outside cone boundaries, radialConeDist [m] — Radial distance between cones
6
(default) | positive scalar
Radial distance between cones, in m.
Dependencies
To enable this parameter, select Instantiate 3D cones (Simulation 3D Scene Configuration 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: | radialConeDist |
Values: | 6 (default) | positive scalar |
Data Types: | double |
Lateral acceleration absolute threshold, ayMax [g] — Maximum allowable lateral acceleration before simulation is stopped
0.5
(default) | positive scalar
Maximum allowable lateral acceleration before the simulation is stopped, in g.
Dependencies
To enable this parameter, select Stop simulation at lateral acceleration threshold.
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: | ayMax |
Values: | 0.5 (default) | positive scalar |
Data Types: | double |
Maneuver direction, steerDir — Maneuver direction
Right
(default) | Left
Stop simulation at lateral acceleration threshold — Option to stop simulation at lateral acceleration threshold
off
(default) | on
Select this parameter to stop the simulation at the lateral acceleration threshold.
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: | ayStop |
Values: | off (default) | on |
Data Types: | character vector |
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 |
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2024b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)