Engineering:Denavit–Hartenberg parameters

From HandWiki
Short description: Convention for attaching reference frames to links of a kinematic chain


Sample Denavit-Hartenberg Diagram.png

In mechanical engineering, the Denavit–Hartenberg parameters (also called DH parameters) are the four parameters associated with a particular convention for attaching reference frames to the links of a spatial kinematic chain, or robot manipulator.

Jacques Denavit and Richard Hartenberg introduced this convention in 1955 in order to standardize the coordinate frames for spatial linkages.[1][2]

Richard Paul demonstrated its value for the kinematic analysis of robotic systems in 1981.[3] While many conventions for attaching reference frames have been developed, the Denavit–Hartenberg convention remains a popular approach.

Denavit–Hartenberg convention

A commonly used convention for selecting frames of reference in robotics applications is the Denavit and Hartenberg (D–H) convention which was introduced by Jacques Denavit and Richard S. Hartenberg. In this convention, coordinate frames are attached to the joints between two links such that one transformation is associated with the joint [Z ], and the second is associated with the link [X ]. The coordinate transformations along a serial robot consisting of n links form the kinematics equations of the robot:

[math]\displaystyle{ [T] = [Z_1][X_1][Z_2][X_2]\ldots[X_{n-1}][Z_n][X_n]\! }[/math]

where [T ] is the transformation that characterizes the location and orientation of the end-link.

To determine the coordinate transformations [Z ] and [X ], the joints connecting the links are modeled as either hinged or sliding joints, each of which has a unique line S in space that forms the joint axis and define the relative movement of the two links. A typical serial robot is characterized by a sequence of six lines Si (i = 1, 2, ..., 6), one for each joint in the robot. For each sequence of lines Si and Si+1, there is a common normal line Ai,i+1. The system of six joint axes Si and five common normal lines Ai,i+1 form the kinematic skeleton of the typical six degree-of-freedom serial robot. Denavit and Hartenberg introduced the convention that z-coordinate axes are assigned to the joint axes Si and x-coordinate axes are assigned to the common normals Ai,i+1.

This convention allows the definition of the movement of links around a common joint axis Si by the screw displacement:

[math]\displaystyle{ [Z_i]=\begin{bmatrix}\cos\theta_i & -\sin\theta_i & 0 & 0 \\ \sin\theta_i & \cos\theta_i & 0 & 0 \\ 0 & 0 & 1 & d_i \\ 0 & 0 & 0 & 1\end{bmatrix} }[/math]

where θi is the rotation around and di is the sliding motion along the z-axis. Each of these parameters could be a constant depending on the structure of the robot. Under this convention the dimensions of each link in the serial chain are defined by the screw displacement around the common normal Ai,i+1 from the joint Si to Si+1, which is given by

[math]\displaystyle{ [X_i]=\begin{bmatrix} 1 & 0 & 0 & r_{i,i+1} \\ 0 & \cos\alpha_{i,i+1} & -\sin\alpha_{i,i+1} & 0 \\ 0& \sin\alpha_{i,i+1} & \cos\alpha_{i,i+1} & 0 \\ 0 & 0 & 0 & 1\end{bmatrix}, }[/math]

where αi,i+1 and ri,i+1 define the physical dimensions of the link in terms of the angle measured around and distance measured along the X axis.

In summary, the reference frames are laid out as follows:

  1. The z-axis is in the direction of the joint axis.
  2. The x-axis is parallel to the common normal: [math]\displaystyle{ x_n = z_n \times z_{n-1} }[/math] (or away from zn–1)
    If there is no unique common normal (parallel z axes), then d (below) is a free parameter. The direction of xn is from zn–1 to zn, as shown in the video below.
  3. the y-axis follows from the x- and z-axes by choosing it to be a right-handed coordinate system.

Four Parameters

The four parameters of classic DH convention are shown in red text, which are θi, di, ai, αi. With those four parameters, we can translate the coordinates from Oi–1Xi–1Yi–1Zi–1 to OiXiYiZi.

