Model reduction of estimated state space models – System identification

control theorylinear-controloptimal controlsvdsystem identification

Assume that we have a dynamical model in form of this simple transfer function

$$G(s) = \frac{1}{2s^2 + 5s + 4}$$

G = tf(1, [2 5 4])

We do a step response with signal u that contains constant 230

u = linspace(230,230, 144);

And our time vector t too.

t = linspace(0, 72, 144);

In this case, our sample time is $0.5 \approx t(2)-t(1)$

We do a step response

y = lsim(G, u, t)

and we add in some random noise

y2 =  2*rand(1,144) + y

Now our step will look like this

enter image description here

If we want to estimate a discrete state space model in a very easy way, we can use OKID/ERA algorithm. The function can be found from my GitHub repository – Matavecontrol and MataveID. Works for both Matlab and Octave.

sysd = okid(u, y2, 1, t(2)-t(1), 0)

And now I come to my question. When I estimate my model, I get a plot of hankel singular values, that describe how large the model order should be. In this case, I know that I dealing with a second order model. So I choose model order should be equal to 2. But in real time system, I don't know my model at all and therefore I cannot tell what model order I want to use. I have to compute it.

So assuming that you don't know the model order of the system. Is it any way to you find the model order of this plot

enter image description here

If you know that that plot will have a shape like this, if no noise where added.

sysd = okid(u, y, 1, t(2)-t(1), 0) % no noise added to y

Here is a very clear view that we dealing with a second order model if we look at this plot. Very easy to see, but in real time system (reality), we would not see plots like this.

enter image description here

Link to MataveID https://github.com/DanielMartensson/Mataveid

Best Answer

From a statistical point of view, information criteria like the Akaike Information Criterion (AIC) or the Bayesian Information Criterion (BIC) provide hints for good model orders. Wikipedia provides a list with several more. ( I guess this is what you were looking for)

From an engineering point of view, the classcial way to test the suitability of identified models is to validate them with simulation data (take care to use data that is NOT used for the identification). Validation is today heavily used in Machine Learning.

From a more philosophical point of view, the idea of a "true model" is sort of deceptive. As Lennart Ljung points out in his well known book, any model is a simplification of reality - so that there is nothing like a true model (and hence no true model order). The actual question is, if the model is suitable for the intended use (whatever this is in your case) - and this question can be often answered by validation.

Related Question