MATLAB Examples

# Decompose Uncertain Model Using lftdata

You decompose an uncertain model into a fixed certain part and normalized uncertain part using the docid:robust_ref.f10-120643 command. To see how this command works, create a 2-by-2 uncertain matrix (umat) using three uncertain real parameters.

```delta = ureal('delta',2); eta = ureal('eta',6); rho = ureal('rho',-1); A = [3+delta+eta delta/eta;7+rho rho+delta*eta] ```
```A = Uncertain matrix with 2 rows and 2 columns. The uncertainty consists of the following blocks: delta: Uncertain real, nominal = 2, variability = [-1,1], 2 occurrences eta: Uncertain real, nominal = 6, variability = [-1,1], 3 occurrences rho: Uncertain real, nominal = -1, variability = [-1,1], 1 occurrences Type "A.NominalValue" to see the nominal value, "get(A)" to see all properties, and "A.Uncertainty" to interact with the uncertain elements. ```

The umat A depends on two occurrences of delta, three occurrences of eta, and one occurrence of rho.

Decompose A into M and Delta.

```[M,Delta] = lftdata(A); ```

M is a numeric matrix.

```M ```
```M = Columns 1 through 7 0 0 0 -0.1667 0 0 1.0000 0 0 0 0 1.0000 0 0 0 0 0 0 0 0 1.0000 0 0 0 -0.1667 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.0000 1.0000 0 1.0000 -0.3333 0 0 11.0000 0 1.0000 0 0 2.0000 1.0000 6.0000 Column 8 0.1667 6.0000 0 0.1667 1.0000 1.0000 0.3333 11.0000 ```

Delta is a umat with the same uncertainty dependence as A.

```Delta ```
```Delta = Uncertain matrix with 6 rows and 6 columns. The uncertainty consists of the following blocks: delta: Uncertain real, nominal = 2, variability = [-1,1], 2 occurrences eta: Uncertain real, nominal = 6, variability = [-1,1], 3 occurrences rho: Uncertain real, nominal = -1, variability = [-1,1], 1 occurrences Type "Delta.NominalValue" to see the nominal value, "get(Delta)" to see all properties, and "Delta.Uncertainty" to interact with the uncertain elements. ```

To examine some of the characteristics of Delta, sample it at three points. Note that:

• The sampled value of Delta is always diagonal.
• The sampled values alway range between -1 and 1, because Delta is normalized.
• The sampled matrices each contain three independent values. Duplication of the entries is consistent with the dependence of Delta and A on the three uncertain real parameters.
```usample(Delta,3) ```
```ans(:,:,1) = 0.6294 0 0 0 0 0 0 0.6294 0 0 0 0 0 0 0.8268 0 0 0 0 0 0 0.8268 0 0 0 0 0 0 0.8268 0 0 0 0 0 0 -0.4430 ans(:,:,2) = 0.8116 0 0 0 0 0 0 0.8116 0 0 0 0 0 0 0.2647 0 0 0 0 0 0 0.2647 0 0 0 0 0 0 0.2647 0 0 0 0 0 0 0.0938 ans(:,:,3) = -0.7460 0 0 0 0 0 0 -0.7460 0 0 0 0 0 0 -0.8049 0 0 0 0 0 0 -0.8049 0 0 0 0 0 0 -0.8049 0 0 0 0 0 0 0.9150 ```

Verify that the maximum gain of Delta is 1.

```maxnorm = wcnorm(Delta) ```
```maxnorm = struct with fields: LowerBound: 0 UpperBound: 1.0008 ```

Finally, verify that lft(Delta,M) is the same as A. To do so, take the difference, and use the 'full' option in simplify to remove redundant dependencies on uncertain elements.

```simplify(lft(Delta,M)-A,'full') ```
```ans = 1.0e-17 * 0 -0.5156 0 0 ```