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

\documentclass[a4paper, twosided, 11pt]{scrartcl}
% \documentclass{univie-ling-paper}

%% Geometry
\usepackage[a4paper]{geometry}

%$ Specify where floatings go and make nicer looking tables
\usepackage{float}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}

%% graphics
\usepackage{graphicx}

%% Set up font
% \usepackage[T1]{fontenc}
% \usepackage[usefilenames, DefaultFeatures={Ligatures=Common}]{plex-otf}

\usepackage{roboto}
\renewcommand*\familydefault{\sfdefault}

%% Header and Footers
\usepackage[automark]{scrlayer-scrpage}
\ihead{Project Plan}
\chead{}
\ohead{\headmark}

\ifoot{}
\cfoot{\pagemark}
\ofoot{}

%% Access metadata
\usepackage{titling}

%% Pretty pictures
\usepackage{tikz}

%% gantt configuration
\usepackage{pgfgantt}

%% Landscape pages
\usepackage{pdflscape}

% Metadata
\title{Fading illustration with SDR -- Project Plan}
\author{Naoki Pross, Sara Cinzia Halter}
\date{Fall semester 2021}


% Document
\begin{document}

\thispagestyle{plain}
\pagenumbering{roman}

\maketitle
\tableofcontents
\vfill
{
	\renewcommand{\arraystretch}{2}
	\begin{tabularx}{\textwidth}{lp{.2\textwidth}X}
		                   & \bfseries Date & \bfseries Signature\\
		Halter Sara Cinzia & \hrulefill & \hrulefill \\
		Pross Naoki Sean   & \hrulefill & \hrulefill \\
	\end{tabularx}
}
\cleardoublepage

\setcounter{page}{1}
\pagenumbering{arabic}

\section{Introduction}

For the semester thesis at the Eastern Switzerland University of Applied Sciences (OST) it has been requested to create a demonstrative setup to show the fading effect, which is present in real world wireless communication systems.
The device is intended to be used for pedagogical purposes such as to show the effect at the Open Days or for demonstrations during future lectures on fading channels.

\section{Task Description}

\begin{figure}[h]
	\centering
	\begin{tikzpicture}[
			cpoint/.style = {
				inner sep = 0,
				outer sep = 0,
			},
			computer/.pic = {
				% display
				\node[
					draw, very thick,
					rounded corners = 2pt,
					minimum height = 10mm,
					minimum width = 15mm,
				] (-screen) {};
				% stand
				\draw[very thick] (-screen.south) ++(-2mm,0) 
					to[out = -90, in = 60] ++(-1mm, -3mm) 
					to ++(6mm,0)
					to[out = 120, in = -90] ++(-1mm, 3mm);
			},
			antenna/.pic = {
				\draw[very thick] (0,0) -- ++(2mm, 3mm) -- ++(-4mm,0) -- cycle;
				\draw[very thick] (0,0) -- ++(0,-5mm) node[cpoint] (-mast) {};
				\draw[thick] (0,0) -- ++(0,3mm);
				\node[outer sep = 2mm] (-center) at (0,-1mm) {};
			},
		]

		\begin{scope}[shift = {(-10, 2)}]
			\pic (txPC) {computer};
			\node at (txPC-screen) {\textbf{TX}};
			\node[draw, very thick, right = 5mm of txPC-screen, yshift = -6mm] (txSDR) {SDR};
			\pic[above = of txSDR.north east, xshift = -3mm] (txA) {antenna};
			\draw[very thick]
				(txPC-screen.east) ++(0,-.2) to[out = 0, in = 180] (txSDR.west)
				(txA-mast) -- (txA-mast |- txSDR.north);

			\node[below = 5mm of txPC-screen.south] {Stationary sender};
		\end{scope}

		\begin{scope}
			\pic (rxPC) {computer};
			\node at (rxPC-screen) {\textbf{RX}};
			\node[draw, very thick, left = 5mm of rxPC-screen, yshift = -6mm] (rxSDR) {SDR};
			\pic[above = of rxSDR.west, xshift = -15mm] (rxA) {antenna};
			\draw[very thick]
				(rxPC-screen.west) ++(0,-.2) to[out = 180, in = 0] (rxSDR.east)
				(rxA-mast) to[out = -90, in = 0] ++(0,-1)
					to[out =  180, in = -120] ++( -4mm,  2mm)
					to[out =   50, in =   60] ++(  8mm, -1mm)
					to[out = -120, in = -120] ++( -8mm,  0mm)
					to[out =   30, in =  150] ++(  7mm,  1mm)
					to[out =  -30, in =  180] (rxSDR.west)
				;
			\node[below = 5mm of rxPC-screen.south] {Moving Receiver};
		\end{scope}

		\draw[line width = 1mm, draw = red!50!white, -latex] 
			(txA-center) -- node[midway, above, sloped] {LOS path} (rxA-center);

		\begin{scope}[
			ultra thick, draw = blue!50!white, -latex
		]
			\draw (txA-center) -- ++(5,0) node[above] {Reflected paths} -- (rxA-center);
			\draw (txA-center) -- ++(3,1) -- (rxA-center);
			\draw (txA-center) -- ++(1,-2) -- (rxA-center);
		\end{scope}
	\end{tikzpicture}
	\caption[
		Sketch of the setup that will be modelled and implemented.
	]{ Sketch of the setup that will be modelled and implemented.
		The model will need to be adjusted depending on whether there is a line of sight (LOS) between the sender and receiver.
	}
