This repository contains matlab interface to convert a standard model predictive control to fast model predictive control based on the paper Fast Model predictive control using online optimization. The fast MPC class solves using a custom built infeasible start newton solver exploiting the structure of MPC.
In the conventional method, a MPC problem is solved and the first control step is applied to the system, and the next integrated state forms the initial condition for the next MPC iteration. Here the structure of the MPC is exploited for accelerated results. The current implementation is performed on time invariant system dynamics (equality constraints)
Where,
The above mentioned problem is converted into the following structure
The details of the matrices and structure are present in the paper.
Upcoming updates will include non-linear fast MPC along with the inclusions of integrators
Clone or download the repository. Various inputs are needed to the FAST MPC class which are explained as follows.
Q - State stage cost
R - Control stage cost
S - State control coupled cost
Qf - Terminal state cost
q - linear state cost
r - linear control cost
qf - terminal state linear cost
x_min - lower bound on state
x_max - upper bound on state
u_min - lower bound on control
u_max - upper bound on control
T - Horizon length
x0 - initial state
A - State transition matrix
B - Control matrix
w - distrubance vector
xf - final state
x_init - initialization(optional) (Note: if you intend to provide your own initialization, then the entire vector length needs to be provided i.e., T*(n+m))
A constructor is also present for the class and the cronological order is as mentioned above.
Matlab 2010 or higher
The test_fast_mpc.m contains a random system. It also compares the native matlab solver and various fast MPC methods.
- Sandeep Banik - Projects
Fast Model Predictive Control Using Online Optimization by Yang Wang and Stephen Boyd