필터 지우기
필터 지우기

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

조회 수: 9 (최근 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 CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by