Taming ODE solver behavior by dummy state variables with self-defined dynamics?
Mostrar comentarios más antiguos
Hi all,
Is it possible to force the ODE solver integrate specific region in time space by defining dummy state variable with a certain dynamics? So my problem is that I have an impulse input of 1ms duration every 500ms in my system. I can integrate by integral, of course, but it would take too long for my purpose (6min run time for simulation over 1e6ms). If I use ODE15s, it finishes in 0.2s, however it skipped all my input since the solver thought my system is "boring" and it integrates over large time steps, apparently ignoring the 1ms input every 500ms. If I use ODE113, it integrate over all the inputs, but it takes even longer, more than 1 hour. ODE45 and ODE23 basically just "accidentally" integrate over time region that has the input.
So what I want is a solver that take small steps over where I have the input and larger steps over the rest. However it is hard to tell the solver where there is an input. Right now I can only think of implement an Eular-type solver with adaptive time steps myself. However, I am thinking is there a way to define a dummy state variable with certain dynamics that tames the ODE15s to integrate over smaller time steps at the region nearby the inputs? I tried sin(t), and it definitely helps but I am still missing certain inputs. Has anyone done this before?
Thanks!
Respuestas (1)
Torsten
el 6 de Oct. de 2016
Call the solver several times:
First call: tstart=0, tend=1ms
Second call: tstart=1ms, tend=500ms
Third call: tstart=500ms, tend=501ms
Fourth call: tstart=501ms, tend=1000ms
...
In each step, start with the solution of the previous step.
Best wishes
Torsten.
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!