← All modules

Lab 2 — 2-DOF Jacobian

Draft — not verified
Verify on the 3-DOF platform arm
Task 6 asks you to cross-check your 2-DOF derivation against the live arm and observe DLS kick in.
/robot-arm

Lab 2: Velocity Kinematics — The 2-DOF Jacobian

Component: Case Study / Labs 2 of 3 (10 % of 30 %) CLO: CLO3 (P5) Released: Week 6 — 18 May 2026 Due: Week 8 — 5 June 2026, 23:59 MYTType: Individual lab report

Objective

This lab converts the theory in Module 3.1 (Jacobian for 2-DOF systems) into running MATLAB/Python code you can interrogate. You will derive the Jacobian of a 2-link planar arm by hand, compute it numerically, verify them against each other, draw the manipulability ellipsoid at three poses, and identify singular configurations. You will then cross-check your derivation against the live 3-DOF arm shipped with ArbiterROS (/robot-arm, implemented in frontend/lib/Robot/arm3dof.ts) so the 2-DOF theory is anchored to a running simulation you can drive in the browser.

The 2-DOF scope is deliberate: it is the maximum manipulator complexity retained in the revised MEC781 syllabus. The 3-DOF platform extension in Task 6 is observation-only — it demonstrates that the same Jacobian machinery scales to the anthropomorphic configuration without re-deriving it. Full n-DOF treatment is available in the Supplementary/ folder (S7–S9).

Learning Objectives

  • Derive the analytic Jacobian of a 2-link planar arm from its forward kinematics
  • Compute a numerical Jacobian via finite differences and verify agreement
  • Visualise the manipulability ellipsoid at a chosen pose
  • Classify configurations as regular, singular, or near-singular using and
  • Explain the physical meaning of singularity in terms of velocity transmission

Lab Setup

Use the following 2-link planar arm:

ParameterValue
Link 1 length  m
Link 2 length  m
Joint 1 angle variable
Joint 2 angle variable
Base frameorigin at the shoulder

Forward kinematics of the end-effector:

Task 1 — Analytical Jacobian (20 %)

  1. Derive where and . Show the derivation step-by-step.
  2. Write symbolically (in terms of , , etc.).
  3. Compute and simplify. State the singular condition in terms of .

Task 2 — Numerical Jacobian (20 %)

  1. Implement a central-difference numerical Jacobian with step size :
  1. Evaluate both the analytic and numerical Jacobians at:
- $q^A = (30^\circ,\,45^\circ)$

- $q^B = (0^\circ,\,0^\circ)$ (singular)

- $q^C = (60^\circ,\,90^\circ)$
  1. Report the Frobenius-norm difference for each pose. Should be for regular poses.

Task 3 — Manipulability (20 %)

  1. Compute the manipulability measure at poses , , .
  2. Plot the manipulability ellipsoid at pose . Use the eigen-decomposition of and scale the axes by .
  3. Plot the ellipsoid at . What shape do you get? Interpret.
  4. Plot the ellipsoid at . Comment on the ratio of major to minor axes.

Task 4 — Singularity Sweep (20 %)

  1. Fix . Sweep from to in increments.
  2. Plot versus . Mark the singular angles.
  3. Plot the condition number versus on a log scale.
  4. Discuss: workspace boundary vs. interior singularities. Which singular angle(s) correspond to which?

Task 5 — Physical Interpretation (10 %)

Answer briefly:

  1. At , in which direction cannot the end-effector move instantaneously? Justify using the null space of .
  2. Why does the condition number blow up near but not exactly at the singularity?
  3. How would you use the manipulability measure as part of a Jacobian-based controller’s cost function? (Hint: see Module-3/3.2 § 3.2.4 for the task-space velocity-resolved motion control formulation.)

Task 6 — Platform Cross-Check on the 3-DOF Arm (10 %)

Open /robot-arm on https://arbiter.txio.live. The live arm is a 3R anthropomorphic configuration implemented in frontend/lib/Robot/arm3dof.ts with reactive state in frontend/composables/Robot/useArmKinematics.ts. The analytical position Jacobian is exported as jacobianAnalytical(q, p) and the manipulability / condition diagnostics as analyseJacobian(q, p).

  1. Set (base). Fixing base rotation reduces the visible motion to a 2-DOF shoulder–elbow plane. Confirm that the shoulder–elbow sub-block of the platform’s Jacobian matches your Task 1 derivation up to the parameter substitution. Report the maximum element-wise difference.
  2. Drive the arm to a fully extended pose (). Record the manipulability reported by the UI and compare qualitatively to your Task 3 plot for .
  3. Drive the arm slowly through the manipulability-threshold boundary (, default w0 in DEFAULT_DLS). Observe how the damped-least-squares solver activates in the UI. Explain in one sentence what the damping does to the Jacobian inverse and why this prevents the control input from blowing up.

Deliverable: three UI screenshots (one per sub-task) plus the numerical comparison table from sub-task 1.

Deliverables

#ItemFormat
1Lab reportPDF, max 5 pages
2Source code.m or .py, single reproducible entry point
3Figures from Tasks 3–4Embedded in report

File name format: MEC781-Lab2-<StudentID>-<Surname>.{pdf,zip}

Starter code: Assessments/20261/starter-kits/Lab2/Lab2-starter.py

Evaluation Criteria

CriterionWeightDescription
Analytic Jacobian derivation20 %Correctness, clarity, singular condition identified
Numerical verification20 %Correct implementation, matches analytic at regular poses
Manipulability plots20 %Correct ellipsoid shapes, correct interpretation
Singularity sweep20 %Plots correct, singular angles identified
Physical interpretation10 %Depth of reasoning on null space and controller use
Platform cross-check10 %2-DOF 3-DOF match, DLS observation documented

Resources

  • Module-3/3.1-Jacobian for 2-DOF Systems.pdf — primary reference
  • Module-3/3.2-Jacobian of Mobile Robots and Velocity Control.pdf — mobile-robot analogue
  • Supplementary/S7-Jacobian Overview (Full n-DOF).pdf — optional extension
  • Spong, Hutchinson, Vidyasagar — Robot Modeling and Control, Ch. 4 (in References/)
  • ArbiterROS source (Task 6): frontend/lib/Robot/arm3dof.ts (pure-math, unit-testable), frontend/composables/Robot/useArmKinematics.ts (reactive state), frontend/components/Simulations/Arm3DOF.vue (Three.js renderer)
  • Live platform: https://arbiter.txio.live/robot-arm and the /robot-arm-guide explainer

Practical Guidance

  • Use symbolic math (MATLAB syms or Python sympy) for Task 1 if you want — cleaner derivation.
  • For Task 3, the ellipsoid axes are the eigenvectors of , not .
  • If your ellipsoid at looks like a line segment, you did it right — that is exactly what a singular Jacobian looks like geometrically.