A complete mathematical model and dynamic simulation of the ABB IRB120 6-DOF industrial robot arm — from DH parameter derivation through Lagrangian dynamics, trajectory generation, and Simulink-based SimMechanics simulation.
This project develops a full mathematical model and dynamic simulation of the ABB IRB120 industrial robot arm in Matlab and Simulink. The application domain is a painter robot — a task that demands high positional sensitivity and smooth, repeatable trajectories along prescribed paths.
The ABB IRB120 was selected for its combination of structural stability and operational mobility: a compact footprint, 600 mm reach, and 3 kg payload make it well-suited to precision applications where agility matters more than raw payload. CAD geometry and joint parameters were sourced directly from ABB's official datasheet and STL files, ensuring the simulation matches the physical robot.
The model covers the full theoretical pipeline — from coordinate frame assignment through Lagrangian dynamics — and is implemented as a closed-loop SimMechanics simulation with joint-level PID control and polynomial trajectory references.
Robot manipulators are classified by the arrangement of their joints. Three primary configurations exist in industrial robotics, each with distinct kinematic and workspace properties:
The articulated configuration was chosen because its anthropomorphic structure allows the end-effector to approach a canvas from multiple orientations — critical for brush-stroke control. The IRB120 adds three more revolute joints at the wrist (joints 4–6), giving full 6-DOF control over both position and orientation of the tool frame.
The CAD model was obtained from ABB's official file repository and imported into Simulink's SimMechanics toolbox as STL geometry. Each link carries precise mass and inertia tensors derived from the CAD data. Coordinate frames are assigned at each joint following the DH convention.
The kinematic model is built using the Denavit–Hartenberg (DH) convention. A coordinate frame is attached to each joint following a four-step procedure: align the \(z\)-axis with the joint axis, define the common normal between consecutive \(z\)-axes, and express four parameters — \(d\), \(\theta\), \(a\), \(\alpha\) — that uniquely describe the transformation between adjacent frames.
| Joint | \(d\) (mm) | \(\theta\) (variable) | \(a\) (mm) | \(\alpha\) (rad) | Notes |
|---|---|---|---|---|---|
| 1 — Rotation (base) | 290 | \(\theta_1\) | 0 | \(-\pi/2\) | Base height 290 mm |
| 2 — Lower arm | 0 | \(\theta_2 - \pi/2\) | 270 | \(0\) | Upper arm link 270 mm |
| 3 — Elbow | 0 | \(\theta_3\) | 70 | \(-\pi/2\) | Forearm offset 70 mm |
| 4 — Wrist roll | 302 | \(\theta_4\) | 0 | \(+\pi/2\) | Wrist length 302 mm |
| 5 — Wrist pitch | 0 | \(\theta_5\) | 0 | \(-\pi/2\) | |
| 6 — Tool flange | 72 | \(\theta_6 + \pi\) | 0 | \(0\) | Flange offset 72 mm |
The total kinematic chain length is \(290 + 270 + 70 + 302 + 72 = 1004\) mm along the fully-extended configuration. The nominal rated reach of the IRB120 is 580 mm due to joint-limit constraints and workspace geometry.
Forward kinematics answers: given a set of joint angles, where is the end-effector? Using DH parameters, each consecutive frame transformation is a 4×4 homogeneous transformation matrix. Multiplying them in sequence yields the full pose of the tool frame in the base frame.
The upper-left 3×3 block \(R\) encodes the orientation of the tool frame (roll–pitch–yaw). The vector \(\mathbf{p} = [x,\, y,\, z]^\top\) gives the Cartesian position of the tool origin in the base frame.
Inverse kinematics solves the inverse problem: given a desired end-effector position and orientation, compute the joint angles that achieve it. For a 6-DOF manipulator this is a system of 6 non-linear equations in 6 unknowns.
A geometric decoupling approach is applied. Because joints 4–6 form a spherical wrist — all three axes intersect at a single point — the position subproblem (joints 1–3) and the orientation subproblem (joints 4–6) can be solved independently.
The Jacobian \(J\) maps joint velocities \(\dot{\mathbf{q}}\) to end-effector linear and angular velocities. For a 6-DOF arm, \(J \in \mathbb{R}^{6 \times 6}\) is partitioned into a linear part \(J_v\) and an angular part \(J_\omega\):
Singularities occur when \(\det(J) = 0\): the arm loses one or more degrees of freedom. For the IRB120, singularities arise at fully-extended configurations (shoulder singularity) and when joints 4 and 6 align (wrist singularity). Trajectory planning avoids these regions.
The dynamic model predicts the joint torques required to produce a given motion, accounting for inertia, Coriolis and centrifugal effects, and gravity. The Euler–Lagrange method starts from the kinetic and potential energies of all links.
For each joint, the partial derivatives of the Lagrangian were evaluated symbolically with respect to DH-derived expressions for link velocities and positions. The resulting torque equations were implemented as Simulink function blocks and verified against SimMechanics computed joint reaction forces.
A quintic polynomial generates smooth reference trajectories for each joint. The polynomial satisfies six boundary conditions — initial and final position, velocity, and acceleration — ensuring the robot starts and ends at rest with zero acceleration.
For painting tasks, smooth trajectories are essential: abrupt velocity changes cause brush-pressure variations that degrade stroke quality. The quintic ensures zero jerk at waypoints when connecting multiple segments.
The closed-loop control system is implemented entirely in Simulink. A six-channel PID controller — one per joint — receives the quintic trajectory reference and drives the SimMechanics mechanical model. Joint angle sensors provide position feedback to close each loop.
The simulation runs the full trajectory sequence: the robot moves from an initial configuration through the planned waypoints, with SimMechanics rendering the 3D motion in real time. Scope blocks capture joint angles, velocities, and control torques for all six axes throughout the motion.