aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2021-12-22 18:14:37 +0100
committerNao Pross <np@0hm.ch>2021-12-22 18:14:37 +0100
commit354bb0e3ccd7d7e71e0031a89d39759f91bb6dd7 (patch)
treedb990e4df43c7f43627b5d71e4a3cef2bfc30853
parentUpdate slides and typo in theory (diff)
parentMerge remote-tracking branch 'origin/master' (diff)
downloadFading-354bb0e3ccd7d7e71e0031a89d39759f91bb6dd7.tar.gz
Fading-354bb0e3ccd7d7e71e0031a89d39759f91bb6dd7.zip
Merge remote-tracking branch 'origin/master'
-rw-r--r--doc/thesis/chapters/conclusions.tex2
-rw-r--r--doc/thesis/chapters/implementation.tex23
-rw-r--r--doc/thesis/figures/tikz/hardware.tex2
-rwxr-xr-xflowgraphs/qpsk_sim.py21
4 files changed, 19 insertions, 29 deletions
diff --git a/doc/thesis/chapters/conclusions.tex b/doc/thesis/chapters/conclusions.tex
index 80776f9..2a38f9c 100644
--- a/doc/thesis/chapters/conclusions.tex
+++ b/doc/thesis/chapters/conclusions.tex
@@ -14,7 +14,7 @@ For both modulation schemes samples from multiple different conditions were coll
A missing feature in this work is an automated collection of the BER data, which would allow to more easily observe and measure the influence of each parameter in the fading channel model.
-\subsection{Improvements in the GUI front-end}
+\subsection{Improvements in the GUI front-end}\label{GUI-improfment}
In addition to fixing the issue discussed in section \ref{sec:gui-issue-single-threaded}, a very important feature that is currently missing is the ability to change the fading parameters in real time from within the GUI. Dear PyGUI offers many graphical elements that could be used to control the parameters, however a new GR block would need to be created to propagate the updated values into the flow graph.
diff --git a/doc/thesis/chapters/implementation.tex b/doc/thesis/chapters/implementation.tex
index 1e68a49..f4609de 100644
--- a/doc/thesis/chapters/implementation.tex
+++ b/doc/thesis/chapters/implementation.tex
@@ -46,7 +46,6 @@ To construct a graphical interface for a demonstration platform the Dear IMGUI (
The DPG front-end communicates with the GR flow graphs using the IP/UDP protocol. This decision to separate the project into two parts that communicate over the IP network was made because it is not easy to extend the graphical interface of GRC without interfering with the sophisticated multi-threaded architecture of GR. Furthermore, this allows to have multiple correctly configured flow graphs on disk and to choose which one to run and display on the graphical interface, instead of having a single flow graph whose parameters need to be changed each time. As a side effect, theoretically this setup allows to have one computer running the graphical interface, and another remote machine running just the flow graph. Though the latency caused by the UDP/IP could be substantial.
-%TODO: Describe GUI Plott.
\section{Hardware}
\begin{table}[h]
@@ -177,7 +176,6 @@ must hold. By further setting \(\kappa = 4\) and \(N' = 32\) we obtain a minimum
\begin{figure}
\centering
- % TODO: move code into separate file
\input{figures/tikz/phasecorr-blockprocessing-diagram}
\caption{
Graphical representation of the input samples for the work function of the fine phase and frequency correction block (shown in listing \ref{lst:phasecorr-work}). Roughly every \(N\) samples there is a tag containing the information of the phase error (computed using the cross correlation peak). The white `chunks' of samples can be corrected using their respective left and right tag values. The samples in the red chunk need phase information from the previous block processing. The samples in the blue chunk need a phase information from the future, which is not attainable. Thus for the blue chunk the frequency estimate of the previous chunk is used.
@@ -238,6 +236,17 @@ def block_phase(self, start, end):
return sphase * np.ones(nsamples) + freq * np.arange(0, nsamples)
\end{lstlisting}
+\subsection{GUI implementation}
+\begin{figure}
+ \centering
+ \includegraphics[frame, width = \linewidth]{figures/screenshots/gui_screenshot}
+ \caption{Screenshot of the graphical interface of receiver built using the DearPyGUI library.
+ \label{fig:GUI}}
+\end{figure}
+
+The GUI is implemented with the Dear PyGUI tool as described in section \ref{sec:GUI}. In \figref{fig:GUI} the surface of it is shown. There are illustrated the four different constellation plots from the channel, the synchronized after the polyphase clock sync, the equalized after the equalizer and the locked one at the end of the receiver chain. The GUI shows the BER of the constellation and a time plot. The surface contains also a block diagram where actually the variable parameter should be, as described in the further section \ref{GUI-improfment}.
+
+
\section{Channel simulations}
In order to study the effects of multipath fading, a series of simulations have been made under different conditions. To simulate a channel affected by multipath fading two blocks from the GR library, and a third custom block were used. The channel model can simulate AWGN, a frequency offset and either a Rayleigh (NLOS) oder Rice (LOS) fading.
@@ -318,7 +327,6 @@ When nothing else is mentioned, the number of FIR-filter taps used is eight.
A difficulty is to check the correctness of the statistical models, if there is noise in the channel from the fading effect. Especially when the Doppler effect is included. Then the simulation is difficult to recreate, when the amplitude and phase parameter are not in a special state, in which the amplitude and the phase shift could be seen exactly.
To have some indication to verify the plot, mainly whether the movement of the signal could be correct, a Matlab model was used with the same values as in the GR simulation, for the different distributions. With this, the model could be verified to be correct.
-%TODO: Other Plots?
\subsubsection{Real value example}
In order to obtain a realistic simulation the values for multipath fading propagation conditions for an Extended Typical Urban (ETU) model, from the ETSI (European Telecommunication Standards Institute) were used \cite{ETSI}, with the values shown in \tabref{tab:etsi-tap-values}. For those the maximum Doppler frequency possibilities are predefined. In the following examples \figref{fig:qpsk-simulations-dynamic} either \(\SI{5}{\hertz}\) or \(\SI{70}{\hertz}\) were used, opposed to the values calculated in \eqref{eq:doppler} for a walking speed of \(\SI{2}{\meter\per\second}\), where the Doppler frequency is \(\SI{16}{\hertz}\). Those predefined values correspond to a speed of
@@ -454,9 +462,6 @@ and \(M\) is relatively prime to \(N\) \cite{Chu1972}. CAZAC waveforms are ideal
The current GUI prototype built with DearPyGUI has some issues, the most critical begin that it is a single-threaded program. The interprocess communications (with GR's flow graphs) should be on a separate thread from the graphics, what is currently not the case. The problem is not noticeable as long as the flow graphs in the background keep sending data, but as soon as the UDP/IP data stream stops, the timeout of the socket interface causes the interface to run at less than 20 frames per second.
-
-%TODO: GUI description
-
\subsection{Clock synchronization issues}
Unfortunately the two SDR need an external clock generator. For that a Rubidium Frequency standard device (Model FS725) is used with the clock frequency of \SI{10}{\mega\hertz}. Two of them are used to make them more movable and independent. Those clock generators where needed, because the synchronization does not work as planed in \ref{sec:preforming-implementation}.
@@ -514,8 +519,4 @@ In this section the plots from the simulation and the hardware are shown.
\newpage
\restoregeometry
-\begin{figure}
- \centering
- \includegraphics[frame, width = \linewidth]{figures/screenshots/gui_screenshot}
- \caption{Screenshot of the graphical interface of receiver built using the DearPyGUI library.}
-\end{figure}
+
diff --git a/doc/thesis/figures/tikz/hardware.tex b/doc/thesis/figures/tikz/hardware.tex
index d9501ed..e887ad4 100644
--- a/doc/thesis/figures/tikz/hardware.tex
+++ b/doc/thesis/figures/tikz/hardware.tex
@@ -2,7 +2,7 @@
\newcommand{\makeplot}[5]{%
\hfill
- % \tikzset{external/force remake}
+ %\tikzset{external/force remake}
\begin{tikzpicture}
\begin{axis}[
width = {\linewidth / 3.3},
diff --git a/flowgraphs/qpsk_sim.py b/flowgraphs/qpsk_sim.py
index 09a0741..b12e1a9 100755
--- a/flowgraphs/qpsk_sim.py
+++ b/flowgraphs/qpsk_sim.py
@@ -136,7 +136,6 @@ class qpsk_sim(gr.top_block, Qt.QWidget):
self.fadingui_netsink_1 = fadingui.netsink(address='udp://localhost:31418', dtype="complex", vlen=1)
self.fadingui_netsink_0_0 = fadingui.netsink(address='udp://localhost:31415', dtype="float", vlen=1)
self.fadingui_netsink_0 = fadingui.netsink(address='udp://localhost:31416', dtype="complex", vlen=1)
- self.fadingui_multipath_fading_0 = fadingui.multipath_fading(amplitudes=[0.2, 0.08, 0.5, 0.4], delays=[0.25, 3.25, 4, 6.3], los =False)
self.fadingui_ber_0 = fadingui.ber(vgl=list(np.zeros(frame_len)), vlen=frame_len,address='udp://localhost:31420')
self.digital_pfb_clock_sync_xxx_0 = digital.pfb_clock_sync_ccf(sps, 2 * np.pi / 100, rrc_taps, 32, 16, 1.5, 1)
self.digital_corr_est_cc_0 = digital.corr_est_cc(access_code_symbols, 1, len(access_code_symbols) // 2, 0.9, digital.THRESHOLD_ABSOLUTE)
@@ -150,20 +149,13 @@ class qpsk_sim(gr.top_block, Qt.QWidget):
log=False)
self.digital_constellation_decoder_cb_0 = digital.constellation_decoder_cb(qpsk_const)
self.digital_cma_equalizer_cc_0 = digital.cma_equalizer_cc(15, 1, 2e-3, 1)
+ self.channels_selective_fading_model_0 = channels.selective_fading_model( 8, 5/samp_rate, True, 5, 0, (0,0.05e-6/samp_rate,0.12e-6/samp_rate,0.2e-6/samp_rate,0.23e-6/samp_rate,0.5e-6/samp_rate,1.6e-6/samp_rate,2.3e-6/samp_rate,5e-6/samp_rate), (0.7943282347242815,0.7943282347242815,0.7943282347242815,1,1,1,0.5011872336272722,0.31622776601683794,0.19952623149688797), 9 )
self.blocks_vector_source_x_0 = blocks.vector_source_b(testvec, True, 1, [])
self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*1, samp_rate,True)
self.blocks_tagged_stream_align_0 = blocks.tagged_stream_align(gr.sizeof_char*1, 'frame_start')
self.blocks_stream_to_vector_0 = blocks.stream_to_vector(gr.sizeof_char*1, frame_len)
self.blocks_stream_mux_0 = blocks.stream_mux(gr.sizeof_char*1, [len(testvec), 4])
self.blocks_repack_bits_bb_0 = blocks.repack_bits_bb(2, 8, "", False, gr.GR_LSB_FIRST)
- self.blocks_file_sink_3 = blocks.file_sink(gr.sizeof_gr_complex*1, 'data/equalized_qpsk.dat', False)
- self.blocks_file_sink_3.set_unbuffered(False)
- self.blocks_file_sink_2 = blocks.file_sink(gr.sizeof_gr_complex*1, 'data/synchronized_qpsk.dat', False)
- self.blocks_file_sink_2.set_unbuffered(False)
- self.blocks_file_sink_1 = blocks.file_sink(gr.sizeof_gr_complex*1, 'data/locked_qpsk.dat', False)
- self.blocks_file_sink_1.set_unbuffered(False)
- self.blocks_file_sink_0 = blocks.file_sink(gr.sizeof_gr_complex*1, 'data/channel_qpsk.dat', False)
- self.blocks_file_sink_0.set_unbuffered(False)
self.blocks_complex_to_mag_0 = blocks.complex_to_mag(1)
self.analog_random_source_x_0 = blocks.vector_source_b(list(map(int, numpy.random.randint(0, 255, 400))), True)
@@ -178,23 +170,19 @@ class qpsk_sim(gr.top_block, Qt.QWidget):
self.connect((self.blocks_stream_mux_0, 0), (self.digital_constellation_modulator_0, 0))
self.connect((self.blocks_stream_to_vector_0, 0), (self.fadingui_ber_0, 0))
self.connect((self.blocks_tagged_stream_align_0, 0), (self.blocks_repack_bits_bb_0, 0))
- self.connect((self.blocks_throttle_0, 0), (self.fadingui_multipath_fading_0, 0))
+ self.connect((self.blocks_throttle_0, 0), (self.channels_selective_fading_model_0, 0))
self.connect((self.blocks_vector_source_x_0, 0), (self.blocks_stream_mux_0, 0))
- self.connect((self.digital_cma_equalizer_cc_0, 0), (self.blocks_file_sink_3, 0))
+ self.connect((self.channels_selective_fading_model_0, 0), (self.digital_pfb_clock_sync_xxx_0, 0))
+ self.connect((self.channels_selective_fading_model_0, 0), (self.fadingui_netsink_0, 0))
self.connect((self.digital_cma_equalizer_cc_0, 0), (self.digital_corr_est_cc_0, 0))
self.connect((self.digital_cma_equalizer_cc_0, 0), (self.fadingui_netsink_1, 0))
self.connect((self.digital_constellation_decoder_cb_0, 0), (self.blocks_tagged_stream_align_0, 0))
self.connect((self.digital_constellation_modulator_0, 0), (self.blocks_throttle_0, 0))
self.connect((self.digital_corr_est_cc_0, 1), (self.blocks_complex_to_mag_0, 0))
self.connect((self.digital_corr_est_cc_0, 0), (self.fadingui_phasecorrection_0, 0))
- self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.blocks_file_sink_2, 0))
self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.digital_cma_equalizer_cc_0, 0))
self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.fadingui_netsink_4, 0))
self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.qtgui_const_sink_x_1, 1))
- self.connect((self.fadingui_multipath_fading_0, 0), (self.blocks_file_sink_0, 0))
- self.connect((self.fadingui_multipath_fading_0, 0), (self.digital_pfb_clock_sync_xxx_0, 0))
- self.connect((self.fadingui_multipath_fading_0, 0), (self.fadingui_netsink_0, 0))
- self.connect((self.fadingui_phasecorrection_0, 0), (self.blocks_file_sink_1, 0))
self.connect((self.fadingui_phasecorrection_0, 0), (self.digital_constellation_decoder_cb_0, 0))
self.connect((self.fadingui_phasecorrection_0, 0), (self.fadingui_netsink_3, 0))
self.connect((self.fadingui_phasecorrection_0, 0), (self.qtgui_const_sink_x_1, 0))
@@ -240,6 +228,7 @@ class qpsk_sim(gr.top_block, Qt.QWidget):
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.blocks_throttle_0.set_sample_rate(self.samp_rate)
+ self.channels_selective_fading_model_0.set_fDTs(5/self.samp_rate)
def get_rrc_taps(self):
return self.rrc_taps