ECG segmentation and fiducial point extraction using multi hidden Markov model
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 is used. Because most of the energy of QRS complexes lies in scales and for P and T waves, most of the energy lies within scales . 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)
- et al.
Current methods in electrocardiogram characterization
Comput. Biol. Med.
(2014) - et al.
Automatic detection of wave boundaries in multi-lead ECG signals: validation with the CSE database
Comput. Biomed. Res.
(1994) - et al.
Incremental HMM training applied to ECG signal analysis
Comput. Biol. Med.
(2008) - et al.
A correlation analysis-based detection and delineation of ECG characteristic events using template waveforms extracted by ensemble averaging of clustered heart cycles
Comput. Biol. Med.
(2014) - et al.
Real-time electrocardiogram P-QRS-T detection-delineation algorithm based on quality-supported analysis of characteristic templates
Comput. Biol. Med.
(2014) - et al.
Combined entropy based method for detection of QRS complexes in 12-lead electrocardiogram using SVM
Comput. Biol. Med.
(2008) - et al.
Empirical mode decomposition based ECG enhancement and QRS detection
Comput. Biol. Med.
(2012) - et al.
Ischemia detection using isoelectric energy function
Comput. Biol. Med.
(2016) - et al.
Building a cepstrum-HMM kernel for apnea identification
Neurocomputing
(2014) - et al.
Statistical methods for assessing agreement between two methods of clinical measurement
Int. J. Nurs. Stud.
(2010)
The principles of software QRS detection: reviewing and comparing algorithms for detecting this important ECG waveform
IEEE Eng. Med. Biol.
An approach to cardiac arrhythmia analysis using hidden Markov models
IEEE Trans. Biomed. Eng.
ECG signal analysis through hidden Markov models
IEEE Trans. Biomed. Eng.
Combining wavelet transform and hidden Markov models for ECG segmentation
EURASIP J. Adv. Signal Process.
A novel approach to ECG classification based upon two-layered HMMs in body sensor networks
Sensors
P- and T-wave delineation in ECG signals using a Bayesian approach and a partially collapsed Gibbs sampler
IEEE Trans. Biomed. Eng.
Detection of ECG characteristic points using wavelet transforms
IEEE Trans. Biomed. Eng.
A wavelet-based ECG delineator: evaluation on standard databases
IEEE Trans. Biomed. Eng.
Improving ECG beats delineation with an evolutionary optimization process
IEEE Trans. Biomed. Eng.
Cited by (38)
Post-processing refined ECG delineation based on 1D-UNet
2023, Biomedical Signal Processing and ControlCitation 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 ControlCitation 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 MedicineCitation 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].
A knowledge-based deep learning method for ECG signal delineation
2020, Future Generation Computer SystemsSEResUTer: a deep learning approach for accurate ECG signal delineation and atrial fibrillation detection
2023, Physiological MeasurementHeart arrhythmia detection based on ECG wave classification using neural network and Fuzzy Inference system
2023, ACM International Conference Proceeding Series