an approach to ecg delineation using wavelet analysis and hidden markov models
DESCRIPTION
An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models. Maarten Vaessen (FdAW/Master Operations Research) Iwan de Jong (IDEE/MI) Ronald Westra (FdAW/Math) Jo ë l Karel (FdAW/Math). Presentation overview. ECG Wavelet Analysis Hidden Markov Models WTSign Method - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/1.jpg)
An Approach to ECG Delineation using Wavelet
Analysis and Hidden Markov Models
Maarten Vaessen(FdAW/Master Operations Research)
Iwan de Jong (IDEE/MI)
Ronald Westra (FdAW/Math)
Joël Karel (FdAW/Math)
![Page 2: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/2.jpg)
Presentation overview
• ECG
• Wavelet Analysis
• Hidden Markov Models
• WTSign Method
• Tests & Results
• Conclusions
• Questions
![Page 3: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/3.jpg)
ElectroCardioGram
• Important components: QRS complex and T-wave.• QT-time clinically important.• Wide variety of morphologies possible.• Automatic analysis is difficult.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 4: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/4.jpg)
• Wavelet Transformation (WT) decomposes signal in time-frequency space.– Different ECG waves have different temporal
features and different frequency content.– Visible at different locations and scales.– Filter noise.– Filter baseline-drift.
• Wavelet function (Mother wavelet) determines WT properties.
Wavelet Analysis
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 5: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/5.jpg)
Gaussian Wavelet
• Mother wavelet 1st derivative of Gaussian function (DOG)– WT of signal with Gaussian wavelet ψ(t) is the derivative of signal
smoothed by Gaussian window θ(t).
– Zero-crossings in WT maxima or minima signal.
– Maxima or minima in WT point of inflection in signal
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 6: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/6.jpg)
dt
ftWf )()(1
),(
ECG/Wavelet/HMM/WTSign/T&R/Conc
2
4
8
16
32
ECG
![Page 7: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/7.jpg)
WT based methods
• Wavelet Transform Modulus Maxima Method – Use the local modulus maxima (MM) in WT to
detect ECG peaks– QRS = positive MM followed by negative MM– Features WT
• Amplitude MM
• Lipschitz exponent (measure for regularity signal).
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 8: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/8.jpg)
Properties WTMM
• WTMM uses decision rules and thresholds for detection.
• Disadvantages: – Thresholds are ‘hard’.– Difficult to extend method.– Not well suited for real-time analysis.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 9: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/9.jpg)
Hidden Markov Model
• Probabilistic model – Markov-chain capture cyclic nature of ECG
components (P, QRS, T).– Can model statistical properties of the ECG.– Decisions are derived from maximum
likelihood.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 10: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/10.jpg)
O1 O2 O3
bb1(O1) bQRS(O2) bQRS(O3)
O4 O5
bQRS(O4) bT(O5)
Markov chain:
Observation sequence:
HMM Topology
ECG/Wavelet/HMM/WTSign/T&R/Conc
p
QRS
Tb2
b1
b1 TQRSP b2
Observation Probabilities:
ab2-b2
ab2-P
![Page 11: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/11.jpg)
HMM Parameters
• Train model supervised– State transitions probabilities derive from
annotated ECG.
– Observations Ot = Wf(t,{2,4,8}).
– Observation probabilities Gaussian mixture model, 2 mixtures.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 12: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/12.jpg)
HMM Detection
• Viterbi algorithm– Given the observation sequence.– Calculate most probable state sequence.
– Relate observation Ot to a certain state.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 13: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/13.jpg)
HMM State durations
• Modeling an ECG wave:– ECG wave (e.g. T-wave) has a certain duration
(number of samples in digitized signal).– For a correct detection, the HMM has to be in
the T-state for the duration of the T-wave.– Example: T-wave duration 0.1 sec. 40
samples.– The HMM has to make a self-transition from
state ‘T’ to state ‘T’ 40 times.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 14: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/14.jpg)
HMM State duration
T0.95
0.05 ?
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 15: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/15.jpg)
HSMM
• Hidden Semi-Markov Model– State-durations are modeled explicitly by a
duration probability function– No more self-transitions.– HSMM can perform the same tasks as HMM
(Viterbi).
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 16: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/16.jpg)
HSMM
b1 TQRSP b3
O1,O2,…,Od1
p(d1)
ECG/Wavelet/HMM/WTSign/T&R/Conc
p
QRS
Tb2
b1
![Page 17: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/17.jpg)
HSMM
• How do we calculate the observation probability– HMM bi(Ot).– HSMM
bP(O1,O2,…,Od1) = bP(O1)*bP(O2)*…* bP(Od1).
• Is this a good classifier?– No, WT is not Gaussian.– Observations are not independent.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 18: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/18.jpg)
Conclusions so far
ECG/Wavelet/HMM/WTSign/T&R/Conc
• Markov chain of HMM can model the cyclic nature of the ECG components.
• Normal HMM has problems modeling long state durations.
• HSMM deals with this, but at the cost of increased computational complexity
– HMM O(N2T),
– HSMM O(N2T ½ D2 ), ½ D2 = 20000!
• Observation probabilities are not a strong classifier.
![Page 19: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/19.jpg)
WTSign Methode
• ECG components consist of rising and falling edges
• First localize edges in ECG by wavelet coefficients.
• Then classify them by a HMM.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 20: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/20.jpg)
Localization
• Localization of edges in ECG.
• Gaussian wavelet WT is smoothed derivative of signal.
• Wavelet coefficients– Modulus maximum = point of inflection edge.– Positive coefficient = rising edge.– Negative coefficient = falling edge.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 21: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/21.jpg)
Localization
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 22: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/22.jpg)
Edge observation
• Edge is observation HMM.
• What features of the wavelet coefficients from the edge can be used for probability calculation.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 23: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/23.jpg)
Edge features
• Amplitude Modulus Maxima WT, at scales 4,8.
• Length edge.
• Lipschitz exponent.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 24: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/24.jpg)
Edge features
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 25: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/25.jpg)
HMM for WTSign
RST
T1R
Q
i1S
T2
i2
Q
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 26: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/26.jpg)
RST
T1R
Q
i1S
T2
i2
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 27: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/27.jpg)
RST
T1R
Q
i1S
T2
i2
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 28: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/28.jpg)
RST
T1R
Q
i1S
T2
i2
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 29: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/29.jpg)
Tests & Results
• Test set– MIT/BIH QT-database.– 105 record.– Cardiologist Annotations: (p)(N)t).
• Golden standard.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 30: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/30.jpg)
Tests & Results
• Evaluation parameters– Sensitivity
• QRS, QRS onset, T-wave, T-wave offset.
– Positive predictive value• QRS onset, T-wave offset.
– Deviation from manual annotation• QRS onset, T-wave offset.
– Deviation QT-time
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 31: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/31.jpg)
OverviewSe QRS Se Qon P+ Qon m Qon (ms)
HMM 99,11% 99,94% 67,74% 15,7HSMM 98,79% 99,94% 93,16% 12,9WTSign 99,40% 95,34% 90,75% -5,8
Se T Se Toff P+ Toff m Toff (ms)HMM 66,86% 75,85% 49,84% 10,5HSMM 83,49% 84,05% 79,24% 9,9WTSign 94,65% 86,16% 83,56% 45,0
ECG/Wavelet/HMM/WTSign/T&R/Conc
manQTtime (ms) εQTtime (ms)HMM 422,1 -193,6HSMM 422,1 -58,6WTSign 422,1 38,0
![Page 32: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/32.jpg)
HMM Concatenated set
![Page 33: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/33.jpg)
HSMM Concatenated set
![Page 34: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/34.jpg)
WTSign
![Page 35: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/35.jpg)
Conclusions• HMM-WT approaches have been successfully
used for ECG delineation.• The WT of the ECG gives a well-suited
representation of the ECG as input for the HMM.• HMM can perform accurate ECG delineation on
certain records.• The HMM state duration is not adequate for the
ECG.• HSMM solves this problem.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 36: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/36.jpg)
Conclusions• WT as input for a HSMM can perform accurate ECG
delineation on a large number of records.• HSMM has a high computational complexity.• The probability measure for the HMM and HSMM
observation are a weak classifier.• A new method (WTSign) has been developed to
overcome the shortcomings of the HMM and HSMM.• The WTSign method has the highest sensitivity.• Delineation accuracy for Toff is less then HMM and
HSMM.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 37: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/37.jpg)
Recommendations• Other wavelet functions might have better
properties.• The topologies of the HMM and HSMM can be
further developed.• WTSign delineation accuracy can be improved
(edge detection or post processing).• The WTSign observation features can be further
researched.• WTSign HMM topology can be re-evaluated.
ECG/Wavelet/HMM/WTSign/T&R/Conc
![Page 38: An Approach to ECG Delineation using Wavelet Analysis and Hidden Markov Models](https://reader036.vdocument.in/reader036/viewer/2022062422/56814046550346895dabbaa2/html5/thumbnails/38.jpg)
Questions?