Skip to main content
14-Alexandrite
March 10, 2022
Question

Jacobian matrix

  • March 10, 2022
  • 2 replies
  • 7959 views

Hi community

in this simple example,is shown how Mathcad help me to find a singularity value (det J = 0)

Capture d’écran 2022-03-10 114651.jpg

 thanks

2 replies

25-Diamond I
March 10, 2022

Is there any question you have???

Why do add and not subtract. Furthermore it looks like you ran into Prime infamous auto-label trap and will have to manually label all variables the same.

Werner_E_0-1646917099915.png

 

Is there any reason you are not using the built-in "Jacob" function?

Would be straightforeward - here done in MC15

Werner_E_1-1646917261824.png

 

 

XDN14-AlexandriteAuthor
14-Alexandrite
March 10, 2022

Hi Werner

I use Prime , because finally i connect calculation sheet with PTC Creo 3D CAD

In my example, i know the det(J)=0 with only q2=0 or q2=180 ( l1=squareroot 2 l2=1) : this corresponds to the alignment of the robot leg (l1 and l2)

but i can't find it with mathcad

in don't know "Prime infamous auto-label"

25-Diamond I
March 10, 2022

First of all you have to correct you error and change the plus sign to a minus to calculate the determinant the correct way.

You may also use the matrix determinant operator |J| or ||J|| to do the job.

If you still do not get the simplified result shown in my previous answer you have to look at the labels of all of your variables theta1 and theta2 and change them manually so all are the same - either all "variable" or all "-" (which means "automatic"). The symbolic engine does not like variables which are labeled differently and treats them as different variable which seems to be the reason why in your pic theta2-theta2 is not simplified to zero, etc.

As already written above using the "Jacob" function (and the determinant operator) would be the most natural way but as I have notice it seems to be broken in the new symbolic engine. So if you are using Prime 7 you have no option to switch back to the legacy symbolic engine and if the bug is not already fixed in P7 you can't use the "Jacob" function.

 

BTW, in future threads I would advice that you clearly state the problem you experience and the question you have and that you also always attach your worksheet as well.

25-Diamond I
March 10, 2022

OK, I further looked at the problems with Prime and I still consider it a bug in the new symbolics but there is an easy workaround.

The reason for the bug seems to be that the new symbolic engine is not always able to determine correctly the number of arguments in use. So the workaround is to just use the optional third argument of the "Jacob" function and tell Prime the number of independent variables in use.

Werner_E_0-1646930005027.png

There is a further problem in Prime when we try to solve for theta2. Primes new symbolic seems to not like vector indexed variables to solve for. Substituting the vector element for a "normal" variable seems to cure this problem.

Werner_E_0-1646930940689.png

 

Prime6 worksheet attached

 

 

XDN14-AlexandriteAuthor
14-Alexandrite
March 10, 2022

PTC support says:

I reported the issue to R&D

Details in CS364786

wait and see

Thanks Werner

 

25-Diamond I
March 10, 2022
but for solve, it's wrong

Capture d’écran 2022-03-10 183523.jpg

 

P7 say: unknown error : index out of range


So it looks like some things got worse when they improved the symbolic from P6 to P7 😞

But I guess that the simplification of the determinant works in Prime 7, too, so you see that the zeros of sin(theta2) are the only values which can cause a singularity.