Simulated and predicted response of time-series idnlgrey model in Matlab
3 views (last 30 days)
I have build an idnlgrey (nonlinear grey box) model using time-series dataset, and the model structure is an ODE system including two coupled ODEs, so it has two outputs y = [y1 y2].
On the one hand, I use sim() command to generate simulated response of model, and since time-series data has no inputs, only Initial Conditions will be used to compute simulated response, i.e. y_sim(t+1) = f(y(0)). For my understanding, the simulation procedure is actually to solve the ODE system using some numerical solvers. But I solve the ODE system using the most general solver ode45(), and compare with the simulated response from sim(). Although the fitness is high to 95%, but it means there exists error between sim() results and ode45() results. So I am wondering how sim() solves differential equations.
On the other hand, I use compare() command to generate k-step-ahead predicted response, which uses both Initial conditions and previous output data, but no matter values of kstep, it will generate same results with simulated data from sim(). I am wondering if time-series dataset displays same simulated and predicted response?
Ang suggestion is welcome!
Rajiv Singh on 18 Jul 2022
IDNLGREY is an "output-error" model, that is, the noise affacts only the output measurements and not the state updates. Hence there is no difference between prediction and simulation.
sim() does indeed use a suite of ODE solvers, but they are not the same as MATLAB's built-in solvers. So small differences can arise.Use the "SimulationOptions" property of the idnlgrey model to configure the choice of solver and its settings.You can compare these settings against those used by MATLAB's ODE45 etc.