Once we have decided on a path to follow, we need to determine how to control our car’s acceleration and steering to navigate the desired path. To do this, we use model predictive control (MPC).
MPC works by solving for a sequence of controls over a period of time into the future called the ‘prediction horizon’. This gives the algorithm the ability to react to potential obstacles or prepare for tight maneuvers earlier. It requires a set of reference waypoints containing information about the desired car pose at evenly spaced time steps into the future. A reference tracking cost function is then defined as the weighted sum of squared differences between each reference car pose parameter, and the predicted pose for a given sequence of controls.
A plant model is required to predict how the vehicle will behave given any set of input controls. The kinematic bicycle model and dynamic bicycle model are two simplified vehicle models commonly used for MPC. The kinematic model is the simpler of the two, but at low speeds can accurately predict the vehicle’s behaviour, and is therefore useful on our discovery lap. However at higher speeds, tyre forces become significant which the kinematic model does not accurately capture, so the dynamic bicycle model better predicts how the vehicle will move.
An optimisation algorithm is then used to solve for the optimal sequence of controls which allows the vehicle to follow the desired path as close as possible. For linear plant models, quadratic programming (QP) can be used, which is a well studied type of optimisation problem. However, for nonlinear plant models including our two vehicle models, more complex techniques need to be implemented. This is often done through a linearisation of the model at the reference point, which then allows traditional QP techniques to be used. Constraints on maximum and minimum acceleration and steering are also used to limit the solutions to those realistically achievable by our car.
Having a robust, stable controller is pivotal to firmly commanding our vehicle’s behaviour. A lot of tuning and testing has gone into the development of the controller, evolving it into a system which can reliably, smoothly and predictably follow the desired path.
By Kerry He