ENG-654 · Session 1 · Lecture 1

Frames, Transformations & DH Modelling

How do we turn robot geometry into a reproducible kinematic model?

We will move from coordinates, to rigid transformations, to a DH model—and finish by checking that the mathematics reproduces the physical robot.

Act I · Coordinates require frames

Notation is part of the model

Before calculating, we must distinguish physical objects, coordinate vectors, and the frames in which those coordinates are expressed.

Frames and geometric objects

\(W\) is the fixed world—or reference—frame.

\(B\) is a moving body frame.

\(A,B,C\) denote generic frames when no frame is privileged as world.

\(P\) names one physical point in space.

An italic capital names a geometric object or frame; it is not a coordinate value.
Coordinates and transformations

\(\mathbf p\) is a point-coordinate vector; \(\mathbf v\) is a direction vector.

In \({}^{W}\mathbf p_{P}\), the left superscript says “expressed in \(W\),” while the subscript identifies point \(P\).

A tilde, as in \(\widetilde{\mathbf p}\), marks the four-coordinate homogeneous representation.

\({}^{W}\mathbf t_{B}\) locates the origin of \(B\), expressed in \(W\).

\({}^{W}R_{B}\) is the orientation of \(B\) expressed in \(W\).

\({}^{W}T_{B}\) is the coordinate map from frame \(B\) to frame \(W\).

\[ {}^{W}\widetilde{\mathbf p}_{P} = {}^{W}T_{B}\,{}^{B}\widetilde{\mathbf p}_{P} \]

Act I · Coordinates require frames

Coordinates need a reference frame

A list of numbers locates a point only after an origin and a basis have been specified.

The numbers \([0.4,\,0.2,\,0.1]^T\) do not locate a point by themselves.

We must know the origin from which the coordinates are measured.

We must know the directions of the three basis axes.

The same physical point therefore has different coordinate vectors in different frames.

Coordinate frame
An origin plus an ordered, right-handed orthonormal basis \((\hat x,\hat y,\hat z)\).
\[{}^{A}\mathbf p_P \neq {}^{B}\mathbf p_P \quad \text{in general}\]

Act I · Observe

One point, two coordinate descriptions

Move frame \(B\) and observe how the coordinates change even though point \(P\) remains fixed relative to that frame.

Try it: change position and orientation separately. Which coordinate vector stays constant, and which one changes?

Takeaway: coordinates change when the observer changes; the physical geometry does not.

Act I · Orientation

Reading a rotation matrix

The columns of a rotation matrix are the moving frame’s basis axes written in the reference frame.

The matrix \({}^{A}R_B\) answers: “How are the axes of \(B\) oriented when observed from \(A\)?”

\[ {}^{A}R_B= \begin{bmatrix} | & | & |\\ {}^{A}\hat x_B & {}^{A}\hat y_B & {}^{A}\hat z_B\\ | & | & | \end{bmatrix} \]
Orthogonal: \\({}^{A}R_B^T{}^{A}R_B=I\\).
Right-handed: \\(\det({}^{A}R_B)=+1\\).
Inverse: \\({}^{B}R_A=({}^{A}R_B)^T\\).

Takeaway: interpret the columns geometrically before memorizing matrix identities.

Act II · Rotation is not enough

Points and directions are different objects

A fourth coordinate lets projective geometry distinguish a located point from a direction with no finite position.

Projective 3-space uses four coordinates, with the last coordinate denoted by \(w\).

\[ \widetilde{\mathbf p} = \begin{bmatrix}\mathbf p\\1\end{bmatrix} \quad\text{is a finite point}, \]
\[ \widetilde{\mathbf v} = \begin{bmatrix}\mathbf v\\0\end{bmatrix} \quad\text{is a direction}. \]

The tilde marks a homogeneous representation; \(\mathbf p,\mathbf v\in\mathbb R^3\).

Why “homogeneous”?
Every nonzero scalar multiple represents the same projective point: \[ [x:y:z:w]=[\lambda x:\lambda y:\lambda z:\lambda w], \qquad \lambda\neq0. \]

A finite point has \(w\neq0\) and can be normalized to \(w=1\).

A direction has \(w=0\), so it lies at infinity and has no finite location.

Act II · The missing operation

Why a rotation matrix cannot translate

Every \(3\times3\) linear map fixes the origin, while a nonzero translation must move it.

A \(3\times3\) rotation matrix \(R\) is linear and orthogonal:

\[ R^TR=I, \qquad R\mathbf 0=\mathbf 0. \]

Every linear map must keep the origin fixed.

A translation by \(\mathbf t\) is affine:

