Finalize thesis report and fix grammar mistakes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
Severin Kaderli 2023-01-15 21:51:11 +01:00
parent 77fbdd194f
commit 10bf9ebf44
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
21 changed files with 2716 additions and 211 deletions

View file

@ -1,31 +1,93 @@
\chapter{Preliminaries}
\section{Web Worker}
\label{section:webworkers}
Web Workers are a web API that allows running JavaScript code in background threads in the browser. This way you can run CPU intensive processes without stalling the main thread and locking up the UI.
\section{Magnetic Induction}
\gls{mi}, also known as magnetic flux density or simply the magnetic field, is a
physical quantity measured in Tesla \si{\tesla}. The movement of electric
charges in a conductor produces a magnetic field around the conductor. This
phenomena also happens when in a CPU \cite{magneticFluxDensity}.
There's a few limitations with Web Workers. A Web Worker doesn't have access to the \gls{dom}, to the window object and to some web APIs.
In \autoref{figure:magnetic_induction_cpu} the difference of the magnetic field
of a CPU in idle (first 10 seconds) and under 100\% load can be seen.
The main thread and Web Workers can communicate together using messages. \cite{WebWorkers}
\begin{figure}[H]
\includegraphics[width=\textwidth]{magnetic_induction_cpu.png}
\caption{Magnetic Field of a CPU}
\label{figure:magnetic_induction_cpu}
\end{figure}
\section{Hall Effect Sensor}
\label{section:hallEffectSensor}
A Hall Effect Sensor is a type of sensor to measure the strength of magnetic
fields. This type of magnetometer is found in many smartphones today
\cite{hallEffectSensor} and is generally used for compass capabilities and for
positioning \cite{smartphoneSensors}.
It utilizes the so-called hall effect to do so. The hall effect is the voltage
between two sides of a current-carrying conductor inside a magnetic field
\cite{hallEffect,hallEffect2}.
\section{Thermal Throttling}
\label{section:thermal_throttling}
CPUs utilize a lot of power when under load, and thus they get hotter. When they
get too hot, they throttle by reducing clock speeds. This process is designed to
protect the CPU from overheating \cite{thermalThrottling}.
When stress is put on the CPU, the CPU begins to throttle and the resulting CPU
loads gets dampened after a while (see \autoref{figure:throttle}).
\begin{figure}[H]
\fbox{\includegraphics[width=1\textwidth]{benchmarking/1bps_25.png}}
\caption{CPU Utilization with Thermal Throttling}
\label{figure:throttle}
\end{figure}
\section{CRC}
\label{section:crc}
\gls{crc} is a family of error detection codes designed to check if a message has been corrupted during transmission. To check if any errors ocurred during transmission, the checksum that was transmitted with the message, and the checksum that is calculated from the received message are compared, if they don't match, the message contains an error.
\gls{crc} is a family of error detection codes designed to check if a message
has been corrupted during transmission. To check if any errors ocurred during
transmission, the checksum that was transmitted with the message, and the
checksum that is calculated from the received message are compared, if they
don't match, the message contains an error.
For calculating a \gls{crc} value message, which is treated as a binary polynomial is divided by another value, to so-called generator polynomial. The remainder of this division is the checksum value. The order of the generator polynomial defines the bit-length of the resulting checksum \cite{crcGuide}.
For calculating a \gls{crc} value message, which is treated as a binary
polynomial is divided by another value, to so-called generator polynomial. The
remainder of this division is the checksum value. The order of the generator
polynomial defines the bit-length of the resulting checksum \cite{crcGuide}.
Depending on the chosen generator polynomial different groups of errors can be detected \cite{crcErrors}:
Depending on the chosen generator polynomial, different groups of errors can be
detected \cite{crcErrors}:
\begin{itemize}
\item{A single, and double bit errors can always be detected}
\item{Depending on the polynomial more bit errors can be detected inside specific message lengths}
\item{Using a n-bit generator polynomial can detect burst errors of up to n-bits in length}
\item{A generator polynomial with an even amount of terms can detect errors with an odd amount of bits}
\item{Depending on the polynomial, more bit errors can be detected inside
specific message lengths}
\item{Using an n-bit generator polynomial can detect burst errors of up to
n-bits in length}
\item{A generator polynomial with an even number of terms can detect errors
with an odd number of bits}
\end{itemize}
Because of these small variations there many different implementations of \gls{crc} algorithms in use and defined by different parties \cite{crcCatalogue}.
Because of these small variations, there are many implementations of
\gls{crc} algorithms in use and defined by different parties
\cite{crcCatalogue}.
The specific algorithm used in this thesis is the CRC-8-AUTOSAR algorithm with
the polynomial $x^{8} + x^{5} + x^{3} + + x^{2} + x + 1$ and an initial value
of $\mathtt{0xFF}$. This algorithm is created by AUTOSAR \cite{AutosarCrc} and
according to the CRC Polynomial Zoo, it can detect up to 4 single bit errors in
a message length of 119 bits \cite{CrcPolynomialZoo}. As our maximum payload
size is 128-bit, this is a fitting CRC algorithm to use.
CRC is widely used in networks for detecting transmission errors and is simple
to implement. \cite{Crc}
\section{Manchester Code}
Manchester is a simple encoding code for the transmission of binary data. The data is encoded in the transistions of the signal instead of simple high or low values. A transition from low to high indicates a 0 and a transition from high to low indicates a 1 in the original definition by G. E. Thomas, in the definition from IEEE the values of the transitions are swapped (see \autoref{figure:manchester_code}).
\label{section:manchester}
Manchester is a simple encoding code for the transmission of binary data. The
data is encoded in the transitions of the signal instead of simple high or low
values. A transition from low to high indicates a 0 and a transition from high
to low indicates a 1 in the original definition by G. E. Thomas, in the
definition from IEEE the values of the transitions are swapped
(see \autoref{figure:manchester_code}).
\begin{figure}[H]
\includegraphics[width=\textwidth]{manchester_code.png}
@ -33,10 +95,23 @@ Manchester is a simple encoding code for the transmission of binary data. The da
\label{figure:manchester_code}
\end{figure}
The advantages of manchester encoding is that there are no prolonged high or low signals and the original clock signal can be extracted from the signal, on the other side the bandwidth requirements are doubled as two bits in the signal are needed to encode one bit of the original data \cite{manchesterCode}.
The advantages of manchester encoding are that there are no prolonged high or
low signals and the original clock signal can be extracted from the signal and
doesn't need to be synchronized between the sender and receiver, on the other
side the bandwidth requirements are doubled as two bits in the signal are
needed to encode one bit of the original data \cite{manchesterCode}.
\section{Hall Effect Sensor}
\label{section:hallEffectSensor}
A Hall Effect Sensor is a type of sensor to measure the strength of magnetic fields. This type of magnetometer is found in many smartphones today \cite{hallEffectSensor} and is generally used for compass capabilities and for positioning \cite{smartphoneSensors}.
For the work in this thesis, we use the definition of Manchester Code by G.E
Thomas.
It utilizes the so-called hall effect to do so. The hall effect is the voltage between two sides of a current-carrying conductor inside a magnetic field \cite{hallEffect} \cite{hallEffect2}.
\section{Web Worker}
\label{section:webworkers}
Web Workers are a web API that allows running JavaScript code in background
threads in the browser. This way you can run CPU intensive processes without
stalling the main thread and locking up the UI.
There are a few limitations with Web Workers. A Web Worker doesn't have access
to the \gls{dom}, to the window object and to some web APIs.
The main thread and Web Workers can communicate together using messages.
\cite{WebWorkers}