## 4 Results
### Signal to Noise Ratio Analysis  
In this subsection the influence of the signal to noise ratio with regard to the filtering efficiency is analyzed. During the tests the ECG signal was distorted by the 50 Hz powerline interference of various strengths. The signal to noise ratio (SNR) is defined as follows:  
\[SNR=10\log_{10}\frac{\sum_{i=1}^{N}x(i)^{2}}{\sum_{i=1}^{N}d(i)^{2}}, \tag{17}\]  
Figure 10: Comparison of the time-varying filters based on the Bézier parametric curve and exponential function. \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Filter Structure** & **SNR\({}_{imp}\)** & **\(\rho\)** & **PRD** & **MSE** \\ \hline Time-invariant IIR filter & 12.9779 & 0.9980 & 0.0635 & 0.0040 \\ Time-varying filter based on exponential function & 3.2390 & 0.9854 & 0.6309 & 0.3981 \\ Proposed time-varying filter based on Bézier curve & 22.9725 & 0.9998 & 0.0201 & 0.0004 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparison of the efficiency of the time-invariant notch filter and time-varying filters based on the Bézier parametric curve and exponential function in case of distorted ECG input signal. Figure 9: Comparison of the time-invariant IIR filter and the proposed time-varying filter based on Bézier curve. where \(N\) denotes the signal length, \(x(i)\) is the input noised signal, and \(d(i)\) denotes the sinusoidal interference given by the following equation:  
\[d(n)=A\sin{(\omega n+\phi)}, \tag{18}\]  
where \(A\) is the ampliude of the intereference, \(\omega\) denotes the frequency of the interference, and \(\phi\) is the phase shift. In Table 6 the values of the mean square error for all tested SNRs are presented. Small value of the MSE means that the notch filter output \(y(n)\) is close to the original ECG signal \(s(n)\). Table 8 presents cross-correlation coefficients for tested cases. The closer the \(\rho\) index is to unity, the stronger the correlation between the filter output signal and the original ECG signal. The filter based on Bezier curve pole radius variability achieves the highest values of the cross-correlation coefficient if compared to the traditional time-invariant filter and the time-varying filter based on exponential function proposed in [12]. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**SNR Ratio**} & **Time-Invariant Filter** & **Time-Varying Filter** & **Proposed Time-Varying Filter** \\  & **Filter** & **Based on Exponential Function** & **Based on Bézier Curve** \\ \hline \(-40\) & 63.6866 & 39.4294 & 14.2554 \\ \(-30\) & 6.3808 & 3.9562 & 1.4377 \\ \(-20\) & 0.6507 & 0.4086 & 0.1564 \\ \(-10\) & 0.0778 & 0.0537 & 0.0284 \\ \(-5\) & 0.0343 & 0.0268 & 0.0187 \\ \(0\) & 0.0206 & 0.0182 & 0.0157 \\ \(5\) & 0.0163 & 0.0155 & 0.0147 \\ \(10\) & 0.0149 & 0.0147 & 0.0144 \\ \(20\) & 0.0143 & 0.0143 & 0.0143 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison of the MSE for the time-invariant notch filter and time-varying filters based on the Bézier parametric curve and exponential function for various values of the signal to noise ratio (SNR). \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**SNR Ratio**} & **Time-Invariant Filter** & **Time-Varying Filter** & **Proposed Time-Varying Filter** \\  & **Filter** & **Based on Exponential Function** & **Based on Bézier Curve** \\ \hline \(-40\) & 7.9804 & 6.2793 & 3.7756 \\ \(-30\) & 2.5260 & 1.9890 & 1.1990 \\ \(-20\) & 0.8067 & 0.6392 & 0.3955 \\ \(-10\) & 0.2790 & 0.2318 & 0.1686 \\ \(-5\) & 0.1853 & 0.1636 & 0.1368 \\ \(0\) & 0.1435 & 0.1350 & 0.1252 \\ \(5\) & 0.1275 & 0.1246 & 0.1213 \\ \(10\) & 0.1220 & 0.1211 & 0.1200 \\ \(20\) & 0.1197 & 0.1196 & 0.1195 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Comparison of the percentage root mean square difference for the time-invariant notch filter and time-varying filters based on the Bézier parametric curve and exponential function for various values of the SNR. Table 9 presents the SNR improvement indices for all cases.