Elsevier

Computers in Biology and Medicine

Volume 79, 1 December 2016, Pages 21-29
Computers in Biology and Medicine

ECG segmentation and fiducial point extraction using multi hidden Markov model

https://doi.org/10.1016/j.compbiomed.2016.09.004Get rights and content

Highlights

  • A method is proposed to extract fiducial points of ECG signals.

  • Each segment of an ECG beat is represented by a separate ergodic continuous density HMM.

  • It compares the log-likelihood of two consecutive HMMs and estimate a multi-level path.

  • Fiducial points are estimated from this path.

  • The method is applied to the Physionet QT database and a Swine ECG database.

  • The method outperforms other benchmark methods.

Abstract

In this paper, we propose a novel method for extracting fiducial points (FPs) of electrocardiogram (ECG) signals. We propose the use of multi hidden Markov model (MultiHMM) as opposed to the traditional use of Classic HMM. In the MultiHMM method, each segment of an ECG beat is represented by a separate ergodic continuous density HMM. Each HMM has different state number and is trained separately. In the test step, the log-likelihood of two consecutive HMMs is compared and a path is estimated, which shows the correspondence of each part of the ECG signal to the HMM with the maximum log-likelihood. Fiducial points are estimated from the obtained path. For performance evaluation, the Physionet QT database and a Swine ECG database are used and the proposed method is compared with the Classic HMM and a method based on partially collapsed Gibbs sampler (PCGS). In our evaluation using the QT database, we also compare the results with low-pass differentiation, hybrid feature extraction algorithm, a method based on the wavelet transform and three HMM-based approaches. For the Swine database, the root mean square error (RMSE) values, across all FPs for MultiHMM, Classic HMM and PCGS methods are 13, 21 and 40 ms, respectively and the MultiHMM exhibits smaller error variability than other methods. For the QT database, RMSE values for MultiHMM, Classic HMM, Wavelet and PCGS methods are 10, 17, 26 and 38 ms, respectively. Our results demonstrate that our proposed MultiHMM approach outperforms other benchmark methods that exist in the literature; therefore can be used in practical ECG fiducial point extraction.

Introduction

The electrocardiogram (ECG) is used for measuring the electrical activity of the heart. ECG signal is obtained non-invasively by a simple device and provides valuable information about the health and heart diseases in humans. Acquiring the ECG signal and using its information are inexpensive and helpful [1].

Measurements used by cardiologists for detecting pathological beats and heart diseases are actually based on features like heart rate variability, and various intervals or segments between waves of successive beats. In this purpose, it is mandatory to be able to accurately estimate onset, offset and peak locations of the P, Q, R, S and T waves of each ECG. ECG segmentation and finding the onset and offset of ECG waves are difficult task due to lack of precise definition for onset and offset of some ECG waves, for example, there is no exact definition for the offset of QRS complex and T-wave [1].

Several techniques have been proposed for QRS complex detection including filtering and derivation, adaptive filtering, dynamic programming, classification methods, mathematical morphology methods and transformations [2], [3]. Low pass differentiation (LPD) [4], hidden Markov models [5], [6], [7], [8], [9], [10], [11], [12], [13], partially collapsed Gibbs sampler (PCGS) [14], [15], wavelet transform [16], [17], [18], correlation analysis [19], [20], support vector machine (SVM) [21], empirical mode decomposition (EMD) [22] and extended Kalman filter (EKF) [23], [24], [25] are also used for ECG segmentation and fiducial point (FP) extraction.

Finding the onset, offset and peak of ECG waves is known as fiducial point extraction which can be used as a preprocessing step in many applications [26]. In [27], the authors first extract some features from ECG signals such as P-wave, QRS complex, T-wave amplitude and duration. After that they used the extracted features for detection of fragmented QRS complex. In [28], the authors used the initial estimation of ECG waves and their onset and offset locations for mobile health care applications. They used both time and frequency analysis and called it as a hybrid feature extraction algorithm (HFEA). Onset and offset of the P-wave and QRS complex were used as the input to the model which was proposed by Bono et al. [29] for a “Selvester QRS scoring” system. Finally, Kumar et al. [30] used the onset and offset of ECG waves for ischemia detection.

