Why is quadratic programming used in Model Predictive Control when linear programming can solve the problem as well?

36 Views Asked by At

Consider that we have a discrete state space model.

$$x(k+1) = Ax(k) + Bu(k) \\ y(k) = Cx(k)$$

And we want to find out what is the best inputs $u(k)$. So to do that we can create the extended observabillity matrix and the lower triangular toeplitz matrix of observability matrix times $C$ matrix.

$$F = \begin{bmatrix} CA\\ CA^2\\ CA^3\\ \vdots \\ CA^{N_p} \end{bmatrix} , \Phi = \begin{bmatrix} CB &0 &0 &\cdots & 0\\ CAB & CB & 0 & \cdots & 0\\ CA^2B& CAB & 0 &\cdots &0 \\ \vdots & \vdots & \vdots & \vdots &\vdots \\ CA^{N_p-1}B & CA^{N_p-2}B & CA^{N_p-3}B & \cdots & CA^{N_p-N_c}B \end{bmatrix}$$

Now we want to solve $U = u_0, u_1, u_2, ... , u_n$ form this were $Y = y_0, y_1, y_2, ... , y_n$ is our reference and $x_0$ is our initial state where we are at the beginning. $$Y = Fx_0 + \Phi U$$

To solve for that, it can be done via quadratic programming:

$$\nabla J = \frac{1}{2}U^T \Phi^T \Phi U + \Phi^T(Y-Fx_0)U$$

Subject to: $$ \begin{bmatrix} \Phi \\ -\Phi \end{bmatrix}U \leq \begin{bmatrix} b_u\\ -b_l \end{bmatrix} \\ U \geq 0 $$

Or via linear programming e.g simplex method $$\Delta c^T = \Phi^T (Y-F x_0)U$$ Subject to: $$ \begin{bmatrix} \Phi \\ -\Phi \end{bmatrix}U \leq \begin{bmatrix} b_u\\ -b_l \end{bmatrix} \\ U \geq 0 $$

And they both having their origin formula from ordinary least squares $$U = (\Phi^T\Phi)^{-1}\Phi^T (Y-F x_0)$$

So what's is the difference in result of $U$ ?