How do I solve this system of coupled differential equations?

I have various systems of equations similar to this one:
dPa/dt = 1/Va ( Pm * ( (Pm - Pa)/R ) - Pa * dVa/dt)
Ia * d2Va/dt2 + Ra * dVa/dt + E (Va - Vo) = Pa - Pl
In this system, Pa and Va are what I want to solve, that is to say the systems are functions of t, Pa and Va. All the rest, Ia, Pl, Ra, Vo, Pm, R are values that I know. Can someone give me a push in the right direction? I know how to solve a linear DE using ode45 but the equations above are stumping me

 Accepted Answer

Eliminate the 2nd derivative by introducing another variable (i.e., increasing your states). Then you will have a set of 1st order DE to solve which you know how to do. E.g.,
Let Wa = dVa/dt, then dWa/dt = d2Va/dt2
Then make some substitutions and get your new equations
dPa/dt = 1/Va ( Pm * ( (Pm - Pa)/R ) - Pa * Wa)
dVa/dt = Wa
Ia * dWa/dt + Ra * Wa + E (Va - Vo) = Pa - Pl
So now you have a set of 3 DE with the states Pa, Va, Wa, which you can then formulate to solve using ODE45.

2 Comments

Thank you very much sir!
And then I could use something like the solution described in the link below to solve, I'm correct in thinking? http://www3.nd.edu/~nancy/Math20750/Demos/3dplots/dim3system.html
Yes, you can follow that example. The only step you need to do first is solve that last equation for dWa/dt. I.e., get the last equation in the following form and then you can use the example:
dWa/dt = etc.
Then your "vector" will be a three dimensional vector as in the example, with the coordinates of the vector being equivalent to x(1) = Pa, x(2) = Va, x(3) = Wa.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!