\[ \mathbf p'=\mathbf p+\mathbf t, \qquad \mathbf 0\mapsto\mathbf t. \]

If \(\mathbf t\neq\mathbf0\), no \(3\times3\) linear—or orthogonal—matrix can perform this operation.

We therefore lift 3D coordinates into four dimensions so rotation and translation can act through one linear matrix multiplication.

Act II · Derivation

Deriving the homogeneous transform

Lifting a 3D point to four coordinates converts the affine rotation-plus-translation rule into one linear matrix multiplication.

Let \({}^{W}\mathbf t_{B}\) be the position of the origin of \(B\), expressed in \(W\). Then

\[ {}^{W}\mathbf p_{P} = {}^{W}R_{B}\,{}^{B}\mathbf p_{P} + {}^{W}\mathbf t_{B}. \]

Rotation is linear; translation is the added offset.

Append \(1\) to each point and choose the last row so that the fourth coordinate remains \(1\):

\[ \begin{bmatrix} {}^{W}\mathbf p_{P}\\1 \end{bmatrix} = \underbrace{ \begin{bmatrix} {}^{W}R_{B} & {}^{W}\mathbf t_{B}\\ \mathbf0^T & 1 \end{bmatrix}}_{{}^{W}T_{B}} \begin{bmatrix} {}^{B}\mathbf p_{P}\\1 \end{bmatrix}. \]

Act II · Result

One matrix stores a complete frame pose

The rotation block describes the basis; the translation block locates the origin; the bottom row preserves homogeneous points.

A homogeneous transformation is the \(4\times4\) linear representation of a 3D affine rigid transformation acting on homogeneous coordinates.
\[ {}^{A}T_B= \begin{bmatrix} {}^{A}R_B & {}^{A}\mathbf t_B\\ \mathbf 0^T & 1 \end{bmatrix}. \]

Rotation: how the axes of B are oriented when seen from A.

Translation: where the origin of B is located when measured in A.

Bottom row: lets rotation and translation be composed by one matrix product.

Act II · Meaning

A frame transform changes coordinates, not geometry

Multiplying by \({}^{A}T_B\) re-expresses the same point from frame \(B\) in frame \(A\).

If the coordinates of P are known in frame B, then

\[ \begin{bmatrix}{}^{A}\mathbf p_P\\1\end{bmatrix} ={}^{A}T_B \begin{bmatrix}{}^{B}\mathbf p_P\\1\end{bmatrix}. \]

The coordinate vector changes.

The physical point does not.

This distinction is essential when reading robot models.

Read the notation aloud:
“Coordinates in \(B\), mapped into coordinates in \(A\).”

We can now relate two frames. A robot requires us to connect an entire chain of them.

Act III · A robot is a chain of transforms

Composing transformations

Compatible frame labels tell us which maps can be multiplied and which intermediate coordinates disappear.

Frame A
reference
Frame B
intermediate
Frame C
target
\[{}^{A}T_C = {}^{A}T_B\,{}^{B}T_C\]

Takeaway: the repeated frame \(B\) is the compatible intermediate coordinate system.

Act III · Order matters

Transformation order changes the result

Rotating then translating generally produces a different pose from translating then rotating.

\[ R_z(90^\circ)\,T_x(1) \]

Translate along the already rotated x-direction.

\[ T_x(1)\,R_z(90^\circ) \]

Translate first, then rotate the body about its new origin.

Concept check: which operation acts first on a column vector? Read products from right to left as operations, but read frame indices as a path.

Act III · From one link to a robot

Forward kinematics is repeated composition

Each joint contributes one relative transform; their ordered product gives the tool pose.

For a serial robot, each joint contributes one relative transform.

\[ {}^{0}T_n(q)= {}^{0}T_1(q_1) {}^{1}T_2(q_2)\cdots {}^{n-1}T_n(q_n). \]

Input: joint coordinates \\(q\\).

Output: tool position and orientation.

Open problem: where should each link frame be placed so that different people build the same model?

Composition solves the chain problem, but not the frame-placement problem. We now need a convention.

Act IV · Frame placement needs a convention

Why we need the DH convention

Restricting the placement of consecutive frames turns an arbitrary six-parameter pose into a reproducible four-parameter link model.

A completely free rigid transform has six degrees of freedom.

\[SE(3):\quad 3\ \text{translations}+3\ \text{rotations}\]

That freedom is useful, but it makes a serial robot difficult to tabulate consistently.

DH chooses consecutive frames around the joint axes and common normal so that only four numbers remain.

\[(a_i,\alpha_i,d_i,\theta_i)\]
Purpose of DH: reproducible frame assignment and a compact link-by-link table.

Act IV · Standard DH

One DH row means four ordered motions

The parameter values and their multiplication order jointly define the relative pose from frame \(i-1\) to frame \(i\).

\[ {}^{i-1}T_i = R_z(\theta_i)\,T_z(d_i)\,T_x(a_i)\,R_x(\alpha_i) \]
1 · \\(\theta_i\\)Rotate about \\(z_{i-1}\\).
2 · \\(d_i\\)Translate along \\(z_{i-1}\\).
3 · \\(a_i\\)Translate along the common normal x.
4 · \\(\alpha_i\\)Rotate about x to align the next z-axis.

The order is part of the convention. Mixing conventions produces a different model.

Act IV · Geometric interpretation

Reading the four DH parameters

Each parameter measures either separation or alignment between two consecutive joint axes.

\\(a_i\\)

How far apart are the two joint axes along their common normal?

\\(\alpha_i\\)

How much must one joint axis twist about the common normal to align with the next?

\\(d_i\\)

How far do we move along \\(z_{i-1}\\) before reaching the common normal?

\\(\theta_i\\)

How much do we rotate about \\(z_{i-1}\\) before the common normal is aligned?

Revolute joint: \\(\theta_i\\) varies. Prismatic joint: \\(d_i\\) varies.

Act IV · Experiment

Build and test a DH frame assignment

Change the four parameters, compare frames, and test whether a selected pair can be represented by one standard-DH row.

Try it: edit \(\theta_i\) and watch both the DH frames and the URDF meshes move. Then compare a direct parent–child pair with a nonconsecutive pair.

Takeaway: DH parameters describe a constrained relationship between deliberately assigned consecutive frames.

Act IV · Falsification

Not every frame pair is one DH step

A general rigid transform has six degrees of freedom, so an arbitrary pair usually cannot satisfy the four-parameter standard-DH structure exactly.

The playground computes the best standard-DH decomposition of \\({}^{A}T_B\\).

\[ \widehat T_{DH}=R_z(\hat\theta)T_z(\hat d)T_x(\hat a)R_x(\hat\alpha) \]

If the residual \\(\|{}^{A}T_B-\widehat T_{DH}\|\\) is not near zero, the selected frame pair does not satisfy the standard-DH placement constraints.

Try 1: select a parent and its direct DH child → residual should be essentially zero.
Try 2: select F0 and F2 in the custom_3R preset → two DH steps generally cannot be compressed into one DH step.
Lesson: DH parameters belong to a frame convention, not merely to two arbitrary coordinate systems.

Act V · Validate the model

Two representations of the custom-3R robot

The URDF/STL model describes the physical link tree; the DH model describes an equivalent chain of frame transformations.

Question: do both representations predict the same tool pose for every joint configuration?

Act V · Establish equivalence

The compact DH model

Three DH rows plus one fixed base transform reproduce the custom-3R tool pose.

i\\(a_i\\) [m]\\(\alpha_i\\)\\(d_i\\) [m]\\(\theta_i\\)
11.00−90°0.00\\(q_1\\)
22.00+90°1.25\\(q_2\\)
31.500.25\\(q_3\\)
\[ {}^{W}T_{tool}= T_z(1.0)\,A_1(q_1)A_2(q_2)A_3(q_3) \]

The DH origin does not have to coincide with the URDF joint-origin point; it only has to lie on the same physical revolute axis and satisfy the DH frame convention.

Act V · Evidence

Validate before you trust the model

Equivalent models must produce the same position and orientation—not only at zero, but across representative joint configurations.

For several configurations \\(q^{(k)}\\), compute the tool pose from every representation you claim is equivalent.

\[ {}^{0}T_{tool,\,DH}(q^{(k)}) \stackrel{?}{=} {}^{0}T_{tool,\,reference}(q^{(k)}) \]

Check the zero configuration first.

Then test random joint configurations.

Compare both position and orientation residuals.

Frame-sign and zero-offset mistakes often look plausible until this test.

Synthesis · Answering the opening question

From physical geometry to a trustworthy model

A reproducible robot model emerges from explicit frame notation, compatible transformation composition, a consistent frame convention, and numerical validation.

01
Coordinates are frame-dependent. Always state what frame a vector or matrix is expressed in.
02
Homogeneous transforms compose along compatible frame labels. Order matters.
03
DH is a frame-assignment convention. The four parameters are meaningful only after the consecutive frames satisfy that convention.
04
Use the interactive lab as a falsification tool. A non-zero DH residual tells you the selected frame pair is not a valid one-step standard-DH relation.
05
Validate numerically. The next lecture will express the same robot using screw axes and URDF.