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: 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 law
ctrl.feedback.fplot()

../../../../../fig/mpt/modules/ui/@EMPCController/empccontroller_img_1.png

Plot the optimal cost function
ctrl.cost.fplot()

../../../../../fig/mpt/modules/ui/@EMPCController/empccontroller_img_2.png

Plot the polyhedral partition
ctrl.partition.plot()

../../../../../fig/mpt/modules/ui/@EMPCController/empccontroller_img_3.png

See Also

mpccontroller


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