# TuningGoal.WeightedPassivity

Frequency-weighted passivity constraint

## Description

A system is *passive* if all its I/O trajectories (*u*(*t*),*y*(*t*)) satisfy:

$${\int}_{0}^{T}y{\left(t\right)}^{T}u\left(t\right)dt}>0,$$

for all *T* > 0. `TuningGoal.WeightedPassivity`

enforces the passivity of the transfer function:

$$H\left(s\right)={W}_{L}\left(s\right)T\left(s\right){W}_{R}\left(s\right),$$

where *T _{s}* is a closed-loop response in the
control system being tuned.

*W*and

_{L}*W*are weighting functions used to emphasize particular frequency bands. Use

_{R}`TuningGoal.WeightedPassivity`

with control system tuning commands such as
`systune`

.## Creation

### Description

creates a tuning goal for enforcing passivity of the transfer
function:`Req`

= TuningGoal.WeightedPassivity(`inputname`

,`outputname`

,`WL,WR`

)

$$H\left(s\right)={W}_{L}\left(s\right)T\left(s\right){W}_{R}\left(s\right),$$

where *T _{s}* is the closed-loop
transfer function from the specified inputs to the specified outputs. The
weights

`WL`

and `WR`

can be matrices
or LTI models.By default, the tuning goal enforces passivity of the weighted transfer
function *H*. You can also enforce input and output
passivity indices, with a specified excess or shortage of passivity. (See
`getPassiveIndex`

for more
information about passivity indices.) To do so, set the
`IPX`

and `OPX`

properties of the
tuning goal. See Weighted Passivity and Input Passivity.

### Input Arguments

## Properties

## Examples

## Tips

Use

`viewGoal`

to visualize this tuning goal. For enforcing passivity with`IPX = 0`

and`OPX = 0`

,`viewGoal`

plots the relative passivity indices as a function of frequency (see`passiveplot`

). These are the singular values of $$\left(I-H\left(j\omega \right)\right){\left(I-H\left(j\omega \right)\right)}^{-1}$$. The weighted transfer function*H*is passive when the largest singular value is less than 1 at all frequencies.For nonzero

`IPX`

or`OPX`

,`viewGoal`

plots the relative index as described in Algorithms.This tuning goal imposes an implicit minimum-phase constraint on the transfer function

*H*+*I*, where*H*is the weighted closed-loop transfer function from`Input`

to`Output`

, evaluated with loops opened at the points identified in`Openings`

. The transmission zeros of*H*+*I*are the*stabilized dynamics*for this tuning goal. The`MinDecay`

and`MaxRadius`

options of`systuneOptions`

control the bounds on these implicitly constrained dynamics. If the optimization fails to meet the default bounds, or if the default bounds conflict with other requirements, use`systuneOptions`

to change these defaults.

## Algorithms

When you tune a control system using a `TuningGoal`

, the software
converts the tuning goal into a normalized scalar value
*f*(*x*), where *x* is the vector
of free (tunable) parameters in the control system. The software then adjusts the
parameter values to minimize *f*(*x*) or to drive
*f*(*x*) below 1 if the tuning goal is a hard
constraint.

For `TuningGoal.WeightedPassivity`

, for a closed-loop transfer
function `T(s,x)`

from `inputname`

to
`outputname`

, and the weighted transfer function ```
H(s,x)
= WL*T(s,x)*WR
```

, *f*(*x*) is given
by:

$$f\left(x\right)=\frac{R}{1+R/{R}_{\mathrm{max}}},\text{\hspace{1em}}{R}_{\mathrm{max}}={10}^{6}.$$

*R* is the relative sector index (see `getSectorIndex`

) of `[H(s,x);I]`

, for the sector
represented by:

$$Q=\left(\begin{array}{cc}2\rho & -I\\ -I& 2\nu \end{array}\right),$$

using the values of the `OPX`

and `IPX`

properties
for *ρ* and *ν*, respectively.
*R*_{max} is fixed at
10^{6}, included to avoid numerical errors for very large
*R*.

## Version History

**Introduced in R2016a**

## See Also

`looptune`

| `systune`

| `systune (for slTuner)`

(Simulink Control Design) | `looptune (for slTuner)`

(Simulink Control Design) | `viewGoal`

| `evalGoal`

| `TuningGoal.Passivity`

| `slTuner`

(Simulink Control Design) | `getPassiveIndex`

| `passiveplot`