How to use ODE solvers for a 2nd order differential equation with a Mass Matrix ?

5 ビュー (過去 30 日間)
I would like to simulate a system which comes at the following form:
where the Mass Matrix (M) is a 2x2 matrix. I simulated the system by using the inverse of the M matrix (it is positive definite, so I can do that) but I would also like to simulate it by using the 'Mass' matrix option that can be provided to the ode solver. If I use the inverse of the matrix, then the system breaks down to 4 first order ODEs and it's beiing simulated. How can I break the system to first order ODEs and use the mass matrix option ? My issue is that as far as I know, ODE solvers solve first order ODEs. The q variable denotes angles of a 2-DOF robotic manipulator, so its dimension is 2x1.

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2020 年 11 月 23 日
As far as I understand all you have to is to do the same conversion from a system of second order ODEs to a twice as big system of first-order ODEs by introducing an angular velocity vector, this should give you a mass-matrix that has a 2-by-2 identity-matrix and your M in the upper left and lower right and zeros in the other quadrants:
[1 0 0 0
0 1 0 0
0 0 M11 M12
0 0 M21 M22]*[dq1dt;dq2dt;dv1dt;dv2dt] = [v1;v2;C(q,v)*v - G(q) + tau]
(in a very lazy formatting...)
HTH
  1 件のコメント
Teo Protoulis
Teo Protoulis 2020 年 11 月 23 日
That's exactly what I was searching for. I had found it but thanks for the answer anyway!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by