| 1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 |
% |
| 3 |
% Presentation for: |
| 4 |
% |
| 5 |
% Workshop on Adaptive Filters in Bucure\c{s}ti / Romania |
| 6 |
% (March 2003) |
| 7 |
% |
| 8 |
% (c) Matthias M\"{u}hlich, 03/2003 |
| 9 |
% |
| 10 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
% this file must be processed with pdflatex! |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
\documentclass[english,pdftex]{article} |
| 19 |
|
| 20 |
\usepackage{babel} %% hyphenation patterns - takes global option english |
| 21 |
\usepackage{palatino} %% Palatino fonts |
| 22 |
\usepackage{mathptm} %% PostScript Type 1 math fonts |
| 23 |
\usepackage{textcomp} %% symbols |
| 24 |
\usepackage[paneltoc,sectionbreak]{pdfwin} %% my presentation style file |
| 25 |
%% takes global options english + pdftex |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
% character protruding; disabled for higher compatibility |
| 30 |
%\input{normprot.tex} |
| 31 |
|
| 32 |
% abbreviation for vectors |
| 33 |
\input{shortvec.tex} |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
% SETUP OF PDFWIN PACKAGE |
| 38 |
% |
| 39 |
% define windows and margins |
| 40 |
\SetScreen{width=12cm, height=9cm} |
| 41 |
\SetWindow{text}{basex=0.2cm, basey=0.2cm, width=9.4cm,height=8.6cm, |
| 42 |
borderthickness=0.4mm} |
| 43 |
\SetWindow{panel}{basex=9.8cm, basey=0.2cm, width=2cm, |
| 44 |
height=8.6cm, borderthickness=0.4mm} |
| 45 |
\SetButtons{width=1.6cm, shadowdepth=0.3mm} |
| 46 |
\SetMargins{.5cm}{.5cm}{.5cm}{.5cm} |
| 47 |
% |
| 48 |
% define panel |
| 49 |
\SetLogo{filename=JWGU-Logo.png,width=1.3cm, shadowdepth=.7mm} |
| 50 |
\SetScreen{type=wallpaper, filename=marble.png} |
| 51 |
\SetPaneltext{\scriptsize\sffamily Filter-Workshop\\Bucure\c{s}ti |
| 52 |
2003} |
| 53 |
\renewcommand{\DrawNavigationPanel}{ |
| 54 |
\ShowPageInfo\par\vfill |
| 55 |
\FirstLastButton\par\vfill |
| 56 |
\PrevNextButton\par\vfill |
| 57 |
\BackForwardButton\par\vfill |
| 58 |
\FullScreenButton\par\vfill |
| 59 |
\SearchButton\par\vfill |
| 60 |
\CloseButton\par\vfill |
| 61 |
} |
| 62 |
|
| 63 |
|
| 64 |
% COLORS |
| 65 |
% |
| 66 |
% windows |
| 67 |
\definecolor{titlecolor}{rgb}{.7,.15,.1} |
| 68 |
\definecolor{TextBackgroundColor}{rgb}{.7,.8,1.0} |
| 69 |
\definecolor{TextBorderColor}{rgb}{0,0,.5} |
| 70 |
% |
| 71 |
% colors for presentation |
| 72 |
\definecolor{StateColor}{rgb}{0,0,.6} |
| 73 |
\definecolor{StateFuncColor}{rgb}{.4,0,.3} |
| 74 |
\definecolor{StateNoiseColor}{rgb}{.3,.3,.7} |
| 75 |
\definecolor{MeasColor}{rgb}{0,.5,0} |
| 76 |
\definecolor{MeasFuncColor}{rgb}{.4,.3,0} |
| 77 |
\definecolor{MeasNoiseColor}{rgb}{.3,.7,.3} |
| 78 |
\definecolor{InputColor}{rgb}{.7,0,0} |
| 79 |
% |
| 80 |
% colors for environments |
| 81 |
\definecolor{CodeTextColor}{rgb}{0,0.3,0} |
| 82 |
\definecolor{CodeMathColor}{rgb}{0.1,0.3,0.6} |
| 83 |
\definecolor{MyBoxColor1}{rgb}{.8,.5,.1} |
| 84 |
\definecolor{MyBoxColor2}{rgb}{.9,.8,.3} |
| 85 |
\definecolor{MyBoxiiColor1}{rgb}{.8,.6,.4} |
| 86 |
\definecolor{MyBoxiiColor2}{rgb}{.9,.8,.7} |
| 87 |
\definecolor{MyCodeBoxColor1}{rgb}{.3,.6,.2} |
| 88 |
\definecolor{MyCodeBoxColor2}{rgb}{.8,.9,.7} |
| 89 |
% |
| 90 |
% misc |
| 91 |
\definecolor{dgreen}{rgb}{0,.6,0} |
| 92 |
|
| 93 |
|
| 94 |
% LAYOUT |
| 95 |
% |
| 96 |
% general layout |
| 97 |
\tolerance=2000 |
| 98 |
\emergencystretch=5em |
| 99 |
\fboxsep=3mm |
| 100 |
\setlength{\parskip}{4pt plus 2pt minus 1pt} |
| 101 |
\setlength{\parindent}{0pt} |
| 102 |
\frenchspacing |
| 103 |
% |
| 104 |
% define page transition style |
| 105 |
\pdfpageattr{/Trans << /S /Dissolve /D 0.3 >>} |
| 106 |
% |
| 107 |
% replace default font (roman default) by computer modern sans serif; |
| 108 |
% Palatino only for panel |
| 109 |
% NOTE: brute force, no good style here... |
| 110 |
\renewcommand{\rmdefault}{cmss} |
| 111 |
% |
| 112 |
% redefine vector style (boldface instead of arrow on top) |
| 113 |
\renewcommand{\vec}[1]{\mathbf{#1}} |
| 114 |
% |
| 115 |
% redefine section numbering: only section (and no subsection or lower) |
| 116 |
% gets a number |
| 117 |
\setcounter{secnumdepth}{1} |
| 118 |
|
| 119 |
|
| 120 |
% NEW COMMANDS |
| 121 |
% |
| 122 |
\newcommand{\Realnumbers}{\mathrm{I\!R}} |
| 123 |
\newcommand{\Expect}[1]{\mbox{{\sf E}}\left[ #1 \right]} |
| 124 |
\newcommand{\Cov}[1]{\mbox{\sf Cov}\left[ #1 \right]} |
| 125 |
% |
| 126 |
\newcommand{\mybox}[1]{\begin{center}% |
| 127 |
\fboxrule=.5mm% |
| 128 |
\fcolorbox{MyBoxColor1}{MyBoxColor2}{% |
| 129 |
\parbox[c]{.9\textwidth}{#1}}% |
| 130 |
\end{center}} |
| 131 |
% |
| 132 |
\newcommand{\myboxii}[1]{\begin{center}% |
| 133 |
\fboxrule=.5mm% |
| 134 |
\fcolorbox{MyBoxiiColor1}{MyBoxiiColor2}{% |
| 135 |
\parbox[c]{.9\textwidth}{#1}}% |
| 136 |
\end{center}} |
| 137 |
% |
| 138 |
\newcommand{\mycodebox}[1]{\begin{center}% |
| 139 |
\fboxrule=.5mm% |
| 140 |
\ttfamily\bfseries% |
| 141 |
\color{CodeTextColor}% |
| 142 |
\fcolorbox{MyCodeBoxColor1}{MyCodeBoxColor2}{% |
| 143 |
\parbox[c]{.9\textwidth}{#1}}% |
| 144 |
\end{center}} |
| 145 |
% |
| 146 |
\newcommand{\codemath}[1]{\textcolor{CodeMathColor}{$#1$}} |
| 147 |
\newcommand{\codetext}[1]{\textsf{\mdseries\small #1}} |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
%==================================================================== |
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
\begin{document} |
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
% produce panel TOC entry for title page |
| 160 |
\AddPanelTocEntry{Title Page}% |
| 161 |
|
| 162 |
{\centering {\Huge\bfseries\color{titlecolor} |
| 163 |
Particle Filters\rule[-.6ex]{0pt}{5ex}\\ |
| 164 |
\LARGE an overview\rule[-.6ex]{0pt}{3ex}\\ |
| 165 |
} \vspace*{8mm} |
| 166 |
{\Large Matthias M\"{u}hlich}\\[3ex] |
| 167 |
\large Institut f{\"u}r Angewandte Physik\\ |
| 168 |
J.W.Goethe-Universit{\"a}t Frankfurt\\ |
| 169 |
\href{mailto:[email protected]}{\color{black}[email protected]}\\ |
| 170 |
} |
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
\newpage |
| 176 |
|
| 177 |
% replacement title page |
| 178 |
{\centering {\Huge\bfseries\color{titlecolor} |
| 179 |
Particle Filters\rule[-.6ex]{0pt}{5ex}\\ |
| 180 |
\LARGE a tutorial\rule[-.6ex]{0pt}{3ex}\\ |
| 181 |
} \vspace*{8mm} |
| 182 |
{\Large Matthias M\"{u}hlich}\\[3ex] |
| 183 |
\large Institut f{\"u}r Angewandte Physik\\ |
| 184 |
J.W.Goethe-Universit{\"a}t Frankfurt\\ |
| 185 |
\href{mailto:[email protected]}{\color{black}[email protected]}\\ |
| 186 |
} |
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
\section{Introduction} |
| 192 |
\label{Intro} |
| 193 |
|
| 194 |
% change text window style from normal (-> title page) to transparent |
| 195 |
% (-> rest of talk); must appear after page break, i.e. section command |
| 196 |
% ("sectionbreak" option for pdfwin produces page break at each \section |
| 197 |
% command) |
| 198 |
\SetWindow{text}{type=transparent, borderthickness=0.5mm} |
| 199 |
|
| 200 |
|
| 201 |
An increasing number of researchers is using a family of |
| 202 |
techniques and algorithms called |
| 203 |
\begin{itemize} |
| 204 |
\itemsep=-1mm |
| 205 |
\item \textit{condensation algorithms} |
| 206 |
\item \textit{bootstrap filtering} |
| 207 |
\item \textit{particle filters} |
| 208 |
\item \textit{interacting particle approximations} |
| 209 |
\item \textit{sequential Monte Carlo methods} |
| 210 |
\item \textit{SIS, SIR, ASIR, RPF, \dots} |
| 211 |
\end{itemize} |
| 212 |
Time scale: last 10 years [e.g. Isard \& Blake 1996; Kitagawa |
| 213 |
1996; Gordon, Salmond \& Smith 1993] |
| 214 |
% |
| 215 |
\mybox{The question of this talk is: What is behind all that?} |
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
\newpage |
| 220 |
\subsection{General Classification of %On-line |
| 221 |
Filter Strategies} |
| 222 |
|
| 223 |
Gaussian models: |
| 224 |
\begin{itemize} |
| 225 |
\item Kalman filter |
| 226 |
\item extended Kalman filter |
| 227 |
\item linear-update filter / linear regression filter /\\ |
| 228 |
statistical linearization filter |
| 229 |
\begin{itemize} |
| 230 |
\item unscented filter |
| 231 |
\item central difference filter |
| 232 |
\item divided difference filter |
| 233 |
\end{itemize} |
| 234 |
\item assumed density filter / moment matching |
| 235 |
\end{itemize} |
| 236 |
|
| 237 |
\newpage |
| 238 |
Mixture of Gaussian models: |
| 239 |
\begin{itemize} |
| 240 |
\item assumed density filter / pseudo-Bayes |
| 241 |
\item Gaussian-sum filter |
| 242 |
\end{itemize} |
| 243 |
|
| 244 |
\bigskip |
| 245 |
Nonparametric models: |
| 246 |
\begin{itemize} |
| 247 |
\item \textcolor{red}{\bfseries particle filter class} |
| 248 |
\item histogram filter |
| 249 |
\end{itemize} |
| 250 |
|
| 251 |
|
| 252 |
\newpage |
| 253 |
\subsection{Some Basic Remarks} |
| 254 |
|
| 255 |
\begin{itemize} |
| 256 |
\item various applications: computer vision (i.e. tracking), |
| 257 |
control theory, econometrics (stock markets, monetary flow, interest |
| 258 |
rates), \dots |
| 259 |
\item we deal with discrete time systems only |
| 260 |
\item no out-of-sequence measurements |
| 261 |
\item we are mainly interested in estimating the state at time |
| 262 |
$k$ from measurements up to time $k'=k$ (opposite: smoothing |
| 263 |
($k'>k$) and prediction ($k'<k$); furthermore $k'$ need not be |
| 264 |
fixed\dots) |
| 265 |
\item no restrictions to linear processes or Gaussian noise! |
| 266 |
\end{itemize} |
| 267 |
|
| 268 |
|
| 269 |
\inithighlight{\subsection*{Overview of this Talk} |
| 270 |
\begin{center} |
| 271 |
\begin{itemize} |
| 272 |
\item |
| 273 |
{\color{color1} The Dynamic System Model} |
| 274 |
\item |
| 275 |
{\color{color2} Bayesian Filter Approach} |
| 276 |
\item |
| 277 |
{\color{color3} Optimal and Suboptimal Solutions} |
| 278 |
\item |
| 279 |
{\color{color4} The Particle Filter} |
| 280 |
\item |
| 281 |
{\color{color5} Experiments and Summary} |
| 282 |
\end{itemize} |
| 283 |
\end{center} |
| 284 |
\vspace{4mm} } |
| 285 |
|
| 286 |
|
| 287 |
\highlightnext |
| 288 |
\pagenumbering{incremental} |
| 289 |
|
| 290 |
-- states of a system and state transition equation |
| 291 |
|
| 292 |
-- measurement equation |
| 293 |
|
| 294 |
|
| 295 |
\highlightnext |
| 296 |
|
| 297 |
-- estimation of the state |
| 298 |
|
| 299 |
-- probabilistic modelling |
| 300 |
|
| 301 |
-- Bayesian filter |
| 302 |
|
| 303 |
|
| 304 |
\highlightnext |
| 305 |
|
| 306 |
-- filtered pdf can be written down easily, but it is not always |
| 307 |
tractable ($\rightarrow$ ugly integrals \dots) |
| 308 |
|
| 309 |
-- conditions under which optimal solutions exist: Kalman filter |
| 310 |
and grid-based filter |
| 311 |
|
| 312 |
-- what can be done in other cases: suboptimal approaches |
| 313 |
|
| 314 |
|
| 315 |
\highlightnext |
| 316 |
|
| 317 |
-- standard particle filter |
| 318 |
|
| 319 |
-- various improved versions |
| 320 |
|
| 321 |
|
| 322 |
\highlightnext |
| 323 |
|
| 324 |
-- some experimental data and conclusion |
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
\newpage |
| 329 |
\pagenumbering{restore} |
| 330 |
|
| 331 |
|
| 332 |
\section{Dynamic System} |
| 333 |
|
| 334 |
A dynamic system can be modelled with two equations: |
| 335 |
|
| 336 |
\subsection{State Transition or Evolution Equation} |
| 337 |
\[ |
| 338 |
{\color{StateColor}\vx_k} = {\color{StateFuncColor}f_k}({\color{StateColor}\vx_{k-1}}, |
| 339 |
{\color{InputColor}\vu_{k-1}},{\color{StateNoiseColor}\vv_{k-1}}) |
| 340 |
\] |
| 341 |
|
| 342 |
${\color{StateFuncColor}f}(\cdot,\cdot,\cdot)$: |
| 343 |
{\color{StateFuncColor}evolution |
| 344 |
function} (possible non-linear) \\ |
| 345 |
${\color{StateColor}\vx_k}, {\color{StateColor}\vx_{k-1}} \in |
| 346 |
\Realnumbers^{n_x}$: |
| 347 |
current and previous {\color{StateColor}state} \\ |
| 348 |
${\color{StateNoiseColor}\vv_{k-1}} \in \Realnumbers^{n_v}$: |
| 349 |
{\color{StateNoiseColor}state noise} |
| 350 |
(usually \emph{not} Gaussian)\\ |
| 351 |
${\color{InputColor}\vu_{k-1}} \in |
| 352 |
\Realnumbers^{n_u}$: known {\color{InputColor}input} |
| 353 |
|
| 354 |
\bigskip |
| 355 |
Note: state only depends on previous state, i.e. first order |
| 356 |
Markov process |
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
\newpage |
| 362 |
\subsection{Measurement Equation} |
| 363 |
\[ |
| 364 |
{\color{MeasColor}\vz_k} = {\color{MeasFuncColor}h_k}({\color{StateColor}\vx_k}, |
| 365 |
{\color{InputColor}\vu_k},{\color{MeasNoiseColor}\vn_k}) |
| 366 |
\] |
| 367 |
|
| 368 |
${\color{MeasFuncColor}h}(\cdot,\cdot,\cdot)$: |
| 369 |
{\color{MeasFuncColor}measurement |
| 370 |
function} (possible non-linear) \\ |
| 371 |
${\color{MeasColor}\vz_k} \in |
| 372 |
\Realnumbers^{n_z}$: {\color{MeasColor}measurement} \\ |
| 373 |
${\color{StateColor}\vx_k} \in |
| 374 |
\Realnumbers^{n_x}$: {\color{StateColor}state} \\ |
| 375 |
${\color{MeasNoiseColor}\vn_k} \in \Realnumbers^{n_n}$: |
| 376 |
{\color{MeasNoiseColor}measurement noise} |
| 377 |
(usually \emph{not} Gaussian)\\ |
| 378 |
${\color{InputColor}\vu_k} \in |
| 379 |
\Realnumbers^{n_u}$: known {\color{InputColor}input} |
| 380 |
|
| 381 |
\bigskip |
| 382 |
(dimensionality of {\color{StateColor}state}, |
| 383 |
{\color{MeasColor}measurement}, {\color{InputColor}input}, |
| 384 |
{\color{StateNoiseColor}state noise}, and |
| 385 |
{\color{MeasNoiseColor}measurement noise} can all be different!) |
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
\newpage |
| 391 |
\pagenumbering{incremental} |
| 392 |
\includegraphics[width=.99\textwidth]{BucSystem1} |
| 393 |
|
| 394 |
|
| 395 |
\newpage |
| 396 |
\includegraphics[width=.99\textwidth]{BucSystem2} |
| 397 |
|
| 398 |
|
| 399 |
\newpage |
| 400 |
\includegraphics[width=.99\textwidth]{BucSystem3} |
| 401 |
|
| 402 |
|
| 403 |
\newpage |
| 404 |
\includegraphics[width=.99\textwidth]{BucSystem4} |
| 405 |
|
| 406 |
|
| 407 |
\newpage |
| 408 |
\includegraphics[width=.99\textwidth]{BucSystem5} |
| 409 |
|
| 410 |
|
| 411 |
\newpage |
| 412 |
\includegraphics[width=.99\textwidth]{BucSystem6} |
| 413 |
|
| 414 |
Assumptions: |
| 415 |
|
| 416 |
The observations are conditionally independent given the state: |
| 417 |
$p(\vz_k|\vx_k)$. |
| 418 |
|
| 419 |
Hidden Markov Model (HMM):\\ |
| 420 |
$p(\vx_0)$ given and $p(\vx_k|\vx_{k-1})$ defines state transition probability for $k \ge 1$. |
| 421 |
|
| 422 |
|
| 423 |
\newpage |
| 424 |
\pagenumbering{restore} |
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
\section{Bayesian Filters} |
| 430 |
|
| 431 |
|
| 432 |
\subsection{Estimating the Posterior} |
| 433 |
|
| 434 |
Bayesian approach: We attempt to construct the posterior pdf of |
| 435 |
the state given all measurements. |
| 436 |
|
| 437 |
$\Rightarrow$ can be termed a complete solution to the estimation |
| 438 |
problem because all available information is used; from the pdf, |
| 439 |
an optimal estimate can theoretically be found for any criterion. |
| 440 |
|
| 441 |
in detail: We seek estimates of $\vx_k$ based on all available |
| 442 |
measurements up to time $k$ (abbreviated as $\vz_{1:k}$) by |
| 443 |
constructing the posterior $p(\vx_k|\vz_{1:k})$. |
| 444 |
|
| 445 |
Assumption: initial state pdf (prior) $p(\vx_0)$ is given |
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
\newpage |
| 450 |
\subsection{The Use of Knowing the Posterior} |
| 451 |
|
| 452 |
Let $f_k : \Realnumbers^{(k+1)\times n_x} \to \Realnumbers$ be any |
| 453 |
arbitrary (integrable) function that can depend |
| 454 |
\begin{itemize} |
| 455 |
\item on all components of the state $\vx$ |
| 456 |
\item on the whole trajectory in state-space |
| 457 |
\end{itemize} |
| 458 |
|
| 459 |
Examples: This function can be an estimator for the current state |
| 460 |
or for future observations. |
| 461 |
|
| 462 |
Then we can compute its expectation using |
| 463 |
\[ |
| 464 |
\Expect{f_k(\vx_{0:k})} = \int f(\vx_{0:k}) |
| 465 |
p(\vx_{0:k}|\vz_{1:k}) d\vx_{0:k} |
| 466 |
\] |
| 467 |
|
| 468 |
MMSE estimate of state: $\hat{\vx} = \Expect{\vx_k}$. Other |
| 469 |
estimates that can be computed: median, modes, confidence |
| 470 |
intervals, kurtosis, \dots |
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
\newpage |
| 475 |
\subsection{Recursive Filters} |
| 476 |
|
| 477 |
recursive filters (i.e. sequential update of previous estimate) |
| 478 |
$\leftrightarrow$ batch processing (computation with all data in |
| 479 |
one step) |
| 480 |
|
| 481 |
not only faster: allow on-line processing of data (lower storage |
| 482 |
costs, rapid adaption to changing signals characteristics) |
| 483 |
|
| 484 |
essentially consist of two steps: |
| 485 |
\begin{description} |
| 486 |
\item[prediction step:] $p(\vx_{k-1}|\vz_{1:k-1}) \to |
| 487 |
p(\vx_{k}|\vz_{1:k-1})$ \\ |
| 488 |
(usually deforms / translates / spreads state pdf due to noise) |
| 489 |
\item[update step:] $p(\vx_{k}|\vz_{1:k-1}),\vz_k \to p(\vx_{k}|\vz_{1:k})$\\ |
| 490 |
(combines likelihood of current measurement with predicted state; |
| 491 |
usually concentrates state pdf) |
| 492 |
\end{description} |
| 493 |
|
| 494 |
|
| 495 |
\newpage |
| 496 |
\subsection{General Prediction-Update Framework} |
| 497 |
|
| 498 |
Assume that pdf $p(\vx_{k-1}|\vz_{1:k-1})$ is available at time |
| 499 |
$k-1$. |
| 500 |
|
| 501 |
Prediction step: (using Chapman-Kolmogoroff equation) |
| 502 |
\begin{equation} |
| 503 |
\label{eq:predict} |
| 504 |
p(\vx_k|\vz_{1:k-1}) = \int |
| 505 |
p(\vx_k|\vx_{k-1}) p(\vx_{k-1}|\vz_{1:k-1}) d\vx_{k-1} |
| 506 |
\end{equation} |
| 507 |
This is the prior of the state $\vx_k$ at time $k$ \emph{without |
| 508 |
knowledge of the measurement $\vz_k$}, i.e. the probability |
| 509 |
\emph{given only previous measurements}. |
| 510 |
|
| 511 |
Update step: (compute posterior pdf from |
| 512 |
predicted prior pdf and new measurement) |
| 513 |
\begin{equation} |
| 514 |
\label{eq:update} |
| 515 |
p(\vx_k|\vz_{1:k}) = \frac{p(\vz_k|\vx_k)p(\vx_k|\vz_{1:k-1})}{p(\vz_{k}|\vz_{1:k-1})} |
| 516 |
\end{equation} |
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
\newpage |
| 523 |
\pagenumbering{incremental} |
| 524 |
|
| 525 |
\def\temp{Let us prove formula (\ref{eq:update}) (just in order to train calculations |
| 526 |
with joint and conditional probabilities\dots)} |
| 527 |
\temp |
| 528 |
\begin{eqnarray*} |
| 529 |
&& \hspace*{75mm} \\[-5mm] |
| 530 |
&& \textcolor{blue}{p(\vx_k|\vz_{1:k})} \\ |
| 531 |
&&= \frac{\textcolor{blue}{p(\vz_{1:k}|\vx_k)p(\vx_k)}}{\textcolor{blue}{p(\vz_{1:k})}} |
| 532 |
\end{eqnarray*} |
| 533 |
(Bayes rule) |
| 534 |
|
| 535 |
|
| 536 |
\newpage |
| 537 |
\temp |
| 538 |
\begin{eqnarray*} |
| 539 |
&& \hspace*{75mm} \\[-5mm] |
| 540 |
&& p(\vx_k|\vz_{1:k}) \\ |
| 541 |
&&= \frac{\textcolor{blue}{p(\vz_{1:k}|\vx_k)}p(\vx_k)}{\textcolor{dgreen}{p(\vz_{1:k})}} \\ |
| 542 |
&&= \frac{\textcolor{blue}{p(\vz_{k},\vz_{1:k-1}|\vx_k)}p(\vx_k)}{\textcolor{dgreen}{p(\vz_{k},\vz_{1:k-1})}} |
| 543 |
\end{eqnarray*} |
| 544 |
(separate $p(\vz_{1:k})$ into $p(\vz_k,\vz_{1:k-1})$) |
| 545 |
|
| 546 |
|
| 547 |
\newpage |
| 548 |
\temp |
| 549 |
\begin{eqnarray*} |
| 550 |
&& \hspace*{75mm} \\[-5mm] |
| 551 |
&& p(\vx_k|\vz_{1:k}) \\ |
| 552 |
&&= \frac{p(\vz_{1:k}|\vx_k)p(\vx_k)}{p(\vz_{1:k})} \\ |
| 553 |
&&= \frac{\textcolor{blue}{p(\vz_{k},\vz_{1:k-1}|\vx_k)}p(\vx_k)}{\textcolor{dgreen}{p(\vz_{k},\vz_{1:k-1})}} \\ |
| 554 |
&&= \frac{\textcolor{blue}{p(\vz_{k}|\vz_{1:k-1},\vx_k)p(\vz_{1:k-1}|\vx_k)} |
| 555 |
p(\vx_k)}{\textcolor{dgreen}{p(\vz_{k}|\vz_{1:k-1})p(\vz_{1:k-1})}} |
| 556 |
\end{eqnarray*} |
| 557 |
(factorize joint probability: $p(a,b|c) = p(a|b,c)\cdot p(b|c)$ |
| 558 |
and $p(a,b) = p(a|b)\cdot p(b)$) |
| 559 |
|
| 560 |
|
| 561 |
\newpage |
| 562 |
\temp |
| 563 |
\begin{eqnarray*} |
| 564 |
&& \hspace*{75mm} \\[-5mm] |
| 565 |
&& p(\vx_k|\vz_{1:k}) \\ |
| 566 |
&&= \frac{p(\vz_{1:k}|\vx_k)p(\vx_k)}{p(\vz_{1:k})} \\ |
| 567 |
&&= \frac{p(\vz_{k},\vz_{1:k-1}|\vx_k)p(\vx_k)}{p(\vz_{k},\vz_{1:k-1})} \\ |
| 568 |
&&= \frac{p(\vz_{k}|\vz_{1:k-1},\vx_k)\textcolor{blue}{p(\vz_{1:k-1}|\vx_k)} |
| 569 |
p(\vx_k)}{p(\vz_{k}|\vz_{1:k-1})p(\vz_{1:(k-1}))} \\ |
| 570 |
&&= \frac{p(\vz_{k}|\vz_{1:k-1},\vx_k)\textcolor{blue}{p(\vx_k|\vz_{1:k-1})p(\vz_{1:k-1})} |
| 571 |
p(\vx_k)}{p(\vz_{k}|\vz_{1:k-1})p(\vz_{1:k-1})\textcolor{blue}{p(\vx_k)}} |
| 572 |
\end{eqnarray*} |
| 573 |
(Bayes rule) |
| 574 |
|
| 575 |
|
| 576 |
\newpage |
| 577 |
\temp |
| 578 |
\begin{eqnarray*} |
| 579 |
&& \hspace*{75mm} \\[-5mm] |
| 580 |
&& p(\vx_k|\vz_{1:k}) \\ |
| 581 |
&&= \frac{p(\vz_{1:k}|\vx_k)p(\vx_k)}{p(\vz_{1:k})} \\ |
| 582 |
&&= \frac{p(\vz_{k},\vz_{1:k-1}|\vx_k)p(\vx_k)}{p(\vz_{k},\vz_{1:k-1})} \\ |
| 583 |
&&= \frac{p(\vz_{k}|\vz_{1:k-1},\vx_k)p(\vz_{1:k-1}|\vx_k) |
| 584 |
p(\vx_k)}{p(\vz_{k}|\vz_{1:k-1})p(\vz_{1:(k-1}))} \\ |
| 585 |
&&= \frac{\textcolor{blue}{p(\vz_{k}|\vz_{1:k-1},\vx_k)}p(\vx_k|\vz_{1:k-1})\textcolor{dgreen}{p(\vz_{1:k-1}) |
| 586 |
p(\vx_k)}}{p(\vz_{k}|\vz_{1:k-1})\textcolor{dgreen}{p(\vz_{1:k-1})p(\vx_k)}} \\ |
| 587 |
&&= \frac{\textcolor{blue}{p(\vz_k|\vx_k)}p(\vx_k|\vz_{1:k-1})}{p(\vz_{k}|\vz_{1:k-1})} |
| 588 |
\end{eqnarray*} |
| 589 |
(independence of observations; cancelling out terms) |
| 590 |
|
| 591 |
|
| 592 |
|
| 593 |
\newpage |
| 594 |
\pagenumbering{restore} |
| 595 |
|
| 596 |
\subsection{The Structure of the Update Equation} |
| 597 |
|
| 598 |
\begin{eqnarray*} |
| 599 |
p(\vx_k|\vz_{1:k}) &=& \frac{p(\vz_k|\vx_k)\cdot p(\vx_k|\vz_{1:k-1})}{p(\vz_{k}|\vz_{1:k-1})} |
| 600 |
\\[1.5ex] |
| 601 |
\mbox{posterior} &=& \frac{\mbox{likelihood}\cdot\mbox{prior}}{\mbox{evidence}} |
| 602 |
\end{eqnarray*} |
| 603 |
|
| 604 |
prior: given by prediction equation |
| 605 |
|
| 606 |
likelihood: given by observation model |
| 607 |
|
| 608 |
evidence: the normalizing constant in the denominator |
| 609 |
\[ |
| 610 |
p(\vz_{k}|\vz_{1:k-1}) = \int p(\vz_k|\vx_k)p(\vx_k|\vz_{1:k-1}) d\vx_k |
| 611 |
\] |
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
\newpage |
| 617 |
|
| 618 |
This theoretically allows an optimal Bayesian solution (in the |
| 619 |
sense of computing the posterior pdf). |
| 620 |
|
| 621 |
\mybox{Problem: only a conceptual solution; integrals are not |
| 622 |
tractable.} |
| 623 |
|
| 624 |
But: in some restricted cases, an optimal solution is possible. |
| 625 |
Two optimal solutions (under restrictive assumptions): |
| 626 |
\begin{itemize} |
| 627 |
\item (standard) Kalman filter |
| 628 |
\item grid-based filter |
| 629 |
\end{itemize} |
| 630 |
|
| 631 |
|
| 632 |
|
| 633 |
\section{Kalman Filter} |
| 634 |
|
| 635 |
\subsection{Introduction} |
| 636 |
|
| 637 |
Assumptions: |
| 638 |
\begin{itemize} |
| 639 |
\item posterior at time $k-1$, i.e. $p(\vx_{k-1}|\vz_{k-1})$, is Gaussian |
| 640 |
\item dynamic system characterized by |
| 641 |
\begin{eqnarray*} |
| 642 |
&{\color{StateColor}\vx_k} = {\color{StateFuncColor}\MF_k}{\color{StateColor}\vx_{k-1}} |
| 643 |
+ |
| 644 |
{\color{StateFuncColor}\MG_k}{\color{StateNoiseColor}\vv_{k-1}}& |
| 645 |
\\ |
| 646 |
&{\color{MeasColor}\vz_k} = {\color{MeasFuncColor}\MH_k}{\color{StateColor}\vx_k} |
| 647 |
+ |
| 648 |
{\color{MeasFuncColor}\MJ_k}{\color{MeasNoiseColor}\vn_k}& |
| 649 |
\end{eqnarray*} |
| 650 |
\item both noise vectors Gaussian (covariance matrices are $\MQ_{k-1}$ and $\MR_k$) |
| 651 |
\end{itemize} |
| 652 |
Then new posterior $p(\vx_{k}|\vz_{k})$ is Gaussian, too, and can |
| 653 |
be computed using simple linear equations. |
| 654 |
|
| 655 |
optimal solution, but \emph{highly restrictive} assumptions must hold |
| 656 |
|
| 657 |
|
| 658 |
%\newpage |
| 659 |
\subsection{Prediction Equation} |
| 660 |
|
| 661 |
At time $k-1$: $p(\vx_{k-1}|\vz_{1:k-1}) = {\cal N}(\vm_{k-1|k-1}, \MP_{k-1|k-1})$ |
| 662 |
|
| 663 |
Inserting into (\ref{eq:predict}) yields |
| 664 |
\[ |
| 665 |
p(\vx_k|\vz_{1:k-1}) = {\cal N}(\vm_{k|k-1}, \MP_{k|k-1}) |
| 666 |
\] |
| 667 |
with |
| 668 |
\[ |
| 669 |
\vm_{k|k-1} = \MF_k\vm_{k-1|k-1} |
| 670 |
\] |
| 671 |
and |
| 672 |
\[ |
| 673 |
\MP_{k|k-1} = \MG_{k}\MQ_{k-1}\MG_{k}^T + \MF_k\MP_{k-1|k-1}\MF_k^T |
| 674 |
\] |
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
\newpage |
| 679 |
\subsection{Update Equation} |
| 680 |
|
| 681 |
Inserting into (\ref{eq:update}) yields |
| 682 |
\[ |
| 683 |
p(\vx_k|\vz_{1:k}) = {\cal N}(\vm_{k|k}, \MP_{k|k}) |
| 684 |
\] |
| 685 |
with |
| 686 |
\[ |
| 687 |
\vm_{k|k} = \vm_{k|k-1} + \MK_k (\vz_k - \underbrace{\MH_k\vm_{k|k-1}}_{\mbox{\small estimated }\hat{\vz}_k}) |
| 688 |
\] |
| 689 |
and |
| 690 |
\[ |
| 691 |
\MP_{k|k} = \MP_{k|k-1} - \MK_k\MH_k\MP_{k|k-1} |
| 692 |
\] |
| 693 |
Kalman Gain: |
| 694 |
\[ |
| 695 |
\MK_k = \MP_{k|k-1}\MH_k^T(\underbrace{\MH_k\MP_{k|k-1}\MH_k^T + \MJ_k\MR_k\MJ_k^T}_{\mbox{$\Cov{\hat{\vz}_k}$}})^{-1} |
| 696 |
\] |
| 697 |
|
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
\section{Grid-Based Filter} |
| 704 |
|
| 705 |
|
| 706 |
\subsection{Introduction} |
| 707 |
|
| 708 |
Assumptions: |
| 709 |
\begin{itemize} |
| 710 |
\item state space is discrete |
| 711 |
\item number of different states ($N_s$) is limited \\ |
| 712 |
{\footnotesize (Note: implicitly includes discreteness)} |
| 713 |
\end{itemize} |
| 714 |
|
| 715 |
Suppose at time $k-1$ we have states $\vx^i$ with |
| 716 |
$i=1,\ldots,N_s$. Conditional probability of these states: |
| 717 |
\[ |
| 718 |
Pr(\vx_{k-1} = \vx^i|\vz_{1:k-1}) = w_{k-1|k-1}^i |
| 719 |
\] |
| 720 |
Then the (old) posterior at time $k-1$ is given by: |
| 721 |
\[ |
| 722 |
p(\vx_{k-1}|\vz_{1:k-1}) = \sum_{i=1}^{N_s} w_{k-1|k-1}^i \; \delta(\vx_{k-1}-\vx^i) |
| 723 |
\] |
| 724 |
|
| 725 |
\newpage |
| 726 |
|
| 727 |
\subsection{Results (Summary)} |
| 728 |
|
| 729 |
Both the (new) prior and the (new) posterior have the same |
| 730 |
structure: a sum of weighted Dirac peaks: |
| 731 |
|
| 732 |
\[ |
| 733 |
p(\vx_{k}|\vz_{1:k-1}) = \sum_{i=1}^{N_s} w_{k|k-1}^i \; \delta(\vx_{k-1}-\vx^i) |
| 734 |
\] |
| 735 |
\[ |
| 736 |
p(\vx_{k}|\vz_{1:k}) = \sum_{i=1}^{N_s} w_{k|k}^i \; \delta(\vx_{k-1}-\vx^i) |
| 737 |
\] |
| 738 |
|
| 739 |
Note: extension to different sets of states for each time step |
| 740 |
\[ |
| 741 |
\{\vx^i\}: i=1,\ldots,N_s \quad\longrightarrow\quad \{\vx^i_k\}: i=1,\ldots,N_{s,k} |
| 742 |
\] |
| 743 |
with time-varying index $k$ is easily possible; the `allowed' |
| 744 |
states need not be constant. |
| 745 |
|
| 746 |
|
| 747 |
|
| 748 |
\newpage |
| 749 |
\subsection{Prediction Equation (in Detail)} |
| 750 |
|
| 751 |
Inserting into (\ref{eq:predict}) yields |
| 752 |
\begin{eqnarray*} |
| 753 |
p(\vx_k|\vz_{1:k-1}) |
| 754 |
&=& \sum_{i=1}^{N_s} \sum_{j=1}^{N_s} w_{k-1|k-1}^j |
| 755 |
p(\vx^i|\vx^j) \delta(\vx_{k-1}-\vx^i)\\ |
| 756 |
&=& \sum_{i=1}^{N_s} w_{k|k-1}^i \delta(\vx_{k-1}-\vx^i) |
| 757 |
\end{eqnarray*} |
| 758 |
where $w_{k|k-1}^i = \sum_{j=1}^{N_s} w_{k-1|k-1}^j |
| 759 |
p(\vx^i|\vx^j)$ |
| 760 |
|
| 761 |
\bigskip |
| 762 |
\mybox{(new) prior weights = old posterior weights,\\ |
| 763 |
reweighted using state transition probabilities} |
| 764 |
|
| 765 |
|
| 766 |
|
| 767 |
|
| 768 |
\newpage |
| 769 |
\subsection{Update Equation (in Detail)} |
| 770 |
|
| 771 |
Inserting into (\ref{eq:update}) yields |
| 772 |
\[ |
| 773 |
p(\vx_k|\vz_{1:k}) = \sum_i^{N_s} w_{k|k}^i \delta(\vx_{k-1}-\vx^i) |
| 774 |
\] |
| 775 |
where $w_{k|k}^i = \frac{w_{k|k-1}^i |
| 776 |
p(\vz_{k}|\vx^i)}{\sum_j^{N_s} w_{k|k-1}^j |
| 777 |
p(\vz_{k}|\vx^j)}$. |
| 778 |
|
| 779 |
Note: denominator only needed for normalization |
| 780 |
|
| 781 |
\bigskip |
| 782 |
\mybox{posterior weights = prior weights, reweighted using |
| 783 |
likelihoods} |
| 784 |
|
| 785 |
|
| 786 |
|
| 787 |
|
| 788 |
|
| 789 |
\section{Particle Filter} |
| 790 |
|
| 791 |
|
| 792 |
\subsection{Suboptimal Approximations} |
| 793 |
|
| 794 |
If we want to preserve Kalman filter principle\dots |
| 795 |
\begin{itemize} |
| 796 |
\item Extended Kalman Filter (EKF) |
| 797 |
\item Unscented Kalman Filter (UKF) |
| 798 |
\end{itemize} |
| 799 |
...we get better results, \mybox{BUT: \emph{we cannot get rid off |
| 800 |
Gaussian approximations}} |
| 801 |
|
| 802 |
\newpage |
| 803 |
|
| 804 |
EKF / UKF: \mybox{All these approaches fail if we have |
| 805 |
\begin{itemize} |
| 806 |
\item bimodal / multimodal pdfs |
| 807 |
\item heavily skewed pdfs |
| 808 |
\end{itemize} |
| 809 |
} |
| 810 |
|
| 811 |
We need a more general scheme to tackle these problems. |
| 812 |
|
| 813 |
|
| 814 |
\newpage |
| 815 |
\subsection{Particle Filter -- General Concept} |
| 816 |
|
| 817 |
Many different names (do you remember the |
| 818 |
\href{#section.1}{introduction}?) but the general concept is |
| 819 |
rather simple: |
| 820 |
|
| 821 |
\mybox{PARTICLE FILTER: |
| 822 |
|
| 823 |
If we cannot solve the integrals required for a Bayesian recursive |
| 824 |
filter analytically \dots we represent the posterior probabilities |
| 825 |
by a set of randomly chosen weighted samples.} |
| 826 |
|
| 827 |
Note: ``randomly chosen'' $\equiv$ ``Monte Carlo'' \\ |
| 828 |
(we are playing roulette / throwing the dice) |
| 829 |
|
| 830 |
Increasing number of samples $\Rightarrow$ (almost sure) |
| 831 |
convergence to true pdf |
| 832 |
|
| 833 |
|
| 834 |
|
| 835 |
\newpage |
| 836 |
\subsection{Sequential Importance Sampling (SIS)} |
| 837 |
|
| 838 |
SIS is the basic framework for most particle filter algorithms. |
| 839 |
Let |
| 840 |
\begin{eqnarray*} |
| 841 |
\{\vx_{0:k}^i\} &:& \mbox{set of support points |
| 842 |
(samples, particles)} \\ |
| 843 |
&& i = 1,\ldots,N_s \\ |
| 844 |
&& \mbox{(whole trajectory for each particle!)} \\ |
| 845 |
w_{k}^i &:& \mbox{associated weights, normalized to $\sum_i w_k^i = 1$} |
| 846 |
\end{eqnarray*} |
| 847 |
Then: |
| 848 |
\[ |
| 849 |
p(\vx_k|\vz_{1:k}) \approx \sum_{i=1}^{N_s} w_k^i \delta(\vx_{0:k} - \vx^i_{0:k}) |
| 850 |
\] |
| 851 |
(discrete weighted approximation to the true posterior) |
| 852 |
|
| 853 |
|
| 854 |
\newpage |
| 855 |
\subsection*{SIS (continued)} |
| 856 |
|
| 857 |
Usually we cannot draw samples $\vx_k^i$ from $p(\cdot)$ directly. |
| 858 |
Assume we sample directly from a (different) \emph{importance |
| 859 |
function} $q(\cdot)$. Our approximation is still correct (up to |
| 860 |
normalization) if |
| 861 |
\[ |
| 862 |
w_k^i \propto \frac{p(\vx^i_{0:k}|\vz_{1:k})}{q(\vx^i_{0:k}|\vz_{1:k})} |
| 863 |
\] |
| 864 |
\mybox{The trick: we can choose $q(\cdot)$ freely!} |
| 865 |
|
| 866 |
If the importance function is chosen to factorize such that |
| 867 |
\[ |
| 868 |
q(\vx_{0:k}|\vz_{1:k}) = q(\vx_{k}|\vx_{0:k-1},\vz_{1:k})\;q(\vx_{0:k-1}|\vz_{1:k-1}) |
| 869 |
\] |
| 870 |
then one can augment old particles $\vx^i_{0:k-1}$ by $\vx_k \sim |
| 871 |
q(\vx_{k}|\vx_{0:k-1},\vz_{1:k})$ to get new particles |
| 872 |
$\vx^i_{0:k}$. |
| 873 |
|
| 874 |
|
| 875 |
\newpage |
| 876 |
\subsection*{SIS (continued)} |
| 877 |
|
| 878 |
Weight update (after some lengthy computations\dots): |
| 879 |
\begin{equation} |
| 880 |
\label{eq:WeightUpdate} |
| 881 |
w_k^i = w^i_{k-1} |
| 882 |
\frac{p(\vz_k|\vx^i_k)\,p(\vx^i_{k}|\vx^i_{k-1})}{q(\vx^i_{k}|\vx^i_{0:k-1},\vz_{1:k})} |
| 883 |
\end{equation} |
| 884 |
Furthermore, if $q(\vx_{k}|\vx_{0:k-1},\vz_{1:k}) = |
| 885 |
q(\vx_{k}|\vx_{k-1},\vz_{1:k})$\\ |
| 886 |
(only dependent on \emph{last} state and observations): |
| 887 |
\[ |
| 888 |
p(\vx|\vz_{1:k}) \approx \sum_{i=1}^{N_s} w_k^i \,\delta(\vx_k - |
| 889 |
\vx_k^i) |
| 890 |
\] |
| 891 |
(and we need not preserve trajectories $\vx^i_{0:k-1}$ and history |
| 892 |
of observations $\vz_{1:k-1}$) |
| 893 |
|
| 894 |
|
| 895 |
\newpage |
| 896 |
\subsection{SIS Algorithm -- Pseudo Code} |
| 897 |
|
| 898 |
\mycodebox{ |
| 899 |
[\codemath{\{\vx^i_k,w^i_k\}_{i=1}^{N_s}}] = SIS(\codemath{\{\vx^i_{k-1},w^i_{k-1}\}_{i=1}^{N_s}}, |
| 900 |
\codemath{\vz_k}) \\ |
| 901 |
\hspace*{7mm} FOR \codemath{i} = \codemath{1} : \codemath{N_s} \\ |
| 902 |
\hspace*{14mm} \codetext{draw} \codemath{\vx_k^i \sim q(\vx_{k}|\vx^i_{k-1},\vz_{k})} \\ |
| 903 |
\hspace*{14mm} \codetext{update weights according to (\ref{eq:WeightUpdate})} \\ |
| 904 |
\hspace*{7mm} END FOR \\ |
| 905 |
\hspace*{7mm} \codetext{normalize weights to} \codemath{\sum_{i=1}^{N_s} w_k^i = 1} |
| 906 |
} |
| 907 |
|
| 908 |
|
| 909 |
|
| 910 |
\newpage |
| 911 |
\subsection{PROBLEM: Degeneracy Problem} |
| 912 |
|
| 913 |
Problem with SIS approach: after a few iterations, most particles |
| 914 |
have negligible weight (the weight is concentrated on a few |
| 915 |
particles only) |
| 916 |
|
| 917 |
Counter measures: |
| 918 |
\begin{itemize} |
| 919 |
\item brute force: many, many samples $N_s$ |
| 920 |
\item good choice of importance density |
| 921 |
\item resampling |
| 922 |
\end{itemize} |
| 923 |
|
| 924 |
Note: amount of degeneracy can be estimated based on variance of |
| 925 |
weights [Liu 1996]. |
| 926 |
|
| 927 |
|
| 928 |
|
| 929 |
\newpage |
| 930 |
\subsection{Optimal Impotance Density:} |
| 931 |
|
| 932 |
It can be shown that the optimal importance density is given by |
| 933 |
\[ |
| 934 |
q(\vx_k|\vx_{k-1},\vz_k)_{opt} = p(\vx_k|\vx_{k-1},\vz_k) |
| 935 |
\] |
| 936 |
Then |
| 937 |
\[ |
| 938 |
w^i_k = w^i_{k-1} \int p(\vz_k|\vx'_k) p(\vx'_k|\vx^i_{k-1}) |
| 939 |
d\vx'_k |
| 940 |
\] |
| 941 |
Two major drawbacks: usually neither sampling from $q_opt$ nor |
| 942 |
solving the integral in $w^i_k$ is possible\dots (but in some |
| 943 |
special cases, it works) |
| 944 |
|
| 945 |
Other alternative which is often convenient: \\ |
| 946 |
$q(\cdot) = p(\vx_k|\vx_{k-1})$ (prior). Easy to implement, but does not take |
| 947 |
measurements into account. |
| 948 |
|
| 949 |
|
| 950 |
|
| 951 |
\newpage |
| 952 |
\subsection{Resampling Approaches} |
| 953 |
|
| 954 |
Basic idea of resampling: |
| 955 |
\mybox{Whenever degeneracy rises above threshold: replace old set of samples |
| 956 |
(+ weights) with new set of samples (+ weights), such that sample density |
| 957 |
better reflects posterior pdf.} |
| 958 |
|
| 959 |
This eliminates particles with low weight and chooses more |
| 960 |
particles in more probable regions. |
| 961 |
|
| 962 |
Complexity: possible in $O(N_s)$ operations |
| 963 |
|
| 964 |
|
| 965 |
\newpage |
| 966 |
The resampling principle: |
| 967 |
|
| 968 |
\begin{center} |
| 969 |
\includegraphics[width=0.8\linewidth]{BucResampling} |
| 970 |
\end{center} |
| 971 |
|
| 972 |
(graphics taken from Van der Merwe et al.) |
| 973 |
|
| 974 |
|
| 975 |
|
| 976 |
\newpage |
| 977 |
\subsection{General Particle Filter -- Pseudo Code} |
| 978 |
|
| 979 |
\mycodebox{ |
| 980 |
[\codemath{\{\vx^i_k,w^i_k\}_{i=1}^{N_s}}] = PF(\codemath{\{\vx^i_{k-1},w^i_{k-1}\}_{i=1}^{N_s}}, |
| 981 |
\codemath{\vz_k}) \\ |
| 982 |
\hspace*{7mm} FOR \codemath{i} = \codemath{1} : \codemath{N_s} \\ |
| 983 |
\hspace*{14mm} \codetext{draw} \codemath{\vx_k^i \sim q(\vx_{k}|\vx^i_{k-1},\vz_{k})} \\ |
| 984 |
\hspace*{14mm} \codetext{update weights according to (\ref{eq:WeightUpdate})} \\ |
| 985 |
\hspace*{7mm} END FOR \\ |
| 986 |
\hspace*{7mm} \codetext{normalize weights to} \codemath{\sum_{i=1}^{N_s} w_k^i = 1}\\ |
| 987 |
\hspace*{7mm} IF \codetext{degeneracy too high} \\ |
| 988 |
\hspace*{14mm} \codetext{resample} \codemath{\{\vx^i_k,w^i_k\}_{i=1}^{N_s}} \\ |
| 989 |
\hspace*{7mm} END IF |
| 990 |
} |
| 991 |
|
| 992 |
|
| 993 |
|
| 994 |
|
| 995 |
\newpage |
| 996 |
\subsection{PROBLEM: Loss of Diversity} |
| 997 |
|
| 998 |
No degeneracy problem but new problem arises: |
| 999 |
% |
| 1000 |
\mybox{Particles with high weight are selected more and more |
| 1001 |
often, others die out slowly |
| 1002 |
|
| 1003 |
$\Rightarrow$ \emph{loss of diversity} or \emph{sample |
| 1004 |
impoverishment}} |
| 1005 |
|
| 1006 |
For small process noise, all particles can collapse into a single |
| 1007 |
point within a few iterations. |
| 1008 |
|
| 1009 |
Other problem: resampling limits the ability to parallelize |
| 1010 |
algorithm. |
| 1011 |
|
| 1012 |
|
| 1013 |
|
| 1014 |
\newpage |
| 1015 |
\subsection{Other Particle Filter Variants} |
| 1016 |
|
| 1017 |
|
| 1018 |
Methods to counteract loss of diversity and degeneracy problem: |
| 1019 |
\begin{itemize} |
| 1020 |
\item resample-move algorithm |
| 1021 |
\item regularization |
| 1022 |
\item Rao-Blackwellisation |
| 1023 |
\item multiple Monte-Carlo |
| 1024 |
\end{itemize} |
| 1025 |
|
| 1026 |
Other particle filter variants found in the literature: |
| 1027 |
\begin{itemize} |
| 1028 |
\item sampling importance resampling (SIR) |
| 1029 |
\item auxiliary sampling importance resampling (ASIR) |
| 1030 |
\item regularized particle filter (RPF) |
| 1031 |
\item \dots |
| 1032 |
\end{itemize} |
| 1033 |
|
| 1034 |
|
| 1035 |
|
| 1036 |
|
| 1037 |
\section{Experiments} |
| 1038 |
|
| 1039 |
see videos... |
| 1040 |
|
| 1041 |
|
| 1042 |
|
| 1043 |
\section{Summary} |
| 1044 |
|
| 1045 |
First of all: what I did \emph{not} talk about\dots |
| 1046 |
\begin{itemize} |
| 1047 |
\item speed of convergence |
| 1048 |
\item number of samples needed |
| 1049 |
\item complexity issues / tricks for speed-up of algorithms |
| 1050 |
\item advanced particle filter variants in detail |
| 1051 |
\end{itemize} |
| 1052 |
|
| 1053 |
|
| 1054 |
$\Rightarrow$ refer to the literature if you want to know more |
| 1055 |
|
| 1056 |
|
| 1057 |
|
| 1058 |
\newpage |
| 1059 |
Advantages of particle filters (PFs): |
| 1060 |
\begin{itemize} |
| 1061 |
\item can deal with non-linearities |
| 1062 |
\item can deal with non-Gaussian noise |
| 1063 |
\item can be implemented in $O(N_s)$ |
| 1064 |
\item mostly parallelizable |
| 1065 |
\item easy to implement |
| 1066 |
\item in contrast to HMM filters (state-space discretized to $N$ fixed |
| 1067 |
states) : PFs focus adaptively on probable regions of state-space |
| 1068 |
\end{itemize} |
| 1069 |
|
| 1070 |
|
| 1071 |
|
| 1072 |
\newpage |
| 1073 |
{\bfseries\Large Thesis:} |
| 1074 |
|
| 1075 |
\myboxii{If you want to solve a filtering problem, then particle |
| 1076 |
filters are the best filters you can use, much better than e.g. |
| 1077 |
Kalman filters.} |
| 1078 |
|
| 1079 |
\textcolor{dgreen}{\bfseries Right} or \textcolor{red}{\bfseries wrong}? |
| 1080 |
|
| 1081 |
|
| 1082 |
\newpage |
| 1083 |
|
| 1084 |
\textcolor{red}{\bfseries WRONG}! |
| 1085 |
|
| 1086 |
Particle filters include a random element; they only convergence |
| 1087 |
to the true posterior pdf (almost surely) if $N_s \to \infty$. |
| 1088 |
|
| 1089 |
Therefore: \emph{If the assumptions for Kalman filters or |
| 1090 |
grid-based filters are valid, no PF can outperform them!} |
| 1091 |
|
| 1092 |
Additionally: depending on the dynamic model, Gaussian sum |
| 1093 |
filters, unscented Kalman filters or extended Kalman filters may |
| 1094 |
produce satisfactory results at lower computational cost. |
| 1095 |
|
| 1096 |
(But you should at least try a PF; it is usually better than other |
| 1097 |
suboptimal methods!) |
| 1098 |
|
| 1099 |
|
| 1100 |
|
| 1101 |
|
| 1102 |
\newpage |
| 1103 |
PF approaches proved their usefulness in a variety of |
| 1104 |
applications. |
| 1105 |
|
| 1106 |
But: |
| 1107 |
\begin{itemize} |
| 1108 |
\item choice of importance function $q(\cdot)$ is crucial in PF |
| 1109 |
design |
| 1110 |
\item large sample number $N_s$ increases computational effort |
| 1111 |
\item potential problems: \emph{degeneracy} and \emph{loss of diversity} |
| 1112 |
\end{itemize} |
| 1113 |
|
| 1114 |
\mybox{If these points are taken into account, then particle |
| 1115 |
filters are an extremely powerful tool for filtering / |
| 1116 |
estimation.} |
| 1117 |
|
| 1118 |
(``black box usage'' vs ``know what you're doing!'') |
| 1119 |
|
| 1120 |
|
| 1121 |
|
| 1122 |
|
| 1123 |
|
| 1124 |
\newpage |
| 1125 |
\vspace*{2cm} |
| 1126 |
|
| 1127 |
|
| 1128 |
{\Huge Thank you!} |
| 1129 |
|
| 1130 |
\vspace{1.3cm} |
| 1131 |
|
| 1132 |
\begin{raggedleft} |
| 1133 |
\footnotesize |
| 1134 |
This presentation was made with \LaTeX.\\ |
| 1135 |
(try to write Bucure\c{s}ti in Powerpoint\dots)\\ |
| 1136 |
\end{raggedleft} |
| 1137 |
|
| 1138 |
|
| 1139 |
|
| 1140 |
\end{document} |