# A Dual-Adaptive Approach Based on Discrete Cosine Transform for Removal of ECG Baseline Wander
## 3 Results
### Performance Comparison on Real ECG Record
However, it cannot be discovered using the CFF-calculation method based on R-wave occurrence and thence is prone to be eliminated. Fortunately, the proposed method is able to detect this unusual component and'mistake' it for CFF so as to keep it from being removed. In the third experiment, a comparison between the proposed method and the WT-based filter was made. Consecutive numbers eight, nine and ten were respectively chosen as the decomposition level of the WT-based method. The reconstructed BWs using different decomposition levels were plotted overlapping with the original ECG in Figure 6a-c. As Figure 6a shows, when the decomposition level was eight, the reconstructed BW was overfitting which indicated that the decomposition level needed to be higher. However, when the decomposition level was 10, which is too high, as shown in Figure 6c, the reconstructed BW was insufficient to fit the tendency of the ECG, especially in the surrounding areas highlighted by cycles. We obtained the optimal decomposition level nine between eight and ten and the best estimated BW is shown in Figure 6b. Then, the retrieved ECG using the WT-based method at the optimal decomposition level was compared to the one using the proposed method. As Figure 6e shows, although the optimal decomposition level was chosen, the retrieved ECG using the WT-based method still had some distortions in those areas surrounded by ellipses. In contrast, as shown in Figure 6f, it is apparent that BW was fully removed using the proposed method without introducing visible distortions. Figure 5: The comparison in detail from Figure 4, with the first few heartbeats included. (**a**) Original ECG in Figure 4a. (**b**) BW corrected ECG using the \(CFF_{R-wave}\) in Figure 4b. (**c**) BW corrected ECG using the \(CFF_{det}\) in Figure 4c. In the fourth experiment, an ECG signal contaminated with severe BW was deliberately chosen in order to validate the proposed method when handling severe BW. Figure 7 shows the original ECG and the retrieved ECGs using five algorithms in a list fashion. By scrutinizing the middle part of each retrieved ECG, it is clear that BW was not fully removed using algorithms III and V. As for algorithms II and IV, although they fully removed BW, they also introduced visible distortions. The proposed method (algorithm I) achieved the best performance that fully removed BW while preserving the original clinical information. Figure 6: Comparison between the proposed method and the WT-based method (PTB record s00981 rem, lead V2, 00:10-00:19). (**a–c**) The blue waveform is BW contaminated ECG, while the red curve is the estimated BW using algorithm IV when wavelet decomposition levels are 8, 9, and 10. (**d**) The black solid curve is the estimated BW using algorithm IV when wavelet decomposition level is nine (1000 uV offset is added), and the magenta dotted curve is the estimated BW using algorithm I. (**e,f**) BW corrected ECG using algorithm IV (decomposition level = 9) and algorithm I, respectively. Figure 7: Comparisons of the five algorithms for suppressing severe BW (PTB record, s01301 rem, lead AVE, 00:10–00:21).