Swept Sine
Libraries:
Vehicle Dynamics Blockset /
Vehicle Scenarios /
Drive Cycle and Maneuvers
Description
The Swept Sine block generates steering, accelerator, and brake commands to conduct a swept sine maneuver. Once the vehicle reaches the target longitudinal velocity, the block initiates a swept sinusoidal steering command using the prescribed amplitude, final frequency, and duration.
You can use the swept sine maneuver to characterize the transient vehicle response as done in ISO 7401:2011.
Note
For information on the reference generator block used in the swept sine reference application, see Swept Sine Reference Generator.
Ports
Input
Vehicle longitudinal velocity in the body fixed frame, specified as a scalar, in m/s.
Data Types: single | double
Output
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
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 Parameters
Hold time after maximum steer amplitude is reached, in Hz.
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: | steerFreq |
| Values: | 0.7 (default) | positive scalar |
| Data Types: | double |
Set the initial steer direction as Right or
Left.
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: | steerDir |
| Values: | Right (default) | Left |
| 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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)
