Solve two differential equations simultaneously

2 views (last 30 days)
J Krause
J Krause on 27 Nov 2017
Edited: Torsten on 28 Nov 2017
I need to design a controller for and simulate a pneumatic control system. Specifically I need to simulate these system equations and eventually design my own controller.
Since the position equations (x) are a function of the time derivative of the pressure (Pdot) and vice versa, what is the best way of simulating this in Matlab? I have solved differential equations before using ode45, but nothing like this.
Thanks for any help.
To clarify, P1 and P2 pertain to the pressures on each side of a pneumatic actuator. X is the displacement variable for the actuator. m_dot1 and m_dot2 are the mass flow rates into each side of the pneumatic actuator from the control valve.
Cited paper: folk.ntnu.no/skoge/prost/proceedings/acc04/Papers/0905_FrM16.4.pdf
  3 Comments
J Krause
J Krause on 28 Nov 2017
That part I understand.
I am unsure of the best way to interface the (P)dot (pressure) equations with the (v_p)dot (position) equation, since they depend on each other. The volumes (V1 and V2) are dependent on x_p. Where x_p = v_p.
Torsten
Torsten on 28 Nov 2017
Edited: Torsten on 28 Nov 2017
I don't understand your problem.
If you insert v_p for (x_p)_dot in the pressure equations, the 4 ODEs are explicit in y(1)=x_p, y(2)=v_p, y(3)=P1 and y(4)=P2.
So they are easily set up for ODE45 as
fun=@(t,y)[y(2);1/M*(-b*y(2)+A*y(3)-A*y(4)-F1-F2);gamma*R*T/V1(y(1))*m1dot-alpha*gamma*y(3)*A/V1(y(1))*y(2);-gamma*R*T/V2(y(1))*m2dot+alpha*gamma*y(4)*A/V2(y(1))*y(2)];
Best wishes
Torsten.

Sign in to comment.

Answers (0)

Categories

Find more on General Applications 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!