Lie Group & Lie Algebra

고영민·2022년 2월 23일
2

1. Group

군(group)이란 어떤 집합과 연산자로 이루어져 있으며, G=(,A)G=(\cdot, A)등과 같이 쓸 수 있고, 다음의 성질을 갖는다.

  • 닫힘성(Closure): a,bA,abA\forall a, b \in A, a \cdot b \in A
  • 결합성(Associativity): a,b,cA,(ab)c=a(bc)\forall a, b, c \in A, (a \cdot b) \cdot c = a \cdot (b \cdot c)
  • 항등성 (identity element): a0  s.t.  aA,a0a=aa0=a\exist a_0 \; s.t. \; \forall a \in A, a_0 \cdot a = a \cdot a_0 = a
  • 역(inverse): aA,a1  s.t.  aa1=a0\forall a \in A, \exist a^{-1} \; s.t. \; a \cdot a^{-1} = a_0

여러 종류의 군이 존재할 수 있지만, SLAM에서 관심있는 군은 이전글에서 소개되었던 회전행렬이 포함되는 SO군과 translation까지 포함된 SE군이다.

Lie 군은 위의 성질을 만족하는 것 중 일부 연속적인(매끄러운) 성질을 갖는 군이며, SOSO군과 SESE군 또한 Lie 군에 속한다. 특히 Lie 군은 manifold 성질을 갖는데, 이는 아주 좁은 지역적인 특성이 Euclidean의 성질을 갖는 것을 의미한다. 예를 들어, 공을 전체적으로 보면 둥글 모양을 하고 있지만, 아주 좁은 면에만 집중하면 그 부분은 거의 평면과 같기 때문에 Euclidean 성질을 만족한다. 로봇의 모션도 마찬가지이다. 로봇이 3D 환경에서 자유롭게 움직이면, 해당 모션은 SE군에 의해 기술된다. 하지만 아주 좁은 시간 간격을 보면 거의 선형적인 특성을 보인다.

2. 회전행렬에 대한 Lie Algebra

먼저 회전행렬로 이루어지는 SO(3)SO(3)군을 살펴보자. 회전행렬 R\mathbf{R}은 직교행렬이기 때문에 RRT=I\mathbf{R}\mathbf{R}^T=\mathbf{I}를 만족하며, R\mathbf{R}을 시간에 따라 변화하는 것으로 생각하면 다음과 같이 쓸 수 있다.

R(t)R(t)T=I\mathbf{R}(t)\mathbf{R}(t)^T=\mathbf{I}

위의 식을 시간 tt에 대해 미분하면 다음과 같다.

R˙(t)R(t)T+R(t)R˙(t)T=0R˙(t)R(t)T=R(t)R˙(t)T=(R˙(t)R(t)T)T\dot{\mathbf{R}}(t)\mathbf{R}(t)^T +\mathbf{R}(t)\dot{\mathbf{R}}(t)^T = 0 \\ \dot{\mathbf{R}}(t)\mathbf{R}(t)^T = -\mathbf{R}(t)\dot{\mathbf{R}}(t)^T =-(\dot{\mathbf{R}}(t)\mathbf{R}(t)^T)^T

R˙(t)R(t)T=(R˙(t)R(t)T)T\dot{\mathbf{R}}(t)\mathbf{R}(t)^T = -(\dot{\mathbf{R}}(t)\mathbf{R}(t)^T)^T에서 우리는 R˙(t)R(t)T\dot{\mathbf{R}}(t)\mathbf{R}(t)^Tskew-symmtric 행렬이라는 것을 알 수 있으며, a=R˙(t)R(t)T\mathbf{a}^\wedge=\dot{\mathbf{R}}(t)\mathbf{R}(t)^T를 만족하는 벡터 a\mathbf{a}를 찾을 수 있다. 여기에서 우리는 다음과 같은 식을 유도할 수 있다.

a=R˙(t)R(t)T            R˙(t)=aR(t)            R(t)R(t0)+R˙(t0)(tt0)=I+at\begin{aligned} \mathbf{a}^\wedge=\dot{\mathbf{R}}(t)\mathbf{R}(t)^T \;\;\; \rightarrow \;\;\; \dot{\mathbf{R}}(t)=\mathbf{a}^\wedge\mathbf{R}(t) \;\;\; \rightarrow \;\;\; \mathbf{R}(t) & \approx \mathbf{R}(t_0)+\dot{\mathbf{R}}(t_0)(t-t_0)\\ & = \mathbf{I} + \mathbf{a}^\wedge t \end{aligned}

이때 마지막 term에서는 t0=0t_0=0으로 두고 Taylor 전개를 사용하였으며, R(t0)=I\mathbf{R}(t_0)=\mathbf{I}이다. 여기서 a\mathbf{a}^\wedge가 짧은 시간 간격에서는 일정하다고 가정하면, 우리는 R(t)\mathbf{R}(t)가 지역적으로는 선형적인 특성을 가지고 있음을 알 수 있고, a\mathbf{a}^\wedgeR(t)\mathbf{R}(t)의 접평면(tangent plane)임을 알 수 있다. 여기서 a\mathbf{a}^\wedgeSO(3)SO(3)라는 Lie 군에 대응하는 Lie 대수(Lie algebra)라고 한다. 또한 a\mathbf{a}가 각속도에 대응한다는 것 또한 유추가 가능하다


Figure 1. Lie 군과 Lie 대수의 관계

위 그림은 Lie 군과 그 접평면에 해당하는 Lie 대수의 관계를 보여주며, 서로 exponential과 logarithm 매핑을 통해 변환될 수 있음을 그리고 있다. 예를 들어 위에서 도출된 R˙(t)=a^R(t)\dot{\mathbf{R}}(t)=\hat{\mathbf{a}}\mathbf{R}(t)은 일종의 미분 방정식으로 볼 수 있다. 해당 형태의 미분 방정식의 해는 exponential로 나타나며, 다음과 같다.

R(t)=ea^t\mathbf{R}(t)= e^{\hat{\mathbf{a}}t}

이것이 Lie 대수의 exponential 매핑이며, Lie 대수를 Lie 군으로 변환한다. 또한 양변에 로그를 취하면 Lie 군에서 Lie 대수로의 매핑을 구할 수 있으며, 이를 logarithm 매핑이라고 한다.

3. Lie Algebra의 특성

