Model Predictive Control of a Mobile Robot
Model predictive control is an optimal control strategy that uses the model of the system to obtain an optimal control sequence by minimizing an objective function. At each sampling interval, the model is used to predict the behavior of the system over a prediction horizon. Based on these predictions, an objective function is minimized with respect to the future sequence of inputs, thus requiring the solution of a constrained optimization problem for each sampling interval. Although prediction and optimization are performed over a future horizon, only the values of the inputs for the current sampling interval are used and the same procedure is repeated at the next sampling time. This mechanism is known as moving or receding horizon strategy, in reference to the way in which the time window shifts forward from one sampling time to the next one. |
Advantages of using MPC
The main advantages of model predictive control is the capability to handle the constraints due to the state or the control input limitations in a straightforward way. Besides, it allows the user to optimize a certain performance index when performing the feedback control.
Derivation of Math
Quadratic Programming
Control Block Diagram
The MPC block diagram is shown below. The reference control signal was pre-calculated and used to generate the reference state trajectory based on the kinematic model of the vehicle. Then at every time step, the MPC algorithm takes the current time step to N steps reference states xr(k:k+N|k) and the current estimate state x(k|k) to predict the N states in the future. These future states are then used to construct the cost function. Since the cost function satisfy the standard quadratic form, we can easily use MATLAB quadprog to solve the constrained optimization problem and compute the optimal control input for the next N steps. Finally, the first control signal u*(k|k) will be used as the real control input for the physical system.
Open Loop V.S. MPC
The figure of state trajectory and control signal for open loop and MPC are shown below. It can be clearly seen that the state asymptoically converges the reference. It can also be shown that the control inputs are inside the limits imposed by the constraints. Since the state and control errors converge to zero, one could also say that the value of the objective function should also converges to zero.