ECG segmentation algorithm based on bidirectional hidden semi-Markov model

Comput Biol Med. 2022 Nov:150:106081. doi: 10.1016/j.compbiomed.2022.106081. Epub 2022 Sep 15.

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.

Keywords: CVDs; ECG signal; Hidden semi-markov model; Segmentation; Viterbi algorithm.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Algorithms
  • Arrhythmias, Cardiac
  • Cardiovascular Diseases*
  • Electrocardiography / methods
  • Electrocardiography, Ambulatory
  • Humans
  • Signal Processing, Computer-Assisted*