Denavit-Hartenberg Representation
What is DH representation?
Denavit-Hartenberg (DH) Representation is a systematic way to choose coordinate frames for an articulated serial manipulator.
Note if you took ME445 Robot Dynamics and Control there are a few minor differences in the implementation. For this class you are required to use the method as presented here.
Why use DH representation?
DH parameters provide not only a systematic way to choose coordinate frames, but provide a framework to make forward kinematic analysis MUCH easier.
DH parameters make it easy to create homogeneous transformation matrices (which are important btw).
Coordinate frames
Three joint articulated robot
Let's do a DH analysis together for this arm.
3 joints, 4 linkages, needs 4 coordinate frames
Let's do a DH analysis together for this arm.
Link 0
Link 1
Link 2
Link 3
3 Joint Axes
Step #1: Assigning frames
Follow along with your DH rules summary sheet
with a pencil, not a pen
Step #1 - Locate and Label Axes
z0
z1
z2
3 Joint Axes means there are 4 linkages (need 4 coordinate frames)
Step #2: Assigning frames
Step #2 - Establish base frame
z0
z1
z2
x0
Origin could be anywhere on axes, but this spot is logical.
X0 could be any perpendicular, this choice was arbitrary. We can (and will in this case) change our mind later.
One done! (technically we’ll change it later)
z0
x0
3 joints, 4 linkages, needs 4 coordinate frames
Base Frame
Done Step #2
Link 0
Link 1
Link 2
Link 3
Interior Frame
Steps #3 - #5
Uses Z0 and Z1
Interior Frame
Steps #3 - #5
Uses Z1 and Z2
End-effector Frame
Step #6
z0
z1
z1
z2
Interior frames (between joints)
Interior frame axes relationships
In this example all interior frames intersect.
Step #3 - Locate the interior frame origin
Intersect → Frame n’s origin goes at the intersection point.
Do Zn-1 and Zn intersect?
Parallel → Frame n’s origin goes anywhere you like on Zn
Are Zn-1 and Zn parallel?
Skew → Use the common normal, firing an arrow trick (to be discussed later).
Yes
Yes
No
No
Frame 1 - Placing origin 1
z0
z1
z2
x0
Z0 and Z1 intersect so the frame 1 origin is at the intersection.
(very common for frame origins to overlap, no biggy)
Next we need to place X1 perpendicular to Z0 and Z1
Frame 1 - X1 normal to Z0 Z1 plane
z0
z1
z2
x0
x1
Link 1 has a coordinate frame
z1
x1
Frame 1 (Link 1) is now done. Repeat steps for frame 2 (Link 2).
Frame 2 - Origin at intersection
z0
z1
z2
x0
Frame 2’s origin is at the intersection of Z1 and Z2.
x1
Frame 2 - X2 normal to Z1 Z2 plane
z0
z1
z2
x0
X2 is perpendicular to Z1 and Z2. Note that we had two valid choices for the direction, but picked the one that matched up best with the X1 choice.
x1
x2
Link 2 has a coordinate frame
z2
x2
Interior frames are now done. Only the final link is needed.
It is called the “End Effector Frame” and has different rules.
End effector frame
Dr Fisher adjustment: I choose to define “along the direction zn-1” as collinear (not just parallel). It intentionally reduces the different number of correct answers.
Frame 3 - Z3 along Z2
z0
z1
z2
x0
Origin of the end-effector should be along Z2 placed at the end.
x1
x2
z3
Frame 3- X3 placed “conveniently”
z0
z1
z2
x0
X3 of the end-effector frame should be place conveniently. :)
Here we choose to make it match the rod (seems logical).
x1
x2
z3
x3
Dr Fisher adjustment: I put the final origin as near the end effector as possible along Zn.
Link 3 is done
z3
x3
Step 6.5 (yes, I added this step to the rules)
Redraw the manipulator in the zero-angle configuration
Move arm to zero. Relocate X0?
z0
z1
z2
x1
x2
z3
x3
You can change your mind about x0
x0
Ready to move!
z0
z1
z2
x1
x2
z3
x3
x0
DH zero (all X’s are parallel)
z0
z1
z2
x1
x2
z3
x3
x0
N frames needs n-1 transformation matrices
z0
z1
z2
x1
x2
z3
x3
x0
In both examples, 4 linkages → 3 Homogeneous transformation matrices
DH Parameters
DH Parameters
| a [inches] | d [inches] | alpha [degrees] | theta [degrees] |
0 to 1 (A1) | | | | θ1 |
1 to 2 (A2) | | | | θ2 |
2 to 3 (A3) | | | | θ3 |
2”
2”
DH Parameters
| a [inches] | d [inches] | alpha [degrees] | theta [degrees] |
0 to 1 (A1) | 0 | 0 | -90 | θ1 |
1 to 2 (A2) | 0 | 2 | 90 | θ2 |
2 to 3 (A3) | 0 | 2 | 0 | θ3 |
2”
2”
Homogeneous transformation matrices
We'll do this later. Just wanted to tell you about it now.
Homogeneous transformation matrices
We'll do this later. Just wanted to tell you about it now.
Using Homogeneous transformation matrices
Summary
z0
z1
z2
3 joints, 4 linkages = 4 coordinate frames
Steps #2: Base frame (0)
Steps #3-#5: Interior frames (1-2)
Step #6: End effector frame (3)
Selecting frame origins
Base frame
0: Anywhere along z0
Interior frames
1: Intersection (z0 & z1)
2: Intersection (z1 & z2)
End effector frame
3: Along z2 at the outermost tip
0 & 1
2
3
4 frames resulted in 3 Homogeneous Transformation matrices
(0→1, 1→2, 2→3)
Interior frame axes relationships
Repeat doing one of these (similar to last example)
Next we’ll do one of these (VERY common)
Step #3 - Locate the interior frame origin
Intersect → Frame n’s origin goes at the intersection point.
Do Zn-1 and Zn intersect?
Parallel → Frame n’s origin goes anywhere you like on Zn (the joint axis that is farther out)
Are Zn-1 and Zn parallel?
Skew → Use the common normal, firing an arrow trick (to be discussed later).
Yes
Yes
No
No
Let’s do some more!
1
2
3
0
Want do we need?
Summary before we start
3 Revolute joints
BTW DH works for prismatic joints as well
3 joints = 4 linkages = 4 coordinate frames
Frame0 (base) origin on z0
Frame1 (interior) uses z0 and z1
Frame2 (interior) uses z1and z2
Frame3 (end effector) origin on z2
Interior frame relationships
z0→z1 is an intersection (just like before)
z1→z2 is parallel (new)
These 4 frames will result in 3 Homogeneous Transformation matrices (0→1, 1→2, 2→3)
Dimensions
1” by 1” stock
Lengths = 5”, 4”, 3”
5”
1”
3”
4”
tip
center
Identify the joint axes
z0
z1
z2
Select base frame origin
z0
z1
z2
Select a direction for X0
z0
z1
z2
x0
I will later regret this x0 choice. :)
(done intentionally)
Interior frame for intersecting
z0
x1
z2
x0 and z1
Same as before. Origin at the intersection. X perpendicular to the plane formed by the axes.
Interior frame for parallel
z0
x1
x0 and z1
Frame 2 origin can be anywhere along the joint 2 axis.
Pick the spot that results in simple DH parameters.
The direction of Z2 can be either way. Since this figure had an arrow I used that.
For the X fire an arrow from the Z1 axis to the Z2 axis along the shortest path that hit the origin.
z2
Interior frame for parallel
z0
x1
x0 and z1
x2
Nice shot with the X2 arrow!
z2
Dr. Fisher adjustment: The X2 arrow could shot in. I intentionally require you to shoot it out to reduce the number of correct solutions.
End effector frame
z0
x1
x0 and z1
x2
z2
Same direction as Z2. Pick a convenient direction for X3.
x3
z3
tip
Redraw in the zero angle?
z0
x1
x0 and z1
x2
z2
We could move the joints of manipulator and redraw it so that everyone matches X0. Or...
x3
z3
Redraw in the zero angle position?
z0
x1
z1
x2
z2
Just redo Step #2 and change X0 to a different legal spot. :)
And we’re done with the redraw!
x3
z3
x0
DH Parameters
| a [inches] | d [inches] | alpha [degrees] | theta [degrees] |
0 to 1 (A1) | | | | θ1 |
1 to 2 (A2) | | | | θ2 |
2 to 3 (A3) | | | | θ3 |
DH Parameters
| a [inches] | d [inches] | alpha [degrees] | theta [degrees] |
0 to 1 (A1) | 0 | 0 | 90 | θ1 |
1 to 2 (A2) | 4 | 0 | 180 (or -180) | θ2 |
2 to 3 (A3) | 0 | 2 | 0 | θ3 |
Thinking about links individually
z0
x1
z1
x2
z2
x3
z3
x0
z0
x0
Link 0 doesn’t move.
Link 1 will rotate about Z0
0
0
Link 1
z0
x1
z1
x2
z2
x3
z3
x0
Link 1 rotates about Z0 (yes, Z1 moves as Link 1 rotates)
θ1 is the angle between X0 and X1 about Z0
Link 2 will rotate about Z1
x1
z1
0
1
1
θ1 rotates about Z0
z0
x1
z1
x2
z2
x3
z3
x0
θ1 is the angle between X0 and X1 about Z0
θ1 moves link 1 (and beyond)
x1
z1
x1
z1
x1
z1
z1
x1
z0
x0
z0
x0
z0
x0
z0
x0
θ1 = -20o
θ1 = 90o
θ1 = 20o
θ1 = 0o
θ1
0
1
1
1
1
1
Link 2
z0
x1
z1
x2
z2
x3
z3
x0
Link 2 rotates about Z1
The coordinate frame is at the end.
x2
z2
0
1
2
2
θ2 rotates about Z1
z0
x1
z1
x2
z2
x3
z3
x0
θ2 is the angle between X1 and X2 about Z1
θ2 moves link 2 (and beyond)
x1
z1
x1
z1
x2
z2
x2
z2
θ2
θ2 = 20o
θ2 = 0o
θ2
0
1
2
2
2
θ3 rotates about Z2
z0
x1
z1
x2
z2
z3
x0
θ3 is the angle between X3 and X2 about Z2
θ3 moves link 3 (the last link)
θ3
0
1
2
x3
z3
x3
3
3
Z direction determines positive theta
z0
x1
z1
x2
z2
z3
x0
θ3
0
x3
θ2
θ1
Note how Z1 and Z2 are in opposite directions. Using the right hand rule you can see why positive θ2 and positive θ3 are in opposite directions.
Exploded view
z0
x1
z1
x2
z2
z3
x0
θ3
0
x3
θ2
θ1
z0
x0
0
x1
z1
1
x2
z2
2
z3
x3
3
Interior frame with skew axes
Repeat doing one of these (similar to both examples)
We’ll do one of these (new here and VERY common)
This minimum length line segment is usually called the Common normal
Step #3 - Locate the interior frame origin
Intersect → Frame n’s origin goes at the intersection point.
Do Zn-1 and Zn intersect?
Parallel → Frame n’s origin goes anywhere you like on Zn (the joint axis that is farther out)
Are Zn-1 and Zn parallel?
Skew → Find the common normal, fire an arrow down the common normal, hits origin, use as xn
Yes
Yes
No
No
One more! - Think about your choices
Summary before we start
4 Revolute joints
There is a hidden 4th joint at the end
4 joints = 5 linkages = 5 coordinate frames
Frame0 (base) origin on z0
Frame1 (interior) uses z0 and z1
Frame2 (interior) uses z1and z2
Frame3 (interior) uses z2and z3
Frame4 (end effector) origin on z3
Interior frame relationships
z0→z1 is an intersection (just like before)
z1→z2 is skew (new)
z2→z3 is an intersection (just like before)
5 frames result in 4 Homogeneous Transformation matrices (0→1, 1→2, 2→3, 3→4)
Dimensions
5”
1”
3”
4”
Identify the joint axes
z0
z1
z3
z2
Select base frame
z1
z3
z2
z0
x0
Choices:
Frame 0 origin (many)
Z0 direction (2, use arrow)
X0 direction (many)
Interior frame for intersecting
z3
z2
z0
x0
x1
z1
Choices:
Frame 0 origin (many)
Z0 direction (2, use arrow)
X0 direction (many)
Z1 direction (2, use arrow)
X1 direction (2)
Interior frame for skew (new)
z3
z2
z0
x0
x1
z1
Choices:
Frame 0 origin (many)
Z0 direction (2, use arrow)
X0 direction (many)
Z1 direction (2, use arrow)
X1 direction (2)
Find the common normal, which determines the origin and x direction
Runs down the middle of Link 2
Interior frame for skew (new)
z3
z2
z0
x0
x1
z1
Choices:
Frame 0 origin (many)
Z0 direction (2, use arrow)
X0 direction (many)
Z1 direction (2, use arrow)
X1 direction (2)
Z2 direction (2, use arrow)
Frame 2 - X2 along common normal
z3
z2
z0
x0
x1
z1
Choices:
Frame 0 origin (many)
Z0 direction (2, use arrow)
X0 direction (many)
Z1 direction (2, use arrow)
X1 direction (2)
Z2 direction (2, use arrow)
X2 direction (2, arrow trick)
x2
Arrow trick.
Nice shot!
Frame 3 - Interior frame intersection
z3
z2
z0
x0
x1
z1
Choices:
Frame 0 origin (many)
Z0 direction (2, use arrow)
X0 direction (many)
Z1 direction (2, use arrow)
X1 direction (2)
Z2 direction (2, use arrow)
X2 direction (2, arrow trick)
Z3 direction (2, use arrow)
x2
Frame 3 - X3 normal to Z2 Z3 plane
z3
z2
z0
x0
x1
z1
Choices:
Frame 0 origin (many)
Z0 direction (2, use arrow)
X0 direction (many)
Z1 direction (2, use arrow)
X1 direction (2)
Z2 direction (2, use arrow)
X2 direction (2, arrow trick)
Z3 direction (2, use arrow)
X3 direction (2)
x2
x3
End effector frame
z3
z2
z0
x0
x1
z1
Choices:
Frame 0 origin (many)
Z0 direction (2, use arrow)
X0 direction (many)
Z1 direction (2, use arrow)
X1 direction (2)
Z2 direction (2, use arrow)
X2 direction (2,arrow trick)
Z3 direction (2, use arrow)
X3 direction (2)
Frame 4 origin (tip)
Z4 direction (2, use z3)
X4 direction (many)
x2
x3
x4
z4
Redraw in the zero angle position?
z3
z2
z0
x0
x1
z1
x2
x3
x4
z4
Already
there!
DH Parameters
| a [inches] | d [inches] | alpha [degrees] | theta [degrees] |
0 to 1 (A1) | | | | θ1 |
1 to 2 (A2) | | | | θ2 |
2 to 3 (A3) | | | | θ3 |
3 to 4 (A4) | | | | θ3 |
DH Parameters
| a [inches] | d [inches] | alpha [degrees] | theta [degrees] |
0 to 1 (A1) | 0 | 0 | 90 | θ1 |
1 to 2 (A2) | 4 | 1 | -90 | θ2 |
2 to 3 (A3) | 0 | 1 | -90 | θ3 |
3 to 4 (A4) | 0 | 3 | 0 | θ3 |
That was a workout
Implementing the steps is non-trivial, but doable.
Once we have the DH parameters we can make matrices. In order to work with matrices we need MATLAB. ;)