mor.guessOrder

Interface for LTI dynamical model reduction and approximation order estimation.

Syntax

r = mor.guessOrder(sys)
r = mor.guessOrder(sys,obj)

Description

Given a system realisation sys, the mor.guessOrder function guesses an approximation order r with accuracy ratio obj. This function does not provide an exact approximation level but simply an idea of the approximation order r one might select before runing an approximation through mor.lti. Such a function can be viewed as a decision helper for practitionners. The input sys can either be

r = mor.guessOrder(sys) then provides a estimated approximation order to reach almost 99% of matching.
r = mor.guessOrder(sys,obj) then provides a estimated approximation order to reach almost 100 xobj% of matching.

Warning

The methods does not detect any unstable or limit of stability elements. Then, this method should preferably be applied on a stable finite energy model. In case of doubt, user is invited to use the mor.learn method in instead.

Input arguments

sys Dynamical system. More specifically sys can either be
  • a state-space ODE (DAE) realisation described as sys = ss(A,B,C,D) (or sys = dss(A,B,C,D,E))
  • a matrix set describing an ODE (or DAE) described as sys = {A,B,C,D} (or sys = {A,B,C,D,E})
obj Desired approximation ratio between [0,1) (real scalar).

Output arguments

r Returns the approximation order r that should be used in mor.lti to obtain a desired reduced order model accuracy (natural scalar).

Examples

% Guess the approximation order, reduce it and plot the result
rng(120882,'twister');
G   = stabsep(rss(100,1,1));
G.d = 0;
r   = mor.guessOrder(G,.9)
Gr  = mor.lti(G,r)
figure
mor.bode(G,'b-',Gr,'r--',logspace(-1,3,200))
legend(['Original model n=' num2str(length(G.a))], ['Reduced model r=' num2str(r)])
100*mor.norm(G-Gr,2)/mor.norm(G,2)

Note that in this case, the approximation mismatch is below 10% (we ask for 90% accuracy level), but stil, this is not guaranteed in all cases. Indeed, in the following MIMO case, one asks for an accuracy level of 95%, and we don't get it (in the H2-norm sense).

% Guess the approximation order, reduce it and plot the result
rng(120882,'twister');
G   = stabsep(rss(100,3,2));
G.d = 0;
r   = mor.guessOrder(G,.95)
Gr  = mor.lti(G,r)
figure
mor.bode(G,'b-',Gr,'r--',logspace(-1,3,200))
legend(['Original model n=' num2str(length(G.a))], ['Reduced model r=' num2str(r)])
100*mor.norm(G-Gr,2)/mor.norm(G,2)