The following four transformation parameters are known as D–H parameters:[4]

  • d: offset along previous z to the common normal
  • θ: angle about previous z from old x to new x
  • r: length of the common normal (aka a, but if using this notation, do not confuse with α). Assuming a revolute joint, this is the radius about previous z.
  • α: angle about common normal, from old z axis to new z axis

A visualization of D–H parameterization is available: YouTube

There is some choice in frame layout as to whether the previous x axis or the next x points along the common normal. The latter system allows branching chains more efficiently, as multiple frames can all point away from their common ancestor, but in the alternative layout the ancestor can only point toward one successor. Thus the commonly used notation places each down-chain x axis collinear with the common normal, yielding the transformation calculations shown below.

We can note constraints on the relationships between the axes:

  • the xn axis is perpendicular to both the zn–1 and zn axes
  • the xn-axis intersects both zn–1 and zn axes
  • the origin of joint n is at the intersection of xn and zn
  • yn completes a right-handed reference frame based on xn and zn

Denavit–Hartenberg matrix

It is common to separate a screw displacement into product of a pure translation along a line and a pure rotation about the line,[5][6] so that

[math]\displaystyle{ [Z_i] = \operatorname{Trans}_{Z_{i}}(d_i) \operatorname{Rot}_{Z_{i}}(\theta_i), }[/math]

and

[math]\displaystyle{ [X_i]=\operatorname{Trans}_{X_i}(r_{i,i+1}) \operatorname{Rot}_{X_i}(\alpha_{i,i+1}). }[/math]

Using this notation, each link can be described by a coordinate transformation from the concurrent coordinate system to the previous coordinate system.

[math]\displaystyle{ {}^{n - 1}T_n = [Z_{n-1}]\cdot [X_n] }[/math]

Note that this is the product of two screw displacements. The matrices associated with these operations are:

