## 3 Results
### Test of SF Algorithm with PTB Diagnostic ECG Database
#### 3.2.2 Test 2: PLI Constant (Frequency Test)  
The design of PLI constant (frequency test) in Table 2 simulates 41 different PLI frequencies in the range of 48-52 Hz and step of 0.1 Hz. In order to study potentially maximal errors induced by different PLI frequencies, we simulated the worst-case scenario in Figure 10, which is highlighted for the extreme PLI amplitude of 1000 \(\mu\)V r.m.s. in lead II (\(SNR_{in}=-10\) dB, shown in Figure 9). According to the statistical distributions in Figure 11, the minimal errors (MAXE, RMSE) and maximal \(SNR_{imp}\) are observed for frequencies approaching an integer multiple of the sampling rate to \(f_{PLI}\), equal to 50 Hz (2000/40), 51.28 Hz (2000/39), and 48.78 Hz (2000/41) due to adjusting the processing window of the  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **PLI Ampl.** & **PLI Ampl.** & **PLI Frequency** & **PLI Frequency** & **\(V_{REF}\) Phase** & **ECG Leads** \\  & **(\(\mu\)V)** & **(\(\mu\)V)** & **(\(\mu\)V)** & **(\(\mu\)V)** & **(\(\mu\)V)** & **(\(\mu\)V)** & **(\(\mu\)V)** \\ \hline Test 1: PLI constant & 50, 100, 200, 500, & 0 & 50 & 0 & 0 & 12 leads \\ (amplitude test) & 1000 & 0 & (48, 48.1, 48.2, \(\ldots\), 51.8, 51.9, 52) & 0 & 0 &
\begin{tabular}{c} worst lead in \\ Test 1 \\ \end{tabular} \\ \hline Test 3: PLI constant & & & & & & (0, 45, 90, 135, \\ (common-mode & 1000 & 0 & (48, 49, 50, 51, 52) & 0 & 180, 225, \\ phase test) & & & & & 270, 315) & \\ \hline Test 4: PLI linear & (50, 100, 200, 500, & \(\pm\)(10, 20, 40, \\ amplitude change & 1000) & 100, 200) & 50 & 0 & 0 & 12 leads \\ \hline Test 5: PLI linear & 1000 & 0 & 50 & \(\pm\)(0.01, 0.025, \\ frequency change & 1000 & 0 & 50 & 0.05, 0.075, 0.1) & 0 & 12 leads \\ \hline \hline \end{tabular}
\end{table}
Table 2: Simulation parameters of PLI with duration of 10 s for five test scenarios with PTB Diagnostic ECG database.  
Figure 9: SNR characteristics for PLI constant (amplitude test), computed for 10 s 12-lead ECG from the PTB Diagnostic ECG database and added PLI sinusoid with settings according to Table 2 (Test 1). The boxplots of \(SNR_{in}\), \(SNT_{out}\), \(SNT_{imp}\) (median; box: 25–75%; whisker: min-max) for 12 ECG leads are ordered (from left to right): I, II, III, avR, avL, avF, V1, V2, V3, V4, V5, V6.  
LPF in the implemented AGC. Nevertheless, the performance span is very narrow within the full frequency range (48-52 Hz), estimated as the median value (min-max range) of RMSE = 2.5-3 mV (1.2-3.9 mV), MAXE = 6.5-8.5 mV (3.6-15 mV), \(SNR_{imp}\) = 56.8-59.5 dB.  
Figure 11: SF algorithm performance for PLI constant (frequency test), computed for 10 s with the PTB Diagnostic ECG database (lead II) and added PLI sinusoid with settings according to Table 2 (Test 1). The boxplots present MAXE, RMSE, and \(SNR_{imp}\) statistical distributions (median; box: 25–75%; whisker: min–max).  
Figure 10: SF algorithm errors for PLI constant (amplitude test), computed for 10 s 12-lead ECG from the PTB Diagnostic ECG database and added PLI sinusoid with settings according to Table 2 (Test 1). The boxplots of MAXE and RMSE (median; box: 25–75%; whisker: min–max) for 12 ECG leads are ordered (from left to right): I, II, III, avR, avL, avF, V1, V2, V3, V4, V5, V6. The red arrows indicate the worst case with highest errors MAXE and RMSE found in lead II and \(A_{PLI}\) = 1000 mV r.m.s.