terminalPenalty

Purpose

Penalizes the final predicted state in the MPC problem

Syntax


Description

This filter adds the term ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_terminalpenalty1.png to the MPC cost function. Properties of the penalty (i.e., the weighting matrix ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_terminalpenalty2.png and the norm ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_terminalpenalty3.png) are provided by objects derived from the Function class.

Note that if the state signal has the reference filter enabled, the terminal penalty becomes ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_terminalpenalty4.png, where ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_terminalpenalty5.png 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 ../../../../../fig/mpt/modules/ui/@SystemSignal/filter_terminalpenalty6.png
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


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