\section{Performance evaluation of different implementation variants}
\subsection{Verification of the \ac{DSP} implementation}
To verify the general performance of the \ac{DSP}-implemented \ac{ANR} algorithm, the complex usecase of the high-level implemenation is utilized, which includes, again, a 16-tap \ac{FIR} filter and an update of the filter coefficients every cycle. In contary to the high-level implementation, the coeffcient convergence is now not included in the evaluation anymore, but the metric for the \ac{ANR} performance stays the same as the \ac{SNR}-improvement.
\begin{figure}[H]
    \centering
    \includegraphics[width=1.0\linewidth]{Bilder/fig_plot_1_dsp_complex.png}
    \caption{Desired signal, corrupted signal, reference noise signal and filter output of the complex \ac{ANR} use case, simulated on the \ac{DSP}}
    \label{fig:fig_plot_1_dsp_complex.png}
\end{figure}
\begin{figure}[H]
    \centering
    \includegraphics[width=1.0\linewidth]{Bilder/fig_plot_2_dsp_complex.png}
    \caption{Error signal of the complex \ac{ANR} use case, simulated on the \ac{DSP}}
    \label{fig:fig_plot_2_dsp_complex.png}
\end{figure}
\begin{figure}[H]
    \centering
    \includegraphics[width=1.0\linewidth]{Bilder/fig_high_low_comparison.png}
\caption{Comparison of the high- and low-level simulation output.}
    \label{fig:fig_high_low_comparison.png}
\end{figure}  
\begin{figure}[H]
    \centering
    \includegraphics[width=1.0\linewidth]{Bilder/fig_high_low_comparison_hist.png}
\caption{Histogram of the error amplitude between the high- and low-level simulation output.}
    \label{fig:fig_high_low_comparison_hist.png}
\end{figure}  
\noindent Figure \ref{fig:fig_plot_1_dsp_complex.png} and \ref{fig:fig_plot_2_dsp_complex.png} show the results of the complex \ac{ANR} use case, simulated on the \ac{DSP} - with a \ac{SNR}-Gain of 6.98 dB it performs equivalent as the one of the high-level implementation. Figure \ref{fig:fig_high_low_comparison.png} shows both outputs seperately and then together in one subfigure, tigether with the plotted error amplitude. Figure \ref{fig:fig_high_low_comparison_hist.png} feautres a histogram of the error amplitude between the high- and low-level implemenation, indicating the correct functionality of the \ac{DSP} implementation. The small errors can be explained by the fact that the \ac{DSP} implementation is based on fixed-point arithmetic, which leads to a slightly different convergence behavior. Nevertheless, the results show that the \ac{DSP} implementation of the \ac{ANR} algorithm is able to achieve the same performance as the high-level implementation, again indicating the fact, that 16 filter coefficients are sufficent to filter out a complex but synchrone noise signal. In reality, the \ac{ANR} algorithm is confronted with delayed signals, as the sensors are located im different positions. The next step is of evaluate the performance of the \ac{DSP} implementation in terms of computational efficiency under different scenarios and non-synchrone signals.
\subsection{Determination of the optimal filter length}
\noindent The main focus for evaluating the computational efficiency is the determination of the optimal filter length. To achieve this goal, different signal combinations, which are to be expected everyday situiations for a \ac{CI} patient, are considered. Now, also, a delay of 2ms bewteen the corrupted signal an the reference noise signal is applied, increasing the need for a longer filter. The desired signal of a male voice over speaker is now corrupted with 5 different noise signals, ruling out, that a certain combination of signals is not representative for the overall performance of the \ac{ANR} algorithm:
\begin{itemize}
    \item Breathing noise: Already used in the high-level implementation, this noise signal is a typical noise source for \ac{CI} patients, especially in quiet environments. It consists out of slowly rising and falling maxima.
    \item Coughing noise: This noise signal is generated by coughing and consists out few, but long lasting maxima, showing similarities to a rectangular function.
    \item Scratching noise: This noise signal is generated by scratching some material with finger nails, like the hair or clothes. It consists out of a high number of sharp peaks.
    \item Drinking Noise: This noise signal is generated by swallowing a liquid and consists out of a low number of sharp peaks, featuring long pauses between them.
    \item Chewing Noise: This noise signal is generated by consuming food and consists out of a high number of peaks of different amplitude.