Hidden Markov model (HMM) is a model for describing the process which is not directly observable but can be observed with sequence of symbols [31]. HMMs were used for several applications: speech recognition [32], apnea identification [33], apnea-bradycardia detection in preterm infants [34], [35], [36], segmentation of heart sound recordings [37], estimation of fetal cardiac timing events [38] and FP extraction [7].

HMM is one of the approaches which is used for ECG segmentation. In most of the previous HMM-based approaches [6], [9], each ECG beat is modeled with a single HMM and ECG waves and baselines are considered as states of a HMM model. In these approaches, ECG beats are considered as an observation of HMM model and parameters of HMM are found using training data set with supervised or unsupervised learning methods. In the test step, ECG segmentation is done using the inference algorithms.

Supervised learning methods require to accurately label the observations. In contrast, unsupervised learning methods work automatically and do not require the labels of observation symbols and the relevant hidden states, but these methods may suffer from falling into local maxima due to the ill-suited initial values. Hence, in some cases the obtained results are not accurate, especially for the ECG segmentation and fiducial point extraction [11].

It is worth noting that: (i) HMMs have been used in previous works, for ECG segmentation and detection of ECG waves [6], [7], [8], [9], [13], or for beat detection and classification [5], [7], [9], [11], while our work is focused on fiducial point extraction, which is a much more complex task. Only [7] proposed a HMM model for such purpose, but considering wavelet transform of the ECG signal, (ii) Most of these studies are based on supervised learning approach which need the accurate labels of expert and are time consuming, (iii) In some works [6], [7], [8], [9] encoded ECG by the wavelet transform or the coefficients of wavelet in different scales are used as an observation of HMM models, (iv) Some works [6] use hidden semi-Markov model to improve the results and solve the “double beat segmentation” problem.

Conversely, we will show that the proposed approach has many advantageous over previous methods. It is used for ECG fiducial point extraction, it uses raw ECG signal as an observation of HMM and finally can solve the double beat segmentation problem and also can accurately estimate fiducial points for many pathological beats.

In this paper, the approach for extracting ECG fiducial points is based on HMM, too. It is called “MultiHMM” since one HMM model is considered for each ECG segment and in the training step, a rough segmentation is performed to define the training data for each HMM. Then, the Baum-Welch algorithm is used to find the parameters of each HMM, separately. Afterwards in the test step, the label of the current beat segment (i.e., the most appropriate HMM model) is estimated through comparison of log-likelihood of HMMs.

The performance of the proposed method is compared with previously published methods, including Wavelet [17], LPD [4], PCGS [14], HFEA [28], three HMM-based approaches [7] and “Classic HMM”. Validation and comparison are done on the Physionet QT database [39], [40] and an annotated Swine ECG database [41].

The rest of this paper is organized as follows: Related work, essentially methods used in performance comparison, are described in Section 2. The proposed method is explained in Section 3. Section 4 presents the experimental results, and finally Section 5 concludes the paper.

Section snippets

A method based on wavelet transform

In [17], a method based on the wavelet transform is used for finding the fiducial points of ECG waves. In this method, wavelet decomposition into 5 scales (2125) is used. Because most of the energy of QRS complexes lies in scales 2124 and for P and T waves, most of the energy lies within scales 2425. Local maxima, minima and zero crossings at different scales are used to detect the QRS complexes, P- and T-waves and their peak, onset and offsets.

Partially collapsed Gibbs sampler method (PCGS)

Lin et al. [14] proposed a method based on

Methodology of MultiHMM

