From b492fb3ba89205b984c390a39cc9f57d4b2059fa Mon Sep 17 00:00:00 2001
From: samuel niederer <samuel.niederer@ost.ch>
Date: Thu, 19 May 2022 18:00:01 +0200
Subject: add tick figure of simple mass system

---
 buch/papers/kra/images/simple_mass_spring.tex | 64 +++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 buch/papers/kra/images/simple_mass_spring.tex

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/images/simple_mass_spring.tex b/buch/papers/kra/images/simple_mass_spring.tex
new file mode 100644
index 0000000..e98ee3e
--- /dev/null
+++ b/buch/papers/kra/images/simple_mass_spring.tex
@@ -0,0 +1,64 @@
+% create tikz drawing of a simple mass spring system
+
+\tikzstyle{hmline}=[{Latex[length=3.3,width=2.2]}-{Latex[length=3.3,width=2.2]},line width=0.3]
+\tikzstyle{vmline}=[red, dashed,line width=0.4,dash pattern=on 1pt off 1pt]
+\tikzstyle{ground}=[pattern=north east lines]
+\tikzstyle{mass}=[line width=0.6,red!30!black,fill=red!40!black!10,rounded corners=1,top color=red!40!black!20,bottom color=red!40!black!10,shading angle=20]
+\tikzstyle{spring}=[line width=0.8,blue!7!black!80,snake=coil,segment amplitude=5,line cap=round]
+
+\begin{tikzpicture}[scale=2]
+    \newcommand{\ticks}[2]
+    {
+        % arguments: x, y coordinates
+        \draw[thick] (#1, #2 - 0.1 / 2) --++ (0, 0.1);
+    }
+
+    \tikzmath{
+        \hWall = 1.5;
+        \wWall = 0.3;
+        \lWall = 3.5;
+        \hMass = 0.6;
+        \wMass = 1.1;
+        \xMass1 = 1.2;
+        \xMass2 = 2.2;
+        \xAxisYpos = 0;
+        \originX1 = 0;
+        \originY1 = 0.5;
+        \originX2 = 0;
+        \originY2 = -2;
+        \springscale=7;
+    }
+
+    % create x axis
+    \draw[->,thick] (0,\xAxisYpos) --+ (\lWall, 0) node[right]{$x$};
+
+    % create ticks on x axis
+    \ticks{\wWall}{\xAxisYpos}
+    \ticks{\xMass1}{\xAxisYpos}
+    \ticks{\xMass2}{\xAxisYpos}
+
+    % create underground
+    \draw[ground] (\originX1, \originY1) ++ (0, 0) --+(\lWall,0) --+(\lWall, \wWall) --+(\wWall, \wWall) --+(\wWall, \hWall) --+(0, \hWall) -- cycle;
+    \draw[ground] (\originX2, \originY2) ++ (0, 0) --+(\lWall,0) --+(\lWall, \wWall) --+(\wWall, \wWall) --+(\wWall, \hWall) --+(0, \hWall) -- cycle;
+
+    % create masses
+    \draw[mass] (\originX1, \originY1) ++ (\xMass1, \wWall) rectangle ++ (\wMass,\hMass) node[midway] {$m$};
+    \draw[mass] (\originX2, \originY2) ++ (\xMass2, \wWall) rectangle ++ (\wMass,\hMass) node[midway] {$m$};
+
+    % create springs
+    \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++ (\wWall, \wWall + \hMass / 2) --+ (\xMass1 - \wWall, 0);
+    \draw[spring, segment length=(\xMass2 - \wWall) * \springscale] (\originX2, \originY2) ++ (\wWall, \wWall + \hMass / 2) --+ (\xMass2 - \wWall, 0);
+
+    % create vertical measurement line 
+    \draw[vmline] (\xMass1, \xAxisYpos) --+(0, \originY1 + \wWall);
+    \draw[vmline] (\xMass2, \xAxisYpos) --+(0, \originY2 + \hMass+\wWall);
+    \draw[vmline] (\wWall, \originY1+\wWall) --(\wWall, \originY2 + \hWall);
+
+    % create horizontal measurement line
+    \draw[hmline] (\wWall, \xAxisYpos + 0.2) -- (\xMass1, \xAxisYpos + 0.2) node[midway,fill=white,inner sep=0] {$\ell_0$};
+    \draw[hmline] (\xMass1, \xAxisYpos + 0.2) -- (\xMass2, \xAxisYpos + 0.2) node[midway,fill=white,inner sep=0] {$\Delta_{x}$};
+    \draw[hmline] (\wWall, \xAxisYpos - 0.3) -- (\xMass2, \xAxisYpos - 0.3) node[midway,fill=white,inner sep=0] {$\ell_{1}$};
+
+    %  create force arrow
+    \draw[->,blue, very thick,line cap=round] (\xMass2 + \wMass / 2, \originY2 + \wWall + \hMass + 0.15) node[above] {$\vb{F_{R}}$} --+ (-0.5, 0);
+\end{tikzpicture}
\ No newline at end of file
-- 
cgit v1.2.1


From ffb50c6574c53b805df068fd2ce2e89726597911 Mon Sep 17 00:00:00 2001
From: samuel niederer <samuel.niederer@ost.ch>
Date: Thu, 26 May 2022 11:36:20 +0200
Subject: add spring constant

---
 buch/papers/kra/images/simple_mass_spring.tex | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/images/simple_mass_spring.tex b/buch/papers/kra/images/simple_mass_spring.tex
index e98ee3e..207f1e0 100644
--- a/buch/papers/kra/images/simple_mass_spring.tex
+++ b/buch/papers/kra/images/simple_mass_spring.tex
@@ -46,8 +46,10 @@
     \draw[mass] (\originX2, \originY2) ++ (\xMass2, \wWall) rectangle ++ (\wMass,\hMass) node[midway] {$m$};
 
     % create springs
-    \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++ (\wWall, \wWall + \hMass / 2) --+ (\xMass1 - \wWall, 0);
-    \draw[spring, segment length=(\xMass2 - \wWall) * \springscale] (\originX2, \originY2) ++ (\wWall, \wWall + \hMass / 2) --+ (\xMass2 - \wWall, 0);
+    \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++
+    (\wWall, \wWall + \hMass / 2) --++ (\xMass1 - \wWall, 0) node[midway,above=0.2] {$k$};
+    \draw[spring, segment length=(\xMass2 - \wWall) * \springscale] (\originX2, \originY2) ++
+    (\wWall, \wWall + \hMass / 2) --++ (\xMass2 - \wWall, 0) node[midway,above=0.2] {$k$};
 
     % create vertical measurement line 
     \draw[vmline] (\xMass1, \xAxisYpos) --+(0, \originY1 + \wWall);
-- 
cgit v1.2.1


From a0b6394bd559e7d2e1a6d7c028cfc73586503d58 Mon Sep 17 00:00:00 2001
From: samuel niederer <samuel.niederer@ost.ch>
Date: Thu, 26 May 2022 11:46:24 +0200
Subject: add drawing

---
 buch/papers/kra/images/multi_mass_spring.tex | 54 ++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 buch/papers/kra/images/multi_mass_spring.tex

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/images/multi_mass_spring.tex b/buch/papers/kra/images/multi_mass_spring.tex
new file mode 100644
index 0000000..f255cc8
--- /dev/null
+++ b/buch/papers/kra/images/multi_mass_spring.tex
@@ -0,0 +1,54 @@
+% create tikz drawing of a multi mass multi spring system
+
+\tikzstyle{vmline}=[red, dashed,line width=0.4,dash pattern=on 1pt off 1pt]
+\tikzstyle{ground}=[pattern=north east lines]
+\tikzstyle{mass}=[line width=0.6,red!30!black,fill=red!40!black!10,rounded corners=1,top color=red!40!black!20,bottom color=red!40!black!10,shading angle=20]
+\tikzstyle{spring}=[line width=0.8,blue!7!black!80,snake=coil,segment amplitude=5,line cap=round]
+
+\begin{tikzpicture}[scale=2]
+    \newcommand{\ticks}[3]
+    {
+        % x, y coordinates
+        \draw[thick] (#1, #2 - 0.1 / 2) --++ (0, 0.1) node[scale=0.8,below=0.2] {#3};
+    }
+    \tikzmath{
+        \hWall = 1.2;
+        \wWall = 0.3;
+        \lWall = 5;
+        \hMass = 0.6;
+        \wMass = 1.1;
+        \xMass1 = 1.0;
+        \xMass2 = 3.0;
+        \xAxisYpos = 0;
+        \originX1 = 0;
+        \originY1 = 0.5;
+        \springscale=7;
+    }
+
+    % create axis
+    \draw[->,thick] (0,\xAxisYpos) --+ (\xMass2 + \wMass, 0) node[right]{$q$};
+    % create ticks on x / q axis
+    \ticks{\xMass1}{\xAxisYpos}{$q_{1}$}
+    \ticks{\xMass2}{\xAxisYpos}{$q_{2}$}
+
+    % create non-moving backgrounds
+    \draw[ground] (\originX1, \originY1) ++ (0, 0) --+(\lWall,0) --+(\lWall, \hWall)
+    --+ (\lWall - \wWall, \hWall) --+(\lWall - \wWall, \wWall) --+ (\wWall, \wWall)  --+(\wWall, \hWall) --+(0, \hWall) -- cycle;
+
+    % create masses
+    \draw[mass] (\originX1, \originY1) ++ (\xMass1, \wWall) rectangle ++ (\wMass,\hMass) node[midway] {$m_{1}$};
+    \draw[mass] (\originX1, \originY1) ++ (\xMass2, \wWall) rectangle ++ (\wMass,\hMass) node[midway] {$m_{2}$};
+
+    % create springs
+    \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++
+    (\wWall, \wWall + \hMass / 2) --++ (\xMass1 - \wWall, 0) node[midway,above=0.2] {$k_1$};
+    \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++
+    (\xMass1 + \wMass, \wWall + \hMass / 2) --++ (\xMass2 - \xMass1 - \wMass, 0) node[midway,above=0.2] {$k_c$};
+    \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++
+    (\xMass2 + \wMass, \wWall + \hMass / 2) --++ (\lWall - \xMass2 - \wMass - \wWall, 0) node[midway,above=0.2] {$k_2$};
+
+    % create vertical measurement line 
+    \draw[vmline] (\xMass1, \xAxisYpos) --+(0, \originY1 + \wWall);
+    \draw[vmline] (\xMass2, \xAxisYpos) --+(0, \originY1 + \wWall);
+
+\end{tikzpicture}
-- 
cgit v1.2.1


From 052ccbe27e19d53ac7272bf29c9c16e071d7059b Mon Sep 17 00:00:00 2001
From: samuel niederer <samuel.niederer@ost.ch>
Date: Wed, 1 Jun 2022 13:34:26 +0200
Subject: add phase space plot

---
 buch/papers/kra/images/phase_space.tex | 67 ++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 buch/papers/kra/images/phase_space.tex

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/images/phase_space.tex b/buch/papers/kra/images/phase_space.tex
new file mode 100644
index 0000000..cd51ea4
--- /dev/null
+++ b/buch/papers/kra/images/phase_space.tex
@@ -0,0 +1,67 @@
+\colorlet{mypurple}{red!50!blue!90!black!80}
+
+% style to create arrows
+\tikzset{
+    traj/.style 2 args={thick, postaction={decorate},decoration={markings,
+                    mark=at position #1 with {\arrow{<}},
+                    mark=at position #2 with {\arrow{<}}}
+        }
+}
+
+\begin{tikzpicture}[scale=0.6]
+    % p(t=0) = 0, q(t=0) = A, max(p) = mwA
+    \tikzmath{
+        \axh = 5.2;
+        \axw1 = 4.2;
+        \axw2 = 4.8;
+        \d1 = 0.9;
+        \a0 = 1;
+        \b0 = 2;
+        \a1 = \a0 + \d1;
+        \b1 = \b0 + \d1;
+        \a2 = \a1 + \d1;
+        \b2 = \b1 + \d1;
+        \a3 = \a2 + \d1;
+        \b3 = \b2 + \d1;
+        \d2 = 0.75;
+        \aa0 = 2;
+        \bb0 = 1;
+        \aa1 = \aa0 + \d2;
+        \bb1 = \bb0 + \d2;
+        \aa2 = \aa1 + \d2;
+        \bb2 = \bb1 + \d2;
+        \aa3 = \aa2 + \d2;
+        \bb3 = \bb2 + \d2;
+    }
+
+    \draw[->,thick] (-\axw1,0) -- (\axw1,0) node[right] {$q$};
+    \draw[->,thick] (0,-\axh) -- (0,\axh) node[above] {$p$};
+
+    \draw[traj={0.375}{0.875},darkgreen] ellipse (\a0 and \b0);
+    \draw[traj={0.375}{0.875},blue] ellipse (\a1 and \b1);
+    \draw[traj={0.375}{0.875},cyan] ellipse (\a2 and \b2);
+    \draw[traj={0.375}{0.875},mypurple] ellipse (\a3 and \b3);
+
+    \node[right,darkgreen] at (45:{\a0} and {\b0}) {$E_A$};
+    \node[right, blue] at (45:{\a1} and {\b1}) {$E_B$};
+    \node[right, cyan] at (45:{\a2} and {\b2}) {$E_C$};
+    \node[right, mypurple] at (45:{\a3} and {\b3}) {$E_D$};
+    \node[above left] at (110:\b3 + 0.1) {grosses $\omega$};
+
+    \begin{scope}[xshift=12cm]
+        \draw[->,thick] (-\axw2,0) -- (\axw2,0) node[right] {$q$};
+        \draw[->,thick] (0,-\axh) -- (0,\axh) node[above] {$p$};
+
+        \draw[traj={0.375}{0.875},darkgreen] ellipse (\aa0 and \bb0);
+        \draw[traj={0.375}{0.875},blue] ellipse (\aa1 and \bb1);
+        \draw[traj={0.375}{0.875},cyan] ellipse (\aa2 and \bb2);
+        \draw[traj={0.375}{0.875},mypurple] ellipse (\aa3 and \bb3);
+
+        \node[above, darkgreen] at (45:{\aa0} and {\bb0}) {$E_A$};
+        \node[above, blue] at (45:{\aa1} and {\bb1}) {$E_B$};
+        \node[above, cyan] at (45:{\aa2} and {\bb2}) {$E_C$};
+        \node[above, mypurple] at (45:{\aa3} and {\bb3}) {$E_D$};
+
+        \node[above left] at (110:\b3 + 0.1) {kleines $\omega$};
+    \end{scope}
+\end{tikzpicture}
\ No newline at end of file
-- 
cgit v1.2.1


From 5e25727877da020b0b23132fec8c0ea70288a18b Mon Sep 17 00:00:00 2001
From: samuel niederer <samuel.niederer@ost.ch>
Date: Sun, 24 Jul 2022 12:03:25 +0200
Subject: add presentation files

---
 buch/papers/kra/images/simple_mass_spring.tex |   2 +-
 buch/papers/kra/presentation/presentation.tex | 491 ++++++++++++++++++++++++++
 buch/papers/kra/scripts/animation.py          | 243 +++++++++++++
 buch/papers/kra/scripts/simulation.py         |  40 +++
 4 files changed, 775 insertions(+), 1 deletion(-)
 create mode 100644 buch/papers/kra/presentation/presentation.tex
 create mode 100644 buch/papers/kra/scripts/animation.py
 create mode 100644 buch/papers/kra/scripts/simulation.py

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/images/simple_mass_spring.tex b/buch/papers/kra/images/simple_mass_spring.tex
index 207f1e0..e0e869a 100644
--- a/buch/papers/kra/images/simple_mass_spring.tex
+++ b/buch/papers/kra/images/simple_mass_spring.tex
@@ -14,7 +14,7 @@
     }
 
     \tikzmath{
-        \hWall = 1.5;
+        \hWall = 1.2;
         \wWall = 0.3;
         \lWall = 3.5;
         \hMass = 0.6;
diff --git a/buch/papers/kra/presentation/presentation.tex b/buch/papers/kra/presentation/presentation.tex
new file mode 100644
index 0000000..eb6541b
--- /dev/null
+++ b/buch/papers/kra/presentation/presentation.tex
@@ -0,0 +1,491 @@
+\documentclass[ngerman, aspectratio=169, xcolor={rgb}]{beamer}
+
+% style
+\mode<presentation>{
+	\usetheme{Frankfurt}
+}
+%packages
+\usepackage[utf8]{inputenc}\DeclareUnicodeCharacter{2212}{-}
+\usepackage[english]{babel}
+\usepackage{graphicx}
+\usepackage{array}
+
+\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
+\usepackage{ragged2e}
+
+\usepackage{bm} % bold math
+\usepackage{amsfonts}
+\usepackage{amssymb}
+\usepackage{mathtools}
+\usepackage{amsmath}
+\usepackage{multirow} % multi row in tables
+\usepackage{booktabs} %toprule midrule bottomrue in tables
+\usepackage{scrextend}
+\usepackage{textgreek}
+\usepackage[rgb]{xcolor}
+
+\usepackage[normalem]{ulem} % \sout
+
+\usepackage{ marvosym } % \Lightning
+
+\usepackage{multimedia} % embedded videos
+
+\usepackage{tikz}
+\usepackage{pgf}
+\usepackage{pgfplots}
+
+\usepackage{algorithmic}
+
+%citations
+\usepackage[style=verbose,backend=biber]{biblatex}
+\addbibresource{references.bib}
+
+
+%math font
+\usefonttheme[onlymath]{serif}
+
+%Beamer Template modifications
+%\definecolor{mainColor}{HTML}{0065A3} % HSR blue
+\definecolor{mainColor}{HTML}{D72864} % OST pink
+\definecolor{invColor}{HTML}{28d79b} % OST pink
+\definecolor{dgreen}{HTML}{38ad36} % Dark green
+
+%\definecolor{mainColor}{HTML}{000000} % HSR blue
+\setbeamercolor{palette primary}{bg=white,fg=mainColor}
+\setbeamercolor{palette secondary}{bg=orange,fg=mainColor}
+\setbeamercolor{palette tertiary}{bg=yellow,fg=red}
+\setbeamercolor{palette quaternary}{bg=mainColor,fg=white} %bg = Top bar, fg = active top bar topic
+\setbeamercolor{structure}{fg=black} % itemize, enumerate, etc (bullet points)
+\setbeamercolor{section in toc}{fg=black} % TOC sections
+\setbeamertemplate{section in toc}[sections numbered]
+\setbeamertemplate{subsection in toc}{%
+	\hspace{1.2em}{$\bullet$}~\inserttocsubsection\par}
+
+\setbeamertemplate{itemize items}[circle]
+\setbeamertemplate{description item}[circle]
+\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true]
+\beamertemplatenavigationsymbolsempty
+
+\setbeamercolor{footline}{fg=gray}
+\setbeamertemplate{footline}{%
+	\hfill\usebeamertemplate***{navigation symbols}
+	\hspace{0.5cm}
+	\insertframenumber{}\hspace{0.2cm}\vspace{0.2cm}
+}
+
+\usepackage{caption}
+\captionsetup{labelformat=empty}
+
+%Title Page
+\title{KRA}
+\subtitle{Kalman Riccati Abel}
+\author{Samuel Niederer}
+% \institute{OST Ostschweizer Fachhochschule}
+% \institute{\includegraphics[scale=0.3]{../img/ost_logo.png}}
+\date{\today}
+
+\input{../packages.tex}
+
+\newcommand*{\QED}{\hfill\ensuremath{\blacksquare}}%
+
+\newcommand*{\HL}{\textcolor{mainColor}}
+\newcommand*{\RD}{\textcolor{red}}
+\newcommand*{\BL}{\textcolor{blue}}
+\newcommand*{\GN}{\textcolor{dgreen}}
+\newcommand{\dt}[0]{\frac{d}{dt}}
+
+\definecolor{darkgreen}{rgb}{0,0.6,0}
+
+
+\makeatletter
+\newcount\my@repeat@count
+\newcommand{\myrepeat}[2]{%
+	\begingroup
+	\my@repeat@count=\z@
+	\@whilenum\my@repeat@count<#1\do{#2\advance\my@repeat@count\@ne}%
+	\endgroup
+}
+\makeatother
+
+\usetikzlibrary{automata,arrows,positioning,calc,shapes.geometric, fadings}
+
+\begin{document}
+
+\begin{frame}
+	\titlepage
+\end{frame}
+
+\begin{frame}
+	\frametitle{Content}
+	\tableofcontents
+\end{frame}
+
+\section{Einführung}
+
+\begin{frame}
+	\begin{itemize}
+		\item<1|only@1> \textbf{K}alman
+		\item<1|only@1> \textbf{R}iccati
+		\item<1|only@1> \textbf{A}bel
+
+		\item<2|only@2> \textcolor{red}{\sout{\textbf{K}alman}}
+		\item<2|only@2> \textbf{R}iccati
+		\item<2|only@2> \textbf{A}bel
+
+		\item<3|only@3> \textcolor{red}{\sout{\textbf{K}alman}} \textcolor{green}{Federmassesytem}
+		\item<3|only@3> \textbf{R}iccati
+		\item<3|only@3> \textbf{A}bel
+
+		\item<4|only@4> \textcolor{red}{\sout{\textbf{K}alman}} \textcolor{green}{Federmassesytem}
+		\item<4|only@4> \textbf{R}iccati
+		\item<4|only@4> \uwave{\textbf{A}bel}
+	\end{itemize}
+\end{frame}
+
+\section{Riccati}
+
+\begin{frame}
+	\frametitle{Riccatische Differentialgleichung}
+	\begin{equation*}
+		% y'(x) = f(x)y^2(x) + g(x)y(x) + h(x)
+		x'(t) = f(t)x^2(t) + g(t)x(t) + h(t)
+	\end{equation*}
+
+	\pause
+
+	\begin{equation*}
+		\dot{X}(t) = - X(t)BX(t) - X(t)A + DX(t) + C
+	\end{equation*}
+
+	% \pause
+	% Anwendungen
+	% \begin{itemize}
+	% 	\item Zeitkontinuierlicher Kalmanfilter
+	% 	\item Regelungstechnik LQ-Regler
+	% 	\item Federmassesyteme
+	% \end{itemize}
+\end{frame}
+
+\begin{frame}
+	\frametitle{Auftreten der Gleichung}
+	\begin{columns}
+		\column{0.4 \textwidth}
+		\begin{equation*}
+			\dt
+			\begin{pmatrix}
+				X \\
+				Y
+			\end{pmatrix}
+			=
+			\underbrace{
+				\begin{pmatrix}
+					A & B \\
+					C & D
+				\end{pmatrix}
+			}_{H}
+			\begin{pmatrix}
+				X \\
+				Y
+			\end{pmatrix}
+		\end{equation*}
+
+		\pause
+
+		\column{0.4 \textwidth}
+		\begin{equation*}
+			U = YX^{-1} \qquad \dt U = ?
+		\end{equation*}
+	\end{columns}
+
+	\pause
+
+	\begin{align*}
+		\dt U         & = \dot{Y} X^{-1} + Y \dt X^{-1}                                                                                                    \\
+		\uncover<4->{ & = (CX + DY) X^{-1} - Y (X^{-1} \dot{X} X^{-1})\\}
+		\uncover<5->{ & = C\underbrace{XX^{-1}}_\text{I} + D\underbrace{YX^{-1}}_\text{U} - Y(X^{-1} (AX + BY) X^{-1})\\}
+		\uncover<6->{ & = C + DU - \underbrace{YX^{-1}}_\text{U}(A\underbrace{XX^{-1}}_\text{I} + B\underbrace{YX^{-1}}_\text{U})\\}
+		\uncover<7->{ & = C  + DU - UA - UBU}
+	\end{align*}
+\end{frame}
+
+\begin{frame}
+	\frametitle{Lösen der Gleichung}
+	\begin{equation*}
+		\begin{pmatrix}
+			X(t) \\
+			Y(t)
+		\end{pmatrix}
+		=
+		\Phi(t_0, t)
+		\begin{pmatrix}
+			I(t) \\
+			U_0(t)
+		\end{pmatrix}
+		=
+		\begin{pmatrix}
+			\Phi_{11}(t_0, t) & \Phi_{12}(t_0, t) \\
+			\Phi_{21}(t_0, t) & \Phi_{22}(t_0, t)
+		\end{pmatrix}
+		\begin{pmatrix}
+			I(t) \\
+			U_0(t)
+		\end{pmatrix}
+	\end{equation*}
+
+	\pause
+
+	\begin{equation*}
+		U(t) =
+		\begin{pmatrix}
+			\Phi_{21}(t_0, t) + \Phi_{22}(t_0, t) U_0(t)
+		\end{pmatrix}
+		\begin{pmatrix}
+			\Phi_{11}(t_0, t) + \Phi_{12}(t_0, t) U_0(t)
+		\end{pmatrix}
+		^{-1}
+	\end{equation*}
+
+	\pause
+
+	% wobei $\Phi(t, t_0)$ die sogennante Zustandsübergangsmatrix ist.
+
+	\begin{equation*}
+		\Phi(t_0, t) = e^{H(t - t_0)}
+	\end{equation*}
+\end{frame}
+
+\section{Federmassystem}
+\begin{frame}
+	\frametitle{Federmassesystem}
+	\begin{columns}
+		\column{0.5 \textwidth}
+		\input{../images/simple_mass_spring.tex}
+
+		\column{0.5 \textwidth}
+		\begin{align*}
+			\uncover<2->{F_R      & = k \Delta_x  \\}
+			\uncover<3->{F_a      & = am = \ddot{x} m \\}
+			\uncover<4->{F_R      & = F_a \Leftrightarrow k \Delta_x = \ddot{x} m\\}
+			\uncover<5->{\ddot{x} & = \frac{k \Delta_x}{m} \\}
+			\uncover<6->{x(t)     & = A \cos(\omega_0 + \Phi), \quad \omega_0 = \sqrt{\frac{k}{m}}}
+		\end{align*}
+	\end{columns}
+\end{frame}
+
+\begin{frame}
+	\frametitle{Phasenraum}
+	\begin{columns}
+		\column{0.3 \textwidth}
+		\begin{tikzpicture}[scale=3]
+			\draw[->, thick] (0, 0) -- (1,0) node[right] {$q$};
+			\draw[->, thick] (0.5, -0.5) -- (0.5,0.5) node[above]{$p$};
+		\end{tikzpicture}
+		\column{0.7 \textwidth}
+		Impulskoordinaten $p = (p_{1}, p_{2}, ..., p_{n}), \quad p=mv$ \\
+		Ortskoordinaten $q = (q_{1}, q_{2}, ..., q_{n})$ \\
+
+
+
+		\begin{align*}
+			\uncover<2->{\mathcal{H}(q, p) & = \underbrace{T(p)}_{E_{kin}} + \underbrace{V(q)}_{E_{pot}} = E_{tot} \\}
+			\uncover<3->{                  & = \frac{p^2}{2m}+ \frac{k q^2}{2}}
+		\end{align*}
+
+
+
+		\begin{equation*}
+			\uncover<4->{
+				\dot{q_{k}} = \frac{\partial \mathcal{H}}{\partial p_k}
+				\qquad
+				\dot{p_{k}} = -\frac{\partial \mathcal{H}}{\partial q_k}
+			}
+		\end{equation*}
+
+		\pause
+
+		\begin{equation*}
+			\uncover<5->{
+				\begin{pmatrix}
+					\dot{q} \\
+					\dot{p}
+				\end{pmatrix}
+				=
+				\begin{pmatrix}
+					0  & \frac{1}{m} \\
+					-k & 0
+				\end{pmatrix}
+				\begin{pmatrix}
+					q \\
+					p
+				\end{pmatrix}
+			}
+		\end{equation*}
+
+	\end{columns}
+\end{frame}
+
+\begin{frame}
+	\frametitle{Phasenraum}
+	\input{../images/phase_space.tex}
+\end{frame}
+
+\begin{frame}
+	\frametitle{Federmassesystem}
+	\begin{columns}
+		\column{0.6 \textwidth}
+		\scalebox{0.8}{\input{../images/multi_mass_spring.tex}}
+		\begin{align*}
+			\uncover<2->{\mathcal{H} & = T + V \\}
+			\uncover<7->{            & = \frac{p_1^2}{2m_1} + \frac{p_2^2}{2m_2} + \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}}
+		\end{align*}
+
+		\column{0.4 \textwidth}
+		\begin{align*}
+			\uncover<3->{T & = T_1 + T_2}                                                               \\
+			\uncover<5->{  & = \frac{p_1^2}{2m_1} + \frac{p_2^2}{2m_2}   }                              \\
+			\uncover<4->{V & = V_1 + V_c + V_2 }                                                        \\
+			\uncover<6->{  & = \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}}
+		\end{align*}
+	\end{columns}
+\end{frame}
+
+\begin{frame}
+	\frametitle{Federmassesystem}
+	\begin{equation*}
+		\begin{pmatrix}
+			\dot{q_1} \\
+			\dot{q_2} \\
+			\dot{p_1} \\
+			\dot{p_2} \\
+		\end{pmatrix}
+		=
+		\begin{pmatrix}
+			0            & 0            & \frac{1}{2m_1} & 0              \\
+			0            & 0            & 0              & \frac{1}{2m_2} \\
+			-(k_1 + k_c) & k_c          & 0              & 0              \\
+			k_c          & -(k_c + k_2) & 0              & 0              \\
+		\end{pmatrix}
+		\begin{pmatrix}
+			q_1 \\
+			q_2 \\
+			p_1 \\
+			p_2 \\
+		\end{pmatrix}
+		\Leftrightarrow
+		\dt
+		\begin{pmatrix}
+			Q \\
+			P \\
+		\end{pmatrix}
+		\underbrace{
+			\begin{pmatrix}
+				0 & M \\
+				K & 0
+			\end{pmatrix}
+		}_{H}
+		\begin{pmatrix}
+			Q \\
+			P \\
+		\end{pmatrix}
+	\end{equation*}
+
+	\pause
+
+	$U = PQ^{-1} \qquad \dt U = ?$
+
+	\pause
+
+	\begin{align*}
+		\dt U & = C  + DU - UA - UBU \\
+		      & = K - UMU
+	\end{align*}
+
+\end{frame}
+
+\begin{frame}
+	\frametitle{Einfluss der Anfangsbedingung:}
+	\begin{columns}
+		\column{0.4 \textwidth}
+		\begin{equation*}
+			\uncover<2->{q_0 =
+				\begin{pmatrix}
+					q_{10} \\
+					q_{20}
+				\end{pmatrix}
+				=
+				\begin{pmatrix}
+					3 \\
+					1
+				\end{pmatrix}
+			}
+		\end{equation*}
+		\begin{equation*}
+			\uncover<3->{q_0 =
+				\begin{pmatrix}
+					q_{10} \\
+					q_{20}
+				\end{pmatrix}
+				=
+				\begin{pmatrix}
+					3 \\
+					3
+				\end{pmatrix}
+			}
+		\end{equation*}
+		\begin{equation*}
+			\uncover<4->{q_0 =
+				\begin{pmatrix}
+					q_{10} \\
+					q_{20}
+				\end{pmatrix}
+				=
+				\begin{pmatrix}
+					2 \\
+					-2
+				\end{pmatrix}
+			}
+		\end{equation*}
+		\column{0.6 \textwidth}
+		\scalebox{0.8}{\input{../images/multi_mass_spring.tex}}
+	\end{columns}
+\end{frame}
+
+\section{Schlussteil}
+\begin{frame}
+	\frametitle{Zusammenfassung}
+	\begin{itemize}
+		\pause
+		\item{Riccatische Differentialgleichung}
+		      \pause
+		      \begin{itemize}
+			      \item{Ausgansgleichung}
+			            \pause
+			      \item{Lösung}
+		      \end{itemize}
+		      \pause
+		\item{Harmonischer Ozillator}
+		      \pause
+		      \begin{itemize}
+			      \item{Hamiltonfunktion}
+			            \pause
+			      \item{Phasenraum}
+		      \end{itemize}
+		      \pause
+		\item{Gekoppelter harmonischer Ozillator}
+		      \pause
+		      \begin{itemize}
+			      \item{Riccatische Differentialgleichung}
+			            \pause
+			      \item{Einfluss der Anfangsbedingungen}
+		      \end{itemize}
+		      \pause
+		\item{\uwave{Abel}}
+		      \begin{itemize}
+			      \pause
+			      \item{Nichtlineare Federkonstante}
+		      \end{itemize}
+
+	\end{itemize}
+\end{frame}
+
+\end{document}
diff --git a/buch/papers/kra/scripts/animation.py b/buch/papers/kra/scripts/animation.py
new file mode 100644
index 0000000..5e805ae
--- /dev/null
+++ b/buch/papers/kra/scripts/animation.py
@@ -0,0 +1,243 @@
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib.patches
+import matplotlib.transforms
+import matplotlib.text
+from matplotlib.animation import FuncAnimation
+import imageio
+
+from simulation import Simulation
+
+
+class Mass:
+    def __init__(self, x_0, width, height, **kwargs):
+        self._x_0 = x_0
+        xy = (x_0, 0)
+        self._rect = matplotlib.patches.Rectangle(xy, width, height, **kwargs)
+
+    @property
+    def patch(self):
+        return self._rect
+
+    @property
+    def x(self):
+        return self._rect.get_x()
+
+    @property
+    def width(self):
+        return self._rect.get_width()
+
+    def move(self, x):
+        self._rect.set_x(self._x_0 + x)
+
+
+class Spring:
+    def __init__(self, n, height, ax, resolution=1000, **kwargs):
+        self._n = n
+        self._height = height
+        self._N = resolution
+        (self._line,) = ax.plot([], [], "-", **kwargs)
+
+    def set(self, x_0, x_1):
+        T = (x_1 - x_0) / self._n
+        x = np.linspace(x_0, x_1, self._N, endpoint=True)
+        t = np.linspace(0, x_1 - x_0, self._N)
+        y = (np.sin(2 * np.pi * t / T) + 1.5) * self._height / 2
+        self.line.set_data(x, y)
+
+    @property
+    def line(self):
+        return self._line
+
+
+class LinePlot:
+    def __init__(self, ax, **kwargs):
+        (self._line,) = ax.plot([], [], "-", **kwargs)
+        self._x = []
+        self._y = []
+
+    @property
+    def line(self):
+        return self._line
+
+    def update(self, x, y):
+        self._x.append(x)
+        self._y.append(y)
+        self._line.set_data(self._x, self._y)
+
+
+class ScatterPlot:
+    def __init__(self, ax, **kwargs):
+        self._color = kwargs.get("color", "tab:green")
+        self._line = ax.scatter([], [], **kwargs)
+        self._ax = ax
+        self._x = []
+        self._y = []
+
+    @property
+    def line(self):
+        return self._line
+
+    def update(self, x, y, **kwargs):
+        self._x.append(x)
+        self._y.append(y)
+        self._line.remove()
+        self._line = self._ax.scatter(self._x, self._y, color=self._color, **kwargs)
+
+
+class QuiverPlot:
+    def __init__(self, ax, **kwargs):
+        self.x = []
+        self.y = []
+        self.u = []
+        self.v = []
+        self.ax = ax
+        self.ln = self.ax.quiver([], [], [], [])
+
+    def update(self, x, y, u, v):
+        self.x.append(x)
+        self.y.append(y)
+        self.u.append(u)
+        self.v.append(v)
+        self.ln.remove()
+        self.ln = self.ax.quiver(self.x, self.y, self.u, self.v)
+
+    @property
+    def line(self):
+        return self.ln
+
+
+anim_folder = "anim_0"
+img_counter = 0
+
+sim = Simulation()
+params = {
+    "x_0": [2, -2],
+    "k_1": 1,
+    "k_c": 2,
+    "k_2": 1,
+    "m_1": 0.5,
+    "m_2": 0.5,
+}
+
+time = 2.1
+
+
+# create axis
+fig = plt.figure(figsize=(20, 15), constrained_layout=True)
+fig.suptitle(
+    " ,".join([f"${key} = {val}$" for (key, val) in params.items()]), fontsize=20
+)
+spec = fig.add_gridspec(3, 4)
+ax0 = fig.add_subplot(spec[-1, :])
+ax1 = fig.add_subplot(spec[:-1, :2])
+ax2 = fig.add_subplot(spec[:-1, 2:])
+
+ax0.set_yticks([])
+
+mass_height = 0.5
+spring_height = 0.6 * mass_height
+x_max = 21
+y_max = 2 * mass_height
+
+mass_1 = Mass(
+    7,
+    2,
+    mass_height,
+    color="tab:red",
+)
+mass_2 = Mass(14, 2, mass_height, color="tab:blue")
+masses = [mass_1, mass_2]
+patches = [mass.patch for mass in masses]
+
+spring_1 = Spring(4, spring_height, ax0, color="tab:red", linewidth=10)
+spring_2 = Spring(4, spring_height, ax0, color="tab:gray", linewidth=10)
+spring_3 = Spring(4, spring_height, ax0, color="tab:blue", linewidth=10)
+springs = [spring_1, spring_2, spring_3]
+
+linePlot_1 = LinePlot(ax1, color="tab:red", label="$m_1$", alpha=1)
+linePlot_2 = LinePlot(ax1, color="tab:blue", label="$m_2$", alpha=1)
+linePlots = [linePlot_1, linePlot_2]
+
+# quiverPlot = QuiverPlot(ax2)
+scatterPlot = ScatterPlot(ax2)
+
+lines = [spring.line for spring in springs]
+lines.extend([plot.line for plot in linePlots])
+# lines.append(quiverPlot.line)
+lines.append(scatterPlot.line)
+
+objects = lines + patches
+
+ax0.plot(
+    np.repeat(mass_1.x, 2),
+    [0, y_max],
+    "--",
+    color="tab:red",
+    label="Ruhezustand $m_1$",
+)
+ax0.plot(
+    np.repeat(mass_2.x, 2),
+    [0, y_max],
+    "--",
+    color="tab:blue",
+    label="Ruhezustand $m_2$",
+)
+
+
+def init():
+    ax0.set_xlim(0, x_max)
+    ax0.set_ylim(0, y_max)
+
+    ax1.set_xlim(0, time)
+    ax1.set_ylim(-4, 4)
+    ax1.set_xlabel("time", fontsize=20)
+    ax1.set_ylabel("$q$", fontsize=20)
+
+    ax2.set_xlim(-4, 4)
+    ax2.set_ylim(-4, 4)
+    ax2.set_xlabel("$q_1$", fontsize=20)
+    ax2.set_ylabel("$q_2$", fontsize=20)
+
+    for patch in patches:
+        ax0.add_patch(patch)
+
+    spring_1.set(0, mass_1.x)
+    spring_2.set(mass_1.x + mass_1.width, mass_2.x)
+    spring_2.set(mass_2.x + mass_2.width, x_max)
+
+    return objects
+
+
+def update(frame):
+    global img_counter
+    x_1, x_2 = sim(frame, **params)
+
+    mass_1.move(x_1)
+    mass_2.move(x_2)
+
+    spring_1.set(0, mass_1.x)
+    spring_2.set(mass_1.x + mass_1.width, mass_2.x)
+    spring_3.set(mass_2.x + mass_2.width, x_max)
+
+    linePlot_1.update(frame, x_1)
+    linePlot_2.update(frame, x_2)
+
+    scatterPlot.update(x_1, x_2, alpha=0.25)
+
+    img_counter += 1
+    return objects
+
+
+anim = FuncAnimation(
+    fig,
+    update,
+    frames=np.linspace(0, time, int(time * 30)),
+    init_func=init,
+    blit=False,
+)
+
+ax0.legend(fontsize=20)
+ax1.legend(fontsize=20)
+FFwriter = matplotlib.animation.FFMpegWriter(fps=30)
+anim.save("animation.mp4", writer=FFwriter)
diff --git a/buch/papers/kra/scripts/simulation.py b/buch/papers/kra/scripts/simulation.py
new file mode 100644
index 0000000..8bccb6a
--- /dev/null
+++ b/buch/papers/kra/scripts/simulation.py
@@ -0,0 +1,40 @@
+import sympy as sp
+
+
+class Simulation:
+    def __init__(self):
+        self.k_1, self.k_2, self.k_c = sp.symbols("k_1 k_2 k_c")
+        self.m_1, self.m_2 = sp.symbols("m_1 m_2")
+        self.t = sp.symbols("t")
+        K = sp.Matrix(
+            [[-(self.k_1 + self.k_c), self.k_c], [self.k_c, -(self.k_2 + self.k_c)]]
+        )
+        M = sp.Matrix([[1 / self.m_1, 0], [0, 1 / self.m_2]])
+        A = M * K
+
+        self.eigenvecs = []
+        self.eigenvals = []
+        for ev, mult, vecs in A.eigenvects():
+            self.eigenvecs.append(sp.Matrix(vecs))
+            self.eigenvals.extend([ev] * mult)
+
+    def __call__(self, t, x_0, k_1, k_c, k_2, m_1, m_2):
+        params = {
+            self.k_1: k_1,
+            self.k_c: k_c,
+            self.k_2: k_2,
+            self.m_1: m_1,
+            self.m_2: m_2,
+        }
+        x_0 = sp.Matrix(x_0)
+        eig_mat = sp.Matrix.hstack(*self.eigenvecs).subs(params)
+        g = eig_mat.inv() * x_0
+        L = sp.Matrix(
+            [
+                g[0] * sp.cos(self.eigenvals[0].subs(params) * self.t),
+                g[1] * sp.cos(self.eigenvals[1].subs(params) * self.t),
+            ]
+        )
+        x = eig_mat * L
+        f = sp.lambdify(self.t, x, "numpy")
+        return f(t).squeeze()
-- 
cgit v1.2.1


