go away spammer

Author Topic: Near-singular inertia matrix  (Read 3079 times)

0 Members and 1 Guest are viewing this topic.

Offline rabben47Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Near-singular inertia matrix
« on: March 24, 2013, 07:15:22 AM »
The usual equation for an n-link manipulator is D(q)q_dotdot + C(q,q_dot)q_dot + G(q) = u. Including the motor model, the equation becomes M(q)q_dotdot + C(q,q_dot)q_dot + G(q) = tau, where M denotes the inertia matrix; C represents the coriolis and centripetal effects and G is the gravity loading.

In general the M-matrix is positive definite => always non-singular. However, for the system that I am working on atm, a triple inverted pendulum system, the inertia matrix becomes near singular with the determinant det(M) <  0.000014. This leads to huge problems with simulation in matlab (getting inf/nan-values for states) and also problems for the control-algorithm which uses the inverse inv(M) in its calculations.

Has anyone encountered this before, and if so how did you solve it?

Some has suggested a quaternion representation of the rotations/translations (based on unit dual quaternions), but I don't want to do a lot of work deriving the model based on quaternions only to still have a near singular M-matrix.

I will transfer all my karma to anyone that can help.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Near-singular inertia matrix
« Reply #1 on: March 25, 2013, 12:08:50 PM »
If by "inertia matrix" you mean "inertia tensor" then a near-singular inertia tensor means your system has close to zero inertia along some axis -- it's devolving to a 2D, flat, system.

This should tell you something about the system you are trying to model. Either your math is wrong, or your system of linkages is such that it purposefully emulates such as system (don't know offhand how that'd come about, but I imagine it's possible.)

Can you instead solve multiple, non-singular, systems, or would that not help in your situation?

Offline rabben47Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: Near-singular inertia matrix
« Reply #2 on: March 26, 2013, 06:41:16 AM »
Thanks for your answer.

Quote
If by "inertia matrix" you mean "inertia tensor"
yes.

Quote
Either your math is wrong, or your system of linkages is such that it purposefully emulates such as system
It is very possible that my math is wrong since the equations of motion are quite complex, involving about 50 trigonometric terms.

The attached picture illustrates the system I'm modelling: A rotational triple inverted pendulum system. To clarify even further: it consists of one horizontal rod that can rotate about one axis which is normal to the ground, one pendulum on one of the rod's ends which can rotate about one axis parallel to the horizontal rod and a double-pendulum on the other side: each pendulum is allowed to rotate about one axis, thus the pendulums and the rod has one degree of freedom each.

Quote
it's devolving to a 2D, flat, system.
Could this be the case for my system?

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Near-singular inertia matrix
« Reply #3 on: March 26, 2013, 07:38:17 PM »
Quote
the equations of motion are quite complex, involving about 50 trigonometric terms.

Then you're doing it wrong! If you're dealing with a 3D system, and have 3D inputs and outputs, then the only thing you should worry about is matrix and vector math. The only reason to use trig is to create initial rotation matrices/bases. That, in turn, should be easily testable as a separate function (which already exists in most 3D math libraries) and shouldn't need to be written out explicitly.

Offline rabben47Topic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: Near-singular inertia matrix
« Reply #4 on: March 27, 2013, 03:28:08 AM »
The initial model was derived by hand through the euler-lagrange equation. I will do it once more, but use matlab instead. Thanks for your input.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Near-singular inertia matrix
« Reply #5 on: March 27, 2013, 11:42:02 AM »
Quote
The initial model was derived by hand through the euler-lagrange equation.


Wow, that's doing it almost from first principles! See, your problem was that you didn't in turn derive the trigonometry based on the lambda calculus definition of "zero" and "one" :-)

Seriously, though, it sounds like a great way to get an understanding of the basics. I never went that way -- I picked up dynamics from rigid body simulators at a CS level, and had to learn the math "backwards" from the solver down to the constraints down to the actual dynamics/kinematics.

And, what I've learned, is that you really want to keep everything in 3D/4D all the time. Everytime you end up doing trig for anything other than creating a particular instance of an orientation matrix (or quaternion) you end up collapsing the dimensional information, and you have to write it out much more complicated than just using the 3D/4D formulation. And the reason I say 3D/4D is that you probably want to use the 4D matrix representation of translation-plus-rotation, rather than the separate 3D-orientation-plus-3D-offset, because again, it simplifies the math you have to write out.

 


Get Your Ad Here

data_list