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 ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_reference1.png. 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 ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_reference2.png-th column of the reference is interpreted as the reference to be used at the ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_reference3.png-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 ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_reference4.png.
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);
	


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