# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# mixsyn

H mixed-sensitivity synthesis method for robust control loopshaping design

## 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={\left(}^{I}\\ R=K{\left(}^{I}\\ T=GK{\left(}^{I}\end{array}$`

The following figure shows the relevant control architecture.

Closed-loop transfer function Ty1u1 for mixed sensitivity `mixsyn`.

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

where γ = `GAM`. Thus, the inverses of W1 and W3 determine the shapes of sensitivity S and complementary sensitivity T. Typically, you choose a W1 that is large inside the desired control bandwidth to achieve good disturbance attenuation (i.e., performance). Similarly, you typically choose a W3 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 W1, W2 and W3 must be either empty, scalar (SISO) or have respective input dimensions NY, NU, and NY where G is NY-by-NU. 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`).

## Examples

collapse all

This example shows the use of `mixsyn` for sensitivity and complementary sensitivity loop shaping.

Create a plant model and weighting functions.

```s = zpk('s'); G = (s-1)/(s+1)^2; W1 = 10*(0.1*s+1)/(100*s+1); W2 = 0.1*(0.1*s+1)/(0.01*s+1); W3 = 0.01*(10*s+1)/(0.01*s+1); [K,CL,GAM] = mixsyn(G,W1,W2,W3);```

`mixsyn` shapes the singular values of the sensitivity function `S`, the complementary sensitivity function `T`, and the control effort `R = K*S`. Examine the results of the synthesis and the shapes of these transfer functions.

```S = feedback(1,G*K); R = K*S; T = 1-S; sigma(S,'b',R,'r',T,'g',GAM/W1,'b-.',ss(GAM/W2),'r-.',GAM/W3,'g-.',{1e-3,1e3}) legend('S','R','T','GAM/W1','GAM/W2','GAM/W3','Location','SouthWest') grid```

## Limitations

The transfer functions G, W1, W2 and W3 must be proper, i.e., bounded as s → ∞ or, in the discrete-time case, as z → ∞. Additionally, W1, W2 and W3 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

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

`mixsyn` accepts all the same key value pairs as `hinfsyn`.