ma: wrangled all the figures

This commit is contained in:
jaseg 2020-07-04 17:13:54 +02:00
parent efbb8aecde
commit 0058de2e50
13 changed files with 200 additions and 282 deletions

File diff suppressed because one or more lines are too long

View file

@ -347,7 +347,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.8.3"
}
},
"nbformat": 4,

File diff suppressed because one or more lines are too long

View file

@ -718,7 +718,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.8.3"
}
},
"nbformat": 4,

View file

@ -290,7 +290,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.8.3"
}
},
"nbformat": 4,

View file

@ -10,16 +10,20 @@ MAKEFLAGS += --no-builtin-rules
all: safety_reset.pdf
safety_reset.pdf: resources/grid_freq_estimation.pdf
safety_reset.pdf: resources/gps_clock_jitter_analysis.pdf
safety_reset.pdf: resources/dsss_experiments-ber.pdf
safety_reset.pdf: resources/freq_meas_validation_rocof_testsuite.pdf
#safety_reset.pdf: resources/grid_freq_estimation.pdf
#safety_reset.pdf: resources/gps_clock_jitter_analysis.pdf
#safety_reset.pdf: resources/dsss_experiments-ber.pdf
#safety_reset.pdf: resources/freq_meas_validation_rocof_testsuite.pdf
%.pdf: %.tex %.bib version.tex
pdflatex -shell-escape $<
biber $*
pdflatex -shell-escape $<
.PHONY: preview
preview:
pdflatex -shell-escape safety_reset.tex
version.tex: safety_reset.tex safety_reset.bib
git describe --tags --long --dirty > $@

1
ma/resources/scope kdf.drawio Executable file
View file

@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2020-05-26T10:47:26.013Z" agent="5.0 (Windows)" etag="zhFPWOy-Bh-A5xVPuEOe" version="13.1.3" type="device"><diagram id="Fu6VaHAKgoaP7QYwlWCU" name="Page-1">1VhZb+IwEP41PLYKOQg8lmu7atmtRLXbPlUmGRJvTZx1zJH++rUThzgHL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ljlkv9ccck9pDKq6T3ymz8FjwKvP9M/2KLfcaiCc/vs9ysW2/FMgb+jlfyvW5B8=</diagram></mxfile>

View file

