Main Content

Swept Sine Reference Generator

Generate swept-sine maneuver reference signals

    Description

    The Swept Sine Reference Generator block sets the parameters that configure the swept-sine maneuver. Once the vehicle reaches the target longitudinal velocity, the block generates a sinusoidal steering command with linearly increasing frequency, up to the maximum specified in the allotted time.

    Use the Steady-state solver mode parameter to specify the initial conditions for the maneuver. By default, the parameter is set to Initialize from model, and the simulation starts with the vehicle at rest at the specified initial position. If you want to start the simulation at the non-zero steady-state velocity:

    1. Set Steady-state solver mode to Solve using block parameters.

    2. On the Steady-State Solver tab, specify the initial conditions, workspace variable, and solver settings. Click Generate steady state solution.

    3. After the simulation completes, set Steady-state solver mode to Resume from a workspace variable.

    4. Set Steady-state solution to start from, ssVar to the workspace variable you specified in step 2.

    5. Run the simulation.

    Examples

    Ports

    Input

    expand all

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

    Output

    expand all

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

    Parameters

    expand all

    Maneuver

    Use the Steady-state solver mode parameter to specify the steady-state initial conditions for the maneuver. By default, the simulation will not find or start the simulation at the steady-state operating points.

    SettingDescription
    Initialize from model

    Simulation starts maneuver at the simulation start time specified by Maneuver start time, t_start at longitudinal velocity of 0.

    Solve using block parameters

    Simulation finds the steady-state operating points using the parameters on the Steady-State Solver tab.

    Resume from a workspace variable

    Simulation starts at the steady-state operating points workspace variable specified by Steady-state solution to start from, ssVar.

    Workspace variable containing the steady-state operating points.

    Dependencies

    To enable this parameter, set Steady-state solver mode to Resume from a workspace variable.

    Maneuver start time, in s.

    Dependencies

    To enable this parameter, set Steady-state initial conditions to Initialize from model.

    Target velocity.

    Units for target velocity.

    Sinusoidal steering amplitude, in deg.

    Cut off frequency to stop the maneuver, in Hz.

    Sweep time, in s.

    Steady-State Solver

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

    Dependencies

    To enable this parameter, set Steady-state initial conditions to Solve using block parameters.

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

    Dependencies

    To enable this parameter, set Steady-state initial conditions to Solve using block parameters.

    Initial vehicle yaw angle about the earth-fixed Z-axis, in rad.

    Dependencies

    To enable this parameter, set Steady-state initial conditions to Solve using block parameters.

    Steady-state solver velocity tolerance.

    Dependencies

    To enable this parameter, set Steady-state initial conditions to Solve using block parameters.

    Maximum simulated time to reach steady-state, in s.

    Dependencies

    To enable this parameter, set Steady-state initial conditions to Solve using block parameters.

    Name of workspace variable containing steady-state operating points.

    Dependencies

    To enable this parameter, set Steady-state initial conditions to Solve using block parameters.

    Version History

    Introduced in R2019a