% !TeX program = xelatex
% !TeX encoding = utf8
% !TeX root = slides.tex
\documentclass[xetex, onlymath, handout]{beamer}
\usefonttheme{serif}
\usetheme{hsr}

% use lmodern for math
\usepackage{lmodern}

\usepackage{tex/docmacros}

%% Pretty figures
\usepackage{circuitikz}  % Electric diagrams
\usepackage{pgfplots}    % Pretty plots
\usepackage{tikz}        % Pretty drawings
\usepackage{tikz-3dplot} % More dimensions!

\usetikzlibrary{
	external,
	calc,
	positioning,
	backgrounds,
	decorations.pathreplacing,
	calligraphy,
	decorations.markings,
	matrix,
	arrows,
	patterns,
}
\pgfplotsset{compat=newest}

% math packages
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage[T1]{fontenc}
\usepackage{beramono} % monospaced
\usepackage{roboto} % other
\renewcommand*\familydefault{\sfdefault}

% metadata
\title{Multipath Fading Demonstration Platform using Software Defined Radio}
\author{Naoki Sean Pross \and Sara Cinzia Halter}
\date{23. December 2021}

\institute[OST]{OST FHO Campus Rapperswil}

\AtBeginSection[]
{
  \begin{frame}{Table of Contents}
    \tableofcontents[currentsection]
  \end{frame}
}


\begin{document}

\frame{
  \maketitle
}

\section{Multipath Fading}

\begin{frame}{Multipath fading}
	\begin{figure}
		\centering
		\input{figures/tikz/multipath-sketch}
	\end{figure}
  \vspace{\baselineskip}
  \[
    r(t) = \sum_k c_k s(t - \tau_k).
  \]
\end{frame}

\begin{frame}[fragile]{Impulse reponse of a multipath fading channel}
  \begin{figure}
    \centering
    \input{figures/tikz/multipath-impulse-response}
  \end{figure}
  \[
		h(\tau, t) = \sum_k c_k(t) \delta(\tau - \tau_k(t))
  \]
\end{frame}

\begin{frame}[fragile]{Spectrum of a multipath fading channel}
	\begin{figure}
		\centering
		\resizebox{\linewidth}{!}{
			\input{figures/tikz/multipath-frequency-response-plots}
		}
	\end{figure}
\end{frame}

\subsection{Discrete-time model}

\begin{frame}[fragile]{Discrete-time and FIR}
	\begin{figure}
		\centering
    \resizebox{\linewidth}{!}{
      \input{figures/tikz/tapped-delay-line}
    }
	\end{figure}
  \vspace{\baselineskip}
  \[
    h_l(m) = \sum_k c_k(mT) \sinc\left(l - \frac{\tau_k(mT)}{T}\right)
  \]
\end{frame}

\subsection{Statistical model}

\begin{frame}[fragile]{Statistical model}
  \begin{columns}
    \begin{column}{.4\linewidth}
      Assuming WSSUS
      \[
        \theta_k \sim \mathcal{U}(0, 2\pi)
      \]
      The NLOS Fading
      \[
        f = \lim_{N \to \infty} \frac{1}{\sqrt{N}} \sum_{k=1}^N e^{j\theta_k}
      \]
      \[
        f \sim \mathrm{ Rayleigh}
      \]
      if there is a LOS
      \[
        f \sim \mathrm{ Rice}(K)
      \]
    \end{column}
    \begin{column}{.6\linewidth}
      \begin{figure}
        \centering
        \resizebox{\linewidth}{!}{%
          \input{figures/tikz/ring-of-scattering-objects}
          }
      \end{figure}
    \end{column}
  \end{columns}
\end{frame}

\section{Implementation}

%TODO: Mabe picture Hardware, Bicture GR.

\begin{frame}{Block Diagram}
	\begin{figure}
		\centering
		\resizebox{.9\linewidth}{!}{
			\input{figures/tikz/overview}
		}
		
	\end{figure}
\end{frame}

\subsection{Transmitter and Receiver Chains}

\begin{frame}{Transmitter}
  \begin{figure}
    \centering
    \includegraphics[width=\linewidth]{figures/picture/PC210002}
  \end{figure}
\end{frame}

\begin{frame}{Framed data packets}
  \begin{figure}
    \centering
    \resizebox{\linewidth}{!}{
      \input{figures/tikz/packet-frame}
    }
  \end{figure}
  \begin{itemize}
    \item Very short payload
    \item \(k\)-Byte preamble is a Barker code \texttt{0x1f35} for Sync
    \item Should be replaced with CAZAC
  \end{itemize}
\end{frame}

\begin{frame}{Receiver}
  \begin{figure}
    \centering
    \includegraphics[width=\linewidth]{figures/picture/PC210011}
  \end{figure}
\end{frame}


% \begin{frame}{Tools}
%   \begin{columns}
% 	\begin{column}{.5\linewidth}
% 		\begin{itemize}
% 			\item Software Stack
% 				\begin{itemize}
% 					\item GNU Radio
% 					\item Dear PyGUI
% 				\end{itemize}
% 			\item Hardware
% 			\begin{itemize}
% 				\item USRP B210
% 			\end{itemize}
% 		\end{itemize}
% 	\end{column}
% 	\begin{column}{.5\linewidth}
% 		\begin{figure}
% 		\centering
% 		\includegraphics[width = \linewidth]{figures/screenshots/gui_screenshot}
% 		\end{figure}
% 	\end{column}
% \end{columns}
% \end{frame}

\subsection{Channel model}

\begin{frame}{Discrete-time model}

\end{frame}

\begin{frame}{Statistical model}
	
\end{frame}

\section{Conclusion}

\begin{frame}{Further steps}
	
\end{frame}

\section{Measurement/Demonstration}

%%Tools

\end{document}

% vim:et:ts=2:sw=2:wrap:nolinebreak:
