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
This linear model is derived from the linearization of the model at an operation equilibrium
point given by the triplet
The objective is to implement an MPC control law
where
the notation of a lifted system dynamics
is used, where the whole state sequence can be determined with the aid of the input sequence
The lifted system matrix and the lifted input matrix are
The implementation with the MATLAB built-in functions quadprog is shown here.