Lateral Controller Stanley
Control steering angle of vehicle for path following by using Stanley method
Libraries:
Automated Driving Toolbox /
Vehicle Control
Description
The Lateral Controller Stanley block computes the steering angle command, in degrees, that adjusts the current pose of a vehicle to match a reference pose, given the vehicle's current velocity and direction. The controller computes this command using the Stanley method [1], whose control law is based on both a kinematic and dynamic bicycle model. To change between models, use the Vehicle model parameter.
The kinematic bicycle model is suitable for path following in low-speed environments such as parking lots, where inertial effects are minimal.
The dynamic bicycle model is suitable for path following in high-speed environments such as highways, where inertial effects are more pronounced. This vehicle model provides additional parameters that describe the dynamics of the vehicle.
Examples
Ports
Input
Output
Parameters
Tips
You can switch between bicycle models as the vehicle environment changes. Add two Lateral Controller Stanley blocks to a variant subsystem and specify a different bicycle model for each block. For an example, see Lateral Control Tutorial.
Algorithms
To compute the steering angle command, the controller minimizes the position error and the angle error of the current pose with respect to the reference pose. The driving direction of the vehicle determines these error values.
When the vehicle is in forward motion (Direction parameter is
1
):
The position error is the lateral distance from the center of the front axle to the reference point on the path.
The angle error is the angle of the front wheel with respect to reference path.
When the vehicle is in reverse motion (Direction parameter is
-1
):
The position error is the lateral distance from the center of the rear axle to the reference point on the path.
The angle error is the angle of the rear wheel with respect to reference path.
For details on how the controller minimizes these errors for kinematic and dynamic bicycle models, see [1].
References
[1] Hoffmann, Gabriel M., Claire J. Tomlin, Michael Montemerlo, and Sebastian Thrun. "Autonomous Automobile Trajectory Tracking for Off-Road Driving: Controller Design, Experimental Validation and Racing." American Control Conference. 2007, pp. 2296–2301. doi:10.1109/ACC.2007.4282788
Extended Capabilities
Version History
Introduced in R2018b