Related Experiment Video
Updated: Aug 28, 2025

Analyzing Long-Term Electrocardiography Recordings to Detect Arrhythmias in Mice
Published on: May 23, 2021
ECG segmentation algorithm based on bidirectional hidden semi-Markov model
Rui Huo1, Liting Zhang2, Feifei Liu3
1School of Control Science and Engineering, Shandong University, Jinan, China.
Insights
A new bidirectional hidden semi-Markov model (BI-HSMM) accurately segments electrocardiogram (ECG) waves for cardiovascular disease (CVD) detection. This method improves ECG analysis for both resting and wearable dynamic ECG signals.
Area of Science:
- Biomedical Signal Processing
- Machine Learning in Healthcare
- Cardiovascular Diagnostics
Background:
- Accurate electrocardiogram (ECG) wave segmentation is vital for diagnosing cardiovascular diseases (CVDs).
- Traditional methods may face challenges in segmenting complex ECG waveforms, especially in dynamic monitoring scenarios.
- The need for robust and automated ECG segmentation techniques is increasing with the prevalence of CVDs.
Purpose of the Study:
- To propose a novel bidirectional hidden semi-Markov model (BI-HSMM) for precise ECG wave segmentation.
- To evaluate the performance of the BI-HSMM method on standard ECG databases and real-world wearable dynamic ECG (DCG) signals.
- To demonstrate the utility of the BI-HSMM in aiding the detection and monitoring of cardiovascular diseases.
Main Methods:
- Developed a BI-HSMM incorporating probability distributions of ECG waveform durations.
- Extracted four feature vectors as observation sequences for the hidden Markov model (HMM).
- Employed logistic regression (LR) for parameter training and an improved Viterbi algorithm for segmentation, utilizing forward prediction and backward backtracking.
Main Results:
- Achieved high accuracy (97.98%) and F1 scores (P wave: 98.37%, QRS wave: 97.60%, T wave: 97.79%) on the QT database.
- Demonstrated superior performance on wearable dynamic ECG (DCG) signals with 99.71% detection accuracy and >99% F1 scores for all waveforms.
- Validated the BI-HSMM's significant ability to segment both resting and DCG signals effectively.
Conclusions:
- The proposed BI-HSMM offers a significant advancement in ECG wave segmentation accuracy.
- This method is highly effective for both standard resting ECG and real-time wearable DCG signal analysis.
- The BI-HSMM shows considerable promise for improving the early detection and continuous monitoring of cardiovascular diseases.
Abstract:
Accurate segmentation of electrocardiogram (ECG) waves is crucial for cardiovascular diseases (CVDs). In this study, a bidirectional hidden semi-Markov model (BI-HSMM) based on the probability distributions of ECG waveform duration was proposed for ECG wave segmentation. Four feature-vectors of ECG signals were extracted as the observation sequence of the hidden Markov model (HMM), and the statistical probability distribution of each waveform duration was counted. Logistic regression (LR) was used to train model parameters. The starting and ending positions of the QRS wave were first detected, and thereafter, bidirectional prediction was employed for the other waves. Forwardly, ST segment, T wave, and TP segment were predicted. Backwardly, P wave and PQ segments were detected. The Viterbi algorithm was improved by integrating the recursive formula of the forward prediction and backward backtracking algorithms. In the QT database, the proposed method demonstrated excellent performance (Acc = 97.98%, F1 score of P wave = 98.37%, F1 score of QRS wave = 97.60%, F1 score of T wave = 97.79%). For the wearable dynamic electrocardiography (DCG) signals collected by the Shandong Provincial Hospital (SPH), the detection accuracy was 99.71% and the F1 of each waveform was above 99%. The experimental results and real DCG signal validation confirmed that the proposed new BI-HSMM method exhibits significant ability to segment the resting and DCG signals; this is conducive to the detection and monitoring of CVDs.
More Related Videos
11:25Simultaneous Scalp Electroencephalography EEG, Electromyography EMG, and Whole-body Segmental Inertial Recording for Multi-modal Neural Decoding
Published on: July 26, 2013
04:48Application of Deep Learning-Based Medical Image Segmentation via Orbital Computed Tomography
Published on: November 30, 2022