2nd order nonlinear differential equations as "State Space Representation" for ode45()
19 次查看(过去 30 天)
显示 更早的评论
Hi Community,
in recent days I read a lot about solving differential equations with the numerical solver ode45(..). But after all it is not clear to me how to handle the following problem, which is only schematically described, due to too high complexity of the actual problem (stated below).
Consider a system of two nonlinear differential equations with two unknowns to be solved for. The first one is of second order in both unknowns and the second equation is of first order in both unknows. The unknowns are y1 & y2 .
Eq1:
f(y1(t)'', y2(t)'', y1(t)', y2(t)', y1(t), y2(t))
e.g. a*y1(t)'' + b*y2(t)'' + c*y2(t)' + d*y1(t) = e*y1(t)'
Eq2:
f(y1(t)', y2(t)', y1(t), y2(t)) e.g.: g*y1(t)' - h*y2(t)' - k*y2(t) = 0
To solve these equations with ode45(...) it is necessary to write them as first order diff. eqns ( State Space Model ). Therefore the equations should be solved for y1(t)'' & y2(t)'', but I don't know how to do this WITHOUT differentiating the second equation and solving the system with backsubstitution. I want to avoid this because it makes things way more complicated due to all the nonlinearities.
Anyone an idea?
For those who are interested: This is my electrical circuit I want to solve for xk, xs & xv. Where
vk = xk', vs = xs' & vv = xv'.
Moreover the electro-mechanical transform has a nonlinearity of the form:
Bl(xk) = bl0 + bl1*xk + bl2*xk^2
The resistances Rs & Rv look like:
Rs = rs0 + rs1 * vs + rs2 * vs^2
Rv = rv0 + rv1 * vv + rv2 * vv^2
and the capacitances Cs & Cv:
Cs = cs0 + cs1 * xs + cs2 * xs^2
Cv = cv0 + cv1 * xv + rv2 * xv^2
and the generator Ug(t) is of the form:
Ug(t) = U*cos(2*pi*f*t)
0 个评论
采纳的回答
更多回答(1 个)
Torsten
2015-3-4
Set y1=y, y2=y', y3=y''. Then solve the system
y1'=y2
y2'=y3
f(t,y1,y2,y3,y3')=0
Best wishes
Torsten.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!