@ -60,6 +60,9 @@
\usepackage[draft=false,babel,tracking=true,kerning=true,spacing=true]{microtype} % optischer Randausgleich etc.
% For german quotation marks
\usepackage{fltpage}
\renewcommand{\floatpagefraction}{.8}
\newcommand{\degree}{\ensuremath{^\circ}}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
@ -84,8 +87,9 @@
\typ{Masterarbeit}
\grad{Master of Science (M. Sc.)}
\autor{Jan Sebastian Götte}
\gebdatum{Aus Datenschutzgründen nicht abgedruckt} % Geburtsdatum des Autors
\gebort{Aus Datenschutzgründen nicht abgedruckt} % Geburtsort des Autors
\gebdatum{\rule{2cm}{12pt}} % Geburtsdatum des Autors
\gebort{\rule{3cm}{12pt}} % Geburtsort des Autors
\input{private-data.tex}
\gutachter{Prof. Dr. Björn Scheuermann}{Prof. Dr.-Ing. Eckhard Grass}
\mitverteidigung
\makeTitel
@ -104,9 +108,7 @@
\center{For alternative licensing options, source files, questions or comments please contact the author at
\texttt{masterarbeit@jaseg.de}}.
\center{This is version \texttt{\input{version.tex}\unskip} generated on \today. The printed version of this
document will be marked \texttt{-dirty} due to the private personal information on the title page that is not
checked in to git. The git repository can be found at:}
\center{This is version \texttt{\input{version.tex}\unskip} generated on \today. The git repository can be found at:}
\center{\url{https://git.jaseg.de/master-thesis.git}}
\end{minipage}
@ -2056,7 +2058,7 @@ window respectively.
\begin{figure}
\centering
\includegraphics{../lab-windows/fig_out/freq_meas_trace_24h}
\includegraphics[width=\textwidth]{../lab-windows/fig_out/freq_meas_trace_24h}
\caption{Trace of grid frequency over a 24 hour time span. One clearly visible feature are large positive and negative
transients at full hours. Times shown are UTC. Note that the European continental synchronous area that this
sensor is placed in covers several time zones which may result in images of daily load peaks appearing in 1 hour
@ -2067,12 +2069,12 @@ window respectively.
\begin{figure}
\begin{subfigure}{\textwidth}
\centering
\includegraphics{../lab-windows/fig_out/freq_meas_trace_2h_1}
\includegraphics[width=\textwidth]{../lab-windows/fig_out/freq_meas_trace_2h_1}
\caption{A 2 hour window centered on 00:00 UTC.}
\end{subfigure}
\begin{subfigure}{\textwidth}
\centering
\includegraphics{../lab-windows/fig_out/freq_meas_trace_2h_2}
\includegraphics[width=\textwidth]{../lab-windows/fig_out/freq_meas_trace_2h_2}
\caption{A 2 hour window centered on 18:30 UTC.}
\end{subfigure}
\caption{Two magnified 2 hour windows of the trace from Figure \ref{freq_meas_trace}.}
@ -2081,7 +2083,7 @@ window respectively.
\begin{figure}
\centering
\includegraphics{../lab-windows/fig_out/mains_voltage_spectrum}
\includegraphics[width=\textwidth]{../lab-windows/fig_out/mains_voltage_spectrum}
\caption{Power spectral density of the mains voltage trace in Figure \ref{freq_meas_trace}. Data was captured using
our frequency measurement sensor (\ref{sec-fsensor}) and FFT-processed after applying a Blackman window. The
vertical lines indicate \SI{50}{\hertz} and odd harmonics. We can see the expected peak at \SI{50}{\hertz} along
@ -2118,7 +2120,7 @@ signals look very similar, suggesting that we have found a good synthetic approx
\begin{figure}
\centering
\includegraphics[width=\textwidth]{../lab-windows/fig_out/freq_meas_spectrum}
\hspace*{-1.2cm}\includegraphics[width=1.2\textwidth]{../lab-windows/fig_out/freq_meas_spectrum}
\caption{Power spectral density of the 24 hour grid frequency trace in Figure \ref{freq_meas_trace} with some notable
peaks annotated with the corresponding period in seconds. The $\frac{1}{f}$ line indicates a pink noise spectrum.
Around a period of \SI{20}{\second} the PSD starts to fall off at about $\frac{1}{f^3}$ until we can make out some
@ -2132,7 +2134,8 @@ signals look very similar, suggesting that we have found a good synthetic approx
\begin{figure}
\centering
\includegraphics[width=\textwidth]{../lab-windows/fig_out/simulated_noise_spectrum}
\hspace*{-1.2cm}
\includegraphics[width=1.2\textwidth]{../lab-windows/fig_out/simulated_noise_spectrum}
\caption{Synthetic grid frequency in comparison with measured data. The topmost graph shows the synthetic spectrum
compared to the spline approximation of the measured spectrum (red line). The other graphs show time-domain
synthetic data (blue) in comparison with measured data (orange).
@ -2201,9 +2204,8 @@ Gold code yields sufficient performance at manageable data rates.
\begin{figure}
\centering
\begin{minipage}[c]{0.5\textwidth}
\includegraphics{../lab-windows/fig_out/dsss_gold_nbits_sensitivity}
\end{minipage}
\begin{minipage}[c]{0.45\textwidth}
\hspace*{-1cm}\includegraphics[width=1.1\textwidth]{../lab-windows/fig_out/dsss_gold_nbits_sensitivity}
\end{minipage}\begin{minipage}[c]{0.45\textwidth}
\caption{
Amplitude at an SER of 0.5\ in mHz depending on symbol length. Here we can observe an increase of sensitivity
with increasing symbol length, but we can clearly see diminishing returns above 6 bit (63 chips). Considering
@ -2241,7 +2243,7 @@ in Section \ref{sec-demo-fw-impl}. For comparison purposes this issue do not mat
\begin{figure}
\centering
\includegraphics{../lab-windows/fig_out/dsss_thf_amplitude_5678}
\hspace*{-1cm}\includegraphics[width=1.2\textwidth]{../lab-windows/fig_out/dsss_thf_amplitude_5678}
\caption{
SER vs.\ amplitude graph similar to Figure \ref{dsss_gold_nbits_overview} with one color-coded traces for
threshold factors between $1.5$ and $10.0$. Each graph shows traces for a single DSSS symbol length.
@ -2255,7 +2257,7 @@ yield adequate threshold factors for our use case.
\begin{figure}
\centering
\includegraphics{../lab-windows/fig_out/dsss_thf_sensitivity_5678}
\hspace*{-1cm}\includegraphics[width=1.1\textwidth]{../lab-windows/fig_out/dsss_thf_sensitivity_5678}
\caption{
Graphs of amplitude at $SER=0.5$ for each symbol length as well as asymptotic SER for large amplitudes. Areas
shaded red indicate that $SER=0.5$ was not reached for any amplitude in the simulated range. The bumps in the 7
@ -2279,21 +2281,23 @@ duration like we did in Figure \ref{dsss_thf_sensitivity_all_bits} for threshold
faint optimum for very short chips with a decrease of sensitivity for long chips. This effect is due to longer chips
moving the signal band into noisier spectral regions (cf.\ Figure \ref{freq_meas_spectrum}).
\begin{figure}
\begin{FPfigure}
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=\textwidth]{../lab-windows/fig_out/chip_duration_sensitivity_5}
\hspace*{-1cm}\includegraphics[width=1.2\textwidth]{../lab-windows/fig_out/chip_duration_sensitivity_5}
\vspace*{-1cm}
\label{chip_duration_sensitivity_5}
\caption{
5 bit Gold code.
}
\end{subfigure}
\end{figure}
\begin{figure}
\ContinuedFloat
%\end{figure}
%\begin{figure}
% \ContinuedFloat
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=\textwidth]{../lab-windows/fig_out/chip_duration_sensitivity_6}
\hspace*{-1cm}\includegraphics[width=1.2\textwidth]{../lab-windows/fig_out/chip_duration_sensitivity_6}
\vspace*{-1cm}
\label{chip_duration_sensitivity_6}
\caption{
6 bit Gold code.
@ -2311,7 +2315,7 @@ moving the signal band into noisier spectral regions (cf.\ Figure \ref{freq_meas
the grid can tolerate.
}
\label{chip_duration_sensitivity}
\end{figure}
\end{FPfigure}
In the previous graphs we have used random clips of measured grid frequency noise as noise in our simulations. Comparing
between a simulation using measured noise and synthetic noise generated as we outlined in the beginning of Section
@ -2320,21 +2324,23 @@ simulated noise is an adequate approximation of reality: Our prototype demodulat
behavior between measured and simulated noise. Simulated noise causes slightly worse performance for long chips. Overall
the results for both are very close in absolute value.
\begin{figure}
\begin{FPfigure}
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=\textwidth]{../lab-windows/fig_out/chip_duration_sensitivity_cmp_meas_6}
\hspace*{-1cm}\includegraphics[width=1.2\textwidth]{../lab-windows/fig_out/chip_duration_sensitivity_cmp_meas_6}
\vspace*{-1cm}
\label{chip_duration_sensitivity_cmp_meas_6}
\caption{
Simulation using baseline frequency data from actual measurements.
}
\end{subfigure}
\end{figure}
\begin{figure}
\ContinuedFloat
%\end{figure}
%\begin{figure}
% \ContinuedFloat
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=\textwidth]{../lab-windows/fig_out/chip_duration_sensitivity_cmp_synth_6}
\hspace*{-1cm}\includegraphics[width=1.2\textwidth]{../lab-windows/fig_out/chip_duration_sensitivity_cmp_synth_6}
\vspace*{-1cm}
\label{chip_duration_sensitivity_cmp_synth_6}
\caption{
Simulation using synthetic frequency data.
@ -2347,7 +2353,7 @@ the results for both are very close in absolute value.
synthesizer, but also that real grid frequency behaves like a frequency-shaped Gaussian noise process.
}
\label{chip_duration_sensitivity_cmp}
\end{figure}
\end{FPfigure}
\section{Implementation of a demonstrator unit}
\label{sec-prototype}
@ -2366,6 +2372,64 @@ analog optoisolator.
\subsection{Selecting a smart meter for demonstration purposes}
\label{sec-easymeter}
\begin{figure}[h!]
\centering
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=0.6\textwidth]{resources/easymeter_board_composite.jpg}
\label{easymeter_display_board_composite}
\caption{
\footnotesize
Optical composite image of the display and data logging board in the top of the case. The six pins at the
top are the SPI chip-on-glass segment LCD. Of the eight pads on the left six are unused and two carry the
auxiliary power supply from the measurement board below. The bottom right section contains the
\si{\kilo\watt\hour} impulse LED and the angled IR communication LED. The flying wires
connect to the 14-pin JTAG and serial debug header.
}
\end{subfigure}
\begin{subfigure}{\textwidth}
\vspace{1cm}
\centering
\includegraphics[width=0.8\textwidth]{resources/easymeter_baseboard_composite.jpg}
\label{easymeter_measurement_board_composite}
\caption{
\footnotesize
Composite microfocus x-ray image of the potted measurement module in the bottom of the case. The ovals on
the top left and right are power supply and data jumper connections for external modules such as SMGW
interfaces. The bright parts at the bottom are the massive screw terminals with integrated current shunts.
The circuitry right of the three independent measurement channels is the power supply circuit for the
display board.
}
\end{subfigure}
\caption{
Composite images of the circuit boards inside the EasyMeter Q3DA1002 smart electricity meter used in our
demonstration.
}
\label{easymeter_composites}
\end{figure}
\begin{figure}[h!]
\centering
\begin{subfigure}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{resources/easymeter_baseboard_channel.jpg}
\label{easymeter_channel_xray}
\caption{Microfocus x-ray of one channel's data acquisition circuit.}
\end{subfigure}\hspace*{5mm}
\begin{subfigure}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{resources/easymeter_baseboard_powersupply.jpg}
\label{easymeter_powersupply_xray}
\caption{Microfocus x-ray of the auxiliary power supply.}
\end{subfigure}
\caption{
Microfocus x-rays of major sections of the EasyMeter Q3DA1002 measurement board.
}
\label{easymeter_detail_xrays}
\end{figure}
For our demonstrator to make sense we wanted to select a realistic reset target. In Germany where this thesis was
written a standards-compliant setup would consist of a comparatively feature-limited smart meter and a smart meter
gateway (SMGW) containing all of the complex bidirectional protocol logic such as wireless or landline IP connectivity.
@ -2414,64 +2478,6 @@ an example, the Honeywell REX2 uses a Maxim Integrated \texttt{71M6541} main app
Texas Instruments \texttt{CC1000} series radio transceiver and is advertised to support both over-the-air firmware
upgrade and a remotely accessible disconnect switch.
\begin{figure}
\centering
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=0.6\textwidth]{resources/easymeter_board_composite.jpg}
\label{easymeter_display_board_composite}
\caption{
\footnotesize
Optical composite image of the display and data logging board in the top of the case. The six pins at the
top are the SPI chip-on-glass segment LCD. Of the eight pads on the left six are unused and two carry the
auxiliary power supply from the measurement board below. The bottom right section contains the
\si{\kilo\watt\hour} impulse LED and the angled IR communication LED. The flying wires
connect to the 14-pin JTAG and serial debug header.
}
\end{subfigure}
\begin{subfigure}{\textwidth}
\vspace{1cm}
\centering
\includegraphics[width=0.8\textwidth]{resources/easymeter_baseboard_composite.jpg}
\label{easymeter_measurement_board_composite}
\caption{
\footnotesize
Composite microfocus x-ray image of the potted measurement module in the bottom of the case. The ovals on
the top left and right are power supply and data jumper connections for external modules such as SMGW
interfaces. The bright parts at the bottom are the massive screw terminals with integrated current shunts.
The circuitry right of the three independent measurement channels is the power supply circuit for the
display board.
}
\end{subfigure}
\caption{
Composite images of the circuit boards inside the EasyMeter Q3DA1002 smart electricity meter used in our
demonstration.
}
\label{easymeter_composites}
\end{figure}
\begin{figure}
\centering
\begin{subfigure}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{resources/easymeter_baseboard_channel.jpg}
\label{easymeter_channel_xray}
\caption{Microfocus x-ray of one channel's data acquisition circuit.}
\end{subfigure}\hspace*{5mm}
\begin{subfigure}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{resources/easymeter_baseboard_powersupply.jpg}
\label{easymeter_powersupply_xray}
\caption{Microfocus x-ray of the auxiliary power supply.}
\end{subfigure}
\caption{
Microfocus x-rays of major sections of the EasyMeter Q3DA1002 measurement board.
}
\label{easymeter_detail_xrays}
\end{figure}
\subsection{Firmware implementation}
\label{sec-demo-fw-impl}
@ -2555,12 +2561,14 @@ tendency towards incorrect decodings at even very large amplitudes.
\centering
\begin{subfigure}{\textwidth}
\centering
\includegraphics[trim={0 4cm 0 0},clip]{../lab-windows/fig_out/dsss_thf_amplitude_56_jupyter_impl}
\hspace*{-1cm}
\includegraphics[trim={0 4cm 0 0},clip,width=1.2\textwidth]{../lab-windows/fig_out/dsss_thf_amplitude_56_jupyter_impl}
\caption{Python prototype.}
\end{subfigure}
\begin{subfigure}{\textwidth}
\centering
\includegraphics[trim={0 4cm 0 0},clip]{../lab-windows/fig_out/dsss_thf_amplitude_56_fw_impl}
\hspace*{-1cm}
\includegraphics[trim={0 4cm 0 0},clip,width=1.2\textwidth]{../lab-windows/fig_out/dsss_thf_amplitude_56_fw_impl}
\caption{Embedded C implementation.}
\end{subfigure}
@ -2762,6 +2770,7 @@ public repository listed on the second page of this document.
\chapter{Demonstrator firmware symbol size map}
\emph{Please find this appendix enclosed in the pouch on the inside of the back cover.}
\label{symbol_size_chart}
\includepdf[fitpaper]{resources/safetyreset-symbol-sizes.pdf}