\end{figure}

The scope of the project is to realize a demonstration of a fading channel using a software defined radio (SDR).
Out of the many types of fading effects that exist only small scale fading effects ought to be shown in the demonstration, specifically multi path propagation fading is of interest.
The project requirements that must be fulfilled are thus:
\begin{itemize}
	\item Understand of one or more mathematical models of the fading effect.
	\item Evaluate a suitable development environment for the SDR.
	\item Develop of a signal processing chain for the SDR transmitter and receiver.
	\item Develop of an interface to vary the parameter of the transmission, such as the modulation scheme.
	\item The demonstration should work with both stationary and moving receivers.
\end{itemize}

\section{Development plan}

The development of the project will be carried out roughly in three phases, of which the first two will start in parallel.
\begin{enumerate}
	\item Develop an understanding of fading and how to work with SDR devices.
	\item Create a basic TX -- RX line \emph{without} a fading channel model.
	\item Integrate the fading channel model into the prototype.
\end{enumerate}

\subsection{SDR Device}

At the time of writing, we are given an \emph{USRP B210} SDR as hardware device for the project.
An evaluation based on various criteria, including software compatibility and performance, will be made to decide which combination of SDR devices and software toolboxes will used.

\subsection{Prototype}

The first concrete step will be the realization of a prototype both simulated and with the hardware.
A TX -- RX line with an ideal channel\footnote{In hardware that means a short coaxial cable between the two SDR devices.} will be used to test the modulation and demodulation steps of the signal processing chain.
Furthermore in this phase a software interface to select the modulation scheme and to configure the modulation parameters will be developed.

\subsection{Fading channels}

Once the prototype works we will integrate one or more fading channel models, both in software (simulation) and in hardware.
The latter will be done by taking out the devices around the campus.
Some effects of the channel will require the receiver to move, walking will be used to demonstrate those a scenarios.
If there will be some time left, we may also use a car to demonstrate some other effects that are not observable at a walking speed.

\clearpage

\section{Milestones}

\begin{table}[h]
	\centering
	\caption{Milestones of the project}
	\renewcommand\arraystretch{1.2}
	\begin{tabularx}{\linewidth}{l c X}
		\toprule
		\bfseries Name & \bfseries Due date & \bfseries Description \\
		\midrule
		Project plan & Week 40 & 
			Finalization of this document. \\

		Working SDR TX -- RX  & Week 44 &
			Completion of an RX -- TX line on SDR with variable parameters for configuration. \\

		Working fading TX -- RX & Week 49 &
			Both the simulated and the physical transmission lines work and it is possible to observe the consequences of fading.\\
			
		Abstract & 17 Dec. 2021 &
			The abstract is handed in. \\

		Documentation & Week 50 &
			The documentation is complete both on the theory and practical sides. \\

		Presentation & 23 Dec. 2021 &
			Presentation of the project on Campus. \\
		Submission & 24 Dec. 2021 & --- \\
		\bottomrule
	\end{tabularx}
