当前位置:网站首页>Basic theory of four elements and its application
Basic theory of four elements and its application
2022-06-30 07:33:00 【RobotLife】
In the reading 《Indirect Kalman Filter for 3D Attitude Estimation》 One article , It is found that the definition of four elements in this paper adopts Not Hamilton The way , There are some conflicts in reading , It's hard to convert , thus , Decide to convert this article to Hamilton The form of expression .
1 Four element definition :
q = q w + q x i + q y j + q z k ( 1 ) \bm{q} = q_w + q_x \bm{i} + q_y\bm{j} + q_z\bm{k} \qquad (1) q=qw+qxi+qyj+qzk(1)
among , An imaginary unit : i \bm{i} i, j \bm{j} j, k \bm{k} k Satisfy the following relationship :
i 2 = j 2 = k 2 = i j k = − 1 ( 2 ) \bm{i}^2 = \bm{j}^2 = \bm{k}^2 = \bm{ijk} = -1\qquad(2) i2=j2=k2=ijk=−1(2)
thus :
i j = − j i = k , j k = − k j = i , k i = − i k = j ( 3 ) \bm{ij} = -\bm{ji} = \bm{k},\quad \bm{jk} = -\bm{kj} = \bm{i}, \quad \bm{ki} = -\bm{ik} = \bm{j} \qquad (3) ij=−ji=k,jk=−kj=i,ki=−ik=j(3)
Besides , Quaternions can also be expressed in the form shown in the following formula :
Constant + Vector form :
q = q w + q v ( 4 ) \bm{q} = q_w + \bm{q}_v \qquad(4) q=qw+qv(4)
among : q v = q x i + q y j + q z k \bm{q}_v = q_x \bm{i} + q_y\bm{j} + q_z\bm{k} qv=qxi+qyj+qzk
Vector form
q = [ q w q v ] = [ q w q x q y q z ] ( 5 ) \bm{q} = \begin{bmatrix} q_w\\ \bm{q}_v \end{bmatrix} = \begin{bmatrix}q_w\\ q_x \\ q_y \\ q_z \end{bmatrix} \qquad(5) q=[qwqv]=⎣⎢⎢⎡qwqxqyqz⎦⎥⎥⎤(5)
2 The main properties of the four elements
2.1 Addition operation
q 1 ± q 2 = [ q w 1 q v 1 ] ± [ q w 2 q v 2 ] = [ q w 1 ± q w 2 q v 1 ± q v 2 ] ( 6 ) \bm{q}_1 \pm \bm{q}_2 = \begin{bmatrix}q_{w1} \\ \bm{q}_{v1} \end{bmatrix} \pm \begin{bmatrix}q_{w2} \\ \bm{q}_{v2} \end{bmatrix} = \begin{bmatrix}q_{w1} \pm q_{w2} \\ \bm{q}_{v1} \pm \bm{q}_{v2} \end{bmatrix} \qquad (6) q1±q2=[qw1qv1]±[qw2qv2]=[qw1±qw2qv1±qv2](6)
Addition operation satisfies commutative law and associative law :
q 1 + q 2 = q 2 + q 1 ( 7 ) \bm{q}_1 + \bm{q}_2 = \bm{q}_2 + \bm{q}_1 \qquad (7) q1+q2=q2+q1(7)
q 1 + ( q 2 + q 3 ) = ( q 1 + q 2 ) + q 3 ( 8 ) \bm{q}_1 + (\bm{q}_2 + \bm{q}_3) = (\bm{q}_1 + \bm{q}_2) + \bm{q}_3 \qquad(8) q1+(q2+q3)=(q1+q2)+q3(8)
2.2 Multiply the number of four elements by
k q = [ k q w k q v ] = [ k q w k q x k q y k q z ] ( 9 ) k\bm{q} = \begin{bmatrix} kq_w \\ k\bm{q}_v \end{bmatrix} = \begin{bmatrix} kq_w\\ kq_x\\ kq_y\\ kq_z \end{bmatrix} \qquad (9) kq=[kqwkqv]=⎣⎢⎢⎡kqwkqxkqykqz⎦⎥⎥⎤(9)
2.3 Dot product of four elements
Point multiplication refers to the multiplication and summation of the values at each corresponding position of two four elements , namely :
q ⋅ p = q w p w + q x p x + q y p y + q z p z ( 10 ) \bm{q} \cdot \bm{p} = q_w p_w + q_xp_x + q_yp_y + q_zp_z \qquad(10) q⋅p=qwpw+qxpx+qypy+qzpz(10)
2.4 Multiplication ⊗ \otimes ⊗
p ⊗ q = [ p w q w − p x q x − p y q y − p z q z p w q x + p x q w + p y q z − p z q y p w q y − p x q z + p y q w + p z q x p w q z + p x q y − p y q x + p z q w ] = [ p w q w − p v ⊤ q v p w q v + q w p v + p v × q v ] ( 11 ) \bm{p} \otimes \bm{q} = \begin{bmatrix} p_w q_w - p_x q_x - p_y q_y - p_z q_z \\ p_w q_x + p_x q_w + p_y q_z - p_z q_y \\ p_w q_y - p_x q_z + p_y q_w + p_z q_x \\ p_w q_z + p_xq_y - p_y q_x + p_z q_w \end{bmatrix} = \begin{bmatrix} p_w q_w - \bm{p}_v ^\top \bm{q}_v\\ p_w \bm{q}_v + q_w \bm{p}_v + \bm{p}_v \times\bm{q}_v \end{bmatrix} \quad (11) p⊗q=⎣⎢⎢⎡pwqw−pxqx−pyqy−pzqzpwqx+pxqw+pyqz−pzqypwqy−pxqz+pyqw+pzqxpwqz+pxqy−pyqx+pzqw⎦⎥⎥⎤=[pwqw−pv⊤qvpwqv+qwpv+pv×qv](11)
because (11) The formula contains a cross product term , Therefore, the four element multiplication does not satisfy the commutative law , namely :
p ⊗ q ≠ q ⊗ p ( 12 ) \bm{p} \otimes \bm{q} \neq \bm{q} \otimes \bm{p} \qquad (12) p⊗q=q⊗p(12)
exception : When p v × q v = 0 \bm{p}_v \times \bm{q}_v = 0 pv×qv=0 when , The commutative law is satisfied when the cross product term is zero , here , p v = 0 \bm{p}_v=0 pv=0 or q v = 0 \bm{q}_v=0 qv=0 or p v ∣ ∣ q v \bm{p}_v||\bm{q}_v pv∣∣qv( That is, two vectors are parallel ).
Associative law :
( q 1 ⊗ q 2 ) ⊗ q 3 = q 1 ⊗ ( q 2 ⊗ q 3 ) ( 13 ) (\bm{q}_1 \otimes \bm{q}_2) \otimes \bm{q}_3 = \bm{q}_1 \otimes (\bm{q}_2 \otimes \bm{q}_3) \qquad(13) (q1⊗q2)⊗q3=q1⊗(q2⊗q3)(13)
Distributive law :
q 1 ⊗ ( q 2 + q 3 ) = q 1 ⊗ q 2 + q 1 ⊗ q 3 ( 14 ) \bm{q}_1 \otimes (\bm{q}_2 + \bm{q}_3) = \bm{q}_1 \otimes \bm{q}_2 + \bm{q}_1 \otimes \bm{q}_3 \qquad(14) q1⊗(q2+q3)=q1⊗q2+q1⊗q3(14)
( q 1 + q 2 ) ⊗ q 3 = q 1 ⊗ q 3 + q 2 ⊗ q 3 ( 15 ) (\bm{q}_1 + \bm{q}_2) \otimes \bm{q}_3 = \bm{q}_1 \otimes \bm{q}_3 + \bm{q}_2 \otimes \bm{q}_3 \qquad(15) (q1+q2)⊗q3=q1⊗q3+q2⊗q3(15)
Matrix multiplication form :
according to (11) type , Extract the corresponding four element vector , You can get :
q 1 ⊗ q 2 = [ q 1 ] L q 2 = [ q w 1 − q x 1 − q y 1 − q z 1 q x 1 q w 1 − q z 1 q y 1 q y 1 q z 1 q w 1 − q x 1 q z 1 − q y 1 q x 1 q w 1 ] q 2 ( 16 ) \bm{q}_1 \otimes \bm{q}_2 = [\bm{q}_1]_L \bm{q}_2=\begin{bmatrix} q_{w1} & -q_{x1} & -q_{y1} & -q_{z1} \\ q_{x1} & q_{w1} & -q_{z1} & q_{y1} \\ q_{y1} & q_{z1} & q_{w1} & -q_{x1} \\ q_{z1} & -q_{y1} & q_{x1} & q_{w1} \end{bmatrix} \bm{q}_2 \qquad (16) q1⊗q2=[q1]Lq2=⎣⎢⎢⎡qw1qx1qy1qz1−qx1qw1qz1−qy1−qy1−qz1qw1qx1−qz1qy1−qx1qw1⎦⎥⎥⎤q2(16)
q 1 ⊗ q 2 = [ q 2 ] R q 1 = [ q w 2 − q x 2 − q y 2 − q z 2 q x 2 q w 2 q z 2 − q y 2 q y 2 − q z 2 q w 2 q x 2 q z 2 q y 2 − q x 2 q w 2 ] q 1 ( 17 ) \bm{q}_1 \otimes \bm{q}_2 = [q_2]_R \bm{q}_1 = \begin{bmatrix} q_{w2} & -q_{x2} & -q_{y2} & -q_{z2} \\ q_{x2} & q_{w2} & q_{z2} & -q_{y2} \\ q_{y2} & -q_{z2} & q_{w2} & q_{x2} \\ q_{z2} & q_{y2} & -q_{x2} & q_{w2} \end{bmatrix} \bm{q}_1 \qquad (17) q1⊗q2=[q2]Rq1=⎣⎢⎢⎡qw2qx2qy2qz2−qx2qw2−qz2qy2−qy2qz2qw2−qx2−qz2−qy2qx2qw2⎦⎥⎥⎤q1(17)
according to (16) and (17) You can get :
[ q ] L = [ q w − q x − q y − q z q x q w − q z q y q y q z q w − q x q z − q y q x q w ] , [ q ] R = [ q w − q x − q y − q z q x q w q z − q y q y − q z q w q x q z q y − q x q w ] q 1 ( 18 ) [\bm{q}]_L = \begin{bmatrix} q_{w} & -q_{x} & -q_{y} & -q_{z} \\ q_{x} & q_{w} & -q_{z} & q_{y} \\ q_{y} & q_{z} & q_{w} & -q_{x} \\ q_{z} & -q_{y} & q_{x} & q_{w} \end{bmatrix}, \quad [\bm{q}]_R = \begin{bmatrix} q_{w} & -q_{x} & -q_{y} & -q_{z} \\ q_{x} & q_{w} & q_{z} & -q_{y} \\ q_{y} & -q_{z} & q_{w} & q_{x} \\ q_{z} & q_{y} & -q_{x} & q_{w} \end{bmatrix} \bm{q}_1 \qquad (18) [q]L=⎣⎢⎢⎡qwqxqyqz−qxqwqz−qy−qy−qzqwqx−qzqy−qxqw⎦⎥⎥⎤,[q]R=⎣⎢⎢⎡qwqxqyqz−qxqw−qzqy−qyqzqw−qx−qz−qyqxqw⎦⎥⎥⎤q1(18)
It can be further expressed as :
[ q ] L = q w I + [ 0 − q v ⊤ q v q v ∧ ] , [ q ] R = q w I + [ 0 − q v ⊤ q v − q v ∧ ] ( 19 ) [\bm{q}]_L = q_w \mathbf{I} + \begin{bmatrix} 0 & -\bm{q}_v^\top \\ \bm{q}_v & \bm{q}_v^\land \end{bmatrix}, \qquad [\bm{q}]_R = q_w \mathbf{I} + \begin{bmatrix} 0 & -\bm{q}_v^\top \\ \bm{q}_v & -\bm{q}_v^\land \end{bmatrix} \qquad (19) [q]L=qwI+[0qv−qv⊤qv∧],[q]R=qwI+[0qv−qv⊤−qv∧](19)
among :
q ∧ = [ 0 − q z q y q z 0 − q x − q y q x 0 ] ( 20 ) \bm{q} ^ \land = \begin{bmatrix} 0 & -q_z & q_y \\ q_z & 0 & -q_x \\ -q_y & q_x & 0 \end{bmatrix} \qquad (20) q∧=⎣⎡0qz−qy−qz0qxqy−qx0⎦⎤(20)
It's an antisymmetric matrix , namely q ∧ = − [ q ∧ ] ⊤ \bm{q}^\land = -[\bm{q}^\land]^\top q∧=−[q∧]⊤, It can be used for cross multiplication between vectors :
a × b = a ∧ b , ∀ a , b ∈ R 3 ( 21 ) \bm{a} \times \bm{b} = \bm{a}^\land\bm{b}, \quad \forall \bm{a}, \bm{b} \in \mathbb{R}^3 \qquad (21) a×b=a∧b,∀a,b∈R3(21)
because :
( q ⊗ x ) ⊗ p = [ p ] R [ q ] L x a n d q ⊗ ( x ⊗ p ) = [ q ] L [ p ] R x ( 22 ) (\bm{q} \otimes \bm{x}) \otimes \bm{p} = [\bm{p}]_R[\bm{q}]_L\bm{x} \quad and \quad \bm{q} \otimes(\bm{x} \otimes \bm{p})=[\bm{q}]_L[\bm{p}]_R\bm{x} \qquad(22) (q⊗x)⊗p=[p]R[q]Lxandq⊗(x⊗p)=[q]L[p]Rx(22)
thus , According to the combination law of four element multiplication :
[ p ] R [ q ] L = [ q ] L [ p ] R ( 23 ) [\bm{p}]_R[\bm{q}]_L = [\bm{q}]_L[\bm{p}]_R \qquad (23) [p]R[q]L=[q]L[p]R(23)
Simplify writing :
[ q ] L = [ q Ψ ( q ) ] ( 24 ) [\bm{q}]_L = [\bm{q} \quad \mathbf{\Psi}(\bm{q})] \qquad(24) [q]L=[qΨ(q)](24)
among :
Ψ ( q ) = [ − q v ⊤ q w I 3 × 3 + q v ∧ ] ( 25 ) \mathbf{\Psi}(\bm{q}) = \begin{bmatrix} -\bm{q}_v^\top \\ q_w\mathbf{I}_{3\times3} + \bm{q}_v^\land \end{bmatrix} \qquad (25) Ψ(q)=[−qv⊤qwI3×3+qv∧](25)
Empathy :
[ q ] R = [ q Ξ ( q ) ] ( 26 ) [\bm{q}]_R = [\bm{q} \quad \mathbf{\Xi}(\bm{q})] \qquad(26) [q]R=[qΞ(q)](26)
among :
Ξ ( q ) = [ − q v ⊤ q w I 3 × 3 − q v ∧ ] ( 27 ) \mathbf{\Xi}(\bm{q}) = \begin{bmatrix} -\bm{q}_v^\top \\ q_w\mathbf{I}_{3\times3} - \bm{q}_v^\land \end{bmatrix} \qquad (27) Ξ(q)=[−qv⊤qwI3×3−qv∧](27)
Besides , about unit quaternion q \bm{q} q Yes :
[ q − 1 ] L = [ q ] L ⊤ ( 28 ) [\bm{q}^{-1}]_L = [\bm{q}]_L^\top \qquad (28) [q−1]L=[q]L⊤(28)
[ q − 1 ] R = [ q ] R ⊤ ( 29 ) [\bm{q}^{-1}]_R = [\bm{q}]_R^\top \qquad (29) [q−1]R=[q]R⊤(29)
2.5 Identity quaternion
q 1 = 1 = [ 1 0 v ] ( 30 ) \bm{q}_1 = 1 = \begin{bmatrix} 1 \\ \bm{0}_v \end{bmatrix} \qquad (30) q1=1=[10v](30)
Satisfy :
q 1 ⊗ q = q ⊗ q 1 = q ( 31 ) \bm{q}_1 \otimes \bm{q} = \bm{q} \otimes \bm{q}_1 = \bm{q} \qquad(31) q1⊗q=q⊗q1=q(31)
2.6 conjugate
The conjugation of the four elements is :
q ∗ = [ q w − q v ] ( 32 ) \bm{q}^* = \begin{bmatrix} q_w\\ -\bm{q}_v \end{bmatrix} \qquad(32) q∗=[qw−qv](32)
Properties of conjugate four elements :
q ⊗ q ∗ = q ∗ ⊗ q = [ q w 2 + q x 2 + q y 2 + q z 2 0 v ] ( 32 ) \bm{q} \otimes \bm{q}^* = \bm{q}^* \otimes \bm{q} = \begin{bmatrix} q_w^2 + q_x^2 + q_y^2 + q_z^2 \\ \bm{0}_v \end{bmatrix} \qquad (32) q⊗q∗=q∗⊗q=[qw2+qx2+qy2+qz20v](32)
as well as :
( p ⊗ q ) ∗ = q ∗ ⊗ p ∗ ( 33 ) (\bm{p} \otimes \bm{q})^* = \bm{q}^* \otimes \bm{p}^* \qquad (33) (p⊗q)∗=q∗⊗p∗(33)
2.7 Modules of four elements
Definition :
∣ ∣ q ∣ ∣ = q ⊗ q ∗ = q ∗ ⊗ q = q w 2 + q x 2 + q y 2 + q z 2 ( 34 ) ||\bm{q}|| = \sqrt{\bm{q} \otimes \bm{q}^*} = \sqrt{\bm{q}^* \otimes \bm{q}} = \sqrt{q_w^2 + q_x^2 + q_y^2 + q_z^2} \qquad (34) ∣∣q∣∣=q⊗q∗=q∗⊗q=qw2+qx2+qy2+qz2(34)
Properties of modules :
∣ ∣ p ⊗ q ∣ ∣ = ∣ ∣ q ⊗ p ∣ ∣ = ∣ ∣ p ∣ ∣ ∣ ∣ q ∣ ∣ ( 35 ) ||\bm{p} \otimes \bm{q}|| = ||\bm{q} \otimes \bm{p}|| = ||\bm{p}|| ||\bm{q}|| \qquad (35) ∣∣p⊗q∣∣=∣∣q⊗p∣∣=∣∣p∣∣∣∣q∣∣(35)
Simple deduction :
∣ ∣ p ⊗ q ∣ ∣ 2 = ( p ⊗ q ) ⊗ ( p ⊗ q ) ∗ = p ⊗ q ⊗ q ∗ ⊗ p ∗ = p ⊗ ( q ⊗ q ∗ ) ⊗ p ∗ = p ⊗ [ ∣ ∣ q ∣ ∣ 2 0 v ] ⊗ p ∗ = p ⊗ p ∗ ⊗ [ ∣ ∣ q ∣ ∣ 2 0 v ] = ( ∣ ∣ p ∣ ∣ ∣ ∣ q ∣ ∣ ) 2 ||\bm{p} \otimes \bm{q}||^2 = (\bm{p} \otimes \bm{q}) \otimes (\bm{p} \otimes\bm{q})^* = \bm{p} \otimes\bm{q}\otimes\bm{q}^*\otimes\bm{p}^* = \bm{p}\otimes(\bm{q}\otimes\bm{q}^*)\otimes\bm{p}^*=\bm{p} \otimes\begin{bmatrix} ||\bm{q}||^2 \\ \bm{0}_v \end{bmatrix} \otimes\bm{p}^* = \bm{p} \otimes \bm{p}^* \otimes \begin{bmatrix} ||\bm{q}||^2 \\ \bm{0}_v \end{bmatrix} = (||\bm{p}||||\bm{q}||)^2 ∣∣p⊗q∣∣2=(p⊗q)⊗(p⊗q)∗=p⊗q⊗q∗⊗p∗=p⊗(q⊗q∗)⊗p∗=p⊗[∣∣q∣∣20v]⊗p∗=p⊗p∗⊗[∣∣q∣∣20v]=(∣∣p∣∣∣∣q∣∣)2
2.8 The inverse of four elements
The inverse of the four elements is q − 1 \bm{q}^{-1} q−1,, It meets the following conditions :
q ⊗ q − 1 = q − 1 ⊗ q = q 1 ( 36 ) \bm{q} \otimes \bm{q}^{-1} = \bm{q}^{-1} \otimes \bm{q} = \bm{q}_1 \qquad(36) q⊗q−1=q−1⊗q=q1(36)
among q 1 \bm{q}_1 q1 by "Identity quaternion“, The inverse is calculated by the following formula :
q − 1 = q ∗ / ∣ ∣ q ∣ ∣ 2 ( 37 ) \bm{q}^{-1} = \bm{q}^*/||\bm{q}||^2 \qquad (37) q−1=q∗/∣∣q∣∣2(37)
2.9 Unit or normalized quaternion
about unit quaternion Yes , ∣ ∣ q ∣ ∣ = 1 ||\bm{q}|| = 1 ∣∣q∣∣=1, therefore :
q − 1 = q ∗ ( 38 ) \bm{q}^{-1} = \bm{q}^* \qquad(38) q−1=q∗(38)
3 Rotate four elements
form :
q = [ cos ( θ / 2 ) u sin ( θ / 2 ) ] = [ cos ( θ / 2 ) u x sin ( θ / 2 ) u y sin ( θ / 2 ) u z sin ( θ / 2 ) ] ( 39 ) \bm{q} = \begin{bmatrix} \cos (\theta / 2) \\ \bm{u} \sin (\theta/2) \end{bmatrix} = \begin{bmatrix} \cos (\theta/2) \\ u_x \sin (\theta/2) \\ u_y \sin (\theta/2) \\ u_z \sin (\theta/2) \end{bmatrix} \qquad (39) q=[cos(θ/2)usin(θ/2)]=⎣⎢⎢⎡cos(θ/2)uxsin(θ/2)uysin(θ/2)uzsin(θ/2)⎦⎥⎥⎤(39)
among , The rotation axis is u \bm{u} u, Is the unit vector , The rotation angle is θ \theta θ, Vector x \bm{x} x Around the u \bm{u} u Shaft rotation θ \theta θ It can be expressed as :
x ′ = q ⊗ x ⊗ q ∗ ( 40 ) \bm{x}' = \bm{q} \otimes \bm{x} \otimes \bm{q}^* \qquad (40) x′=q⊗x⊗q∗(40)
Can verify , Rotate the four elements to unit quaternion, Follow unit quaternion equally Has the following properties :
( p ⊗ q ) − 1 = q − 1 ⊗ p − 1 ( 41 ) (\bm{p} \otimes \bm{q})^{-1} = \bm{q}^{-1}\otimes\bm{p}^{-1} \qquad(41) (p⊗q)−1=q−1⊗p−1(41)
After introducing the basic definition and related properties of the four elements , Will be right 《Indirect Kalman Filter for 3D Attitude Estimation》 Escape the relevant content in the article .
》1.3 Userful Identites
》1.3.1 Related properties of cross product antisymmetric matrix
Anti-Commutativity
w ∧ = − [ w ∧ ] ⊤ ( 42 ) \bm{w}^\land = -[\bm{w}^\land]^\top \qquad(42) w∧=−[w∧]⊤(42)
a ∧ b = − b ∧ a ⇔ − b ⊤ a ∧ = a ⊤ b ∧ ( 43 ) \bm{a}^\land\bm{b} = -\bm{b}^\land\bm{a} \quad \Leftrightarrow \quad -\bm{b}^\top \bm{a}^\land = \bm{a}^\top\bm{b}^\land \qquad (43) a∧b=−b∧a⇔−b⊤a∧=a⊤b∧(43)
Distributivity orver Addition
a ∧ + b ∧ = ( a + b ) ∧ ( 44 ) \bm{a}^\land + \bm{b}^\land = (\bm{a} + \bm{b})^\land \qquad(44) a∧+b∧=(a+b)∧(44)
Number multiplication
c ⋅ w ∧ = ( c w ) ∧ ( 45 ) c \cdot \bm{w}^\land = (c\bm{w})^\land \qquad(45) c⋅w∧=(cw)∧(45)
Cross product of parallel vectors
w × ( c w ) = c ⋅ w ∧ w = − c ⋅ ( w ⊤ w ∧ ) ⊤ = 0 3 × 1 ( 46 ) \bm{w} \times (c\bm{w}) = c \cdot\bm{w}^\land\bm{w} = -c \cdot(\bm{w}^\top\bm{w}^\land)^\top = \bm{0}_{3\times1} \qquad(46) w×(cw)=c⋅w∧w=−c⋅(w⊤w∧)⊤=03×1(46)
Lagrange's formula
a ∧ b ∧ = b a ⊤ − ( a ⊤ b ) I 3 × 3 ( 47 ) \bm{a}^\land\bm{b}^\land=\bm{b}\bm{a}^\top-(\bm{a}^\top\bm{b})\mathbf{I}_{3\times3} \qquad (47) a∧b∧=ba⊤−(a⊤b)I3×3(47)
⇔ a × ( b × c ) = b ( a ⊤ c ) − c ( a ⊤ b ) ( 48 ) \Leftrightarrow \bm{a} \times (\bm{b} \times \bm{c}) = \bm{b}(\bm{a}^\top\bm{c}) - \bm{c}(\bm{a}^\top\bm{b}) \qquad (48) ⇔a×(b×c)=b(a⊤c)−c(a⊤b)(48)
( a × b ) ∧ = b a ⊤ − a b ⊤ ( 49 ) (\bm{a} \times \bm{b})^\land = \bm{b}\bm{a}^\top-\bm{a}\bm{b}^\top \qquad (49) (a×b)∧=ba⊤−ab⊤(49)
Jacobi Identity
a × ( b × c ) + b × ( c × a ) + c × ( a × b ) = 0 ( 49 ) \bm{a} \times (\bm{b} \times \bm{c}) + \bm{b} \times (\bm{c} \times \bm{a}) + \bm{c} \times (\bm{a} \times \bm{b}) = \bm{0} \qquad (49) a×(b×c)+b×(c×a)+c×(a×b)=0(49)
\qquad or
a ∧ b ∧ c + b ∧ c ∧ a + c ∧ a ∧ b = 0 ( 50 ) \bm{a}^\land\bm{b}^\land\bm{c} + \bm{b}^\land\bm{c}^\land\bm{a} + \bm{c}^\land\bm{a}^\land\bm{b}= \bm{0} \qquad(50) a∧b∧c+b∧c∧a+c∧a∧b=0(50)
Rotations
( R a ) ∧ = R a ∧ R ⊤ ( 51 ) p r o o f . ( R a ) × b = ( R a ) × ( R R ⊤ b ) = R [ a × ( R ⊤ b ) ] = R a ∧ R ⊤ b ⇒ ( R a ) ∧ = R a ∧ R ⊤ (\bm{R}\bm{a})^\land = \bm{R}\bm{a}^\land\bm{R}^\top \qquad (51) \\ proof.\quad (\bm{Ra}) \times \bm{b} = (\bm{Ra}) \times (\bm{RR^\top b}) = \bm{R}[\bm{a} \times(\bm{R^\top b})]=\bm{R}\bm{a}^\land\bm{R}^\top\bm{b} \\ \Rightarrow (\bm{Ra})^\land = \bm{Ra}^\land\bm{R}^\top (Ra)∧=Ra∧R⊤(51)proof.(Ra)×b=(Ra)×(RR⊤b)=R[a×(R⊤b)]=Ra∧R⊤b⇒(Ra)∧=Ra∧R⊤
R ( a × b ) = ( R a ) × ( R b ) ( 52 ) \bm{R}(\bm{a} \times \bm{b}) = (\bm{R}\bm{a}) \times (\bm{R}\bm{b}) \qquad(52) R(a×b)=(Ra)×(Rb)(52)
Cross multiply antisymmetric matrix
( w ∧ ) 2 = w w ⊤ − ∣ w ∣ 2 I ( 53 ) (\bm{w}^\land)^2 = \bm{ww}^\top - |\bm{w}|^2 \mathbf{I} \qquad(53) (w∧)2=ww⊤−∣w∣2I(53)
( w ∧ ) 3 = ( w w ⊤ − ∣ w ∣ 2 I ) w ∧ = w w ⊤ w ∧ − ∣ w ∣ 2 w ∧ = w ( − w ∧ w ) ⊤ − ∣ w ∣ 2 w ∧ = − ∣ w ∣ 2 w ∧ ( 54 ) \begin{aligned} (\bm{w}^\land)^3 & = (\bm{ww}^\top - |\bm{w}|^2\mathbf{I})\bm{w}^\land\\ & = \bm{w}\bm{w}^\top\bm{w}^\land-|\bm{w}|^2\bm{w}^\land\\ & =\bm{w}(-\bm{w}^\land\bm{w})^\top - |\bm{w}|^2\bm{w}^\land\\ & = -|\bm{w}|^2\bm{w}^\land \end{aligned} \qquad (54) (w∧)3=(ww⊤−∣w∣2I)w∧=ww⊤w∧−∣w∣2w∧=w(−w∧w)⊤−∣w∣2w∧=−∣w∣2w∧(54)
( w ∧ ) 4 = ( w ∧ ) 3 w ∧ = − ∣ w ∣ 2 ( w ∧ ) 2 ( 55 ) \begin{aligned} (\bm{w}^\land)^4 & = (\bm{w}^\land)^3\bm{w}^\land\\ & = -|\bm{w}|^2(\bm{w}^\land)^2 \end{aligned} \qquad (55) (w∧)4=(w∧)3w∧=−∣w∣2(w∧)2(55)
( w ∧ ) 5 = ( w ∧ ) 4 w ∧ = − ∣ w ∣ 2 ( w ∧ ) 3 = − ∣ w ∣ 2 ( − ∣ w ∣ 2 w ∧ ) = ∣ w ∣ 4 w ∧ ( 56 ) \begin{aligned} (\bm{w}^\land)^5 & = (\bm{w}^\land)^4\bm{w}^\land \\ &=-|\bm{w}|^2(\bm{w}^\land)^3\\ &=-|\bm{w}|^2(-|\bm{w}|^2\bm{w}^\land)\\ &=|\bm{w}|^4\bm{w}^\land \qquad (56) \end{aligned} (w∧)5=(w∧)4w∧=−∣w∣2(w∧)3=−∣w∣2(−∣w∣2w∧)=∣w∣4w∧(56)
( w ∧ ) 6 = ( w ∧ ) 5 w ∧ = ∣ w ∣ 4 ( w ∧ ) 2 ( 57 ) \begin{aligned} (\bm{w}^\land)^6 & = (\bm{w}^\land)^5\bm{w}^\land\\ &= |\bm{w}|^4(\bm{w}^\land)^2 \qquad(57) \end{aligned} (w∧)6=(w∧)5w∧=∣w∣4(w∧)2(57)
( w ∧ ) 7 = ( w ∧ ) 6 w ∧ = ∣ w ∣ 4 ( w ∧ ) 3 = ∣ w ∣ 4 ( − ∣ w ∣ 2 w ∧ ) = − ∣ w ∣ 6 w ∧ ( 58 ) . . . . . . \begin{aligned} (\bm{w}^\land)^7 &= (\bm{w}^\land)^6\bm{w}^\land\\ &=|\bm{w}|^4(\bm{w}^\land)^3\\ &=|\bm{w}|^4(-|\bm{w}|^2\bm{w}^\land)\\ &=-|\bm{w}|^6\bm{w}^\land \qquad(58)\\ &...... \end{aligned} (w∧)7=(w∧)6w∧=∣w∣4(w∧)3=∣w∣4(−∣w∣2w∧)=−∣w∣6w∧(58)......
》1.3.2 Properties of the matrix Ω \mathbf{\Omega} Ω
Ω \mathbf{\Omega} Ω A matrix appears in the product of a vector and four elements , It can be used for derivation of four elements , It has the following properties :
Ω ( w ) = [ 0 − w x − w y − w z w x 0 w z − w y w y − w z 0 w x w z w y − w x 0 ] = [ 0 − w ⊤ w − w ∧ ] ( 59 ) \begin{aligned} \mathbf{\Omega}(\bm{w}) &=\begin{bmatrix} 0 & -w_x & -w_y & -w_z\\ w_x & 0 & w_z & -w_y\\ w_y & -w_z& 0 & w_x \\ w_z & w_y & -w_x & 0 \end{bmatrix}\\ & = \begin{bmatrix} 0 & -\bm{w}^\top\\ \bm{w} & -\bm{w}^\land \end{bmatrix} \end{aligned} \qquad (59) Ω(w)=⎣⎢⎢⎡0wxwywz−wx0−wzwy−wywz0−wx−wz−wywx0⎦⎥⎥⎤=[0w−w⊤−w∧](59)
Ω ( w ) 2 = [ − w ⊤ w w ⊤ w ∧ − w ∧ w − w w ⊤ + w ∧ w ∧ ] = [ − ∣ ∣ w ∣ ∣ 2 0 1 × 3 0 3 × 1 − ∣ ∣ w ∣ ∣ 2 I 3 × 3 ] = − ∣ ∣ w ∣ ∣ 2 I 4 × 4 ( 60 ) \begin{aligned} \mathbf{\Omega}(\bm{w})^2 & = \begin{bmatrix} -\bm{w}^\top\bm{w} & \bm{w}^\top\bm{w}^\land\\ -\bm{w}^\land\bm{w} & -\bm{ww}^\top+\bm{w}^\land\bm{w}^\land\\ \end{bmatrix}\\ &=\begin{bmatrix} -||\bm{w}||^2 & \mathbf{0}_{1\times3} \\ \mathbf{0}_{3\times1}& -||\bm{w}||^2\mathbf{I}_{3\times3} \end{bmatrix}\\ &=-||\bm{w}||^2\mathbf{I}_{4\times4} \qquad\qquad\qquad\qquad (60) \end{aligned} Ω(w)2=[−w⊤w−w∧ww⊤w∧−ww⊤+w∧w∧]=[−∣∣w∣∣203×101×3−∣∣w∣∣2I3×3]=−∣∣w∣∣2I4×4(60)
Ω ( w ) 3 = − ∣ ∣ w ∣ ∣ 2 Ω ( w ) ( 61 ) \mathbf{\Omega}(\bm{w})^3 = -||\bm{w}||^2\mathbf{\Omega}(\bm{w}) \qquad(61) Ω(w)3=−∣∣w∣∣2Ω(w)(61)
Ω ( w ) 4 = ∣ ∣ w ∣ ∣ 4 I 4 × 4 ( 62 ) \mathbf{\Omega}(\bm{w})^4 = ||\bm{w}||^4\mathbf{I}_{4\times4} \qquad(62) Ω(w)4=∣∣w∣∣4I4×4(62)
Ω ( w ) 5 = ∣ ∣ w ∣ ∣ 4 Ω ( w ) ( 63 ) \mathbf{\Omega}(\bm{w})^5 = ||\bm{w}||^4\mathbf{\Omega}(\bm{w}) \qquad(63) Ω(w)5=∣∣w∣∣4Ω(w)(63)
Ω ( w ) 6 = − ∣ ∣ w ∣ ∣ 6 I 4 × 4 ( 64 ) \mathbf{\Omega}(\bm{w})^6 = -||\bm{w}||^6\mathbf{I}_{4\times4} \qquad(64) Ω(w)6=−∣∣w∣∣6I4×4(64)
1.3.3 Properties of the matrix Ξ \mathbf{\Xi} Ξ
Ψ ( q ) = [ − q v ⊤ q w I 3 × 3 + q v ∧ ] , Ψ ⊤ ( q ) = [ − q v q w I 3 × 3 − q v ∧ ] ( 65 ) \mathbf{\Psi}(\bm{q}) = \begin{bmatrix} -\bm{q}_v^\top \\ q_w\mathbf{I}_{3\times3} + \bm{q}_v^\land \end{bmatrix}, \quad\mathbf{\Psi}^\top(\bm{q})=[-\bm{q}_v\quad q_w\mathbf{I}_{3\times3}-\bm{q}_v^\land] \qquad (65) Ψ(q)=[−qv⊤qwI3×3+qv∧],Ψ⊤(q)=[−qvqwI3×3−qv∧](65)
⇒ Ψ ⊤ ( q ) Ψ ( q ) = ∣ ∣ q ∣ ∣ 2 I 3 × 3 ( 66 ) Ψ ( q ) Ψ ⊤ ( q ) = ∣ ∣ q ∣ ∣ I 4 × 4 − q q ⊤ ( 67 ) Ψ ⊤ ( q ) q = 0 3 × 1 ( 68 ) \begin{aligned} \Rightarrow \qquad \mathbf{\Psi}^\top(\bm{q})\mathbf{\Psi}(\bm{q}) & = ||\bm{q}||^2\mathbf{I}_{3\times3} \qquad(66)\\ \mathbf{\Psi}(\bm{q})\mathbf{\Psi}^\top(\bm{q}) &= ||\bm{q}||\mathbf{I}_{4\times4}-\bm{q}\bm{q}^\top\qquad(67)\\ \mathbf{\Psi}^\top(\bm{q})\bm{q}&=\mathbf{0}_{3\times1} \qquad (68) \end{aligned} ⇒Ψ⊤(q)Ψ(q)Ψ(q)Ψ⊤(q)Ψ⊤(q)q=∣∣q∣∣2I3×3(66)=∣∣q∣∣I4×4−qq⊤(67)=03×1(68)
Ξ \mathbf{\Xi} Ξ And Ω \mathbf{\Omega} Ω The relationship between is :
Ω ( w ) q = Ψ ( q ) w ( 69 ) \mathbf{\Omega}(\bm{w})\bm{q}=\mathbf{\Psi}(\bm{q})\bm{w} \qquad(69) Ω(w)q=Ψ(q)w(69)
》1.4 The relationship between the four elements and the rotation matrix
Given four elements of rotation q = cos ( θ / 2 ) + u sin ( θ / 2 ) \bm{q}=\cos(\theta/2)+\bm{u}\sin(\theta/2) q=cos(θ/2)+usin(θ/2), The corresponding rotation matrix is written as R ( q ) \mathbf{R}(\bm{q}) R(q), be
R ( q ) = ( 2 q w 2 − 1 ) I + 2 q v q v ⊤ + 2 q w q v ∧ ( 70 ) \mathbf{R}(\bm{q})=(2q_w^2-1)\mathbf{I} + 2\bm{q}_v\bm{q}_v^\top + 2q_w\bm{q}_v^\land \qquad(70) R(q)=(2qw2−1)I+2qvqv⊤+2qwqv∧(70)
among :
q w = cos ( θ / 2 ) , q v = u sin ( θ / 2 ) q_w = \cos(\theta/2), \quad\bm{q}_v=\bm{u}\sin(\theta/2) qw=cos(θ/2),qv=usin(θ/2)
Or expressed as :
R ( q ) = Ξ ⊤ ( q ) Ψ ( q ) ( 71 ) \mathbf{R}(\bm{q})=\mathbf{\Xi}^\top(\bm{q})\mathbf{\Psi}(\bm{q}) \qquad(71) R(q)=Ξ⊤(q)Ψ(q)(71)
Or expressed as :
R ( q ) = [ 1 − 2 q y 2 − 2 q z 2 2 q x q y − 2 q w q z 2 q x q z + 2 q w q y 2 q x q y + 2 q w q z 1 − 2 q x 2 − 2 q z 2 2 q y q z − 2 q w q x 2 q x q z − 2 q w q y 2 q y q z + 2 q w q x 1 − 2 q x 2 − 2 q y 2 ] ( 72 ) \mathbf{R}(\bm{q}) = \begin{bmatrix} 1-2q_y^2-2q_z^2 & 2q_xq_y - 2q_wq_z & 2q_xq_z + 2q_wq_y \\ 2q_xq_y+2q_wq_z & 1-2q_x^2-2q_z^2 & 2q_yq_z-2q_wq_x\\ 2q_xq_z-2q_wq_y& 2q_yq_z+2q_wq_x& 1-2q_x^2-2q_y^2 \end{bmatrix} \qquad(72) R(q)=⎣⎡1−2qy2−2qz22qxqy+2qwqz2qxqz−2qwqy2qxqy−2qwqz1−2qx2−2qz22qyqz+2qwqx2qxqz+2qwqy2qyqz−2qwqx1−2qx2−2qy2⎦⎤(72)
The relation between the multiplication of rotation matrix and the multiplication of rotation four elements :
R ( 0 q 1 ) R ( 1 q 2 ) = R ( 0 q 1 ⊗ 1 q 2 ) ( 73 ) \mathbf{R}(\bm{^0q_1})\mathbf{R}(^1\bm{q}_2) = \mathbf{R}(^0\bm{q}_1 \otimes {^1}\bm{q}_2) \qquad(73) R(0q1)R(1q2)=R(0q1⊗1q2)(73)
Exponential mapping
R ( q ) = e x p ( θ u ∧ ) ( 74 ) \mathbf{R}(\bm{q}) = exp(\theta\bm{u}^\land) \qquad (74) R(q)=exp(θu∧)(74)
》1.5 The derivative of the four elements with respect to time
To be continued ......
reference :
[1] Indirect Kalman Filter for 3D Attitude Estimation
[2] Quaternion kinematics for the error-state Kalman filter
[3] Vision SLAM Fourteen speak From theory to practice
边栏推荐
- STM32 control LED lamp
- Commands and permissions for directories and files
- 02 - bare metal and RTOS development modes: five development modes of bare metal and the introduction of RTOS
- Embedded test process
- Stm32g0 Tim interrupt use
- Examen final - notes d'apprentissage PHP 6 - traitement des chaînes
- QT msvc2015 compiler reports an error: error: lnk1158: unable to run "rc.exe"
- Directory of software
- halcon:读取摄像头并二值化
- uniapp图片下方加标签标图片
猜你喜欢

