mor.learn

Interface for LTI dynamical model and input-output data learning.

Syntax

sysInfo = mor.learn(sys)
sysInfo = mor.learn(sys,W)
sysInfo = mor.learn(sys,W,opt)

Description

Given a system realisation sys, the mor.learn function computes a complete analysis and learning of your LTI model. It provides you sysInfo, gathering a bundle of parameters that can be directly used in the model approximation phase by mor.lti, to reach a reduced model with a very good model matching, while preserving unstable and limit of stability modes. More specifically, the mor.learn function will gather the following informations on your system

Warning

The methods aims at helping user to analyse a LTI model by detecting potential problem for model approximation, simulation, control design... Still advanced user and system expert, may modify the routine information output sysInfo according to its needs.
The actual version of the mor.learn function handles ODE realisations only. DAE and data will come soon.

Input arguments

sys Dynamical system. More specifically sys can either be
  • a state-space ODE realisation described as sys = ss(A,B,C,D)
  • a matrix set describing an ODE described as sys = {A,B,C,D}
W Vector of frequencies, in rad/s, over which the system's responses are evaluated (positive real vector).
opt Optional arguments, given as a structure. Here a list of available options
  • opt.freqBand is used to focus the approximation over the frequency opt.freqBand = [w1 w2] where w1 < w2 (in rad/s).
    (1 x 2 positive real vector, default [0 inf])
  • opt.obj is used to define an accuracy objective in the approximation order (see mor.guessOrder). Desired approximation ratio within [0 1).
    (real scalar, default .99)
  • opt.plot is used to plot figure or not.
    (boolean, default false)

Output arguments

sysInfo Returns the model information data that should be used in mor.lti to obtain a desired reduced order model with a good accuracy and keeping both unstable, limit and polynomial parts.

Examples

First, just call the function mor.learn, leading to some reduction parameters. Then, apply mor.lti for approximation. Here, all parameters of the approximation are automatically selected by mor.learn.

% Analyses the LTI model and compute a reduced model
rng(120882,'twister');
G     = rss(100,2,3)+tf({1 2 3; [1 2] -1 4},[1 -1]);
infoG = mor.learn(G);

Displaying he following informations set

+------------------------------------------------------------------------------+
| MOR Toolbox                                                                  |
| Learn from data and model                                                    |
+------------------------------------------------------------------------------+
| Input number                          3                                      |
| Output number                         2                                      |
| Number of states                      102                                    |
| Number of stable states               98                                     |
| Number of anti-stable states          2                                      |
| Number limit of stability states      2                                      |
| Number of polynomial states           0                                      |
| Direct feedthrough term               yes                                    |
|                                                                              |
| Maximum energy transfer               input 3 to output 2 (stable part)      |
| Minimum energy transfer               input 1 to output 1 (stable part)      |
| Maximum/Minimum energy                2.439 (stable part only)               |
|                                                                              |
| Reduction order estimation            28 (stable part)                       |
| Reduction order estimation            32 (total)                             |
+------------------------------------------------------------------------------+

Then, one can reduce the model using the learned informations.

% Approximate it and plot the results
Gr = mor.lti(infoG);
W  = logspace(-2,2,200);
figure
mor.sigma(G,'b-',Gr,'r--',W)
legend(['Original model n=' num2str(length(G.a))], ['Reduced model r=' num2str(length(Gr.a))])
figure
mor.bode(G,'b-',Gr,'r--',W)
legend(['Original model n=' num2str(length(G.a))], ['Reduced model r=' num2str(length(Gr.a))])
figure
mor.sigmaDamp(Gr,W)
This learning function is thus a good starting point when treating a LTI dynamical model. Indeed, it can be a good way to analyse and perform an expert analysis before performing any reduction.