Main Content

Modify control actions to satisfy constraints and action bounds

**Library:**Simulink Control Design

The Constraint Enforcement block computes the modified control actions that are closest to specified control actions subject to constraints and action bounds.

The block uses a quadratic programming (QP) solver to find the control action
*u* that minimizes the function $${\left|u-{u}_{0}\right|}^{2}$$. Here, *u*_{0} is the unmodified
control action.

The solver applies the following constraints to the optimization problem.

$$\begin{array}{l}{f}_{x}+{g}_{x}u\le c\\ {u}_{\mathrm{min}}\le u\le {u}_{\mathrm{max}}\end{array}$$

Here:

*f*and_{x}*g*are coefficients of the constraint function._{x}*c*is a bound for the constraint function.*u*_{min}is a lower bound for the control action.*u*_{max}is an upper bound for the control action.

The Constraint Enforcement block requires Optimization Toolbox™ software.

For more information on constraint enforcement, see Constraint Enforcement for Control Design.