MySQL encounters the problem of expression 1 of select list is not in group by claim and contains nonaggre

Account command and account authority

The most convenient serial port screen chip scheme designed at the charging pile in China

Binary tree related operations (based on recursion, implemented in C language)

网络安全-ARP协议和防御

Graphic explanation pads update PCB design basic operation

2021 private equity fund market report (62 pages)

Final review -php learning notes 9-php session control

Halcon: read the camera and binary it

Research Report on search business value in the era of big search in 2022
随机推荐
Embedded test process
STM32 infrared communication 2
Cubemx completes STM32F103 dual serial port 485 transceiver transmission
记录开发过程中无法使用管理员身份修改系统文件问题
Network security ARP protocol and defense
Final review -php learning notes 6- string processing
MCU essay
Common sorting methods
Test enumeration types with STM32 platform running RT thread
Network security - detailed explanation of VLAN and tunk methods
uniapp图片下方加标签标图片
Mailbox application routine of running wild fire RT thread
Raspberry pie trivial configuration
Account command and account authority
Network, network card and IP configuration
网络安全-单臂路由、DHCP中继和ICMP协议
期末複習-PHP學習筆記6-字符串處理
DXP shortcut key
Implementation of binary search in C language
2022 retail industry strategy: three strategies for consumer goods gold digging (in depth)