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.
0 个评论
采纳的回答
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
更多回答(0 个)
另请参阅
类别
在 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!