[math]\displaystyle{ \operatorname{Trans}_{z_{n - 1}}(d_n) = \left[ \begin{array}{ccc|c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & d_n \\ \hline 0 & 0 & 0 & 1 \end{array} \right] }[/math]
[math]\displaystyle{ \operatorname{Rot}_{z_{n - 1}}(\theta_n) = \left[ \begin{array}{ccc|c} \cos\theta_n & -\sin\theta_n & 0 & 0 \\ \sin\theta_n & \cos\theta_n & 0 & 0 \\ 0 & 0 & 1 & 0 \\ \hline 0 & 0 & 0 & 1 \end{array} \right] }[/math]
[math]\displaystyle{ \operatorname{Trans}_{x_n}(r_n) = \left[ \begin{array}{ccc|c} 1 & 0 & 0 & r_n \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ \hline 0 & 0 & 0 & 1 \end{array} \right] }[/math]
[math]\displaystyle{ \operatorname{Rot}_{x_n}(\alpha_n) = \left[ \begin{array}{ccc|c} 1 & 0 & 0 & 0 \\ 0 & \cos\alpha_n & -\sin\alpha_n & 0 \\ 0 & \sin\alpha_n & \cos\alpha_n & 0 \\ \hline 0 & 0 & 0 & 1 \end{array} \right] }[/math]

This gives:

[math]\displaystyle{ \operatorname{}^{n - 1}T_n = \left[ \begin{array}{ccc|c} \cos\theta_n & -\sin\theta_n \cos\alpha_n & \sin\theta_n \sin\alpha_n & r_n \cos\theta_n \\ \sin\theta_n & \cos\theta_n \cos\alpha_n & -\cos\theta_n \sin\alpha_n & r_n \sin\theta_n \\ 0 & \sin\alpha_n & \cos\alpha_n & d_n \\ \hline 0 & 0 & 0 & 1 \end{array} \right] = \left[ \begin{array}{ccc|c} & & & \\ & R & & T \\ & & & \\ \hline 0 & 0 & 0 & 1 \end{array} \right] }[/math]

where R is the 3×3 submatrix describing rotation and T is the 3×1 submatrix describing translation.

In some books, the order of transformation for a pair of consecutive rotation and translation (such as [math]\displaystyle{ d_n }[/math]and [math]\displaystyle{ \theta_n }[/math]) is reversed. This is possible (despite the fact that in general, matrix multiplication is not commutative) since translations and rotations are concerned with the same axes [math]\displaystyle{ z_{n-1} }[/math] and [math]\displaystyle{ x_{n} }[/math], respectively. As matrix multiplication order for these pairs does not matter, the result is the same. For example: [math]\displaystyle{ \operatorname{Trans}_{z_{n - 1}}(d_n) \cdot \operatorname{Rot}_{z_{n - 1}}(\theta_n) = \operatorname{Rot}_{z_{n - 1}}(\theta_n) \cdot \operatorname{Trans}_{z_{n - 1}}(d_n) }[/math].

Therefore, we can write the transformation [math]\displaystyle{ \operatorname{}^{n - 1}T_{n} }[/math] as follows:
[math]\displaystyle{ {}^{n - 1}T_n = \operatorname{Trans}_{z_{n - 1}}(d_n) \cdot \operatorname{Rot}_{z_{n - 1}}(\theta_n) \cdot \operatorname{Trans}_{x_n}(r_n) \cdot \operatorname{Rot}_{x_n}(\alpha_n) }[/math]
[math]\displaystyle{ {}^{n - 1}T_n = \operatorname{Rot}_{z_{n - 1}}(\theta_n) \cdot \operatorname{Trans}_{z_{n - 1}}(d_n) \cdot \operatorname{Trans}_{x_n}(r_n) \cdot \operatorname{Rot}_{x_n}(\alpha_n) }[/math]

Use of Denavit and Hartenberg matrices

The Denavit and Hartenberg notation gives a standard (distal) methodology to write the kinematic equations of a manipulator. This is especially useful for serial manipulators where a matrix is used to represent the pose (position and orientation) of one body with respect to another.

The position of body [math]\displaystyle{ n }[/math] with respect to [math]\displaystyle{ n-1 }[/math] may be represented by a position matrix indicated with the symbol [math]\displaystyle{ T }[/math] or [math]\displaystyle{ M }[/math]

[math]\displaystyle{ \operatorname{}^{n - 1}T_n = M_{n-1,n} }[/math]

This matrix is also used to transform a point from frame [math]\displaystyle{ n }[/math] to [math]\displaystyle{ n-1 }[/math]

[math]\displaystyle{ M_{n-1,n} = \left[ \begin{array}{ccc|c} R_{xx} & R_{xy} & R_{xz} & T_x \\ R_{yx} & R_{yy} & R_{yz} & T_y \\ R_{zx} & R_{zy} & R_{zz} & T_z \\ \hline 0 & 0 & 0 & 1 \end{array}\right] }[/math]

Where the upper left [math]\displaystyle{ 3\times 3 }[/math] submatrix of [math]\displaystyle{ M }[/math] represents the relative orientation of the two bodies, and the upper right [math]\displaystyle{ 3\times 1 }[/math] represents their relative position or more specifically the body position in frame n − 1 represented with element of frame n.

The position of body [math]\displaystyle{ k }[/math] with respect to body [math]\displaystyle{ i }[/math] can be obtained as the product of the matrices representing the pose of [math]\displaystyle{ j }[/math] with respect of [math]\displaystyle{ i }[/math] and that of [math]\displaystyle{ k }[/math] with respect of [math]\displaystyle{ j }[/math]

[math]\displaystyle{ M_{i,k}= M_{i,j} M_{j,k} }[/math]

An important property of Denavit and Hartenberg matrices is that the inverse is

[math]\displaystyle{ M^{-1} = \left[ \begin{array}{ccc|c} & & & \\ & R^T & & -R^T T \\ & & & \\ \hline 0 & 0 & 0 & 1 \end{array} \right] }[/math]

where [math]\displaystyle{ R^T }[/math] is both the transpose and the inverse of the orthogonal matrix [math]\displaystyle{ R }[/math], i.e. [math]\displaystyle{ R^{-1}_{ij}=R^T_{ij} = R_{ji} }[/math].

Kinematics

Further matrices can be defined to represent velocity and acceleration of bodies.[5][6] The velocity of body [math]\displaystyle{ i }[/math] with respect to body [math]\displaystyle{ j }[/math] can be represented in frame [math]\displaystyle{ k }[/math] by the matrix

[math]\displaystyle{ W_{i,j(k)}=\left[ \begin{array}{ccc|c} 0 & -\omega_z & \omega_y & v_x \\ \omega_z & 0 & -\omega_x & v_y \\ -\omega_y & \omega_x & 0 & v_z \\ \hline 0 & 0 & 0 & 0 \end{array}\right] }[/math]

where [math]\displaystyle{ \omega }[/math] is the angular velocity of body [math]\displaystyle{ j }[/math] with respect to body [math]\displaystyle{ i }[/math] and all the components are expressed in frame [math]\displaystyle{ k }[/math]; [math]\displaystyle{ v }[/math] is the velocity of one point of body [math]\displaystyle{ j }[/math] with respect to body [math]\displaystyle{ i }[/math] (the pole). The pole is the point of [math]\displaystyle{ j }[/math] passing through the origin of frame [math]\displaystyle{ i }[/math].

The acceleration matrix can be defined as the sum of the time derivative of the velocity plus the velocity squared

[math]\displaystyle{ H_{i,j(k)}=\dot{W}_{i,j(k)}+W_{i,j(k)}^2 }[/math]

The velocity and the acceleration in frame [math]\displaystyle{ i }[/math] of a point of body [math]\displaystyle{ j }[/math] can be evaluated as

[math]\displaystyle{ \dot{P} = W_{i,j} P }[/math]
[math]\displaystyle{ \ddot{P} = H_{i,j} P }[/math]

It is also possible to prove that

[math]\displaystyle{ \dot{M}_{i,j} = W_{i,j(i)} M_{i,j} }[/math]
[math]\displaystyle{ \ddot{M}_{i,j} = H_{i,j(i)} M_{i,j} }[/math]

Velocity and acceleration matrices add up according to the following rules

[math]\displaystyle{ W_{i,k}= W_{i,j} + W_{j,k} }[/math]
[math]\displaystyle{ H_{i,k}= H_{i,j} + H_{j,k} + 2W_{i,j} W_{j,k} }[/math]

in other words the absolute velocity is the sum of the parent velocity plus the relative velocity; for the acceleration the Coriolis' term is also present.

The components of velocity and acceleration matrices are expressed in an arbitrary frame [math]\displaystyle{ k }[/math] and transform from one frame to another by the following rule

[math]\displaystyle{ W_{(h)}=M_{h,k} W_{(k)} M_{k,h} }[/math]
[math]\displaystyle{ H_{(h)}=M_{h,k} H_{(k)} M_{k,h} }[/math]

Dynamics

For the dynamics, three further matrices are necessary to describe the inertia [math]\displaystyle{ J }[/math], the linear and angular momentum [math]\displaystyle{ \Gamma }[/math], and the forces and torques [math]\displaystyle{ \Phi }[/math] applied to a body.

Inertia [math]\displaystyle{ J }[/math]:

[math]\displaystyle{ J=\left[ \begin{array}{ccc|c} I_{xx} & I_{xy} & I_{xz} & x_g m \\ I_{yx} & I_{yy} & I_{yz} & y_g m \\ I_{zx} & I_{zy} & I_{zz} & z_g m \\ \hline x_g m & y_g m & z_g m & m \end{array}\right] }[/math]

where [math]\displaystyle{ m }[/math] is the mass, [math]\displaystyle{ x_g,\, y_g,\, z_g }[/math] represent the position of the center of mass, and the terms [math]\displaystyle{ I_{xx},\,I_{xy},\ldots }[/math] represent inertia and are defined as

[math]\displaystyle{ I_{xx} =\iint x^2 \, dm }[/math]
[math]\displaystyle{ \begin{align} I_{xy} & =\iint xy \, dm \\ I_{xz} & = \cdots \\ & \,\,\, \vdots \end{align} }[/math]

Action matrix [math]\displaystyle{ \Phi }[/math], containing force [math]\displaystyle{ f }[/math] and torque [math]\displaystyle{ t }[/math]:

[math]\displaystyle{ \Phi = \left[ \begin{array}{ccc|c} 0 & -t_z & t_y & f_x \\ t_z & 0 & -t_x & f_y \\ -t_y & t_x & 0 & f_z \\ \hline -f_x & -f_y & -f_z & 0 \end{array}\right] }[/math]

Momentum matrix [math]\displaystyle{ \Gamma }[/math], containing linear [math]\displaystyle{ \rho }[/math] and angular [math]\displaystyle{ \gamma }[/math] momentum

[math]\displaystyle{ \Gamma = \left[ \begin{array}{ccc|c} 0 & -\gamma_z & \gamma_y & \rho_x \\ \gamma_z & 0 & -\gamma_x & \rho_y \\ -\gamma_y & \gamma_x & 0 & \rho_z \\ \hline -\rho_x & -\rho_y & -\rho_z & 0 \end{array}\right] }[/math]

All the matrices are represented with the vector components in a certain frame [math]\displaystyle{ k }[/math]. Transformation of the components from frame [math]\displaystyle{ k }[/math] to frame [math]\displaystyle{ h }[/math] follows the rule

[math]\displaystyle{ \begin{align} J_{(h)} & = M_{h,k} J_{(k)} M_{h,k}^T \\ \Gamma_{(h)} & = M_{h,k} \Gamma_{(k)} M_{h,k}^T \\ \Phi_{(h)} & = M_{h,k} \Phi_{(k)} M_{h,k}^T \end{align} }[/math]

The matrices described allow the writing of the dynamic equations in a concise way.

Newton's law:

[math]\displaystyle{ \Phi = H J - J H^t \, }[/math]

Momentum:

[math]\displaystyle{ \Gamma = W J - J W^t \, }[/math]

The first of these equations express the Newton's law and is the equivalent of the vector equation [math]\displaystyle{ f = m a }[/math] (force equal mass times acceleration) plus [math]\displaystyle{ t = J \dot{\omega} + \omega \times J \omega }[/math] (angular acceleration in function of inertia and angular velocity); the second equation permits the evaluation of the linear and angular momentum when velocity and inertia are known.

Modified DH parameters

Some books such as Introduction to Robotics: Mechanics and Control (3rd Edition) [7] use modified (proximal) DH parameters. The difference between the classic (distal) DH parameters and the modified DH parameters are the locations of the coordinates system attachment to the links and the order of the performed transformations.

Modified DH parameters

Compared with the classic DH parameters, the coordinates of frame [math]\displaystyle{ O_{i-1} }[/math] is put on axis i − 1, not the axis i in classic DH convention. The coordinates of [math]\displaystyle{ O_{i} }[/math] is put on the axis i, not the axis i + 1 in classic DH convention.

Another difference is that according to the modified convention, the transform matrix is given by the following order of operations:

[math]\displaystyle{ {}^{n - 1}T_n = \operatorname{Rot}_{x_{n-1}}(\alpha_{n-1}) \cdot \operatorname{Trans}_{x_{n-1}}(a_{n-1}) \cdot \operatorname{Rot}_{z_{n}}(\theta_n) \cdot \operatorname{Trans}_{z_{n}}(d_n) }[/math]

Thus, the matrix of the modified DH parameters becomes

[math]\displaystyle{ \operatorname{}^{n - 1}T_n = \left[ \begin{array}{ccc|c} \cos\theta_n & -\sin\theta_n & 0 & a_{n-1} \\ \sin\theta_n \cos\alpha_{n-1} & \cos\theta_n \cos\alpha_{n-1} & -\sin\alpha_{n-1} & -d_n \sin\alpha_{n-1} \\ \sin\theta_n\sin\alpha_{n-1} & \cos\theta_n \sin\alpha_{n-1} & \cos\alpha_{n-1} & d_n \cos\alpha_{n-1} \\ \hline 0 & 0 & 0 & 1 \end{array} \right] }[/math]

Note that some books (e.g.:[8]) use [math]\displaystyle{ a_n }[/math] and [math]\displaystyle{ \alpha_n }[/math] to indicate the length and twist of link n − 1 rather than link n. As a consequence, [math]\displaystyle{ {}^{n - 1}T_n }[/math] is formed only with parameters using the same subscript.

In some books, the order of transformation for a pair of consecutive rotation and translation (such as [math]\displaystyle{ d_n }[/math]and [math]\displaystyle{ \theta_n }[/math]) is replaced. However, because matrix multiplication order for such pair does not matter, the result is the same. For example: [math]\displaystyle{ \operatorname{Trans}_{z_{n}}(d_n) \cdot \operatorname{Rot}_{z_{n}}(\theta_n) = \operatorname{Rot}_{z_{n}}(\theta_n) \cdot \operatorname{Trans}_{z_{n}}(d_n) }[/math].

Surveys of DH conventions and its differences have been published.[9][10]

See also

References

  1. Denavit, Jacques; Hartenberg, Richard Scheunemann (1955). "A kinematic notation for lower-pair mechanisms based on matrices". Journal of Applied Mechanics 22 (2): 215–221. doi:10.1115/1.4011045. 
  2. Hartenberg, Richard Scheunemann; Denavit, Jacques (1965). Kinematic synthesis of linkages. McGraw-Hill series in mechanical engineering. New York: McGraw-Hill. pp. 435. http://ebooks.library.cornell.edu/k/kmoddl/toc_hartenberg1.html. Retrieved 2012-01-13. 
  3. Paul, Richard (1981). Robot manipulators: mathematics, programming, and control : the computer control of robot manipulators. Cambridge, MA: MIT Press. ISBN 978-0-262-16082-7. https://books.google.com/books?id=UzZ3LAYqvRkC. Retrieved 2016-09-22. 
  4. Spong, Mark W.; Vidyasagar, M. (1989). Robot Dynamics and Control. New York: John Wiley & Sons. ISBN 9780471503521. 
  5. 5.0 5.1 Legnani, Giovanni; Casolo, Federico; Righettini, Paolo; Zappa, Bruno (1996). "A homogeneous matrix approach to 3D kinematics and dynamics — I. Theory". Mechanism and Machine Theory 31 (5): 573–587. doi:10.1016/0094-114X(95)00100-D. 
  6. 6.0 6.1 Legnani, Giovanni; Casolo, Federico; Righettini, Paolo; Zappa, Bruno (1996). "A homogeneous matrix approach to 3D kinematics and dynamics—II. Applications to chains of rigid bodies and serial manipulators". Mechanism and Machine Theory 31 (5): 589–605. doi:10.1016/0094-114X(95)00101-4. 
  7. John J. Craig, Introduction to Robotics: Mechanics and Control (3rd Edition) ISBN:978-0201543612
  8. Khalil, Wisama; Dombre, Etienne (2002). Modeling, identification and control of robots. New York: Taylor Francis. ISBN 1-56032-983-1. https://books.google.com/books?id=Nx4X95PNyAkC. Retrieved 2016-09-22. 
  9. Lipkin, Harvey (2005). "Volume 7: 29th Mechanisms and Robotics Conference, Parts a and B". 2005. pp. 921–926. doi:10.1115/DETC2005-85460. ISBN 0-7918-4744-6. 
  10. Waldron, Kenneth; Schmiedeler, James (2008). "Kinematics". Springer Handbook of Robotics. pp. 9–33. doi:10.1007/978-3-540-30301-5_2. ISBN 978-3-540-23957-4.