Robotics

Practical Robotics for Engineers #5: The Jacobian and Singularities of a 2R Arm


categories: robotics, automation & robotics, mechanics

Back to the planar 2R arm from post #3, but a different question this time. That post asked "given a target position, what joint angles get me there" (inverse kinematics). This one asks "given how fast I'm spinning each joint, how fast does the tip actually move" — and, more importantly, whether there are configurations where the answer breaks down.


Step 1 — formulating the Jacobian matrix J(q)

The tip position is $$x=l_1\cos\theta_1+l_2\cos(\theta_1+\theta_2)$$ and $$y=l_1\sin\theta_1+l_2\sin(\theta_1+\theta_2)$$. The Jacobian $$J(q)$$ is found by taking the partial derivative of each Cartesian coordinate with respect to each joint angle — it's the matrix that converts a small change in joint angles into the resulting small change in tip position, i.e. it maps joint velocities to Cartesian tip velocity, $$\dot x = J(q)\dot q$$: $$J(q) = \begin{bmatrix} \frac{\partial x}{\partial \theta_1} & \frac{\partial x}{\partial \theta_2} \\ \frac{\partial y}{\partial \theta_1} & \frac{\partial y}{\partial \theta_2} \end{bmatrix} = \begin{bmatrix} -l_1\sin\theta_1-l_2\sin(\theta_1+\theta_2) & -l_2\sin(\theta_1+\theta_2) \\ l_1\cos\theta_1+l_2\cos(\theta_1+\theta_2) & l_2\cos(\theta_1+\theta_2) \end{bmatrix}$$

Step 2 — computing det(J)

Expanding the determinant and applying the angle-difference identity $$\sin(\alpha-\beta)=\sin\alpha\cos\beta-\cos\alpha\sin\beta$$: $$\det(J) = \big(-l_1\sin\theta_1-l_2\sin(\theta_1+\theta_2)\big)l_2\cos(\theta_1+\theta_2) - \big(-l_2\sin(\theta_1+\theta_2)\big)\big(l_1\cos\theta_1+l_2\cos(\theta_1+\theta_2)\big)$$ $$\det(J) = l_1l_2\big(\sin(\theta_1+\theta_2)\cos\theta_1-\cos(\theta_1+\theta_2)\sin\theta_1\big) = l_1l_2\sin\theta_2$$

Step 3 — identifying the singular configurations, and why you actually care

A singularity is a joint configuration where the arm momentarily loses a degree of freedom — the determinant hits zero: $$\det(J)=0 \iff l_1l_2\sin\theta_2=0 \iff \theta_2=0 \ \text{or} \ \theta_2=\pi$$ That's the arm fully extended (straight) or folded back on itself — geometrically it makes sense, since at either extreme, wiggling either joint moves the tip along the exact same line, so one entire direction of tip motion becomes unreachable no matter what the motors do.

This matters for a very concrete reason beyond "you can't move that way." Going from a desired tip velocity to the joint velocities that produce it means inverting the Jacobian: $$\dot q = J(q)^{-1}\dot x = \frac{1}{\det(J(q))}\,\text{adj}(J(q))\,\dot x$$ As $$\det(J)\to0$$, that division blows up — the controller computes a huge, sometimes near-infinite required joint velocity for what should be an ordinary small motion. In practice that's not a rounding error you can ignore: it means a real velocity-control loop can suddenly demand the motors spin far faster than they're rated for, right as the arm passes through a singularity. This is exactly why trajectory planners are written to actively avoid singular configurations, or fall back to a damped least-squares inverse (adding a small regularization term) instead of a literal matrix inverse near one.
Same recipe as forward/inverse kinematics: differentiate the position equations to get velocities, and read the geometry out of where the determinant vanishes. Next post: stepping back from geometry to why transfer functions exist at all, and how to actually derive one from a real physical system. Thank you for reading!


Read more
Administrator

This post was written by the administrator

Recent Posts

Proof Problems in Mathematics The Beginning Integrals, Course Practical Physics for Engineers IT Matura Course | Algorithms IT Matura Course | Databases IT Matura Course | Theory IT Matura Course | Spreadsheet

Archive

Year 2022

Comments