Compare commits

14 Commits

11 changed files with 198 additions and 342 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "lib/latex-common"]
path = lib/latex-common
url = ssh://git@git.mercurial-manifold.eu:2224/an.tsouchlos/latex-common.git

View File

@@ -1,2 +1,3 @@
$pdflatex="pdflatex -shell-escape -interaction=nonstopmode -synctex=1 %O %S";
$out_dir = 'build';
$pdf_mode = 1;

11
Makefile Normal file
View File

@@ -0,0 +1,11 @@
all: build_folder letter.pdf
build_folder:
mkdir -p build/build
letter.pdf: letter.tex
latexmk -pdf letter.tex
clean:
rm -rf build

View File

@@ -1,2 +1,28 @@
# ba-letter
Repository containing latex source for the Bachelor's Thesis paper.
After cloning, make sure to initialize the submodules containing the dependencies:
```bash
$ git submodule update --init
```
## Build
### Build on host
```bash
$ make
```
### Build using docker
1. Build docker image
```bash
$ docker build -f dockerfiles/Dockerfile.alpine . -t ba-letter
```
2. Build examples
```bash
$ docker run --rm -v $PWD:$PWD -w $PWD -u `id -u`:`id -g` ba-letter make
```

View File

@@ -1,260 +0,0 @@
% Author: Andreas Tsouchlos
%
% Collection of useful commands and definitions
%
% ||====================================================================||
% || WARNING ||
% ||====================================================================||
% || ||
% || The following packages have to be included before using this file: ||
% || amsmath ||
% || pgfplots ||
% || caption ||
% || listings ||
% ||====================================================================||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Math Symbols %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareMathOperator*{\argmin}{\arg\!\min}
\DeclareMathOperator*{\argmax}{\arg\!\max}
\DeclareMathOperator\sign{sign}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Graphics & Plotting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Filters for Pgfplots
% Source: https://tex.stackexchange.com/a/58563 (modified)
%
\pgfplotsset{
discard if/.style 2 args={
x filter/.append code={
\edef\tempa{\thisrow{#1}}
\edef\tempb{#2}
\ifx\tempa\tempb
\def\pgfmathresult{inf}
\fi
}
},
discard if not/.style 2 args={
x filter/.append code={
\edef\tempa{\thisrow{#1}}
\edef\tempb{#2}
\ifx\tempa\tempb
\else
\def\pgfmathresult{inf}
\fi
}
},
discard if gt/.style 2 args={
x filter/.append code={
\edef\tempa{\thisrow{#1}}
\edef\tempb{#2}
\ifdim\tempa pt > \tempb pt
\def\pgfmathresult{inf}
\fi
}
},
discard if lt/.style 2 args={
x filter/.append code={
\edef\tempa{\thisrow{#1}}
\edef\tempb{#2}
\ifdim\tempa pt < \tempb pt
\def\pgfmathresult{inf}
\fi
}
}
}
%
% Styles
%
\pgfplotsset{
fancy marks/.style={
% TODO
}
}
%
% Colors
%
\definecolor{kit-green100}{rgb}{0,.59,.51}
\definecolor{kit-green70}{rgb}{.3,.71,.65}
\definecolor{kit-green50}{rgb}{.50,.79,.75}
\definecolor{kit-green30}{rgb}{.69,.87,.85}
\definecolor{kit-green15}{rgb}{.85,.93,.93}
\definecolor{KITgreen}{rgb}{0,.59,.51}
\definecolor{KITpalegreen}{RGB}{130,190,60}
\colorlet{kit-maigreen100}{KITpalegreen}
\colorlet{kit-maigreen70}{KITpalegreen!70}
\colorlet{kit-maigreen50}{KITpalegreen!50}
\colorlet{kit-maigreen30}{KITpalegreen!30}
\colorlet{kit-maigreen15}{KITpalegreen!15}
\definecolor{KITblue}{rgb}{.27,.39,.66}
\definecolor{kit-blue100}{rgb}{.27,.39,.67}
\definecolor{kit-blue70}{rgb}{.49,.57,.76}
\definecolor{kit-blue50}{rgb}{.64,.69,.83}
\definecolor{kit-blue30}{rgb}{.78,.82,.9}
\definecolor{kit-blue15}{rgb}{.89,.91,.95}
\definecolor{KITyellow}{rgb}{.98,.89,0}
\definecolor{kit-yellow100}{cmyk}{0,.05,1,0}
\definecolor{kit-yellow70}{cmyk}{0,.035,.7,0}
\definecolor{kit-yellow50}{cmyk}{0,.025,.5,0}
\definecolor{kit-yellow30}{cmyk}{0,.015,.3,0}
\definecolor{kit-yellow15}{cmyk}{0,.0075,.15,0}
\definecolor{KITorange}{rgb}{.87,.60,.10}
\definecolor{kit-orange100}{cmyk}{0,.45,1,0}
\definecolor{kit-orange70}{cmyk}{0,.315,.7,0}
\definecolor{kit-orange50}{cmyk}{0,.225,.5,0}
\definecolor{kit-orange30}{cmyk}{0,.135,.3,0}
\definecolor{kit-orange15}{cmyk}{0,.0675,.15,0}
\definecolor{KITred}{rgb}{.63,.13,.13}
\definecolor{kit-red100}{cmyk}{.25,1,1,0}
\definecolor{kit-red70}{cmyk}{.175,.7,.7,0}
\definecolor{kit-red50}{cmyk}{.125,.5,.5,0}
\definecolor{kit-red30}{cmyk}{.075,.3,.3,0}
\definecolor{kit-red15}{cmyk}{.0375,.15,.15,0}
\definecolor{KITpurple}{RGB}{160,0,120}
\colorlet{kit-purple100}{KITpurple}
\colorlet{kit-purple70}{KITpurple!70}
\colorlet{kit-purple50}{KITpurple!50}
\colorlet{kit-purple30}{KITpurple!30}
\colorlet{kit-purple15}{KITpurple!15}
\definecolor{KITcyanblue}{RGB}{80,170,230}
\colorlet{kit-cyanblue100}{KITcyanblue}
\colorlet{kit-cyanblue70}{KITcyanblue!70}
\colorlet{kit-cyanblue50}{KITcyanblue!50}
\colorlet{kit-cyanblue30}{KITcyanblue!30}
\colorlet{kit-cyanblue15}{KITcyanblue!15}
%
% Color Schemes
%
% Define colormaps
\pgfplotsset{
colormap={mako}{
rgb=(0.18195582, 0.11955283, 0.23136943)
rgb=(0.25307401, 0.23772973, 0.48316271)
rgb=(0.21607792, 0.39736958, 0.61948028)
rgb=(0.20344718, 0.56074869, 0.65649508)
rgb=(0.25187832, 0.71827158, 0.67872193)
rgb=(0.54578602, 0.8544913, 0.69848331)
},
colormap={rocket}{
rgb=(0.20973515, 0.09747934, 0.24238489)
rgb=(0.43860848, 0.12177004, 0.34119475)
rgb=(0.67824099, 0.09192342, 0.3504148)
rgb=(0.8833417, 0.19830556, 0.26014181)
rgb=(0.95381595, 0.46373781, 0.31769923)
rgb=(0.96516917, 0.70776351, 0.5606593)
},
colormap={cividis}{
rgb=(0.130669, 0.231458, 0.43284)
rgb=(0.298421, 0.332247, 0.423973)
rgb=(0.42512, 0.431334, 0.447692)
rgb=(0.555393, 0.537807, 0.471147)
rgb=(0.695985, 0.648334, 0.440072)
rgb=(0.849223, 0.771947, 0.359729)
},
colormap={cel}{
color=(KITred!90!black);
color=(kit-blue100);
color=(kit-green70);
color=(kit-yellow70!80!kit-orange70);
},
}
% Define cycle lists
\pgfplotscreateplotcyclelist{mako}{%
[samples of colormap={4} of mako]%
}
\pgfplotscreateplotcyclelist{rocket}{%
[samples of colormap={4} of rocket]%
}
\pgfplotscreateplotcyclelist{cividis}{%
[samples of colormap={4} of cividis]%
}
\pgfplotscreateplotcyclelist{viridis}{%
[samples of colormap={4} of viridis]%
}
\pgfplotscreateplotcyclelist{cel}{%
[samples of colormap={4} of cel]%
}
% Define individual colors
\makeatletter
\def\extractcolormapcolor#1#2{%
\expandafter\pgfplotscolormapaccess\expandafter[\pgfplotspointmetatransformedrange]%
[1.0]%
{#2}%
{\pgfkeysvalueof{/pgfplots/colormap name}}%
\def\pgfplots@loc@TMPb{\pgfutil@definecolor{#1}{\csname pgfpl@cm@\pgfkeysvalueof{/pgfplots/colormap name}@colspace\endcsname}}%
\expandafter\pgfplots@loc@TMPb\expandafter{\pgfmathresult}%
}%
\def\getcolorbyvalue#1{
\csname pgfpl@cm@\pgfkeysvalueof{/pgfplots/colormap name}@colspace\endcsname
}
\makeatother
\def\setschemecolors{
\extractcolormapcolor{scol0}{0}
\extractcolormapcolor{scol1}{333}
\extractcolormapcolor{scol2}{666}
\extractcolormapcolor{scol3}{1000}
}
% Define color schemes
\pgfplotsset{
/pgfplots/colorscheme/mako/.style={
colormap name={mako},
cycle list name={mako},
/utils/exec={\setschemecolors},
},
/pgfplots/colorscheme/rocket/.style={
colormap name={rocket},
cycle list name={rocket},
/utils/exec={\setschemecolors},
},
/pgfplots/colorscheme/cividis/.style={
colormap name={cividis},
cycle list name={cividis},
/utils/exec={\setschemecolors},
},
/pgfplots/colorscheme/viridis/.style={
colormap name={viridis},
cycle list name={viridis},
/utils/exec={\setschemecolors},
},
/pgfplots/colorscheme/cel/.style={
colormap name={cel},
cycle list name={cel},
/utils/exec={\setschemecolors},
},
}

View File

@@ -0,0 +1,7 @@
FROM alpine:3.19
RUN apk update && apk upgrade
RUN apk add make texlive texmf-dist-pictures
RUN apk add texmf-dist-publishers
RUN apk add texmf-dist-science
RUN apk add texmf-dist-fontsextra

View File

@@ -0,0 +1,9 @@
FROM archlinux:latest
RUN pacman-key --init
RUN pacman-key --populate archlinux
RUN pacman -Sy archlinux-keyring --noconfirm && pacman -Su --noconfirm
RUN pacman -Syu --noconfirm
RUN pacman -S make perl texlive texlive-binextra texlive-pictures --noconfirm
RUN pacman -S texlive-publishers texlive-mathscience texlive-fontsextra --noconfirm

View File

@@ -0,0 +1,7 @@
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y && apt upgrade -y
RUN apt install make texlive latexmk texlive-pictures -y
RUN apt install make texlive-publishers texlive-science texlive-fonts-extra -y

View File

@@ -1,32 +1,27 @@
\documentclass[journal]{IEEEtran}
\usepackage{amsmath,amsfonts}
\usepackage{float}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{array}
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\usepackage{textcomp}
\usepackage{stfloats}
\usepackage{url}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{cite}
\usepackage[dvipsnames]{xcolor}
\usepackage{float}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{spy, arrows.meta,arrows}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{colormaps}
\usepackage{listings}
\usepackage{lipsum}
\usepackage{dsfont}
\usepackage{ulem}
\usepackage{siunitx}
\usepackage{dsfont}
\usepackage{tikz}
\usetikzlibrary{spy, arrows.meta,arrows}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\hyphenation{op-tical net-works semi-conduc-tor IEEE-Xplore}
\newif\ifoverleaf
%\overleaftrue
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Inputs & Global Options
@@ -34,10 +29,23 @@
%
\input{common.tex}
\ifoverleaf
\input{common.tex}
\else
\usetikzlibrary{external}
\tikzexternalize[prefix=build/]
\input{lib/latex-common/common.tex}
\fi
\pgfplotsset{colorscheme/cel}
% TODO
\pgfplotsset{fancy marks/.style={}}
\newcommand{\figwidth}{\columnwidth}
\newcommand{\figheight}{0.75\columnwidth}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -257,8 +265,8 @@ function \cite{proximal_paper}
The objective function is minimized using the proximal gradient method, which
amounts to iteratively performing two gradient-descent steps \cite{proximal_paper}
with the given objective function and considering AWGN channels.
To this end, two helper variables, $\boldsymbol{r}$ and $\boldsymbol{s}$, are introduced,
describing the result of each of the two steps:
To this end, two helper variables, $\boldsymbol{r}$ and $\boldsymbol{s}$, are
introduced, describing the result of each of the two steps:
%
\begin{alignat}{3}
\boldsymbol{r} &\leftarrow \boldsymbol{s}
@@ -277,7 +285,8 @@ stages of the decoding process.
As the gradient of the code-constraint polynomial can attain very large values
in some cases, an additional step is introduced to ensure numerical stability:
every current estimate $\boldsymbol{s}$ is projected onto $\left[-\eta, \eta\right]^n$ by a projection
every current estimate $\boldsymbol{s}$ is projected onto
$\left[-\eta, \eta\right]^n$ by a projection
$\Pi_\eta : \mathbb{R}^n \rightarrow \left[-\eta, \eta\right]^n$, where $\eta$
is a positive constant slightly larger than one, e.g., $\eta = 1.5$.
The resulting decoding process as described in \cite{proximal_paper} is
@@ -329,52 +338,54 @@ explanation for this effect might be that during the decoding process convergenc
on the final codeword is often not achieved, although the estimate is moving in
the right general direction.
This would suggest that most frame errors occur due to only a few incorrectly
decoded bits.
\pgfplotsset{
FERPlot/.style={
line width=1pt,
densely dashed,
mark=triangle,
fancy marks
},
BERPlot/.style={
line width=1pt,
mark=*,
fancy marks,
},
DFRPlot/.style={
only marks,
mark=square*,
fancy marks,
}}
\begin{figure}[h]
decoded bits.%
%
\begin{figure}[ht]
\centering
\pgfplotsset{
FERPlot/.style={
line width=1pt,
densely dashed,
mark=triangle,
fancy marks
},
BERPlot/.style={
line width=1pt,
mark=*,
fancy marks,
},
DFRPlot/.style={
only marks,
mark=square*,
fancy marks,
}}
\begin{tikzpicture}
\begin{axis}[
grid=both,
xlabel={$E_\text{b} / N_0$ (dB)}, ylabel={},
ymode=log,
ymax=1.5, ymin=2e-7,
width=0.45\textwidth,
height=0.3375\textwidth,
xmin=1, xmax=8,
ymax=1, ymin=1e-6,
% ytick={1e-0, 1e-2, 1e-4, 1e-6},
width=\figwidth,
height=\figheight,
legend pos = south west,
]
\addplot+[FERPlot]
\addplot+[FERPlot, scol0]
table [x=SNR, y=FER, col sep=comma,
discard if not={gamma}{0.05},
discard if gt={SNR}{9}]
{res/proximal_ber_fer_dfr_20433484.csv};
\addlegendentry{FER}
\addplot+[DFRPlot]
\addplot+[DFRPlot, scol2]
table [x=SNR, y=DFR, col sep=comma,
discard if not={gamma}{0.05},
discard if gt={SNR}{9}]
{res/proximal_ber_fer_dfr_20433484.csv};
\addlegendentry{DFR}
\addplot+[BERPlot]
\addplot+[BERPlot, scol1]
table [x=SNR, y=BER, col sep=comma,
discard if not={gamma}{0.05},
discard if gt={SNR}{7.5}]
@@ -420,8 +431,8 @@ optimization process.%
xlabel={$\tilde{x}_1$},
ylabel={$\tilde{x}_2$},
y label style={at={(axis description cs:-0.06,0.5)},anchor=south},
width=0.45\textwidth,
height=0.3375\textwidth,
width=\figwidth,
height=\figheight,
grid=major, grid style={dotted},
view={0}{90}]
\addplot3[point meta=\thisrow{grad_norm},
@@ -442,8 +453,8 @@ optimization process.%
table[col sep=comma] {res/2d_grad_L.csv};
\end{axis}
\begin{axis}[hide axis,
width=0.45\textwidth,
height=0.3375\textwidth,
width=\figwidth,
height=\figheight,
xmin=10, xmax=50,
ymin=0, ymax=0.4,
legend style={draw=white!15!black,
@@ -463,8 +474,8 @@ optimization process.%
\begin{tikzpicture}
\begin{axis}[xmin = -1.25, xmax=1.25,
ymin = -1.25, ymax=1.25,
width=0.45\textwidth,
height=0.3375\textwidth,
width=\figwidth,
height=\figheight,
xlabel={$\tilde{x}_1$},
ylabel={$\tilde{x}_2$},
y label style={at={(axis description cs:-0.06,0.5)},anchor=south},
@@ -488,8 +499,8 @@ optimization process.%
table[col sep=comma] {res/2d_grad_h.csv};
\end{axis}
\begin{axis}[hide axis,
width=0.45\textwidth,
height=0.3375\textwidth,
width=\figwidth,
height=\figheight,
xmin=10, xmax=50,
ymin=0, ymax=0.4,
legend style={draw=white!15!black,
@@ -517,8 +528,8 @@ Two qualities may be observed.
First, the average values of the two gradients are equal, except for their sign,
leading to the aforementioned oscillation.
Second, the gradient of the code constraint polynomial itself starts to
oscillate after a certain number of iterations.
oscillate after a certain number of iterations.%
%
\begin{figure}[ht]
\centering
@@ -526,10 +537,13 @@ oscillate after a certain number of iterations.
\begin{axis}[
grid=both,
xlabel={Iterations},
width=0.45\textwidth,
height=0.3375\textwidth,
width=\figwidth,
height=\figheight,
xtick={0, 100, ..., 400},
xticklabels={0, 50, ..., 200},
xmin=0, xmax=300,
ymin=-4, ymax=2,
ytick={-4,-3,...,2},
legend pos = south east,
]
\addplot+ [mark=none, line width=1]
@@ -565,7 +579,8 @@ oscillate after a certain number of iterations.
Considering the magnitude of oscillation of the gradient of the code constraint
polynomial, some interesting behavior may be observed.
Figure \ref{fig:p_error} shows the probability that a component of the estimate
is wrong, determined through a Monte Carlo simulation, when the components of $\boldsymbol{c}$ are ordered from smallest to largest oscillation of
is wrong, determined through a Monte Carlo simulation, when the components of
$\boldsymbol{c}$ are ordered from smallest to largest oscillation of
$\left(\nabla h\right)_i$.
The lower the magnitude of the oscillation, the higher the probability that the
@@ -582,8 +597,10 @@ the probability that a given component was decoded incorrectly.%
ylabel=$P(\hat{c}_{i'} \ne c_{i'})$,
xlabel=$i'$,
ymode=log,
width=0.45\textwidth,
height=0.3375\textwidth,
ymin=1e-9,ymax=1e-5,
xmin=0,xmax=200,
width=\figwidth,
height=\figheight,
]
\addplot+ [scol1, mark=none, line width=1]
table [col sep=comma, y=p_error]{res/p_error.csv};
@@ -651,15 +668,15 @@ generated and an ``ML-in-the-list'' step is performed.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Simulation Results \& Discussion}
Figure \ref{fig:results} shows the FER and BER resulting from applying proximal
decoding as presented in \cite{proximal_paper} and the improved algorithm
presented here when applied to a $\left( 3,6 \right)$-regular LDPC code with $n=204$ and
$k=102$ \cite[204.33.484]{mackay}.
Figure \ref{fig:results} shows the FER and BER resulting from applying
proximal decoding as presented in \cite{proximal_paper} and the improved
algorithm presented here when applied to a $\left( 3,6 \right)$-regular LDPC
code with $n=204$ and $k=102$ \cite[204.33.484]{mackay}.
The parameters chosen for the simulation are
$\gamma = 0.05, \omega=0.05, \eta=1.5, K=200$.
Again, these parameters were chosen,%
%
\begin{figure}[H]
\begin{figure}[ht]
\centering
\begin{tikzpicture}
@@ -681,13 +698,14 @@ Again, these parameters were chosen,%
grid=both,
xlabel={$E_\text{b} / N_0$ (dB)},
ymode=log,
ymax=1.5, ymin=2e-7,
width=0.45\textwidth,
height=0.3375\textwidth,
xmin=1, xmax=8,
ymax=1, ymin=1e-6,
width=\figwidth,
height=\figheight,
legend columns=2,
legend style={draw=white!15!black,
legend cell align=left,
at={(0.5,-0.5)},anchor=south}
at={(0.5,-0.44)},anchor=south}
]
\addplot+[ProxPlot, scol1]
@@ -756,15 +774,19 @@ Wadayama et al. \cite{proximal_paper} is introduced for AWGN channels.
It relies on the fact that most errors observed in proximal decoding stem
from only a few components of the estimate being wrong.
These few erroneous components can mostly be corrected by appending an
additional step to the original algorithm that is only executed if the algorithm has not converged.
additional step to the original algorithm that is only executed if the
algorithm has not converged.
A gain of up to $\sim\SI{1}{dB}$ can be observed, depending on the code,
the parameters considered, and the SNR.
While this work serves to introduce an approach to improve proximal decoding
by appending an ``ML-in-the-list'' step, the method used to detect the most
probably wrong components of the estimate is based mainly on empirical
observation and a more mathematically rigorous foundation for determining these
components could be beneficial.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Acknowledgements}
This work has received funding in part from the European Research Council
(ERC) under the European Unions Horizon 2020 research and innovation
programme (grant agreement No. 101001899) and in part from the German Federal
Ministry of Education and Research (BMBF) within the project Open6GHub
(grant agreement 16KISK010).
%

1
lib/latex-common Submodule

Submodule lib/latex-common added at bded242752

29
localSettings.yaml Normal file
View File

@@ -0,0 +1,29 @@
indentPreamble: 1
defaultIndent: ' '
maxNumberOfBackUps: 9
modifyLineBreaks:
preserveBlankLines: 1
condenseMultipleBlankLinesInto: 0
oneSentencePerLine:
manipulateSentences: 1
removeSentenceLineBreaks: 0
sentencesFollow:
par: 1
blankLine: 1
fullStop: 1
exclamationMark: 1
questionMark: 1
rightBrace: 1
commentOnPreviousLine: 1
other: 0
sentencesBeginWith:
A-Z: 1
a-z: 0
other: 0
sentencesEndWith:
basicFullStop: 0
betterFullStop: 1
exclamationMark: 1
questionMark: 1
other: '(?:\.\)(?!\h*[a-z]))|(?:(?<!(?:(?:e\.g)|(?:i\.e)|(?:etc))))\.(?!(?:[a-z]|[A-Z]|\-|\,|\.|[0-9]))'