어떤 Lie 군에 대응되는 Lie algebra는 vector space V\mathcal{V}, 어떤 field F\mathcal{F}, Lie bracket이라고 불리는 이항연산자 [,][\cdot, \cdot]을 포함하고 있으며, 아래와 같은 특성을 갖는다.

  • Closure: [X,Y]V[\mathbf{X}, \mathbf{Y}] \in \mathcal{V}
  • Bilinearity: [aX+bY,Z]=a[X,Z]+b[Y,Z][a\mathbf{X}+b\mathbf{Y}, \mathbf{Z}]=a[\mathbf{X}, \mathbf{Z}]+b[\mathbf{Y}, \mathbf{Z}], [Z,aX+bY]=a[Z,X]+b[Z,Y][\mathbf{Z}, a\mathbf{X}+b\mathbf{Y}]=a[\mathbf{Z}, \mathbf{X}] +b[\mathbf{Z}, \mathbf{Y}]
  • Alternating: [X,X]=0[\mathbf{X}, \mathbf{X}]=0
  • Jacobi identity: [X,[Y,Z]]+[Y,[Z,X]]+[Z,[X,Y]]=0[\mathbf{X},[\mathbf{Y}, \mathbf{Z}]]+[\mathbf{Y},[\mathbf{Z},\mathbf{X}]]+[\mathbf{Z},[\mathbf{X}, \mathbf{Y}]]=0

Lie 군(SO(3),SE(3)SO(3), SE(3))은 그에 대응하는 Lie 대수(so(3),se(3)so(3), se(3))를 가지고 있으며, 각각은 다음과 같이 정의가 가능하다.

3.1. SO(3): Rotation

SO(3)SO(3)군에 대한 Lie 대수는 다음과 같이 정의할 수 있다.

  • Vector space: so(3)={Φ=ϕR3×3ϕR3}so(3)=\{ \mathbf{\Phi} = \mathbf{\phi}^\wedge \in \mathcal{R}^{3 \times 3} | \mathbf{\phi} \in \mathcal{R}^3 \}
  • Field: R\mathcal{R}
  • Lie bracket: [Φ1,Φ2]=Φ1Φ2Φ2Φ1[\mathbf{\Phi}_1, \mathbf{\Phi}_2] = \mathbf{\Phi}_1\mathbf{\Phi}_2-\mathbf{\Phi}_2\mathbf{\Phi}_1

여기서 ϕ\mathbf{\phi}^\wedge는 위에서 보았듯이 다음과 같은 skew-symmetric 행렬이다.

ϕ=(ϕ1ϕ2ϕ3)=(0ϕ3ϕ2ϕ30ϕ1ϕ2ϕ10)R3×3,    ϕR3\mathbf{\phi}^\wedge = \begin{pmatrix} \mathbf{\phi}_1 \\ \mathbf{\phi}_2 \\ \mathbf{\phi}_3 \end{pmatrix}^\wedge = \begin{pmatrix} 0 & -\mathbf{\phi}_3 & \mathbf{\phi}_2\\ \mathbf{\phi}_3 & 0 & \mathbf{\phi}_1 \\ -\mathbf{\phi}_2 & \mathbf{\phi}_1 & 0 \end{pmatrix} \in \mathcal{R}^{3 \times 3}, \;\; \mathbf{\phi} \in \mathcal{R}^{3}

Skew-symmetric의 성질을 이용하면 위의 정의가 Lie 특성 네 가지를 만족함을 알 수 있다. 예를 들어 closure는 다음과 같다.

[Φ1,Φ2]=Φ1Φ2Φ2Φ1=ϕ1ϕ2ϕ2ϕ1=(ϕ1ϕ2)so(3)[\mathbf{\Phi}_1, \mathbf{\Phi}_2] = \mathbf{\Phi}_1\mathbf{\Phi}_2-\mathbf{\Phi}_2\mathbf{\Phi}_1 = \mathbf{\phi}_1^\wedge\mathbf{\phi}_2^\wedge-\mathbf{\phi}_2^\wedge\mathbf{\phi}_1^\wedge=(\mathbf{\phi}_1^\wedge\mathbf{\phi}_2^\wedge)^\wedge \in so(3)

여기서 ϕ1ϕ2R3\mathbf{\phi}_1^\wedge\mathbf{\phi}_2^\wedge \in \mathcal{R}^3이며, 추가적으로 [Φ,Φ]=0[\mathbf{\Phi}, \mathbf{\Phi}]=0이다.

위에서도 보았듯이 ϕ\mathbf{\phi}는 각속도에 대응한다.

3.2. SE(3): Pose

SE(3)SE(3)군에 대한 Lie 대수도 위와 비슷하게 정의할 수 있다.

  • Vector space: se(3)={Ξ=ξR4×4ξR6}se(3)=\{ \mathbf{\Xi} = \mathbf{\xi}^\wedge \in \mathcal{R}^{4 \times 4} | \mathbf{\xi} \in \mathcal{R}^6 \}
  • Field: R\mathcal{R}
  • Lie bracket: [Ξ1,Ξ2]=Ξ1Ξ2Ξ2Ξ1[\mathbf{\Xi}_1, \mathbf{\Xi}_2] = \mathbf{\Xi}_1\mathbf{\Xi}_2-\mathbf{\Xi}_2\mathbf{\Xi}_1

ξ\mathbf{\xi}^\wedge는 다음과 같이 정의하며, 여기서는 ^\wedge연산자가 skew-symmetric 연산은 아니지만 SO(3)SO(3)와의 통일성을 위해 그대로 사용한다.

ξ=(ρϕ)=(ϕρ0T0)R4×4,    ρ,ϕR3\mathbf{\xi}^\wedge = \begin{pmatrix} \mathbf{\rho} \\ \mathbf{\phi} \end{pmatrix}^\wedge = \begin{pmatrix} \mathbf{\phi}^\wedge & \mathbf{\rho} \\ \mathbf{0}^T & 0 \end{pmatrix} \in \mathcal{R}^{4 \times 4}, \;\; \mathbf{\rho}, \mathbf{\phi} \in \mathcal{R}^{3}

여기서 ϕ\mathbf{\phi}^\wedge는 회전행렬 R\mathbf{R}에 해당하는 Lie 대수이며, ρ\mathbf{\rho}는 translation에 해당하고, ϕ\mathbf{\phi}를 twist라고 부르기도 한다.

ϕ\phi가 각속도에 대응하듯, ρ\rho 또한 선속도에 대응한다. SO(3)SO(3)에서와 비슷하게 TT1=I\mathbf{T}\mathbf{T}^{-1}=\mathbf{I}이고, 위처럼 T˙T1=ξ\dot\mathbf{T}\mathbf{T}^{-1}=\mathbf{\xi}^\wedge의 결과가 나온다. 이를 풀어쓰면 다음과 같다.

