Main Content

Driver Commands

Configure driver

    Description

    The Driver Commands block implements the driver model that the reference application uses to generate acceleration, braking, gear, and steering commands. By default, if you select the Reference Generator block parameter Use maneuver-specific driver, initial position, and scene, the reference application selects the driver for the maneuver that you specified.

    Vehicle Command Mode Setting

    Implementation

    Longitudinal Driver

    Longitudinal Driver block — Longitudinal speed-tracking controller. Based on reference and feedback velocities, the block generates normalized acceleration and braking commands that can vary from 0 through 1. Use the block to model the dynamic response of a driver or to generate the commands necessary to track a longitudinal drive cycle.

    Predictive Driver (default)

    Predictive Driver block — Controller that generates normalized steering, acceleration, and braking commands to track longitudinal velocity and a lateral reference displacement. The normalized commands can vary between -1 to 1. The controller uses a single-track (bicycle) model for optimal single-point preview control.

    Open Loop

    Implements an open-loop system so that you can configure the reference application for constant or signal-based steering, acceleration, braking, and gear command input.

    Examples

    Ports

    Input

    expand all

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

    Bus containing vehicle displacement feedback signals.

    Steer angle, specified as a scalar.

    Dependencies

    To enable this port, set Vehicle command mode to Open Loop.

    Vehicle acceleration, specified as a scalar.

    Dependencies

    To enable this port, set Vehicle command mode to Open Loop.

    Vehicle deceleration, specified as a scalar.

    Dependencies

    To enable this port, set Vehicle command mode to Open Loop.

    Vehicle gear, specified as a scalar.

    Dependencies

    To enable this port, set Vehicle command mode to Open Loop.

    Output

    expand all

    Bus containing these steering, acceleration, braking, and gear commands.

    SignalDescription

    SteerCmd

    Commanded steer angle.

    AccelCmd

    Commanded vehicle acceleration.

    DecelCmd

    Commanded vehicle deceleration.

    GearCmd

    Commanded vehicle gear.

    Parameters

    expand all

    Specify driver model.

    Version History

    Introduced in R2019a