From 38576cd7fc8992a6ae86e7213e62842f7a101849 Mon Sep 17 00:00:00 2001 From: sara Date: Fri, 17 Dec 2021 19:44:51 +0100 Subject: Doku exemple real --- doc/thesis/Makefile | 2 + doc/thesis/chapters/implementation.tex | 10 +++ .../qpsk_channel_dynamic_exp_LOS_5_K5.dat | Bin 0 -> 4387016 bytes .../qpsk_channel_dynamic_exp_LOS_70_K5.dat | Bin 0 -> 2355520 bytes .../flowgraphs/qpsk_channel_dynamic_exp_NLOS_5.dat | Bin 0 -> 2989000 bytes .../qpsk_channel_dynamic_exp_NLOS_70.dat | Bin 0 -> 3404032 bytes .../qpsk_equalized_dynamic_exp_LOS_5_K5.dat | Bin 0 -> 1096424 bytes .../qpsk_equalized_dynamic_exp_LOS_70_K5.dat | Bin 0 -> 588544 bytes .../qpsk_equalized_dynamic_exp_NLOS_5.dat | Bin 0 -> 746920 bytes .../qpsk_equalized_dynamic_exp_NLOS_70.dat | Bin 0 -> 849864 bytes .../qpsk_locked_dynamic_exp_LOS_5_K5.dat | Bin 0 -> 1096416 bytes .../qpsk_locked_dynamic_exp_LOS_70_K5.dat | Bin 0 -> 588528 bytes .../flowgraphs/qpsk_locked_dynamic_exp_NLOS_5.dat | Bin 0 -> 746856 bytes .../flowgraphs/qpsk_locked_dynamic_exp_NLOS_70.dat | Bin 0 -> 849816 bytes .../flowgraphs/qpsk_sync_dynamic_exp_LOS_5_K5.dat | Bin 0 -> 1096424 bytes .../flowgraphs/qpsk_sync_dynamic_exp_LOS_70_K5.dat | Bin 0 -> 588544 bytes .../flowgraphs/qpsk_sync_dynamic_exp_NLOS_5.dat | Bin 0 -> 746920 bytes .../flowgraphs/qpsk_sync_dynamic_exp_NLOS_70.dat | Bin 0 -> 849864 bytes .../qpsk_sim_constellations_dynamic_exp_NLOS_5.py | 34 ++++++++++ .../qpsk-sim-constellations-dynamic-exp-NLOS-5.tex | 75 +++++++++++++++++++++ 20 files changed, 121 insertions(+) create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_LOS_5_K5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_LOS_70_K5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_NLOS_5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_NLOS_70.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_LOS_5_K5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_LOS_70_K5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_NLOS_5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_NLOS_70.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_LOS_5_K5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_LOS_70_K5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_NLOS_5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_NLOS_70.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_LOS_5_K5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_LOS_70_K5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_NLOS_5.dat create mode 100644 doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_NLOS_70.dat create mode 100644 doc/thesis/figures/data/qpsk_sim_constellations_dynamic_exp_NLOS_5.py create mode 100644 doc/thesis/figures/tikz/qpsk-sim-constellations-dynamic-exp-NLOS-5.tex (limited to 'doc/thesis') diff --git a/doc/thesis/Makefile b/doc/thesis/Makefile index 63cc851..db843b8 100644 --- a/doc/thesis/Makefile +++ b/doc/thesis/Makefile @@ -31,6 +31,7 @@ SOURCES := \ figures/tikz/qpsk-sim-constellations-static-symb-NLOS.tex \ figures/tikz/qpsk-sim-constellations-static-symb-vec.tex \ figures/tikz/qpsk-sim-constellations-dynamic.tex\ + figures/tikz/qpsk-sim-constellations-dynamic-exp-NLOS-5.tex\ figures/tikz/qpsk-sim-constellations-without-effects.tex\ @@ -41,6 +42,7 @@ DATA := \ figures/data/qpsk_sim_constellations_static_symb_NLOS.dat \ figures/data/qpsk_sim_constellations_static_symb_vec.dat \ figures/data/qpsk_sim_constellations_dynamic.dat\ + figures/data/qpsk_sim_constellations_dynamic_exp_NLOS_5.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 ff80f2e..748982c 100644 --- a/doc/thesis/chapters/implementation.tex +++ b/doc/thesis/chapters/implementation.tex @@ -426,6 +426,16 @@ In order to obtain a realistic simulation the values for multi-path fading propa \caption{Values used for the simulation\label{tab:values}} \end{table} +\begin{figure} + \centering + \input{figures/tikz/qpsk-sim-constellations-dynamic-exp-NLOS-5} + \caption{ + TODO + } + \label{fig:dynamic-exp-real} +\end{figure} + + \subsection{Measurements} \skelpar[5]{ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_LOS_5_K5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_LOS_5_K5.dat new file mode 100644 index 0000000..b4accdd Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_LOS_5_K5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_LOS_70_K5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_LOS_70_K5.dat new file mode 100644 index 0000000..350fb3b Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_LOS_70_K5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_NLOS_5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_NLOS_5.dat new file mode 100644 index 0000000..1322947 Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_NLOS_5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_NLOS_70.dat b/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_NLOS_70.dat new file mode 100644 index 0000000..ffe47ce Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_channel_dynamic_exp_NLOS_70.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_LOS_5_K5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_LOS_5_K5.dat new file mode 100644 index 0000000..ce683a0 Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_LOS_5_K5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_LOS_70_K5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_LOS_70_K5.dat new file mode 100644 index 0000000..a0399b9 Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_LOS_70_K5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_NLOS_5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_NLOS_5.dat new file mode 100644 index 0000000..28eaeb8 Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_NLOS_5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_NLOS_70.dat b/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_NLOS_70.dat new file mode 100644 index 0000000..596e0a9 Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_equalized_dynamic_exp_NLOS_70.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_LOS_5_K5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_LOS_5_K5.dat new file mode 100644 index 0000000..c0c30e0 Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_LOS_5_K5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_LOS_70_K5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_LOS_70_K5.dat new file mode 100644 index 0000000..1d55afc Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_LOS_70_K5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_NLOS_5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_NLOS_5.dat new file mode 100644 index 0000000..1c53fed Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_NLOS_5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_NLOS_70.dat b/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_NLOS_70.dat new file mode 100644 index 0000000..5e2a983 Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_locked_dynamic_exp_NLOS_70.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_LOS_5_K5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_LOS_5_K5.dat new file mode 100644 index 0000000..513dfa8 Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_LOS_5_K5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_LOS_70_K5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_LOS_70_K5.dat new file mode 100644 index 0000000..86d472a Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_LOS_70_K5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_NLOS_5.dat b/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_NLOS_5.dat new file mode 100644 index 0000000..327a07d Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_NLOS_5.dat differ diff --git a/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_NLOS_70.dat b/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_NLOS_70.dat new file mode 100644 index 0000000..35971b0 Binary files /dev/null and b/doc/thesis/figures/data/flowgraphs/qpsk_sync_dynamic_exp_NLOS_70.dat differ diff --git a/doc/thesis/figures/data/qpsk_sim_constellations_dynamic_exp_NLOS_5.py b/doc/thesis/figures/data/qpsk_sim_constellations_dynamic_exp_NLOS_5.py new file mode 100644 index 0000000..c48b87b --- /dev/null +++ b/doc/thesis/figures/data/qpsk_sim_constellations_dynamic_exp_NLOS_5.py @@ -0,0 +1,34 @@ +#!/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_dynamic_exp_NLOS_5.dat", dtype=np.complex64)[::SPS] +sync = np.fromfile(f"{DATA_DIR}/qpsk_sync_dynamic_exp_NLOS_5.dat", dtype=np.complex64) +equalized = np.fromfile(f"{DATA_DIR}/qpsk_equalized_dynamic_exp_NLOS_5.dat", dtype=np.complex64) +locked = np.fromfile(f"{DATA_DIR}/qpsk_locked_dynamic_exp_NLOS_5.dat", dtype=np.complex64) + +samples = [channel, sync, equalized, locked] + +# print(list(map(len, samples))) + +start = 67.8e3 +end = start + 500 +# start = 80e3 +# end = start + 1000 + +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-dynamic-exp-NLOS-5.tex b/doc/thesis/figures/tikz/qpsk-sim-constellations-dynamic-exp-NLOS-5.tex new file mode 100644 index 0000000..4afaa09 --- /dev/null +++ b/doc/thesis/figures/tikz/qpsk-sim-constellations-dynamic-exp-NLOS-5.tex @@ -0,0 +1,75 @@ +% vim: set ts=2 sw=2 noet: +\begin{tikzpicture} + \begin{axis}[ + title = {Channel with ISI}, + width = 5cm, height = 5cm, + % ylabel = {Quadrature}, + % xlabel = {In-Phase}, + xlabel near ticks, + ylabel near ticks, + grid = major, + xmin = -5, xmax = 5, + ymin = -5, ymax = 5, + ] + + \addplot[magenta, only marks] table[x index = 0, y index = 1] + {figures/data/qpsk_sim_constellations_dynamic_exp_NLOS_5.dat}; + \end{axis} +\end{tikzpicture} +\hspace{5mm} +\begin{tikzpicture} + \begin{axis}[ + title = {Synchronized}, + width = 5cm, height = 5cm, + % ylabel = {Quadrature}, + % xlabel = {In-Phase}, + xlabel near ticks, + ylabel near ticks, + grid = major, + xmin = -5, xmax = 5, + ymin = -5, ymax = 5, + ] + + \addplot[magenta!80!blue, only marks] table[x index = 2, y index = 3] + {figures/data/qpsk_sim_constellations_dynamic_exp_NLOS_5.dat}; + \end{axis} +\end{tikzpicture} + +\vspace{5mm} + +\begin{tikzpicture} + \begin{axis}[ + title = {Equalized}, + width = 5cm, height = 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_dynamic_exp_NLOS_5.dat}; + \end{axis} +\end{tikzpicture} +\hspace{5mm} +\begin{tikzpicture} + \begin{axis}[ + title = {Locked}, + width = 5cm, height = 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_dynamic_exp_NLOS_5.dat}; + \end{axis} +\end{tikzpicture} + -- cgit v1.2.1