mor.learn
Interface for LTI dynamical model and input-output data learning.
sysInfo = mor.learn(sys)
sysInfo = mor.learn(sys,W)
sysInfo = mor.learn(sys,W,opt)
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
nu
, outputs ny
and states n
stability
, the stability boolean informationH
and its decomposition inHa
, its anti-stable partH0
, its limit stable partHs
, its stable partHp
, its polynomial partsv_a
, limit of stability part sv_0
and stable part sv_s
sisoH2
, the matrix of SISO transfer H2-norm energy (applyed on the stable part only)max_In
/max_Out
min_In
/min_Out
r0
, the suggested approximation orderHr0
, a sample approximation modeloptRed
, the suggested approximation optional arguments, to be used in mor.lti
sysInfo
according to its needs.mor.learn
function handles ODE realisations only. DAE and data will come soon.
sys | Dynamical system. More specifically sys can either be
|
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
|
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.
|
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.