From 6b59bcb1d8aa4e97bca55bf464c5832d0c0fbc43 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Thu, 16 Dec 2021 18:39:38 +0100 Subject: Typo without --- doc/thesis/Makefile | 4 +- doc/thesis/chapters/implementation.tex | 40 ++++------ .../qpsk_sim_constellations_whitout_effects.py | 32 -------- .../qpsk_sim_constellations_without_effects.py | 32 ++++++++ .../qpsk-sim-constellations-whitout-effects.tex | 87 ---------------------- .../qpsk-sim-constellations-without-effects.tex | 87 ++++++++++++++++++++++ 6 files changed, 137 insertions(+), 145 deletions(-) delete mode 100644 doc/thesis/figures/data/qpsk_sim_constellations_whitout_effects.py create mode 100644 doc/thesis/figures/data/qpsk_sim_constellations_without_effects.py delete mode 100644 doc/thesis/figures/tikz/qpsk-sim-constellations-whitout-effects.tex create mode 100644 doc/thesis/figures/tikz/qpsk-sim-constellations-without-effects.tex diff --git a/doc/thesis/Makefile b/doc/thesis/Makefile index a392083..789efed 100644 --- a/doc/thesis/Makefile +++ b/doc/thesis/Makefile @@ -28,14 +28,14 @@ SOURCES := \ figures/tikz/packet-frame.tex \ figures/tikz/qpsk-sim-constellations-static.tex \ figures/tikz/qpsk-sim-constellations-dynamic.tex\ - figures/tikz/qpsk-sim-constellations-whitout-effects.tex\ + figures/tikz/qpsk-sim-constellations-without-effects.tex\ DATA := \ figures/data/multipath_frequency_response.dat \ figures/data/qpsk_sim_constellations_static.dat \ figures/data/qpsk_sim_constellations_static_symb.dat \ figures/data/qpsk_sim_constellations_dynamic.dat\ - figures/data/qpsk_sim_constellations_whitout_effects.dat \ + figures/data/qpsk_sim_constellations_without_effects.dat \ figures/data/rice_pdf.dat diff --git a/doc/thesis/chapters/implementation.tex b/doc/thesis/chapters/implementation.tex index 7be6763..aa394bf 100644 --- a/doc/thesis/chapters/implementation.tex +++ b/doc/thesis/chapters/implementation.tex @@ -280,35 +280,27 @@ In order to study the effects of multipath fading, a series of simulations have \begin{figure} \centering - \input{figures/tikz/qpsk-sim-constellations-whitout-effects} + \input{figures/tikz/qpsk-sim-constellations-without-effects} + \caption{ + TODO + } +\end{figure} + +\begin{figure} + \centering + \input{figures/tikz/qpsk-sim-constellations-static} \caption{ Constellation diagrams for a simulated link using QPSK with AWGN and Rayleighan fading. } \end{figure} -%\begin{figure} -% \centering -% \input{figures/tikz/qpsk-sim-constellations-static} -% \caption{ -% Constellation diagrams for a simulated link using QPSK with AWGN and Rayleighan fading. -% } -%\end{figure} - -%\begin{figure} -% \centering -% \input{figures/tikz/qpsk-sim-constellations-static-symb} -% \caption{ -% Constellation diagrams for a simulated link using QPSK with the discrete time model block. -% } -%\end{figure} -% -%\begin{figure} -% \centering -% \input{figures/tikz/qpsk-sim-constellations-dynamic} -% \caption{ -% Constellation diagrams for a simulated link using QPSK with AWGN and Rayleighan fading. The paramters are: frequency offset of 0.2 \%, \SI{100}{\milli\volt} noise, dopper shift for \(v = \SI{2}{\meter\per\second}\), and a NLOS urban PDP. -% } -%\end{figure} +\begin{figure} + \centering + \input{figures/tikz/qpsk-sim-constellations-dynamic} + \caption{ + Constellation diagrams for a simulated link using QPSK with AWGN and Rayleighan fading. The paramters are: frequency offset of 0.2 \%, \SI{100}{\milli\volt} noise, dopper shift for \(v = \SI{2}{\meter\per\second}\), and a NLOS urban PDP. + } +\end{figure} \subsection{Fading with discrete time model} diff --git a/doc/thesis/figures/data/qpsk_sim_constellations_whitout_effects.py b/doc/thesis/figures/data/qpsk_sim_constellations_whitout_effects.py deleted file mode 100644 index 3ac9948..0000000 --- a/doc/thesis/figures/data/qpsk_sim_constellations_whitout_effects.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python3 - -import os -import numpy as np - -DATA_DIR = "./figures/data/flowgraphs" -SPS = 4 - -channel = np.fromfile(f"{DATA_DIR}/qpsk_channel_whitout_effects.dat", dtype=np.complex64)[::SPS] -sync = np.fromfile(f"{DATA_DIR}/qpsk_sync_whitout_effects.dat", dtype=np.complex64) -equalized = np.fromfile(f"{DATA_DIR}/qpsk_equalized_whitout_effects.dat", dtype=np.complex64) -locked = np.fromfile(f"{DATA_DIR}/qpsk_locked_whitout_effects.dat", dtype=np.complex64) - -samples = [channel, sync, equalized, locked] - -# print(list(map(len, samples))) - -start = 1e3 -end = start + 200 - -get_range = lambda arr: arr[int(start):int(end)] -get_parts = lambda v: (np.real(v), np.imag(v)) - -values = map(get_range, samples) -parts = [p for v in map(get_parts, values) for p in v] -data = np.array(list(zip(*parts))) - -# save to file -location = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) -name, _ = os.path.splitext(os.path.basename(__file__)) -filename = os.path.join(location, name + ".dat") -np.savetxt(filename, data, fmt='%.6e') diff --git a/doc/thesis/figures/data/qpsk_sim_constellations_without_effects.py b/doc/thesis/figures/data/qpsk_sim_constellations_without_effects.py new file mode 100644 index 0000000..3ac9948 --- /dev/null +++ b/doc/thesis/figures/data/qpsk_sim_constellations_without_effects.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 + +import os +import numpy as np + +DATA_DIR = "./figures/data/flowgraphs" +SPS = 4 + +channel = np.fromfile(f"{DATA_DIR}/qpsk_channel_whitout_effects.dat", dtype=np.complex64)[::SPS] +sync = np.fromfile(f"{DATA_DIR}/qpsk_sync_whitout_effects.dat", dtype=np.complex64) +equalized = np.fromfile(f"{DATA_DIR}/qpsk_equalized_whitout_effects.dat", dtype=np.complex64) +locked = np.fromfile(f"{DATA_DIR}/qpsk_locked_whitout_effects.dat", dtype=np.complex64) + +samples = [channel, sync, equalized, locked] + +# print(list(map(len, samples))) + +start = 1e3 +end = start + 200 + +get_range = lambda arr: arr[int(start):int(end)] +get_parts = lambda v: (np.real(v), np.imag(v)) + +values = map(get_range, samples) +parts = [p for v in map(get_parts, values) for p in v] +data = np.array(list(zip(*parts))) + +# save to file +location = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) +name, _ = os.path.splitext(os.path.basename(__file__)) +filename = os.path.join(location, name + ".dat") +np.savetxt(filename, data, fmt='%.6e') diff --git a/doc/thesis/figures/tikz/qpsk-sim-constellations-whitout-effects.tex b/doc/thesis/figures/tikz/qpsk-sim-constellations-whitout-effects.tex deleted file mode 100644 index 6e659cb..0000000 --- a/doc/thesis/figures/tikz/qpsk-sim-constellations-whitout-effects.tex +++ /dev/null @@ -1,87 +0,0 @@ -% vim: set ts=2 sw=2 noet: -\hfill -\begin{subfigure}{.45\linewidth} -\begin{tikzpicture} - \begin{axis}[ - title = {Channel with ISI}, - width = 6.5cm, height = 6.5cm, - % ylabel = {Quadrature}, - % xlabel = {In-Phase}, - xlabel near ticks, - ylabel near ticks, - grid = major, - xmin = -3, xmax = 3, - ymin = -3, ymax = 3, - ] - - \addplot[magenta, only marks] table[x index = 0, y index = 1] - {figures/data/qpsk_sim_constellations_whitout_effects.dat}; - \end{axis} -\end{tikzpicture} -\end{subfigure} -\hfill -\begin{subfigure}{.45\linewidth} -\begin{tikzpicture} - \begin{axis}[ - title = {Synchronized}, - width = 6.5cm, height = 6.5cm, - % ylabel = {Quadrature}, - % xlabel = {In-Phase}, - xlabel near ticks, - ylabel near ticks, - grid = major, - xmin = -3, xmax = 3, - ymin = -3, ymax = 3, - ] - - \addplot[magenta!80!blue, only marks] table[x index = 2, y index = 3] - {figures/data/qpsk_sim_constellations_whitout_effects.dat}; - \end{axis} -\end{tikzpicture} -\end{subfigure} -\hfill - -\vspace{3mm} - -\hfill -\begin{subfigure}{.45\linewidth} -\begin{tikzpicture} - \begin{axis}[ - title = {Equalized}, - width = 6.5cm, height = 6.5cm, - % ylabel = {Quadrature}, - % xlabel = {In-Phase}, - xlabel near ticks, - ylabel near ticks, - grid = major, - xmin = -1.5, xmax = 1.5, - ymin = -1.5, ymax = 1.5, - ] - - \addplot[magenta!50!blue, only marks] table[x index = 4, y index = 5] - {figures/data/qpsk_sim_constellations_whitout_effects.dat}; - \end{axis} -\end{tikzpicture} -\end{subfigure} -\hfill -\begin{subfigure}{.45\linewidth} -\begin{tikzpicture} - \begin{axis}[ - title = {Locked}, - width = 6.5cm, height = 6.5cm, - % ylabel = {Quadrature}, - % xlabel = {In-Phase}, - xlabel near ticks, - ylabel near ticks, - grid = major, - xmin = -1.5, xmax = 1.5, - ymin = -1.5, ymax = 1.5, - ] - - \addplot[magenta!30!blue, only marks] table[x index = 6, y index = 7] - {figures/data/qpsk_sim_constellations_whitout_effects.dat}; - \end{axis} -\end{tikzpicture} -\end{subfigure} -\hfill - diff --git a/doc/thesis/figures/tikz/qpsk-sim-constellations-without-effects.tex b/doc/thesis/figures/tikz/qpsk-sim-constellations-without-effects.tex new file mode 100644 index 0000000..0c33019 --- /dev/null +++ b/doc/thesis/figures/tikz/qpsk-sim-constellations-without-effects.tex @@ -0,0 +1,87 @@ +% vim: set ts=2 sw=2 noet: +\hfill +\begin{subfigure}{.45\linewidth} +\begin{tikzpicture} + \begin{axis}[ + title = {Channel with ISI}, + width = 6.5cm, height = 6.5cm, + % ylabel = {Quadrature}, + % xlabel = {In-Phase}, + xlabel near ticks, + ylabel near ticks, + grid = major, + xmin = -3, xmax = 3, + ymin = -3, ymax = 3, + ] + + \addplot[magenta, only marks] table[x index = 0, y index = 1] + {figures/data/qpsk_sim_constellations_without_effects.dat}; + \end{axis} +\end{tikzpicture} +\end{subfigure} +\hfill +\begin{subfigure}{.45\linewidth} +\begin{tikzpicture} + \begin{axis}[ + title = {Synchronized}, + width = 6.5cm, height = 6.5cm, + % ylabel = {Quadrature}, + % xlabel = {In-Phase}, + xlabel near ticks, + ylabel near ticks, + grid = major, + xmin = -3, xmax = 3, + ymin = -3, ymax = 3, + ] + + \addplot[magenta!80!blue, only marks] table[x index = 2, y index = 3] + {figures/data/qpsk_sim_constellations_without_effects.dat}; + \end{axis} +\end{tikzpicture} +\end{subfigure} +\hfill + +\vspace{3mm} + +\hfill +\begin{subfigure}{.45\linewidth} +\begin{tikzpicture} + \begin{axis}[ + title = {Equalized}, + width = 6.5cm, height = 6.5cm, + % ylabel = {Quadrature}, + % xlabel = {In-Phase}, + xlabel near ticks, + ylabel near ticks, + grid = major, + xmin = -1.5, xmax = 1.5, + ymin = -1.5, ymax = 1.5, + ] + + \addplot[magenta!50!blue, only marks] table[x index = 4, y index = 5] + {figures/data/qpsk_sim_constellations_without_effects.dat}; + \end{axis} +\end{tikzpicture} +\end{subfigure} +\hfill +\begin{subfigure}{.45\linewidth} +\begin{tikzpicture} + \begin{axis}[ + title = {Locked}, + width = 6.5cm, height = 6.5cm, + % ylabel = {Quadrature}, + % xlabel = {In-Phase}, + xlabel near ticks, + ylabel near ticks, + grid = major, + xmin = -1.5, xmax = 1.5, + ymin = -1.5, ymax = 1.5, + ] + + \addplot[magenta!30!blue, only marks] table[x index = 6, y index = 7] + {figures/data/qpsk_sim_constellations_without_effects.dat}; + \end{axis} +\end{tikzpicture} +\end{subfigure} +\hfill + -- cgit v1.2.1