Can I solve ode without explicit expression for derivative?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I would like to solve an ODE using Matlab's solvers, but where I don't have an explicit expression for the derivative. Specifically I want to simulate an electric motor. Normally this would be done with an equation like:
dI/dt = (E(t) - I(t)R) / L
Now I currently have an analytical expression for E(t), but really E(t) is the derivative of another underlying function, the flux Linkage, which I'll call phi. Then we have
E = -d phi(t) / dt
dI/dt = (E(t) - I(t)R) / L
Where R and L are constants.
My issue is that I would like to get the next value of the function phi from a finite element simulation at each time step, so I don't have an analytical expression for phi, or d phi(t) / dt.
Can I still use Matlab's ODE solvers to solve my problem, and if so, how?
Note that the problem usually requires a stiff solver like ode15s.
1 commentaire
Tejas
le 18 Mai 2016
Hello Richard,
This may be possible.
You may have to write a wrapper, let's call it, "getE(t)", around your Finite Element Simulator's results to return E(t) at a given t. This means that you will have to precompute the values of phi(t), and write this wrapper function that returns the time gradient of phi(t) at any given value of "t". You might have to do some interpolation in order to get a value for phi (and hence E) at any given value of "t"
function dIdt = odefun(t,I)
dIdt = (getE(t) - I(t)*R)/L
end
Réponses (0)
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!