T˙T1=(R˙t˙00)(RTRTt01)=(R˙RTR˙RTt+t˙00)=(ϕρ0T0)R4×4\dot\mathbf{T}\mathbf{T}^{-1} = \begin{pmatrix} \dot\mathbf{R} & \dot\mathbf{t}\\ 0 & 0 \end{pmatrix} \begin{pmatrix} \mathbf{R}^T & -\mathbf{R}^T\mathbf{t}\\ 0 & 1 \end{pmatrix} = \begin{pmatrix} \dot\mathbf{R}\mathbf{R}^T & -\dot\mathbf{R}\mathbf{R}^T\mathbf{t} + \dot\mathbf{t}\\ 0 & 0 \end{pmatrix}= \begin{pmatrix} \mathbf{\phi}^\wedge & \mathbf{\rho} \\ \mathbf{0}^T & 0 \end{pmatrix} \in \mathcal{R}^{4 \times 4}

여기서 ρ=t˙R˙RTt=t˙+ϕ(t)\rho=\dot\mathbf{t}-\dot\mathbf{R}\mathbf{R}^T\mathbf{t}=\dot\mathbf{t}+\mathbf{\phi}^\wedge(-\mathbf{t})인데, 이는 translation 속도에 각속도로 인한 선속도를 합한 것이며, 최종적인 선속도가 된다.

4. 지수 및 로그 매핑

이제 Lie 군과 Lie 대수를 서로 변환하는 exponential(지수 매핑, Lie 대수에서 Lie 군), logarithm(로그 매핑, Lie 군에서 Lie 대수) 매핑을 알아보자.

여기서 사용될 지수와 로그에 대한 Taylor 전개는 다음과 같다.

exp(A)=I+A+12!A2+13!A3+=n=01n!Anexp(\mathbf{A}) = \mathbf{I} + \mathbf{A} + \frac{1}{2!}\mathbf{A}^2 + \frac{1}{3!}\mathbf{A}^3 + \cdots = \sum_{n=0}^{\infin}{\frac{1}{n!}\mathbf{A}^n}
ln(A)=n=1(1)n1n(A1)n\ln(\mathbf{A}) = \sum_{n=1}^{\infin}{\frac{(-1)^{n-1}}{n}(\mathbf{A}-1)^n}

4.1. SO(3): Rotation

SO(3)SO(3)군부터 시작하면, 위에서 보았듯이 지수 매핑을 통해 so(3)SO(3)so(3) \rightarrow SO(3)의 변환이 가능하다. 다만, 지수 매핑에서 자연상수 ee의 지수에 있는 항은 일반적인 스칼라 값이 아닌 행렬이므로 지수를 계산하기 위하여 Taylor 전개를 이용하게 된다.

Lie 대수 ϕ\mathbf{\phi}^{\wedge}에 대해서 ϕ=ϕa\mathbf{\phi}=|\mathbf{\phi}|\mathbf{a}인 단위 벡터 a\mathbf{a}를 찾을 수 있고, ϕ=ϕa\mathbf{\phi}^{\wedge}=|\mathbf{\phi}|\mathbf{a}^{\wedge}로 둘 수 있다. 이를 지수 매핑에 적용하여 Taylor 전개를 적용하면 다음과 같다.

exp(ϕ)=exp(ϕa)=IaaTaa+ϕa+12!ϕ2aa+13!ϕ3aaaa+14!ϕ3aaaaaa+=aaT+(ϕ13!ϕ3+15!ϕ5)sinϕa(112!ϕ2+14!ϕ4)cosϕaaI+aaT=cosϕI+(1cosϕ)aaT+sinϕa=C\begin{aligned} exp(\mathbf{\phi}^{\wedge}) & = exp(|\mathbf{\phi}|\mathbf{a}^{\wedge}) \\ & = \underbrace{\mathbf{I}}_{\mathbf{a}\mathbf{a}^T-\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}} + |\mathbf{\phi}|\mathbf{a}^{\wedge} + \frac{1}{2!}|\mathbf{\phi}|^2\mathbf{a}^{\wedge}\mathbf{a}^{\wedge} + \frac{1}{3!}|\mathbf{\phi}|^3\underbrace{\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}}_{-\mathbf{a}^{\wedge}} + \frac{1}{4!}|\mathbf{\phi}|^3\underbrace{\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}}_{-\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}} + \cdots \\ & = \mathbf{a}\mathbf{a}^T + \underbrace{\left( |\mathbf{\phi}| - \frac{1}{3!}|\mathbf{\phi}|^3 + \frac{1}{5!}|\mathbf{\phi}|^5 - \cdots \right)}_{\sin|\mathbf{\phi}|} \mathbf{a}^{\wedge} - \underbrace{\left( 1 - \frac{1}{2!}|\mathbf{\phi}|^2 + \frac{1}{4!}|\mathbf{\phi}|^4 - \cdots \right)}_{\cos|\mathbf{\phi}|} \underbrace{\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}}_{-\mathbf{I} + \mathbf{a}\mathbf{a}^T} \\ & = \cos|\mathbf{\phi}| \mathbf{I} + (1-\cos|\mathbf{\phi}|)\mathbf{a}\mathbf{a}^T + \sin|\mathbf{\phi}|\mathbf{a}^{\wedge} \\ & = \mathbf{C} \end{aligned}

Taylor 전개를 정리하는 과정에서 aa=I+aaT\mathbf{a}^{\wedge}\mathbf{a}^{\wedge} = -\mathbf{I} + \mathbf{a}\mathbf{a}^T, aaa=a\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}=-\mathbf{a}^{\wedge}의 관계가 사용되었으며, 3번째 줄에서 4번째 줄로 넘어가는 과정에서는 다음과 같은 삼각함수의 Taylor 전개가 사용되었다.

위의 결과식은 로드리게스 식과 일치하며, 즉, exp(ϕ)=exp(ϕa)exp(\mathbf{\phi}^{\wedge}) = exp(|\mathbf{\phi}|\mathbf{a}^{\wedge})a\mathbf{a}을 축으로 ϕ|\mathbf{\phi}| 만큼 회전하는 회전행렬과 같다. 따라서 Lie 대수 ϕ\mathbf{\phi}^{\wedge}를 지수함수를 통해 Lie 군인 SO(3)SO(3)에 속하는 회전행렬로 매핑할 수 있다.

추가적으로 회전행렬을 C\mathbf{C}이 주어졌을 때, 이에 대응하는 Lie 대수 ϕ\mathbf{\phi}^{\wedge}를 찾기 위하여 다음과 같은 로그 매핑을 수행해야 한다(^\vee연산은 ^\wedge의 역).

ϕ=ln(C)\mathbf{\phi} = \ln(\mathbf{C})^{\vee}

하지만 이전 글에서 회전행렬을 이용해 회전축과 각도를 구하는 방법을 유도하였기 때문에 굳이 지수 매핑처럼 Taylor 전개를 수행할 필요는 없다. 회전축 a\mathbf{a}는 회전행렬 C\mathbf{C}의 고유값 1에 대응하는 고유벡터임이며, 회전 각도는 다음과 같다.

