How do I solve this ODE system where there exists derivatives in both sides?
조회 수: 1 (최근 30일)
이전 댓글 표시
The system of ODE is the following equation.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1583861/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1583861/image.png)
Second equation is no of a problem but first and the third one is the problematic for me. Because I can't get them in the form that is similar when using ode45. That is, I can't seperate the derivatives because
and
are coupled.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1583866/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1583871/image.png)
Any help is appreciated. Thanks!
댓글 수: 0
채택된 답변
David Goodmanson
2024년 1월 6일
편집: David Goodmanson
2024년 1월 6일
Hi Arda,
These two equations are of the form
p' Jxx - r' Jxz = f(...) where ... = p,q,r,J,J,M,M (a bunch of known stuff)
-p' Jxz + r' Jzz = g(...) where ... = a bunch of other known stuff
in matrix form this is
[Jxx -Jxz; -Jxz Jzz]*[p'; r'] = [f; g];
where the semicolons produce a 2x2 matrix and two 2x1 column vectors. This is solved by left divide.
[p'; r'] = [Jxx -Jxz; -Jxz Jzz]\[f; g]
which works fine for calculation, or if you prefer you can use the tedious longhand version
p' = (Jzz*f + Jxz*g) / (Jxx*Jzz - Jxz^2)
r' = (Jxz*f + Jxx*g) / (Jxx*Jzz - Jxz^2)
댓글 수: 3
Sam Chak
2024년 1월 6일
편집: Sam Chak
2024년 1월 6일
This is Euler's equations of rotational motion for a rigid body. Basically, David's approach allows the decoupling of the equations of motion into two separate state equations.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1584016/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1584021/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1584026/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1584031/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1584036/image.png)
In MATLAB, the syntax to perform matrix left division may be given by:
J = [Jxx -Jxz;
-Jxz Jzz];
M = [Mx + fx;
Mz + fz];
dwdt(1:2) = J\M;
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!