EMPCController
Purpose
Explicit MPC controller
Syntax
ctrl = EMPCController(model, horizon)
ctrl = EMPCController(MPCController)
Description
Constructs the explicit form of an MPC controller.
The particular type of the optimization problem to be solved
parametrically is determined by the type of the prediction model
and by its parameters. For a more detailed information, see
"help MPCController".
Instances of the EMPCController class expose following
properties:
-
model: the prediction model used in the MPC
setup;
-
N: the prediction horizon
-
optimizer: the explicit optimizer as an instance of
the PolyUnion class;
-
partition: the polyhedral partition of the explicit
feedback law as an instance of the Polyhedron class;
-
feedback: the explicit representation of the
feedback law as an instance of the PolyUnion class;
-
cost: the explicit representation of the
optimal cost function as an instance of the PolyUnion
class.
The optimizer property is available for read/write
access. This allows, for instance, to remove overlaps from multiple
overlapping partitions by ctrl.optimizer = ctrl.optimizer.merge().
Input Arguments
model |
Any MPT3 system (LTISystem, PWASystem,
MLDSystem)
Class: AbstractSystem
|
Output Arguments
ctrl |
Explicit MPC controller |
Example(s)
Example
1
Create a 2D LTI system
A = [1 1; 0 1]; B = [1; 0.5]; C = [1 0]; D = 0;
sys = LTISystem('A', A, 'B', B, 'C', C, 'D', D)
LTISystem with 2 states, 1 input, 1 output
Define constraints
sys.x.min = [-5; -5]; sys.x.max = [5; 5];
sys.u.min = -1; sys.u.max = 1;
sys.y.min = -5; sys.y.max = 1;
Define penalties (we use squared two-norm with unity
weights here)
sys.x.penalty = QuadFunction(eye(2));
sys.u.penalty = QuadFunction(1);
Construct the explicit MPC controller
horizon = 3;
ctrl = MPCController(sys, horizon).toExplicit()
mpt_plcp: 7 regions
Explicit MPC controller (horizon: 3, regions: 7)
Plot the optimal feedback lawctrl.feedback.fplot()

Plot the optimal cost functionctrl.cost.fplot()

Plot the polyhedral partitionctrl.partition.plot()

See Also
mpccontroller
© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk