how can use ode45 for differential equation system with time dependent data
3 views (last 30 days)
Show older comments
dear friends
i want to solve below diffrential equation that vd ,vq,vf are sampled meaured data in time( each one 60000 sample), i have used dsolve but i couldnit get answer so i want to use ode45 but i don not know how can i do that while my data are diffrent in time.
Diff(id,t)=0.4285*ifd(t) - 522.5*vf(t) - 196.3*id(t) - 1963.0*vd(t) + 20.0*ikd(t) - 3106.0*ikq1(t) - 3106.0*ikq2(t) - 3358.0*iq(t)
Diff(iq,t)=3896.0*id(t) - 2214.0*vq + 3613.0*ifd(t) + 3613.0*ikd(t) + 1.194*ikq1(t) + 29.11*ikq2(t) - 221.4*iq(t)
Diff(ifd,t)=522.5*vd(t) + 2056.0*vf(t) + 52.25*id(t) - 1.686*ifd(t) + 21.29*ikd(t) + 826.6*ikq1(t) + 826.6*ikq2(t) + 893.5*iq(t)
Diff(ikd,t)=1402.0*vd(t) - 1493.0*vf(t) + 140.2*id(t) + 1.224*ifd(t) - 42.86*ikd(t) + 2219.0*ikq1(t) + 2219.0*ikq2(t) + 2398.0*iq(t)
Diff(ikq1,t)=1855.0*vq(t) - 3266.0*id(t) - 3028.0*ifd(t) - 3028.0*ikd(t) - 2.969*ikq1(t) - 23.97*ikq2(t) + 185.5*iq(t)
Diff(ikq2,t) =338.6*vq(t) - 596.0*id(t) - 552.6*ifd(t) - 552.6*ikd(t) + 1.679*ikq1(t) - 7.49*ikq2(t)
please help me to solve my problem.
2 Comments
Jan
on 11 Oct 2021
This looks like a standard ODE. Store [id, iq, ifd, ikd, ikq1, ikq2] in a vector y and integrate it. See the examples in
doc ode45
If the problem is stiff, use a stiff solver.
Answers (1)
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!