
FINAL REPORT FOR IBSCAND MENG GROUP PROJECT Machine Learning based Denoising of Electrocardiogram Signals from a Wearable ECG Monitor December 31, 2018 Laure Abecassis, Magdalene Ho, Owuraku Titi-Lartey, Woochan Hwang Timothee Gathmann, Ze Lum, Ng Yee Loong, Joshua Moo Supervisor: Dr. Anil Anthony Bharath Imperial College London Department of Bioengineering 1 Imperial College London Abstract Long-term outpatient monitoring of the electrocardiogram (ECG) has been shown to be beneficial for not only early diagnosis of arrhythmias but also monitoring of high risk patients. Hence, this project aims to design a wearable ECG monitoring device capable of denoising electromyogram (EMG) noise, which is the chief contributor of motion artefacts, through the use of a machine learning denoising algorithm. Amongst the ECG signals obtained from textile and capacitive-coupled electrode prototypes, it was found that electrodes made from silver-plated conductive fabric were able to obtain ECG signals comparable to those obtained from conventional Medi-Trace gel electrodes, when placed on the biceps of each arm. A printed circuit board (PCB), utilising the ADS1292, was designed to test the possibility of measuring and amplifying ECG signals from two electrodes without a right leg drive circuitry. Furthermore, a novel five layer convolutional autoencoder was trained using accelerometer data and noisy ECG signals generated from combining clean ECG signals from the MIT-BIH Arrhythmia Database with EMG signals measured from a Myoband manufactured by Thalmic Labs. Overall, the electrode prototypes and the proposed PCB design successfully work in conjunction with each other. The convolutional autoencoder utilizing acceleration data shows statistical improvement over conventional denoising methods, however is currently inconclusive for simultaneous ECG and Acceleration data obtained from the proposed device. Conclusively, the proposed device is a successful prototype for a long- term outpatient monitoring device but requires further improvements to include removal of EMG artefacts using machine learning algorithms. Page 2 of 44 Imperial College London Acknowledgements We would like to thank: • Dr Anil A. Bharath for his valuable and constructive suggestions during the planning and development of this project. • Mr Paschal Egan and Mr Niraj Kanabar for their continuous help throughout this project. • Dr Firat Guder and Mr Andrew Lee for their advice and assistance with the elec- trodes. Page 3 of 44 Imperial College London Contents 1 Introduction 6 2 Final Design 7 2.1 Electrode Design . 8 2.2 ECG Hardware and Printed Circuit Board . 8 2.3 Denoising Algorithm . 9 3 Methods 10 3.1 Electrode Design . 11 3.1.1 Electrode Quality Testing . 11 3.1.2 Optimal Position Testing . 12 3.1.3 ECG Signal Processing and Evaluation . 13 3.2 Printed Circuit Board Design . 14 3.3 Data Collection . 15 3.3.1 EMG and Accelerometer Data . 15 3.3.2 Generation of Noisy Data . 15 3.4 Denoising Algorithm . 16 3.4.1 Neural Network Training . 16 3.4.2 Evaluation . 16 4 Results 17 4.1 Electrode . 17 4.1.1 Electrode Quality . 17 4.1.2 Optimal Position Test . 18 4.2 ECG Hardware and Printed Circuit Board . 18 4.3 Denoising Algorithm . 20 4.4 Overall design . 20 5 Discussion 22 5.1 Electrodes . 22 5.2 Printed Circuit Board . 23 5.3 Data Collection . 25 5.4 Denoising Algorithm . 25 5.5 Market Needs . 27 Page 4 of 44 Imperial College London 6 Conclusion 28 Appendix A Product Evaluation Matrix 32 Appendix B Task Allocation 33 Appendix C Bill of Materials 34 Appendix D PCB design incorporating ADS1291 35 Appendix E ECG Hardware connections and EMG-Accelerometer Data Collection 37 Appendix F Electrodes Evaluation Rubrics and Data 38 Appendix G Electrode prototype designs 41 Appendix H Filter frequency response used for ECG filtering 43 Appendix I PyTorch Implementation of Convolutional Autoencoder 44 Page 5 of 44 Imperial College London 1 Introduction Long-term outpatient monitoring of the electrocardiogram (ECG) has been shown to be beneficial for not only early diagnosis of arrhythmias but also monitoring of high risk patients [1, 2, 3]. Wearable ECG monitoring devices often suffer from severe electromyogram (EMG) noise [4, 5] as it is not easily filtered with conventional methods such as empirical mode decomposition [6] and wavelet analysis [7, 8, 9]. Hence, this project aims to design a low- power ECG monitoring armband, composed of two electrodes, with a machine learning denoising algorithm. The system should consistently denoise ECG signals, regardless of the user’s motion, to output clean signals. To measure an ECG, a minimum of two electrodes wired to an Instrumental Amplifier (IA) is required to provide high input impedance, high common-mode rejection and variable amplification of the differential signal [10]. The primary design objectives for the wearable electrodes are to achieve comfort, reliable and consistent data collection. The use of textile [11], conductive fabric [5] and capacitive-coupled electrodes [12] are investigated in this project, following the said studies. Furthermore, an Analog-to-Digital Converter (ADC) is required to digitally process the output from the circuit. The design from Chung et al. [5] gave promising results whilst using dry capacitive-coupled electrodes. However, the design itself did not meet the criteria of wearability since it used a driven Right Leg Drive (RLD) circuit [13]. Therefore, a fully integrated portable Printed Circuit Board (PCB) including the essential blocks stated above was implemented. Finally, a denoising algorithm that is robust under high EMG noise conditions is essential in generating a clinically useful ECG from a wearable device. Conventional bandpass filters Figure 1: Overview of actual prototype with description of various components Page 6 of 44 Imperial College London are unable to suppress EMG noise as they overlap in the frequency domain with the ECG [14], while the empirical mode decomposition is prone to filtering out the P and T waves [7]of the ECG (figure 1 ). To address such limitations, there has been efforts to integrate acceleration and skin-electrode impedance in the form of adaptive filtering [15, 16]. Moreover, approaches using neural networks in denoising ECGs [17, 18] have shown state of the art results on the benchmark MIT-BIH database [19, 20]. However, the study done by Xiong et al. [17] used ambulatory noise from the MIT-BIH database [13], which contains lesser EMG artefacts compared to the data obtained from wearable devices. Therefore, the primary objective for the denoising system will be to train a machine learning based algorithm that can denoise the high level of EMG contamination that we see in wearable ECG monitoring devices. 2 Final Design The final prototype consists of two electrodes, one on each arm, connected to a designed PCB. The PCB and LIS3DH accelerometer are connected to the Raspberry Pi Zero micro-controller and are attached on the outer side of the armband, as shown in figure 2. Figure 2: Overview of actual prototype with description of various components Page 7 of 44 Imperial College London Figure 3: Model representing an overview of the project design and concept 2.1 Electrode Design The type of electrodes incorporated into armbands were chosen by evaluation against the user requirements (see Appendix A: Product Evaluation Matrix). The Silver plated polyamide fabric (Shieldex® Bremen) [21] was chosen due to its consistency in obtaining high quality ECGs, which is comparable to commercial Medi-Trace gel electrodes. All electrodes prototype were designed to have an area of 4cm2, determined by Marozas et al to be optimal for obtaining ECG signals; As an area less than 1cm2 or greater than 8cm2, results in attenuation of low frequency bandwidths and noise amplification respectively [22]. 2.2 ECG Hardware and Printed Circuit Board The overall circuitry involved a PCB with ADS1292 chip, a voltage regulator and a 2.5 mm audio jack to provide a simple way to connect the electrode armbands. To achieve a compact design, the conventional RLD circuitry, which requires a third electrode at the leg, was avoided. Instead, a bioinstrumentation circuit was designed to compensate for the degradation of the common-mode rejection without the RLD, which requires only two electrodes. Furthermore, a denoising algorithm would be used to remove both EMG and mains interference, which eliminates any need for analogue filters. The ADS1292 manufactured by Texas Instruments is able to record biological signals and meets the portability and low-power requirement. The ADS1292 integrates a high impedance differential input, amplified by a programmable gain amplifier (PGA) with a very high common-mode rejection ratio (CMRR) of typically 120dB [23], as opposed to a ¡ lower 105dB CMRR used in Chung et al. [5]. The latter is then connected to an integrated ¡ analog-to-digital converter (ADC) with a Serial Peripheral Interface (SPI). Page 8 of 44 Imperial College London Figure 4: Visual representation of the PCB Design. More details of the component in Appendix D As for the PCB, four layers (refer to figure 4) were designed for the convenience of routing and to prevent crosstalk between analog and digital signals [24]. An external power supply provides 5V to the Raspberry Pi Zero, which in turn powers the PCB and manages additional GPIO pins required by the ADS1292 to function properly. The communication between the Raspberry Pi Zero and the ADS1292 was established through an SPI protocol, at a transmission rate of 2M Hz. The chip was configured to sample at a rate of 500 samples per second, and transmitted 24 bits of data for every sample. 2.3 Denoising Algorithm The final architecture of the denoising algorithm is a five-layer convolutional autoencoder (CAE) as shown in figure 5. The encoder takes in a 2D array of size 4 by 300 where the first row contains the noisy ECG and the rest contains the 3-axis accelerometer data.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages45 Page
-
File Size-