## Syntax

[K,CL,GAM,INFO] = mixsyn(G,W1,W2,W3)
[K,CL,GAM,INFO] = mixsyn(G,W1,W2,W3,KEY1,VALUE1,KEY2,VALUE2,...)

## Description

`[K,CL,GAM,INFO]=mixsyn(G,W1,W2,W3)`

computes a controller *K* that minimizes the *H*_{∞} norm
of the closed-loop transfer function the weighted mixed sensitivity

$${T}_{y1u1}\triangleq \left[\begin{array}{c}{W}_{1}S\\ {W}_{2}R\\ {W}_{3}T\end{array}\right]$$

where *S* and *T* are called
the *sensitivity* and *complementary
sensitivity*, respectively. *R* measures
the control effort, the transfer function from the reference input
to the plant input. *S*, *R*, and *T* are
given by

$$\begin{array}{c}S={(}^{I}\\ R=K{(}^{I}\\ T=GK{(}^{I}\end{array}$$

The following figure shows the relevant control architecture.

**Closed-loop transfer function ***T*_{y}_{1}_{u}_{1} for
mixed sensitivity `mixsyn`

.

The returned controller *K* is such that *S*, *R*,
and *T* satisfy the following loop-shaping inequalities:

$$\begin{array}{l}\overline{\sigma}\left(S(j\omega )\right)\le \gamma \text{}\underset{\xaf}{\sigma}\left({W}_{1}^{-1}(j\omega )\right)\\ \overline{\sigma}\left(R(j\omega )\right)\le \gamma \text{}\underset{\xaf}{\sigma}\left({W}_{2}^{-1}(j\omega )\right)\\ \overline{\sigma}\left(T(j\omega )\right)\le \gamma \text{}\underset{\xaf}{\sigma}\left({W}_{3}^{-1}(j\omega )\right)\end{array}$$

where *γ* = `GAM`

. Thus,
the inverses of *W*_{1} and *W*_{3} determine
the shapes of sensitivity *S* and complementary sensitivity *T*.
Typically, you choose a *W*_{1} that
is large inside the desired control bandwidth to achieve good disturbance
attenuation (i.e., performance). Similarly, you typically choose a *W*_{3} that
is large outside the control bandwidth, which helps to ensure good
stability margin (i.e., robustness).

For dimensional compatibility, each of the three weights *W*_{1}, *W*_{2} and *W*_{3} must
be either empty, scalar (SISO) or have respective input dimensions *N*_{Y}, *N*_{U},
and *N*_{Y} where *G* is *N*_{Y}-by-*N*_{U}.
If one of the weights is not needed, you may simply assign an empty
matrix []; e.g., `P = AUGW(G,W1,[],W3)`

is SYS but
without the second row (without the row containing `W2`

).

## Limitations

The transfer functions *G*, *W*_{1}, *W*_{2} and *W*_{3} must
be proper, i.e., bounded as *s* → ∞
or, in the discrete-time case, as *z* → ∞.
Additionally, *W*_{1}, *W*_{2} and *W*_{3} should
be stable. The plant *G* should be stabilizable and
detectable; else, `P`

will not be stabilizable by
any `K`

.

## Algorithms

`[K,CL,GAM,INFO] = mixsyn(G,W1,W2,W3,KEY1,VALUE1,KEY2,VALUE2,...)`

is equivalent to

`mixsyn`

accepts all the same key value pairs
as `hinfsyn`

.