% !TeX program = xelatex
% !TeX encoding = utf8
% !TeX root = Fading.tex
% vim: set ts=2 sw=2 noet:

\documentclass[
	% show when a line is too long (drafting)
	overfullrule,
	% page size and margins
	paper = a4, twoside, openright, BCOR = 5mm,
	headinclude, footexclude,
	% font size
	fontsize = 11pt,
	% style of empty pages (after chapters)
	cleardoublepage = empty,
	% extra sections
	titlepage, abstract = on,
	% header and footers
	automark,
	% remove numbers
	numbers = noenddot
]{scrreprt}

%% Language configuration
\usepackage{polyglossia}
\setmainlanguage{english}

% Use a different font for german
\usepackage{xcolor}
\setotherlanguage{german}
\newfontfamily{\germanfont}{Roboto Condensed Light}

%% Custom packages
\usepackage{tex/docmacros}
\usepackage[draft]{tex/docstyle}

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

\pgfplotsset{compat=newest}
\usetikzlibrary{
	external,
	calc,
	positioning,
	backgrounds,
	decorations.pathreplacing,
	calligraphy,
	decorations.markings,
	matrix,
	arrows,
	patterns,
}
\tikzexternalize[prefix=figures/externalized/]{Fading}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}

% Include pictures
\usepackage{graphicx}
% Subfigures
\usepackage{subcaption}
% Frames around includegraphics
\usepackage[export]{adjustbox}

%% Placeholders
\usepackage{skeldoc}

%% Nicer tables
\usepackage{tabularx}
\usepackage{booktabs}


%% Writing units
\usepackage{siunitx}
% this one is for siunitx v3, debian and older systems
% still have only siunitx v2 installed
% \sisetup{uncertainty-mode = separate}
\sisetup{separate-uncertainty}

%% List of acronyms
% \usepackage{acronym}

%% Load bibliography 
\addbibresource{Fading.bib}

%% Recompute page margins
\KOMAoptions{DIV=default}

%% Metadata
\title{Multipath Fading Demonstration Platform using Software Defined Radio}
\author{Naoki Sean Pross \and Sara Cinzia Halter}
\date{Fall semester 2021}

