Presets
Playback
Apparatus
Model checks
The science
What is modelled
A planar arm with two equal-mass links moves its hand out and back along a radial line. A closed-loop inverse-kinematics law turns the wanted hand velocity into joint velocities. Near full extension the arm loses the ability to move its hand along the arm direction: the Jacobian becomes singular.
Equations
- Forward kinematics
x = L1 cos q1 + L2 cos(q1+q2),y = L1 sin q1 + L2 sin(q1+q2). - Jacobian determinant
det J = L1 L2 sin q2. - Naive:
q̇ = J−1 vwithv = vd + Kp (xd − x). - Damped:
q̇ = JT (J JT + λ2 I)−1 v, which is bounded by|v| / (2λ). - On a radial line
dq2/dt = − r (dr/dt) / (L1 L2 sin q2), which blows up as sin q2 goes to 0.
Checks run in the page
- Analytic Jacobian against finite differences.
- Determinant against L1 L2 sin q2.
- The damped solver tends to the exact inverse when lambda goes to 0.
- The damping bound |v| / (2 lambda).
- The radial-line elbow speed law.
Honest simplifications
Kinematics only: no link mass, no motor torque, no sensor noise, explicit Euler steps of 1 ms and simple per-joint speed clipping. The damped solver gives up a little tracking accuracy near the singularity in exchange for bounded speeds; that trade is the point of the lab.
What to try
- Press Near the singularity and compare the red and green speed bars.
- Press Exactly full reach: the naive solver saturates the joint speed limit and loses track of the target.
- Raise lambda and see the tracking error of the damped solver grow while its peak speed falls.