Überarbeitung, Check Prof
This commit is contained in:
+9
-9
@@ -2,13 +2,13 @@
|
||||
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 considerations 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{Adaptive Noise Reduction algorithm implementation}
|
||||
The high-level implementation of the \ac{ANR} algorithm follows the theoretical framework outlined in Subchapter 2.5, specifically 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:
|
||||
The high-level implementation of the \ac{ANR} algorithm follows the theoretical framework outlined in Subchapter 2.5, specifically Equation \ref{equation_lms}. The algorithm is designed to adaptively filter out noise from a desired signal using a reference noise signal. 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.
|
||||
\item Filtering Process: After initially enough input samples (= number of filter coefficients) passed the filter, for each sample in the input sample, the filter coefficients are multiplied with the corresponding reference noise samples before added to an accumulator.
|
||||
\item Initialization: Define arrays to store the reference noise samples (Sample Line), the filter coefficients (Filter Line), the processed output samples (output), and the updated filter coefficients (coefficient\_matrix) over time. Then a sequence of input samples is processed iteratively.
|
||||
\item Filtering Process: The reference noise samples fill up the Sample Line, the filter coefficients in the Filter Line (initially set to zero) are then multiplied with the corresponding reference noise samples before being added up to an accumulator.
|
||||
\item Error Calculation: The accumulator is then subtracted from the current input sample to produce the output sample, which represents the error signal.
|
||||
\item Coefficient Update: The filter coefficients are updated by the corrector, which consists out of the error signal, scaled by the step size. The adaption step parameter allows controlling how often the coefficients are updated.
|
||||
\item Iteration: Repeat the process for all samples in the input signal.
|
||||
\item Coefficient Update: Every filter coefficient is then updated, by adding a term, which consists out of the error signal multiplied by the corresponding reference noise sample, scaled by the step size. The adaption step parameter allows controlling how often the coefficients are updated.
|
||||
\item Iteration: Repeat the process for all samples of the input signal.
|
||||
\end{itemize}
|
||||
The flow diagram in Figure \ref{fig:fig_anr_logic} illustrates the logical flow of the \ac{ANR} algorithm, while the code snippet in Listing \ref{lst:lst_anr_code} provides the concrete code implementation of the \ac{ANR}-function.
|
||||
\begin{figure}[H]
|
||||
@@ -46,11 +46,11 @@ def anr_function(input, ref_noise, coefficients, mu, adaption_step=1):
|
||||
\noindent The algorithm implementation shall now be put under test by different use cases to demonstrate the functionality and performance under different scenarios, varying from simple to complex ones. Every use case includes graphical representations of the desired signal, the corrupted signal, the reference noise signal, the filter output, the error signal and the evolution of selected filter coefficients over time. In contrary to a realistic setup, the desired signal is available, allowing to evaluate the performance of the algorithm based on the \ac{SNR}-Gain in dB and also visually by the amplitude of the error signal (difference between the desired signal and the filter output). The error signal and the \ac{SNR}-Gain are calculated as follows:
|
||||
\begin{gather}
|
||||
\label{equation_snr_gain_error}
|
||||
P_{Error-signal} = P_{Desired-signal} - P_{Filter-output} \\
|
||||
\label{equation_snr_gain}
|
||||
SNR\text{-}Gain = 10 \cdot \log_{10}\frac{P_{Desired-signal}}{P_{Noise-signal}} - 10 \cdot \log_{10}\frac{P_{Desired-signal}}{P_{Error-signal}}
|
||||
\text{P}_{\text{Error-signal}} = \text{P}_{\text{Desired-signal}} - \text{P}_{\text{Filter-output}} \\
|
||||
\label{equation_snr_gain}
|
||||
\text{SNR-Gain} = 10 \cdot \log_{10}\frac{\text{P}_{\text{Desired-signal}}}{\text{P}_{\text{Noise-signal}}} - 10 \cdot \log_{10}\frac{\text{P}_{\text{Desired-signal}}}{\text{P}_{\text{Error-signal}}}
|
||||
\end{gather}
|
||||
with $P_{Desired-signal}$ being the power of the desired signal, $P_{Noise-signal}$ being the power of the noise signal and $P_{Error-signal}$ being the power of the error signal, which is the difference between the desired signal and the filter output. A positive \ac{SNR}-Gain indicates an improvement in signal quality, while a negative \ac{SNR}-Gain indicates a degradation in signal quality after applying the \ac{ANR} algorithm.
|
||||
with $\text{P}_{\text{Desired-signal}}$ being the power of the desired signal, $\text{P}_{\text{Noise-signal}}$ being the power of the noise signal and $\text{P}_{\text{Error-signal}}$ being the power of the error signal, which is the difference between the desired signal and the filter output. A positive \ac{SNR}-Gain indicates an improvement in signal quality, while a negative \ac{SNR}-Gain indicates a degradation in signal quality after applying the \ac{ANR} algorithm.
|
||||
\subsection{Simple ANR use cases}
|
||||
To evaluate the general functionality and performance of the \ac{ANR} algorithm from Listing \ref{lst:lst_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 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 (Use case 1 and 2) or a Gaussian white noise (Use case 3) as noise signal respectively. In this simple setup, the corruption noise signal is also available as the reference noise signal. Every approach is conducted with 16 filter coefficients and a step size of 0.01. The four graphs in the respective 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.\\ \\
|
||||
|
||||
Reference in New Issue
Block a user