From ea7b2732bb26acc157db63fc5e8a1ffba765eb98 Mon Sep 17 00:00:00 2001 From: Markus Bullmann Date: Tue, 10 Mar 2020 11:09:58 +0100 Subject: [PATCH] Added plots as pgfplots --- tex/bare_conf.tex | 10 +++++++++ tex/chapters/8_experiments.tex | 23 ++++++++++--------- tex/plots/DistErrorCdf.pgf | 33 ++++++++++++++++++++++++++++ tex/plots/MeanDistIntel.pgf | 29 ++++++++++++++++++++++++ tex/plots/MeanDistPixel.pgf | 29 ++++++++++++++++++++++++ tex/plots/data/1AC8260IntPixel2.csv | 3 +++ tex/plots/data/2AC8260IntPixel3.csv | 3 +++ tex/plots/data/3AC82602dBiPixel2.csv | 3 +++ tex/plots/data/4AC82602dBiPixel3.csv | 3 +++ tex/plots/data/5AC9462IntPixel2.csv | 3 +++ tex/plots/data/6AC9462IntPixel3.csv | 3 +++ tex/plots/data/7AC94622dBiPixel2.csv | 3 +++ tex/plots/data/8AC94622dBiPixel3.csv | 3 +++ tex/plots/data/intelmeanrange.csv | 3 +++ tex/plots/data/pixelmeanrange.csv | 3 +++ 15 files changed, 144 insertions(+), 10 deletions(-) create mode 100644 tex/plots/DistErrorCdf.pgf create mode 100644 tex/plots/MeanDistIntel.pgf create mode 100644 tex/plots/MeanDistPixel.pgf create mode 100644 tex/plots/data/1AC8260IntPixel2.csv create mode 100644 tex/plots/data/2AC8260IntPixel3.csv create mode 100644 tex/plots/data/3AC82602dBiPixel2.csv create mode 100644 tex/plots/data/4AC82602dBiPixel3.csv create mode 100644 tex/plots/data/5AC9462IntPixel2.csv create mode 100644 tex/plots/data/6AC9462IntPixel3.csv create mode 100644 tex/plots/data/7AC94622dBiPixel2.csv create mode 100644 tex/plots/data/8AC94622dBiPixel3.csv create mode 100644 tex/plots/data/intelmeanrange.csv create mode 100644 tex/plots/data/pixelmeanrange.csv diff --git a/tex/bare_conf.tex b/tex/bare_conf.tex index 1752b42..78fda97 100644 --- a/tex/bare_conf.tex +++ b/tex/bare_conf.tex @@ -32,6 +32,16 @@ \usepackage{subfig} \usepackage{hyperref} \usepackage{booktabs} +\usepackage{pgfplots} +\usepackage{tikzscale} + +% pgfplot defaults +\pgfplotsset{compat=newest} +\pgfplotsset{legend cell align=left} +\pgfplotsset{major grid style=solid} +\pgfplotsset{minor grid style=dashed} +\pgfplotsset{every axis plot/.append style={line width=1pt}} + %\updates{yes} % If there is an update available, un-comment this line diff --git a/tex/chapters/8_experiments.tex b/tex/chapters/8_experiments.tex index 8091b11..7d99e58 100644 --- a/tex/chapters/8_experiments.tex +++ b/tex/chapters/8_experiments.tex @@ -48,7 +48,7 @@ Due to the rarity of this problem we decided to repeat these faulty experiment r The access points are Intel NUCs running a patched Linux to enable FTM support. In total we're using eight APs based on Intel WiFi cards. Four of them are based on Intel Dualband-Wireless-AC~8260 cards configured as described by \etal{Ibrahim} \cite{ibrahim2018verification}. -The remaining four are based on Intel Wireless-AC~9462 modules and run a recent Linux kernel where the iwlwifi driver and hostapd are already prepared to support FTM. +The remaining four are based on Intel Wireless-AC~9462 modules and run a recent Linux kernel 5.3.7 where the iwlwifi driver and hostapd are already prepared to support FTM. However, the driver still requires small manual changes, as a global boolean flag needs to be set to activate the FTM related code. In addition, the firmware of the card returns that the chip is not calibrated for FTM. As a consequence the driver disables FTM responder functionality. @@ -172,20 +172,23 @@ Both the \pixelBoth produce similar results, but the \pixelOld tends to underest Opposed to \etal{Ibrahim} \cite{ibrahim2018verification} findings no single constant offset which significantly improves the measurements across all device combinations could be found in our tests. However, the overall error of the device combinations is reasonable small and its distribution is mostly Gaussian-like, which justifies the basic applicability of the technique and devices for indoor positioning. -\begin{figure}[ht] -\begin{minipage}{.5\textwidth} +\begin{figure}[ht] \centering -\subfloat[]{\label{fig:DistMeasMeanNucPixel:a}\includegraphics[width=0.8\textwidth]{DistMeasMeanPerPixel.png}} -\end{minipage}% -\begin{minipage}{.5\textwidth} +\begin{minipage}{.45\textwidth} \centering -\subfloat[]{\label{fig:DistMeasMeanNucPixel:b}\includegraphics[width=0.8\textwidth]{DistMeasMeanPerNuc.png}} +\subfloat[]{\label{fig:DistMeasMeanNucPixel:a}\includegraphics[width=\textwidth]{plots/MeanDistPixel.pgf}} +\end{minipage}\hspace{.09\textwidth} +\begin{minipage}{.45\textwidth} +\centering +\subfloat[]{\label{fig:DistMeasMeanNucPixel:b}\includegraphics[width=\textwidth]{plots/MeanDistIntel.pgf}} \end{minipage}\par\medskip \centering -\subfloat[CDF of error]{\label{fig:DistMeasMeanNucPixel:c}\includegraphics[width=\textwidth]{DistMeasCDF.png}} - -\caption{my fig} +\subfloat[]{\label{fig:DistMeasMeanNucPixel:c}% +\input{plots/DistErrorCdf.pgf}% +%\includegraphics[width=\textwidth,axisratio=2.3]{plots/DistErrorCdf.pgf}% +} +\caption{\ref{fig:DistMeasMeanNucPixel:a}, \ref{fig:DistMeasMeanNucPixel:b} show the mean distance per smartphone and per access point, respectively. \ref{fig:DistMeasMeanNucPixel:c} is the CDF of the measurement error for each device combination.} \label{fig:DistMeasMeanNucPixel} \end{figure} diff --git a/tex/plots/DistErrorCdf.pgf b/tex/plots/DistErrorCdf.pgf new file mode 100644 index 0000000..6b1713b --- /dev/null +++ b/tex/plots/DistErrorCdf.pgf @@ -0,0 +1,33 @@ +\begin{tikzpicture} +\definecolor{cdfPlot1}{rgb}{1,0,0} +\definecolor{cdfPlot2}{rgb}{1,0.25,0} +\definecolor{cdfPlot3}{rgb}{1,0.5,0} +\definecolor{cdfPlot4}{rgb}{1,0.75,0} +\definecolor{cdfPlot5}{rgb}{0,0,1} +\definecolor{cdfPlot6}{rgb}{0,0.333,0.833} +\definecolor{cdfPlot7}{rgb}{0,0.666,0.666} +\definecolor{cdfPlot8}{rgb}{0,1,0.5} +\begin{axis}[ + scale only axis, + width=0.8\textwidth, + height=0.4\textwidth, + xlabel ={Distance error in \si{\meter}}, + ylabel ={CDF}, + legend pos=south east, + xmajorgrids=true, + %xminorgrids=true, + ymajorgrids=true, + %yminorgrids=true, + enlarge x limits=false, + enlarge y limits=false, +] +\addplot [color=cdfPlot1, dashed] table[x=X,y=Y,col sep=comma]{plots/data/1AC8260IntPixel2.csv}; \addlegendentry{AC 8260 int Pixel 2} +\addplot [color=cdfPlot2, solid ] table[x=X,y=Y,col sep=comma]{plots/data/2AC8260IntPixel3.csv}; \addlegendentry{AC 8260 int Pixel 3} +\addplot [color=cdfPlot3, dashed] table[x=X,y=Y,col sep=comma]{plots/data/3AC82602dBiPixel2.csv}; \addlegendentry{AC 8260 2dBi Pixel 2} +\addplot [color=cdfPlot4, solid ] table[x=X,y=Y,col sep=comma]{plots/data/4AC82602dBiPixel3.csv}; \addlegendentry{AC 8260 2dBi Pixel 3} +\addplot [color=cdfPlot5, dashed] table[x=X,y=Y,col sep=comma]{plots/data/5AC9462IntPixel2.csv}; \addlegendentry{AC 9462 int Pixel 2} +\addplot [color=cdfPlot6, solid ] table[x=X,y=Y,col sep=comma]{plots/data/6AC9462IntPixel3.csv}; \addlegendentry{AC 9462 int Pixel 3} +\addplot [color=cdfPlot7, dashed] table[x=X,y=Y,col sep=comma]{plots/data/7AC94622dBiPixel2.csv}; \addlegendentry{AC 9462 2dBi Pixel 2} +\addplot [color=cdfPlot8, solid ] table[x=X,y=Y,col sep=comma]{plots/data/8AC94622dBiPixel3.csv}; \addlegendentry{AC 9462 2dBi Pixel 3} +\end{axis} +\end{tikzpicture} \ No newline at end of file diff --git a/tex/plots/MeanDistIntel.pgf b/tex/plots/MeanDistIntel.pgf new file mode 100644 index 0000000..837e870 --- /dev/null +++ b/tex/plots/MeanDistIntel.pgf @@ -0,0 +1,29 @@ +\begin{tikzpicture} +\begin{axis}[ + xlabel ={True distance in \si{\meter}}, + ylabel ={Mean distance in \si{\meter}}, + legend pos=north west, + xmajorgrids=true, + %xminorgrids=true, + ymajorgrids=true, + %yminorgrids=true, + minor tick num=4, + xmin=0, + ymin=0, + xtick={0,4,8,12,16,20}, + ytick={0,4,8,12,16,20,24} +] +% Groundtruth +\addplot [color=black] % + table[x=GT,y=GT,col sep=comma]{plots/data/intelmeanrange.csv}; + \addlegendentry{Groundtruth} +% Pixel 2 XL +\addplot [color=red, mark=x] % + table[x=GT,y=N6Mean,col sep=comma]{plots/data/intelmeanrange.csv}; + \addlegendentry{\intelOld} +% Pixel 3a +\addplot [color=blue, mark=x] % + table[x=GT,y=N7Mean,col sep=comma]{plots/data/intelmeanrange.csv}; + \addlegendentry{\intelNew} +\end{axis} +\end{tikzpicture} \ No newline at end of file diff --git a/tex/plots/MeanDistPixel.pgf b/tex/plots/MeanDistPixel.pgf new file mode 100644 index 0000000..369126e --- /dev/null +++ b/tex/plots/MeanDistPixel.pgf @@ -0,0 +1,29 @@ +\begin{tikzpicture} +\begin{axis}[ + xlabel ={True distance in \si{\meter}}, + ylabel ={Mean distance in \si{\meter}}, + legend pos=north west, + xmajorgrids=true, + %xminorgrids=true, + ymajorgrids=true, + %yminorgrids=true, + minor tick num=4, + xmin=0, + ymin=0, + xtick={0,4,8,12,16,20}, + ytick={0,4,8,12,16,20,24} +] +% Groundtruth +\addplot [color=black] % + table[x=GT,y=GT,col sep=comma]{plots/data/pixelmeanrange.csv}; + \addlegendentry{Groundtruth} +% Pixel 2 XL +\addplot [color=red, mark=x] % + table[x=GT,y=P2Mean,col sep=comma]{plots/data/pixelmeanrange.csv}; + \addlegendentry{\pixelOld} +% Pixel 3a +\addplot [color=blue, mark=x] % + table[x=GT,y=P3Mean,col sep=comma]{plots/data/pixelmeanrange.csv}; + \addlegendentry{\pixelNew} +\end{axis} +\end{tikzpicture} \ No newline at end of file diff --git a/tex/plots/data/1AC8260IntPixel2.csv b/tex/plots/data/1AC8260IntPixel2.csv new file mode 100644 index 0000000..9a17862 --- /dev/null +++ b/tex/plots/data/1AC8260IntPixel2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c65e129a03edaf8044d8551c5c852361f78faa7c19cc18f6333a174bceeb9349 +size 34021 diff --git a/tex/plots/data/2AC8260IntPixel3.csv b/tex/plots/data/2AC8260IntPixel3.csv new file mode 100644 index 0000000..9a7b54a --- /dev/null +++ b/tex/plots/data/2AC8260IntPixel3.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9bfb3ee50b41365c69b462450333c7a36156fc711ef5ef0838482b86081bf47 +size 34460 diff --git a/tex/plots/data/3AC82602dBiPixel2.csv b/tex/plots/data/3AC82602dBiPixel2.csv new file mode 100644 index 0000000..0686271 --- /dev/null +++ b/tex/plots/data/3AC82602dBiPixel2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a7b9efec12b31716343e3350c4b62cc6be10cfca3f4e9db8c94db5f0e0bb5be +size 34501 diff --git a/tex/plots/data/4AC82602dBiPixel3.csv b/tex/plots/data/4AC82602dBiPixel3.csv new file mode 100644 index 0000000..42fda71 --- /dev/null +++ b/tex/plots/data/4AC82602dBiPixel3.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6abc3acac217037ea93b981717da1fb7c1d41cdab34b5e5e98c151a558c52d8b +size 35077 diff --git a/tex/plots/data/5AC9462IntPixel2.csv b/tex/plots/data/5AC9462IntPixel2.csv new file mode 100644 index 0000000..34344a8 --- /dev/null +++ b/tex/plots/data/5AC9462IntPixel2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3de226c6f4218f04b250f9e4bb49bd8b3cbc283ee8025942d807914f24c8662f +size 31482 diff --git a/tex/plots/data/6AC9462IntPixel3.csv b/tex/plots/data/6AC9462IntPixel3.csv new file mode 100644 index 0000000..b4fcfde --- /dev/null +++ b/tex/plots/data/6AC9462IntPixel3.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0eae7e5a3215256db852cabc3ff07d498753a267ff6bed2ef53d4f0745f5a25c +size 30563 diff --git a/tex/plots/data/7AC94622dBiPixel2.csv b/tex/plots/data/7AC94622dBiPixel2.csv new file mode 100644 index 0000000..0a79cd3 --- /dev/null +++ b/tex/plots/data/7AC94622dBiPixel2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b40008721aeccf3e4f5fe9f2694c869f4411dc3803d78621b15b15cda38d94b +size 34456 diff --git a/tex/plots/data/8AC94622dBiPixel3.csv b/tex/plots/data/8AC94622dBiPixel3.csv new file mode 100644 index 0000000..8361caa --- /dev/null +++ b/tex/plots/data/8AC94622dBiPixel3.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf868d731d521a01908d093a00dc3e014b66e586452471a8f4e5ef45eb79413e +size 31605 diff --git a/tex/plots/data/intelmeanrange.csv b/tex/plots/data/intelmeanrange.csv new file mode 100644 index 0000000..7ca8f15 --- /dev/null +++ b/tex/plots/data/intelmeanrange.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4918510c648ef4574ef7dea3ea54eeff67e88a934f6e48cf4048eadbedec3b1b +size 1107 diff --git a/tex/plots/data/pixelmeanrange.csv b/tex/plots/data/pixelmeanrange.csv new file mode 100644 index 0000000..0ba799c --- /dev/null +++ b/tex/plots/data/pixelmeanrange.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3882a2ec2f18655408b2a1218b60146af911eb59e0b5a713ba33c02b9d0627dc +size 1118