Solve two differential equations simultaneously
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Torsten
2017-11-28
编辑:Torsten
2017-11-28
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!