改进DH坐标系建立如图1所示,标准DH坐标系建立如图2所示。改进DH和标准DH的主要区别为:
- 连杆坐标系建立的位置不同。SDH方法将连杆的坐标系固定在连杆的后端,MDH方法将连杆的坐标系固定在连杆的前端
- 变换的顺序不同。SDH方法的变换顺序为ddd→θ\thetaθ→aaa→α\alphaα,MDH方法的变换顺序为α\alphaα→aaa→θ\thetaθ→ddd。
SDH方法的变换矩阵为:
i−1iT=Rotzi−1(θi)Transzi−1(di)Transxi(ai)Rotxi(αi)=[cosθi−sinθi00sinθicosθi0000100001]⋅[10000100000di0011]⋅[100ai010000100001]⋅[10000cosαi−sinαi00sinαicosαi00001]=[cθi−sθi⋅cαisθi⋅sαiaicθisθicθi⋅cαi−cθi⋅sαiaisθi0sαicαidi0001]
_{i-1}^{i}\textrm{T}=Rot_{z_{i-1}}(\theta_i)Trans_{z_{i-1}}(d_i)Trans_{x_i}(a_i)Rot_{x_i}(\alpha_i)\\
=\begin{bmatrix}
cos\theta_i & -sin\theta_i & 0 & 0\\
sin\theta_i & cos\theta_i & 0 & 0\\
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1
\end{bmatrix}\cdot \begin{bmatrix}
1 & 0 & 0 & 0\\
0 & 1 & 0 & 0\\
0 & 0 & 0 & d_i\\
0 & 0 & 1 & 1
\end{bmatrix}\cdot \begin{bmatrix}
1 & 0 & 0 & a_i\\
0 & 1 & 0 & 0\\
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1
\end{bmatrix}
\cdot \begin{bmatrix}
1 & 0 & 0 & 0\\
0 & cos\alpha_i & -sin\alpha_i & 0\\
0 & sin\alpha_i & cos\alpha_i & 0\\
0 & 0 & 0 & 1
\end{bmatrix}\\
=\begin{bmatrix}
c\theta_i & -s\theta_i \cdot c\alpha_i & s\theta_i \cdot s\alpha_i & a_i c\theta_i\\
s\theta_i & c\theta_i \cdot c\alpha_i & -c\theta_i \cdot s\alpha_i & a_i s\theta_i\\
0 & s\alpha_i & c\alpha_i & d_i\\
0 & 0 & 0 & 1
\end{bmatrix}
i−1iT=Rotzi−1(θi)Transzi−1(di)Transxi(ai)Rotxi(αi)=⎣⎡cosθisinθi00−sinθicosθi0000100001⎦⎤⋅⎣⎡10000100000100di1⎦⎤⋅⎣⎡100001000010ai001⎦⎤⋅⎣⎡10000cosαisinαi00−sinαicosαi00001⎦⎤=⎣⎡cθisθi00−sθi⋅cαicθi⋅cαisαi0sθi⋅sαi−cθi⋅sαicαi0aicθiaisθidi1⎦⎤
MDH方法的变换矩阵为:
i−1iT=Rotxi−1(αi−1)Transxi−1(ai−1)Rotzi(θi)Transzi(di)=[10000cosαi−sinαi00sinαicosαi00001]⋅[100ai010000100001]⋅[cosθi−sinθi00sinθicosθi0000100001]⋅[10000100000di0011]=[cθi−sθi0ai−1sθicαi−1cθicαi−1−sαi−1−disαi−1sθisαi−1cθisαi−1cαi−1dicαi−10001]
_{i-1}^{i}\textrm{T}=Rot_{x_{i-1}}(\alpha_{i-1})Trans_{x_{i-1}}(a_{i-1})Rot_{z_i}(\theta_i)Trans_{z_i}(d_i)\\
= \begin{bmatrix}
1 & 0 & 0 & 0\\
0 & cos\alpha_i & -sin\alpha_i & 0\\
0 & sin\alpha_i & cos\alpha_i & 0\\
0 & 0 & 0 & 1
\end{bmatrix}\cdot
\begin{bmatrix}
1 & 0 & 0 & a_i\\
0 & 1 & 0 & 0\\
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1
\end{bmatrix}
\cdot
\begin{bmatrix}
cos\theta_i & -sin\theta_i & 0 & 0\\
sin\theta_i & cos\theta_i & 0 & 0\\
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1
\end{bmatrix}\cdot
\begin{bmatrix}
1 & 0 & 0 & 0\\
0 & 1 & 0 & 0\\
0 & 0 & 0 & d_i\\
0 & 0 & 1 & 1
\end{bmatrix} \\
=\begin{bmatrix}
c\theta_i & -s\theta_i & 0 & a_{i-1} \\
s\theta_ic\alpha_{i-1} & c\theta_ic\alpha_{i-1} & -s\alpha_{i-1} & -d_is\alpha_{i-1} \\
s\theta_is\alpha_{i-1} & c\theta_is\alpha_{i-1} & c\alpha_{i-1} & d_ic\alpha_{i-1} \\
0 & 0 & 0 & 1
\end{bmatrix}
i−1iT=Rotxi−1(αi−1)Transxi−1(ai−1)Rotzi(θi)Transzi(di)=⎣⎡10000cosαisinαi00−sinαicosαi00001⎦⎤⋅⎣⎡100001000010ai001⎦⎤⋅⎣⎡cosθisinθi00−sinθicosθi0000100001⎦⎤⋅⎣⎡10000100000100di1⎦⎤=⎣⎡cθisθicαi−1sθisαi−10−sθicθicαi−1cθisαi−100−sαi−1cαi−10ai−1−disαi−1dicαi−11⎦⎤
MDH | SDH |
---|---|
![]() | ![]() |
对于平面RRR机械臂,其MDH和SDH的DH参数坐标系建立如上面两图所示。MDH方法的坐标系{0}\{ 0 \}{0}和坐标系{1}\{ 1 \}{1}重合,坐标系{2}\{ 2 \}{2}和坐标系{3}\{ 3 \}{3}重合,坐标系建立在连杆前端。SDH方法的坐标系建立在连杆后端。因此MDH和SDH方法的DH参数表如下:
MDH方法DH参数表:
iii | αi−1\alpha_{i-1}αi−1 | ai−1a_{i-1}ai−1 | did_idi | θi\theta_iθi |
---|---|---|---|---|
1 | 0 | 0 | 0 | θ1\theta_1θ1 |
2 | 0 | L1L_1L1 | 0 | θ2\theta_2θ2 |
3 | 0 | L2L_2L2 | 0 | θ3\theta_3θ3 |
SDH方法DH参数表:
iii | θi\theta_iθi | did_idi | aia_iai | αi\alpha_iαi |
---|---|---|---|---|
1 | 0 | L1L_1L1 | 0 | θ1\theta_1θ1 |
2 | 0 | L2L_2L2 | 0 | θ2\theta_2θ2 |
3 | 0 | L3L_3L3 | 0 | θ3\theta_3θ3 |