\end{table}

\appendix

\clearpage
\newgeometry{vmargin = 2.5cm, hmargin = 1.5cm} 
\begin{landscape}
	\begin{figure}[h]
		\caption{Project schedule planned (Gantt diagram)}
		\begin{ganttchart}[
			expand chart = \linewidth,
			% use dates
			time slot format = isodate,
			% set up canvas
			canvas/.append style = {thick},
			title/.style = {draw, thick},
			% set grid
			vgrid = {*6{dotted}, *1{blue!50!black, thick, dotted}},
			% set height and width
			x unit = 2.5mm,
			y unit chart = 12mm,
			% put everything in the chart 
			inline,
			% modify positioning of elements
			group top shift = .6,
			bar top shift = .1,
			bar height = .4,
			milestone top shift = .2,
			milestone height = .3,
			% colored elements
			bar/.append style={
				fill = teal!30!white,
			},
			bar incomplete/.append style={
				fill = white
			},
			progress label text=\relax,
			% modify stile of elements
			bar/.append style = {
				thick,
			},
			bar inline label node/.append style = {
				font = \footnotesize,
			},
			milestone/.append style = {
				fill = red!50!white, thick,
			},
			milestone inline label node/.append style = {
				font = \footnotesize\itshape,
				below = 3mm, xshift = 2mm,
				anchor = north east,
				fill = white,
			},
		]{2021-09-20}{2021-12-26}

			\gantttitlecalendar{month = name, week = 38} \\

			\ganttgroup{Research}{2021-09-21}{2021-11-28}
			\ganttnewline
			
			\ganttbar[progress=20]{Theory}{2021-09-22}{2021-11-28}
			\ganttnewline

			\ganttbar [progress=25]{Software Toolboxes}{2021-09-27}{2021-10-31}
			\ganttnewline
						
			\ganttbar[progress=6]{Hardware}{2021-10-04}{2021-10-31}
			\ganttnewline			

			\ganttgroup{Prototype}{2021-10-04}{2021-10-31}
			\ganttgroup{Demonstration}{2021-11-03}{2021-12-05}
			\ganttnewline

			\ganttbar[progress=0]{Simulation}{2021-10-04}{2021-10-18}
			\ganttbar[progress=0]{Hardware}{2021-10-18}{2021-10-31}
			\ganttmilestone{Working SDR TX -- RX}{2021-11-01}
			\ganttbar[progress=0]{Fading model}{2021-11-03}{2021-11-19}
			\ganttbar[progress=0]{Measurements}{2021-11-20}{2021-12-05}
			\ganttmilestone{Working fading TX -- RX}{2021-12-06}
			\ganttnewline

			\ganttgroup{Documentation}{2021-09-21}{2021-12-20}
			\ganttnewline
			
			\ganttbar{Project Plan}{2021-09-21}{2021-10-04}
			\ganttmilestone{Submission}{2021-10-05}
			\ganttbar[progress=0]{Elevator Pitch Video}{2021-11-08}{2021-11-28}
			\ganttbar[progress=0]{Abstract}{2021-12-02}{2021-12-09}
			\ganttmilestone{Abstract Draft}{2021-12-10}
			\ganttnewline

			\ganttbar[progress=0]{Introduction and Task Desc.}{2021-09-27}{2021-10-24}
			\ganttbar[progress=0]{Methods (SW and HW)}{2021-10-27}{2021-11-16}
			\ganttbar[progress=0]{Results}{2021-11-20}{2021-12-11}
			\ganttmilestone{Ready}{2021-12-12}
			\ganttbar[progress=0]{Review}{2021-12-14}{2021-12-22}
			\ganttmilestone{Submission}{2021-12-23}
			\ganttnewline

			\ganttbar[progress=0]{Theory}{2021-10-07}{2021-12-04}
			\ganttbar[progress=0]{Slides}{2021-12-06}{2021-12-22}
			\ganttmilestone{Presentation}{2021-12-23}
			\ganttnewline
		\end{ganttchart}
	\end{figure}
