旋转矩阵的导数
证明
\quad
假设旋转矩阵为
R
(
θ
)
\mathbf{R}(\theta)
R(θ) ,旋转矩阵有
R
R
T
=
I
\mathbf{RR^T}=I
RRT=I ,即旋转矩阵是正交矩阵。现在
R
\mathbf{R}
R 对
θ
\mathbf{\theta}
θ 求导数:
[
d
d
θ
R
(
θ
)
]
R
(
θ
)
T
+
R
(
θ
)
[
d
d
θ
R
(
θ
)
T
]
=
0
\left[\frac{\mathrm{d}}{\mathrm{d} \theta} \mathrm{R}(\theta)\right] \mathrm{R}(\theta)^{\mathrm{T}}+\mathrm{R}(\theta)\left[\frac{\mathrm{d}}{\mathrm{d} \theta} \mathrm{R}(\theta)^{\mathrm{T}}\right]=0
[dθdR(θ)]R(θ)T+R(θ)[dθdR(θ)T]=0
\quad
令
S
=
[
d
d
θ
R
(
θ
)
]
R
(
θ
)
T
S=\left[\frac{\mathrm{d}}{\mathrm{d} \theta} \mathrm{R}(\theta)\right] \mathrm{R}(\theta)^{\mathrm{T}}
S=[dθdR(θ)]R(θ)T ,则:
S
+
S
T
=
0
\mathbf{S}+\mathbf{S^T}=0
S+ST=0
\quad
即:
S
=
−
S
T
\mathbf{S}=-\mathbf{S^T}
S=−ST
\quad
即
S
S
S 是一个反对陈矩阵。由
S
=
[
d
d
θ
R
(
θ
)
]
R
(
θ
)
T
S=\left[\frac{\mathrm{d}}{\mathrm{d} \theta} \mathrm{R}(\theta)\right] \mathrm{R}(\theta)^{\mathrm{T}}
S=[dθdR(θ)]R(θ)T 两边同时右乘
R
(
θ
)
\mathbf{R(\theta)}
R(θ),则:
d
d
θ
R
(
θ
)
=
S
R
(
θ
)
\frac{\mathrm{d}}{\mathrm{d} \theta} \mathrm{R}(\theta) =S\ \mathrm{R}(\theta)
dθdR(θ)=S R(θ)
\quad
此时,可以总结一下关于
R
R
R 的导数,对
R
R
R 求导相当于在原来的基础上右乘了个反对陈矩阵,而我们则关系这个反对陈矩阵的具体形式到底是什么。例如在 IMU 系统中对
R
R
R 求导后得到的是
d
d
θ
R
(
θ
)
=
S
(
w
)
R
(
θ
)
\frac{\mathrm{d}}{\mathrm{d} \theta} \mathrm{R}(\theta)=S(w)R(\theta)
dθdR(θ)=S(w)R(θ) ,即
w
w
w 的反对称矩阵乘以
R
R
R 。
\quad 下面以具体的例来进行说明:
\quad
例如,
R
R
R 为绕着
X
X
X 轴旋转的旋转矩阵,即:
R
(
θ
)
=
[
1
0
0
0
cos
θ
−
sin
θ
0
sin
θ
cos
θ
]
\begin{array}{c} \mathrm{R}(\theta)=\left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos \theta & -\sin \theta \\ 0 & \sin \theta & \cos \theta \end{array}\right] \\ \end{array}
R(θ)=⎣
⎡1000cosθsinθ0−sinθcosθ⎦
⎤
\quad 其中 R R R 是关于 θ \theta θ 的函数, R R R 对 θ \theta θ 的导数乘以 R T R^T RT 即得到 S S S
S = [ d d θ R ( θ ) ] R ( θ ) T = [ 0 0 0 0 − sin θ − cos θ 0 cos θ − sin θ ] ⋅ [ 1 0 0 0 cos θ sin θ 0 − sin θ cos θ ] = [ 0 0 0 0 0 − 1 0 1 0 ] \mathrm{S}=\left[\frac{\mathrm{d}}{\mathrm{d} \theta} \mathrm{R}(\theta)\right] \mathrm{R}(\theta)^{\mathrm{T}}=\left[\begin{array}{ccc} 0 & 0 & 0 \\ 0 & -\sin \theta & -\cos \theta \\ 0 & \cos \theta & -\sin \theta \end{array}\right] \cdot\left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos \theta & \sin \theta \\ 0 & -\sin \theta & \cos \theta \end{array}\right]=\left[\begin{array}{ccc} 0 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{array}\right] \\ S=[dθdR(θ)]R(θ)T=⎣ ⎡0000−sinθcosθ0−cosθ−sinθ⎦ ⎤⋅⎣ ⎡1000cosθ−sinθ0sinθcosθ⎦ ⎤=⎣ ⎡0000010−10⎦ ⎤
\quad
进而通过刚刚推倒出的导数的形式,可以得到绕着
X
X
X 轴旋转的旋转矩阵
R
R
R 的导数为:
d
d
θ
R
=
S
R
(
θ
)
=
[
0
0
0
0
0
−
1
0
1
0
]
⋅
[
1
0
0
0
cos
θ
−
sin
θ
0
sin
θ
cos
θ
]
=
[
0
0
0
0
−
sin
θ
−
cos
θ
0
cos
θ
−
sin
θ
]
\frac{\mathrm{d}}{\mathrm{d} \theta} \mathrm{R}=\mathrm{SR}(\theta)=\left[\begin{array}{ccc} 0 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{array}\right] \cdot\left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos \theta & -\sin \theta \\ 0 & \sin \theta & \cos \theta \end{array}\right]=\left[\begin{array}{ccc} 0 & 0 & 0 \\ 0 & -\sin \theta & -\cos \theta \\ 0 & \cos \theta & -\sin \theta \end{array}\right]
dθdR=SR(θ)=⎣
⎡0000010−10⎦
⎤⋅⎣
⎡1000cosθsinθ0−sinθcosθ⎦
⎤=⎣
⎡0000−sinθcosθ0−cosθ−sinθ⎦
⎤
\quad
进一步,如果
θ
\theta
θ 也是关于时间
t
t
t 的导数,即
θ
(
t
)
\theta (t)
θ(t) ,那么在之前的基础上,进一步可得:
R
˙
=
d
R
d
t
=
d
R
d
θ
d
θ
d
t
=
S
R
θ
˙
=
θ
˙
S
R
=
S
(
ω
(
t
)
)
R
\dot{\mathrm{R}}=\frac{\mathrm{dR}}{\mathrm{dt}}=\frac{\mathrm{dR}}{\mathrm{d} \theta} \frac{\mathrm{d} \theta}{\mathrm{dt}}=\mathrm{SR} \dot{\theta}=\dot{\theta} \mathrm{SR}=\mathrm{S}(\omega(\mathrm{t})) \mathrm{R}
R˙=dtdR=dθdRdtdθ=SRθ˙=θ˙SR=S(ω(t))R
\quad
其中
S
(
w
(
t
)
)
S(w(t))
S(w(t)) 为反对陈矩阵,
w
(
t
)
w(t)
w(t) 为角速度。
补充
-
反对陈矩阵
向量 a = ( a x , a y , a z ) T a=(a_x,a_y,a_z)^{T} a=(ax,ay,az)T 则其对应的反对陈矩阵为
S ( a ) = [ 0 − a z a y a z 0 − a x − a y a x 0 ] \begin{array}{c} \mathrm{S}(a)=\left[\begin{array}{ccc} 0 & -a_z & a_y \\ a_z & 0 & -a_x \\ -a_y & a_x & 0 \end{array}\right] \\ \end{array} S(a)=⎣ ⎡0az−ay−az0axay−ax0⎦ ⎤ -
性质
- S ( α a + β b ) = α S ( a ) + β S ( b ) \mathrm{S}(\alpha \mathrm{a}+\beta \mathrm{b})=\alpha \mathrm{S}(\mathrm{a})+\beta \mathrm{S}(\mathrm{b}) S(αa+βb)=αS(a)+βS(b)
- S ( a ) b = a × b \mathrm{S}(\mathrm{a}) \mathrm{b}=\mathrm{a} \times \mathrm{b} S(a)b=a×b
- R ( a × b ) = R ( a ) × R ( b ) R(a \times b)=R(a) \times R(b) R(a×b)=R(a)×R(b)
-
R
S
(
a
)
R
T
=
S
(
R
a
)
R S(a) R^{T}=S(R a)
RS(a)RT=S(Ra)
其中 R R R 是 3 3 3 阶矩阵, a a a 和 b b b 是向量, α \alpha α 和 β \beta β 是常数。