ImuFactor.lyx 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399
  1. #LyX 2.0 created this file. For more info see http://www.lyx.org/
  2. \lyxformat 413
  3. \begin_document
  4. \begin_header
  5. \textclass article
  6. \use_default_options true
  7. \maintain_unincluded_children false
  8. \language english
  9. \language_package default
  10. \inputencoding auto
  11. \fontencoding global
  12. \font_roman default
  13. \font_sans default
  14. \font_typewriter default
  15. \font_default_family default
  16. \use_non_tex_fonts false
  17. \font_sc false
  18. \font_osf false
  19. \font_sf_scale 100
  20. \font_tt_scale 100
  21. \graphics default
  22. \default_output_format default
  23. \output_sync 0
  24. \bibtex_command default
  25. \index_command default
  26. \paperfontsize 11
  27. \spacing single
  28. \use_hyperref false
  29. \papersize default
  30. \use_geometry true
  31. \use_amsmath 1
  32. \use_esint 1
  33. \use_mhchem 1
  34. \use_mathdots 1
  35. \cite_engine basic
  36. \use_bibtopic false
  37. \use_indices false
  38. \paperorientation portrait
  39. \suppress_date false
  40. \use_refstyle 1
  41. \index Index
  42. \shortcut idx
  43. \color #008000
  44. \end_index
  45. \leftmargin 3cm
  46. \topmargin 3cm
  47. \rightmargin 3cm
  48. \bottommargin 3cm
  49. \secnumdepth 3
  50. \tocdepth 3
  51. \paragraph_separation indent
  52. \paragraph_indentation default
  53. \quotes_language english
  54. \papercolumns 1
  55. \papersides 1
  56. \paperpagestyle default
  57. \tracking_changes false
  58. \output_changes false
  59. \html_math_output 0
  60. \html_css_as_file 0
  61. \html_be_strict false
  62. \end_header
  63. \begin_body
  64. \begin_layout Title
  65. The new IMU Factor
  66. \end_layout
  67. \begin_layout Author
  68. Frank Dellaert
  69. \end_layout
  70. \begin_layout Standard
  71. \begin_inset CommandInset include
  72. LatexCommand include
  73. filename "macros.lyx"
  74. \end_inset
  75. \end_layout
  76. \begin_layout Standard
  77. \begin_inset FormulaMacro
  78. \renewcommand{\sothree}{\mathfrak{so(3)}}
  79. {\mathfrak{so(3)}}
  80. \end_inset
  81. \end_layout
  82. \begin_layout Subsubsection*
  83. Navigation States
  84. \end_layout
  85. \begin_layout Standard
  86. Let us assume a setup where frames with image and/or laser measurements
  87. are processed at some fairly low rate, e.g., 10 Hz.
  88. \end_layout
  89. \begin_layout Standard
  90. We define the state of the vehicle at those times as attitude, position,
  91. and velocity.
  92. These three quantities are jointly referred to as a NavState
  93. \begin_inset Formula $X_{b}^{n}\define\left\{ R_{b}^{n},P_{b}^{n},V_{b}^{n}\right\} $
  94. \end_inset
  95. , where the superscript
  96. \begin_inset Formula $n$
  97. \end_inset
  98. denotes the
  99. \emph on
  100. navigation frame
  101. \emph default
  102. , and
  103. \begin_inset Formula $b$
  104. \end_inset
  105. the
  106. \emph on
  107. body frame
  108. \emph default
  109. .
  110. For simplicity, we drop these indices below where clear from context.
  111. \end_layout
  112. \begin_layout Subsubsection*
  113. Vector Fields and Differential Equations
  114. \end_layout
  115. \begin_layout Standard
  116. We need a way to describe the evolution of a NavState over time.
  117. The NavState lives in a 9-dimensional manifold
  118. \begin_inset Formula $M$
  119. \end_inset
  120. , defined by the orthonormality constraints on
  121. \begin_inset Formula $\Rone$
  122. \end_inset
  123. .
  124. For a NavState
  125. \begin_inset Formula $X$
  126. \end_inset
  127. evolving over time we can write down a differential equation
  128. \begin_inset Formula
  129. \begin{equation}
  130. \dot{X}(t)=F(t,X)\label{eq:diffeqM}
  131. \end{equation}
  132. \end_inset
  133. where
  134. \begin_inset Formula $F$
  135. \end_inset
  136. is a time-varying
  137. \series bold
  138. vector field
  139. \series default
  140. on
  141. \begin_inset Formula $M$
  142. \end_inset
  143. , defined as a mapping from
  144. \begin_inset Formula $\Rone\times M$
  145. \end_inset
  146. to tangent vectors at
  147. \begin_inset Formula $X$
  148. \end_inset
  149. .
  150. A
  151. \series bold
  152. tangent vector
  153. \series default
  154. at
  155. \begin_inset Formula $X$
  156. \end_inset
  157. is defined as the derivative of a trajectory at
  158. \begin_inset Formula $X$
  159. \end_inset
  160. , and for the NavState manifold this will be a triplet
  161. \begin_inset Formula
  162. \[
  163. \left[\dot{R}(t,X),\dot{P}(t,X),\dot{V}(t,X)\right]\in\sothree\times\Rthree\times\Rthree
  164. \]
  165. \end_inset
  166. where we use square brackets to indicate a tangent vector.
  167. The space of all tangent vectors at
  168. \begin_inset Formula $X$
  169. \end_inset
  170. is denoted by
  171. \family roman
  172. \series medium
  173. \shape up
  174. \size normal
  175. \emph off
  176. \bar no
  177. \strikeout off
  178. \uuline off
  179. \uwave off
  180. \noun off
  181. \color none
  182. \begin_inset Formula $T_{X}M$
  183. \end_inset
  184. \family default
  185. \series default
  186. \shape default
  187. \size default
  188. \emph default
  189. \bar default
  190. \strikeout default
  191. \uuline default
  192. \uwave default
  193. \noun default
  194. \color inherit
  195. , and hence
  196. \begin_inset Formula $F(t,X)\in T_{X}M$
  197. \end_inset
  198. .
  199. For example, if the state evolves along a constant velocity trajectory
  200. \begin_inset Formula
  201. \[
  202. X(t)=\left\{ R_{0},P_{0}+V_{0}t,V_{0}\right\}
  203. \]
  204. \end_inset
  205. then the differential equation describing the trajectory is
  206. \begin_inset Formula
  207. \[
  208. \dot{X}(t)=\left[0_{3x3},V_{0},0_{3x1}\right],\,\,\,\,\, X(0)=\left\{ R_{0},P_{0},V_{0}\right\}
  209. \]
  210. \end_inset
  211. \end_layout
  212. \begin_layout Standard
  213. Valid vector fields on a NavState manifold are special, in that the attitude
  214. and velocity derivatives can be arbitrary functions of X and t, but the
  215. derivative of position is constrained to be equal to the current velocity
  216. \begin_inset Formula $V(t)$
  217. \end_inset
  218. :
  219. \begin_inset Formula
  220. \begin{equation}
  221. \dot{X}(t)=\left[\dot{R}(X,t),V(t),\dot{V}(X,t)\right]\label{eq:validField}
  222. \end{equation}
  223. \end_inset
  224. Suppose we are given the
  225. \series bold
  226. body angular velocity
  227. \series default
  228. \begin_inset Formula $\omega^{b}(t)$
  229. \end_inset
  230. and non-gravity
  231. \series bold
  232. acceleration
  233. \series default
  234. \begin_inset Formula $a^{b}(t)$
  235. \end_inset
  236. in the body frame.
  237. We know (from Murray84book) that the derivative of
  238. \begin_inset Formula $R$
  239. \end_inset
  240. can be written as
  241. \begin_inset Formula
  242. \[
  243. \dot{R}(X,t)=R(t)\Skew{\omega^{b}(t)}
  244. \]
  245. \end_inset
  246. where
  247. \begin_inset Formula $\Skew{\theta}\in so(3)$
  248. \end_inset
  249. is the skew-symmetric matrix corresponding to
  250. \begin_inset Formula $\theta$
  251. \end_inset
  252. , and hence the resulting exact vector field is
  253. \begin_inset Formula
  254. \begin{equation}
  255. \dot{X}(t)=\left[\dot{R}(X,t),V(t),\dot{V}(X,t)\right]=\left[R(t)\Skew{\omega^{b}(t)},V(t),g+R(t)a^{b}(t)\right]\label{eq:bodyField}
  256. \end{equation}
  257. \end_inset
  258. \end_layout
  259. \begin_layout Subsubsection*
  260. Local Coordinates
  261. \end_layout
  262. \begin_layout Standard
  263. Optimization on manifolds relies crucially on the concept of
  264. \series bold
  265. local coordinates
  266. \series default
  267. .
  268. For example, when optimizing over the rotations
  269. \begin_inset Formula $\SOthree$
  270. \end_inset
  271. starting from an initial estimate
  272. \begin_inset Formula $R_{0}$
  273. \end_inset
  274. , we define a local map
  275. \begin_inset Formula $\Phi_{R_{0}}$
  276. \end_inset
  277. from
  278. \begin_inset Formula $\theta\in\Rthree$
  279. \end_inset
  280. to a neighborhood of
  281. \begin_inset Formula $\SOthree$
  282. \end_inset
  283. centered around
  284. \begin_inset Formula $R_{0}$
  285. \end_inset
  286. ,
  287. \begin_inset Formula
  288. \[
  289. \Phi_{R_{0}}(\theta)=R_{0}\exp\left(\Skew{\theta}\right)
  290. \]
  291. \end_inset
  292. where
  293. \begin_inset Formula $\exp$
  294. \end_inset
  295. is the matrix exponential, given by
  296. \begin_inset Formula
  297. \begin{equation}
  298. \exp\left(\Skew{\theta}\right)=\sum_{k=0}^{\infty}\frac{1}{k!}\Skew{\theta}^{k}\label{eq:expm}
  299. \end{equation}
  300. \end_inset
  301. which for
  302. \begin_inset Formula $\SOthree$
  303. \end_inset
  304. can be efficiently computed in closed form.
  305. \end_layout
  306. \begin_layout Standard
  307. The local coordinates
  308. \begin_inset Formula $\theta$
  309. \end_inset
  310. are isomorphic to tangent vectors at
  311. \emph on
  312. \begin_inset Formula $R_{0}$
  313. \end_inset
  314. \emph default
  315. .
  316. To see this, define
  317. \begin_inset Formula $\theta=\omega t$
  318. \end_inset
  319. and note that
  320. \begin_inset Formula
  321. \[
  322. \frac{d\Phi_{R_{0}}\left(\omega t\right)}{dt}\biggr\vert_{t=0}=\frac{dR_{0}\exp\left(\Skew{\omega t}\right)}{dt}\biggr\vert_{t=0}=R_{0}\Skew{\omega t}
  323. \]
  324. \end_inset
  325. Hence, the 3-vector
  326. \begin_inset Formula $\omega$
  327. \end_inset
  328. defines a direction of travel on the
  329. \begin_inset Formula $\SOthree$
  330. \end_inset
  331. manifold, but does so in the local coordinate frame define by
  332. \begin_inset Formula $R_{0}$
  333. \end_inset
  334. .
  335. \end_layout
  336. \begin_layout Standard
  337. A similar story holds in
  338. \begin_inset Formula $\SEthree$
  339. \end_inset
  340. : we define local coordinates
  341. \begin_inset Formula $\xi=\left[\omega t,vt\right]\in\Rsix$
  342. \end_inset
  343. and a mapping
  344. \begin_inset Formula
  345. \[
  346. \Phi_{T_{0}}(\xi)=T_{0}\exp\xihat
  347. \]
  348. \end_inset
  349. where
  350. \begin_inset Formula $\xihat\in\sethree$
  351. \end_inset
  352. is defined as
  353. \begin_inset Formula
  354. \[
  355. \xihat=\left[\begin{array}{cc}
  356. \Skew{\omega} & v\\
  357. 0 & 0
  358. \end{array}\right]t
  359. \]
  360. \end_inset
  361. and the 6-vectors
  362. \begin_inset Formula $\xi$
  363. \end_inset
  364. are mapped to tangent vectors
  365. \begin_inset Formula $T_{0}\xihat$
  366. \end_inset
  367. at
  368. \begin_inset Formula $T_{0}$
  369. \end_inset
  370. .
  371. \end_layout
  372. \begin_layout Subsubsection*
  373. Derivative of The Local Coordinate Mapping
  374. \end_layout
  375. \begin_layout Standard
  376. For the local coordinate mapping
  377. \family roman
  378. \series medium
  379. \shape up
  380. \size normal
  381. \emph off
  382. \bar no
  383. \strikeout off
  384. \uuline off
  385. \uwave off
  386. \noun off
  387. \color none
  388. \begin_inset Formula $\Phi_{R_{0}}\left(\theta\right)$
  389. \end_inset
  390. \family default
  391. \series default
  392. \shape default
  393. \size default
  394. \emph default
  395. \bar default
  396. \strikeout default
  397. \uuline default
  398. \uwave default
  399. \noun default
  400. \color inherit
  401. in
  402. \begin_inset Formula $\SOthree$
  403. \end_inset
  404. we can define a
  405. \begin_inset Formula $3\times3$
  406. \end_inset
  407. \family roman
  408. \series medium
  409. \shape up
  410. \size normal
  411. \emph off
  412. \bar no
  413. \strikeout off
  414. \uuline off
  415. \uwave off
  416. \noun off
  417. \color none
  418. Jacobian
  419. \begin_inset Formula $H(\theta)$
  420. \end_inset
  421. that models the effect of an incremental change
  422. \begin_inset Formula $\delta$
  423. \end_inset
  424. to the local coordinates:
  425. \family default
  426. \series default
  427. \shape default
  428. \size default
  429. \emph default
  430. \bar default
  431. \strikeout default
  432. \uuline default
  433. \uwave default
  434. \noun default
  435. \color inherit
  436. \begin_inset Formula
  437. \begin{equation}
  438. \Phi_{R_{0}}\left(\theta+\delta\right)\approx\Phi_{R_{0}}\left(\theta\right)\,\exp\left(\Skew{H(\theta)\delta}\right)=\Phi_{\Phi_{R_{0}}\left(\theta\right)}\left(H(\theta)\delta\right)\label{eq:push_exp}
  439. \end{equation}
  440. \end_inset
  441. This Jacobian depends only on
  442. \begin_inset Formula $\theta$
  443. \end_inset
  444. and, for the case of
  445. \begin_inset Formula $\SOthree$
  446. \end_inset
  447. , is given by a formula similar to the matrix exponential map,
  448. \begin_inset Formula
  449. \[
  450. H(\theta)=\sum_{k=0}^{\infty}\frac{(-1)^{k}}{(k+1)!}\Skew{\theta}^{k}
  451. \]
  452. \end_inset
  453. which can also be computed in closed form.
  454. In particular,
  455. \begin_inset Formula $H(0)=I_{3\times3}$
  456. \end_inset
  457. at the base
  458. \begin_inset Formula $R_{0}$
  459. \end_inset
  460. .
  461. \end_layout
  462. \begin_layout Subsubsection*
  463. Numerical Integration in Local Coordinates
  464. \end_layout
  465. \begin_layout Standard
  466. Inspired by the paper
  467. \begin_inset Quotes eld
  468. \end_inset
  469. Lie Group Methods
  470. \begin_inset Quotes erd
  471. \end_inset
  472. by Iserles et al.
  473. \begin_inset CommandInset citation
  474. LatexCommand cite
  475. key "Iserles00an"
  476. \end_inset
  477. , when we have a differential equation on
  478. \begin_inset Formula $\SOthree$
  479. \end_inset
  480. ,
  481. \begin_inset Formula
  482. \begin{equation}
  483. \dot{R}(t)=F(R,t),\,\,\,\, R(0)=R_{0}\label{eq:diffSo3}
  484. \end{equation}
  485. \end_inset
  486. we can transfer it to a differential equation in the 3-dimensional local
  487. coordinate space.
  488. To do so, we model the solution to
  489. \begin_inset CommandInset ref
  490. LatexCommand eqref
  491. reference "eq:diffSo3"
  492. \end_inset
  493. as
  494. \begin_inset Formula
  495. \[
  496. R(t)=\Phi_{R_{0}}(\theta(t))
  497. \]
  498. \end_inset
  499. To find an expression for
  500. \begin_inset Formula $\dot{\theta}(t)$
  501. \end_inset
  502. , create a trajectory
  503. \begin_inset Formula $\gamma(\delta)$
  504. \end_inset
  505. that passes through
  506. \begin_inset Formula $R(t)$
  507. \end_inset
  508. for
  509. \begin_inset Formula $\delta=0$
  510. \end_inset
  511. , and moves
  512. \begin_inset Formula $\theta(t)$
  513. \end_inset
  514. along the direction
  515. \begin_inset Formula $\dot{\theta}(t)$
  516. \end_inset
  517. :
  518. \begin_inset Formula
  519. \[
  520. \gamma(\delta)=R(t+\delta)=\Phi_{R_{0}}\left(\theta(t)+\dot{\theta}(t)\delta\right)\approx\Phi_{R(t)}\left(H(\theta)\dot{\theta}(t)\delta\right)
  521. \]
  522. \end_inset
  523. Taking the derivative for
  524. \begin_inset Formula $\delta=0$
  525. \end_inset
  526. we obtain
  527. \begin_inset Formula
  528. \[
  529. \dot{R}(t)=\frac{d\gamma(\delta)}{d\delta}\biggr\vert_{\delta=0}=\frac{d\Phi_{R(t)}\left(H(\theta)\dot{\theta}(t)\delta\right)}{d\delta}\biggr\vert_{\delta=0}=R(t)\Skew{H(\theta)\dot{\theta}(t)}
  530. \]
  531. \end_inset
  532. Comparing this to
  533. \begin_inset CommandInset ref
  534. LatexCommand eqref
  535. reference "eq:diffSo3"
  536. \end_inset
  537. we obtain a differential equation for
  538. \begin_inset Formula $\theta(t)$
  539. \end_inset
  540. :
  541. \begin_inset Formula
  542. \[
  543. \dot{\theta}(t)=H(\theta)^{-1}\left\{ R(t)^{T}F(R,t)\right\} \check{},\,\,\,\,\theta(0)=0_{3\times1}
  544. \]
  545. \end_inset
  546. In other words, the vector field
  547. \begin_inset Formula $F(R,t)$
  548. \end_inset
  549. is rotated to the local frame, the inverse hat operator is applied to get
  550. a 3-vector, which is then corrected by
  551. \begin_inset Formula $H(\theta)^{-1}$
  552. \end_inset
  553. away from
  554. \begin_inset Formula $\theta=0$
  555. \end_inset
  556. .
  557. \end_layout
  558. \begin_layout Subsubsection*
  559. Retractions
  560. \end_layout
  561. \begin_layout Standard
  562. \begin_inset FormulaMacro
  563. \newcommand{\Rnine}{\mathfrak{\mathbb{R}^{9}}}
  564. {\mathfrak{\mathbb{R}^{9}}}
  565. \end_inset
  566. \end_layout
  567. \begin_layout Standard
  568. Note that the use of the exponential map in local coordinate mappings is
  569. not obligatory, even in the context of Lie groups.
  570. Often it is computationally expedient to use mappings that are easier to
  571. compute, but yet induce the same tangent vector at
  572. \begin_inset Formula $T_{0}.$
  573. \end_inset
  574. Mappings that satisfy this constraint are collectively known as
  575. \series bold
  576. retractions
  577. \series default
  578. .
  579. For example, for
  580. \begin_inset Formula $\SEthree$
  581. \end_inset
  582. one could use the retraction
  583. \begin_inset Formula $\mathcal{R}_{T_{0}}:\Rsix\rightarrow\SEthree$
  584. \end_inset
  585. \begin_inset Formula
  586. \[
  587. \mathcal{R}_{T_{0}}\left(\xi\right)=T_{0}\left\{ \exp\left(\Skew{\omega t}\right),vt\right\} =\left\{ \Phi_{R_{0}}\left(\omega t\right),P_{0}+R_{0}vt\right\}
  588. \]
  589. \end_inset
  590. This trajectory describes a linear path in position while the frame rotates,
  591. as opposed to the helical path traced out by the exponential map.
  592. The tangent vector at
  593. \begin_inset Formula $T_{0}$
  594. \end_inset
  595. can be computed as
  596. \end_layout
  597. \begin_layout Standard
  598. \begin_inset Formula
  599. \[
  600. \frac{d\mathcal{R}_{T_{0}}\left(\xi\right)}{dt}\biggr\vert_{t=0}=\left[R_{0}\Skew{\omega},R_{0}v\right]
  601. \]
  602. \end_inset
  603. which is identical to the one induced by
  604. \family roman
  605. \series medium
  606. \shape up
  607. \size normal
  608. \emph off
  609. \bar no
  610. \strikeout off
  611. \uuline off
  612. \uwave off
  613. \noun off
  614. \color none
  615. \begin_inset Formula $\Phi_{T_{0}}(\xi)=T_{0}\exp\xihat$
  616. \end_inset
  617. .
  618. \end_layout
  619. \begin_layout Standard
  620. The NavState manifold is not a Lie group like
  621. \begin_inset Formula $\SEthree$
  622. \end_inset
  623. , but we can easily define a retraction that behaves similarly to the one
  624. for
  625. \begin_inset Formula $\SEthree$
  626. \end_inset
  627. , while treating velocities the same way as positions:
  628. \begin_inset Formula
  629. \[
  630. \mathcal{R}_{X_{0}}(\zeta)=\left\{ \Phi_{R_{0}}\left(\omega t\right),P_{0}+R_{0}vt,V_{0}+R_{0}at\right\}
  631. \]
  632. \end_inset
  633. Here
  634. \begin_inset Formula $\zeta=\left[\omega t,vt,at\right]$
  635. \end_inset
  636. is a 9-vector, with respectively angular, position, and velocity components.
  637. The tangent vector at
  638. \begin_inset Formula $X_{0}$
  639. \end_inset
  640. is
  641. \begin_inset Formula
  642. \[
  643. \frac{d\mathcal{R}_{X_{0}}(\zeta)}{dt}\biggr\vert_{t=0}=\left[R_{0}\Skew{\omega},R_{0}v,R_{0}a\right]
  644. \]
  645. \end_inset
  646. and the isomorphism between
  647. \begin_inset Formula $\Rnine$
  648. \end_inset
  649. and
  650. \begin_inset Formula $T_{X_{0}}M$
  651. \end_inset
  652. is
  653. \begin_inset Formula $\zeta\rightarrow\left[R_{0}\Skew{\omega t},R_{0}vt,R_{0}at\right]$
  654. \end_inset
  655. .
  656. \end_layout
  657. \begin_layout Subsubsection*
  658. Integration in Local Coordinates
  659. \end_layout
  660. \begin_layout Standard
  661. We now proceed exactly as before to describe the evolution of the NavState
  662. in local coordinates.
  663. Let us model the solution of the differential equation
  664. \begin_inset CommandInset ref
  665. LatexCommand eqref
  666. reference "eq:diffeqM"
  667. \end_inset
  668. as a trajectory
  669. \begin_inset Formula $\zeta(t)=\left[\theta(t),p(t),v(t)\right]$
  670. \end_inset
  671. , with
  672. \begin_inset Formula $\zeta(0)=0$
  673. \end_inset
  674. , in the local coordinate frame anchored at
  675. \begin_inset Formula $X_{0}$
  676. \end_inset
  677. .
  678. Note that this trajectory evolves away from
  679. \begin_inset Formula $X_{0}$
  680. \end_inset
  681. , and we use the symbols
  682. \begin_inset Formula $\theta$
  683. \end_inset
  684. ,
  685. \begin_inset Formula $p$
  686. \end_inset
  687. , and
  688. \begin_inset Formula $v$
  689. \end_inset
  690. to indicate that these are integrated rather than differential quantities.
  691. With that, we have
  692. \begin_inset Formula
  693. \begin{equation}
  694. X(t)=\mathcal{R}_{X_{0}}(\zeta(t))=\left\{ \Phi_{R_{0}}\left(\theta(t)\right),P_{0}+R_{0}p(t),V_{0}+R_{0}v(t)\right\} \label{eq:scheme1}
  695. \end{equation}
  696. \end_inset
  697. We can create a trajectory
  698. \begin_inset Formula $\gamma(\delta)$
  699. \end_inset
  700. that passes through
  701. \begin_inset Formula $X(t)$
  702. \end_inset
  703. for
  704. \begin_inset Formula $\delta=0$
  705. \end_inset
  706. \begin_inset Formula
  707. \[
  708. \gamma(\delta)=X(t+\delta)=\left\{ \Phi_{R_{0}}\left(\theta(t)+\dot{\theta}(t)\delta\right),P_{0}+R_{0}\left\{ p(t)+\dot{p}(t)\delta\right\} ,V_{0}+R_{0}\left\{ v(t)+\dot{v}(t)\delta\right\} \right\}
  709. \]
  710. \end_inset
  711. and taking the derivative for
  712. \begin_inset Formula $\delta=0$
  713. \end_inset
  714. we obtain
  715. \begin_inset Formula
  716. \[
  717. \dot{X}(t)=\frac{d\gamma(\delta)}{d\delta}\biggr\vert_{\delta=0}=\left[R(t)\Skew{H(\theta)\dot{\theta}(t)},R_{0}\,\dot{p}(t),R_{0}\,\dot{v}(t)\right]
  718. \]
  719. \end_inset
  720. Comparing that with the vector field
  721. \begin_inset CommandInset ref
  722. LatexCommand eqref
  723. reference "eq:bodyField"
  724. \end_inset
  725. , we have exact integration iff
  726. \begin_inset Formula
  727. \[
  728. \left[R(t)\Skew{H(\theta)\dot{\theta}(t)},R_{0}\,\dot{p}(t),R_{0}\,\dot{v}(t)\right]=\left[R(t)\Skew{\omega^{b}(t)},V(t),g+R(t)a^{b}(t)\right]
  729. \]
  730. \end_inset
  731. Or, as another way to state this, if we solve the differential equations
  732. for
  733. \begin_inset Formula $\theta(t)$
  734. \end_inset
  735. ,
  736. \begin_inset Formula $p(t)$
  737. \end_inset
  738. , and
  739. \begin_inset Formula $v(t)$
  740. \end_inset
  741. such that
  742. \begin_inset Formula
  743. \begin{eqnarray*}
  744. \dot{\theta}(t) & = & H(\theta)^{-1}\,\omega^{b}(t)\\
  745. \dot{p}(t) & = & R_{0}^{T}\, V_{0}+v(t)\\
  746. \dot{v}(t) & = & R_{0}^{T}\, g+R_{b}^{0}(t)a^{b}(t)
  747. \end{eqnarray*}
  748. \end_inset
  749. where
  750. \family roman
  751. \series medium
  752. \shape up
  753. \size normal
  754. \emph off
  755. \bar no
  756. \strikeout off
  757. \uuline off
  758. \uwave off
  759. \noun off
  760. \color none
  761. \begin_inset Formula $R_{b}^{0}(t)=R_{0}^{T}R(t)$
  762. \end_inset
  763. is the rotation of the body frame with respect to
  764. \begin_inset Formula $R_{0}$
  765. \end_inset
  766. , and we have used
  767. \begin_inset Formula $V(t)=V_{0}+R_{0}v(t)$
  768. \end_inset
  769. .
  770. \end_layout
  771. \begin_layout Subsubsection*
  772. Application: The New IMU Factor
  773. \end_layout
  774. \begin_layout Standard
  775. In the IMU factor, we need to predict the NavState
  776. \begin_inset Formula $X_{j}$
  777. \end_inset
  778. from the current NavState
  779. \begin_inset Formula $X_{i}$
  780. \end_inset
  781. and the IMU measurements in-between.
  782. The above scheme suffers from a problem, which is that
  783. \begin_inset Formula $X_{i}$
  784. \end_inset
  785. needs to be known in order to compensate properly for the initial velocity
  786. and rotated gravity vector.
  787. Hence, the idea of Lupton was to split up
  788. \begin_inset Formula $v(t)$
  789. \end_inset
  790. into a gravity-induced part and an accelerometer part
  791. \begin_inset Formula
  792. \[
  793. v(t)=v_{g}(t)+v_{a}(t)
  794. \]
  795. \end_inset
  796. evolving as
  797. \begin_inset Formula
  798. \begin{eqnarray*}
  799. \dot{v}_{g}(t) & = & R_{i}^{T}\, g\\
  800. \dot{v}_{a}(t) & = & R_{b}^{i}(t)a^{b}(t)
  801. \end{eqnarray*}
  802. \end_inset
  803. The solution for the first equation is simply
  804. \begin_inset Formula $v_{g}(t)=R_{i}^{T}gt$
  805. \end_inset
  806. .
  807. Similarly, we split the position
  808. \begin_inset Formula $p(t)$
  809. \end_inset
  810. up in three parts
  811. \begin_inset Formula
  812. \[
  813. p(t)=p_{i}(t)+p_{g}(t)+p_{v}(t)
  814. \]
  815. \end_inset
  816. evolving as
  817. \begin_inset Formula
  818. \begin{eqnarray*}
  819. \dot{p}_{i}(t) & = & R_{i}^{T}\, V_{i}\\
  820. \dot{p}_{g}(t) & = & v_{g}(t)=R_{i}^{T}gt\\
  821. \dot{p}_{v}(t) & = & v_{a}(t)
  822. \end{eqnarray*}
  823. \end_inset
  824. Here the solutions for the two first equations are simply
  825. \begin_inset Formula
  826. \begin{eqnarray*}
  827. p_{i}(t) & = & R_{i}^{T}V_{i}t\\
  828. p_{g}(t) & = & R_{i}^{T}\frac{gt^{2}}{2}
  829. \end{eqnarray*}
  830. \end_inset
  831. The recipe for the IMU factor is then, in summary.
  832. Solve the ordinary differential equations
  833. \begin_inset Formula
  834. \begin{eqnarray*}
  835. \dot{\theta}(t) & = & H(\theta(t))^{-1}\,\omega^{b}(t)\\
  836. \dot{p}_{v}(t) & = & v_{a}(t)\\
  837. \dot{v}_{a}(t) & = & R_{b}^{i}(t)a^{b}(t)
  838. \end{eqnarray*}
  839. \end_inset
  840. starting from zero, up to time
  841. \begin_inset Formula $t_{ij}$
  842. \end_inset
  843. , where
  844. \begin_inset Formula $R_{b}^{i}(t)=\exp\Skew{\theta(t)}$
  845. \end_inset
  846. at all times.
  847. Form the local coordinate vector as
  848. \begin_inset Formula
  849. \[
  850. \zeta(t_{ij})=\left[\theta(t_{ij}),p(t_{ij}),v(t_{ij})\right]=\left[\theta(t_{ij}),R_{i}^{T}V_{i}t_{ij}+R_{i}^{T}\frac{gt_{ij}^{2}}{2}+p_{v}(t_{ij}),R_{i}^{T}gt_{ij}+v_{a}(t_{ij})\right]
  851. \]
  852. \end_inset
  853. Predict the NavState
  854. \begin_inset Formula $X_{j}$
  855. \end_inset
  856. at time
  857. \begin_inset Formula $t_{j}$
  858. \end_inset
  859. from
  860. \begin_inset Formula
  861. \[
  862. X_{j}=\mathcal{R}_{X_{i}}(\zeta(t_{ij}))=\left\{ \Phi_{R_{0}}\left(\theta(t_{ij})\right),P_{i}+V_{i}t_{ij}+\frac{gt_{ij}^{2}}{2}+R_{i}\, p_{v}(t_{ij}),V_{i}+gt_{ij}+R_{i}\, v_{a}(t_{ij})\right\}
  863. \]
  864. \end_inset
  865. \end_layout
  866. \begin_layout Standard
  867. Note that the predicted NavState
  868. \begin_inset Formula $X_{j}$
  869. \end_inset
  870. depends on
  871. \begin_inset Formula $X_{i}$
  872. \end_inset
  873. , but the integrated quantities
  874. \begin_inset Formula $\theta(t)$
  875. \end_inset
  876. ,
  877. \begin_inset Formula $p_{v}(t)$
  878. \end_inset
  879. , and
  880. \begin_inset Formula $v_{a}(t)$
  881. \end_inset
  882. do not.
  883. \end_layout
  884. \begin_layout Subsubsection*
  885. A Simple Euler Scheme
  886. \end_layout
  887. \begin_layout Standard
  888. To solve the differential equation we can use a simple Euler scheme:
  889. \begin_inset Formula
  890. \begin{eqnarray}
  891. \theta_{k+1}=\theta_{k}+\dot{\theta}(t_{k})\Delta_{t} & = & \theta_{k}+H(\theta_{k})^{-1}\,\omega_{k}^{b}\Delta_{t}\label{eq:euler_theta-1}\\
  892. p_{k+1}=p_{k}+\dot{p}_{v}(t_{k})\Delta_{t} & = & p_{k}+v_{k}\Delta_{t}\label{eq:euler_p-1}\\
  893. v_{k+1}=v_{k}+\dot{v}_{a}(t_{k})\Delta_{t} & = & v_{k}+\exp\left(\Skew{\theta_{k}}\right)a_{k}^{b}\Delta_{t}\label{eq:euler_v-1}
  894. \end{eqnarray}
  895. \end_inset
  896. where
  897. \begin_inset Formula $\theta_{k}\define\theta(t_{k})$
  898. \end_inset
  899. ,
  900. \begin_inset Formula $p_{k}\define p_{v}(t_{k})$
  901. \end_inset
  902. , and
  903. \begin_inset Formula $v_{k}\define v_{a}(t_{k})$
  904. \end_inset
  905. .
  906. However, the position propagation can be done more accurately, by using
  907. exact integration of the zero-order hold acceleration
  908. \begin_inset Formula $a_{k}^{b}$
  909. \end_inset
  910. :
  911. \begin_inset Formula
  912. \begin{eqnarray}
  913. \theta_{k+1} & = & \theta_{k}+H(\theta_{k})^{-1}\,\omega_{k}^{b}\Delta_{t}\label{eq:euler_theta}\\
  914. p_{k+1} & = & p_{k}+v_{k}\Delta_{t}+R_{k}a_{k}^{b}\frac{\Delta_{t}^{2}}{2}\label{eq:euler_p}\\
  915. v_{k+1} & = & v_{k}+R_{k}a_{k}^{b}\Delta_{t}\label{eq:euler_v}
  916. \end{eqnarray}
  917. \end_inset
  918. where we defined the rotation matrix
  919. \begin_inset Formula $R_{k}=\exp\left(\Skew{\theta_{k}}\right)$
  920. \end_inset
  921. .
  922. \end_layout
  923. \begin_layout Subsubsection*
  924. Noise Propagation
  925. \end_layout
  926. \begin_layout Standard
  927. Even when we assume uncorrelated noise on
  928. \begin_inset Formula $\omega^{b}$
  929. \end_inset
  930. and
  931. \begin_inset Formula $a^{b}$
  932. \end_inset
  933. , the noise on the final computed quantities will have a non-trivial covariance
  934. structure, because the intermediate quantities
  935. \begin_inset Formula $\theta_{k}$
  936. \end_inset
  937. and
  938. \begin_inset Formula $v_{k}$
  939. \end_inset
  940. appear in multiple places.
  941. To model the noise propagation, let us define
  942. \begin_inset Formula $\zeta_{k}=[\theta_{k},p_{k},v_{k}]$
  943. \end_inset
  944. and rewrite Eqns.
  945. (
  946. \begin_inset CommandInset ref
  947. LatexCommand ref
  948. reference "eq:euler_theta"
  949. \end_inset
  950. -
  951. \begin_inset CommandInset ref
  952. LatexCommand ref
  953. reference "eq:euler_v"
  954. \end_inset
  955. ) as the non-linear function
  956. \begin_inset Formula $f$
  957. \end_inset
  958. \begin_inset Formula
  959. \[
  960. \zeta_{k+1}=f\left(\zeta_{k},a_{k}^{b},\omega_{k}^{b}\right)
  961. \]
  962. \end_inset
  963. Then the noise on
  964. \begin_inset Formula $\zeta_{k+1}$
  965. \end_inset
  966. propagates as
  967. \begin_inset Formula
  968. \begin{equation}
  969. \Sigma_{k+1}=A_{k}\Sigma_{k}A_{k}^{T}+B_{k}\Sigma_{\eta}^{ad}B_{k}+C_{k}\Sigma_{\eta}^{gd}C_{k}\label{eq:prop}
  970. \end{equation}
  971. \end_inset
  972. where
  973. \begin_inset Formula $A_{k}$
  974. \end_inset
  975. is the
  976. \begin_inset Formula $9\times9$
  977. \end_inset
  978. partial derivative of
  979. \begin_inset Formula $f$
  980. \end_inset
  981. wrpt
  982. \begin_inset Formula $\zeta$
  983. \end_inset
  984. , and
  985. \begin_inset Formula $B_{k}$
  986. \end_inset
  987. and
  988. \begin_inset Formula $C_{k}$
  989. \end_inset
  990. the respective
  991. \begin_inset Formula $9\times3$
  992. \end_inset
  993. partial derivatives with respect to the measured quantities
  994. \begin_inset Formula $a^{b}$
  995. \end_inset
  996. and
  997. \begin_inset Formula $\omega^{b}$
  998. \end_inset
  999. .
  1000. \end_layout
  1001. \begin_layout Standard
  1002. We start with the noise propagation on
  1003. \begin_inset Formula $\theta$
  1004. \end_inset
  1005. , which is independent of the other quantities.
  1006. Taking the derivative, we have
  1007. \end_layout
  1008. \begin_layout Standard
  1009. \begin_inset Formula
  1010. \[
  1011. \deriv{\theta_{k+1}}{\theta_{k}}=I_{3x3}+\deriv{H(\theta_{k})^{-1}\omega_{k}^{b}}{\theta_{k}}\Delta_{t}
  1012. \]
  1013. \end_inset
  1014. It can be shown that for small
  1015. \begin_inset Formula $\theta_{k}$
  1016. \end_inset
  1017. we have
  1018. \begin_inset Formula
  1019. \[
  1020. \deriv{H(\theta_{k})^{-1}\omega_{k}^{b}}{\theta_{k}}\approx-\frac{1}{2}\Skew{\omega_{k}^{b}}\mbox{ and hence }\deriv{\theta_{k+1}}{\theta_{k}}=I_{3x3}-\frac{\Delta t}{2}\Skew{\omega_{k}^{b}}
  1021. \]
  1022. \end_inset
  1023. For the derivatives of
  1024. \begin_inset Formula $p_{k+1}$
  1025. \end_inset
  1026. and
  1027. \begin_inset Formula $v_{k+1}$
  1028. \end_inset
  1029. we need the derivative
  1030. \begin_inset Formula
  1031. \[
  1032. \deriv{R_{k}a_{k}^{b}}{\theta_{k}}=R_{k}\Skew{-a_{k}^{b}}\deriv{R_{k}}{\theta_{k}}=R_{k}\Skew{-a_{k}^{b}}H(\theta_{k})
  1033. \]
  1034. \end_inset
  1035. where we used
  1036. \begin_inset Formula
  1037. \[
  1038. \deriv{\left(Ra\right)}R\approx R\Skew{-a}
  1039. \]
  1040. \end_inset
  1041. and the fact that the dependence of the rotation
  1042. \begin_inset Formula $R_{k}$
  1043. \end_inset
  1044. on
  1045. \begin_inset Formula $\theta_{k}$
  1046. \end_inset
  1047. is the already computed
  1048. \begin_inset Formula $H(\theta_{k})$
  1049. \end_inset
  1050. .
  1051. \end_layout
  1052. \begin_layout Standard
  1053. Putting all this together, we finally obtain
  1054. \begin_inset Formula
  1055. \[
  1056. A_{k}\approx\left[\begin{array}{ccc}
  1057. I_{3\times3}-\frac{\Delta_{t}}{2}\Skew{\omega_{k}^{b}}\\
  1058. R_{k}\Skew{-a_{k}^{b}}H(\theta_{k})\frac{\Delta_{t}}{2}^{2} & I_{3\times3} & I_{3\times3}\Delta_{t}\\
  1059. R_{k}\Skew{-a_{k}^{b}}H(\theta_{k})\Delta_{t} & & I_{3\times3}
  1060. \end{array}\right]
  1061. \]
  1062. \end_inset
  1063. The other partial derivatives are simply
  1064. \begin_inset Formula
  1065. \[
  1066. B_{k}=\left[\begin{array}{c}
  1067. 0_{3\times3}\\
  1068. R_{k}\frac{\Delta_{t}}{2}^{2}\\
  1069. R_{k}\Delta_{t}
  1070. \end{array}\right],\,\,\,\, C_{k}=\left[\begin{array}{c}
  1071. H(\theta_{k})^{-1}\Delta_{t}\\
  1072. 0_{3\times3}\\
  1073. 0_{3\times3}
  1074. \end{array}\right]
  1075. \]
  1076. \end_inset
  1077. \end_layout
  1078. \begin_layout Standard
  1079. \begin_inset CommandInset bibtex
  1080. LatexCommand bibtex
  1081. bibfiles "refs"
  1082. options "plain"
  1083. \end_inset
  1084. \end_layout
  1085. \end_body
  1086. \end_document