\end{landscape}

\clearpage
\newgeometry{vmargin = 2.5cm, hmargin = 1.5cm} 
\begin{landscape}
	\begin{figure}[h]
		\caption{Project schedule effective (Gantt diagram)}
		\begin{ganttchart}[
			expand chart = \linewidth,
			% use dates
			time slot format = isodate,
			% set up canvas
			canvas/.append style = {thick},
			title/.style = {draw, thick},
			% set grid
			vgrid = {*6{dotted}, *1{blue!50!black, thick, dotted}},
			% set height and width
			x unit = 2.5mm,
			y unit chart = 12mm,
			% put everything in the chart 
			inline,
			% modify positioning of elements
			group top shift = .6,
			bar top shift = .1,
			bar height = .4,
			milestone top shift = .2,
			milestone height = .3,
			% colored elements
			bar/.append style={
				fill = teal!30!white,
			},
			bar incomplete/.append style={
				fill = white
			},
			progress label text=\relax,
			% modify stile of elements
			bar/.append style = {
				thick,
			},
			bar inline label node/.append style = {
				font = \footnotesize,
			},
			milestone/.append style = {
				fill = red!50!white, thick,
			},
			milestone inline label node/.append style = {
				font = \footnotesize\itshape,
				below = 3mm, xshift = 2mm,
				anchor = north east,
				fill = white,
			},
			]{2021-09-20}{2021-12-26}
			
			\gantttitlecalendar{month = name, week = 38} \\
			
			\ganttgroup{Research}{2021-09-21}{2021-11-28}
			\ganttnewline
			
			\ganttbar[progress=100]{Theory}{2021-09-22}{2021-12-07}
			\ganttnewline
			
			\ganttbar [progress=100]{Software Toolboxes}{2021-09-29}{2021-10-18}
			\ganttnewline
			
			\ganttbar[progress=100]{Hardware}{2021-10-04}{2021-10-27}
			\ganttnewline			
			
			\ganttgroup{Prototype}{2021-10-04}{2021-10-31}
			\ganttgroup{Demonstration}{2021-11-03}{2021-12-05}
			\ganttnewline
			
			\ganttbar[progress=100]{Simulation}{2021-10-13}{2021-10-18}
			\ganttbar[progress=100]{Hardware}{2021-10-18}{2021-10-31}
			\ganttmilestone{Working SDR TX -- RX}{2021-11-01}
			\ganttbar[progress=100]{Fading model}{2021-11-03}{2021-12-19}
			\ganttnewline
			\ganttbar[progress=100]{Measurements}{2021-11-20}{2021-12-22}
			\ganttmilestone{Working fading TX -- RX}{2021-12-06}
			\ganttnewline
			
			\ganttgroup{Documentation}{2021-09-21}{2021-12-20}
			\ganttnewline
			
			\ganttbar{Project Plan}{2021-09-21}{2021-10-04}
			\ganttmilestone{Submission}{2021-10-05}
			\ganttbar[progress=100]{Elevator Pitch Video}{2021-12-23}{2021-12-24}
			\ganttbar[progress=100]{Abstract}{2021-12-14}{2021-12-17}
			\ganttmilestone{Abstract Draft}{2021-12-10}
			\ganttnewline
			
			\ganttbar[progress=100]{Introduction and Task Desc./Methods (SW and HW)}{2021-10-30}{2021-12-22}
			%\ganttbar[progress=0]{Methods (SW and HW)}{2021-10-27}{2021-12-22}
			\ganttnewline
			\ganttbar[progress=100]{Results}{2021-12-20}{2021-12-22}
			\ganttmilestone{Ready}{2021-12-12}
			\ganttbar[progress=100]{Review}{2021-12-17}{2021-12-23}
			\ganttmilestone{Submission}{2021-12-23}
			\ganttnewline
			
			\ganttbar[progress=100]{Theory}{2021-10-12}{2021-12-18}
			\ganttbar[progress=100]{Slides}{2021-12-21}{2021-12-23}
			\ganttmilestone{Presentation}{2021-12-23}
			\ganttnewline
		\end{ganttchart}
	\end{figure}
\end{landscape}


\restoregeometry
\end{document}