\end{itemize}
The vizualization of the noise signals is shown in Figure \ref{fig:fig_noise_signals.png}.
\begin{figure}[H]
    \centering
    \includegraphics[width=1.0\linewidth]{Bilder/fig_noise_signals.png}
    \caption{Noise signals used to corrupt the desired signal in the computational efficiency evaluation}
    \label{fig:fig_noise_signals.png}
\end{figure}  
\noindent The combination of stated sets delivers five different scenarious, everyone different in regard of it's challenges for the \ac{ANR} algorithm. For every scenario, the \ac{SNR}-Gain is calculated with an increasing set of filter coeffcients, ranging from 16 to 64.
\begin{figure}[H]
    \centering
    \includegraphics[width=1.0\linewidth]{Bilder/fig_snr_comparison.png}
    \caption{Simulation of the to be expected \ac{SNR}-Gain for different noise signals and filter lengths applied to the desired signal of a male speaker. The applied delay between the signals amounts 2ms. The graphs are smoothed by a third order savigol filter.}
    \label{fig:fig_snr_comparison.png}
\end{figure}  
\noindent Figure \ref{fig:fig_snr_comparison.png} shows the expected \ac{SNR}-Gain for the different noise signals and filter lengths. The results shows, that a minimum filter length of about 32 taps is required, before (in any case) a significant rise in the \ac{SNR}-Gain can be observed - this is highly contrary to the sinchronous high-level simulation, where a filter length of only 16 taps provided sufficent noise reduction. This circustance can be explained by the fact, that the corruption noise signal is now delayed to the reference noise signal, meaning, that the filter needs a certain length before it can react. The results also show, that the \ac{SNR}-Gain is different for the different noise signals, indicating, that the noise signals have different characteristics, like the number of peaks, their frequency spectrum an their amplitude.\\ \\
The mean \ac{SNR}-Gain of the different noise signals, also shown in Figure \ref{fig:fig_snr_comparison.png}, signals, that after reaching 95\% of the maximum \ac{SNR}-Gain, the \ac{SNR}-Gain increase is slowing down. This threshold is reached at a filter length of 45 taps. This means, that a filter length of 45 taps represents an optimal solution for a statisfying performance of the \ac{ANR} algorithm, while a further increase of the filter length does not lead to a significant increase of the \ac{SNR}-Gain. This is an important finding, as it allows to optimize the computational efficiency of the \ac{ANR} algorithm by choosing an appropriate filter length.
\subsection{Evaluation of the computational load for fixed implementation}
\subsubsection{Full-Update implementation}
\noindent Equation \ref{equation_computing_final} can now be utilized to calculate the needed cycles for the calculation of one sample of the filter output, using a filter length of 45 taps and an update of the filter coefficients every cycle. The needed cycles are calculated as follows:
\begin{equation}
\label{equation_computing_calculation}
 C_{total} = 45 + (6*45+8)*1 + 34 = 357 \text{ cycles}
\end{equation}
As already mentioned in the previous chapters, the sampling rate of the audio data provided to the \ac{PCM} interface amounts 20 kHz. The prefered clock frequency of the \ac{DSP} is chosen as 16 MHz, which means, that the \ac{DSP} core has cycle budget of
\begin{equation}
\label{equation_cycle_budget}
    C_{budget} = \frac{16 MHz}{20 kHz} = 800 \text{ cycles}
\end{equation}
\noindent for one sample. With these two values, the load of the \ac{DSP} core can be calculated as follows:
\begin{equation}
\label{equation_load_calculation}
    Load_{DSP} = \frac{C_{total}}{C_{budget}} = \frac{357 \text{ cycles}}{800 \text{ cycles}} = 44.6 \%
\end{equation}
\noindent The results, calculated in Equation \ref{equation_computing_calculation} to \ref{equation_load_calculation} can be summarized as follows:\\ \\ 
With the optimal filter length of 45 taps and an update rate of the filter coefficients every cycle, the \ac{ANR} algorithm is able to achieve a \ac{SNR}-Gain of about 11.54 dB, averaged over different signal/noise combinatons. Under this circumstances, the computational load of the \ac{DSP} core amounts about 45\%, which means that 55\% of the time, which a new sample takes to arrive, it can be halted, and therefore, the overall power consumption can be reduced.\\ \\
The initial signal/noise combination of a male speaker disturbed by a breathing noise, which is used for the verification of the \ac{DSP} implementation, delivers with 45 filter coefficients an \ac{SNR}-Gain of about 9.47 dB, which will be again used as a benchmark for the coming evaluations.
\subsubsection{Reduced-update implementation}
The most straight-forward method to further reduce the computing effort for the \ac{DSP} core is to reduce the update frequency of the filter coeffcients. This means, that for every sample, the new filter coefficients are calculated, but not written to the into the Filter Line, meaning that the filter, calculated for the previous sample, is applied to the actual sample. Depending on the acoustic situation, the savings in computing power will most likely lead to a degredation of the noise reduction quality, depending if the current situation is highly dynamic (and therefore would require a frequent update of the filter coefficients) or is rather static. Changing the update frequency, changes the denominator in Equation \ref{equation_c_5} and therefore in Equation \ref{equation_computing_final}.\\ \\
As already mentioned, the reduction of the update rate is evaluated for the signal/noise combination of a male speaker disturbed by a breathing noise. Therefore the \ac{SNR}-Gain of 9.47 dB represents 100\% achievable noise reduction with a maximum of 357 cycles.
\begin{figure}[H]
    \centering
    \includegraphics[width=1.0\linewidth]{Bilder/fig_snr_reduced_update.png}
    \caption{Relative performance of the SNR-Gain, the cycles per samples and the DSP load in regard of the update rate of the ANR algorithm. The baseline is the full update variant the complex usecase. The marked dots represent the results of the simulation for an explicit setup.}
    \label{fig:fig_snr_reduced_update.png}
\end{figure}
\noindent Figure \ref{fig:fig_snr_reduced_update.png} descriptively illustrates the trend of the \ac{SNR}-Gain, the executed cycles per sample and the \ac{DSP} load compared to the full-update algorithm. Contrary to the executed cycles per sample and the load of the processor, the \ac{SNR}-Gain does not behave linear over the course of reducing the update frequency. This behavior allows us, to determinte the update rate, where the benevolent ratio of \ac{SNR}-Gain in regard to \ac{DSP} load can be expected.\\ \\
The maximum offset bewteen the two graphs can be cound found at an updat rate of 0.39, meaning, that an update of the filter coefficients is only conducted in roughly 2 out of 5 samples. Updating Equation \ref{equation_computing_calculation} and \ref{equation_load_calculation} therefore delivers:
\begin{equation}
\label{equation_computing_calculation}
 C_{total} = 45 + (6*45+8)*0.39 + 34 = 188 \text{ cycles}
\end{equation}
\begin{equation}
\label{equation_load_calculation}
    Load_{DSP} = \frac{C_{total}}{C_{budget}} = \frac{188 \text{ cycles}}{800 \text{ cycles}} = 23.5 \%
\end{equation}
The interpreation of this results leads to the coclusion, that the most cost-effective way to reduce the load of the \ac{DSP} would be to reduce the update rate of the filter coefficients to 0.39. This action nearly halfs the processor load, while only reducing the \ac{SNR}-Gain by rougly 31 \% to 6.49 dB. The next step will be to determine the possibilites of a dynamic reduction of the update frequency to further improve the cost-value ratio of our implemenation.
\subsection{Evaluation of the computational load for error driven implementation}
The error-driven implemenation approach focuses on an error metric, over which the decision for an coefficient update is made. 
\subsection{Summary of the performance evaluation}