ϕ=cos1(tr(C)12)+2πm|\mathbf{\phi}| = \cos^{-1}{\left( \frac{tr(\mathbf{C})-1}{2} \right)} + 2 \pi m
C=exp((ϕ+2πm)a)\mathbf{C} = exp((|\mathbf{\phi}|+2 \pi m)\mathbf{a}^\wedge)

뒤에 2πm2 \pi m이 추가된 이유는 360도 단위로 회전하면 다시 제자리로 돌아오기 때문이며, 이로부터 매핑들이 1대1 매핑은 아니라는 것을 알 수 있지만, 회전 각도를 00에서 2π2\pi로 제한하면 1대1 매핑이 된다.

이렇게 구한 회전 행렬은 SO(3)SO(3)군에 속하는데 Jacobi's formula(아래 식에서 2번째 term에서 3번째로 넘어갈 때 사용됨)를 이용하여 det(C)=det(exp(ϕ))=exp(tr(ϕ))=exp(0)=1det(\mathbf{C})=det(exp(\phi^\wedge))=exp(tr(\phi^\wedge))=exp(0)=1SO(3)SO(3)군의 성질을 만족함을 보일 수도 있다.

4.2. SE(3): Pose

Pose를 나타내는 SE(3)SE(3)에서도 비슷한 형태로 지수 매핑(se(3)SE(3)se(3) \rightarrow SE(3))과 로그 매핑(SE(3)se(3)SE(3) \rightarrow se(3))이 계산될 수 있다. 먼저, 지수 매핑의 경우 다음과 같다 (아래 식은 se(3)se(3)의 정의를 이용하여 전개해보면 알 수 있음).

exp(ξ)=n=01n!(ξ)n=n=01n!((ρϕ))n=n=01n!(ϕρ0T0)n=(n=01n!(ϕ)n(n=01(n+1)!(ϕ)n)ρ0T1)=(Cr0T1)SE(3)\begin{aligned} exp(\xi^\wedge) & = \sum_{n=0}^{\infin}{\frac{1}{n!}(\xi^\wedge)^n} \\ & = \sum_{n=0}^{\infin}{\frac{1}{n!}( \begin{pmatrix} \rho\\ \phi \end{pmatrix}^\wedge )^n} \\ & = \sum_{n=0}^{\infin}\frac{1}{n!} \begin{pmatrix} \phi^\wedge & \rho\\ \mathbf{0}^T & 0 \end{pmatrix}^n \\ & = \begin{pmatrix} \sum_{n=0}^{\infin}\frac{1}{n!}(\phi^\wedge)^n & (\sum_{n=0}^{\infin}\frac{1}{(n+1)!}(\phi^\wedge)^n)\rho\\ \mathbf{0}^T & 1 \end{pmatrix} \\ & = \begin{pmatrix} \mathbf{C} & \mathbf{r}\\ \mathbf{0}^T & 1 \end{pmatrix} \in SE(3) \end{aligned}

여기서 r,J\mathbf{r}, \mathbf{J}는 다음과 같다.

r=JρR,            J=n=01(n+1)!(ϕ)n\mathbf{r} = \mathbf{J}\rho \in \mathcal{R}, \;\;\;\;\;\; \mathbf{J}=\sum_{n=0}^{\infin}\frac{1}{(n+1)!}(\phi^\wedge)^n

앞에서 이미 Cϕ\mathbf{C} \leftrightarrow \phi^\wedge 사이의 변환 방법을 살펴보았기 때문에 여기서는 rρ\mathbf{r} \leftrightarrow \rho의 관계만 살펴보며, 위의 전개에서 r=Jρ\mathbf{r}=\mathbf{J}\rho(지수 매핑에 사용), ρ=J1r\rho=\mathbf{J}^{-1}\mathbf{r}(로그 매핑에 사용)의 관계가 있음을 알 수 있다.6

J\mathbf{J}를 더 자세히 전개해보면 다음과 같다.

J=n=01(n+1)!(ϕ)n=n=01(n+1)!(ϕa)n=I+12!ϕa+13!(ϕa)2+=I+1ϕ(12!ϕ214!ϕ4+)(a)+1ϕ(13!ϕ315!ϕ5+)(a)2=I+1ϕ(1cosϕ)(a)+1ϕ(ϕsinϕ)(aaT+I)=sinϕϕI+(1sinϕϕ)aaT+1cosϕϕa\begin{aligned} \mathbf{J} & = \sum_{n=0}^{\infin}\frac{1}{(n+1)!}(\phi^\wedge)^n = \sum_{n=0}^{\infin}\frac{1}{(n+1)!}(|\mathbf{\phi}|\mathbf{a}^{\wedge})^n \\ & = \mathbf{I} + \frac{1}{2!}|\mathbf{\phi}|\mathbf{a}^{\wedge} + \frac{1}{3!}(|\mathbf{\phi}|\mathbf{a}^{\wedge})^2 + \cdots \\ & = \mathbf{I} + \frac{1}{|\mathbf{\phi}|}\left(\frac{1}{2!}|\mathbf{\phi}|^2 -\frac{1}{4!}|\mathbf{\phi}|^4 + \cdots \right)(\mathbf{a}^{\wedge}) + \frac{1}{|\mathbf{\phi}|}\left(\frac{1}{3!}|\mathbf{\phi}|^3 -\frac{1}{5!}|\mathbf{\phi}|^5 + \cdots \right)(\mathbf{a}^{\wedge})^2 \\ & = \mathbf{I} + \frac{1}{|\mathbf{\phi}|}(1-\cos|\phi|)(\mathbf{a}^{\wedge}) + \frac{1}{|\mathbf{\phi}|}(|\phi|-\sin|\phi|)(\mathbf{a}\mathbf{a}^T + \mathbf{I}) \\ & = \frac{\sin|\phi|}{|\mathbf{\phi}|}\mathbf{I} + \left(1-\frac{\sin|\phi|}{|\mathbf{\phi}|} \right)\mathbf{a}\mathbf{a}^T+\frac{1-\cos|\phi|}{|\phi|}\mathbf{a}^\wedge \end{aligned}

위의 식은 로드리게스 식과 비슷하지만 일치하지는 않는 것에 주의해야한다. 위의 식을 이용하면 J1\mathbf{J}^{-1}를 다음과 같이 구할 수 있다.

J1=ϕ2cotϕ2I+(1ϕ2cotϕ2)aaTϕ2a\mathbf{J}^{-1} = \frac{|\phi|}{2}\cot\frac{|\phi|}{2}\mathbf{I} +\left( 1-\frac{|\phi|}{2}\cot\frac{|\phi|}{2} \right)\mathbf{a}\mathbf{a}^T -\frac{|\phi|}{2}\mathbf{a}^\wedge

