SET CONSTRAINTS

Sets state, input and mixed constraints

Contents

Method of constraints object.

Description

This method allows to set state, input and mixed constraints for some (or all) time instants. Whenever a constraint is added, new rows are added to the elements of H and K cell arrays.

Syntax

object = setConstraints(object,label,lbound,ubound,[nc])

label can assume values 'x', 'u' or 'p' followed by a number (e.g. 'x1', 'u2', 'p3'). If label is 'xj', saturation constraints in the form lbound <= xj <= ubound are set for j-th state variables. If nc is not specified, the constraints are valid from time instant k to instant k+N, being N the prediction horizon. Otherwise, the time instants (from 0 to N) in which the constraints are set can be specified in array nc. If label is 'uj', saturation constraints in the form lbound <= uj <= ubound are set for j-th input variables. If nc is not specified, the constraints are valid from time instant k to instant k+N-1, being N the prediction horizon. Otherwise, the time instants (from 0 to N-1) in which the constraints are set can be specified in array nc. If label is 'pj', saturation constraints in the form lbound <= pj <= ubound are set for j-th parameter. If nc is not specified, the constraints are valid from time instant k to instant k+N, being N the prediction horizon. Otherwise, the time instants (from 0 to N-1) in which the constraints are set can be specified in array nc. If the label is not followed by a number and lbound and ubound are vectors, the constraints are imposed to all components of states, inputs or parameters.

object = setConstraints(object,label,Hc,Kc,[nc])

label can assume values 'x', 'u', 'p' or 'm'. If label is 'x', state constraints in the form Hc x <= Kc are set. If nc is not specified, the constraints are valid from time instant k to instant k+N, being N the prediction horizon. Otherwise, the time instants (from 0 to N) in which the constraints are set can be specified in array nc. If label is 'u', input constraints in the form Hc u <= Kc are set. If nc is not specified, the constraints are valid from time instant k to instant k+N-1, being N the prediction horizon. Otherwise, the time instants (from 0 to N-1) in which the constraints are set can be specified in array nc. If label is 'p', parameter constraints in the form Hc p <= Kc are set. If nc is not specified, the constraints are valid from time instant k to instant k+N, being N the prediction horizon. Otherwise, the time instants (from 0 to N) in which the constraints are set can be specified in array nc. If label is 'm', mixed state-input-parameter constraints in the form Hc [x; u; p] <= Kc are set. If nc is not specified, the constraints are valid from time instant k to instant k+N-1, being N the prediction horizon. Otherwise, the time instants (from 0 to N-1) in which the constraints are set can be specified in array nc.

Acknowledgements

Contributors:

Copyright is with: