%!TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article} % 12pt-article hier, aber Abschlussarbeit dann 12pt-book
\usepackage[utf8]{inputenc}   %empfohlene Zeichenkodierung UTF-8
\usepackage[T1]{fontenc}      %empfohlene Fontkodierung
\usepackage{lmodern}          %besserer Font
\usepackage{microtype}        %bessere Zeichenabstände
\usepackage[english]{babel}   %englisch
\usepackage{graphicx}
\usepackage{abstract}         %abstract einfügen
\usepackage{float}            %Bilder besser positionieren
\usepackage[sorting=none]{biblatex}
\usepackage{csquotes}
\usepackage{wrapfig}
\usepackage{siunitx}
\usepackage[nohyperlinks]{acronym}
\usepackage{amsmath,amsthm,amssymb} % richtige Mathematik
\usepackage[a4paper,margin=2.5cm]{geometry} %Seitenmaße
\usepackage{setspace}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{minted}
\usepackage{caption}
\usepackage{acronym} % Nur verwendete Abkürzungen anzeigen

\captionsetup[listing]{
    justification=raggedright,
    singlelinecheck=false
}

% --- Listings Style ---
\lstdefinestyle{pythonstyle}{
    language=Python,
    basicstyle=\ttfamily\small,
    keywordstyle=\color{blue!70!black}\bfseries,
    commentstyle=\color{gray}\itshape,
    stringstyle=\color{green!50!black},
    numbers=left,
    numberstyle=\tiny,
    stepnumber=1,
    numbersep=8pt,
    backgroundcolor=\color{black!5},
    frame=single,
    rulecolor=\color{black!30},
    breaklines=true,
    tabsize=4,
    showstringspaces=false
}
\lstdefinestyle{cstyle}{
    language=C,
    basicstyle=\ttfamily\small,
    keywordstyle=\color{blue!70!black}\bfseries,
    commentstyle=\color{gray}\itshape,
    stringstyle=\color{green!50!black},
    numbers=left,
    numberstyle=\tiny,
    stepnumber=1,
    numbersep=8pt,
    backgroundcolor=\color{black!5},
    frame=single,
    rulecolor=\color{black!30},
    breaklines=true,
    tabsize=4,
    showstringspaces=false
}

\addbibresource{literature.bib}
\renewcommand{\thefootnote}{\arabic{footnote}}
\parskip.5\baselineskip

\begin{document}

%% Titelblatt
\setstretch{1.5}

\begin{center}
\thispagestyle{empty}
\LARGE{FernUniversität in Hagen}\\[-0.9ex]
\LARGE{Faculty of Mathematics and Computer Science}\\[2ex]
\vspace{0.3cm}
\begin{center}
\includegraphics[width=10cm]{Bilder/logo_fernuni.jpg}\\
\vspace{0.9cm}
\textbf{\LARGE{Master's Thesis}}
\medskip\par
\Large{\textbf{Implementation of adaptive noise reduction
in cochlear implant systems}}\\[-0.5ex]
\medskip\par
\vspace{0.9cm}
\textbf{\normalsize{submitted for the degree of}} \\[2ex]
\textbf{\Large{Master of Science}}\\
\bigskip\par
by \par
\large{Patrick Hangl, B.Sc.}\\[-1ex]
\large{Matriculation Nr.: q4179749}\\ [-1ex]
\vspace{0.6cm}
\end{center}
\medskip
\end{center}
\begin{tabular}{ll}
  Submission Date: \today \\[-1ex]
  Supervisor: Prof. Dr. Zhong Li\\
\end{tabular}

%% Text
\singlespacing

\newpage
\tableofcontents
\newpage
\include{acronyms}
\newpage
\begin{abstract}
    \noindent The goal of this thesis is the implementation, followed by the investigation of improvement options, of a real-time capable Adaptive Noise Reduction (ANR) algorithm in Cochlear Implant (CI) systems. The focus lies on the reduction of the computational load, and subsequently the power consumption, of the used Digital Signal Processor (DSP) core, while still keeping the noise reduction performance as high as possible.\\ \\
    \noindent The chosen method for noise reduction is the use of an adaptive filter combined with the Least Mean Square algorithm, which is a widely utilized method in this context. The evaluation of the performance is conducted via the Signal-Noise-Ratio (SNR)-Gain, which serves as a metric for the quality of the noise reduction. Several use cases (from simple to realistic) are analyzed to evaluate qualitiy of the output under different conditions.\\ \\
    \noindent After confirming the general feasibility of the proposed method in a high-level Python-implementation, the algorithm is implemented in C, using DSP compiler instrinsic functions to achieve real-time capability. The performance of the C-implementation is then sucessfully compared to the initial high-level implementation, showing only minor deviations.\\ \\
    \noindent With a working C-implementation in place, a closer look on the achievable performance under full-update settings is taken, which serves as a benchmark-setting for the remaining thesis. The computational cost of the algorithm is evaluated in terms of the needed cycles to compute one audio sample, which can be expressed as a function of the filter length and the update rate.\\ \\
    \noindent With this formula developed, several noise sources are put under test, to evaluatue the optimal filter length, which is a trade-off between the performance improvement and the computational cost. The ideal filter length is determined at 45 coeffcients, where about 95\% averaged \ac{SNR}-Gain can be achieved.\\ \\
    \noindent With the filter lenght set, the improvement of the algorithm is tackled, both for a benchmark track and different signal/noise scenarios.\\ \\
    \noindent The first approach is a reduction of the update rate. This strategy is able to significantly reduce the needed cycles, but with a simultanious considerable decrease in the SNR-Gain.\\ \\
    \noindent The second approach is an error driven optimization, utilizing the idea of a fixed threshold for the error signal, over which the decision over an upgrade of the filter coefficients is made. This approach turns out to be a success, as it is able to achieve a significant reduction in the needed cycles, while only reducing the SNR-Gain by a small amount.\\ \\
    \noindent Therefore, the error driven optimization approach can be seen as the sucessful result of this thesis, as it is able to further improve an already real-time capable ANR algorithm by significantly reducing the computational load of the DSP core, while only slightly reducing the performance improvement in terms of the SNR-Gain.\\ \\

\end{abstract}
\include{chapter_01}
\include{chapter_02}
\include{chapter_03}
\include{chapter_04}
\include{chapter_05}
\include{chapter_06}
\printbibliography
\listoffigures

\end{document}