Skip to main content
Log in

An error-bounded median filter for correcting ECG baseline wander

  • Research
  • Published:
Health Information Science and Systems Aims and scope Submit manuscript

Abstract

The baseline wander (BLW) in electrocardiogram (ECG) is a common disturbance that has a significant influence on the ECG wave pattern recognition. Many methods, such as IIR filter, mean filter, etc., can be used to correct BLW; However, most of them work on the original ECG signals. Compressed ECG data are economic for data storage and transmission, and if the baseline correction can be processed on them, it will be more efficient than we decompress them first and then do such correction. In this paper, we propose a new type of median filter CM_Filter, which works on the synopses of straight lines achieved from ECG by piecewise linear approximation (PLA) under maximum error bound. In CM_Filter, a heuristic strategy “Quick-Finding” is deduced by a property of straight lines in order to get the quality-assured median values from the synopses. The extended experimental tests demonstrate that the proposed filter is very efficient in execution time, and effective for correcting both slow and abrupt ECG baseline wander.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Notes

  1. The disconnected ones are no intersection, the semi-connected ones are intersected between two time stamps and the mix-connected ones include both disconnected and semi-connected representation lines

  2. In general, w is supposed to be odd.

  3. We will use \(ms_i\) to denote both the median point and the median value in the context when there is no confusion.

