2nd order nonlinear differential equations as "State Space Representation" for ode45()
조회 수: 18 (최근 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!