1 of 78

Denavit-Hartenberg Representation

2 of 78

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.

3 of 78

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).

4 of 78

Coordinate frames

5 of 78

Three joint articulated robot

Let's do a DH analysis together for this arm.

6 of 78

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

7 of 78

Step #1: Assigning frames

Follow along with your DH rules summary sheet

with a pencil, not a pen

8 of 78

Step #1 - Locate and Label Axes

z0

z1

z2

3 Joint Axes means there are 4 linkages (need 4 coordinate frames)

9 of 78

Step #2: Assigning frames

10 of 78

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.

11 of 78

One done! (technically we’ll change it later)

z0

x0

12 of 78

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

13 of 78

Interior frames (between joints)

14 of 78

Interior frame axes relationships

In this example all interior frames intersect.

15 of 78

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

16 of 78

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

17 of 78

Frame 1 - X1 normal to Z0 Z1 plane

z0

z1

z2

x0

x1

18 of 78

Link 1 has a coordinate frame

z1

x1

Frame 1 (Link 1) is now done. Repeat steps for frame 2 (Link 2).

19 of 78

Frame 2 - Origin at intersection

z0

z1

z2

x0

Frame 2’s origin is at the intersection of Z1 and Z2.

x1

20 of 78

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

21 of 78

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.

22 of 78

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.

23 of 78

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

24 of 78

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.

25 of 78

Link 3 is done

z3

x3

26 of 78

Step 6.5 (yes, I added this step to the rules)

Redraw the manipulator in the zero-angle configuration

  • All the x axes point the same direction

27 of 78

Move arm to zero. Relocate X0?

z0

z1

z2

x1

x2

z3

x3

You can change your mind about x0

x0

28 of 78

Ready to move!

z0

z1

z2

x1

x2

z3

x3

x0

29 of 78

DH zero (all X’s are parallel)

z0

z1

z2

x1

x2

z3

x3

x0

30 of 78

N frames needs n-1 transformation matrices

z0

z1

z2

x1

x2

z3

x3

x0

In both examples, 4 linkages → 3 Homogeneous transformation matrices

31 of 78

DH Parameters

32 of 78

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”

33 of 78

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”

34 of 78

Homogeneous transformation matrices

We'll do this later. Just wanted to tell you about it now.

35 of 78

Homogeneous transformation matrices

We'll do this later. Just wanted to tell you about it now.

36 of 78

Using Homogeneous transformation matrices

37 of 78

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

(01, 12, 23)

38 of 78

Interior frame axes relationships

Repeat doing one of these (similar to last example)

Next we’ll do one of these (VERY common)

39 of 78

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

40 of 78

Let’s do some more!

1

2

3

0

41 of 78

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

z0z1 is an intersection (just like before)

z1z2 is parallel (new)

These 4 frames will result in 3 Homogeneous Transformation matrices (01, 12, 23)

42 of 78

Dimensions

1” by 1” stock

Lengths = 5”, 4”, 3”

5”

1”

3”

4”

tip

center

43 of 78

Identify the joint axes

z0

z1

z2

44 of 78

Select base frame origin

z0

z1

z2

45 of 78

Select a direction for X0

z0

z1

z2

x0

I will later regret this x0 choice. :)

(done intentionally)

46 of 78

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.

47 of 78

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

48 of 78

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.

49 of 78

End effector frame

z0

x1

x0 and z1

x2

z2

Same direction as Z2. Pick a convenient direction for X3.

x3

z3

tip

50 of 78

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

51 of 78

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

52 of 78

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

53 of 78

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

54 of 78

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

55 of 78

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

56 of 78

θ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

57 of 78

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

58 of 78

θ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

59 of 78

θ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

60 of 78

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.

61 of 78

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

62 of 78

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

63 of 78

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

64 of 78

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

z0z1 is an intersection (just like before)

z1z2 is skew (new)

z2z3 is an intersection (just like before)

5 frames result in 4 Homogeneous Transformation matrices (01, 12, 23, 34)

65 of 78

Dimensions

5”

1”

3”

4”

66 of 78

Identify the joint axes

z0

z1

z3

z2

67 of 78

Select base frame

z1

z3

z2

z0

x0

Choices:

Frame 0 origin (many)

Z0 direction (2, use arrow)

X0 direction (many)

68 of 78

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)

69 of 78

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

70 of 78

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)

71 of 78

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!

72 of 78

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

73 of 78

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

74 of 78

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

75 of 78

Redraw in the zero angle position?

z3

z2

z0

x0

x1

z1

x2

x3

x4

z4

Already

there!

76 of 78

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

77 of 78

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

78 of 78

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. ;)