From 433b838cd7a68bb45abf0023edfb5439097693f2 Mon Sep 17 00:00:00 2001
From: samuel niederer <samuel.niederer@ost.ch>
Date: Sun, 24 Jul 2022 12:03:46 +0200
Subject: update packages

---
 buch/papers/kra/packages.tex | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/packages.tex b/buch/papers/kra/packages.tex
index df34dcf..b16f074 100644
--- a/buch/papers/kra/packages.tex
+++ b/buch/papers/kra/packages.tex
@@ -8,3 +8,15 @@
 % following example
 %\usepackage{packagename}
 
+\usepackage{physics}
+\usepackage{pgfplots}
+\usepackage{tikz}
+\usepackage[outline]{contour}
+\pgfplotsset{compat=1.16}
+\usetikzlibrary{patterns}
+\usetikzlibrary{snakes}
+\usetikzlibrary{math}
+\usetikzlibrary{arrows.meta}
+\usetikzlibrary{decorations}
+\usetikzlibrary{decorations.markings}
+\usetikzlibrary{calc}
\ No newline at end of file
-- 
cgit v1.2.1


From c5a26d2d7bde694d08bff948c48b2615a7e2e973 Mon Sep 17 00:00:00 2001
From: samuel niederer <samuel.niederer@ost.ch>
Date: Sun, 24 Jul 2022 12:16:02 +0200
Subject: add current work