추가적으로 J\mathbf{J}와 관련하여 유용한 몇 가지 식을 더 유도해보면 다음과 같다.

JJT=γI+(1γ)aaT\mathbf{J}\mathbf{J}^T = \gamma\mathbf{I}+(1-\gamma)\mathbf{a}\mathbf{a}^T
(JJT)1=1γI+(11γ)aaT(\mathbf{J}\mathbf{J}^T)^{-1} = \frac{1}{\gamma}\mathbf{I} + \left( 1- \frac{1}{\gamma} \right)\mathbf{a}\mathbf{a}^T
γ=21cosϕϕ2\gamma = 2\frac{1-\cos|\phi|}{|\phi|^2}

이때, JJT\mathbf{J}\mathbf{J}^T은 양의 정부호행렬이다. 우선 ϕ=0|\phi|=0일 경우에는 JJT=I\mathbf{J}\mathbf{J}^T=\mathbf{I}이 되어 양의 정부호행렬이 되고, ϕ0|\phi|\ne 0일 경우에는 다음과 같이 보일 수 있다.

xTJJTx=xT(γI+(1γ)aaT)x=xT(aaTγaa)x=xTaaTx+γ(ax)T(ax)=(aTx)T(aTx)0+21cosϕϕ2>0(ax)T(ax)0>0\begin{aligned} \mathbf{x}^T\mathbf{J}\mathbf{J}^T\mathbf{x} & = \mathbf{x}^T(\gamma\mathbf{I}+(1-\gamma)\mathbf{a}\mathbf{a}^T)\mathbf{x} \\ & = \mathbf{x}^T(\mathbf{a}\mathbf{a}^T-\gamma\mathbf{a}^\wedge\mathbf{a}^\wedge)\mathbf{x} \\ & = \mathbf{x}^T\mathbf{a}\mathbf{a}^T\mathbf{x} + \gamma(\mathbf{a}^\wedge\mathbf{x})^T(\mathbf{a}^\wedge\mathbf{x}) \\ & = \underbrace{(\mathbf{a}^T\mathbf{x})^T(\mathbf{a}^T\mathbf{x})}_{\ge0} +\underbrace{2\frac{1-\cos|\phi|}{\phi^2}}_{>0}\underbrace{(\mathbf{a}^\wedge\mathbf{x})^T(\mathbf{a}^\wedge\mathbf{x})}_{\ge0}>0 \end{aligned}

여기서 (aTx)T(aTx)(\mathbf{a}^T\mathbf{x})^T(\mathbf{a}^T\mathbf{x}) 형태의 term은 norm을 계산하는 식이므로 a,x\mathbf{a},\mathbf{x}가 수직일 경우에만 0이 된다.

그리고 J\mathbf{J}C\mathbf{C}사이에는 다음과 같은 관계가 존재한다.

J=01Cαdα=01exp(ϕ)αdα=01exp(αϕ)dα=01(n=01n!αn(ϕ)n)dα=n=01n!(01αndα)(ϕ)n=n=01(n+1)!(ϕ)n\begin{aligned} \mathbf{J} & = \int_{0}^{1}{\mathbf{C}^\alpha}d\alpha \\ & = \int_{0}^{1}{exp(\phi^\wedge)^\alpha}d\alpha = \int_{0}^{1}{exp(\alpha\phi^\wedge)}d\alpha \\ & = \int_{0}^{1}{\left( \sum_{n=0}^{\infin}{\frac{1}{n!}\alpha^n(\phi^\wedge)^n} \right) d\alpha} = \sum_{n=0}^{\infin}{\frac{1}{n!}}\left(\int_{0}^{1}{ \alpha^n d\alpha}\right)(\phi^\wedge)^n \\ & = \sum_{n=0}^{\infin}\frac{1}{(n+1)!}(\phi^\wedge)^n \end{aligned}
C=I+ϕJ\mathbf{C} = \mathbf{I} + \phi^\wedge\mathbf{J}

특히 여기서 사용된 J\mathbf{J}SO(3)SO(3)의 (left) Jacobian이라고 한다.


Figure 2. Lie 대수, se(3)se(3)에서 각 원소의 의미(translation과 rotation)

5. 미분

일반적인 스칼라 값에 대해서 지수 계산는 exp(a)exp(b)=exp(a+b)exp(a)exp(b)=exp(a+b)와 같이 계산된다. 하지만 Lie 대수의 지수매핑에서는 지수에 행렬이 사용되기 때문에 이러한 식이 성립하지 않는다. 그 대신 Baker-Campbll-Hausdorff(BCH) 식에 의해 다음과 같이 지수 계산을 수행 할 수 있다.

ln(exp(A)exp(B))=n=1(1)n1nri+si>0,  1ini=0n(ri+si)1Πi=1nri!si![Ar1Bs1ArnBsn]\ln(exp(\mathbf{A})exp(\mathbf{B})) = \sum_{n=1}^{\infin}\frac{(-1)^{n-1}}{n}\sum_{r_i+s_i \gt 0, \; 1\le i\le n} \frac{\sum^n_{i=0}(r_i+s_i)^{-1}}{\Pi^{n}_{i=1}r_i!s_i!}[\mathbf{A}^{r_1}\mathbf{B}^{s_1}\cdots \mathbf{A}^{r_n}\mathbf{B}^{s_n}]

위에서 사용된 [,][\cdot,\cdot]연산은 Lie bracket이다. 하지만 위의 식을 모두 계산하기는 매우 어렵기 때문에 보통 근사식을 사용하게 된다.

5.1. SO(3): Rotation

위의 BCH식을 이용하여 C1=exp(ϕ1),C2=exp(ϕ2)\mathbf{C_1}=exp(\phi_1^\wedge), \mathbf{C_2}=exp(\phi_2^\wedge)이라고 하면 다음과 같이 두 SO(3)SO(3)의 합성에 대한 식을 계산할 수 있다.

