\documentclass[a4paper,12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{graphicx} %BIlder einbinden
\usepackage{amsmath} %erweiterte Mathe-Zeichen
\usepackage{amsfonts} %weitere fonts
\usepackage[utf8]{inputenc} %Umlaute & Co
\usepackage{hyperref} %Links
\usepackage{ifthen} %ifthenelse
\usepackage{enumerate}
\usepackage{pdfpages}
\usepackage{algpseudocode} %Pseudocode
\usepackage{dsfont} % schöne Zahlenräumezeichen
\usepackage{amssymb, amsthm} %noch stärker erweiterte Mathe-Zeichen
\usepackage{tikz} %TikZ ist kein Zeichenprogramm
\usetikzlibrary{trees,automata,arrows,shapes}
\usepackage{qtree}
\usepackage{listings}
\lstset{language=Matlab}
\pagestyle{empty}
\topmargin-50pt
\newcounter{aufgabe}
\def\tand{&}
\newcommand{\makeTableLine}[2][0]{%
\setcounter{aufgabe}{1}%
\whiledo{\value{aufgabe} < #1}%
{%
#2\tand\stepcounter{aufgabe}%
}
}
\newcommand{\aufgTable}[1]{
\def\spalten{\numexpr #1 + 1 \relax}
\begin{tabular}{|*{\spalten}{p{1cm}|}}
\makeTableLine[\spalten]{A\theaufgabe}$\Sigma$~~\\ \hline
\rule{0pt}{15pt}\makeTableLine[\spalten]{}\\
\end{tabular}
}
\def\header#1#2#3#4#5#6#7{\pagestyle{empty}
\begin{minipage}[t]{0.47\textwidth}
\begin{flushleft}
{\bf #4}\\
#5
\end{flushleft}
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
\begin{flushright}
#6 \vspace{0.5cm}\\
% Number of Columns Definition of Columns second empty line
% \begin{tabular}{|*{5}{C{1cm}|}}\hline A1&A2&A3&A4&$\Sigma$\\\hline&&&&\\\hline\end{tabular}\\\vspace*{0.1cm}
\aufgTable{#7}
\end{flushright}
\end{minipage}
\vspace{0.5cm}
\begin{center}
{\Large\bf Assignment #1}
{(Hand-in date #3)}
\end{center}
}
%counts the exercisenumber
\newcounter{n}
%Kommando für Aufgaben
%\Aufgabe{AufgTitel}{Punktezahl}
\newcommand{\Aufgabe}[2]{\stepcounter{n}
\textbf{Exercise \arabic{n}: #1} (#2 Punkte)}
\newcommand{\Normal}[3]{\mathcal{N}\left(#1,#2,#3\right)}
\newcommand{\Normalf}[3]{\frac{\left|#3\right|^{-\frac{1}{2}}}{\sqrt{2\pi}}e^{-\frac{\left(#1 - #2 \right)^2\cdot \left(#3\right)^{-1}}{2}}}
\begin{document}
%\header{BlattNr}{Tutor}{Abgabedatum}{Vorlesungsname}{Namen}{Semester}{Anzahl Aufgaben}
\header{12}{}{2015-07-21}{Mobile Robots}{
\textit{Jan-Peter Hohloch}\\ \textit{Maximus Mutschler}
}{SS 15}{3}
\vspace{0.2cm}
\Aufgabe{Moment of Inertia}{6}
\begin{enumerate}[(a)]
\item $I=m_c\begin{pmatrix}
0&0&0\\0&0&0\\0&0&0
\end{pmatrix}+m_m\left(\begin{pmatrix}
0&0&0\\0&0.04&0\\0&0&0.04
\end{pmatrix}+\begin{pmatrix}
0.04&0&0\\0&0&0\\0&0&0.04
\end{pmatrix}\right.\\\left.+\begin{pmatrix}
0&0&0\\0&0.04&0\\0&0&0.04
\end{pmatrix}+\begin{pmatrix}
0.04&0&0\\0&0&0\\0&0&0.04
\end{pmatrix}\right)\\=0.2kg\cdot m^2\begin{pmatrix}
0.08&0&0\\0&0.08&0\\0&0&0.16
\end{pmatrix}$
\item $I=m_c\begin{pmatrix}
0&0&0\\0&0&0\\0&0&0
\end{pmatrix}+m_m\left(\begin{pmatrix}
0.02&0.02&0\\0.02&0.02&0\\0&0&0.04
\end{pmatrix}+\begin{pmatrix}
0.02&-0.02&0\\-0.02&0.02&0\\0&0&0.04
\end{pmatrix}\right.\\\left.+\begin{pmatrix}
0.02&0.02&0\\0.02&0.02&0\\0&0&0.04
\end{pmatrix}+\begin{pmatrix}
0.02&-0.02&0\\-0.02&0.02&0\\0&0&0.04
\end{pmatrix}\right)\\=0.2kg\cdot m^2\begin{pmatrix}
0.08&0&0\\0&0.08&0\\0&0&0.16
\end{pmatrix}$\\
The result is the same, that however isn't very suprising since the Moment of Inertia should be independent of the rotation around the z-axis. %TODO: really?
\end{enumerate}
\Aufgabe{Hexacopter}{8}
\begin{enumerate}[(a)]
\item $^Bp_1=\begin{pmatrix}
1\\0\\0
\end{pmatrix}l,\ ^Bp_2=\begin{pmatrix}
\frac{1}{2}\\\frac{\sqrt{3}}{2}\\0
\end{pmatrix}l,\ ^Bp_3=\begin{pmatrix}
-\frac{1}{2}\\\frac{\sqrt{3}}{2}\\0
\end{pmatrix}l\\
^Bp_4=\begin{pmatrix}
-1\\0\\0
\end{pmatrix}l,\ ^Bp_5=\begin{pmatrix}
-\frac{1}{2}\\-\frac{\sqrt{3}}{2}\\0
\end{pmatrix}l,\ ^Bp_6=\begin{pmatrix}
\frac{1}{2}\\-\frac{\sqrt{3}}{2}\\0
\end{pmatrix}l$
\item $T_\Sigma=k_T\sum_{i=1}^6 \omega_i^2$
\item $\tau_Q=k_Q \begin{pmatrix}
0\\0\\-\omega_1^2+\omega_2^2-\omega_3^2+\omega_4^2-\omega_5^2+\omega_6^2
\end{pmatrix}$
\item $l\begin{pmatrix}
0 \\ -k_T\omega_1^2\\ 0
\end{pmatrix},\ \tau_{T2} = l\begin{pmatrix}
\frac{\sqrt{3}}{2}k_T\omega_2^2 \\ -\frac{1}{2}k_T\omega_2^2\\ 0
\end{pmatrix},\ \tau_{T3} = l\begin{pmatrix}
\frac{\sqrt{3}}{2}k_T\omega_3^2 \\ \frac{1}{2}k_T\omega_3^2\\ 0
\end{pmatrix}, \\
\tau_{T4} = l\begin{pmatrix}
0\\ k_T\omega_4^2\\ 0
\end{pmatrix}, \
\tau_{T5} = l\begin{pmatrix}
-\frac{\sqrt{3}}{2}k_T\omega_5^2 \\ \frac{1}{2}k_T\omega_5^2\\ 0
\end{pmatrix}, \
\tau_{T6} = l\begin{pmatrix}
-\frac{\sqrt{3}}{2}k_T\omega_6^2 \\ -\frac{1}{2}k_T\omega_6^2\\ 0
\end{pmatrix} \\
\tau= \begin{pmatrix}
l \frac{\sqrt{3}}{2}k_T(\omega_2^2+ \omega_3^2-\omega_5^2 -\omega_6^2)\\
l\frac{1}{2}k_T(-2\omega_1^2-\omega_2^2+\omega_3^2+2\omega_4^2 +\omega_5^2 -\omega_6^2)\\
k_Q (-\omega_1^2+\omega_2^2-\omega_3^2+\omega_4^2-\omega_5^2+\omega_6^2)
\end{pmatrix}
$
\item $
\Gamma = \begin{pmatrix}
k_T&k_T&k_T&k_T&k_T&k_T \\
0 & \frac{\sqrt{3}}{2}lk_T & \frac{\sqrt{3}}{2}lk_T & 0& -\frac{\sqrt{3}}{2}lk_T& -\frac{\sqrt{3}}{2}lk_T \\
-lk_T &\frac{1}{2}lk_T &-\frac{1}{2}lk_T & lk_T&\frac{1}{2}lk_T &-\frac{1}{2}lk_T \\
-k_Q &k_Q & -k_Q &k_Q &-k_Q&k_Q \\
\end{pmatrix}
$
\end{enumerate}
\Aufgabe{Newton-Euler Equations}{6}
\begin{enumerate}
\item $T_{max} = k_T*w_{i,max}^2 =3.9115 N$
\item $a_{max} = \begin{pmatrix}
0 \\ 0\\ \frac{T_{\Sigma,max}}{m}
\end{pmatrix}- ^BR_w ^wg =\begin{pmatrix}
0\\0\\ \frac{15.646N}{1kg}
\end{pmatrix}-\begin{pmatrix}
0\\0\\ 9.87 \frac{m}{s^2}
\end{pmatrix} =\begin{pmatrix}
0\\0\\ 5.836 \frac{m}{s^2}
\end{pmatrix} $
\item $\tau=\begin{pmatrix}
lk_T\omega_2^2-lk_T\omega_4^2\\
-lk_T\omega_1^2+lk_T\omega_3^2\\
k_Q(-\omega_1^2+\omega_2^2-\omega_3^2+\omega_4^2)
\end{pmatrix}$, $\alpha=I^{-1}\tau\approx \begin{pmatrix}
142.857&0&0\\
0&142.857&0\\
0&0&83.333
\end{pmatrix}\tau$\\
maximal acceleration around x and y in both directions is the same:\\
$\alpha_{max}=\begin{pmatrix}
142.857(lk_T\omega_2^2-lk_T\omega_4^2)\\
142.857(-lk_T\omega_1^2+lk_T\omega_3^2)\\
83.333\cdot k_Q(-\omega_1^2+\omega_2^2-\omega_3^2+\omega_4^2)
\end{pmatrix}$\\
$\alpha_{x,max}\approx 142.857\frac{1}{kgm^2}(lk_T\omega_2^2)\approx 558.785l\frac{1}{s^2}$\\
$\alpha_{z,max}\approx 83.333\frac{1}{kgm^2}\cdot k_Q(\omega_2^2+\omega_4^2)\approx 15.917\frac{m}{s^2}$
\item \begin{itemize}
\item $\alpha_{x,max}\approx 558.785l\frac{1}{s^2}$\\
where:
$\omega_2=838\frac{rad}{s},\omega_4=0\frac{rad}{s}, \omega_1=\omega_3=\sqrt{\frac{\frac{9.81N}{k_T}-\omega_2^2}{2}}\approx 727.660\frac{rad}{s} < 838\frac{rad}{s}$\checkmark\\
accordingly for $-x,y,-y$
\item $\text{max: } \alpha_z \text{ s.t. max: }\tau_{z}=k_Q(-\omega_1^2+\omega_2^2-\omega_3^2+\omega_4^2)$ s.t.\\
$\omega_2=\omega_4,\ \omega_1=\omega_3,\ \omega_1^2+\omega_2^2+\omega_3^2+\omega_4^2=\frac{9.81N}{k_T}$\\
$\Rightarrow \omega_2=\omega_4=838\frac{rad}{s}\\
\Rightarrow \omega_1^2+\omega_3^2=\frac{9.81N}{k_T}-2\cdot \left(838\frac{rad}{s}\right)^2\\
\Rightarrow \omega_1=\omega_3=\sqrt{\frac{9.81N}{2k_T}-838^2\frac{rad^2}{s^2}}\approx 422.334\frac{rad}{s}$\vspace{5mm}\\
$\Rightarrow\alpha_{z,max}=83.333\frac{1}{kgm^2}\cdot k_Q(-422.334^2+838^2-422.334^2+838^2)\frac{rad^2}{s^2}\approx 11.875\frac{1}{s^2}$
\end{itemize}
\end{enumerate}
\end{document}