reference
Purpose
Penalizes difference of a signal from a given reference level
Syntax
Description
Adding this filter to an MPC setup will modify the objective
function in such a way that the difference between actual signal
and a prescribed reference signal is minimized.
To enable this filter, call model.x.with('reference'),
which will enable tracking of state references by minimizing
. You can also add tracking to input and/or
output signals by using model.u.with('reference') and
model.y.with('reference'), respectively.
Once the filter is enabled, the reference trajectory can be
specified in the signal's reference property:
model.x.reference = [0.5; -1]
The reference signal can also be time-varying. In such a case the
-th column of the reference is interpreted as the
reference to be used at the
-th step of the prediction:
model.u.reference = [-1 -2 0 0 1]
The filter can be removed by calling
model.x.without('reference').
Example(s)
Example
1
Create a 1D LTI system
.model = LTISystem('A', 0.9, 'B', 1);
Enable tracking of state and input references.
model.x.with('reference');
model.u.with('reference');
model.x.reference = 0.4;
model.u.reference = 1;
model.x.penalty = QuadFunction(1);
model.u.penalty = QuadFunction(1);
◀ |
filter_setconstraint |
|
mpt |
▶ |
© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk