How to correctly treat random noise injection in Matlab-ODE- modelling?
14 views (last 30 days)
Show older comments
My area of work is currently the interaction of statistical processes with mechanical systems, and I want to be as accurate as possible to correctly cope for interaction effects of statistical noise and system behavior and unfortunately also solver-properties interfere here.
Solvers like ode45 use variable timestep to cope for preset accuracy and additionally the RK45 uses sub-steps to more accurately compute the state derivative.
I think this method causes inconsistency if one has additional random noise added as an inhomogeneity (force) directly in the differential operator function handed over to e.g. ode45() as first argument:
In each call of the differential operator in the RK45-substeps one would produce a new random number. I feel this is not correct and proposed a workaround in:
I think this workaround approach applies:
- the same random injection for all RK-subsections
- and still allows the solver to use variable steps
- and scales the noise injection with the correct frequency-density (the *sqrt(1/h))
So I think with this approach I get random noise effects correctly in interaction with my system behavior and get approximately correct spectral shaping e.g..
I guess this is what is also done in more professional modules referred as stochastic ode methods.(?)
I found a package from Mathworks but it is a bit hard to relate the explanations there because it mainly targets financial computation.
I would appreciate some Mathworks Expert to comment and bring me back on the right track if I am completely wrong wiht my workaround and guide me towards a more reliable process.
Also I am interested now in combining delayed ode with stochastic ode as I started to investigate systems with feedback directly in Matlab without Simulink. But did not yet find such a minimum invasive way to modify dde23.
In Simulink one can quickly sketch such systems with noise and feedback – but it is hard for me to get complete confidence about the logic that Simulink uses in such situations.
Here help or links to according documentation or tutorial material is appreciated.
Thank you very much!
Jürgen Müller
0 Comments
Answers (1)
William Rose
on 31 Aug 2023
The discussion at this page , which you referenced, and to which you have contributed, summarizes the issues well. Your proposed workaround is to modify ode45(). I have looked at ode45() in the past. It is complicated. It does not follow the 4th-5th order Runge-Kutta algorithm with variable stepsize that is described in Numerical Recipes. I don't fully understand it. Therefore I would not alter ode45(), because my changes could have unanticipated side effects. For the same reason, I will not give an iopinion on whether your proposed workaround wil work as desired.
0 Comments
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!