mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-05-30 16:21:19 +02:00
[Electives] Restructure
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
\subsection{Linearization}
|
||||
$\vec{f}(\vec{x}) \approx \vec{f}(\vec{\overline{x}}) + \mat{J}_{\vec{f}} \big|_{x = \overline{x}}(\vec{x} - \vec{\overline{x}})$, $f'$, no vec in 1D; $\vec{\overline{x}}$ lin. p.
|
||||
|
||||
\shortdefinition[Jac.] $\mat{J}_{\vec{f}}$ rows for eq of $\vec{f}$ cols for vars of each eq.
|
||||
|
||||
Approximation using finite differences $\frac{f(\overline{x} + h) - f(\overline{x})}{h}$,\\
|
||||
or central differences (vector of $\frac{\vec{f}(\vec{\overline{x}}) + h_i \vec{e_i}}{h_i}$, with $\vec{e_i}$ unit vec)
|
||||
@@ -0,0 +1,10 @@
|
||||
\subsection{Linear Least Squares}
|
||||
\bi{Goal}: $\argmin{x \in \R^n} ||\mat{A}\vec{x} - b||^2_2$, $\mat{A}$: rows $i$-th datap. col $c$: $t_i^{c - 1}$.
|
||||
|
||||
\bi{Man. sol.}: comp. $M = A^\top A$, $b' = A^\top b$, then $Mx = b'$.
|
||||
|
||||
\bi{Prob. sol.}: $\text{argmax} p(\vec{x} \divider \vec{z})$ with
|
||||
\begin{itemize}
|
||||
\item \bi{Max. Like} $p(\vec{x} | \vec{z}) \propto p(\vec{z} | \vec{x}) = \prod_{i = 1}^N p(\vec{z}_i | \vec{x})$
|
||||
\item \bi{M a Post} $p(\vec{x} | \vec{z}) \propto p(\vec{z} | \vec{x}) p(\vec{x}) = p(\vec{x}) \prod_{i = 1}^N p(\vec{z}_i | \vec{x})$
|
||||
\end{itemize}
|
||||
@@ -0,0 +1,8 @@
|
||||
\subsection{Non-Linear Least Squares}
|
||||
Find $\vec{x}^* = \text{argmax} p(\vec{x} | \vec{z}) = \argmin{}(-\log(p(\vec{x}|\vec{z})))$
|
||||
|
||||
\bi{Gauss-Newton} % TODO: Do we really need these? If so, use from NumCS (much simpler notation)
|
||||
|
||||
\bi{Levenberg-Marquardt}
|
||||
|
||||
\bi{Local Param.}
|
||||
@@ -0,0 +1,7 @@
|
||||
\subsection{Bayes Filter}
|
||||
$\vec{x}_k^R$ state at time k, $\vec{z}_k^p$ dist. meas., $\vec{u}^p_k$ wheel odometry (= meas.).
|
||||
Typ. care ab. curr. state: altern. pred. \& update.
|
||||
% TODO: Do we really need the below?
|
||||
% Init prev distr $\P[\vec{x}_0^R]$.
|
||||
% Pred: $\P[\vec{x}_k^R \divider \vec{u}_{1:k}^p, \vec{z}_{1 : k - 1}^d] = \int \P[\vec{x}_k^R \divider \vec{u}_{k}^p, \vec{x}_{k - 1}^d]
|
||||
% \P[\vec{x}_k^R \divider \vec{u}_{1:k - 1}^p, \vec{z}_{1 : k - 1}^d] \dx \vec{x}_{k - 1}^R$
|
||||
@@ -0,0 +1,8 @@
|
||||
\subsection{Particle Filter}
|
||||
Is a bayes filter approximating the state distribution with a set of random samples.
|
||||
Update step:
|
||||
\begin{itemize}
|
||||
\item Apply Bayes rule $w'_{k, s} = \P[\vec{z}_i \divider \vec{x}_{k, s}] w_{k - 1, s}$
|
||||
\item Renormalize: $w_{k, s} = w'_{k, s} \div \sum_{s} w'_{k, s}$
|
||||
\item Resample: rand. sel. $S$ particles acc. to weights and $w_{k, s} = S^{-1}$
|
||||
\end{itemize}
|
||||
@@ -0,0 +1,19 @@
|
||||
\subsection{Kalman Filtear (KF)}
|
||||
Bayes Filter for Gauss. dist of R.V. \& linear meas. model.
|
||||
Initial state $\vec{x}_0 \sim \cN(\hat{\vec{x}}, \mat{P}_0)$, $\mat{P}_0$ previous covariance;
|
||||
|
||||
\bi{Prediction} With linear state transition model ($\vec{u}_k$ odometry, $\vec{w}_k$ noise (covariance $\mat{Q}_k$)):\\
|
||||
$\vec{x}_k = \mat{F}\vec{x}_{k - 1} + \mat{G}\vec{u}_k + \mat{L}\vec{w}_k$ with $\vec{w}_k \sim \cN(\vec{0}, \mat{Q}_k)$:
|
||||
\begin{itemize}
|
||||
\item \bi{Mean} $\hat{\vec{x}}_{k | k - 1} = \mat{F} \hat{\vec{x}}_{k - 1} + \mat{G} \vec{u}_k$
|
||||
\item \bi{Covariance} $\mat{P}_{k | k - 1} = \mat{F} \mat{P}_{k - 1 | k - 1} \mat{F}^\top + \mat{L} \mat{Q}_{k} \mat{L}^\top$
|
||||
\end{itemize}
|
||||
\bi{Update} Lin. meas.: $\tilde{\vec{z}}_k = \mat{H}\vec{x}_k + \vec{v}_k$ with $\vec{v_k} \sim \cN(\vec{0}, \mat{R}_k)$:
|
||||
\newpage
|
||||
\begin{itemize}
|
||||
\item \bi{Meas. residual}: $\vec{y}_k = \tilde{\vec{z}}_k - \mat{H} \hat{\vec{x}}_{k | k - 1}$
|
||||
\item \bi{Resid. Cov}: $\mat{S}_k = \mat{H}\mat{P}_{k | k - 1} \mat{H}^\top \mat{S}_k^{-1}$
|
||||
\item \bi{Kalman gain}: $\mat{K}_k = \mat{P}_{k | k - 1} \mat{H}^\top \mat{S}_k^{-1}$
|
||||
\item \bi{Updated mean}: $\hat{\vec{x}}_{k | k} = \hat{\vec{x}}_{k | k - 1} + \mat{K}_k \vec{y}_k$
|
||||
\item \bi{Updated Cov.}: $\mat{P}_{k | k} = (\mat{I} - \mat{K}_k \mat{H}) \mat{P}_{k | k - 1}$
|
||||
\end{itemize}
|
||||
@@ -0,0 +1,12 @@
|
||||
\subsection{Extended Kalman Filater (EKF)}
|
||||
Non-l. state trans. model $\vec{x}_k = \vec{f}(\vec{x}_{k - 1}, \vec{u}_k, \vec{w}_k)$ as above:
|
||||
\begin{itemize}
|
||||
\item \bi{Mean}: $\hat{\vec{x}}_{k | k - 1} = \vec{f}(\hat{\vec{x}}_{k - 1 | k - 1}, \vec{u}_k)$
|
||||
\item \bi{Cov.}: $\mat{P}_{k | k - 1} = \mat{F}_k \mat{P}_{k - 1 | k - 1} \mat{F}_k^\top + \mat{L}_k \mat{Q}_k \mat{L}_k^\top$\\
|
||||
With $\mat{F}_k$ linearisation $\frac{\partial \vec{f}}{\partial \vec{x}}$ and $\mat{L}_k$ lin. $\frac{\partial \vec{f}}{\partial \vec{w}}$
|
||||
\end{itemize}
|
||||
\bi{Update} N-Lin. meas.: $\tilde{\vec{z}}_k = \vec{h}(\vec{x}_k) + \vec{v}_k$:
|
||||
\begin{itemize}
|
||||
\item \bi{Meas. residual}: $\vec{y}_k = \tilde{\vec{z}}_k - \vec{h}(\hat{\vec{x}}_{k | k - 1})$
|
||||
\end{itemize}
|
||||
Difference to above: $\mat{H}$ becomes $\mat{H}_k$, and $\mat{H}^\top$ is $\mat{H}_k^\top$
|
||||
Reference in New Issue
Block a user