## Passivity Enforcement for Control Design

A system is passive if it cannot produce energy on its own, and can only dissipate the energy that is stored in it initially. In many cases, you can enforce passivity on a closed loop system by modifying the actions of the controller such that the system dissipates energy over time, and therefore has a stable equilibrium.

### Passivity Enforcement Block

The Passivity Enforcement block, which requires Optimization Toolbox™ software, computes the modified control actions that are closest to specified control actions subject to passivity constraints and action bounds. The block uses a quadratic programming (QP) solver to find the control action u that minimizes the function ${|u-{u}_{0}|}^{2}$ in real time. Here, u0 is the unmodified control action from the controller.

The solver applies the following constraints to the optimization problem.

`$\begin{array}{l}\rho {y}_{p}{}^{T}{y}_{p}+{y}_{p}{}^{T}{f}_{p}+{y}_{p}{}^{T}{g}_{p}u\le 0\\ {u}_{\mathrm{min}}\le u\le {u}_{\mathrm{max}}\end{array}$`

Here:

• ρ is the passivity index.

• yp is the passivity output function, defined as ${y}_{p}={h}_{p}\left(x\right)$.

• fp and gp are the functions defined by the passivity input function ${u}_{p}={f}_{p}\left(x\right)+{g}_{p}\left(x\right)u$.

• umin is a lower bound for the control action.

• umax is an upper bound for the control action.

Since the Passivity Enforcement block modifies the original control action, the final closed-loop system might not achieve the design objectives of the original controller, such as stability margins.

You must verify that the combined controller and Passivity Enforcement block meet your original control objectives. If the system does not meet your original objectives, consider updating your original controller design. For example, you can add additional gain and phase margins to compensate for any potential performance degradation.

### Passivity Functions

If the plant model is passive, then there exists a storage function such that:

`$\stackrel{˙}{V}\left(x\right)\le {u}^{T}y.$`

If the controller satisfies the following condition.

`$\begin{array}{cc}{u}^{T}y\le -\rho {y}^{T}y& \left(\rho >0\right)\end{array}$`

Then, the closed loop system becomes

`$\stackrel{˙}{V}\left(x\right)\le -\rho {y}^{T}y\le 0,$`

and if the plant model is zero-state observable ( if u = 0, and x = 0 when y = 0), then the closed-loop system is asymptotically stable.

In general, when you have a closed-loop system with a nominal controller, you can define the following based on the plant dynamics.

• Passivity input function — ${u}_{p}={f}_{p}\left(x\right)+{g}_{p}\left(x\right)u$

• Passivity output function — ${y}_{p}={h}_{p}\left(x\right)$

You can then make the closed-loop system satisfy the following inequality to enforce passivity.

`${u}_{p}{}^{T}{y}_{p}\le -\rho {y}_{p}{}^{T}{y}_{p}$`

The Passivity Enforcement block formulates this problem as a quadratic programming optimization problem as defined in the previous section. For more information, see About Passivity and Passivity Indices.

You can formulate passivity constraint depending on your control design goals, such as feedback stability or reference tracking, depending on how you specify the passivity input function up and passivity output function yp. For an example that uses passivity constraints for stability, see Enforce Passivity Constraints for Quadruple-Tank System. For an example that uses passivity constraints for vibration control in a beam, see Enforce Passivity Constraint for Flexible Beam.