ebook img

ECG Parameter Extraction and Motion Artifact Detection by Tianyang Li B.Eng., Dalian University of PDF

59 Pages·2016·1.98 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview ECG Parameter Extraction and Motion Artifact Detection by Tianyang Li B.Eng., Dalian University of

ECG Parameter Extraction and Motion Artifact Detection by Tianyang Li B.Eng., Dalian University of Technology, China, 2014 A Report Submitted in Partial Fulfillment of the Requirements for the Degree of MASTER OF ENGINEERING in the Department of Electrical and Computer Engineering (cid:13)c Tianyang Li, 2016 University of Victoria All rights reserved. This report may not be reproduced in whole or in part, by photocopying or other means, without the permission of the author. ii ECG Parameter Extraction and Motion Artifact Detection by Tianyang Li B.Eng., Dalian University of Technology, China, 2014 Supervisory Committee Dr. Xiaodai Dong, Supervisor (Department of Electrical and Computer Engineering) Dr. T. Aaron Gulliver, Departmental Member (Department of Electrical and Computer Engineering) iii Supervisory Committee Dr. Xiaodai Dong, Supervisor (Department of Electrical and Computer Engineering) Dr. T. Aaron Gulliver, Departmental Member (Department of Electrical and Computer Engineering) iv ABSTRACT Cardiovascular disease is the leading cause of death in the world. Long-term monitoring of heart condition through electrocardiogram (ECG) will provide vital information for prevention, early warning and detection of fatal heart disease. Re- cently, we developed a portable real-time ECG monitoring system which patients can use during their daily activity. The large amount of ECG data recorded needs to be processed for automatic detection and classification. This report focuses on the extraction of essential ECG parameters from the ECG waveforms and the detection of motion artifacts. Algorithms to calculate heart rate, QRS complex and duration, ST elevation, are designed. Due to body motion, ECG signals are often perturbed by motion induced artifacts. Motion artifacts (MA) severely affect the detection ac- curacy of ECG parameters and any meaningful interpretation of ECG waveforms. Though there have been a number of methods to eliminate motion artifacts, few of them are suitable for our portable device due to their high computational complexity or extra reference signal requirement. In this project, a new algorithm to detect mo- tion artifacts is proposed, which applies Machine Learning based on the features we extracted. Experimental results show that this algorithm correctly detects over 90% of the motion artifacts. Finally, parameter extraction and MA detection algorithms are integrated into an Android application that reads in the raw ECG signal received by a smartphone from an ECG sensor and processes the real-time signal with these algorithms to generate an ECG report. v Contents Supervisory Committee ii Abstract iii Table of Contents v List of Tables vii List of Figures viii Acknowledgements x 1 Introduction 1 1.1 Background and Motivation . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Technical Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Contributions of the Project . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Outline of the Report . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 ECG Parameters Extraction 5 2.1 ECG Parameters Definitions and Measurements . . . . . . . . . . . . 5 2.1.1 Pan-Tompkins Algorithm for QRS Complex . . . . . . . . . . 6 2.1.2 Heart Rate (HR) . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1.3 QRS duration . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.4 PR Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.5 QT/QTc Interval . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.6 ST elevation/depression . . . . . . . . . . . . . . . . . . . . . 13 2.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3 Motion Artifacts Detection via Machine Learning Algorithms 16 3.1 Motion Artifacts Definition and Properties . . . . . . . . . . . . . . . 17 vi 3.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.2.1 Adaptive signal processing . . . . . . . . . . . . . . . . . . . . 18 3.2.2 Discrete wavelet transformation . . . . . . . . . . . . . . . . . 19 3.3 Features extraction for machine learning algorithms . . . . . . . . . . 20 3.3.1 Machine learning introduction . . . . . . . . . . . . . . . . . . 20 3.3.2 Features extraction . . . . . . . . . . . . . . . . . . . . . . . . 21 3.4 Data collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.4.1 Feature scaling . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.4.2 Data collection from hardware board . . . . . . . . . . . . . . 26 3.4.3 Applying machine learning algorithms . . . . . . . . . . . . . 27 3.4.4 Making data more generic . . . . . . . . . . . . . . . . . . . . 30 3.5 Performance analysis and cross validation . . . . . . . . . . . . . . . . 30 3.5.1 Performance features sensitivity and specificity . . . . . . . . . 30 3.5.2 Cross validation introduction . . . . . . . . . . . . . . . . . . 32 3.5.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4 Java Implementation 38 4.1 MATLAB to Java conversion . . . . . . . . . . . . . . . . . . . . . . 38 4.2 Algorithm structure in Java . . . . . . . . . . . . . . . . . . . . . . . 42 4.3 Java APIs design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 5 Conclusions 45 5.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.2 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Bibliography 47 vii List of Tables Table 2.1 Voltage conversion . . . . . . . . . . . . . . . . . . . . . . . . . 14 Table 3.1 Cross validation of Pocket Algorithm . . . . . . . . . . . . . . . 34 viii List of Figures Figure 1.1 Sport band vs Holter monitor [3][2]. . . . . . . . . . . . . . . . 2 Figure 1.2 Architecture of the ECG system. . . . . . . . . . . . . . . . . . 2 Figure 2.1 ECG of a heart in normal sinus rhythm [4]. . . . . . . . . . . . 6 Figure 2.2 Detection result of Pan-Tompkins algorithm. . . . . . . . . . . 8 Figure 2.3 Definition of QRS duration [6]. . . . . . . . . . . . . . . . . . . 9 Figure 2.4 Q onset and S end detection. . . . . . . . . . . . . . . . . . . . 11 Figure 2.5 Zoomed-in figure of Q onset point. . . . . . . . . . . . . . . . . 12 Figure 2.6 P onset detection results. . . . . . . . . . . . . . . . . . . . . . 12 Figure 2.7 T wave end definition [7]. . . . . . . . . . . . . . . . . . . . . . 13 Figure 2.8 Final results obtained via MATLAB. . . . . . . . . . . . . . . . 14 Figure 2.9 ST elevation definition [24]. . . . . . . . . . . . . . . . . . . . . 15 Figure 3.1 Motion artifacts (muscle tremors) [25]. . . . . . . . . . . . . . . 17 Figure 3.2 Motion artifacts detected with our board. . . . . . . . . . . . . 17 Figure 3.3 Adaptive filter structure [17]. . . . . . . . . . . . . . . . . . . . 18 Figure 3.4 Three-level wavelet decomposition tree [10]. . . . . . . . . . . . 19 Figure 3.5 Motion artifacts during detection. . . . . . . . . . . . . . . . . . 22 Figure 3.6 MATLAB code to calculate RR energy. . . . . . . . . . . . . . 22 Figure 3.7 MATLAB code to calculate RR energy. . . . . . . . . . . . . . 23 Figure 3.8 RR intervals during motion artifacts period. . . . . . . . . . . . 24 Figure 3.9 Feature: SQ noise definition. . . . . . . . . . . . . . . . . . . . 25 Figure 3.10Data plot example. . . . . . . . . . . . . . . . . . . . . . . . . . 28 Figure 3.11In-sample error with iteration based on Pocket Algorithm. . . . 29 Figure 3.12Beat1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Figure 3.13Beat2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Figure 3.1410th-order target function and 15 noisy data points. . . . . . . . 34 Figure 3.1510th order fit (red curve) versus 2nd order fit (red curve)[18]. . . 35 ix Figure 4.1 FIR filter realization [1]. . . . . . . . . . . . . . . . . . . . . . . 40 Figure 4.2 General structure of ECG signal processing module in Java Ap- plication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Figure 4.3 Java APIs design and details. . . . . . . . . . . . . . . . . . . . 44 x ACKNOWLEDGEMENTS I would like to express my special thanks to my supervisor Dr. Xiaodai Dong who gave me the opportunity to do this wonderful project. I am thankful for her aspiring guidance and invaluably constructive advice during the project work. I would also like to thank my parents and friends who always support me and thank my group members for their help and suggestions.

Description:
tion artifacts is proposed, which applies Machine Learning based on the features we extracted. Experimental results show that this algorithm correctly detects over 90% of the motion artifacts. Finally, parameter extraction and MA detection algorithms are integrated into an Android application that
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.