Multiparametric programming
YALMIP can be used to calculate explicit solutions of linear and quadratic programs by interfacing the Multi-Parametric Toolbox (MPT). The following lines of code defines the basic numerical components of a simple model predictive control (MPC) problem (essentially a constrained least-squares problem).
The variables in an MPC problem are the current state x and the control sequence U.
The output predictions are linear in the current state and the control sequence.
We wish to minimize the quadratic cost
Both input and output are constrained
We seek the explicit solution U(x) over the set |x|≤1. The set |x|≤1 is called the exploration set and is defined using a standard constraint.
The explicit solution U(x) is obtained by calling solvemp with the parametric variable x as the fourth argument.
The explicit solution can, e.g, be plotted (see the MPT manual for how to use the solution)
The following piece of code calculates the explicit MPC controller with an L∞ cost instead.
This example enables us to introduce the overloading of the projection functionality in MPT. In MPC, only the first input, U(1), is of interest. What we can do is to project the whole problem to the parametric variable x, the objective function t, and the variable of interest, U(1). The following piece of code projects the problem to the reduced set of variables, and solves the multi-parametric LP in this reduced space (not necessarily an efficient approach though, projection is very expensive, and we can easily end up with a problem with many constraints in the reduced variables).
|