terminalPenalty
Purpose
Penalizes the final predicted state in the MPC problem
Syntax
Description
This filter adds the term
to the MPC cost
function. Properties of the penalty (i.e., the weighting matrix
and the norm
) are provided by objects derived
from the Function class.
Note that if the state signal has the reference filter
enabled, the terminal penalty becomes
, where
is a user-specified reference
signal, taken from model.x.reference.
To add this filter, call
model.x.with('terminalPenalty'). Then you can specify
parameters of the penalty function by setting the
model.x.terminalPenalty property to an instance of the
Function class (see "help Function").
To remove this filter, call
model.x.without('terminalPenalty').
Example(s)
Example
1
Specify an LTI system
sys = LTISystem('A', 0.9, 'B', 1);
Add unity quadratic penalties on states and inputs (but not
on the terminal state)
sys.x.penalty = QuadFunction(1);
sys.u.penalty = QuadFunction(1);
Compute an LQR terminal penalty and use it as a terminal
state cost
sys.x.with('terminalPenalty');
sys.x.terminalPenalty = sys.LQRPenalty();
M = MPCController(sys, 4);
x0 = 10;
u = M.evaluate(x0)
u =
-5.37666558531833
◀ |
filter_deltapenalty |
|
systemsignal |
▶ |
© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk