From f27312400854d7efe2f4d004f09ea0efbb1992ba Mon Sep 17 00:00:00 2001 From: Patrick Hangl Date: Thu, 11 Dec 2025 16:46:22 +0100 Subject: [PATCH] 3.4 --- chapter_02.tex | 23 +++++++++++++++++------ chapter_03.tex | 10 +++++----- chapter_04.aux | 10 +++------- chapter_04.tex | 6 +++--- literature.bib | 12 ++++++------ main.tex | 4 ++-- 6 files changed, 36 insertions(+), 29 deletions(-) diff --git a/chapter_02.tex b/chapter_02.tex index 1a0df04..ef24be9 100644 --- a/chapter_02.tex +++ b/chapter_02.tex @@ -94,7 +94,7 @@ Figure \ref{fig:fig_iir} visualizes a simple \ac{IIR} filter with two feedforwar \caption{\ac{IIR} filter example with two feedforward operators and two feedback operators.} \label{fig:fig_iir} \end{figure} -\subsubsection{\ac{FIR}- vs. \ac{IIR}-filters} +\subsubsection{FIR- vs. IIR-filters} Due to the fact, that there is no feedback, a \ac{FIR} filter offers unconditional stability, meaning that the filter response always converges, no matter how the coefficients are set. The disadvantages of the \ac{FIR} design is the relatively flat frequency response and the higher number of needed coefficients needed to achieve a sharp frequency response compared to its Infinite Impulse Response counterpart.\\ \\ The recursive nature of an \ac{IIR} filter, in contrary, allows achieving a sharp frequency response with significantly fewer coefficients than an equivalent \ac{FIR} filter, but it also opens up the possibility, that the filter response diverges, depending on the set coefficients.\\ \\ A higher number of needed coefficients implies, that the filter itself needs more time to complete its signal response, as the group delay is increased. @@ -122,7 +122,7 @@ Although active noise cancellation and adaptive noise reduction share obvious si \caption{The basic idea of an adaptive filter design for noise reduction.} \label{fig:fig_anr} \end{figure} -\noindent Figure \ref{fig:fig_anr} shows the basic concept of an adaptive filter design, represented through a feedback filter application. The primary sensor (top) aims to receive the desired signal and outputs the corrupted signal $d[n]$, which consists out of the recorded desired signal $s[n]$ and the recorded corruption noise signal $n[n]$, whereas the secondary signal sensor aims to receive (ideally) only the noise signal and outputs the recorded reference noise signal $x[n]$, which then feeds the adaptive filter. We assume at this point, that the corruption noise signal is uncorrelated to the desired signal, and therefore separable from it. In addition, we assume, that the corruption noise signal is correlated to the reference noise signal, as it originates from the same source, but takes a different signal path. \\ \\ The adaptive filter removes a certain, noise-related, frequency part of the input signal and re-evaluates the output through its feedback design. The filter parameters are then adjusted and applied to the next sample to minimize the observed error $e[n]$, which also represents the approximated desired signal $š[n]$. In reality, a signal contamination of the two sensors has to be expected, which will be illustrated in a more realistic signal flow diagram of an implanted \ac{CI} system in chapter 2.6. +\noindent Figure \ref{fig:fig_anr} shows the basic concept of an adaptive filter design, represented through a feedback filter application. The primary sensor (top) aims to receive the desired signal and outputs the corrupted signal $d[n]$, which consists out of the desired signal $s[n]$ and the corruption noise signal $n[n]$ after passing the transfer function of the sensor, whereas the secondary signal sensor aims to receive (ideally) only the noise signal and outputs the reference noise signal $x[n]$ after also passing the respective transfer funtion, which then feeds the adaptive filter. We assume at this point, that the corruption noise signal is uncorrelated to the desired signal, and therefore separable from it. In addition, we assume, that the corruption noise signal is correlated to the reference noise signal, as it originates from the same source, but takes a different signal path. \\ \\ The adaptive filter removes a certain, noise-related, frequency part of the input signal and re-evaluates the output through its feedback design. The filter parameters are then adjusted and applied to the next sample to minimize the observed error $e[n]$, which also represents the approximated desired signal $š[n]$. In reality, a signal contamination of the two sensors has to be expected, which will be illustrated in a more realistic signal flow diagram of an implanted \ac{CI} system in chapter 2.6. \subsubsection{Fully adaptive vs. hybrid filter design} The basic \ac{ANR} concept illustrated in Figure \ref{fig:fig_anr} can be understood as a fully adaptive variant. A fully adaptive filter design works with a fixed number of coefficients of which everyone is updated after every sample processing. Even if this approach features the best performance in noise reduction, it also requires a relatively high amount of computing power, as every coefficient has to be re-calculated after every evaluation step.\\ \\ To reduce the required computing power, a hybrid static/adaptive filter design can be taken into consideration instead (refer to Figure \ref{fig:fig_anr_hybrid}). In this approach, the initial fully adaptive filter is split into a fixed and an adaptive part - the static filter removes a certain, known, or estimated, frequency portion of the noise signal, whereas the adaptive part only has to adapt to the remaining, unforecastable, noise parts. This approach reduces the number of coefficients required to be adapted, therefore lowering the required computing power. @@ -265,21 +265,32 @@ The \ac{LMS} algorithm therefore updates the filter coefficients $w[n]$ after ev \caption{Realistic implant design.} \label{fig:fig_anr_implant} \end{figure} -\noindent Figure \ref{fig:fig_anr_hybrid} showed us the basic concept of an \ac{ANR} implementation, without a detailed description how the corrupted signal $d[n]$ and the reference noise signal $x[n]$ are formed. Figure \ref{fig:fig_anr_implant} now shows a more complete and realistic signal flow diagram of an implanted cochlear implant system, with two signal sensors and an adaptive noise reduction circuit afterwards. The primary sensor receives the desired- and noise signal over their respective transfer functions and outputs the corrupted signal $d[n]$, which consists out of the recorded desired signal $s[n]$ and the recorded corruption noise signal $n[n]$, whereas the noise signal sensor aims to receive (ideally) only the noise signal $v[n]$ over its transfer function and outputs the reference noise signal $x[n]$, which then feeds the adaptive filter.\\ \\ +\noindent Figure \ref{fig:fig_anr_hybrid} showed us the basic concept of an \ac{ANR} implementation, without a detailed description how the corrupted signal $d[n]$ and the reference noise signal $x[n]$ are formed. Figure \ref{fig:fig_anr_implant} now shows a more complete and realistic signal flow diagram of an implanted cochlear implant system, with two signal sensors and an adaptive noise reduction circuit afterwards. \\ \\ +The following definitions of the involved signals shall help to better understand the involved signals and their interactions: +\begin{itemize} +\item Desired signal: The wanted signal, like human voice, which shall be preserved. +\item Noise signal: The unwanted signal, like background noise, which shall be reduced. +\item Recorded desired signal: The desired signal after passing the transfer function to the primary sensor. +\item Corruption noise signal: The noise signal after passing the transfer function to the primary sensor. +\item Reference noise signal: The noise signal after passing the transfer function to the secondary sensor. +\item Corrupted signal: The combination of the recorded desired signal and the corruption noise signal +\item Filter output / Cleaned signal: The output signal of the \ac{ANR} system, representing the desired signal after noise reduction. +\end{itemize} +The primary sensor receives the desired- and noise signal over their respective transfer functions and outputs the corrupted signal $d[n]$, which consists out of the recorded desired signal $s[n]$ and the corruption noise signal $n[n]$, whereas the noise signal sensor aims to receive (ideally) only the noise signal $v[n]$ over its transfer function and outputs the reference noise signal $x[n]$, which then feeds the adaptive filter.\\ \\ Additionally, now the relevant transfer functions of the overall system are illustrated in Figure \ref{fig:fig_anr_implant}. The transfer functions $C_n$, $D_n$, and $E_n$ describe the path from the signal sources to the cochlear implant system. As the sources, the relative location of the user to the sources and the medium bewteen them can vary, these transfer functions are time-variant and unknown. After the signals reached the implant systems, we establish the possibility, that the remaining path of the signals is mainly depented on the sensitivity curve of the respective sensors and therefore can be seen as time-invariant and known. This known transfer functions, which are titled $A$ and $B$, allow us to apply an hybrid static/adaptive filter design for the \ac{ANR} implementation, as described in chapter 2.5.2.\\ \\ \begin{equation} \label{equation_dn} d[n] = s[n] + n[n] = t[n] * (C_nA) + v[n] * (D_nA) \end{equation} -where $t[n]$ and $v[n]$ are the target- and noise signals at their respective source, $s[n]$ is the recorded desired signal and $n[n]$ is the recorded corruption noise after passing the transfer functions.\\ \\ -The recorded noise reference signal $x[n]$ can be mathematically described as: +where $t[n]$ and $v[n]$ are the desired- and noise signals at their respective source, $s[n]$ is the recorded desired signal and $n[n]$ is the corruption noise after passing the transfer functions.\\ \\ +The noise reference signal $x[n]$ can be mathematically described as: \begin{equation} \label{equation_xn} x[n] = v[n] * (E_nB) \end{equation} where $v[n]$ is the noise signal at its source.\\ \\ Another possible signal interaction could be the leakage of the desired signal into the secondary sensor, leading to the partial removal of the desired signal from the output signal. This case is not illustrated in Figure \ref{fig:fig_anr_implant} as it won't be further evaluated in this thesis, but shall be mentioned for the sake of completeness.\\ \\ -At this point, the theoretical background and the fundamentals of adaptive noise reduction have been adequately introduced and explained as necessary for the understanding of the following chapters of this thesis. The next chapter will now focus on practical high level simulations of different filter concepts and \ac{LMS} algorithm variations to evaluate their performance in regard of noise reduction quality before the actual implementation on a low-power digital signal processor is conducted. +At this point, the theoretical background and the fundamentals of adaptive noise reduction have been adequately introduced and explained as necessary for the understanding of the following chapters of this thesis. The next chapter will now focus on practical high level simulations of the \ac{ANR} algorithm under different circumstances to evaluate their performance in regard of noise reduction quality before the actual implementation on a low-power digital signal processor is conducted. diff --git a/chapter_03.tex b/chapter_03.tex index 36646da..be0bb3e 100644 --- a/chapter_03.tex +++ b/chapter_03.tex @@ -1,7 +1,7 @@ \section{High level simulations} The main purpose of the high-level simulations is to verify and demonstrate the theoretical approach of the previous chapters and to evaluate the performance of the proposed algorithms under various conditions. The following simulations include different scenarios such as, different types of noise signals and different cosniderations of transfer functions. The goal is to verify different approaches before taking the step to the implementation of said algorithms on the low-power \ac{DSP}.\\ \\ The implementation is conducted in Python, which provides a flexible environment for numerical computations and data visualization. The simulation is graphically represented using the Python library Matplotlib, allowing for clear visualization of the results. -\subsection{\ac{ANR} algorithm implementation} +\subsection{Adaptive Noise Reduction algorithm implementation} The high-level implementation of the \ac{ANR} algorithm follows the theoretical framework outlined in Subchapter 2.5, specificially Equation \ref{equation_lms}. The algorithm is designed to adaptively filter out noise from a desired signal using a reference noise input. The implementation of the \ac{ANR} function includes the following key steps: \begin{itemize} \item Initialization: Define vectors to store the filter coefficients, the output samples, and the updated filter coefficients over time. @@ -44,7 +44,7 @@ The flow diagram in Figure \ref{fig:fig_anr_logic} illustrates the logical flow \label{fig:fig_anr_code} \caption{High-level implementation of the \ac{ANR} algorithm in Python} \end{figure} -\subsection{Simple \ac{ANR} usecases} +\subsection{Simple ANR usecases} To evaltuate the general functionality and performance of the \ac{ANR} algorithm from Figure \ref{fig:fig_anr_code} a set of three simple, artificial scenarios are introduced. These examples shall serve as a showcase to demonstrate the general functionality, the possibilities and the limitations of the \ac{ANR} algorithm. In contrary to a more complex and realistic setup, which will be reviewed afterwards, the clean signals are available, which is in a realistic application not the case.\\ \\ In all three scenarios, a chirp signal with a frequency range from 100-1000 Hz is used as the desired signal, which is then corrupted with a sine wave (Usecase 1 and 2) or a gaussian white noise (Usecase 3) as noise signal respectively. In this simple setup, the corrpution noise signal is also available as the reference noise signal. Every approach is conducted with 16 filter coefficients and a stepsize of 0.01. The four graphs in the repsective first plot show the desired signal, the corrupted signal, the reference noise signal and the filter output. The two graphs in the respective second plot show the performance of the filter in form of the resulting error signal and the evolution of three filter coefficients over time.\\ \\ \noindent This artificial setup could be solved analitically, as the signals do not pass seperate, different transfer functions. This means, that the reference noise signal is the same as the corruption noise signal. This simple setup would not require an adaptive filter approach, but it nevertheless allows to clearly evaluate the performance of the \ac{ANR} algorithm in different scenarios. Also, due to the fact that the desired signal is known, it is possible to graphically evaluate the performance of the algorithm in a simple way. @@ -93,7 +93,7 @@ The last on of our three simplified usecases involves the use of a gaussian whit \caption{Error signal and filter coefficient evolution of simple usecase 3} \label{fig:fig_plot_2_noise.png} \end{figure} -\subsection{Intermediate \ac{ANR} usecase} +\subsection{Intermediate usecase} After the general functionality of the \ac{ANR} algorithm has been verified with the above simple and artificial usecases, a more complex and intermediate scenario is now introduced. In this usecase, a real-world audio track of a person speaking on TV (see top graph in Figure \ref{fig:fig_plot_1_wav.png}) is used as the desired signal, which is then corrupted with a dominant breathing noise as the noise signal. This scenario represents a more realistic application of the \ac{ANR} algorithm, as it involves complex audio signals with varying frequency components and relatively high dynamics, but still keeps the advantage of having the clean signal available for performance evaluation. Also, again, the same noise which corrputs the desired signal is used as the reference noise signal, as no transfer functionsare applied on the signals. \begin{figure}[H] \centering @@ -109,7 +109,7 @@ After the general functionality of the \ac{ANR} algorithm has been verified with \label{fig:fig_plot_2_wav.png} \end{figure} \noindent The error signal in Figure \ref{fig:fig_plot_2_wav.png} confirms the function of the algorithm and shows peaks corresponding to the spikes in the breathing noise, indicating the the moments, when the \ac{ANR} algorithm is setting its coeffcients again to adapt to the changing noise characteristics. It makes sense, that the adaption of the filter coefficients causes repeating spikes in the error signal, as the noise signal now is not static or periodic, but rather dynamic and changing it frequenc and amplitude over time. -\subsection{Complex \ac{ANR} usecase} +\subsection{Complex ANR usecase} To close the topic of high-level simulations of the \ac{ANR} algorithm, a more complex and realistic usecase is finally introduced. In this scenario, the same two audio tracks of the previous usecase are used - but now they pass different transfer functions. Now, an analitical solution is not possible anymore, as the transfer functions affect the signals in different ways, making it impossible to simply subtract the noise signal from the corrupted signal. This scenario represents a more realistic application of the \ac{ANR} algorithm, as it involves complex audio signals with varying frequency components and dynamics, as well as different transfer functions affecting the signals.\\ \\ Different transfer functions represent the reality of different sensors recording the corrupted signal and the reference noise signal with a specific frequency response characteristic - this circumstance is especially important, as later a fixed set of filter coefficients shall take care of the predictable part of the signal to reduce the computing power of the \ac{DSP}.\\ Therefore, the audio tracks from the previous example are now convolved with different transfer functions, which mimic the case, that the sensor recording the corrputed signal, shows another frequency response characteristic as the one recording the reference noise signal. This means, that the reference noise signal is now different to the noise signal corrupting the desired signal, making adaptive noise reduction the only feasible approach to reduce the noise from the corrputed signal. @@ -126,7 +126,7 @@ Therefore, the audio tracks from the previous example are now convolved with dif \caption{The raw noise signal recorded with two different sensors, showing the effect of different transfer functions on the signal} \label{fig:fig_plot_4_wav_complex.png} \end{figure} -\noindent To evaluate the performance of the \ac{ANR} algorithm in this complex scenario, the corrupted signal is recorded with the primary sensor while the reference noise signal is recorded with secondary sensor. The filter output in Figure \ref{fig:fig_plot_1_wav_complex.png} indicates, that the \ac{ANR} algorithm is still capable of significantly reducing the noise from the corrupted signal, even with only a different reference noise signal available to adapt the filter coefficients. +\noindent To evaluate the performance of the \ac{ANR} algorithm in this complex scenario, the corrupted signal is recorded with the primary sensor while the reference noise signal is recorded with secondary sensor. The filter output in Figure \ref{fig:fig_plot_1_wav_complex.png} indicates, that the \ac{ANR} algorithm is still capable of significantly reducing the noise from the corrupted signal, even with the reference noise signal being different than the corrpuption noise signal. \begin{figure}[H] \centering \includegraphics[width=1.0\linewidth]{Bilder/fig_plot_1_wav_complex.png} diff --git a/chapter_04.aux b/chapter_04.aux index 2c05d2b..b5eea11 100644 --- a/chapter_04.aux +++ b/chapter_04.aux @@ -5,8 +5,7 @@ \acronymused{DSP} \acronymused{ANR} \acronymused{ANR} -\acronymused{DSP} -\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Description of the low-power \ac {DSP}}{40}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Description of the low-power DSP}{40}{}\protected@file@percent } \acronymused{DSP} \AC@undonewlabel{acro:ALU} \newlabel{acro:ALU}{{4.1}{40}{}{}{}} @@ -18,12 +17,9 @@ \acronymused{MAC} \acronymused{DSP} \acronymused{DSP} -\acronymused{ANR} -\acronymused{DSP} -\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Implementation of the \ac {ANR} algorithm on the \ac {DSP}}{41}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Implementation of the ANR algorithm on the DSP}{41}{}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {4.3}First optimization approach: algorithm implementation}{41}{}\protected@file@percent } -\acronymused{ANR} -\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Second optimization approach: hybrid \ac {ANR} algorithm}{41}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Second optimization approach: hybrid ANR algorithm}{41}{}\protected@file@percent } \@setckpt{chapter_04}{ \setcounter{page}{42} \setcounter{equation}{21} diff --git a/chapter_04.tex b/chapter_04.tex index bea3498..6ad7415 100644 --- a/chapter_04.tex +++ b/chapter_04.tex @@ -1,7 +1,7 @@ \section{Hardware setup and low level simulations} This section aims to be the main part of this thesis. The first subchapters describes the hardware, on which the \ac{ANR} algorithm is implemented. The following subchapter describes the basic implementation of the \ac{ANR} algorithm on the hardware itself and shall provide the reader with a basic understanding of its efficiency, which shall serve as a baseline for the following optimiziations.\\ During the third chapter, this initial implementation is further optimized in order to achieve an improved real-time performance on the \ac{DSP}. The last subchapter picks the final optimizations of the \ac{ANR} algorithm itself as a central theme, especially with respect to the capabilites of a hybrid \ac{ANR} approach. -\subsection{Description of the low-power \ac{DSP}} +\subsection{Description of the low-power DSP} The \ac{DSP} used for the implementation is a 32-bit fixed-point processor primarily designed for audio signal-processing applications in low-power embedded systems. It is developed using a retargetable processor design methodology and is typically programmed in C. Its highly efficient C compiler produces optimized assembly code that is comparable in performance and quality to hand-written assembly.\\ \\ The processor is equipped with load/store architecture, meaning that, initially all operands need to be moved from the memory to the registers, before any operation can be performed. After this task is performed, the execution units (\ac{ALU} and multiplier) can perform their oeprations on the data and write back the results into the registers. Finally, the results need to be explicitly moved back to the memory.\\ \\ The \ac{DSP} includes a three stage pipeline consisting of fetch, decode, and execute stages, aloowing for overlapping instruction execution and improved throughput. @@ -10,7 +10,7 @@ The \ac{DSP} includes a set of registers, including Advanced addressing modes — such as cyclic and bit-reversed addressing — facilitate efficient implementation of common \ac{DSP} algorithms. Additional architectural features include hardware-supported zero-overhead looping, nested loop structures, interrupt handling, power-management mechanisms, and on-chip debugging capabilities such as JTAG, breakpoints, and watchpoints. Overall, the architecture is designed to support both control-flow operations and high-throughput signal-processing tasks within low-power embedded environments. -\subsection{Implementation of the \ac{ANR} algorithm on the \ac{DSP}} +\subsection{Implementation of the ANR algorithm on the DSP} \subsection{First optimization approach: algorithm implementation} -\subsection{Second optimization approach: hybrid \ac{ANR} algorithm} +\subsection{Second optimization approach: hybrid ANR algorithm} diff --git a/literature.bib b/literature.bib index 4cb3984..7a65a97 100644 --- a/literature.bib +++ b/literature.bib @@ -2,23 +2,23 @@ author = {MED-EL}, title = {MED-EL Synchrony Cochlear Implant with a Sonnet 3 Audio Processor}, howpublished = {\url{https://www.medel.com/de/hearing-solutions/cochlear-implants}}, - year = {2025}, - note = {Accessed on 26.06.2025} + year = {2026}, + note = {Accessed on 20.01.2026} } @misc{source_anr, author = {Ghalib R. Ibrahim}, title = {Adaptive filtering based system for extracting gearbox condition feature from the measured vibrations}, howpublished = {\url{https://www.researchgate.net/publication/257093929_Adaptive_filtering_based_system_for_extracting_gearbox_condition_feature_from_the_measured_vibrations}}, - year = {2025}, - note = {Accessed on 10.07.2025} + year = {2026}, + note = {Accessed on 24.01.2026} } @misc{source_electrode, author = {MED-EL}, title = {Visualization of a MED-EL electrode inserted into a human cochlear}, howpublished = {\url{https://blog.medel.pro/de/chirurgie/relevanz-der-ci-elektrode/}}, - year = {2025}, - note = {Accessed on 18.09.2025} + year = {2026}, + note = {Accessed on 30.01.2026} } @misc{source_dsp1, diff --git a/main.tex b/main.tex index e31b041..83a9a08 100644 --- a/main.tex +++ b/main.tex @@ -39,8 +39,8 @@ \vspace{0.9cm} \textbf{\LARGE{Master's Thesis}} \medskip\par -\Large{\textbf{Implementation of Adaptive Noise Reduction -in Cochlear Implant Systems}}\\[-0.5ex] +\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]