In the MultiHMM method, each segment of an ECG beat (Fig. 2) is represented by a separate ergodic continuous density HMM. Similar state numbers are not assumed for different HMMs. The AIC or BIC criterion is used to obtain a rough estimation of the number of states, and the exact number of states in each HMM is found experimentally in the training step. First we detect the R-peaks of ECG beats and associate a linear phase between π to π to it, similar to Sameni et al. [44] (R-peaks have phase

Results for the Swine database

Fig. 4(a) shows the estimated path by the Classic HMM for a small segment of the record Ischemia09 of the Swine database. It also shows the estimated fiducial points by the Classic HMM which are found from the estimated path. Fig. 4(b) shows the estimated path and FPs by the MultiHMM approach for this record. It is worth to mention that these subfigures are illustrative examples of what the estimated path looks like and clarify how the onset and offset of waves can be found from the transition

Discussion and conclusions

In this paper, a novel method (MultiHMM) for ECG fiducial point extraction is proposed. Experiments carried out on ECG signals from QT and Swine databases show that the MultiHMM performance is better than the state of the art ECG delineators such as Classic HMM, PCGS, LPD, HFEA, Wavelet and three HMM-based approaches.

The main contribution of this paper is proposing a MultiHMM model for ECG FP extraction, which for each ECG wave or segment, a separate HMM is considered and the parameters of each

Conflict of interest

None declared.

Acknowledgment

This work has been partly supported by the Ph.D. scholarship of the French Embassy and the European Project ERC-2012-AdG-320684-CHESS.

References (51)

  • A. Gacek, W. Pedrycz, ECG Signal Processing, Classification and Interpretation: A Comprehensive Framework of...
  • B. Kohler et al.

    The principles of software QRS detection: reviewing and comparing algorithms for detecting this important ECG waveform

    IEEE Eng. Med. Biol.

    (2002)
  • D.A. Coast et al.

    An approach to cardiac arrhythmia analysis using hidden Markov models

    IEEE Trans. Biomed. Eng.

    (1990)
  • N.P. Hughes, Probabilistic models for automated ECG interval analysis, Ph.D. thesis, Department of Engineering Science,...
  • R. Andreao et al.

    ECG signal analysis through hidden Markov models

    IEEE Trans. Biomed. Eng.

    (2006)
  • S. Krimi, K. Ouni, N. Ellouze, An approach combining wavelet transform and hidden Markov models for ECG segmentation,...
  • R. Andreao et al.

    Combining wavelet transform and hidden Markov models for ECG segmentation

    EURASIP J. Adv. Signal Process.

    (2006)
  • J. Thomas, C. Rose, F. Charpillet, A multi-HMM approach to ECG segmentation, in: International Conference on Tools with...
  • W. Liang et al.

    A novel approach to ECG classification based upon two-layered HMMs in body sensor networks

    Sensors

    (2014)
  • H. Li, J. Tan, ECG segmentation in a body sensor network using hidden Markov models, in: International Workshop on...
  • C. Lin et al.

    P- and T-wave delineation in ECG signals using a Bayesian approach and a partially collapsed Gibbs sampler

    IEEE Trans. Biomed. Eng.

    (2010)
  • C. Lin, G. Kail, J.Y. Tourneret, C. Mailhes, F. Hlawatsch, P and T wave delineation and waveform estimation in ECG...
  • C. Li et al.

    Detection of ECG characteristic points using wavelet transforms

    IEEE Trans. Biomed. Eng.

    (1995)
  • J.P. Martinez et al.

    A wavelet-based ECG delineator: evaluation on standard databases

    IEEE Trans. Biomed. Eng.

    (2004)
  • J. Dumont et al.

    Improving ECG beats delineation with an evolutionary optimization process

    IEEE Trans. Biomed. Eng.

    (2010)
  • Cited by (38)

    • Post-processing refined ECG delineation based on 1D-UNet

      2023, Biomedical Signal Processing and Control
      Citation Excerpt :

      Machine-learning is another frequently adopted strategy in developing automatic ECG delineation algorithms. The recently reported works using Hidden Markov Model [12–14], Bayesian model [15], Gaussian mixture model [16] are all of this type. Their performance severely depends on the effectiveness of the features extracted from the dataset.

    • ECG PQRST complex detector and heart rate variability analysis using temporal characteristics of fiducial points

      2021, Biomedical Signal Processing and Control
      Citation Excerpt :

      In addition, it is difficult to find the correct onset and offset points because the detection of these points is determined by resolution scale detail coefficients. Akhbari et al. presented an ECG segmentation and fiducial point extraction method using a multiple hidden Markov model [47]. The disadvantage of this method is that the number of states required depends on the complexity of the ECG signal, and the window length and oscillation prevention factor must be experimentally individually obtained for each record.

    • A greedy graph search algorithm based on changepoint analysis for automatic QRS complex detection

      2021, Computers in Biology and Medicine
      Citation Excerpt :

      However, achieving high performance when the signal-to-noise ratio is high remains challenging for these algorithms. Hidden Markov models are also widely used in ECG segmentation because they are powerful tools for considering the temporal dependency among the waveforms [13–15]. The majority of the studies on machine learning-based methods have utilized sparse signal processing to represent an approximation of the nonlinear ECG signal using sparsity constraints [16–21].

    View all citing articles on Scopus
    View full text