HA NOI UNIVERSITY OF SCIENCE AND TECHNOLOGY SCHOOL OF ELECTRICAL & ELECTRONIC ENGINEERING MASTER THESIS A SLEEP APNEA DETECTION FROM ECG SIGNAL AND CLASSIFICATION METHOD BASED ON THE SE-ResNeXt MODEL DO THI THU PHUONG Phuong.vn Advanced Program in Biomedical Engineering Instructor: PhD. Tran Anh Vu Instructor’s signature School: Electronics and Telecommunications HA NOI, 7th 2023 HA NOI, 8th 2023 SOCIALIST REPUBLIC OF VIET NAM Independence- Freedom- Happiness VERIFICATION OF THE MASTER THESIS The full name of the author: Do Thi Thu Phuong Thesis topic: A sleep apnea detection from ECG signal and classification method based on the SE-ResNeXt model Majority: Biomedical Engineering The student code: 20212478M The instructor and the chairman of committee verify that the author has corrected and supplemented the thesis according to the minutes of the meeting committee with the following contents: 1. Add content on why ECG signals are related to sleep apnea 2. Add content to the ECG signal lead 3.
Use exactly words (detection => classification, project => thesis) 4.6: Other classification methods content./2021 The Instructor The Author CHAIRMAN OF THE COMMITTEE MASTER THESIS A SLEEP APNEA DETECTION FROM ECG SIGNAL AND CLASSIFICATION METHOD BASED ON THE SE-ResNeXt MODEL Instructor Sign and write full name. ACKNOWLEDGEMENT During my studies at Hanoi University of Science and Technology, I was equipped with in-depth knowledge, helping me grow in learning and scientific research. I would like to thank my teachers, who taught me whole heartedly during my time at the university. With deep respect and gratitude, I express my sincere thanks to PhD.
Tran Anh Vu, lecturer in the Electronic Technology and Biomedical Engineering Department, who is a instructor and has spent a lot of time guiding, instructing, and supporting me throughout the research and completion of this thesis. During the research and completion of my thesis, I received encouragement, sharing, and help from family, friends, colleagues, and other close people. I would like to express my deep gratitude. Thank you for the support! ABSTRACT Sleep apnea (SA) is a serious sleep disorder that happens when a person’s breathing repeatedly stops and starts during sleep.
Thesis "A sleep apnea detection from ECG signal and classification method based on the SE-ResNeXt model". Once completed, accurate classification of sleep apnea episodes is a crucial step to develop effective therapies and management strategies for treatment. In this work, the SA classification procedure is based on a single-lead electrocardiogram (ECG), which is one of the most physiologically relevant signals for SA. I propose a new feature extraction technique, which utilized the detection of R peaks.
Particularly, we derive from the Teager Energy Operator (TEO) algorithm to detect R peaks and then obtain the RR intervals and amplitudes. Afterward, the SE-ResNeXt 50 deep learning model is used as a classifier to detect sleep apnea. This model is a variant of ResNet 50 and can learn how to use global information to selectively emphasize useful information and suppress less beneficial ones, as well as allow feature recalibration. The dataset is taken from a published database and is initiated by 70 recordings of the PhysioNet ECG Sleep Apnea v1.
The performance of my classification method is 89,21% accuracy, 90,29% sensitivity, and 87,36% specificity, demonstrating the model’s validity when compared to other researches. This is also proof that I can utilize the ECG signal to efficiently classify SA. STUDENT Sign and write full name.2 The sleep apnea overview. 4 CHAPTER 2: THEORETICAL BASIC .3 ECG test procedure .5 The ECG wave .3 Teager energy operator .4 SE-ResNeXt 50 model .1 Squeeze-and-Excitation Blocks .2 Model and Computational Complexity .5 Band-pass filter.
21 CHAPTER 3: DATASET AND PROPOSED METHODS .3 The proposed methods. 27 CHAPTER 4: RESULT AND DISCUSSION. 30 SUMMARY OF THE MASTER'S THESIS. 34 a) Reason of choosing the topic.
34 b) Purpose, Research Object, Scope of Research. 34 c) Content Summary and Author’s Contribution. 36 LIST OF FIGURES Figure 1.2-1: Obstructive sleep apnea .2-1: An example of ECG signal .2-2: The ECG test procedure .2-3: The ECG wave .2-4: The normal ECG signal .2-5: The angina ECG signal .2-6: The serious heart attack .2-7: The atrial fibrillation ECG signal .4-1: A Squeeze-and-Excitation block .4-2: The schema of the original Inception module (left) and the SE- Inception module (right) .4-3: The schema of the original Residual module (left) and the SE-ResNet module (right). (Right) SE-ResNeXt-50 model.
27 LIST OF TABLES Table 4.1 Chapter description Chapter 1 presents the clinical basics of the sleep apnea. The first chapter of the thesis will focus on clarifying the definition, symptoms, causes and risks of patients with the sleep apnea. Then from the clinical facility will use ECG signal combined with Machine Learning (ML) application in disease classification. This is an effective, optimal solution and offers many treatment opportunities for patients with the sleep apnea.2 The sleep apnea overview A repeated interruption or sleep disorder called sleep apnea (SA) is characterized by the collapse of the upper airway, which could result in the atic reduction of respiration airflow.
The word “apnea” comes from the Greek word for “breathless”. SA events can occur hundreds of times as you sleep, and if they do so repeatedly overtime, they can lead to a variety of health issues [1]. Sleep apnea occurs more often in men than in women. Sleep apnea can occur at any age including infants, children, especially those over 50 and people who are overweight.
Sleep apnea is uncommon but widespread. Experts estimate it affects about 5% to 10% of people worldwide. The American Academy of Sleep Medicine (AASM) defines SA patients as individuals who have an apnea-hypopnea index (AHI) of 5 or higher [2]. Nearly 90% of SA patients do not receive timely diagnosis and treatment.
Besides, people with obesity and overweight are more likely to suffer from SA [3]. The resulting lack of oxygen activates a survival reflex that wakes you up just enough to resume breathing. While that reflex keeps you alive, it also interrupts your sleep cycle. That prevents restful sleep and can have other effects, including putting stress on your heart that can have potentially deadly consequences.
The symptoms of obstructive and central sleep apneas overlap, sometimes making it difficult to determine which type you have. The most common symptoms of obstructive and central sleep apneas include: loud snoring, episodes in which you stop breathing during sleep which would be reported by another person, gasping for air during sleep, awakening with a dry mouth, morning headache, difficulty staying asleep, known as insomnia, excessive daytime sleepiness, known as hypersomnia, difficulty paying attention while awake, irritability… The main causes of sleep apnea are: - Obstructive sleep apnea (OSA), which is the more common form that occurs when throat muscles relax and block the flow of air into the lungs. These muscles support the soft palate, the triangular piece of tissue hanging from the soft palate called the uvula, the tonsils, the side walls of the throat and the 1 tongue. When the muscles relax, your airway narrows or closes as you breathe in.
You can't get enough air, which can lower the oxygen level in your blood. Your brain senses that you can't breathe, and briefly wakes you so that you can reopen your airway. This awakening is usually so brief that you don't remember it. You might snort, choke or gasp.
This pattern can repeat itself 5 to 30 times or more each hour, all night. This makes it hard to reach the deep, restful phases of sleep.2-1: Obstructive sleep apnea - Central sleep apnea (CSA), which occurs when the brain doesn't send proper signals to the muscles that control breathing. Central sleep apnea is a disorder in which you breathing repeatedly stops and starts during sleep. This condition is different from obstructive sleep apnea, in which you can't breathe normally because of upper airway obstruction.
Central sleep apnea is less common than obstructive sleep apnea. Central sleep apnea can result from other conditions, such as heart failure and stroke. Another possible cause is sleeping at a high altitude. Treatments for central sleep apnea might involve treating existing conditions, using a device to assist breathing or using supplemental oxygen.
- Treatment-emergent central sleep apnea, also known as complex sleep apnea, which happens when someone has OSA diagnosed with a sleep study that converts to CSA when receiving therapy for OSA. 2 Despite the significant incidence of this disorder, most patients are unaware of how SA affects their breathing pattern. And as a result, many people choose not to seek professional care. Several studies have examined the morbidity of SA [1].
These studies’ findings suggest that failure to detect and treat SA in a timely manner can cause daytime drowsiness [4] [5], cognitive dysfunction [6], cardiovascular diseases such as hypertension [7], coronary artery disease [8], heart failure [9], stroke [10] [11], and metabolic diseases such as diabetes [12]. Therefore, in order to prevent further difficulties, it is crucial to find SA as soon as possible. To investigate sleep and respiration parameters, polysomnography (PSG), a comprehensive test used to diagnose sleep disorder, uses electroencephalograms (EEG), electrocardiograms (ECG), electroculograms (EOG), electromyograms (EMG), and pulse oximetry [13]. PSG has a high diagnostic sensitivity [14].
Some of its drawbacks include high costs, patient inconvenience, labor intensive data recording, and challenging data interpretation. Additionally, lengthy PSG equipment evaluation wait times make it more difficult to promptly diagnose and treat SA [15]. Therefore, it is necessary to provide an alternative method for early diagnosis and detection of SA while enhancing patients’ comfort and reducing costs [16]. Machine learning (ML) methods have been considered effective for computer- aided diagnosis without the use of PSG.
Different ML methods have been used in SA detection, such as Logistic Regression [17], K-Nearest Neighbor (kNN) [18], Ensemble Learning [19], Linear Discriminant Analysis (LDA) [20], Support Vector Machine (SVM) [21], Empirical Mode Decomposition (EMD) [22], Principal Component Analysis (PCA) [23], Fast Fourier and Wavelet Transform [24] [25], etc. In [26], the authors used ECG signals of ten patients with Obstructive Sleep Apnea (OSA) against ten healthy controls. This study first extracted Heart Rate Variability (HRV) from ECG, and then extracted the QRS component at different frequencies using a digital filter. The features were then selected using PCA.
Classification was performed by the (kNN) algorithm. The achieved accuracy is more than 80%. Deep learning has also been shown more effective in SA detection [27] [28] [29]. In [30], data was collected from 86 patients, of which 69 were used in training and 17 in testing.
The Residual Neural Network (RNN) algorithm was reported to offer the highest accuracy of 99%. In [31], the Heart Rate Variability (HRV) data was used to automatically detect SA. The PhysioNet Apnea-ECG dataset has been widely used in SA classification. In [32], a deep neural network and Hidden Markov Model (HMM) were used to detect SA.
The method utilized a sparse auto-encoder to learn features, which belongs to unsupervised learning that only requires unlabeled ECG signals. Two types of classifiers (SVM and ANN) are used to classify the features extracted from the sparse auto-encoder. Considering the temporal dependency, HMM was adopted to improve the classification accuracy. Finally, a decision fusion method is adopted to improve 3 the classification performance.
About 85% classification accuracy is achieved in the per-segment SA detection, and the sensitivity is up to 88. Or another study [33] also used in the Physionet dataset, the ECG signal was modeled in order to obtain the Heart Rate Variability (HRV) and the ECG-Derived Respiration (EDR). Selected feature techniques were used for benchmark with different classifiers such as Artificial Neural Networks (ANN) and Support Vector Machine (SVM), among others. The results evidence that the best accuracy was 82.12%, with a sensitivity and specificity of 88.
In my thesis, I also used the PhysioNet Apnea dataset to classify SA. The dataset contains V2 ECG lead signal. I first used a Finite Impulse Response (FIR) band-pass filter to eliminate noise and artifact.