Simulation · Project case study

SCARA kinematics & teaching mode

From D–H parameters to a MATLAB teaching interface: forward kinematics and three documented validation poses for an RRP SCARA arm.

DisciplineSimulation
StatusCompleted
Year2026

Project overview

MATLABRobotics Toolbox 10.3.1Standard D–HForward kinematicsSerialLinkLive ScriptSCARA RRP
3 posesDocumented MATLAB checks: home, elbow rotation and tool extension
MATLAB proof — elbow at 90 degrees

This case study covers Part 2 only: the design and kinematic analysis of a three-joint SCARA arm with two revolute joints and one prismatic joint. I derived its homogeneous transformation matrix, implemented the model using Peter Corke’s Robotics Toolbox and developed a MATLAB Live Script teaching interface.

The engineering

The challenge

Translate a physical SCARA geometry into consistent coordinate frames, then make the resulting joint-to-Cartesian relationship usable in a teaching-mode simulation.

My contribution

Derived the forward-kinematics model, mapped it to Robotics Toolbox Link objects, developed the wireframe teaching interface and documented three pose checks.

Approach & implementation

Use standard D–H transformations with a negative shoulder offset and a π axis flip. Implement the prismatic joint explicitly, apply the tool transform, and compare analytical coordinates with MATLAB outputs at home, a 90° elbow pose and full extension.

Results & lessons

What the project achieved

The report’s screenshots show home at (0.600, 0, 0.040) m, elbow at 90° at (0.300, 0.300, 0.040) m, and 0.100 m extension at (0.600, 0, −0.060) m. The displayed home matrix matches the analytical model. Tiny Y values around 10⁻¹⁷ m are floating-point round-off.

Limitations & next steps

This is a kinematic simulation, not a physical accuracy or dynamics test. Three pose checks do not establish correctness throughout the workspace. Collision detection, torque limits, trajectory execution and physical calibration are outside the evidence. The report’s Table 3 labels the home orientation Rot-Z(π); the displayed matrix diag(1, −1, −1) is actually Rot-X(π). The original pages are preserved, with the corrected interpretation used here.

Calculations & proof

1. Geometry and frame convention

Lengths are in metres; revolute angles are in radians. The physical dimensions d₃ and d₄ become the D–H link lengths a₁ and a₂. To avoid confusing physical dimensions with D–H offsets, the table below uses the link index explicitly.

Standard D–H model, including the tool in link 3
LinkθdaαJoint
1q₁0.300.300Revolute
2q₂−0.060.30πRevolute
30q₃ + 0.2000Prismatic

The π twist turns the tool Z-axis downward. Positive q₃ therefore lowers the tool. In MATLAB, link 3 uses d = q₃ and the additional 0.20 m is applied through the tool transform instead.

2. Transformation derivation

Aᵢ = Rz(θᵢ) Tz(dᵢ) Tx(aᵢ) Rx(αᵢ). Here cᵢ = cos(qᵢ), sᵢ = sin(qᵢ), c₁₂ = cos(q₁ + q₂), and s₁₂ = sin(q₁ + q₂).

General standard D–H matrix
cos θ−sin θ cos αsin θ sin αa cos θ
sin θcos θ cos α−cos θ sin αa sin θ
0sin αcos αd
0001
A₁
c₁−s₁00.3c₁
s₁c₁00.3s₁
0010.3
0001
A₂ (α₂ = π)
c₂s₂00.3c₂
s₂−c₂00.3s₂
00−1−0.06
0001
A₃ (tool included)
1000
0100
001q₃ + 0.2
0001

Multiplying A₁A₂ gives c₁c₂ − s₁s₂ = c₁₂ and c₁s₂ + s₁c₂ = s₁₂. The translation is x = 0.3c₁ + 0.3(c₁c₂ − s₁s₂), y = 0.3s₁ + 0.3(s₁c₂ + c₁s₂), z = 0.3 − 0.06 = 0.24.

A₁A₂
c₁₂s₁₂00.3(c₁ + c₁₂)
s₁₂−c₁₂00.3(s₁ + s₁₂)
00−10.24
0001

The final translation is z = 0.24 − (q₃ + 0.20) = 0.04 − q₃. Rotation is unchanged by the final prismatic translation.

⁰T₃ = A₁A₂A₃
c₁₂s₁₂00.3(c₁ + c₁₂)
s₁₂−c₁₂00.3(s₁ + s₁₂)
00−10.04 − q₃
0001

3. Numerical checks

Pose (q₁, q₂, q₃)x calculationy calculationz calculation
Home (0, 0, 0)0.3(1 + 1) = 0.6000.3(0 + 0) = 00.04 − 0 = 0.040
Elbow (0, π/2, 0)0.3(1 + 0) = 0.3000.3(0 + 1) = 0.3000.04 − 0 = 0.040
Extension (0, 0, 0.1)0.3(1 + 1) = 0.6000.3(0 + 0) = 00.04 − 0.1 = −0.060

At home, R = diag(1, −1, −1) = Rx(π). This corrects the Rot-Z(π) label in the report’s verification table.

4. Try the forward kinematics

Adjust the joints or select a documented pose. This browser calculation explains the report’s model; it is not the original MATLAB application.

TCPX 0.600 m · Y 0.000 m · Z 0.040 m

5. Original calculations and proof images

Open the evidence below at full size. The complete Part 2 pages retain every calculation, code snippet, slider setting and test image from the report.

Media & resources

Let’s talk about this project.

I’m happy to walk through the design decisions, challenges and what I would improve next.

Contact Peter