mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-09-10 19:15:25 +02:00
[AMR] Notes in various sections
This commit is contained in:
@@ -20,3 +20,5 @@ e.g. $\sum_{X} \P(X) = 1$ becomes $\int \P(x) \dx = 1$
|
||||
PDF: $f(\vec{x}) = \frac{1}{\sqrt{(2\pi)^k \det(\mat{\Sigma})}} \text{exp}\left( -\frac{1}{2}(\vec{x} - \vec{\mu})^\top \mat{\Sigma}^{-1} (\vec{x} - \vec{\mu}) \right)$
|
||||
|
||||
$\Sigma^{-1}$ for $\Sigma$ diagonal, inverse of diag els (e.g. $\sigma^{-1}$)
|
||||
|
||||
\hl{Always Normalize (i.e. sum of all probabilities is 1)}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
\subsection{Error Propagation}
|
||||
\label{sec:error-propagation}
|
||||
For functions $\vec{f}(\vec{x}) = \mat{A}\vec{x}$, the \bi{linear error propagation}
|
||||
is given by $\Sigma^f = A \Sigma^x A^\top$, with $\Sigma^x$ the uncertanty of $\vec{x}$ (covariance mat.)
|
||||
is given by $\Sigma^f = A \Sigma^x A^\top$, with $\Sigma^x$ the uncertanty of $\vec{x}$ (covariance mat.), typically $\texttt{diag}(\sigma^2)$,
|
||||
with $\sigma^2$ the variance of all variables involved
|
||||
|
||||
@@ -39,7 +39,6 @@ Linearization happens typically with one of the below:
|
||||
|
||||
\shortdefinition[Euler-Forward] $\vec{x}_k = \vec{x}_{k - 1} + \Delta t \vec{f}_C(\vec{x}_{k - 1}, \vec{u}_{k - 1}, t_{k - 1})$
|
||||
|
||||
\newpage
|
||||
\shortdefinition[Trapezoidal num. int]
|
||||
$\Delta \vec{x}_1 = \Delta t \vec{f}_C (\vec{x}_{k - 1}, \vec{u}_{k - 1}, t_{k - 1})$\\
|
||||
$\Delta \vec{x}_2 = \Delta t \vec{f}_C (\vec{x}_{k - 1} + \Delta \vec{x}_1, \vec{u}_{k}, t_{k})$, then:\\
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
\newpage
|
||||
\subsection{Wheeled robot Kinematics}
|
||||
\begin{wrapfigure}[7]{r}{0.2\columnwidth}
|
||||
\includegraphics[width=0.2\columnwidth]{assets/wheel-constraints.png}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
\bi{Pneumatic} {\color{ForestGreen} price, shock abs., speed}; {\color{red} acc., loud, maint.}
|
||||
|
||||
\newpage
|
||||
\subsubsection{DC Motor}
|
||||
\begin{wrapfigure}[4]{r}{0.32\columnwidth}
|
||||
\includegraphics[width=0.32\columnwidth]{assets/dc-motor.png}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
$\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.
|
||||
It may also be a single value (if just one var in the state)
|
||||
|
||||
\shortdefinition[Gradient] $\nabla \vec{f}$ is vec, each comp. for par diff of var
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
\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}$.
|
||||
|
||||
Alt: compute sum of squared errors $S$, then min. $S$, i.e. solve system $\pardiff{\alpha}S = 0$, $\pardiff{r} S = 0$ for $\{ \alpha, r \}$ the params
|
||||
|
||||
\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 Maximum \dots
|
||||
|
||||
@@ -21,8 +21,11 @@ def gauss_newton(x: np.ndarray, F, DF, tol=1e-6):
|
||||
\rmvspace[0.4]
|
||||
|
||||
\bi{Levenberg-Marquardt}
|
||||
Minimize $||F(x^{(k)}) + DF(x^{(k)})||^2 + \lambda||s||^2$,
|
||||
with $s = \lambda_k DF(x^{(k)})$, $\lambda_k$ is called the \textit{learning rate}
|
||||
% TODO: Do we need these?
|
||||
\bi{(1)} Pick start point $\overline{\vec{x}}^0$ and start param $\lambda^0 = \max \text{diag}(\mat{A})$ and $v$ (e.g. $v = 2$).;
|
||||
\bi{(2)} Modified GN sys: $\mat{A} + \lambda \text{diag}(\mat{A})) \Delta \vec{x} = \vec{b}$;
|
||||
\bi{(3)} Solve for $\Delta \vec{x}$;
|
||||
\bi{(4)} Update: $\overline{\vec{x}}^{k + 1} = \overline{\vec{x}}^k + \Delta \vec{x}$ (if cost reduced),
|
||||
else: $\overline{\vec{x}}^{k + 1} = \overline{\vec{x}}^k$, $\lambda^{k + 1} = \lambda^k v$, go to step 3;
|
||||
\bi{(5)} Check convergence, else go to step 2
|
||||
|
||||
\bi{Local Param.}
|
||||
\bi{Robust Cost Functions} Account for outliers, by mod. err. terms
|
||||
|
||||
@@ -4,5 +4,5 @@ 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}$
|
||||
\item Resample: rand. sel. $S$ particles acc. to weights, $w_{k, s} = S^{-1}$
|
||||
\end{itemize}
|
||||
|
||||
@@ -13,5 +13,5 @@ With $\mat{F}_k = \frac{\partial \vec{f}}{\partial \vec{x}}$ and $\mat{L}_k = \f
|
||||
Difference to KF: $\mat{H}$ becomes $\mat{H}_k$, and $\mat{H}^\top$ is $\mat{H}_k^\top$.
|
||||
They are linearizations of $\vec{h}$, see \ref{sec:temporal-models}
|
||||
|
||||
\shortexample D-D Rob, measurements: $\Delta \varphi_l, \varphi_r$, GPS pos, yaw angle.
|
||||
% \shortexample D-D Rob, measurements: $\Delta \varphi_l, \varphi_r$, GPS pos, yaw angle.
|
||||
% TODO: Finish this?
|
||||
|
||||
Reference in New Issue
Block a user