Longitudinal Driver
Longitudinal speed-tracking controller
Libraries:
Powertrain Blockset /
Vehicle Scenario Builder
Vehicle Dynamics Blockset /
Vehicle Scenarios /
Driver
Description
The Longitudinal Driver block implements a 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. You can use the block to model the dynamic response of a driver or to generate the commands necessary to track a longitudinal drive cycle.
Configurations
Use the External Actions parameters to create input ports for signals that can disable, hold, or override the closed-loop acceleration or deceleration commands. The block uses this priority order for the input commands: disable (highest), hold, override.
This table summarizes the external action parameters.
Goal | External Action Parameter | Input Ports | Data Type |
---|---|---|---|
Override the accelerator command with an input acceleration command. | Accelerator override |
| Boolean |
| double | ||
Hold the acceleration command at the current value. | Accelerator hold | AccelHld | Boolean |
Disable the acceleration command. | Accelerator disable | AccelZero | Boolean |
Override the decelerator command with an input deceleration command. | Decelerator override |
| Boolean |
| double | ||
Hold the decelerator command at current value. | Decelerator hold | DecelHld | Boolean |
Disable the decelerator command. | Decelerator disable | DecelZero | Boolean |
Use the Control type, cntrlType parameter to specify one of these control options.
Setting | Block Implementation |
---|---|
| Proportional-integral (PI) control with tracking windup and feed-forward gains. |
| PI control with tracking windup and feed-forward gains that are a function of vehicle velocity. |
| Optimal single-point preview (look ahead) control model developed by C. C. MacAdam1, 2, 3. The model represents driver steering control behavior during path-following and obstacle avoidance maneuvers. Drivers preview (look ahead) to follow a predefined path. To implement the MacAdam model, the block:
|
Use the Shift type, shftType parameter to specify one of these shift options.
Setting | Block Implementation |
---|---|
| No transmission. Block outputs a constant gear of 1. Use this setting to minimize the number of parameters you need to generate acceleration and braking commands to track forward vehicle motion. This setting does not allow reverse vehicle motion. |
| Block uses a Stateflow® chart to model reverse, neutral, and drive gear shift scheduling. Use this setting to generate acceleration and braking commands to track forward and reverse vehicle motion using simple reverse, neutral, and drive gear shift scheduling. Depending on the vehicle state and vehicle velocity feedback, the block uses the initial gear and time required to shift to shift the vehicle up into drive or down into reverse or neutral. For neutral gears, the block uses braking commands to control the vehicle speed. For reverse gears, the block uses an acceleration command to generate torque and a brake command to reduce vehicle speed. |
| Block uses a Stateflow chart to model reverse, neutral, park, and N-speed gear shift scheduling. Use this setting to generate acceleration and braking commands to track forward and reverse vehicle motion using reverse, neutral, park, and N-speed gear shift scheduling. Depending on the vehicle state and vehicle velocity feedback, the block uses these parameters to determine the:
For neutral gears, the block uses braking commands to control the vehicle speed. For reverse gears, the block uses an acceleration command to generate torque and a brake command to reduce vehicle speed. |
| Block uses the input gear, vehicle state, and velocity feedback to generate acceleration and braking commands to track forward and reverse vehicle motion. For neutral gears, the block uses braking commands to control the vehicle speed. For reverse gears, the block uses an acceleration command to generate torque and a brake command to reduce vehicle speed. |
Use the Output gear signal parameter to create the
GearCmd
output port. The GearCmd
signal contains the integer value of the commanded vehicle gear.
Gear | Integer |
---|---|
Park |
|
Reverse |
|
Neutral |
|
Drive |
|
Gear |
|
Controller: PI Speed-Tracking
If you set the control type to PI
or Scheduled
PI
, the block implements proportional-integral (PI) control with tracking
windup and feedforward gains. For the Scheduled PI
configuration,
the block uses feed forward gains that are a function of vehicle velocity.
To calculate the speed control output, the block uses these equations.
Setting | Equation |
---|---|
|
|
|
|
The velocity error low-pass filter uses this transfer function.
To calculate the acceleration and braking commands, the block uses these equations.
The equations use these variables.
vnom | Nominal vehicle speed |
Kp | Proportional gain |
Ki | Integral gain |
Kaw | Anti-windup gain |
Kff | Velocity feedforward gain |
Kg | Grade angle feedforward gain |
θ | Grade angle |
τerr | Error filter time constant |
y | Nominal control output magnitude |
ysat | Saturated control output magnitude |
eref | Velocity error |
eout | Difference between saturated and nominal control outputs |
yacc | Acceleration signal |
ydec | Braking signal |
v | Velocity feedback signal |
vref | Reference velocity signal |
Controller: Predictive Speed-Tracking
If you set the Control type, cntrlType parameter to
Predictive
, the block implements an optimal
single-point preview (look ahead) control model developed by C. C.
MacAdam1, 2, 3. The model represents driver steering
control behavior during path-following and obstacle avoidance maneuvers. Drivers
preview (look ahead) to follow a predefined path. To implement the MacAdam model,
the block:
Represents the dynamics as a linear single track (bicycle) vehicle
Minimizes the previewed error signal at a single point T* seconds ahead in time
Accounts for the driver lag deriving from perceptual and neuromuscular mechanisms
For longitudinal motion, the block implements these linear dynamics.
In matrix notation:
The block uses this equation for the rolling resistance.
The single-point model assumes a minimum previewed error signal at a single point T* seconds ahead in time. a* is the driver ability to predict the future vehicle response based on the current steering control input. b* is the driver ability to predict the future vehicle response based on the current vehicle state. The block uses these equations.
The equations use these variables.
a, b | Forward and rearward tire location, respectively |
m | Vehicle mass |
I | Vehicle rotational inertia |
a*, b* | Driver prediction scalar and vector gain, respectively |
x | Predicted vehicle state vector |
v | Longitudinal velocity |
F | System matrix |
Kpt | Tractive force and brake limit |
γ | Grade angle |
g | Control coefficient vector |
g | Gravitational constant |
T* | Preview time window |
ƒ(t+T*) | Previewed path input T* seconds ahead |
U | Forward vehicle velocity |
mT | Constant observer vector; provides vehicle lateral position |
Fr | Rolling resistance |
ar | Static rolling and driveline resistance |
br | Linear rolling and driveline resistance |
cr | Aerodynamic rolling and driveline resistance |
The single-point model implemented by the block finds the steering command that minimizes a local performance index, J, over the current preview interval, (t, t+T).
To minimize J with respect to the steering command, this condition must be met.
You can express the optimal control solution in terms of a current non-optimal and corresponding nonzero preview output error T* seconds ahead1, 2, 3.
The block uses the preview distance and vehicle longitudinal velocity to determine the preview time window.
The equations use these variables.
T* | Preview time window |
ƒ(t+T*) | Previewed path input T* sec ahead |
y(t+T*) | Previewed plant output T* sec ahead |
e(t+T*) | Previewed error signal T* sec ahead |
u(t), uo(t) | Steer angle and optimal steer angle, respectively |
L | Preview distance |
J | Performance index |
U | Forward (longitudinal) vehicle velocity |
The single-point model implemented by the block introduces a driver lag. The driver lag accounts for the delay when the driver is tracking tasks. Specifically, it is the transport delay deriving from perceptual and neuromuscular mechanisms. To calculate the driver transport delay, the block implements this equation.
The equations use these variables.
τ | Driver transport delay |
y(t+T*) | Previewed plant output T* sec ahead |
e(t+T*) | Previewed error signal T* sec ahead |
u(t), uo(t) | Steer angle and optimal steer angle, respectively |
J | Performance index |
Ports
Input
Output
Parameters
References
[1] MacAdam, C. C. "An Optimal Preview Control for Linear Systems". Journal of Dynamic Systems, Measurement, and Control. Vol. 102, Number 3, Sept. 1980.
[2] MacAdam, C. C. "Application of an Optimal Preview Control for Simulation of Closed-Loop Automobile Driving ". IEEE Transactions on Systems, Man, and Cybernetics. Vol. 11, Issue 6, June 1981.
[3] MacAdam, C. C. Development of Driver/Vehicle Steering Interaction Models for Dynamic Analysis. Final Technical Report UMTRI-88-53. Ann Arbor, Michigan: The University of Michigan Transportation Research Institute, Dec. 1988.
Extended Capabilities
Version History
Introduced in R2017a