aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2021-12-15 16:10:06 +0100
committerNao Pross <np@0hm.ch>2021-12-15 16:10:06 +0100
commit0f7c89a8c2e4629bc59a685cd3c16ebbf8dae7dc (patch)
tree5d7f92fafe97cb39821bae777e65e52ffa724b28 /doc
parentSmall fix (diff)
parentBER Block change (diff)
downloadFading-0f7c89a8c2e4629bc59a685cd3c16ebbf8dae7dc.tar.gz
Fading-0f7c89a8c2e4629bc59a685cd3c16ebbf8dae7dc.zip
Merge branch 'master' of github.com:NaoPross/Fading
Diffstat (limited to '')
-rw-r--r--doc/poster/pictures/sketch.pngbin0 -> 162855 bytes
-rw-r--r--doc/thesis/chapters/implementation.tex79
-rw-r--r--doc/thesis/chapters/theory.tex44
3 files changed, 105 insertions, 18 deletions
diff --git a/doc/poster/pictures/sketch.png b/doc/poster/pictures/sketch.png
new file mode 100644
index 0000000..9565889
--- /dev/null
+++ b/doc/poster/pictures/sketch.png
Binary files differ
diff --git a/doc/thesis/chapters/implementation.tex b/doc/thesis/chapters/implementation.tex
index ae4571f..9a20d24 100644
--- a/doc/thesis/chapters/implementation.tex
+++ b/doc/thesis/chapters/implementation.tex
@@ -48,7 +48,7 @@ Also as a side effect, in theory this setup allows to have one computer running
\section{Hardware}
\begin{table}[b]
- %To DO sepzifikationen ampssen / genauer? https://www.ettus.com/wp-content/uploads/2019/01/b200-b210_spec_sheet.pdf
+ %TODO sepzifikationen ampssen / genauer? https://www.ettus.com/wp-content/uploads/2019/01/b200-b210_spec_sheet.pdf
% https://kb.ettus.com/B200/B210/B200mini/B205mini#FAQ
\centering
\begin{tabular}{ll}
@@ -91,7 +91,7 @@ GR provides a constellation modulator block, that already implements several sta
What is here referred to as envelope detector has the purpose of synchronizing the symbols and equalizing the input signal amplitude. This is accomplished in GRC using two blocks: a polyphase clock sync and a CMA equalizer. The input signal for the envelope detector has 4 samples per symbol, while the output has only one sample per symbol.
\paragraph{Polyphase Clock Sync}
-%% To Do : nochmals anschauen ob dieese erklärung verständlich ist und richtig interpretiert wurde.
+%TODO : nochmals anschauen ob dieese erklärung verständlich ist und richtig interpretiert wurde.
With the the polyphase clock sync the symbols can be synchronized by preforming a time synchronization with the help of multiple filterbanks. For that the derivative of the filtered signal should be minimized which turns to a better SNR.
% This works with the help of two filterbanks, one of them contains the filters of the signal adapted to the pulse shaping with several phases. The other contains its derivative. So in the time domain it has a sinc shape, for the output Signal the sinc peak should be on a sample, with the fact that sinc(0) = 1 and sinc(0)' = 0 an error signal can be generated which tells how far away from the peak it is. This error Signal should be zero this is possible with the help of a loop second order whish constants the number of the filterbank and the rate. This rate is generated because of the clock difference between the transmitter and receiver to synchronized the receiver the filter goes through the phases. For the output one sample per symbol is enough.
@@ -177,7 +177,7 @@ def work(self, inputs, outputs):
\begin{figure}
\centering
- %% TODO: move code into separate file
+ % TODO: move code into separate file
\begin{tikzpicture}[
blk/.style = {
draw, rectangle, thick, black,
@@ -248,6 +248,7 @@ In this part the fading blocks for the simulation are added. Tow different types
Discuss the multitap FIR model we used. How it is possible to set the delay etc. Also mathematics for the interpolation.
}
+%TODO find out what to do with this text in the comment
%To get a basic line for further simulations a 16QAM has been made. The results of this simulation are shown in \figref{fig:simul16QAM} and \figref{fig:simul16QAM_1} as the red Signal. In \tabref{tab:modulation_settings} some importer Parameter settings for a different modulation scheme are mentioned.
%
%A FIR-Filter was added in the Channel to create a time delay between tow paths. In \figref{fig:simul16QAM} the result includes a direct path and a delayed one. In the plot of \figref{fig:simul16QAM_1} the transmission line dosn't include a direct path. %It's impotent to mention that the delay should be smaller than the symbol rate or a multiple of it. (Stimmt dies , not sure any more)
@@ -256,8 +257,9 @@ In this part the fading blocks for the simulation are added. Tow different types
\subsection{Fading with Discrete-time model}
-For the statical version according to \ref{sec:discrete-time-model} to implement and illustrat the fading effect, a separate block was created and implemented in the channel. Nearer shown in \ref{lst:fir-block}. This block is based on a FIR filter. It can be displayed with a direct path or without one. With the help of this filter, the delay of the line of side paths are illustrated. In this block it is possible to simulate any number of these paths with different strengths, as long as there is an associated amplitude specified for each delayed path. Unfortunately, these simulation values do not correspond to the realety, because too many incalculable side effects occur, which aren't possiple to ilustrate in this simulation.
-This block was additionally implemented with the method described in \ref{sec:fractional-delay} to allow non-integer delay values compared to the samples shown in \figref{fig:fractional-delay-sinc-plot}. Where the sinc function does not select an integer sample. Which in turn means that the other sampled values do not add up to zero. Thus, they will be distributed among the other whole numbers. A window function could also be implemented to limit these values. Here none was implemented because the sinc function is restricted.
+For the statical version according to \ref{sec:discrete-time-model} to implement and illustrat the fading effect, a separate block was created and implemented in the channel. Nearer shown in \ref{lst:fir-block}. This block is based on a FIR filter. It can be displayed with a direct path or without one. With the help of this filter, the delay of the line of side paths are illustrated. In this block it is possible to simulate any number of these paths with different strengths, as long as there is an associated amplitude specified for each delayed path. Unfortunately, these simulation values do not correspond to the realety, because too many incalculable side effects occur, which aren't possiple to ilustrate in this simulation.
+This block was additionally implemented with the method described in \ref{sec:fractional-delay} to allow non-integer delay values compared to the samples shown in \figref{fig:fractional-delay-sinc-plot}. Where the sinc function does not select an integer sample. Which in turn means that the other sampled values do not add up to zero.
+Thus, they will be distributed among the other whole numbers. A window function could also be implemented to limit these values. Here none was implemented because the sinc function is restricted.
\skelpar[5]{
Discrabe a perfect plot
@@ -313,20 +315,25 @@ This block was additionally implemented with the method described in \ref{sec:fr
\subsection{Fading with Statistical model}
-
+\skelpar[5]{
+ Discuss how i did that
+}
% TODO: Quelle https://ch.mathworks.com/help/comm/ug/fading-channels.html?searchHighlight=rician%20fading&s_tid=srchtitle_rician%2520fading_2#a1070327427b1
+In order to represent the effect of the multipaht fading not only statically, a second model was created using the Frequency Selective Fading Model from Gnu Radio, according to \ref{statistical_model}.which was implemented after the algorithm from the paper \cite{Alimohammad2009}. It is based on the sum-of sinusoid principal(SOS)
\begin{german}
- Um den effect des multipaht fadinngs nicht nur statisch darzu stellen, wurde ein zweites model kreiert mit hilfe des Frequency Selective Fading Models von Gnu Radio, gemäss \ref{statistical_model}.
- Welcher nach dem Algorthmus aud dem paper \cite{Alimohammad2009} implementiert wurde.
+
Um die resultate einigermassse nach vollziehen zu können wurde ein MATLAP model zur veranschaulichung erstelle.
Um ein realistisches beispiel zu haben wurden werte aus dem Skript \cite{Mathis} genomen
\end{german}
Some realistic value for this block are:
-The first delay when theirs non line of side is zero. The second delayed path depend on the environment of measurement. In an indoor enviroment it is usaely between \(1\cdot10^{-9}\) to \(1\cdot10^{-7}\) and in an outdoor environment between \(1\cdot10^{-7}\) to \(1\cdot10^{-5}\). The rest depends on on the bandwith
+The first delay when theirs non line of side should be zero. The second delayed path depend on the environment of measurement. In an indoor enviroment it is usually between \(1\cdot10^{-9}\) to \(1\cdot10^{-7}\) and in an outdoor environment between \(1\cdot10^{-7}\) to \(1\cdot10^{-5}\). The rest depends on on the bandwidth.
+
+
+Rician fading factor K = 0 = Rylehnt Model
\skelpar[5]{
Simulation mit Werten aus dem Skript
@@ -334,11 +341,57 @@ The first delay when theirs non line of side is zero. The second delayed path de
\subsection{Measurements}
+\skelpar[5]{
+ Do some masurements
+}
+
\subsection{Empirical BER} \label{sec:ber}
-%
-%
-%
+To find out how accurate the simulations are comparer with a simulation of the fadinng effect and tested measurements, the byte error rate of the system is calculated. This is done with the help of a user specified \(k\)-byte test frame in the beginning of each vector. Implemented according to the code in \ref{lst:ber-block}. Every bit is compared with the test vector at the beginning before the modulation and demodulation part.
+Because of the fact that the test vector has some random bit at the end the bit error rate has always a value on average 32, even when its perfect match. So to avoid high numbers this value is subtracted and only on focused on the positive values.
+
+The vector which is used as test vector is: \([0x1f, 0x35] + [0x12, 0x48] \), because this numbers are well suited to compare.
+For generating the Byte error rate it is focus on byte-blocks of a specific length. So for each of this blocks compared with test vector there is a BER. To make it simpler or better said to avoid mistakes, the last 200 of this individual BER are taken to find an average and the highest value.
+
+\skelpar[5]{
+ Maybe more
+}
+
+
+
+\begin{lstlisting}[
+ texcl = true, language = python, escapechar = {`},
+ float, captionpos = b, label = {lst:ber-block},
+ caption = {
+ Block FIR Filter function referenced in listing \ref{lst:phasecorr-work}.
+ },
+ ]
+ def work(self, input_items, output_items):
+ inp = input_items[0]
+ # input vector
+
+ for i in inp:
+ i = np.array(i, dtype=np.uint8)
+ v = np.array(self.vgl, dtype=np.uint8) ^ i
+ # XOR comparsion to find the diviation for the bits
+ ber = sum(np.unpackbits(v))
+
+ trueber = ber - 32
+ if trueber < 0:
+ trueber = 0
+
+ self.ber_samples.appendleft(trueber)
+
+ ber_max, ber_min, ber_avg = self.ber_stats()
+ self.send(self.encode([trueber, ber_max, ber_avg]))
+ #Send the valuse to the GUI
+ return len(inp)
+
+\end{lstlisting}
+
+
+
+
\begin{figure}
\includegraphics[width=\linewidth]{./figures/pdfs/qam_nogui.pdf}
@@ -370,4 +423,4 @@ The first delay when theirs non line of side is zero. The second delayed path de
\label{fig:simul16QAM__Hardware}
\end{figure}
-% To Do: Picture of the setup
+% TODO: Picture of the setup
diff --git a/doc/thesis/chapters/theory.tex b/doc/thesis/chapters/theory.tex
index 15aa44b..6255648 100644
--- a/doc/thesis/chapters/theory.tex
+++ b/doc/thesis/chapters/theory.tex
@@ -208,6 +208,7 @@ With a continuous time channel model we can now discuss the spectral properties
Equation \eqref{eqn:multipath-frequency-response} shows that the frequency response is a periodic complex exponential, which has some important implications. Notice that if there is only one tap (term), the magnitude of \(H(f, t)\) is a constant (with respect to \(f\)) since \(|e^{j\alpha f}| = 1\). This means that the channels attenuates all frequencies by the same amount, therefore it is said to be a \emph{frequency non-selective} or \emph{flat fading} channel. Whereas in the case when there is more than one tap, the taps interfere destructively at certain frequencies and the channel is called \emph{frequency selective}. To illustrate how this happens, plots of the frequency response of a two tap channel model are shown in \figref{fig:multipath-frequency-response-plots}. On the left is the magnitude of \(H(f, t)\), which presents periodic ``dips'', and on the right complex loci for the two taps (red and blue), as well as their sum (magenta), over the frequency range near the first dip (2 to 2.5 MHz) are shown.
+
\begin{figure}
\centering
\resizebox{\linewidth}{!}{
@@ -231,10 +232,16 @@ An intuitive parameter to quantify how dispersive channel is, is to take the tim
as is done in \cite{Gallager}. However since in reality some paths get more attenuated than others (\(c_k(t)\) parameters) it also not uncommon to define the delay spread as a weighted mean or even as a statistical second moment (RMS value), where mean tap power \(\expectation\{|c_k(t)|^2\}\) is taken into account \cite{Mathis,Messier}. More sophisticated definitions of delay spread will be briefly mentioned later in section \ref{sec:statistical-model}.
Another important parameter for quantifying dispersion is \emph{coherence bandwidth}, a measure how
+\skelpar{sentence}
+
+% TODO: End the sentence
\subsection{Effects of multipath fading on modulation constellations}
-\skelpar{Beschreiben warnn die Werte hübsch sind}
+% TODO : Can we sai it that way /dose it need to be in the implementation Part?
+
+It is to mention that not every constellation of parameter for a fading illustration leads to a satisfying plot constellation.
+For example in a Discrete-time Model: the same delay as the samples per Symbol or a multiple of it leads to a special case, where we see the constellation are around the modulate signal points, when there is no line of side path. This is because of \skelpar{Beschreiben warnn die Werte hübsch sind}
\subsection{Discrete-time model} \label{sec:discrete-time-model}
@@ -274,10 +281,10 @@ is different from \eqref{eqn:multipath-impulse-response} consider again the plot
\end{figure}
From a signal processing perspective \eqref{eqn:discrete-multipath-impulse-response} can be interpreted as a simple tapped delay line, schematically drawn in \figref{fig:tapped-delay-line}, which confirms that the presented mathematical model is indeed a FIR filter. Simple multipath channels can be simulated with just a few lines of code, for example the data for the static fading channel in \figref{fig:multipath-frequency-response-plots} is generated in just four lines of Python. The difficulty of fading channels in practice lies in the estimation of the constantly changing parameters \(c_k(t)\) and \(\tau_k(t)\).
-
+%TODO: Code ?
\subsection{Simulating multipath CIR with FIR filters} \label{sec:fractional-delay}
-% TO Do quelle: http://users.spa.aalto.fi/vpv/publications/vesan_vaitos/ch3_pt1_fir.pdf
+% TODO quelle: http://users.spa.aalto.fi/vpv/publications/vesan_vaitos/ch3_pt1_fir.pdf
\begin{figure}
\centering
@@ -327,7 +334,7 @@ Recall that \(h_l(m)\) is a function of time because \(c_k\) and \(\tau_k\) chan
for some parameter \(\sigma\). Loosely speaking, the distribution needs to be ``circular'' because \(h_l\) is a complex number, which is a ``two dimensional number'', it can however be understood as \(\Re{h_l} \sim \mathcal{N}(0, \sigma^2)\) and \(\Im{h_l} \sim \mathcal{N}(\mu, \sigma^2)\), i.e. having each component being normally distributed.
-% TO DO : Picture of gaussian distribution
+%TODO : Picture of gaussian distribution
\begin{subequations}
\begin{align}
R_{l} (k) &= \E{h_l(m) h_l^*(m+k)}, \\
@@ -343,7 +350,7 @@ for some parameter \(\sigma\). Loosely speaking, the distribution needs to be ``
\end{subfigure}
\hskip 5mm
\begin{subfigure}{.45\linewidth}
- \skelfig
+ \skelfig
\caption{LOS, Rice}
\end{subfigure}
\caption{
@@ -352,8 +359,30 @@ for some parameter \(\sigma\). Loosely speaking, the distribution needs to be ``
}
\end{figure}
+%TODO :Maby some correction on the descreption, because mentionet earlyer
\paragraph{NLOS case}
+%TODO: Quellen : Skript Mathis und Buch Grundlagen der digitalen Informationsübertagung Peter Adam Höher
+
+
+ In the case of the Rayleight distribution the signal has no line of sight. So to find the probability function of the amplitutes of this superimposition of those infinity of distribute signals:
+\begin{equation} \label{eqn:rayleight fading}
+ f(t) = \lim_{N\rightarrow\infty} \frac{1}{\sqrt{N}}\sum_{n=1}^{N} e^{j(\Theta +2\pi jf t)}.
+ \end{equation}
+whish are nominatet with the factor \(\frac{1}{\sqrt{N}}\) so that the \(\E{|f(t)|²}=1\) and the fact that we are looking at the complex basiband and this prosses are independent and in this the gaussian distribution it can be said that is zero \(\E{f(t)}=0\)
+
+
+ It can be explain in two different way with the help of %TODO: How do you say Quadraturkomponenten in english?
+ quadraturcomponents or the help of the amplitude in time and the associated phase \(\Theta(t) \in[\,0,2\pi)\,\)
+
+
+
+%\begin{equation} \label{eqn:rayleight_fading_probabilety_dencety}
+% p(a)= 2a \exp{-a^2}
+%
+%\end{equation}
+%TODO: Why not the same as in the skript
+
\skelpar[4]{Explain statistical model with Rayleighan distribution.}
\begin{equation}
\Re{h_l(n)}, \Im{h_l(n)}
@@ -362,6 +391,11 @@ for some parameter \(\sigma\). Loosely speaking, the distribution needs to be ``
\skelpar[4]
\paragraph{LOS case}
+In the case of the Rician distribution model. The line of side exist, which means that one of the paths have a straight communication line from the transmitter to the reviser.
+
+It can be said that a Rayleight distribution is the same as a Rician distribution with a factor K =0.
+
+For a faktor K= 5.1 the probability function is gaussien distributed.
\skelpar[4]{Explain statistical model with Rician distribution.}
\begin{equation}