---
 buch/papers/kra/hamilton.tex   | 185 +++++++++++++++++++++++++++++++++++++++++
 buch/papers/kra/main.tex       |  32 ++-----
 buch/papers/kra/references.bib |  41 ++++-----
 buch/papers/kra/riccati.tex    |  93 +++++++++++++++++++++
 buch/papers/kra/teil0.tex      |  22 -----
 buch/papers/kra/teil1.tex      |  55 ------------
 buch/papers/kra/teil2.tex      |  40 ---------
 buch/papers/kra/teil3.tex      |  40 ---------
 buch/papers/kra/test.tex       |  12 +++
 9 files changed, 313 insertions(+), 207 deletions(-)
 create mode 100644 buch/papers/kra/hamilton.tex
 create mode 100644 buch/papers/kra/riccati.tex
 delete mode 100644 buch/papers/kra/teil0.tex
 delete mode 100644 buch/papers/kra/teil1.tex
 delete mode 100644 buch/papers/kra/teil2.tex
 delete mode 100644 buch/papers/kra/teil3.tex
 create mode 100644 buch/papers/kra/test.tex

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/hamilton.tex b/buch/papers/kra/hamilton.tex
new file mode 100644
index 0000000..14a5e8c
--- /dev/null
+++ b/buch/papers/kra/hamilton.tex
@@ -0,0 +1,185 @@
+\newcommand{\dt}[0]{\frac{d}{dt}}
+
+\section{Teil abc\label{kra:section:teilabc}}
+\rhead{Teil abc}
+
+\subsection{Hamilton-Funktion}
+Die Bewegung der Masse $m$ kann mit Hilfe der hamiltonschen Mechanik im Phasenraum untersucht werden.
+Die hamiltonschen Gleichungen verwenden dafür die veralgemeinerten Ortskoordinaten
+$q = (q_{1}, q_{2}, ..., q_{n})$ und die verallgemeinerten Impulskoordinaten $p = (p_{1}, p_{2}, ..., p_{n})$,
+wobei der Impuls definiert ist als $p_k = m_k \cdot v_k$.
+Liegen keine zeitabhängigen Zwangsbedingungen vor, so entspricht die Hamitlon-Funktion der Gesamtenergie des Systems \cite{kra:hamilton}.
+Im Falle des einfachen Federmassesystems, Abbildung \ref{kra:fig:simple_spring_mass},
+setzt sich die Hamilton-Funktion aus kinetischer und potentieller Energie zusammen.
+
+\begin{equation}
+    \label{hamilton}
+    \begin{split}
+        \mathcal{H}(q, p) &= T(p) + V(q) = E \\
+        &= \underbrace{\frac{p^2}{2m}}_{E_{kin}} + \underbrace{\frac{k q^2}{2}}_{E_{pot}}
+    \end{split}
+\end{equation}
+
+Die Hamiltonschen Bewegungsgleichungen liefern \cite{kra:kanonischegleichungen}
+\begin{equation}
+    \label{kra:hamilton:bewegungsgleichung}
+    \dot{q_{k}} = \frac{\partial \mathcal{H}}{\partial p_k}
+    \qquad
+    \dot{p_{k}} = -\frac{\partial \mathcal{H}}{\partial q_k}
+\end{equation}
+
+daraus folgt
+
+\[
+    \dot{q} = \frac{p}{m}
+    \qquad
+    \dot{p} = -kq
+\]
+
+in Matrixschreibweise erhalten wir also
+
+\[
+    \begin{pmatrix}
+        \dot{q} \\
+        \dot{p}
+    \end{pmatrix}
+    =
+    \begin{pmatrix}
+        0  & \frac{1}{m} \\
+        -k & 0
+    \end{pmatrix}
+    \begin{pmatrix}
+        q \\
+        p
+    \end{pmatrix}
+\]
+
+Für das erweiterte Federmassesystem, Abbildung \ref{kra:fig:multi_spring_mass}, können wir analog vorgehen.
+Die kinetische Energie setzt sich nun aus den kinetischen Energien der einzelnen Massen $m_1$ und $m_2$ zusammen.
+Die Potentielle Energie erhalten wir aus der Summe der kinetischen Energien der einzelnen Federn mit den Federkonstanten $k_1$, $k_c$ und $k_2$.
+
+\begin{align*}
+    \begin{split}
+        T   &= T_1 + T_2 \\
+        &= \frac{p_1^2}{2m_1} + \frac{p_2^2}{2m_2}
+    \end{split}
+    \\
+    \begin{split}
+        V   &= V_1 + V_c + V_2 \\
+        &= \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}
+    \end{split}
+\end{align*}
+
+Die Hamilton-Funktion ist also
+
+\begin{align*}
+    \begin{split}
+        \mathcal{H}     &= T + V \\
+        &= \frac{p_1^2}{2m_1} + \frac{p_2^2}{2m_2} + \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}
+    \end{split}
+\end{align*}
+
+Die Bewegungsgleichungen \ref{kra:hamilton:bewegungsgleichung} liefern
+\begin{align*}
+    \frac{\partial \mathcal{H}}{\partial p_k}  & = \dot{q_k}
+    \Rightarrow
+    \left\{
+    \begin{alignedat}{2}
+        \dot{q_1}   &= \frac{2p_1}{2m_1}    &&= \frac{p_1}{m_1}\\
+        \dot{q_2}   &= \frac{2p_2}{2m_2}    &&= \frac{p_2}{m_2}
+    \end{alignedat}
+    \right.
+    \\
+    -\frac{\partial \mathcal{H}}{\partial q_k} & = \dot{p_k}
+    \Rightarrow
+    \left\{
+    \begin{alignedat}{2}
+        \dot{p_1}   &= -(\frac{2k_1q_1}{2} - \frac{2k_c(q_2-q_1)}{2})  &&= -q_1(k_1+k_c) + q_2k_c \\
+        \dot{p_1}   &= -(\frac{2k_c(q_2-q_1)}{2} - \frac{2k_2q_2}{2})  &&= q_1k_c - (k_c + k_2)
+    \end{alignedat}
+    \right.
+\end{align*}
+
+In Matrixschreibweise erhalten wir
+
+\begin{equation}
+    \label{kra:hamilton:multispringmass}
+    \begin{pmatrix}
+        \dot{q_1} \\
+        \dot{q_2} \\
+        \dot{p_1} \\
+        \dot{p_2} \\
+    \end{pmatrix}
+    =
+    \begin{pmatrix}
+        0            & 0            & \frac{1}{2m_1} & 0              \\
+        0            & 0            & 0              & \frac{1}{2m_2} \\
+        -(k_1 + k_c) & k_c          & 0              & 0              \\
+        k_c          & -(k_c + k_2) & 0              & 0              \\
+    \end{pmatrix}
+    \begin{pmatrix}
+        q_1 \\
+        q_2 \\
+        p_1 \\
+        p_2 \\
+    \end{pmatrix}
+    \Leftrightarrow
+    \dt
+    \begin{pmatrix}
+        Q \\
+        P \\
+    \end{pmatrix}
+    \underbrace{
+        \begin{pmatrix}
+            0 & M \\
+            K & 0
+        \end{pmatrix}
+    }_{G}
+    \begin{pmatrix}
+        Q \\
+        P \\
+    \end{pmatrix}
+\end{equation}
+
+
+Wir intressieren uns nun dafür wie der Phasenwinkel $U = PQ^{-1}$ von der Zeit abhängt,
+wir suchen also die Grösse $\Theta = \dt U$.
+
+Ersetzten wir in der Gleichung \ref{kra:hamilton:multispringmass} die Matrix $G$ mit $\tilde{G}$ so erhalten wir
+\begin{equation}
+    \dt
+    \begin{pmatrix}
+        Q \\
+        P
+    \end{pmatrix}
+    =
+    \underbrace{
+        \begin{pmatrix}
+            A & B \\
+            C & D
+        \end{pmatrix}
+    }_{\tilde{G}}
+    \begin{pmatrix}
+        Q \\
+        P
+    \end{pmatrix}
+\end{equation}
+
+Mit einsetzten folgt
+
+\begin{align*}
+    \dot{Q} = AQ + BP \\
+    \dot{P} = CQ + DP
+\end{align*}
+\begin{equation}
+    \begin{split}
+        \dt U   &= \dot{P} Q^{-1} + P \dt Q^{-1} \\
+        &= (CQ + DP) Q^{-1} - P (Q^{-1} \dot{Q} Q^{-1}) \\
+        &= C\underbrace{QQ^{-1}}_\text{I} + D\underbrace{PQ^{-1}}_\text{U} - P(Q^{-1} (AQ + BP) Q^{-1}) \\
+        &= C + DU - \underbrace{PQ^{-1}}_\text{U}(A\underbrace{QQ^{-1}}_\text{I} + B\underbrace{PQ^{-1}}_\text{U}) \\
+        &= C  + DU - UA - UBU
+    \end{split}
+\end{equation}
+
+was uns auf die zeitkontinuierliche Matrix-Riccati-Gleichung führt.
+
diff --git a/buch/papers/kra/main.tex b/buch/papers/kra/main.tex
index fcee25b..456b6ee 100644
--- a/buch/papers/kra/main.tex
+++ b/buch/papers/kra/main.tex
@@ -6,31 +6,9 @@
 \chapter{Kalman, Riccati und Abel\label{chapter:kra}}
 \lhead{Kalman, Riccati und Abel}
 \begin{refsection}
-    \chapterauthor{Samuel Niederer}
-
-    Ein paar Hinweise für die korrekte Formatierung des Textes
-    \begin{itemize}
-        \item
-              Absätze werden gebildet, indem man eine Leerzeile einfügt.
-              Die Verwendung von \verb+\\+ ist nur in Tabellen und Arrays gestattet.
-        \item
-              Die explizite Platzierung von Bildern ist nicht erlaubt, entsprechende
-              Optionen werden gelöscht.
-              Verwenden Sie Labels und Verweise, um auf Bilder hinzuweisen.
-        \item
-              Beginnen Sie jeden Satz auf einer neuen Zeile.
-              Damit ermöglichen Sie dem Versionsverwaltungssysteme, Änderungen
-              in verschiedenen Sätzen von verschiedenen Autoren ohne Konflikt
-              anzuwenden.
-        \item
-              Bilden Sie auch für Formeln kurze Zeilen, einerseits der besseren
-              Übersicht wegen, aber auch um GIT die Arbeit zu erleichtern.
-    \end{itemize}
-
-    \input{papers/kra/teil0.tex}
-    \input{papers/kra/teil1.tex}
-    \input{papers/kra/teil2.tex}
-    \input{papers/kra/teil3.tex}
-
-    \printbibliography[heading=subbibliography]
+      \chapterauthor{Samuel Niederer}
+      \input{papers/kra/hamilton.tex}
+      \newpage
+      \input{papers/kra/riccati.tex}
+      \printbibliography[heading=subbibliography]
 \end{refsection}
diff --git a/buch/papers/kra/references.bib b/buch/papers/kra/references.bib
index f13c3d8..7f972ec 100644
--- a/buch/papers/kra/references.bib
+++ b/buch/papers/kra/references.bib
@@ -4,32 +4,27 @@
 % (c) 2020 Autor, Hochschule Rapperswil
 %
 
-@online{kra:bibtex,
-	title = {BibTeX},
-	url = {https://de.wikipedia.org/wiki/BibTeX},
-	date = {2020-02-06},
-	year = {2020},
-	month = {2},
-	day = {6}
+@online{kra:hamilton,
+  title = {Hamilton-Funktion},
+  url   = {https://de.wikipedia.org/wiki/Hamilton-Funktion},
+  date  = {2022-05-26}
 }
 
-@book{kra:numerical-analysis,
-	title = {Numerical Analysis},
-	author = {David Kincaid and Ward Cheney},
-	publisher = {American Mathematical Society},
-	year = {2002},
-	isbn = {978-8-8218-4788-6},
-	inseries = {Pure and applied undegraduate texts},
-	volume = {2}
+@misc{kra:kanonischegleichungen,
+  title = {Kanonische Gleichungen},
+  url   = {https://de.wikipedia.org/wiki/Kanonische_Gleichungen},
+  date  = {2022-05-26}
 }
 
-@article{kra:mendezmueller,
-        author = { Tabea Méndez and Andreas Müller },
-        title = { Noncommutative harmonic analysis and image registration },
-        journal = { Appl. Comput. Harmon. Anal.},
-        year = 2019,
-        volume = 47,
-        pages = {607--627},
-        url = {https://doi.org/10.1016/j.acha.2017.11.004}
+@misc{kra:newton,
+  title = {Newtonsche Gesetze},
+  url   = {https://de.wikipedia.org/wiki/Newtonsche_Gesetze},
+  date  = {2022-05-26}
 }
 
+@misc{kra:kalmanisae,
+  author = {D.Alazard},
+  title  = {Introduction to Kalman filtering},
+  url    = {https://pagespro.isae-supaero.fr/IMG/pdf/introKalman_e_151211.pdf},
+  date   = {2022-05-26}
+}
diff --git a/buch/papers/kra/riccati.tex b/buch/papers/kra/riccati.tex
new file mode 100644
index 0000000..df2921d
--- /dev/null
+++ b/buch/papers/kra/riccati.tex
@@ -0,0 +1,93 @@
+\section{Riccati
+  \label{kra:section:riccati}}
+\rhead{Riccati}
+
+\begin{equation}
+    y'(x) = f(x)y^2(x) + g(x)y(x) + h(x)
+\end{equation}
+% einfache (normale riccati gleichung und ihre loesung)
+% (kann man diese bei einfachem federmasse system benutzten?)
+% matrix riccati gleichung
+
+
+Die zeitkontinuierliche Riccati-Matrix-Gleichung hat die Form
+\begin{equation}
+    \label{kra:riccati:riccatiequation}
+    \dot{U(t)} = DU(t) - UA(t) - U(t)BU(t)
+\end{equation}
+
+Betrachten wir das Differentialgleichungssystem \ref{kra:riccati:derivation}
+
+\begin{equation}
+    \label{kra:riccati:derivation}
+    \dt
+    \begin{pmatrix}
+        X \\
+        Y
+    \end{pmatrix}
+    =
+    \underbrace{
+        \begin{pmatrix}
+            A & B \\
+            C & D
+        \end{pmatrix}
+    }_{H}
+    \begin{pmatrix}
+        X \\
+        Y
+    \end{pmatrix}
+\end{equation}
+
+interessieren wir uns für die zeitliche Änderung der Grösse $U = YX^{-1}$, so erhalten wir durch einsetzten
+
+\begin{align*}
+    \dt U & = \dot{Y} X^{-1} + Y \dt X^{-1}                                                                           \\
+          & = (CX + DY) X^{-1} - Y (X^{-1} \dot{X} X^{-1})                                                            \\
+          & = C\underbrace{XX^{-1}}_\text{I} + D\underbrace{YX^{-1}}_\text{U} - Y(X^{-1} (AX + BY) X^{-1})            \\
+          & = C + DU - \underbrace{YX^{-1}}_\text{U}(A\underbrace{XX^{-1}}_\text{I} + B\underbrace{YX^{-1}}_\text{U}) \\
+          & = C  + DU - UA - UBU
+\end{align*}
+
+was uns auf die Riccati-Matrix-Gleichung \ref{kra:riccati:riccatiequation} führt.
+Die Lösung dieser Gleichung erhalten wir nach \cite{kra:kalmanisae} folgendermassen
+\begin{equation}
+    \begin{pmatrix}
+        X(t) \\
+        Y(t)
+    \end{pmatrix}
+    =
+    \Phi(t_0, t)
+    \begin{pmatrix}
+        I(t) \\
+        U_0(t)
+    \end{pmatrix}
+    =
+    \begin{pmatrix}
+        \Phi_{11}(t_0, t) & \Phi_{12}(t_0, t) \\
+        \Phi_{21}(t_0, t) & \Phi_{22}(t_0, t)
+    \end{pmatrix}
+    \begin{pmatrix}
+        I(t) \\
+        U_0(t)
+    \end{pmatrix}
+\end{equation}
+
+\begin{equation}
+    U(t) =
+    \begin{pmatrix}
+        \Phi_{21}(t_0, t) + \Phi_{22}(t_0, t)
+    \end{pmatrix}
+    \begin{pmatrix}
+        \Phi_{11}(t_0, t) + \Phi_{12}(t_0, t)
+    \end{pmatrix}
+    ^{-1}
+\end{equation}
+
+wobei $\Phi(t, t_0)$ die sogennante Zustandsübergangsmatrix ist.
+
+\begin{equation}
+    \Phi(t_0, t) = e^{H(t - t_0)}
+\end{equation}
+
+
+
diff --git a/buch/papers/kra/teil0.tex b/buch/papers/kra/teil0.tex
deleted file mode 100644
index d06a055..0000000
--- a/buch/papers/kra/teil0.tex
+++ /dev/null
@@ -1,22 +0,0 @@
-%
-% einleitung.tex -- Beispiel-File für die Einleitung
-%
-% (c) 2020 Prof Dr Andreas Müller, Hochschule Rapperswil
-%
-\section{Teil 0\label{kra:section:teil0}}
-\rhead{Teil 0}
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
-nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
-erat, sed diam voluptua \cite{kra:bibtex}.
-At vero eos et accusam et justo duo dolores et ea rebum.
-Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum
-dolor sit amet.
-
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
-nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
-erat, sed diam voluptua.
-At vero eos et accusam et justo duo dolores et ea rebum.  Stet clita
-kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
-amet.
-
-
diff --git a/buch/papers/kra/teil1.tex b/buch/papers/kra/teil1.tex
deleted file mode 100644
index 0c0977d..0000000
--- a/buch/papers/kra/teil1.tex
+++ /dev/null
@@ -1,55 +0,0 @@
-%
-% teil1.tex -- Beispiel-File für das Paper
-%
-% (c) 2020 Prof Dr Andreas Müller, Hochschule Rapperswil
-%
-\section{Teil 1
-\label{kra:section:teil1}}
-\rhead{Problemstellung}
-Sed ut perspiciatis unde omnis iste natus error sit voluptatem
-accusantium doloremque laudantium, totam rem aperiam, eaque ipsa
-quae ab illo inventore veritatis et quasi architecto beatae vitae
-dicta sunt explicabo.
-Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit
-aut fugit, sed quia consequuntur magni dolores eos qui ratione
-voluptatem sequi nesciunt
-\begin{equation}
-\int_a^b x^2\, dx
-=
-\left[ \frac13 x^3 \right]_a^b
-=
-\frac{b^3-a^3}3.
-\label{kra:equation1}
-\end{equation}
-Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet,
-consectetur, adipisci velit, sed quia non numquam eius modi tempora
-incidunt ut labore et dolore magnam aliquam quaerat voluptatem.
-
-Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis
-suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?
-Quis autem vel eum iure reprehenderit qui in ea voluptate velit
-esse quam nihil molestiae consequatur, vel illum qui dolorem eum
-fugiat quo voluptas nulla pariatur?
-
-\subsection{De finibus bonorum et malorum
-\label{kra:subsection:finibus}}
-At vero eos et accusamus et iusto odio dignissimos ducimus qui
-blanditiis praesentium voluptatum deleniti atque corrupti quos
-dolores et quas molestias excepturi sint occaecati cupiditate non
-provident, similique sunt in culpa qui officia deserunt mollitia
-animi, id est laborum et dolorum fuga \eqref{000tempmlate:equation1}.
-
-Et harum quidem rerum facilis est et expedita distinctio
-\ref{kra:section:loesung}.
-Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil
-impedit quo minus id quod maxime placeat facere possimus, omnis
-voluptas assumenda est, omnis dolor repellendus
-\ref{kra:section:folgerung}.
-Temporibus autem quibusdam et aut officiis debitis aut rerum
-necessitatibus saepe eveniet ut et voluptates repudiandae sint et
-molestiae non recusandae.
-Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis
-voluptatibus maiores alias consequatur aut perferendis doloribus
-asperiores repellat.
-
-
diff --git a/buch/papers/kra/teil2.tex b/buch/papers/kra/teil2.tex
deleted file mode 100644
index 249f078..0000000
--- a/buch/papers/kra/teil2.tex
+++ /dev/null
@@ -1,40 +0,0 @@
-%
-% teil2.tex -- Beispiel-File für teil2 
-%
-% (c) 2020 Prof Dr Andreas Müller, Hochschule Rapperswil
-%
-\section{Teil 2 
-\label{kra:section:teil2}}
-\rhead{Teil 2}
-Sed ut perspiciatis unde omnis iste natus error sit voluptatem
-accusantium doloremque laudantium, totam rem aperiam, eaque ipsa
-quae ab illo inventore veritatis et quasi architecto beatae vitae
-dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit
-aspernatur aut odit aut fugit, sed quia consequuntur magni dolores
-eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam
-est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
-velit, sed quia non numquam eius modi tempora incidunt ut labore
-et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima
-veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,
-nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure
-reprehenderit qui in ea voluptate velit esse quam nihil molestiae
-consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla
-pariatur?
-
-\subsection{De finibus bonorum et malorum
-\label{kra:subsection:bonorum}}
-At vero eos et accusamus et iusto odio dignissimos ducimus qui
-blanditiis praesentium voluptatum deleniti atque corrupti quos
-dolores et quas molestias excepturi sint occaecati cupiditate non
-provident, similique sunt in culpa qui officia deserunt mollitia
-animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis
-est et expedita distinctio. Nam libero tempore, cum soluta nobis
-est eligendi optio cumque nihil impedit quo minus id quod maxime
-placeat facere possimus, omnis voluptas assumenda est, omnis dolor
-repellendus. Temporibus autem quibusdam et aut officiis debitis aut
-rerum necessitatibus saepe eveniet ut et voluptates repudiandae
-sint et molestiae non recusandae. Itaque earum rerum hic tenetur a
-sapiente delectus, ut aut reiciendis voluptatibus maiores alias
-consequatur aut perferendis doloribus asperiores repellat.
-
-
diff --git a/buch/papers/kra/teil3.tex b/buch/papers/kra/teil3.tex
deleted file mode 100644
index 2515c7d..0000000
--- a/buch/papers/kra/teil3.tex
+++ /dev/null
@@ -1,40 +0,0 @@
-%
-% teil3.tex -- Beispiel-File für Teil 3
-%
-% (c) 2020 Prof Dr Andreas Müller, Hochschule Rapperswil
-%
-\section{Teil 3
-\label{kra:section:teil3}}
-\rhead{Teil 3}
-Sed ut perspiciatis unde omnis iste natus error sit voluptatem
-accusantium doloremque laudantium, totam rem aperiam, eaque ipsa
-quae ab illo inventore veritatis et quasi architecto beatae vitae
-dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit
-aspernatur aut odit aut fugit, sed quia consequuntur magni dolores
-eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam
-est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
-velit, sed quia non numquam eius modi tempora incidunt ut labore
-et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima
-veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,
-nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure
-reprehenderit qui in ea voluptate velit esse quam nihil molestiae
-consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla
-pariatur?
-
-\subsection{De finibus bonorum et malorum
-\label{kra:subsection:malorum}}
-At vero eos et accusamus et iusto odio dignissimos ducimus qui
-blanditiis praesentium voluptatum deleniti atque corrupti quos
-dolores et quas molestias excepturi sint occaecati cupiditate non
-provident, similique sunt in culpa qui officia deserunt mollitia
-animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis
-est et expedita distinctio. Nam libero tempore, cum soluta nobis
-est eligendi optio cumque nihil impedit quo minus id quod maxime
-placeat facere possimus, omnis voluptas assumenda est, omnis dolor
-repellendus. Temporibus autem quibusdam et aut officiis debitis aut
-rerum necessitatibus saepe eveniet ut et voluptates repudiandae
-sint et molestiae non recusandae. Itaque earum rerum hic tenetur a
-sapiente delectus, ut aut reiciendis voluptatibus maiores alias
-consequatur aut perferendis doloribus asperiores repellat.
-
-
diff --git a/buch/papers/kra/test.tex b/buch/papers/kra/test.tex
new file mode 100644
index 0000000..ebe0aa0
--- /dev/null
+++ b/buch/papers/kra/test.tex
@@ -0,0 +1,12 @@
+\begin{figure}
+    \input{papers/kra/images/phase_space.tex}
+    % \begin{minipage}{.45\textwidth}
+    %     \input{papers/kra/images/phase_space_small_omega.tex}
+    % \end{minipage}
+    % \begin{minipage}{.45\textwidth}
+    %     \input{papers/kra/images/phase_space_large_omega.tex}
+    % \end{minipage}
+    % \begin{minipage}[.5\textwidth]
+    %     \input{papers/kra/images/phase_space_large_omega.tex}
+    % \end{minipage}
+\end{figure}
\ No newline at end of file
-- 
cgit v1.2.1


From 1d78360ee72a8d0d6cd4b440a2244624c284887f Mon Sep 17 00:00:00 2001
From: samuel niederer <samuel.niederer@ost.ch>
Date: Sun, 24 Jul 2022 17:12:49 +0200
Subject: update paper

---
 buch/papers/kra/Makefile.inc   |  11 +-
 buch/papers/kra/anwendung.tex  | 235 +++++++++++++++++++++++++++++++++++++++++
 buch/papers/kra/einleitung.tex |  14 +++
 buch/papers/kra/hamilton.tex   | 185 --------------------------------
 buch/papers/kra/loesung.tex    |  47 +++++++++
 buch/papers/kra/main.tex       |  10 +-
 buch/papers/kra/riccati.tex    |  93 ----------------
 7 files changed, 306 insertions(+), 289 deletions(-)
 create mode 100644 buch/papers/kra/anwendung.tex
 create mode 100644 buch/papers/kra/einleitung.tex
 delete mode 100644 buch/papers/kra/hamilton.tex
 create mode 100644 buch/papers/kra/loesung.tex
 delete mode 100644 buch/papers/kra/riccati.tex

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/Makefile.inc b/buch/papers/kra/Makefile.inc
index f453e6e..a521e4b 100644
--- a/buch/papers/kra/Makefile.inc
+++ b/buch/papers/kra/Makefile.inc
@@ -4,11 +4,10 @@
 # (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
 #
 dependencies-kra =						\
-	papers/kra/packages.tex					\
+	papers/kra/packages.tex				\
 	papers/kra/main.tex					\
-	papers/kra/references.bib				\
-	papers/kra/teil0.tex					\
-	papers/kra/teil1.tex					\
-	papers/kra/teil2.tex					\
-	papers/kra/teil3.tex
+	papers/kra/references.bib			\
+	papers/kra/einleitung.tex			\
+	papers/kra/loesung.tex				\
+	papers/kra/anwendung.tex			\
 
diff --git a/buch/papers/kra/anwendung.tex b/buch/papers/kra/anwendung.tex
new file mode 100644
index 0000000..4d4d351
--- /dev/null
+++ b/buch/papers/kra/anwendung.tex
@@ -0,0 +1,235 @@
+\section{Anwendungen \label{kra:section:anwendung}}
+\rhead{Anwendungen}
+\newcommand{\dt}[0]{\frac{d}{dt}}
+
+Die Matrix-Riccati Differentialgleichung findet unter anderem Anwendung in der Regelungstechnik beim RQ- und RQG-Regler oder aber auch beim Kalmanfilter.
+Im folgenden Abschnitt möchten wir uns an einem Beispiel anschauen wie wir mit Hilfe der Matrix-Riccati Differentialgleichung (\ref{kra:matrixriccati}) ein Feder-Masse-System untersuchen können.
+
+\subsection{Feder-Masse-System}
+Die Einfachste Form eines Feder-Masse-Systems ist dargestellt in Abbildung \ref{kra:fig:simple_mass_spring}.
+Es besteht aus einer Masse $m$ welche reibungsfrei gelagert ist und einer Feder mit der Federkonstante $k$.
+Die im System wirkenden Kräfte teilen sich auf in die auf dem hookeschen Gesetz basierenden Rückstellkraft $F_R = k \Delta_x$ und der auf dem Aktionsprinzip basierenden Kraft $F_a = am = \ddot{x} m$.
+Das Kräftegleichgewicht fordert $F_R = F_a$ woraus folgt, dass
+
+\begin{equation*}
+    k \Delta_x = \ddot{x} m \Leftrightarrow \ddot{x} = \frac{k \Delta_x}{m}
+\end{equation*}
+Die funktion die diese Differentialgleichung löst ist die harmonische Schwingung
+\begin{equation}
+    x(t) = A \cos(\omega_0 t + \Phi), \quad \omega_0 = \sqrt{\frac{k}{m}}
+\end{equation}
+
+
+\begin{figure}
+    \input{papers/kra/images/simple_mass_spring.tex}
+    \caption{Einfaches Feder-Masse-System.}
+    \label{kra:fig:simple_mass_spring}
+\end{figure}
+
+\begin{figure}
+    \input{papers/kra/images/multi_mass_spring.tex}
+    \caption{Feder-Masse-System mit zwei Massen und drei Federn.}
+    \label{kra:fig:multi_mass_spring}
+\end{figure}
+
+
+\subsection{Hamilton-Funktion}
+Die Bewegung der Masse $m$ kann mit Hilfe der hamiltonschen Mechanik im Phasenraum untersucht werden.
+Die hamiltonschen Gleichungen verwenden dafür die veralgemeinerten Ortskoordinaten
+$q = (q_{1}, q_{2}, ..., q_{n})$ und die verallgemeinerten Impulskoordinaten $p = (p_{1}, p_{2}, ..., p_{n})$, wobei der Impuls definiert ist als $p_k = m_k \cdot v_k$.
+Liegen keine zeitabhängigen Zwangsbedingungen vor, so entspricht die Hamitlon-Funktion der Gesamtenergie des Systems \cite{kra:hamilton}.
+Im Falle des einfachen Feder-Masse-Systems, Abbildung \ref{kra:fig:simple_mass_spring}, setzt sich die Hamilton-Funktion aus kinetischer und potentieller Energie zusammen.
+
+\begin{equation}
+    \label{kra:harmonischer_oszillator}
+    \begin{split}
+        \mathcal{H}(q, p) &= T(p) + V(q) = E \\
+        &= \underbrace{\frac{p^2}{2m}}_{E_{kin}} + \underbrace{\frac{k q^2}{2}}_{E_{pot}}
+    \end{split}
+\end{equation}
+
+Die Hamiltonschen Bewegungsgleichungen liefern \cite{kra:kanonischegleichungen}
+\begin{equation}
+    \label{kra:hamilton:bewegungsgleichung}
+    \dot{q_{k}} = \frac{\partial \mathcal{H}}{\partial p_k}
+    \qquad
+    \dot{p_{k}} = -\frac{\partial \mathcal{H}}{\partial q_k}
+\end{equation}
+
+daraus folgt
+
+\[
+    \dot{q} = \frac{p}{m}
+    \qquad
+    \dot{p} = -kq
+\]
+
+in Matrixschreibweise erhalten wir also
+
+\[
+    \begin{pmatrix}
+        \dot{q} \\
+        \dot{p}
+    \end{pmatrix}
+    =
+    \begin{pmatrix}
+        0  & \frac{1}{m} \\
+        -k & 0
+    \end{pmatrix}
+    \begin{pmatrix}
+        q \\
+        p
+    \end{pmatrix}
+\]
+
+Für das erweiterte Federmassesystem, Abbildung \ref{kra:fig:multi_mass_spring}, können wir analog vorgehen.
+Die kinetische Energie setzt sich nun aus den kinetischen Energien der einzelnen Massen $m_1$ und $m_2$ zusammen.
+Die Potentielle Energie erhalten wir aus der Summe der kinetischen Energien der einzelnen Federn mit den Federkonstanten $k_1$, $k_c$ und $k_2$.
+
+\begin{align*}
+    \begin{split}
+        T   &= T_1 + T_2 \\
+        &= \frac{p_1^2}{2m_1} + \frac{p_2^2}{2m_2}
+    \end{split}
+    \\
+    \begin{split}
+        V   &= V_1 + V_c + V_2 \\
+        &= \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}
+    \end{split}
+\end{align*}
+
+Die Hamilton-Funktion ist also
+
+\begin{align*}
+    \begin{split}
+        \mathcal{H}     &= T + V \\
+        &= \frac{p_1^2}{2m_1} + \frac{p_2^2}{2m_2} + \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}
+    \end{split}
+\end{align*}
+
+Die Bewegungsgleichungen \ref{kra:hamilton:bewegungsgleichung} liefern
+\begin{align*}
+    \frac{\partial \mathcal{H}}{\partial p_k}  & = \dot{q_k}
+    \Rightarrow
+    \left\{
+    \begin{alignedat}{2}
+        \dot{q_1}   &= \frac{2p_1}{2m_1}    &&= \frac{p_1}{m_1}\\
+        \dot{q_2}   &= \frac{2p_2}{2m_2}    &&= \frac{p_2}{m_2}
+    \end{alignedat}
+    \right.
+    \\
+    -\frac{\partial \mathcal{H}}{\partial q_k} & = \dot{p_k}
+    \Rightarrow
+    \left\{
+    \begin{alignedat}{2}
+        \dot{p_1}   &= -(\frac{2k_1q_1}{2} - \frac{2k_c(q_2-q_1)}{2})  &&= -q_1(k_1+k_c) + q_2k_c \\
+        \dot{p_1}   &= -(\frac{2k_c(q_2-q_1)}{2} - \frac{2k_2q_2}{2})  &&= q_1k_c - (k_c + k_2)
+    \end{alignedat}
+    \right.
+\end{align*}
+
+In Matrixschreibweise erhalten wir
+
+\begin{equation}
+    \label{kra:hamilton:multispringmass}
+    \begin{pmatrix}
+        \dot{q_1} \\
+        \dot{q_2} \\
+        \dot{p_1} \\
+        \dot{p_2} \\
+    \end{pmatrix}
+    =
+    \begin{pmatrix}
+        0            & 0            & \frac{1}{2m_1} & 0              \\
+        0            & 0            & 0              & \frac{1}{2m_2} \\
+        -(k_1 + k_c) & k_c          & 0              & 0              \\
+        k_c          & -(k_c + k_2) & 0              & 0              \\
+    \end{pmatrix}
+    \begin{pmatrix}
+        q_1 \\
+        q_2 \\
+        p_1 \\
+        p_2 \\
+    \end{pmatrix}
+    \Leftrightarrow
+    \dt
+    \begin{pmatrix}
+        Q \\
+        P \\
+    \end{pmatrix}
+    =
+    \underbrace{
+        \begin{pmatrix}
+            0 & M \\
+            K & 0
+        \end{pmatrix}
+    }_{G}
+    \begin{pmatrix}
+        Q \\
+        P \\
+    \end{pmatrix}
+\end{equation}
+
+\subsection{Phasenraum}
+Der Phasenraum erlaubt die eindeutige Beschreibung aller möglichen Bewegungszustände eines mechanischen System durch einen Punkt.
+Die Phasenraumdarstellung eignet sich somit sehr gut für die systematische Untersuchung der Feder-Masse-Systeme.
+
+\subsubsection{Harmonischer Oszillator}
+Die Hamiltonfunktion des harmonischen Oszillators \ref{kra:harmonischer_oszillator} führt auf eine Lösung der Form
+\begin{equation*}
+    q(t) = A \cos(\omega_0 T + \Phi), \quad p(t) = -m \omega_0 A \sin(\omega_0 t + \Phi)
+\end{equation*}
+die Phasenraumtrajektorien bilden also Ellipsen mit Zentrum $q=0, p=0$ und Halbachsen $A$ und $m \omega A$.
+Abbildung \ref{kra:fig:phasenraum} zeigt Phasenraumtrajektorien mit den Energien $E_{x \in \{A, B, C, D\}}$ und verschiedenen Werten von $\omega$.
+
+\begin{figure}
+    \input{papers/kra/images/phase_space.tex}
+    \caption{Phasenraumdarstellung des einfachen Feder-Masse-Systems.}
+    \label{kra:fig:phasenraum}
+\end{figure}
+
+\subsubsection{Erweitertes Feder-Masse-System}
+Wir intressieren uns nun dafür wie der Phasenwinkel $U = PQ^{-1}$ von der Zeit abhängt,
+wir suchen also die Grösse $\Theta = \dt U$.
+
+Ersetzten wir in der Gleichung \ref{kra:hamilton:multispringmass} die Matrix $G$ mit $\tilde{G}$ so erhalten wir
+\begin{equation}
+    \dt
+    \begin{pmatrix}
+        Q \\
+        P
+    \end{pmatrix}
+    =
+    \underbrace{
+        \begin{pmatrix}
+            A & B \\
+            C & D
+        \end{pmatrix}
+    }_{\tilde{G}}
+    \begin{pmatrix}
+        Q \\
+        P
+    \end{pmatrix}
+\end{equation}
+
+Mit einsetzten folgt
+
+\begin{align*}
+    \dot{Q} = AQ + BP \\
+    \dot{P} = CQ + DP
+\end{align*}
+\begin{equation}
+    \begin{split}
+        \dt U   &= \dot{P} Q^{-1} + P \dt Q^{-1} \\
+        &= (CQ + DP) Q^{-1} - P (Q^{-1} \dot{Q} Q^{-1}) \\
+        &= C\underbrace{QQ^{-1}}_\text{I} + D\underbrace{PQ^{-1}}_\text{U} - P(Q^{-1} (AQ + BP) Q^{-1}) \\
+        &= C + DU - \underbrace{PQ^{-1}}_\text{U}(A\underbrace{QQ^{-1}}_\text{I} + B\underbrace{PQ^{-1}}_\text{U}) \\
+        &= C  + DU - UA - UBU
+    \end{split}
+\end{equation}
+
+was uns auf die Matrix-Riccati Gleichung \ref{kra:matrixriccati} führt.
+
+
+\subsection{Fazit}
+% @TODO
diff --git a/buch/papers/kra/einleitung.tex b/buch/papers/kra/einleitung.tex
new file mode 100644
index 0000000..1a347a8
--- /dev/null
+++ b/buch/papers/kra/einleitung.tex
@@ -0,0 +1,14 @@
+\section{Einleitung} \label{kra:section:einleitung}
+\rhead{Einleitung}
+Die riccatische Differentialgleichung ist eine nichtlineare gewöhnliche Differentialgleichunge erster Ordnung der form
+\begin{equation}
+    \label{kra:riccati}
+    y'(x) = f(x)y^2(x) + g(x)y(x) + h(x)
+\end{equation}
+Sie ist bennant nach dem italienischen Grafen Jacopo Francesco Riccati (1676–1754) der sich mit der Klassifizierung von Differentialgleichungen befasste und Methoden zur Verringerung der Ordnung von Gleichungen entwickelte.
+Als Riccati Gleichung werden auch Matrixgleichugen der Form
+\begin{equation}
+    \label{kra:matrixriccati}
+    \dot{U}(t) = DU(t) - UA(t) - U(t)BU(t) % +Q ?
+\end{equation}
+bezeichnet, welche aufgrund ihres quadratischen Terms eine gewisse ähnlichkeit aufweisen.
\ No newline at end of file
diff --git a/buch/papers/kra/hamilton.tex b/buch/papers/kra/hamilton.tex
deleted file mode 100644
index 14a5e8c..0000000
--- a/buch/papers/kra/hamilton.tex
+++ /dev/null
@@ -1,185 +0,0 @@
-\newcommand{\dt}[0]{\frac{d}{dt}}
-
-\section{Teil abc\label{kra:section:teilabc}}
-\rhead{Teil abc}
-
-\subsection{Hamilton-Funktion}
-Die Bewegung der Masse $m$ kann mit Hilfe der hamiltonschen Mechanik im Phasenraum untersucht werden.
-Die hamiltonschen Gleichungen verwenden dafür die veralgemeinerten Ortskoordinaten
-$q = (q_{1}, q_{2}, ..., q_{n})$ und die verallgemeinerten Impulskoordinaten $p = (p_{1}, p_{2}, ..., p_{n})$,
-wobei der Impuls definiert ist als $p_k = m_k \cdot v_k$.
-Liegen keine zeitabhängigen Zwangsbedingungen vor, so entspricht die Hamitlon-Funktion der Gesamtenergie des Systems \cite{kra:hamilton}.
-Im Falle des einfachen Federmassesystems, Abbildung \ref{kra:fig:simple_spring_mass},
-setzt sich die Hamilton-Funktion aus kinetischer und potentieller Energie zusammen.
-
-\begin{equation}
-    \label{hamilton}
-    \begin{split}
-        \mathcal{H}(q, p) &= T(p) + V(q) = E \\
-        &= \underbrace{\frac{p^2}{2m}}_{E_{kin}} + \underbrace{\frac{k q^2}{2}}_{E_{pot}}
-    \end{split}
-\end{equation}
-
-Die Hamiltonschen Bewegungsgleichungen liefern \cite{kra:kanonischegleichungen}
-\begin{equation}
-    \label{kra:hamilton:bewegungsgleichung}
-    \dot{q_{k}} = \frac{\partial \mathcal{H}}{\partial p_k}
-    \qquad
-    \dot{p_{k}} = -\frac{\partial \mathcal{H}}{\partial q_k}
-\end{equation}
-
-daraus folgt
-
-\[
-    \dot{q} = \frac{p}{m}
-    \qquad
-    \dot{p} = -kq
-\]
-
-in Matrixschreibweise erhalten wir also
-
-\[
-    \begin{pmatrix}
-        \dot{q} \\
-        \dot{p}
-    \end{pmatrix}
-    =
-    \begin{pmatrix}
-        0  & \frac{1}{m} \\
-        -k & 0
-    \end{pmatrix}
-    \begin{pmatrix}
-        q \\
-        p
-    \end{pmatrix}
-\]
-
-Für das erweiterte Federmassesystem, Abbildung \ref{kra:fig:multi_spring_mass}, können wir analog vorgehen.
-Die kinetische Energie setzt sich nun aus den kinetischen Energien der einzelnen Massen $m_1$ und $m_2$ zusammen.
-Die Potentielle Energie erhalten wir aus der Summe der kinetischen Energien der einzelnen Federn mit den Federkonstanten $k_1$, $k_c$ und $k_2$.
-
-\begin{align*}
-    \begin{split}
-        T   &= T_1 + T_2 \\
-        &= \frac{p_1^2}{2m_1} + \frac{p_2^2}{2m_2}
-    \end{split}
-    \\
-    \begin{split}
-        V   &= V_1 + V_c + V_2 \\
-        &= \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}
-    \end{split}
-\end{align*}
-
-Die Hamilton-Funktion ist also
-
-\begin{align*}
-    \begin{split}
-        \mathcal{H}     &= T + V \\
-        &= \frac{p_1^2}{2m_1} + \frac{p_2^2}{2m_2} + \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}
-    \end{split}
-\end{align*}
-
-Die Bewegungsgleichungen \ref{kra:hamilton:bewegungsgleichung} liefern
-\begin{align*}
-    \frac{\partial \mathcal{H}}{\partial p_k}  & = \dot{q_k}
-    \Rightarrow
-    \left\{
-    \begin{alignedat}{2}
-        \dot{q_1}   &= \frac{2p_1}{2m_1}    &&= \frac{p_1}{m_1}\\
-        \dot{q_2}   &= \frac{2p_2}{2m_2}    &&= \frac{p_2}{m_2}
-    \end{alignedat}
-    \right.
-    \\
-    -\frac{\partial \mathcal{H}}{\partial q_k} & = \dot{p_k}
-    \Rightarrow
-    \left\{
-    \begin{alignedat}{2}
-        \dot{p_1}   &= -(\frac{2k_1q_1}{2} - \frac{2k_c(q_2-q_1)}{2})  &&= -q_1(k_1+k_c) + q_2k_c \\
-        \dot{p_1}   &= -(\frac{2k_c(q_2-q_1)}{2} - \frac{2k_2q_2}{2})  &&= q_1k_c - (k_c + k_2)
-    \end{alignedat}
-    \right.
-\end{align*}
-
-In Matrixschreibweise erhalten wir
-
-\begin{equation}
-    \label{kra:hamilton:multispringmass}
-    \begin{pmatrix}
-        \dot{q_1} \\
-        \dot{q_2} \\
-        \dot{p_1} \\
-        \dot{p_2} \\
-    \end{pmatrix}
-    =
-    \begin{pmatrix}
-        0            & 0            & \frac{1}{2m_1} & 0              \\
-        0            & 0            & 0              & \frac{1}{2m_2} \\
-        -(k_1 + k_c) & k_c          & 0              & 0              \\
-        k_c          & -(k_c + k_2) & 0              & 0              \\
-    \end{pmatrix}
-    \begin{pmatrix}
-        q_1 \\
-        q_2 \\
-        p_1 \\
-        p_2 \\
-    \end{pmatrix}
-    \Leftrightarrow
-    \dt
-    \begin{pmatrix}
-        Q \\
-        P \\
-    \end{pmatrix}
-    \underbrace{
-        \begin{pmatrix}
-            0 & M \\
-            K & 0
-        \end{pmatrix}
-    }_{G}
-    \begin{pmatrix}
-        Q \\
-        P \\
-    \end{pmatrix}
-\end{equation}
-
-
-Wir intressieren uns nun dafür wie der Phasenwinkel $U = PQ^{-1}$ von der Zeit abhängt,
-wir suchen also die Grösse $\Theta = \dt U$.
-
-Ersetzten wir in der Gleichung \ref{kra:hamilton:multispringmass} die Matrix $G$ mit $\tilde{G}$ so erhalten wir
-\begin{equation}
-    \dt
-    \begin{pmatrix}
-        Q \\
-        P
-    \end{pmatrix}
-    =
-    \underbrace{
-        \begin{pmatrix}
-            A & B \\
-            C & D
-        \end{pmatrix}
-    }_{\tilde{G}}
-    \begin{pmatrix}
-        Q \\
-        P
-    \end{pmatrix}
-\end{equation}
-
-Mit einsetzten folgt
-
-\begin{align*}
-    \dot{Q} = AQ + BP \\
-    \dot{P} = CQ + DP
-\end{align*}
-\begin{equation}
-    \begin{split}
-        \dt U   &= \dot{P} Q^{-1} + P \dt Q^{-1} \\
-        &= (CQ + DP) Q^{-1} - P (Q^{-1} \dot{Q} Q^{-1}) \\
-        &= C\underbrace{QQ^{-1}}_\text{I} + D\underbrace{PQ^{-1}}_\text{U} - P(Q^{-1} (AQ + BP) Q^{-1}) \\
-        &= C + DU - \underbrace{PQ^{-1}}_\text{U}(A\underbrace{QQ^{-1}}_\text{I} + B\underbrace{PQ^{-1}}_\text{U}) \\
-        &= C  + DU - UA - UBU
-    \end{split}
-\end{equation}
-
-was uns auf die zeitkontinuierliche Matrix-Riccati-Gleichung führt.
-
diff --git a/buch/papers/kra/loesung.tex b/buch/papers/kra/loesung.tex
new file mode 100644
index 0000000..ece0f15
--- /dev/null
+++ b/buch/papers/kra/loesung.tex
@@ -0,0 +1,47 @@
+\section{Lösungsmethoden} \label{kra:section:loesung}
+\rhead{Lösungsmethoden}
+% @TODO Lösung normal riccati
+Lösung der Riccatischen Differentialgleichung \ref{kra:riccati}.
+
+
+% Lösung matrix riccati
+Die Lösung der Matrix-Riccati Gleichung \ref{kra:matrixriccati} erhalten wir nach \cite{kra:kalmanisae} folgendermassen
+\begin{equation}
+    \label{kra:matrixriccati-solution}
+    \begin{pmatrix}
+        X(t) \\
+        Y(t)
+    \end{pmatrix}
+    =
+    \Phi(t_0, t)
+    \begin{pmatrix}
+        I(t) \\
+        U_0(t)
+    \end{pmatrix}
+    =
+    \begin{pmatrix}
+        \Phi_{11}(t_0, t) & \Phi_{12}(t_0, t) \\
+        \Phi_{21}(t_0, t) & \Phi_{22}(t_0, t)
+    \end{pmatrix}
+    \begin{pmatrix}
+        I(t) \\
+        U_0(t)
+    \end{pmatrix}
+\end{equation}
+
+\begin{equation}
+    U(t) =
+    \begin{pmatrix}
+        \Phi_{21}(t_0, t) + \Phi_{22}(t_0, t)
+    \end{pmatrix}
+    \begin{pmatrix}
+        \Phi_{11}(t_0, t) + \Phi_{12}(t_0, t)
+    \end{pmatrix}
+    ^{-1}
+\end{equation}
+
+wobei $\Phi(t, t_0)$ die sogennante Zustandsübergangsmatrix ist.
+
+\begin{equation}
+    \Phi(t_0, t) = e^{H(t - t_0)}
+\end{equation}
diff --git a/buch/papers/kra/main.tex b/buch/papers/kra/main.tex
index 456b6ee..a84ebaf 100644
--- a/buch/papers/kra/main.tex
+++ b/buch/papers/kra/main.tex
@@ -3,12 +3,12 @@
 %
 % (c) 2020 Hochschule Rapperswil
 %
-\chapter{Kalman, Riccati und Abel\label{chapter:kra}}
-\lhead{Kalman, Riccati und Abel}
+\chapter{Riccati Differentialgleichung\label{chapter:kra}}
+\lhead{Riccati Differentialgleichung}
 \begin{refsection}
       \chapterauthor{Samuel Niederer}
-      \input{papers/kra/hamilton.tex}
-      \newpage
-      \input{papers/kra/riccati.tex}
+      \input{papers/kra/einleitung.tex}
+      \input{papers/kra/loesung.tex}
+      \input{papers/kra/anwendung.tex}
       \printbibliography[heading=subbibliography]
 \end{refsection}
diff --git a/buch/papers/kra/riccati.tex b/buch/papers/kra/riccati.tex
deleted file mode 100644
index df2921d..0000000
--- a/buch/papers/kra/riccati.tex
+++ /dev/null
@@ -1,93 +0,0 @@
-\section{Riccati
-  \label{kra:section:riccati}}
-\rhead{Riccati}
-
-\begin{equation}
-    y'(x) = f(x)y^2(x) + g(x)y(x) + h(x)
-\end{equation}
-% einfache (normale riccati gleichung und ihre loesung)
-% (kann man diese bei einfachem federmasse system benutzten?)
-% matrix riccati gleichung
-
-
-Die zeitkontinuierliche Riccati-Matrix-Gleichung hat die Form
-\begin{equation}
-    \label{kra:riccati:riccatiequation}
-    \dot{U(t)} = DU(t) - UA(t) - U(t)BU(t)
-\end{equation}
-
-Betrachten wir das Differentialgleichungssystem \ref{kra:riccati:derivation}
-
-\begin{equation}
-    \label{kra:riccati:derivation}
-    \dt
-    \begin{pmatrix}
-        X \\
-        Y
-    \end{pmatrix}
-    =
-    \underbrace{
-        \begin{pmatrix}
-            A & B \\
-            C & D
-        \end{pmatrix}
-    }_{H}
-    \begin{pmatrix}
-        X \\
-        Y
-    \end{pmatrix}
-\end{equation}
-
-interessieren wir uns für die zeitliche Änderung der Grösse $U = YX^{-1}$, so erhalten wir durch einsetzten
-
-\begin{align*}
-    \dt U & = \dot{Y} X^{-1} + Y \dt X^{-1}                                                                           \\
-          & = (CX + DY) X^{-1} - Y (X^{-1} \dot{X} X^{-1})                                                            \\
-          & = C\underbrace{XX^{-1}}_\text{I} + D\underbrace{YX^{-1}}_\text{U} - Y(X^{-1} (AX + BY) X^{-1})            \\
-          & = C + DU - \underbrace{YX^{-1}}_\text{U}(A\underbrace{XX^{-1}}_\text{I} + B\underbrace{YX^{-1}}_\text{U}) \\
-          & = C  + DU - UA - UBU
-\end{align*}
-
-was uns auf die Riccati-Matrix-Gleichung \ref{kra:riccati:riccatiequation} führt.
-Die Lösung dieser Gleichung erhalten wir nach \cite{kra:kalmanisae} folgendermassen
-\begin{equation}
-    \begin{pmatrix}
-        X(t) \\
-        Y(t)
-    \end{pmatrix}
-    =
-    \Phi(t_0, t)
-    \begin{pmatrix}
-        I(t) \\
-        U_0(t)
-    \end{pmatrix}
-    =
-    \begin{pmatrix}
-        \Phi_{11}(t_0, t) & \Phi_{12}(t_0, t) \\
-        \Phi_{21}(t_0, t) & \Phi_{22}(t_0, t)
-    \end{pmatrix}
-    \begin{pmatrix}
-        I(t) \\
-        U_0(t)
-    \end{pmatrix}
-\end{equation}
-
-\begin{equation}
-    U(t) =
-    \begin{pmatrix}
-        \Phi_{21}(t_0, t) + \Phi_{22}(t_0, t)
-    \end{pmatrix}
-    \begin{pmatrix}
-        \Phi_{11}(t_0, t) + \Phi_{12}(t_0, t)
-    \end{pmatrix}
-    ^{-1}
-\end{equation}
-
-wobei $\Phi(t, t_0)$ die sogennante Zustandsübergangsmatrix ist.
-
-\begin{equation}
-    \Phi(t_0, t) = e^{H(t - t_0)}
-\end{equation}
-
-
-
-- 
cgit v1.2.1


From 0a59be0b3c470a0f7d71ba2e39fb6ec323d89f84 Mon Sep 17 00:00:00 2001
From: "samuel.niederer" <samuel.niederer@hotmail.com>
Date: Sat, 13 Aug 2022 18:48:50 +0200
Subject: add content

---
 buch/papers/kra/anwendung.tex  | 45 +++++++++--------------------------
 buch/papers/kra/einleitung.tex | 16 ++++++-------
 buch/papers/kra/loesung.tex    | 53 ++++++++++++++++++++++++++++++++++++------
 buch/papers/kra/references.bib | 15 ++++++++++++
 4 files changed, 80 insertions(+), 49 deletions(-)

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/anwendung.tex b/buch/papers/kra/anwendung.tex
index 4d4d351..0deaf3c 100644
--- a/buch/papers/kra/anwendung.tex
+++ b/buch/papers/kra/anwendung.tex
@@ -1,45 +1,40 @@
-\section{Anwendungen \label{kra:section:anwendung}}
-\rhead{Anwendungen}
+\section{Anwendung \label{kra:section:anwendung}}
+\rhead{Anwendung}
 \newcommand{\dt}[0]{\frac{d}{dt}}
 
 Die Matrix-Riccati Differentialgleichung findet unter anderem Anwendung in der Regelungstechnik beim RQ- und RQG-Regler oder aber auch beim Kalmanfilter.
-Im folgenden Abschnitt möchten wir uns an einem Beispiel anschauen wie wir mit Hilfe der Matrix-Riccati Differentialgleichung (\ref{kra:matrixriccati}) ein Feder-Masse-System untersuchen können.
+Im folgenden Abschnitt möchten wir uns an einem Beispiel anschauen wie wir mit Hilfe der Matrix-Riccati Differentialgleichung (\ref{kra:equation:matrixriccati}) ein Feder-Masse-System untersuchen können \cite{kra:riccati}.
 
 \subsection{Feder-Masse-System}
-Die Einfachste Form eines Feder-Masse-Systems ist dargestellt in Abbildung \ref{kra:fig:simple_mass_spring}.
-Es besteht aus einer Masse $m$ welche reibungsfrei gelagert ist und einer Feder mit der Federkonstante $k$.
+Die einfachste Form eines Feder-Masse-Systems ist dargestellt in Abbildung \ref{kra:fig:simple_mass_spring}.
+Es besteht aus einer reibungsfrei gelagerten Masse $m$ ,welche an eine Feder mit der Federkonstante $k$ gekoppelt ist.
 Die im System wirkenden Kräfte teilen sich auf in die auf dem hookeschen Gesetz basierenden Rückstellkraft $F_R = k \Delta_x$ und der auf dem Aktionsprinzip basierenden Kraft $F_a = am = \ddot{x} m$.
 Das Kräftegleichgewicht fordert $F_R = F_a$ woraus folgt, dass
 
 \begin{equation*}
     k \Delta_x = \ddot{x} m \Leftrightarrow \ddot{x} = \frac{k \Delta_x}{m}
 \end{equation*}
-Die funktion die diese Differentialgleichung löst ist die harmonische Schwingung
+Die Funktion die diese Differentialgleichung löst, ist die harmonische Schwingung
 \begin{equation}
     x(t) = A \cos(\omega_0 t + \Phi), \quad \omega_0 = \sqrt{\frac{k}{m}}
 \end{equation}
-
-
 \begin{figure}
     \input{papers/kra/images/simple_mass_spring.tex}
     \caption{Einfaches Feder-Masse-System.}
     \label{kra:fig:simple_mass_spring}
 \end{figure}
-
 \begin{figure}
     \input{papers/kra/images/multi_mass_spring.tex}
     \caption{Feder-Masse-System mit zwei Massen und drei Federn.}
     \label{kra:fig:multi_mass_spring}
 \end{figure}
 
-
 \subsection{Hamilton-Funktion}
 Die Bewegung der Masse $m$ kann mit Hilfe der hamiltonschen Mechanik im Phasenraum untersucht werden.
-Die hamiltonschen Gleichungen verwenden dafür die veralgemeinerten Ortskoordinaten
+Die hamiltonschen Gleichungen verwenden dafür die verallgemeinerten Ortskoordinaten
 $q = (q_{1}, q_{2}, ..., q_{n})$ und die verallgemeinerten Impulskoordinaten $p = (p_{1}, p_{2}, ..., p_{n})$, wobei der Impuls definiert ist als $p_k = m_k \cdot v_k$.
 Liegen keine zeitabhängigen Zwangsbedingungen vor, so entspricht die Hamitlon-Funktion der Gesamtenergie des Systems \cite{kra:hamilton}.
 Im Falle des einfachen Feder-Masse-Systems, Abbildung \ref{kra:fig:simple_mass_spring}, setzt sich die Hamilton-Funktion aus kinetischer und potentieller Energie zusammen.
-
 \begin{equation}
     \label{kra:harmonischer_oszillator}
     \begin{split}
@@ -47,7 +42,6 @@ Im Falle des einfachen Feder-Masse-Systems, Abbildung \ref{kra:fig:simple_mass_s
         &= \underbrace{\frac{p^2}{2m}}_{E_{kin}} + \underbrace{\frac{k q^2}{2}}_{E_{pot}}
     \end{split}
 \end{equation}
-
 Die Hamiltonschen Bewegungsgleichungen liefern \cite{kra:kanonischegleichungen}
 \begin{equation}
     \label{kra:hamilton:bewegungsgleichung}
@@ -55,17 +49,13 @@ Die Hamiltonschen Bewegungsgleichungen liefern \cite{kra:kanonischegleichungen}
     \qquad
     \dot{p_{k}} = -\frac{\partial \mathcal{H}}{\partial q_k}
 \end{equation}
-
 daraus folgt
-
 \[
     \dot{q} = \frac{p}{m}
     \qquad
     \dot{p} = -kq
 \]
-
 in Matrixschreibweise erhalten wir also
-
 \[
     \begin{pmatrix}
         \dot{q} \\
@@ -81,11 +71,9 @@ in Matrixschreibweise erhalten wir also
         p
     \end{pmatrix}
 \]
-
 Für das erweiterte Federmassesystem, Abbildung \ref{kra:fig:multi_mass_spring}, können wir analog vorgehen.
 Die kinetische Energie setzt sich nun aus den kinetischen Energien der einzelnen Massen $m_1$ und $m_2$ zusammen.
 Die Potentielle Energie erhalten wir aus der Summe der kinetischen Energien der einzelnen Federn mit den Federkonstanten $k_1$, $k_c$ und $k_2$.
-
 \begin{align*}
     \begin{split}
         T   &= T_1 + T_2 \\
@@ -97,16 +85,13 @@ Die Potentielle Energie erhalten wir aus der Summe der kinetischen Energien der
         &= \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}
     \end{split}
 \end{align*}
-
 Die Hamilton-Funktion ist also
-
 \begin{align*}
     \begin{split}
         \mathcal{H}     &= T + V \\
         &= \frac{p_1^2}{2m_1} + \frac{p_2^2}{2m_2} + \frac{k_1 q_1^2}{2} + \frac{k_c (q_2 - q_1)^2}{2} + \frac{k_2 q_2^2}{2}
     \end{split}
 \end{align*}
-
 Die Bewegungsgleichungen \ref{kra:hamilton:bewegungsgleichung} liefern
 \begin{align*}
     \frac{\partial \mathcal{H}}{\partial p_k}  & = \dot{q_k}
@@ -127,9 +112,7 @@ Die Bewegungsgleichungen \ref{kra:hamilton:bewegungsgleichung} liefern
     \end{alignedat}
     \right.
 \end{align*}
-
 In Matrixschreibweise erhalten wir
-
 \begin{equation}
     \label{kra:hamilton:multispringmass}
     \begin{pmatrix}
@@ -171,7 +154,7 @@ In Matrixschreibweise erhalten wir
 \end{equation}
 
 \subsection{Phasenraum}
-Der Phasenraum erlaubt die eindeutige Beschreibung aller möglichen Bewegungszustände eines mechanischen System durch einen Punkt.
+Der Phasenraum erlaubt die eindeutige Beschreibung aller möglichen Bewegungszustände eines mechanischen Systems durch einen Punkt.
 Die Phasenraumdarstellung eignet sich somit sehr gut für die systematische Untersuchung der Feder-Masse-Systeme.
 
 \subsubsection{Harmonischer Oszillator}
@@ -181,7 +164,6 @@ Die Hamiltonfunktion des harmonischen Oszillators \ref{kra:harmonischer_oszillat
 \end{equation*}
 die Phasenraumtrajektorien bilden also Ellipsen mit Zentrum $q=0, p=0$ und Halbachsen $A$ und $m \omega A$.
 Abbildung \ref{kra:fig:phasenraum} zeigt Phasenraumtrajektorien mit den Energien $E_{x \in \{A, B, C, D\}}$ und verschiedenen Werten von $\omega$.
-
 \begin{figure}
     \input{papers/kra/images/phase_space.tex}
     \caption{Phasenraumdarstellung des einfachen Feder-Masse-Systems.}
@@ -191,7 +173,6 @@ Abbildung \ref{kra:fig:phasenraum} zeigt Phasenraumtrajektorien mit den Energien
 \subsubsection{Erweitertes Feder-Masse-System}
 Wir intressieren uns nun dafür wie der Phasenwinkel $U = PQ^{-1}$ von der Zeit abhängt,
 wir suchen also die Grösse $\Theta = \dt U$.
-
 Ersetzten wir in der Gleichung \ref{kra:hamilton:multispringmass} die Matrix $G$ mit $\tilde{G}$ so erhalten wir
 \begin{equation}
     \dt
@@ -211,9 +192,7 @@ Ersetzten wir in der Gleichung \ref{kra:hamilton:multispringmass} die Matrix $G$
         P
     \end{pmatrix}
 \end{equation}
-
 Mit einsetzten folgt
-
 \begin{align*}
     \dot{Q} = AQ + BP \\
     \dot{P} = CQ + DP
@@ -227,9 +206,7 @@ Mit einsetzten folgt
         &= C  + DU - UA - UBU
     \end{split}
 \end{equation}
+was uns auf die Matrix-Riccati Gleichung \ref{kra:equation:matrixriccati} führt.
 
-was uns auf die Matrix-Riccati Gleichung \ref{kra:matrixriccati} führt.
-
-
-\subsection{Fazit}
-% @TODO
+% @TODO Einfluss auf anfangsbedingungen, plots?
+% @TODO Fazit ?
diff --git a/buch/papers/kra/einleitung.tex b/buch/papers/kra/einleitung.tex
index 1a347a8..cde2e66 100644
--- a/buch/papers/kra/einleitung.tex
+++ b/buch/papers/kra/einleitung.tex
@@ -1,14 +1,14 @@
 \section{Einleitung} \label{kra:section:einleitung}
 \rhead{Einleitung}
-Die riccatische Differentialgleichung ist eine nichtlineare gewöhnliche Differentialgleichunge erster Ordnung der form
+Die riccatische Differentialgleichung ist eine nicht lineare gewöhnliche Differentialgleichung erster Ordnung der Form
 \begin{equation}
-    \label{kra:riccati}
-    y'(x) = f(x)y^2(x) + g(x)y(x) + h(x)
+    \label{kra:equation:riccati}
+    y' = f(x)y + g(x)y^2 + h(x)
 \end{equation}
-Sie ist bennant nach dem italienischen Grafen Jacopo Francesco Riccati (1676–1754) der sich mit der Klassifizierung von Differentialgleichungen befasste und Methoden zur Verringerung der Ordnung von Gleichungen entwickelte.
-Als Riccati Gleichung werden auch Matrixgleichugen der Form
+Sie ist benannt nach dem italienischen Grafen Jacopo Francesco Riccati (1676–1754) der sich mit der Klassifizierung von Differentialgleichungen befasste.
+Als Riccati Gleichung werden auch Matrixgleichungen der Form
 \begin{equation}
-    \label{kra:matrixriccati}
-    \dot{U}(t) = DU(t) - UA(t) - U(t)BU(t) % +Q ?
+    \label{kra:equation:matrixriccati}
+    \dot{X}(t) = C + DX(t) - X(t)A -X(t)BX(t)
 \end{equation}
-bezeichnet, welche aufgrund ihres quadratischen Terms eine gewisse ähnlichkeit aufweisen.
\ No newline at end of file
+bezeichnet, welche aufgrund ihres quadratischen Terms eine gewisse Ähnlichkeit aufweisen \cite{kra:ethz} \cite{kra:riccati}.
diff --git a/buch/papers/kra/loesung.tex b/buch/papers/kra/loesung.tex
index ece0f15..4e0da1c 100644
--- a/buch/papers/kra/loesung.tex
+++ b/buch/papers/kra/loesung.tex
@@ -1,11 +1,53 @@
 \section{Lösungsmethoden} \label{kra:section:loesung}
 \rhead{Lösungsmethoden}
-% @TODO Lösung normal riccati
-Lösung der Riccatischen Differentialgleichung \ref{kra:riccati}.
 
+\subsection{Riccatische Differentialgleichung} \label{kra:loesung:riccati}
+Eine allgemeine analytische Lösung der Riccati Differentialgleichung ist nicht möglich.
+Es gibt aber Spezialfälle, in denen sich die Gleichung vereinfachen lässt und so eine analytische Lösung gefunden werden kann.
+Diese wollen wir im folgenden Abschnitt genauer anschauen.
 
+\subsubsection{Fall 1: Konstante Koeffizienten}
+Sind die Koeffizienten $f(x), g(x), h(x)$ Konstanten, so lässt sich die DGL separieren und reduziert sich auf die Lösung des Integrals \ref{kra:equation:case1_int}.
+\begin{equation}
+    y' = fy^2 + gy + h 
+\end{equation}
+\begin{equation}
+    \frac{dy}{dx} = fy^2 + gy + h
+\end{equation}
+\begin{equation} \label{kra:equation:case1_int}
+    \int \frac{dy}{fy^2 + gy + h} = \int dx
+\end{equation}
+
+\subsubsection{Fall 2: Bekannte spezielle Lösung}
+Kennt man eine spezielle Lösung $y_p$ so kann die riccatische DGL mit Hilfe einer Substitution auf eine lineare Gleichung reduziert werden.
+Wir wählen als Substitution
+\begin{equation} \label{kra:equation:substitution}
+    z = \frac{1}{y - y_p} 
+\end{equation}
+durch Umstellen von \ref{kra:equation:substitution} folgt
+\begin{equation}
+    y = y_p + \frac{1}{z^2} \label{kra:equation:backsubstitution}
+\end{equation}
+\begin{equation}
+    y' = y_p' - \frac{1}{z^2}z'
+\end{equation}
+mit Einsetzten in die DGL \ref{kra:equation:riccati} folgt 
+\begin{equation}
+    y_p' - \frac{1}{z^2}z' = f(x)(y_p + \frac{1}{z}) + g(x)(y_p + \frac{1}{z})^2 + h(x)
+\end{equation}
+\begin{equation}
+    -z^{2}y_p' + z' = -z^2\underbrace{(y_{p}f(x) + g(x)y_p^2 + h(x))}_{y_p'} - z(f(x) + 2y_{p}g(x)) - g(x)
+\end{equation}
+was uns direkt auf eine lineare Differentialgleichung 1.Ordnung führt.
+\begin{equation}
+    z' = -z(f(x) + 2y_{p}g(x)) - g(x)
+\end{equation}
+Diese kann nun mit den Methoden zur Lösung von linearen Differentialgleichungen 1.Ordnung gelöst werden.
+Durch die Rücksubstitution \ref{kra:equation:backsubstitution} erhält man dann die Lösung von \ref{kra:equation:riccati}.
+
+\subsection{Matrix-Riccati Differentialgleichung} \label{kra:loesung:riccati}
 % Lösung matrix riccati
-Die Lösung der Matrix-Riccati Gleichung \ref{kra:matrixriccati} erhalten wir nach \cite{kra:kalmanisae} folgendermassen
+Die Lösung der Matrix-Riccati Gleichung \ref{kra:equation:matrixriccati} erhalten wir nach \cite{kra:kalmanisae} folgendermassen
 \begin{equation}
     \label{kra:matrixriccati-solution}
     \begin{pmatrix}
@@ -28,7 +70,6 @@ Die Lösung der Matrix-Riccati Gleichung \ref{kra:matrixriccati} erhalten wir na
         U_0(t)
     \end{pmatrix}
 \end{equation}
-
 \begin{equation}
     U(t) =
     \begin{pmatrix}
@@ -39,9 +80,7 @@ Die Lösung der Matrix-Riccati Gleichung \ref{kra:matrixriccati} erhalten wir na
     \end{pmatrix}
     ^{-1}
 \end{equation}
-
-wobei $\Phi(t, t_0)$ die sogennante Zustandsübergangsmatrix ist.
-
+wobei $\Phi(t, t_0)$ die sogenannte Zustandsübergangsmatrix ist.
 \begin{equation}
     \Phi(t_0, t) = e^{H(t - t_0)}
 \end{equation}
diff --git a/buch/papers/kra/references.bib b/buch/papers/kra/references.bib
index 7f972ec..a9a8ede 100644
--- a/buch/papers/kra/references.bib
+++ b/buch/papers/kra/references.bib
@@ -4,6 +4,19 @@
 % (c) 2020 Autor, Hochschule Rapperswil
 %
 
+@misc{kra:riccati,
+title = {Riccatische Differentialgleichung},
+url = {https://de.wikipedia.org/wiki/Riccatische_Differentialgleichung},
+date   = {2022-05-26}
+}
+
+@misc{kra:ethz,
+author = {Ch. Roduner},
+title = {Die-Riccati-Gleichung},
+url = {https://www.imrtweb.ethz.ch/users/geering/Riccati.pdf},
+date   = {2022-05-26}
+}
+
 @online{kra:hamilton,
   title = {Hamilton-Funktion},
   url   = {https://de.wikipedia.org/wiki/Hamilton-Funktion},
@@ -28,3 +41,5 @@
   url    = {https://pagespro.isae-supaero.fr/IMG/pdf/introKalman_e_151211.pdf},
   date   = {2022-05-26}
 }
+
+
-- 
cgit v1.2.1


From ac66147d7ac9b65ead1946ea4e72d681fc4abcf4 Mon Sep 17 00:00:00 2001
From: "samuel.niederer" <samuel.niederer@hotmail.com>
Date: Sat, 13 Aug 2022 18:55:22 +0200
Subject: remove dev file

---
 buch/papers/kra/test.tex | 12 ------------
 1 file changed, 12 deletions(-)
 delete mode 100644 buch/papers/kra/test.tex

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/test.tex b/buch/papers/kra/test.tex
deleted file mode 100644
index ebe0aa0..0000000
--- a/buch/papers/kra/test.tex
+++ /dev/null
@@ -1,12 +0,0 @@
-\begin{figure}
-    \input{papers/kra/images/phase_space.tex}
-    % \begin{minipage}{.45\textwidth}
-    %     \input{papers/kra/images/phase_space_small_omega.tex}
-    % \end{minipage}
-    % \begin{minipage}{.45\textwidth}
-    %     \input{papers/kra/images/phase_space_large_omega.tex}
-    % \end{minipage}
-    % \begin{minipage}[.5\textwidth]
-    %     \input{papers/kra/images/phase_space_large_omega.tex}
-    % \end{minipage}
-\end{figure}
\ No newline at end of file
-- 
cgit v1.2.1


From 96ca6105b6adad8a6b3c5a1af426df9f8c4024c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <andreas.mueller@othello.ch>
Date: Mon, 15 Aug 2022 06:54:23 +0200
Subject: fix physics dependency

---
 buch/papers/kra/anwendung.tex                 |   5 ++++-
 buch/papers/kra/images/Makefile               |   9 +++++++++
 buch/papers/kra/images/simple.pdf             | Bin 0 -> 23130 bytes
 buch/papers/kra/images/simple.tex             |  24 ++++++++++++++++++++++++
 buch/papers/kra/images/simple_mass_spring.tex |  12 ++++++------
 buch/papers/kra/packages.tex                  |   6 +-----
 6 files changed, 44 insertions(+), 12 deletions(-)
 create mode 100644 buch/papers/kra/images/Makefile
 create mode 100644 buch/papers/kra/images/simple.pdf
 create mode 100644 buch/papers/kra/images/simple.tex

(limited to 'buch/papers/kra')

diff --git a/buch/papers/kra/anwendung.tex b/buch/papers/kra/anwendung.tex
index 0deaf3c..6383984 100644
--- a/buch/papers/kra/anwendung.tex
+++ b/buch/papers/kra/anwendung.tex
@@ -19,7 +19,10 @@ Die Funktion die diese Differentialgleichung löst, ist die harmonische Schwingu
     x(t) = A \cos(\omega_0 t + \Phi), \quad \omega_0 = \sqrt{\frac{k}{m}}
 \end{equation}
 \begin{figure}
-    \input{papers/kra/images/simple_mass_spring.tex}
+    % move image to standalone because the physics package is
+    % incompatible with underbrace
+    \includegraphics{papers/kra/images/simple.pdf}
+    %\input{papers/kra/images/simple_mass_spring.tex}
     \caption{Einfaches Feder-Masse-System.}
     \label{kra:fig:simple_mass_spring}
 \end{figure}
diff --git a/buch/papers/kra/images/Makefile b/buch/papers/kra/images/Makefile
new file mode 100644
index 0000000..ef226a9
--- /dev/null
+++ b/buch/papers/kra/images/Makefile
@@ -0,0 +1,9 @@
+#
+# Makefile -- build standalone images
+#
+# (c) 2022 Prof Dr Andreas Müller
+#
+all:	simple.pdf
+
+simple.pdf:	simple.tex simple_mass_spring.tex
+	pdflatex simple.tex
diff --git a/buch/papers/kra/images/simple.pdf b/buch/papers/kra/images/simple.pdf
new file mode 100644
index 0000000..4351518
Binary files /dev/null and b/buch/papers/kra/images/simple.pdf differ
diff --git a/buch/papers/kra/images/simple.tex b/buch/papers/kra/images/simple.tex
new file mode 100644
index 0000000..3bdde27
--- /dev/null
+++ b/buch/papers/kra/images/simple.tex
@@ -0,0 +1,24 @@
+%
+% tikztemplate.tex -- template for standalon tikz images
+%
+% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+%
+\documentclass[tikz]{standalone}
+\usepackage{amsmath}
+\usepackage{times}
+\usepackage{txfonts}
+\usepackage{pgfplots}
+\pgfplotsset{compat=1.16}
+\usepackage[outline]{contour}
+\usepackage{csvsimple}
+\usepackage{physics}
+\usetikzlibrary{arrows,intersections,math}
+\usetikzlibrary{patterns}
+\usetikzlibrary{snakes}
+\usetikzlibrary{arrows.meta}
+\usetikzlibrary{decorations}
+\usetikzlibrary{decorations.markings}
+\begin{document}
+\input{simple_mass_spring.tex}
+\end{document}
+
diff --git a/buch/papers/kra/images/simple_mass_spring.tex b/buch/papers/kra/images/simple_mass_spring.tex
index e0e869a..868362d 100644
--- a/buch/papers/kra/images/simple_mass_spring.tex
+++ b/buch/papers/kra/images/simple_mass_spring.tex
@@ -6,7 +6,7 @@
 \tikzstyle{mass}=[line width=0.6,red!30!black,fill=red!40!black!10,rounded corners=1,top color=red!40!black!20,bottom color=red!40!black!10,shading angle=20]
 \tikzstyle{spring}=[line width=0.8,blue!7!black!80,snake=coil,segment amplitude=5,line cap=round]
 
-\begin{tikzpicture}[scale=2]
+\begin{tikzpicture}[scale=2,>=latex]
     \newcommand{\ticks}[2]
     {
         % arguments: x, y coordinates
@@ -47,9 +47,9 @@
 
     % create springs
     \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++
-    (\wWall, \wWall + \hMass / 2) --++ (\xMass1 - \wWall, 0) node[midway,above=0.2] {$k$};
+    (\wWall, \wWall + \hMass / 2) --++ (\xMass1 - \wWall, 0) node[midway,above=3.5] {$k$};
     \draw[spring, segment length=(\xMass2 - \wWall) * \springscale] (\originX2, \originY2) ++
-    (\wWall, \wWall + \hMass / 2) --++ (\xMass2 - \wWall, 0) node[midway,above=0.2] {$k$};
+    (\wWall, \wWall + \hMass / 2) --++ (\xMass2 - \wWall, 0) node[midway,above=3.5] {$k$};
 
     % create vertical measurement line 
     \draw[vmline] (\xMass1, \xAxisYpos) --+(0, \originY1 + \wWall);
@@ -57,10 +57,10 @@
     \draw[vmline] (\wWall, \originY1+\wWall) --(\wWall, \originY2 + \hWall);
 
     % create horizontal measurement line
-    \draw[hmline] (\wWall, \xAxisYpos + 0.2) -- (\xMass1, \xAxisYpos + 0.2) node[midway,fill=white,inner sep=0] {$\ell_0$};
+    \draw[hmline] (\wWall, \xAxisYpos + 0.2) -- (\xMass1, \xAxisYpos + 0.2) node[midway,fill=white,inner sep=0] {$l_0$};
     \draw[hmline] (\xMass1, \xAxisYpos + 0.2) -- (\xMass2, \xAxisYpos + 0.2) node[midway,fill=white,inner sep=0] {$\Delta_{x}$};
-    \draw[hmline] (\wWall, \xAxisYpos - 0.3) -- (\xMass2, \xAxisYpos - 0.3) node[midway,fill=white,inner sep=0] {$\ell_{1}$};
+    \draw[hmline] (\wWall, \xAxisYpos - 0.3) -- (\xMass2, \xAxisYpos - 0.3) node[midway,fill=white,inner sep=0] {$l_{1}$};
 
     %  create force arrow
     \draw[->,blue, very thick,line cap=round] (\xMass2 + \wMass / 2, \originY2 + \wWall + \hMass + 0.15) node[above] {$\vb{F_{R}}$} --+ (-0.5, 0);
-\end{tikzpicture}
\ No newline at end of file
+\end{tikzpicture}
diff --git a/buch/papers/kra/packages.tex b/buch/papers/kra/packages.tex
index b16f074..56c48d9 100644
--- a/buch/papers/kra/packages.tex
+++ b/buch/papers/kra/packages.tex
@@ -8,15 +8,11 @@
 % following example
 %\usepackage{packagename}
 
-\usepackage{physics}
-\usepackage{pgfplots}
-\usepackage{tikz}
+%\usepackage{physics}
 \usepackage[outline]{contour}
 \pgfplotsset{compat=1.16}
 \usetikzlibrary{patterns}
 \usetikzlibrary{snakes}
-\usetikzlibrary{math}
 \usetikzlibrary{arrows.meta}
 \usetikzlibrary{decorations}
 \usetikzlibrary{decorations.markings}
-\usetikzlibrary{calc}
\ No newline at end of file
-- 
cgit v1.2.1