\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{color}
\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{pgfplots}

\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{1cm}
\begin{center}
{\Large\bf Blatt #1}

{(Abgabe #3)}
\end{center}
}



%counts the exercisenumber
\newcounter{n}

%Kommando für Aufgaben
%\Aufgabe{AufgTitel}{Punktezahl}
\newcommand{\Aufgabe}[2]{\stepcounter{n}
\textbf{Aufgabe \arabic{n}: #1} (#2 Punkte)}

\newcommand{\textcorr}[1]{\textcolor{red}{#1}}
\newenvironment{corr}{\color{red}}{\color{black}\newline}
\newcommand{\ok}{\begin{corr}
      $\checkmark$
  \end{corr}}

\newcommand{\enot}[2]{#1 \cdot 10^{#2}}

\begin{document}
%\header{BlattNr}{Tutor}{Abgabedatum}{Vorlesungsname}{Namen}{Semester}{Anzahl Aufgaben}
\header{5}{}{2015-11-18}{Kommunikationsnetze}{\textit{Jonas Jaszkowic, 3592719}\\\textit{Jan-Peter Hohloch, 3908712}}{WS 15/16}{3}
\vspace{1cm}
\Aufgabe{Frequencies and Wavelenghts}{48}\\\\
The formula for converting frequency $f$ to wavelength $\lambda$ given speed $c$ is:
\begin{align}
  \lambda = \frac{c}{f}
\end{align}
Therefore, the resulting wavelengths and position in the electromagnetic spectrum are:\\
\begin{center}
  $
  \begin{array}{c|c|c|c}
    \text{Frequency $f$} & \text{Frequency $f$ in Hz} & \text{Wavelength $\lambda$} & \text{Electromagnetic Spectrum} \\ \hline
    33 ~EHz & \enot{3.3}{19} ~Hz &  9.09 ~pm & \text{Gamma-rays} \\
    4 ~EHz & \enot{4}{18} Hz &  75 ~pm & \text{X-rays, Gamma-rays} \\
    348 ~THz & \enot{3.48}{14} ~Hz &  862 ~nm & \text{Infrared} \\
    428 ~THz & \enot{4.28}{14} ~Hz &  701 ~nm & \text{Visible red} \\
    517 ~THz & \enot{5.17}{14} ~Hz &  580 ~nm & \text{Visible yellow} \\
    652 ~THz & \enot{6.52}{14} ~Hz &  460 ~nm & \text{Visible blue} \\
    750 ~THz & \enot{7.5}{14} ~Hz &  400 ~nm & \text{Visible violet} \\
    6 ~GHz & 600000000 ~Hz &  50 ~cm & \text{Ultra High Frequency UHF} \\
    600 ~MHz & \enot{6.0}{9} ~Hz &  5 ~cm & \text{Super High Frequency SHF} \\
    96 ~MHz & 96000000 ~Hz &  3.12 ~m & \text{Very High Frequency VHF} \\
    420 ~MHz & \enot{6.42}{9} ~Hz &  4.67 ~cm & \text{Super High Frequency SHF} \\
    900 ~MHz & 900000000 ~Hz &  33.33 ~cm & \text{Ultra High Frequency UHF} \\
    1820 ~MHz & \enot{1.82}{9} ~Hz &  16.48 ~cm & \text{Super High Frequency SHF} \\
    2140 ~MHz & \enot{2.14}{9} ~Hz &  14.02 ~m & \text{High Frequency HF} \\
    6190 ~kHz & 6190000 ~Hz &  48.46 ~m & \text{Medium Frequency MF} \\
    549 ~kHz & 549000 ~Hz &  546.45 ~m & \text{Low Frequency LF}
  \end{array}
  $
\end{center} \vspace{1cm}
\Aufgabe{Frequency-Division Multiplexing (FDM)}{6+6+6+6}\\
The available analogue satellite channel with bandwidth $B_{STA} = 4MHz$ is divided into the required $5$
channels, of which each has now $4MHz / 5 = 0.8MHz$ for transferring $N = 6Mbit/s$. Each digital channel is
modulated by QAM and sent over the analogue satellite link using the reserved bandwidth. At the receiver, the signal
is demultiplexed and again demodulated with QAM. This leads to 5 output channel with the original 6Mbit/s.
\begin{enumerate}
  \item The required bandwidth for each channel is $B_{QAM} = (1 + d) \cdot S$, with $d = 0$ and $S = 0.8MHz$ this leads to
  $B_{QAM} = 0.8MHz$.
  \item The Nyquist theorem states, that the maximum bit rate $R_{max}$ is given as $R_{max} = 2 \cdot \log{2}{L}$.
  Since $\log{2}{L}$ is the number of bits per Baud, the maximum Baud per second $Bd_{max}$ is:
  \begin{align*}
    Bd_{max} = 2 \cdot B_{channel} = 2 \cdot 0.8 MHz = 1.6 MHz
    \end{align*}
  \item The required number of bits per symbol is $r = \frac{N}{S} = \frac{\enot{6}{6}bit/s}{\enot{0.8}{6}1/s} = 7.5 Bits$
  \item The required number of symbols for QAM is $L = 2^{\lceil r\rceil} = 2^{\lceil 7.5\rceil}=2^8 = 256$.
\end{enumerate} \vspace{1cm}
\Aufgabe{Analog and Digital Hierarchy}{14+14}
\begin{enumerate}
  \item Both, analog and digital hierarchy are used to carry many individual data streams over a single link. This link usually has a
  large bandwidth. The individual channels are subsequently multiplexed into larger groups, until the final bandwidth is reached. The
  receiver has to know how to demultiplex this giant data stream into the original channels. In analog hierarchy, a bunch of
  \textbf{analog} signals are multiplexed into a single link using \textbf{Frequency Division Multiplexing}. In digital hierarchy, a bunch
  of \textbf{digital} signals are multiplexed into a single link using \textbf{Time Division Multiplexing}. It is also to be noted, that
  the digital signals can carry analog information (e.g. speech signals).
  \item All three stand for the lowest level of their hierarchy.
  \begin{enumerate}
    \item STS-1, OC-1\\
        STS-1 is the frame format for OC-1 (optical carrier) in SONET\\
        SONET is used for optical signals.
    \item DS-0\\
        has 64kBit/s (PCM-modulated human voice) and was used by phone companies. It is a single voice channel and was used to transport one phone call.\\
        DS is used for digital signals.
  \end{enumerate}
\end{enumerate}
\end{document}