References

  1. Landmarks: A new model for similarity-based pattern querying in time series databases. In: Proceedings of the 16th International Conference on Data Engineering, ICDE ’00, 2000;p. 33.

  2. Barati Z, Ayatollahi A. Baseline wandering removal by using independent component analysis to single-channel ecg data. In: 2006 International Conference on Biomedical and Pharmaceutical Engineering, 2006; pp. 152–156.

  3. Blalock D, Madden S, Guttag J. Sprintz: Time series compression for the internet of things. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol., 2018;2(3)

  4. Blum M, Floyd RW, Pratt V, Rivest RL, Tarjan RE. Time bounds for selection. J Comput Syst Sci. 1973;7(4):448–61.

    Article  MathSciNet  Google Scholar 

  5. Boucheham B, Ferdi Y, Batouche M. Piecewise linear correction of ecg baseline wander: a curve simplification approach. Comput Methods Programs Biomed. 2005;78(1):1–10.

    Article  Google Scholar 

  6. GB M, RG M. The impact of the mit-bih arrhythmia database. IEEE Eng Med Biol Mag, 2001;20(3):70–5.

  7. Hakimi S, Schmeichel E. Fitting polygonal functions to a set of points in the plane. CVGIP. 1991;53:132–6.

    Google Scholar 

  8. Hamilton PS, Tompkins WJ. Quantitative investigation of qrs detection rules using the mit/bih arrhythmia database. IEEE Trans Biomed Eng. 1986;BME–33(12):1157–65.

    Article  Google Scholar 

  9. Hii K, Narayanamurthy V, Samsuri F. Ecg noise reduction with the use of the ant lion optimizer algorithm. Eng Technol Appl Sci Res. 2019;9:4525–4529, 08.

  10. Hoare C. Algorithm 64: Quicksort. Commun ACM. 1961;4(7):321.

    Google Scholar 

  11. Imai H, Iri M. An optimal algorithm for approximating a piecewise linear function. Inf Process Lett. 1986;9:159–62.

    MathSciNet  Google Scholar 

  12. Keogh E, Chu S, Hart D, Pazzani M. Segmenting time series: a survey and novel approach. Data Min Time Ser Databases. 2004;57:1–21.

    Article  Google Scholar 

  13. Koski A, Juhola M, Meriste M. Syntactic recognition of ecg signals by attributed finite automata. Pattern Recogn. 1995;28(12):1927–40.

    Article  Google Scholar 

  14. Li H, Ditzler G, Roveda J, Li A. Descod-ecg: Deep score-based diffusion model for ecg baseline wander and noise removal. IEEE J Biomed Health Inform. 2023; 1–11.

  15. Lin Z, Wang H. Novel online methods for time series segmentation. IEEE Trans Knowl Data Eng. 2008;20:1616–26.

    Article  Google Scholar 

  16. Luo G, Yi K, Cheng S-W, Li Z, Fan W, He C, Mu Y. Piecewise linear approximation of streaming time series data with max-error guarantees. In: IEEE 31st International Conference on Data Engineering, 2015;pages 173–184.

  17. Mehta S, Chouhan V. Total removal of baseline drift from ecg signal. In: International Conference on Computing: Theory and Applications, 2007;pages 512–515.

  18. Mohammed A. Fpga realization for baseline wander noise cancellation of ecg signals using wavelet transform. Int J Comput Appl. 2017;168:1–6.

    Google Scholar 

  19. O’Rourke J. An on-line algorithm for fitting straight lines between data ranges. Commun ACM. 1981;24:574–8.

    Article  Google Scholar 

  20. Pang C, Zhang Q, Zhou X, Hansen D, Wang S, Maeder A. Computing unrestricted synopses under maximum error bound. Algorithmica. 2013;65(1):1–42.

    Article  MathSciNet  Google Scholar 

  21. Paul A, Das N, Pal S, Mitra M. Automated detection of cardinal points of ecg signal for feature extraction using a single median filter. J Inst Eng (India): Series B, 2022.

  22. Poosala V, Haas PJ, Ioannidis YE, Shekita EJ. Improved histograms for selectivity estimation of range predicates. SIGMOD Rec. 1996;25(2):294–305.

    Article  Google Scholar 

  23. Pottala EW, Bailey JJ, Horton MR, Gradwohl JR. Suppression of baseline wander in the ecg using a bilinearly transformed, null-phase filter. J Electrocardiol. 1990;22:243–7.

    Article  Google Scholar 

  24. Pu J, Sheng D, Hanqi G, Kai Z, Jiannan T, Dingwen T, Xin L, Cappello F. Toward quantity-of-interest preserving lossy compression for scientific data. PVLDB, 2022;16(4).

  25. Qian G, Xin L, Ben W et al. Maintaining trust in reduction: Preserving the accuracy of quantities of interest for lossy compression. In SMC, pages 22–39, 2021.

  26. Romero F, Piol D, Seisdedos C. Deepfilter: An ecg baseline wander removal filter using deep learning techniques. Biomed Signal Process Control. 2021;70: 102992.

    Article  Google Scholar 

  27. Xie Q, Pang C, Zhou X, Zhang X, Deng K. Maximum error-bounded piecewise linear representation for online stream approximation. VLDB J. 2014;23(6):915–37.

    Article  Google Scholar 

  28. Xin Y, Chen Y, Hao WT. Ecg baseline wander correction based on mean-median filter and empirical mode decomposition. Bio-med Mater Eng. 2014;24(1):365–71.

    Article  Google Scholar 

  29. Xueyan G, Tongliang L, Xiaoyun L, Huanyu Z, Suzhen W, Chaoyi P. An efficient multidimensional \(\text{ l}_{\infty }\) wavelet method and its application to approximate query processing. World Wide Web. 2021;24(1):105–33.

    Article  Google Scholar 

  30. Zhao H, Li T, Chen G, Dong Z, Bo M, Pang C. An online PLA algorithm with maximum error bound for generating optimal mixed-segments. Int J Mach Learn Cybern. 2020;11(7):1483–99.

    Article  Google Scholar 

  31. Zhao H, Pang C, Kotagiri R, Pang CK, Deng K, Yang J, Li T. An optimal online semi-connected pla algorithm with maximum error bound. IEEE Trans Knowl Data Eng. 2022;34(1):164–77.

    Google Scholar 

Download references

Acknowledgements

We thank the data providers of [6] for the testing data sets. This work was partially supported by the Hebei Natural Science Foundation (No. F2020302001), the Hebei Academy of Sciences Project (No. 20606), the Hebei “One Hundred Plan” Project (No. E2012100006), the Hebei Science and technology development fund projects guided by the central government (No.206Z010G).

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Jian Yang or Chaoyi Pang.

Ethics declarations

Conflict of interest

We declare that we have no financial and personal relationships with other people or organizations that can inappropriately influence our work, there is no professional or other personal interest of any nature or kind in any product, service and/or company that could be construed as influencing the position presented in, or the review of, the manuscript entitled, “An error-bounded median filter for correcting ECG baseline wander”.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zhao, H., Li, T., Yang, J. et al. An error-bounded median filter for correcting ECG baseline wander. Health Inf Sci Syst 11, 45 (2023). https://doi.org/10.1007/s13755-023-00235-w

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s13755-023-00235-w

Keywords

Navigation