You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tutorial shows an implementation of a linear quadratic model predictive controller (MPC) to control a quadruple-tank model, simulated in Matlab/Simulink.
Consider that the plant to control is modeled as a linear time-invariant system given by
where $x\in R^n$ his the current state of the system, $u \in R^m $
is the current input, $y \in R^p$ is the controlled output and $x^+$
the successor state.
This linear model is derived from the linearization of the model at an operation equilibrium
point given by the triplet $(x_0, u_0, y_0)$. Therefore, denoting
as $(x(j), u(j), y (j))$ the state, inputs and outputs of the
plant, we have that $x(j) = x(j) − x_0$, $u(j) = u(j) − u_0$
and $y(j) = y (j) − y_0$.
The objective is to implement an MPC control law $U(j) =
\kappa(x(j), R)$ such that the controlled system is asymptotically
stable and the controlled variables $y (j)$ converge to the
reference $R$ if this is reachable.
For a given state of the prediction model $x = x−x_0$ and a
reference $r = R −y_0$, the MPC control law is derived from
the online solution of the following optimization control
problem:
where $M$ is a suitable matrix that maps the steady state and input given by the reference. Once a solution $u^{∗}(x, r)$
is obtained, the control law is calculated by the receding horizon technique as follows $\kappa_N (x, r) = u^{*} (0; x, r)$. The
control law implemented in the real plant will be $u(k) =\kappa_N (x(j) − x_O, R − y_0) + u_0$.
Lifted System Dynamics
the notation of a lifted system dynamics
$$
\mathbf{x}=G_x x(j) + G_u \mathbf{u}
$$
is used, where the whole state sequence can be determined with the aid of the input sequence $\mathbf{u}$ for a given initial state $x(j)$. The state sequence and the input sequence are