Need help with 6X6 Jacobian Matrix and the derivative of its inverse.
6 次查看(过去 30 天)
显示 更早的评论
Hi, I have a dynamics equation which needs to use 6x6 Matrix Jacobian with many zeros inside the matrix as shown below:
%%JACOBIAN MATRICES
% Manipulator 1
J111 = -L11*sin(q11) - L12*sin(q11 + q12) - L13*sin(q11 + q12 + q13);
J112 = -L12*sin(q11+q12) - L13*sin(q11 + q12 + q13);
J113 = -L13*sin(q11 + q12 + q13);
J121 = L11*cos(q11) + L12*cos(q11 + q12) + L13*cos(q11 + q12 + q13);
J122 = L12*cos(q11+q12) + L13*cos(q11 + q12 + q13);
J123 = L13*cos(q11 + q12 + q13);
% Manipulator 2
J211 = -L21*sin(q21) - L22*sin(q21 + q22) - L23*sin(q21 + q22 + q23);
J212 = -L22*sin(q21+q22) - L23*sin(q21 + q22 + q23);
J213 = -L23*sin(q21 + q22 + q23);
J221 = L21*cos(q21) + L22*cos(q21 + q22) + L23*cos(q21 + q22 + q23);
J222 = L22*cos(q21+q22) + L23*cos(q21 + q22 + q23);
J223 = L23*cos(q21 + q22 + q23);
J= [J111 J112 J113 0 0 0 ; J121 J122 J123 0 0 0 ; 1 1 1 0 0 0 ; 0 0 0 J211 J212 J213; 0 0 0 J221 J222 J223; 0 0 0 1 1 1];
I need to find its inverse,Jinv;its transpose,Jtran; and its transposed inverse,Jtraninv (as shown below) as they all need to be used in dynamics equation inside the Matlab Function Block.
Jinv = pinv(J);
Jtran= transpose(J);
Jtraninv = pinv(Jtran);
The problems arise when I need to find the derivative of Jinv, Jinvdot. I tried to do as shown in figure below (FYI, I have simplified the model for briefly explanation):
I found that the system can be run with value inside the Jinvdot, but there are warnings such that:
I tried to put delay as shown below. As a result, the warnings are eliminated but the values inside the Jinvdot matrix are different.
My questions are: 1. Is this the correct way to find Jinvdot? Any better solution? 2. Should I put the delay or not?
I have also searched similar problems but couldn't find it. I am so appreciated any helps. Thanks.
P.s: I attached my model (constructed using Matlab 2016a) for reference.
2 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!