ln(C1C2)=ln(exp(ϕ1)exp(ϕ2)){Jl(ϕ2)1ϕ1+ϕ2                ϕ1이 작은 경우ϕ1+Jr(ϕ1)1ϕ2                ϕ2이 작은 경우\ln(\mathbf{C_1}\mathbf{C_2})^\vee = \ln(exp(\phi_1^\wedge)exp(\phi_2^\wedge))^\vee \approx \begin{cases} \mathbf{J}_l(\phi_2)^{-1}\phi_1 + \phi_2 \;\;\;\;\;\; \cdots \;\;\text{$\phi_1$이 작은 경우} \\ \phi_1 + \mathbf{J}_r(\phi_1)^{-1}\phi_2 \;\;\;\;\;\; \cdots \;\;\text{$\phi_2$이 작은 경우} \end{cases}

여기서 Jl\mathbf{J}_l는 SO(3)에 대한 left Jacobian, Jr\mathbf{J}_r는 right Jacobian이라고 한다. 첫번째 경우를 예를 들면, C2\mathbf{C_2}에 아주 작은 회전 C1\mathbf{C_1}이 추가되었을 경우 그에 해당하는 Lie 대수는 Jl(ϕ2)ϕ1+ϕ2\mathbf{J}_l(\phi_2)\phi_1 + \phi_2로 주어지며 C2\mathbf{C_2}에 대응하는 Lie 대수 ϕ2\phi_2Jl(ϕ2)ϕ1\mathbf{J}_l(\phi_2)\phi_1가 곱해진 경우이다(미소 변화에 미분값(Jacobian)이 곱해진 형태). Jl\mathbf{J}_l와 그 역행렬은 위에서 구하였으며, Jr(ϕ)=Jl(ϕ)\mathbf{J}_r(\phi)=\mathbf{J}_l(-\phi), Jl(ϕ)=CJr(ϕ)\mathbf{J}_l(\phi)=\mathbf{C}\mathbf{J}_r(\phi)의 관계가 있다(C=exp(ϕ)\mathbf{C}=exp(\phi^\wedge)).

케이스가 두 가지로 구분되므로, 미소 변화가 왼쪽에 곱해지는지, 오른쪽에 곱해지는지 구분하여 사용하여야 한다. 최적화 등의 문제를 Lie 대수를 통해 해결할 경우 Lie 대수에 직접 미소 변화가 더해지거나, 아니면 Lie 군에서 미소 변화가 곱해지는 경우가 있다(SO(3)SO(3)를 보면 덧셈에 대해 닫혀있지 않아 미소 변화를 적용하려면 곱해야 함). 왼쪽 경우만 살펴보면 다음과 같다.

exp(Δϕ)exp(ϕ)=exp(Jl(ϕ)1Δϕ+ϕ)exp(\Delta\phi^\wedge)exp(\phi^\wedge) = exp(\mathbf{J}_l(\phi)^{-1}\Delta\phi + \phi)
exp((ϕ+Δϕ))=exp((Jl(ϕ)1Δϕ))exp(ϕ)=exp(ϕ)exp((Jr(ϕ)1Δϕ))exp((\phi+\Delta\phi)^\wedge) = exp((\mathbf{J}_l(\phi)^{-1}\Delta\phi)^\wedge)exp(\phi^\wedge) = exp(\phi^\wedge)exp((\mathbf{J}_r(\phi)^{-1}\Delta\phi)^\wedge)

이제 위의 결과를 이용하여 SO(3)SO(3)에 대한 미분을 so(3)so(3)를 이용하여 수행해보자. 이러한 미분은 Gauss_Newton과 같은 gradient descent 기반 최적화 등에 사용될 수 있다. 가장 먼저 떠올릴 수 있는 방법은 다음과 같이 회전하는 점 Cv\mathbf{C}\mathbf{v}에 대해 ϕ\phi로 직접 미분하는 방법이다(l\mathbf{l}ϕ\phi에 대한 미소 변화의 방향).

Cvϕ=limh0exp((ϕ+hl))vexp(ϕ)vhlimh0exp((Jhl))exp(ϕ)vexp(ϕ)vh                    BHC근사limh0(I+h(Jl))exp(ϕ)vexp(ϕ)vh                    Taylor전개=(Jl)exp(ϕ)v=(Jl)Cv=(Cv)J\begin{aligned} \frac{\partial \mathbf{C}\mathbf{v}}{\partial \phi} & = \lim_{h \rightarrow 0}{\frac{exp((\phi+h\mathbf{l})^\wedge)\mathbf{v}-exp(\phi^\wedge)\mathbf{v}}{h}} \\ & \approx \lim_{h \rightarrow 0}{\frac{exp((\mathbf{J}h\mathbf{l})^\wedge)exp(\phi^\wedge)\mathbf{v}-exp(\phi^\wedge)\mathbf{v}}{h}} \;\;\;\;\;\;\;\; \cdots \;\;BHC근사 \\ & \approx \lim_{h \rightarrow 0}{\frac{(\mathbf{I}+h(\mathbf{J}\mathbf{l})^\wedge)exp(\phi^\wedge)\mathbf{v}-exp(\phi^\wedge)\mathbf{v}}{h}} \;\;\;\;\;\;\;\; \cdots \;\;Taylor 전개 \\ & = (\mathbf{J}\mathbf{l})^\wedge exp(\phi^\wedge)\mathbf{v} \\ & = (\mathbf{J}\mathbf{l})^\wedge \mathbf{C}\mathbf{v} \\ & = -(\mathbf{C}\mathbf{v})^\wedge\mathbf{J} \end{aligned}

만약 Cv\mathbf{C}\mathbf{v}가 어떤 scalar 함수(error 함수 등) 안에 있다면 다음과 같이 미분이 계산될 수 있다. 만약 그 함수가 u(x)u(\mathbf{x})이고, x=Cv\mathbf{x}=\mathbf{C}\mathbf{v}라면 다음과 같다.

uϕ=uxxϕ=ux(Cv)J\frac{\partial u}{\partial \phi} = \frac{\partial u}{\partial \mathbf{x}} \frac{\partial \mathbf{x}}{\partial \phi} = -\frac{\partial u}{\partial \mathbf{x}}(\mathbf{C}\mathbf{v})^\wedge\mathbf{J}

Gradient descent 기반 최적화에서 linearization한 지점이 Cop=exp(ϕop)\mathbf{C}_{op}=exp(\phi_{op}^\wedge)라고 하면 다음과 같이 최적화를 진행할 수 있다.

ϕ=ϕopαJT(Copv)ux\phi = \phi_{op}-\alpha \mathbf{J}^T (\mathbf{C}_{op}\mathbf{v})^\wedge \frac{\partial u}{\partial \mathbf{x}}

하지만 여기서 Jacobian J\mathbf{J}는 복잡한 형태를 가지고 있기 때문에 계산이나 구현 등이 어려워질 수 있다.

이러한 문제를 해결하는 방법으로, 미소 회전 ΔC=exp(ψ)\Delta \mathbf{C}=exp(\psi^\wedge)로 두고 ψ\psi에 대해 미분하는 섭동 모델 방법이 있다(왼쪽에 미소 회전을 곱하는 경우).

Cvψ=limψ0exp(ψ)exp(ϕ)vexp(ϕ)vψlimψ0(Iψ)exp(ϕ)vexp(ϕ)vψ=limψ0ψCψψ=limψ0(Cψ)ψψ=(Cψ)\begin{aligned} \frac{\partial \mathbf{C}\mathbf{v}}{\partial \psi} & = \lim_{\psi \rightarrow 0}{\frac{exp(\psi^\wedge)exp(\phi^\wedge)\mathbf{v}-exp(\phi^\wedge)\mathbf{v}}{\psi}} \\ & \approx \lim_{\psi \rightarrow 0}{\frac{(\mathbf{I}-\psi^\wedge)exp(\phi^\wedge)\mathbf{v}-exp(\phi^\wedge)\mathbf{v}}{\psi}} \\ & = \lim_{\psi \rightarrow 0}{\frac{\psi^\wedge \mathbf{C} \psi}{\psi}} \\ & = \lim_{\psi \rightarrow 0}{\frac{-(\mathbf{C} \psi)^\wedge \psi}{\psi}} \\ & = -(\mathbf{C} \psi)^\wedge \end{aligned}

위의 결과에서는 J\mathbf{J}가 나오지 않아 더 간단하게 계산이 가능하다.

Scalar 함수(error 함수 등)를 가정했을때, 최적화의 대상이 되는 cost function은 다음과 같다(가장 많이 사용되는 최소제곱문제의 형태).

J(C)=12m(um(Cvm))2J(\mathbf{C}) = \frac{1}{2}\sum_{m}{(u_m(\mathbf{C}\mathbf{v_m}))^2}

위의 cost function은 여러개의 scalar 함수가 합쳐진 최소제곱문제 형태이다. Cop\mathbf{C}_{op}를 선형화 지점에서의 회전행렬, 미소 회전행렬을 왼쪽에 곱하는 섭동모델을 C=exp(ψ)Cop\mathbf{C} = exp(\psi^\wedge)\mathbf{C}_{op}라고 했을 때, 각 scalar 함수는 다음과 같이 쓸 수 있다.

um(Cvm)=um(exp(ψ)Copvm)um((1+ψ)Copvm)um(Copvm)umx(Copvm)ψ=βm+δmTψ\begin{aligned} u_m(\mathbf{C}\mathbf{v_m}) & = u_m(exp(\psi^\wedge)\mathbf{C}_{op}\mathbf{v_m}) \approx u_m((1+\psi^\wedge)\mathbf{C}_{op}\mathbf{v_m})\\ & \approx u_m(\mathbf{C}_{op}\mathbf{v_m}) - \frac{\partial u_m}{\partial \mathbf{x}}(\mathbf{C}_{op}\mathbf{v_m})^\wedge\psi\\ & = \beta_m + \delta_m^T\psi \end{aligned}
J(C)12m(βm+δmTψ)2J(\mathbf{C}) \approx \frac{1}{2}\sum_{m}{(\beta_m + \delta_m^T\psi)^2}

이제 JJψ\psi에 대한 식으로 표현되었으며, 다음과 같이 쉽게 미분이 가능하다.

JψT=mδm(βm+δmTψ)\frac{\partial J}{\partial \psi^T}=\sum_{m}{\delta_m(\beta_m + \delta_m^T\psi)}

JJ가 최소가 되기 위하여 위의 미분값이 0이 되어야 하므로, 다음과 같다.

(mδmδmT)ψ=mβmδm(\sum_m{\delta_m \delta_m^T})\psi^* = - \sum_m \beta_m \delta_m

위의 식은 최적의 값인 ψ\psi^*에 대한 선형 방정식이므로 쉽게 해결이 가능하며, 이를 이용하여 다음과 같이 업데이트가 가능하다.

Copexp((ψ))Cop\mathbf{C}_{op} \leftarrow exp((\psi^*)^\wedge)\mathbf{C}_{op}

5.2. SE(3): Pose

SE(3)SE(3)의 경우에도 비슷한 형태를 갖는다. T1=exp(ξ1),T2=exp(ξ2)\mathbf{T_1}=exp(\xi_1^\wedge), \mathbf{T_2}=exp(\xi_2^\wedge)이라고 하면 다음과 같다.

ln(T1T2)=ln(exp(ξ1)exp(ξ2)){Jl(ξ2)1ξ1+ξ2                ξ1이 작은 경우ξ1+Jr(ξ1)1ξ2                ξ2이 작은 경우\ln(\mathbf{T_1}\mathbf{T_2})^\vee = \ln(exp(\xi_1^\wedge)exp(\xi_2^\wedge))^\vee \approx \begin{cases} \mathbf{\mathcal{J}}_l(\xi_2)^{-1}\xi_1 + \xi_2 \;\;\;\;\;\; \cdots \;\;\text{$\xi_1$이 작은 경우} \\ \xi_1 + \mathbf{\mathcal{J}}_r(\xi_1)^{-1}\xi_2 \;\;\;\;\;\; \cdots \;\;\text{$\xi_2$이 작은 경우} \end{cases}

여기서 각 Jacobian은 다음과 같이 정의된다.

Jl(ξ)=n=01(n+1)!(ξ)n=01Tαdα=(JlQl0Jl)\mathbf{\mathcal{J}}_l(\xi) = \sum^{\infin}_{n=0}{\frac{1}{(n+1)!}(\xi^\barwedge)^n} = \int_0^1\mathcal{T}^{-\alpha}d\alpha= \begin{pmatrix} \mathbf{J}_l & \mathbf{Q}_l \\ \mathbf{0} & \mathbf{J}_l \end{pmatrix}
Jr(ξ)=n=01(n+1)!(ξ)n=01Tαdα=(JrQr0Jr)\mathbf{\mathcal{J}}_r(\xi) = \sum^{\infin}_{n=0}{\frac{1}{(n+1)!}(-\xi^\barwedge)^n} = \int_0^1\mathcal{T}^{\alpha}d\alpha= \begin{pmatrix} \mathbf{J}_r & \mathbf{Q}_r \\ \mathbf{0} & \mathbf{J}_r \end{pmatrix}
Ql(ξ)=n=0m=01(n+m+2)!(ϕ)nρ(ϕ)m=12ϕ+(ϕsinϕϕ3)(ϕρ+ρϕ+ϕρϕ)+(ϕ22cosϕ22ϕ4)(ϕϕρ+ρϕϕ+3ϕρϕ)+(2ϕ3sinϕϕcosϕ2ϕ5)(ϕρϕϕ+ϕϕρϕ)\begin{aligned} \mathbf{Q}_l(\xi) & = \sum^{\infin}_{n=0}{\sum^{\infin}_{m=0}{\frac{1}{(n+m+2)!}(\phi^\wedge)^n\rho^\wedge(\phi^\wedge)^m}} \\ & = \frac{1}{2}\phi^\wedge + \left( \frac{\phi -\sin\phi}{\phi^3} \right)(\phi^\wedge\rho^\wedge+\rho^\wedge\phi^\wedge+\phi^\wedge\rho^\wedge\phi^\wedge)\\ & + \left( \frac{\phi^2 -2\cos\phi-2}{2\phi^4} \right)(\phi^\wedge\phi^\wedge\rho^\wedge+\rho^\wedge\phi^\wedge\phi^\wedge+3\phi^\wedge\rho^\wedge\phi^\wedge)\\ & +\left( \frac{2\phi -3\sin\phi-\phi\cos\phi}{2\phi^5} \right)(\phi^\wedge\rho^\wedge\phi^\wedge\phi^\wedge+\phi^\wedge\phi^\wedge\rho^\wedge\phi^\wedge) \end{aligned}
Qr(ξ)=Ql(ξ)\mathbf{Q}_r(\xi) = \mathbf{Q}_l(-\xi)
ξ=(ρϕ)=(ϕρ0ϕ)R6×6\xi^\barwedge = \begin{pmatrix} \rho \\ \phi \end{pmatrix}^\barwedge = \begin{pmatrix} \phi^\wedge & \rho^\wedge\\ \mathbf{0} & \phi^\wedge \end{pmatrix} \in \mathcal{R}^{6 \times 6}
T=exp(ξ)=n=01n!(ξ)n\mathbf{\mathcal{T}}=exp(\xi^\barwedge)=\sum^{\infin}_{n=0}{\frac{1}{n!}(\xi^\barwedge)^n}
T=Ad(T)=Ad((Cr0T1))=(CrC0TC)\mathbf{\mathcal{T}}=Ad(\mathbf{T})=Ad \left( \begin{pmatrix} \mathbf{C} & \mathbf{r} \\ \mathbf{0}^T & 1 \end{pmatrix} \right) = \begin{pmatrix} \mathbf{C} & \mathbf{r}^\wedge \mathbf{C} \\ \mathbf{0}^T & \mathbf{C} \end{pmatrix}

이때, T\mathbf{\mathcal{T}}SE(3)SE(3)의 adjoint라고 하며, 이 또한 Lie 군의 성질을 만족하고, T\mathbf{\mathcal{T}}에 대응하는 Lie 대수는 ξ\xi^\barwedge이다.

이때, SO(3)SO(3)와 비슷하게 Jr(ξ)=Jl(ξ)\mathbf{\mathcal{J}}_r(\xi)=\mathbf{\mathcal{J}}_l(-\xi), Jl(ξ)=TJr(ξ)\mathbf{\mathcal{J}}_l(\xi)=\mathbf{\mathcal{T}}\mathbf{\mathcal{J}}_r(\xi)의 관계가 있으며, 미소 변화 적용 식 역시 같은 형태를 가지고 있다.

SE(3)SE(3)군에서도 비슷한 방법으로 미분이 가능하다. 먼저 ^\odot연산을 다음과 같이 정의한다.

ξ=(ϵη)=(ηIϵ0T0T)\xi = \begin{pmatrix} \epsilon \\ \eta \end{pmatrix}^\odot = \begin{pmatrix} \eta\mathbf{I} & -\epsilon^\wedge \\ \mathbf{0}^T & \mathbf{0}^T \end{pmatrix}

^\odot연산은 ξp=pξ\xi^\wedge\mathbf{p}=\mathbf{p}^\odot\xi, (Tp)=TpT1(\mathbf{T}\mathbf{p})^\odot=\mathbf{T}\mathbf{p}^\odot\mathcal{T}^{-1} 등의 성질을 만족한다.

^\odot연산을 사용하면 SE(3)SE(3)군에서의 미분을 다음과 같이 정의할 수 있다(바로 Lie 대수 ξ\xi로 미분하는 경우와 왼쪽 섭동에 대한 Lie 대수 ϵ\epsilon으로 미분하는 경우).

(Tp)ξ=(Tp)J\frac{\partial (\mathbf{T}\mathbf{p})}{\xi}=(\mathbf{T}\mathbf{p})^\odot\mathbf{\mathcal{J}}
(Tp)ϵ=(Tp)\frac{\partial (\mathbf{T}\mathbf{p})}{\epsilon}=(\mathbf{T}\mathbf{p})^\odot

Jacobian이 포함되지 않은 섭동 식으로 cost 함수를 미분해보면 다음과 같다.

J(T)=12m(um(Tpm))2J(\mathbf{T}) = \frac{1}{2}\sum_{m}{(u_m(\mathbf{T}\mathbf{p_m}))^2}
um(Tpm)=um(exp(ϵ)Toppm)um((1+ϵ)Toppm)um(Toppm)umxx=Toppm(Toppm)ϵ=βm+δmTϵ\begin{aligned} u_m(\mathbf{T}\mathbf{p_m}) & = u_m(exp(\epsilon^\wedge)\mathbf{T}_{op}\mathbf{p_m}) \approx u_m((1+\epsilon^\wedge)\mathbf{T}_{op}\mathbf{p_m})\\ & \approx u_m(\mathbf{T}_{op}\mathbf{p_m}) - \left. \frac{\partial u_m}{\partial \mathbf{x}}\right|_{\mathbf{x}=\mathbf{T}_{op}\mathbf{p_m}} (\mathbf{T}_{op}\mathbf{p_m})^\wedge\epsilon\\ & = \beta_m + \delta_m^T\epsilon \end{aligned}
J(C)12m(βm+δmTϵ)2J(\mathbf{C}) \approx \frac{1}{2}\sum_{m}{(\beta_m + \delta_m^T\epsilon)^2}
JϵT=mδm(βm+δmTϵ)\frac{\partial J}{\partial \epsilon^T}=\sum_{m}{\delta_m(\beta_m + \delta_m^T\epsilon)}

여기서 최적의 ϵ\epsilon에서 cost 함수의 미분이 0이 되어야 한다.

(mδmδmT)ϵ=mβmδm(\sum_m{\delta_m \delta_m^T})\epsilon^* = - \sum_m \beta_m \delta_m
Topexp((ϵ))Top\mathbf{T}_{op} \leftarrow exp((\epsilon^*)^\wedge)\mathbf{T}_{op}

여기서 우리는 Lie 대수를 최적화 등에 사용할 때의 장점을 알 수 있다. 많이 사용되는 Gauss-Newton 기반의 최적화를 살펴보면 미소 변화를 더하며 업데이트를 수행하고 그 과정을 반복하여 최적화를 진행한다. 하지만 SO(3),SE(3)SO(3), SE(3)등은 더하기에 닫혀있지 않으며, 여러 제약조건을 가지고 있다(정규 직교, 행렬식이 1 등). 이에 비해 Lie 대수는 더하기에 대해 닫혀있으며, 그 수치에 대한 제약조건이 없다(지수 매핑을 통해 언제나 제약조건을 만족하는 Lie 군으로 매핑할 수 있음).

0개의 댓글

관련 채용 정보