9.52 DH 규약에 의한 동차 변환 행렬 유도
1. 유도의 목표
표준 DH 규약에 의해 인접한 두 링크 좌표계 \{i-1\}과 \{i\} 사이의 동차 변환 행렬 {}^{i-1}\mathbf{T}_i을 4개의 DH 매개변수 (a_i, \alpha_i, d_i, \theta_i)로 표현한다. 결과는 다음의 닫힌 형태이다.
{}^{i-1}\mathbf{T}_i = \begin{bmatrix} \cos\theta_i & -\sin\theta_i\cos\alpha_i & \sin\theta_i\sin\alpha_i & a_i\cos\theta_i \\ \sin\theta_i & \cos\theta_i\cos\alpha_i & -\cos\theta_i\sin\alpha_i & a_i\sin\theta_i \\ 0 & \sin\alpha_i & \cos\alpha_i & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}
2. 네 단계 기본 변환의 합성
{}^{i-1}\mathbf{T}_i는 네 개의 기본 변환의 곱으로 표현된다.
{}^{i-1}\mathbf{T}_i = \mathbf{Rot}_z(\theta_i) \cdot \mathbf{Trans}_z(d_i) \cdot \mathbf{Trans}_x(a_i) \cdot \mathbf{Rot}_x(\alpha_i)
이 네 단계는 좌표계 \{i-1\}에서 출발하여 차례로 이동하면서 좌표계 \{i\}에 도달한다. 각 단계의 의미는 다음과 같다.
- \mathbf{Rot}_z(\theta_i): 좌표계 \{i-1\}의 z축 주위로 \theta_i만큼 회전. x축이 z_{i-1} 주위로 돌면서 x_i의 방향에 정렬되도록 한다.
- \mathbf{Trans}_z(d_i): z축 방향으로 d_i만큼 병진. \{i-1\}의 원점이 \{i\}의 원점이 위치하는 z축 상의 점으로 이동한다.
- \mathbf{Trans}_x(a_i): 새 x축 방향으로 a_i만큼 병진. 공통 수선의 길이를 따라 이동하여 \{i\}의 원점에 도달한다.
- \mathbf{Rot}_x(\alpha_i): 새 x축 주위로 \alpha_i만큼 회전. z축이 z_{i-1} 방향에서 z_i 방향으로 회전한다.
3. 단계별 유도
3.1 단계 1: \mathbf{Rot}_z(\theta_i)
z축 주위 \theta_i 회전의 동차 변환 행렬은 다음과 같다.
\mathbf{Rot}_z(\theta_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}
3.2 단계 2: \mathbf{Trans}_z(d_i)
z축 방향 d_i 병진의 동차 변환 행렬은 다음과 같다.
\mathbf{Trans}_z(d_i) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}
3.3 단계 3: \mathbf{Trans}_x(a_i)
x축 방향 a_i 병진의 동차 변환 행렬은 다음과 같다.
\mathbf{Trans}_x(a_i) = \begin{bmatrix} 1 & 0 & 0 & a_i \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}
3.4 단계 4: \mathbf{Rot}_x(\alpha_i)
x축 주위 \alpha_i 회전의 동차 변환 행렬은 다음과 같다.
\mathbf{Rot}_x(\alpha_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}
4. 곱의 계산
네 행렬의 곱을 차례로 계산한다. 우선 \mathbf{Trans}_z(d_i) \cdot \mathbf{Trans}_x(a_i)부터 시작한다.
4.1 부분 곱 1: \mathbf{Trans}_z(d_i)\mathbf{Trans}_x(a_i)
두 병진의 곱은 다음과 같다.
\begin{bmatrix} 1 & 0 & 0 & a_i \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}
병진들은 가환이므로 단순히 두 병진 벡터의 합 (a_i, 0, d_i)^T이다.
4.2 부분 곱 2: \mathbf{Trans}_z(d_i)\mathbf{Trans}_x(a_i)\mathbf{Rot}_x(\alpha_i)
위의 결과에 \mathbf{Rot}_x(\alpha_i)를 곱한다.
\begin{bmatrix} 1 & 0 & 0 & a_i \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}\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} 1 & 0 & 0 & a_i \\ 0 & \cos\alpha_i & -\sin\alpha_i & 0 \\ 0 & \sin\alpha_i & \cos\alpha_i & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}
4.3 부분 곱 3: 최종 합성
마지막으로 \mathbf{Rot}_z(\theta_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}\begin{bmatrix} 1 & 0 & 0 & a_i \\ 0 & \cos\alpha_i & -\sin\alpha_i & 0 \\ 0 & \sin\alpha_i & \cos\alpha_i & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}
원소별로 곱을 전개하면 다음의 결과를 얻는다.
{}^{i-1}\mathbf{T}_i = \begin{bmatrix} \cos\theta_i & -\sin\theta_i\cos\alpha_i & \sin\theta_i\sin\alpha_i & a_i\cos\theta_i \\ \sin\theta_i & \cos\theta_i\cos\alpha_i & -\cos\theta_i\sin\alpha_i & a_i\sin\theta_i \\ 0 & \sin\alpha_i & \cos\alpha_i & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}
이 행렬이 표준 DH 규약의 동차 변환 행렬이다.
5. 행렬 구조의 분석
5.1 회전 부분 (3 \times 3 좌상단)
\mathbf{R}_i = \begin{bmatrix} \cos\theta_i & -\sin\theta_i\cos\alpha_i & \sin\theta_i\sin\alpha_i \\ \sin\theta_i & \cos\theta_i\cos\alpha_i & -\cos\theta_i\sin\alpha_i \\ 0 & \sin\alpha_i & \cos\alpha_i \end{bmatrix}
이는 \mathbf{R}_z(\theta_i)\mathbf{R}_x(\alpha_i)의 곱과 같다. 즉, 회전 부분은 z축 회전과 x축 회전의 합성이다.
5.2 병진 부분 (3 \times 1 우상단)
\mathbf{t}_i = \begin{bmatrix}a_i\cos\theta_i \\ a_i\sin\theta_i \\ d_i\end{bmatrix}
병진 부분의 x, y 성분은 링크 길이 a_i가 회전된 방향(\theta_i)으로 표현된 것이고, z 성분은 링크 오프셋 d_i이다.
6. 행렬의 직접적 의미
DH 규약의 변환 행렬은 다음과 같이 분해해서 이해할 수 있다.
- 세 번째 열 (\sin\theta_i\sin\alpha_i, -\cos\theta_i\sin\alpha_i, \cos\alpha_i)^T: 좌표계 \{i\}의 z축 방향이 \{i-1\}에서 표현된 것
- 첫 번째 열 (\cos\theta_i, \sin\theta_i, 0)^T: 좌표계 \{i\}의 x축 방향이 \{i-1\}에서 표현된 것
- 두 번째 열: 위 두 열의 외적으로 결정되는 y축
병진 부분은 좌표계 \{i\}의 원점이 \{i-1\}에서 표현된 위치이다.
7. 정규 직교성 검증
회전 부분이 SO(3)에 속함을 확인한다.
7.1 첫 번째 열의 노름
\cos^2\theta_i + \sin^2\theta_i + 0 = 1 \checkmark
7.2 두 번째 열의 노름
\sin^2\theta_i\cos^2\alpha_i + \cos^2\theta_i\cos^2\alpha_i + \sin^2\alpha_i = \cos^2\alpha_i + \sin^2\alpha_i = 1 \checkmark
7.3 세 번째 열의 노름
\sin^2\theta_i\sin^2\alpha_i + \cos^2\theta_i\sin^2\alpha_i + \cos^2\alpha_i = \sin^2\alpha_i + \cos^2\alpha_i = 1 \checkmark
7.4 직교성
각 쌍의 열벡터가 직교함을 직접 확인할 수 있다. 예를 들어 첫 번째와 세 번째 열의 내적은
\cos\theta_i \cdot \sin\theta_i\sin\alpha_i + \sin\theta_i \cdot (-\cos\theta_i\sin\alpha_i) + 0 = 0 \checkmark
이다. 다른 쌍들도 마찬가지로 0이 된다.
7.5 행렬식
행렬식의 계산을 통해 \det(\mathbf{R}_i) = +1임을 확인할 수 있다. 결과적으로 \mathbf{R}_i \in SO(3)이며 {}^{i-1}\mathbf{T}_i \in SE(3)이다.
8. 특수한 경우의 행렬
8.1 \alpha_i = 0 (평행 축)
두 관절 축이 평행하면 \sin\alpha_i = 0, \cos\alpha_i = 1이고
{}^{i-1}\mathbf{T}_i = \begin{bmatrix} \cos\theta_i & -\sin\theta_i & 0 & a_i\cos\theta_i \\ \sin\theta_i & \cos\theta_i & 0 & a_i\sin\theta_i \\ 0 & 0 & 1 & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}
이 된다. 회전 부분이 단순한 z축 회전이다.
8.2 \alpha_i = \pm \pi/2 (수직 축)
두 관절 축이 직각을 이루면 \cos\alpha_i = 0, \sin\alpha_i = \pm 1이고
{}^{i-1}\mathbf{T}_i = \begin{bmatrix} \cos\theta_i & 0 & \pm\sin\theta_i & a_i\cos\theta_i \\ \sin\theta_i & 0 & \mp\cos\theta_i & a_i\sin\theta_i \\ 0 & \pm 1 & 0 & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}
이 된다.
8.3 a_i = 0, d_i = 0 (교차 축)
두 관절 축이 한 점에서 만나면 병진이 0이고 회전만 남는다.
{}^{i-1}\mathbf{T}_i = \begin{bmatrix} \mathbf{R}_z(\theta_i)\mathbf{R}_x(\alpha_i) & \mathbf{0} \\ \mathbf{0}^T & 1 \end{bmatrix}
이는 손목 관절과 같이 한 점에서 만나는 관절들의 변환에 적용된다.
9. 변환의 합성과 순기구학
매니퓰레이터 전체의 순기구학은 모든 링크의 DH 변환의 곱이다.
{}^0\mathbf{T}_n(\boldsymbol{\theta}) = \prod_{i=1}^n {}^{i-1}\mathbf{T}_i(\theta_i)
이는 베이스 좌표계에서 말단 장치 좌표계까지의 누적 변환이며, 관절 변수 \boldsymbol{\theta}의 함수로서 말단 장치의 자세와 위치를 결정한다.
10. 변형 DH의 차이
크레이그의 변형 DH(Modified DH) 규약에서는 4개의 기본 변환의 순서가 다르다.
{}^{i-1}\mathbf{T}_i^{\text{Modified}} = \mathbf{Rot}_x(\alpha_{i-1}) \cdot \mathbf{Trans}_x(a_{i-1}) \cdot \mathbf{Rot}_z(\theta_i) \cdot \mathbf{Trans}_z(d_i)
매개변수의 인덱싱과 곱의 순서가 표준 DH와 다르므로, 결과 행렬의 구체적 형태도 조금 다르다. 두 변형 사이의 차이는 9.55에서 자세히 다룬다.
11. 참고 문헌
- Denavit, J., & Hartenberg, R. S. (1955). “A Kinematic Notation for Lower-Pair Mechanisms Based on Matrices.” Journal of Applied Mechanics, 22, 215–221.
- Craig, J. J. (2018). Introduction to Robotics: Mechanics and Control (4th ed.). Pearson.
- Siciliano, B., Sciavicco, L., Villani, L., & Oriolo, G. (2009). Robotics: Modelling, Planning and Control. Springer.
- Spong, M. W., Hutchinson, S., & Vidyasagar, M. (2020). Robot Modeling and Control (2nd ed.). Wiley.
- Paul, R. P. (1981). Robot Manipulators: Mathematics, Programming, and Control. MIT Press.
version: 1.0