## 4 Discussion  
The described synchronous filtering approach uses the common-mode signal as a synchronizing reference for demodulation and remodulation of PLI. We make the most of the common-mode signal by extracting the unique information about both the PLI frequency and the level of interference, using this advantage to catch the PLI frequency deviations in the runtime. Nevertheless, the PLI amplitude must be stabilized. The proposed solution is an open-loop AGC, which has a fast response and does not need additional SPLL such as in [37]. The PLI sinusoidal signal is automatically synthesized and is subtracted in an innovative closed-loop digital algorithm. The included integrators in the two servo loops ensure a high DC gain, resulting in a steady-state error of \(\pm 1\) LSB. The loop filter in QDR is optimized for ECG signals by removing the two averages and adding an FDF and QRS limiter in the servo loop. The optimized concept gives superior results when PLI amplitude and frequency are constant but also in cases of amplitude and frequency deviations. The present study offers a major advantage of canceling PLI without distorting the useful differential signal. PLI is removed by summing both the differential- and common-mode signals; thus, in cases where the SF operation is not perfect, residual PLI noise can be introduced, but the trace of the useful ECG signal is preserved. Therefore, the common-mode driven synchronous filtering features a high-Q PLI filtering, where the filter Q factor is adjustable and depends on the closed-loop bandwidth, defined by the coefficient \(k_{i}\) and the amplitude of the common-mode voltage \(V_{REF}\). The PLI amplitude in the differential signal does not affect the stability or the bandwidth of the closed-loop system. For a constant stability reserve and constant settling time, the product \(V_{r}{}^{2}k_{i}\) should remain constant. Thus, \(V_{r}\) amplitude is stabilized by AGC. The simplest AGC suitable for this purpose is an open-loop concept, which has been designed in the methodological background of this study. Compared to existing PLI filters, the most important advantage of the presented SF algorithm is its ability to follow PLI frequency deviations. Moreover, the approach is easily reconfigurable to the frequencies of the standard powerline energy distribution \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & & \multicolumn{2}{c}{**PTB Diagnostic ECG Database**} & \multicolumn{2}{c}{**CTS-ECG Analytical Database**} \\  & & \multicolumn{2}{c}{**12 Leads**} & \multicolumn{2}{c}{**8 Leads**} \\  & **Setting with Maximal** & **MAXE** & **RMSE** & **SNR\({}_{imp}\)** & **MAXE** & **RMSE** & **SNR\({}_{imp}\)** \\  & **Error** & **(\(\mu\)V)** & **(\(\mu\)V)** & **(\(\mu\)B)** & **(\(\mu\)V)** & **(\(\mu\)V)** & **(\(\mu\)B)** \\ \hline \multirow{3}{*}{Test 1: PLI constant (amplitude test)} & Lead II, V2 * & \multirow{3}{*}{(3.5–12.5)} & 6.7 & 1.5 & \multirow{3}{*}{(60)} & 2.4 & 1.1 \\  & & \(f_{PLI}=50\) Hz & & & & (2.3–5.5) & (1.1–1.7) & \\ \hline \multirow{3}{*}{Test 2: PLI constant (frequency test)} & Lead II, V2 * & \multirow{3}{*}{(5–15)} & 8.5 & 2 & \multirow{3}{*}{(57–58)} & 6.4 & 1.5 \\  & & \(f_{PLI}=49.3\)–49.9 Hz & & & & (4–8.2) & (1.4–2.1) & \\ \hline \multirow{3}{*}{Test 3: PLI constant (common-mode phase test)} & Lead II, V2 * & \multirow{3}{*}{(2.5–14)} & 8 & 2 & \multirow{3}{*}{(57–62)} & 5 & 1.6 \\  & & \(f_{PLI}=1000\)\(\mu\)V r.m.s. & (2.5–14) & & & (2.5–8.1) & (0.7–2.8) & \\ \hline \multirow{3}{*}{Test 4: PLI linear amplitude change} & Lead V2 & \multirow{3}{*}{(7–17)} & 12 & 4 & \multirow{3}{*}{(39.8)} & 13 & 5 \\  & & \(f_{PLI}=50\) Hz & & & & (11–14.5) & (2.8–6) & \\ \hline \multirow{3}{*}{Test 5: PLI linear frequency change} & Lead II, V2 * & \multirow{3}{*}{(5–14)} & 8.2 & 1.8 & \multirow{3}{*}{(57.3)} & 6.5 & 1.5 \\  & & \(A_{PLI}=\pm 1000\)\(\mu\)V r.m.s. & (5–14) & & & (4.1–19.8) & (1.2–4.2) & \\ \cline{1-1} \cline{3-5}  & & \(\Delta f_{PLI}=0.1\) Hz/s & & & & & \\ \hline \hline \end{tabular}
\end{table}