\begin{document}

	\hypersetup{pageanchor = false}

	%% TODO: create a proper titlepage
	\maketitle
	% \include{tex/titlepage}

	\begin{abstract}
				
		In today's wireless communication, it is important to know how signals change on their way to the receiver. There are many different ways how this can happen. This paper will be focused on the study of the \emph{multipath fading effect}. The aim is to easily illustrate the change of the signal evoked through this effect. 
		First some basic fundamentals are discussed, followed by the implementation in as simulation of those different models, including the transmitter and receiver chain. Later implemented  with the help of two SDRs.
		The effect is finally shown with the help of a GUI. 
	 
	
		%% TODO: write abstract
		\skelpar
	\end{abstract}

	\cleardoublepage
	\pagenumbering{roman}
	\setcounter{page}{1}

	\tableofcontents
	\cleardoublepage

	%% TODO: move in a separate file
	\chapter*{List of symbols}
	\noindent %
	\begin{tabularx}{\linewidth}{>{\(}c<{\)} X}
		\toprule
		% \textbf{Notation} & \bfseries Description \\
		% \midrule
		\multicolumn{2}{l}{\itshape Mathematics} \\
		j                  & Imaginary unit \\
		\phi^*             & Complex conjugate of \(\phi\) \\
		\vec{v},\, \vec{m} & Vector quantity \\
		\E{X}              & Expectation of a random variable \(X\) \\
		\midrule
		\multicolumn{2}{l}{\itshape Physical quantities} \\
		t       & Time \\
		T       & Period \\
		\tau    & Convolution time \\
		f       & Frequency in Hz \\
		\omega  & Frequency in radians per second \\
		\Omega  & Digital frequency in radians per sample \\
		\varphi & Phase angle \\
		c_0     & Speed of light \\
		v       & Velocity \\
		\midrule
		\multicolumn{2}{l}{\itshape Modulation schemes} \\
		n(t)    & Additive white Gaussian noise (AWGN) \\
		f(t)    & Multiplicative fading noise \\
		p(t)    & Pulse function \\
		m(n)    & Message samples \\
		m(t)    & Message waveform \\
		\phi(t) & Carrier signal \\
		s(t)    & Signal waveform \\
		s(n)    & Signal samples \\
		r(t)    & Received signal \\
		r(m)    & Received samples \\
		\midrule
		\multicolumn{2}{l}{\itshape Channel modelling} \\
		h(t)       & LTI impluse response, \(h(\tau, t)\) for the LTV IR \\
		h(m)       & LTI discrete time impulse response, \(h_l(m)\) for the LTV discrete time IR \\
		H(f)       & LTI Frequency response, \(H(f, t)\) for the LTV frequency response \\
		c_k        & Tap attenuation \\
		\tau_k     & Tap delay \\
		T_d        & Delay spread \\
		B_c        & Coherence bandwidth \\
		R_{xy}     & Correlation between \(x\) and \(y\), also written as \(x \star y\) \\
		\bottomrule
	\end{tabularx}

	\chapter*{List of Acronyms}
	\noindent
	\begin{tabularx}{\linewidth}{l X}
		\toprule
		\bfseries Acronym & \bfseries Description \\
		\midrule
		API    & Application Programming Interface                \\
		AWGN   & Additive White Gaussian Noise                    \\
		BER    & Bit Error Rate                                   \\
		CAZAC  & Constant Amplitude Zero Autocorrelation Waveform \\
		CIR    & Channel Impulse Response                         \\
		CMA    & Constant Modulus Adaptive filter                 \\
		DPG    & Dear PyGUI                                       \\
		ETSI   & European Telecommunication Standards Insitite    \\
		FIR    & Finite Impulse Response                          \\
		GR     & GNU Radio                                        \\
		GRC    & GNU Radio Companion                              \\
		GSM    & Global System for Mobile communication           \\
		IMGUI  & Immediate Mode Graphical User Interface          \\
		IP     & Internet Protocol                                \\
		IR     & Impulse Response                                 \\
		IoT    & Internet of Things                               \\
		LMS-DD & Least Mean Square Decision-Directed equalizer    \\
		LOS    & Line Of Sight                                    \\
		LTI    & Linear Time Invariant                            \\
		LTV    & Linear Time-Varying                              \\
		MSB    & Most Significant Bit                             \\
		NLOS   & No Line Of Sight                                 \\
		PDP    & Power Delay Profile                              \\
		PSK    & Phase Shift Keying                               \\
		QAM    & Quadrature Amplitude Modulation                  \\
		QPSK   & Quadrature Phase Shift Keying                    \\
		SDR    & Software Defined radio                           \\
		UDP    & User Datagram Protocol                           \\
		US     & Uncorrelated Scattering                          \\
		WSS    & Wide Sense Stationary                            \\
		WSSUS  & Wide Sense Stationary Uncorrelated Scattering    \\
		\bottomrule
	\end{tabularx}

	\cleardoublepage

	\hypersetup{pageanchor = true}
	\pagenumbering{arabic}
	\setcounter{page}{1}
	\pagestyle{scrheadings}

	\include{chapters/introduction}
	\include{chapters/theory}
	\include{chapters/implementation}
	\include{chapters/conclusions}

	%% TODO: remove in final version
	\printskelnotes
	\printbibliography

	\appendix
	\chapter{Appendix}

	\section{Certificaton of authorship}
	We hereby certify that this thesis has been composed by us and is based on our own work, unless stated otherwise. No other person's work has been used without due acknowledgement in this thesis. All references and verbatim extracts have been quoted, and all sources of information, including graphs and data sets, have been specifically acknowledged.

	\vspace{5mm}
	\begin{tabular}{ ll }
		\bfseries Place & \bfseries Date \\
		Rapperswil & 23. December 2021
	\end{tabular}
	\vspace{1cm}
	\begin{flushright}
		\begin{tabularx}{\linewidth}{ rXX }
			Signatures
				& \hrulefill & \hrulefill \\
				& Naoki Sean Pross & Sara Cinzia Halter \\
		\end{tabularx}
	\end{flushright}

  \section{Attached documents}
	\begin{itemize}
		\item Task Description
		\item Project Plan
	\end{itemize}

\end{document}
