Skip to content

Commit 2a73db6

Browse files
committed
add example of model-order reduction for uncertain models
1 parent fbe66a5 commit 2a73db6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/src/uncertainty.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ DisplayAs.PNG(Plots.current()) # hide
204204
The sensitivity at the plant output is enormous. A low sensitivity with the nominal system does not guarantee robustness!
205205

206206
## Model-order reduction for uncertain models
207+
208+
### ``\nu``-gap approach
207209
The ``\nu``-gap metric is a measure of distance between models when they are used in a feedback loop. This metric has the nice property that a controller designed for a process ``P`` that achieves a normalized coprime factor margin ([`ncfmargin`](@ref)) of ``m``, will stabilize all models that are within a ``\nu``-gap distance of ``m`` from ``P``. This can be used to reduce the number of uncertain realizations for a model represented with `Particles` like above in a smart way. Say that we have a plant model ``P``
208210
```@example MCM_NUGAP
209211
using DisplayAs # hide
@@ -263,6 +265,27 @@ With the reduced model, we can more easily perform loop-shaping or other control
263265

264266
For more background on the ``\nu``-gap metric, see [When are two systems similar?](@ref) and the book by Skogestad and Postlethwaite or by Åström and Murray.
265267

268+
### Balanced truncation
269+
Another option to reduce the complexity of an uncertain model is to reinterpret it has a deterministic model with expanded state and output dimensions. For example, an uncertain model with ``N`` particles and state and output dimensions ``n_x, `n_y`` can be converted into a deterministic model with state and output dimensions ``Nn_x`` and ``Nn_y`` respectively (the input dimension remains the same). The order of this model can then be reduced using standard balanced truncation (or any other model-reduction method). The conversion from a model with `Particles` coefficients to an expanded deterministic model is performed by [`mo_sys_from_particles`](@ref), and balanced truncation (and other model-reduction techniques) is documented at [Model reduction](@ref).
270+
271+
Note, the reduced-order model cannot easily be converted back to a representation with `Particles` when this approach is taken. The model-order reduction will in this case only reduce the state dimension, but the output dimension will remain the same.
272+
273+
We demonstrate this procedure on the model from the section above:
274+
```@example MCM_NUGAP
275+
Pmo = mo_sys_from_particles(P, sparse=false)
276+
Pred, S = baltrunc(Pmo)
277+
bodeplot(P, w, lab="Original P", plotphase = false, format=:png, dpi=80, ri=false, c=1, legend=true)
278+
bodeplot!(Pred, w, lab="", plotphase = false, format=:png, dpi=80, c=2, l=1, sp=1, alpha=0.01)
279+
DisplayAs.PNG(Plots.current()) # hide
280+
```
281+
This time, we keep the same output dimension, but the state dimension is reduced significantly:
282+
283+
```@example MCM_NUGAP
284+
Pred.nx
285+
```
286+
287+
Note, `Pred` here represents the uncertain model with a single deterministic model of order `P.nx`, while the original uncertain model `P` was represented by 2000 internal models of state dimension 2.
288+
266289
## Using the $M\Delta$ framework
267290
The examples above never bothered with things like the "structured singular value", $\mu$ or linear-fractional transforms. We do, however, provide some elementary support for this modeling framework.
268291

0 commit comments

Comments
 (0)