mor.guessOrder
Interface for LTI dynamical model reduction and approximation order estimation.
r = mor.guessOrder(sys)
r = mor.guessOrder(sys,obj)
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
sys = ss(A,B,C,D)
(or sys = dss(A,B,C,D,E)
) sys = {A,B,C,D}
(or sys = {A,B,C,D,E}
)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.
mor.learn
method in instead.
sys | Dynamical system. More specifically sys can either be
|
obj | Desired approximation ratio between [0,1) (real scalar). |
r | Returns the approximation order r that should be used in mor.lti to obtain a desired reduced order model accuracy (natural scalar). |
% 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)