1. Trang chủ
  2. » Luận Văn - Báo Cáo

Phát hiện ngưng thở khi ngủ từ tín hiệu ecg và phương pháp phân loại dựa trên mô hình se resnext

45 6 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề A Sleep Apnea Detection From ECG Signal And Classification Method Based On The SE-ResNeXt Model
Tác giả Do Thi Thu Phuong
Người hướng dẫn PhD. Tran Anh Vu
Trường học Hanoi University of Science and Technology
Chuyên ngành Biomedical Engineering
Thể loại master thesis
Năm xuất bản 2023
Thành phố Ha Noi
Định dạng
Số trang 45
Dung lượng 5,13 MB

Cấu trúc

  • CHAPTER 1. INTRODUCTION (9)
    • 1.1 Chapter description (9)
    • 1.2 The sleep apnea overview (9)
    • 1.3 Chapter conclusion (12)
  • CHAPTER 2: THEORETICAL BASIC (14)
    • 2.1 Chapter description (14)
    • 2.2 ECG signal (14)
      • 2.2.1 Definition (0)
      • 2.2.2 Objective (17)
      • 2.2.3 ECG test procedure (18)
      • 2.2.4 Types (19)
      • 2.2.5 The ECG wave (19)
    • 2.3 Teager energy operator (22)
    • 2.4 SE -ResNeXt 50 model (23)
      • 2.4.1 Squeeze- and Excitation Blocks - (23)
      • 2.4.2 Model and Computational Complexity (26)
      • 2.4.3 Implementation (27)
    • 2.5 Band-pass filter (28)
    • 2.6 Chapter conclusion (29)
  • CHAPTER 3: DATASET AND PROPOSED METHODS (30)
    • 3.1 Chapter description (30)
    • 3.2 Experimental dataset (30)
    • 3.3 The proposed methods (31)
      • 3.3.1 Pre-processing (31)
      • 3.3.2 Feature extraction (32)
      • 3.3.1 Classification (0)
      • 3.3.2 Performance matrics (34)
    • 3.4 Chapter conclusion (35)
  • CHAPTER 4: RESULT AND DISCUSSION (36)
    • 4.1 Result (36)
    • 4.2 Discussion (36)
    • 4.3 Conclusion (37)

Nội dung

INTRODUCTION

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.

The sleep apnea overview

Sleep apnea (SA) is a common sleep disorder marked by repeated interruptions in breathing due to the collapse of the upper airway, leading to reduced airflow during sleep The term "apnea" is derived from the Greek word meaning "without breath."

“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 is more prevalent in men than women and can affect individuals of all ages, including infants and children, with a higher incidence in those over 50 and those who are overweight While it is uncommon, sleep apnea is estimated to impact 5% to 10% of the global population According to the American Academy of Sleep Medicine (AASM), patients with sleep apnea have an apnea-hypopnea index (AHI) of 5 or higher Alarmingly, nearly 90% of those affected do not receive timely diagnosis and treatment, with obesity and being overweight significantly increasing the risk of developing this condition.

The absence of oxygen triggers a survival reflex that momentarily awakens you to resume breathing, disrupting your sleep cycle This interruption not only hinders restful sleep but can also exert stress on your heart, leading to potentially life-threatening consequences.

Obstructive and central sleep apneas share overlapping symptoms, making it challenging to identify the specific type Common symptoms include loud snoring, reported episodes of breath cessation during sleep, gasping for air, waking up with a dry mouth, morning headaches, insomnia, excessive daytime sleepiness (hypersomnia), difficulty concentrating, and irritability.

The main causes of sleep apnea are:

Obstructive sleep apnea (OSA) is a prevalent condition characterized by the relaxation of throat muscles, which obstructs airflow to the lungs This relaxation affects the soft palate, the uvula, tonsils, and the side walls of the throat, leading to interrupted breathing during sleep.

When the muscles in your throat relax, your airway can narrow or close, leading to insufficient air intake and decreased oxygen levels in your blood Your brain detects this lack of breathing and briefly awakens you to reopen your airway, often resulting in snorting, choking, or gasping This cycle can occur 5 to 30 times or more each hour throughout the night, disrupting your ability to achieve deep, restful sleep.

Central sleep apnea (CSA) is a disorder characterized by repeated interruptions in breathing during sleep due to the brain's failure to send proper signals to the muscles that control breathing Unlike obstructive sleep apnea, which is caused by upper airway blockage, CSA is less common and can be associated with conditions such as heart failure, stroke, or even high-altitude sleeping Treatment options for central sleep apnea may include addressing underlying health issues, utilizing breathing assistance devices, or administering supplemental oxygen.

Treatment-emergent central sleep apnea, commonly referred to as complex sleep apnea, occurs when a patient diagnosed with obstructive sleep apnea (OSA) develops central sleep apnea (CSA) during treatment for OSA This phenomenon highlights the need for careful monitoring and adjustment of therapy to address the evolving nature of sleep apnea disorders.

Sleep apnea (SA) significantly impacts breathing patterns, yet many patients remain unaware of its effects, leading to a lack of professional care Research indicates that undiagnosed and untreated SA can result in serious health issues, including daytime drowsiness, cognitive dysfunction, cardiovascular diseases like hypertension and heart failure, stroke, and metabolic disorders such as diabetes Early detection of SA is essential to prevent these complications Polysomnography (PSG) is a comprehensive diagnostic tool that assesses sleep and respiratory parameters through various tests, including EEG and ECG, and boasts high diagnostic sensitivity However, PSG has drawbacks, including high costs, patient inconvenience, labor-intensive data collection, and long wait times for equipment evaluation, which hinder timely diagnosis and treatment Therefore, developing alternative methods for the early diagnosis of SA that enhance patient comfort and reduce costs is crucial.

Machine learning (ML) techniques are highly effective for computer-aided diagnosis without relying on polysomnography (PSG) Various ML methods have been utilized for sleep apnea (SA) detection, including Logistic Regression, K-Nearest Neighbor (kNN), Ensemble Learning, Linear Discriminant Analysis (LDA), Support Vector Machine (SVM), Empirical Mode Decomposition (EMD), Principal Component Analysis (PCA), and transformations such as Fast Fourier and Wavelet Transform.

A study involving ECG signals from ten patients with Obstructive Sleep Apnea (OSA) and ten healthy controls successfully extracted Heart Rate Variability (HRV) and QRS components at various frequencies using digital filters, achieving over 80% accuracy with the kNN algorithm Additionally, deep learning techniques have proven to be more effective in sleep apnea detection, with one study involving 86 patients reporting a Residual Neural Network (RNN) achieving a remarkable accuracy of 99% Furthermore, HRV data has been utilized for the automatic detection of sleep apnea, showcasing the potential of advanced algorithms in this field.

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

The study employs a sparse auto-encoder for unsupervised learning to extract features from unlabeled ECG signals It utilizes two classifiers, Support Vector Machine (SVM) and Artificial Neural Network (ANN), to categorize the extracted features To enhance classification accuracy by considering temporal dependencies, a Hidden Markov Model (HMM) is incorporated Ultimately, a decision fusion method is implemented to further improve the classification results.

The study achieved approximately 85% classification accuracy in per-segment SA detection, with a sensitivity of 88.9% Another research utilizing the Physionet dataset modeled ECG signals to derive Heart Rate Variability (HRV) and ECG-Derived Respiration (EDR), employing various feature selection techniques and classifiers, including Artificial Neural Networks (ANN) and Support Vector Machines (SVM) The findings revealed a maximum accuracy of 82.12%, alongside a sensitivity of 88.41% and specificity of 72.29%.

In my thesis, I utilized the PhysioNet Apnea dataset to classify sleep apnea (SA) using V2 ECG lead signals To enhance the signal quality, I initially applied a Finite Impulse Response (FIR) band-pass filter to remove noise and artifacts Subsequently, I extracted key features from the R peaks of the ECG signal, focusing on the amplitude and the intervals between the R peaks.

The R peak detection in ECG records typically employs the Hamilton algorithm, which involves segmenting a 5-minute ECG segment and utilizing cubic interpolation to generate 900 values for each feature However, the Hamilton algorithm is complex and has lengthy computation times, making it challenging to address Hamiltonian path and cycle problems on standard computers Additionally, in graphs with all vertices having an odd degree, the handshake lemma indicates that the number of Hamiltonian cycles through any fixed edge is always even, implying that if one cycle exists, a second must also be present, though calculating this second cycle is difficult Consequently, I opted to utilize the Teager Energy Operator (TEO) algorithm for R peak detection in my thesis, as it offers a more efficient alternative to the Hamilton algorithm.

Chapter conclusion

Chapter 1 presented an overview of sleep apnea and went in depth to clarify the risks as well as adverse effects on patients if not detected and treated promptly In addition, this chapter outlines studies using ML that have been used to classify

In Chapter 2, I will present an overview of ECG signals and detail the innovative methods proposed for my thesis, focusing on their application in the context of disease analysis.

THEORETICAL BASIC

Chapter description

Chapter 2 will present the basic theories to understand about the ECG signal and the proposed methods to be used as well as it will answer the question why ECG signal plays an important role in classifying sleep apnea signals Therefore, the reader can know the methods easily This can explain why the proposed methods can provide high accuracy when classifying sleep apnea.

ECG signal

An electrocardiogram (ECG) is a visual representation generated by an electrocardiograph, offering insights into heart rate, rhythm, and potential abnormalities It can reveal conditions such as heart enlargement due to hypertension and previous myocardial infarctions The ECG signal is among the most widely used and effective diagnostic tests for various cardiac issues.

It is easy to perform, non-invasive, yields outcomes instantly and is useful to identify hundreds of heart conditions

Healthy hearts produce ECGs with a unique and recognizable shape Irregular heart rhythms or damage to the heart muscle can disrupt the heart's electrical activity, resulting in changes to the ECG's appearance.

An ECG test is essential for assessing heart rhythm and electrical activity By attaching sensors to the skin, the test captures the electrical signals produced during each heartbeat These signals are recorded by a machine and analyzed by a medical professional to identify any irregularities.

ECG leads are electrodes positioned on the body to monitor and record the heart's electrical activity By capturing the electrical signals produced during heart contractions, these leads enable healthcare professionals to assess the heart's rhythm, rate, and overall electrical function, providing crucial insights into cardiac health.

ECG leads are classified into two primary types: limb leads and precordial (chest) leads These leads are strategically positioned on the body to offer a thorough perspective of the heart's electrical activity from various angles.

- Limb Leads: Limb leads are placed on the arms and legs They are typically categorized into three lead groups:

 Lead I: One electrode on the left arm and another on the right arm This lead records the electrical activity between the left and right arms

Lead II involves placing one electrode on the right leg (or combining the right leg with the left arm) and another on the left arm This configuration effectively records the electrical activity between the right leg and the left arm.

 Lead III: One electrode on the left leg and another on the left arm This lead records the electrical activity between the left leg and left arm

Precordial leads, designated as V1 to V6, are strategically positioned on the chest to capture the heart's electrical activity from a frontal perspective.

 V1: Placed on the fourth intercostal space just to the right of the sternum

 V2: Placed on the fourth intercostal space just to the left of the sternum

 V4: Placed on the fifth intercostal space in the mid-clavicular line (between the armpit and nipple)

 V5: Placed on the same horizontal level as V4 but in the anterior axillary line (in line with the front of the armpit)

 V6: Placed on the same horizontal level as V4 and V5 but in the midaxillary line (in line with the center of the armpit)

Healthcare professionals can create a 12-lead ECG by strategically placing electrodes on the body, which includes both limb and precordial leads This technique provides a thorough assessment of the heart's electrical activity from multiple angles The data collected is crucial for diagnosing a range of heart conditions, including arrhythmias, heart attacks, and other cardiac abnormalities.

Two main forms of data are given by an ECG signal:

- Determining time taken for electromagnetic pulse to travel through the heart

- To find if areas of heart are overworked or too large

A surgeon assesses the duration of the electromagnetic pulse's journey through the heart by analyzing time intervals on the ECG This evaluation helps determine whether the electrical activity is normal, slow, rapid, or irregular, allowing for an understanding of the pulse's travel time between different regions of the heart.

A cardiologist can assess the size and workload of the heart by measuring its electrical activity This is achieved using a traditional 12-lead ECG, which involves placing ten electrodes on the patient's arms and chest The ECG calculates the average strength of the heart's electrical potential from 12 different angles over a period of approximately 10 seconds, providing valuable insights into the heart's overall function during the cardiac cycle.

8 and trajectory of the electrical depolarization of the heart are observed at each moment

Evidence indicates that ECGs are not effective for preventing cardiovascular disease in asymptomatic individuals or those at low risk The potential for misdiagnosis from ECG results can lead to unnecessary invasive procedures and overtreatment However, specific professions, like airplane pilots, may require ECGs as part of their routine safety assessments.

Figure 2.2-1: An example of ECG signal

The primary goal of an ECG is to gather insights into the heart's electrical activity To effectively interpret the results, it is essential to combine this information with an understanding of heart anatomy and physical examination symptoms Common indications for performing an ECG include various clinical needs that highlight the importance of this diagnostic tool.

An ECG is used to measure:

- Any heart damage and weaknesses in various parts of the heart muscle

- How quickly your heart beats and whether it normally beats

- The effects of drugs or devices used to control your heart (such as a pacemaker)

- The size and position of your heart chambers

- To diagnose abnormal heart rhythms

ECG signals are essential for monitoring the heart's electrical activity, but they also offer valuable insights into other physiological conditions, such as sleep apnea Sleep apnea is a disorder marked by frequent breathing interruptions during sleep.

While ECG is not a direct measure of sleep apnea itself, certain changes in the ECG signal during sleep can provide indications that sleep apnea might be occurring Here's how:

Sleep apnea disrupts normal breathing patterns, leading to fluctuations in blood oxygen and carbon dioxide levels These interruptions can affect the autonomic nervous system, resulting in changes in heart rate variability (HRV) Abnormal HRV, characterized by heightened sympathetic activity linked to stress and reduced parasympathetic activity associated with relaxation, may signal the occurrence of sleep apnea events.

Sleep apnea frequently causes brief awakenings during the night, known as arousal responses, which can result in noticeable changes in the ECG signal, including elevated heart rates and altered heart rate patterns By monitoring these variations, it becomes possible to effectively detect disturbances in sleep.

Teager energy operator

Teager Energy Operator (TEO) mainly shows the frequency and instantaneous changes of the signal amplitude that is very sensitive to subtle changes

The Teager Energy Operator (TEO) is a straightforward nonlinear algorithm designed for signal analysis and detection Originally introduced by H.M Teager for speech processing, it effectively estimates the energy in a signal Recently, TEO has found applications across various scientific domains, including fault feature extraction and diagnosis in bearings, power quality event detection and classification, as well as speech signal and heart failure detection.

For an oscillating continuous-time signal, x(t)= Acos(  t + ), TEO, [x(t)],   is defined as

Which is shown as: x(t) = Acos(  t + )  x’(t)= -A  sin(  t + )  x’’(t) = -A  ²cos(  t + )

When Eq (1) is transferred to an equivalent discrete time form by using an approximation of x’[n] ~ 󰇟󰇠󰇟󰇠

Where T is the sampling period between two adjacent mples, x[i] and x[i+1] sa

In many cases, an assumption of T = 1 is very acceptable, because the digital frequency in radian/sample has the information of T As a result, we obtain a final discrete form of TEO:

This result gives us a very meaningful significance that the magnitude and frequency components of a time varying sinusoidal signal can be calculated by only three consecutive sampled data.

SE -ResNeXt 50 model

The Squeeze-and-Excitation block is a computational unit which can be constructed for any given transformation Ftr: X → U, X  RH × W × C, U  RH ×

In this article, we define W × C as a convolutional operator, denoted as Ftr The learned set of filter kernels is represented by V = [v1, v2, , vC], where vc indicates the parameters of the c-th filter Consequently, the outputs of the convolutional operator Ftr can be expressed as U = [u1, u2, , uC].

In this article, we explore the convolution process denoted by , with vc representing the channel vector [vc1, vc2, , vcC] and X as the input vector [x1, x2, , xC], excluding bias terms for simplicity The 2D spatial kernel, vcs, acts on the corresponding channels of X, allowing channel dependencies to be embedded within vc while intertwining with the spatial correlations captured by the filters Our objective is to enhance the network's sensitivity to informative features for better exploitation in subsequent transformations, while diminishing less useful features We propose a method to explicitly model channel interdependencies through a two-step process of squeeze and excitation, which recalibrates filter responses prior to the next transformation A visual representation of the SE building block is provided in Figure 2.4.

Figure 2.4-1: A Squeeze-and-Excitation block a Squeeze: Global Information Embedding

To address the challenge of exploiting channel dependencies, we analyze the signals received by each channel in the output features Each learned filter functions within a local receptive field, limiting the ability of each transformation output unit (U) to utilize contextual information beyond this area This limitation is particularly pronounced in the lower layers of the network, where the receptive field sizes are smaller.

To address this issue, we suggest consolidating global spatial information into a channel descriptor This is accomplished through global average pooling, which produces channel-wise statistics Specifically, a statistic \( z_{RC} \) is derived by reducing \( U \) across the spatial dimensions \( H \times W \), with the c-th element of \( z \) computed accordingly.

To effectively utilize the information gathered during the squeeze operation, we implement a subsequent process designed to capture channel dependencies comprehensively This function must satisfy two key criteria: it should be flexible enough to learn nonlinear interactions between channels, and it must support non-mutually-exclusive relationships to allow for the simultaneous emphasis of multiple channels rather than relying on one-hot activation To achieve these objectives, we employ a simple gating mechanism utilizing a sigmoid activation function.

To enhance model generalization and manage complexity, we utilize a gating mechanism structured as a bottleneck This consists of two fully connected layers surrounding a ReLU non-linearity The first layer, parameterized by W1, serves as a dimensionality-reduction layer with a reduction ratio r, followed by a ReLU activation, and is succeeded by a dimensionality-increasing layer characterized by parameters W2.

17 output of the block is obtained by rescaling the transformation output U with the activations:

The function Fscale(Uc, Sc) is defined as Fscale(Uc, Sc) = Sc * Uc, where Uc represents the feature map and Sc denotes the scalar This operation involves channel-wise multiplication, effectively enhancing the feature representation Notable implementations of this concept can be seen in models such as SE-Inception and SE-ResNet.

Integrating SE blocks into architectures like AlexNet and VGGNet is a simple process due to their flexibility, allowing for applications beyond traditional convolutions This versatility is exemplified in the development of SENets, which incorporate SE blocks into advanced modern designs.

In non-residual networks like the Inception network, Squeeze and Excitation (SE) blocks are integrated by defining the transformation \( F_{tr} \) as the complete Inception module, resulting in an -Inception network SE blocks also exhibit versatility, allowing their application in residual networks, as illustrated by the SEResNet module where \( F_{tr} \) represents the non-identity branch of a residual module The Squeeze and Excitation operations occur prior to the summation with the identity branch Additionally, various architectures such as ResNeXt, Inception-ResNet, MobileNet, and ShuffleNet can be developed using similar integration techniques, as shown in the architecture diagrams for SE-ResNet-50 and SE-ResNeXt-50.

Figure 2.4-2: The schema of the original Inception module (left) and the SE-Inception module (right)

Figure 2.4-3: The schema of the original Residual module (left) and the SE-ResNet module (right)

To ensure the proposed SE block is practical, it must effectively balance model complexity and performance for scalability In all experiments, a reduction ratio of 16 is applied, unless specified otherwise For instance, comparing ResNet-50 with SE-ResNet-50 demonstrates that the accuracy of SE-ResNet-50 surpasses that of ResNet-50, nearing the performance of the deeper ResNet-101 network.

The ResNet-50 model requires approximately 3.86 GFLOPs for a single forward pass with a 224 × 224 pixel input image Each Squeeze-and-Excitation (SE) block utilizes global average pooling during the squeeze phase, followed by two small fully connected layers in the excitation phase and a cost-effective channel-wise scaling operation Overall, the integration of SE blocks enhances the efficiency of ResNet-50.

3.87 GFLOPs, corresponding to a 0.26% relative increase over the original ResNet-

In a practical evaluation, a training mini-batch of 256 images reveals that a single forward and backward pass through ResNet-50 takes 190 ms, while SE-ResNet-50 requires 209 ms on a server equipped with 8 NVIDIA Titan X GPUs This difference highlights a reasonable overhead, especially considering that global pooling and small inner-product operations are not fully optimized in current GPU libraries Additionally, for applications on embedded devices, CPU inference times were benchmarked, showing that ResNet-50 processes a 224 × 224 pixel input image efficiently.

164 ms, compared to 167 ms for SE-ResNet-50 The small additional computational

19 overhead required by the SE block is justified by its contribution to model performance

The proposed block introduces additional parameters located within the two fully connected (FC) layers of the gating mechanism, representing a minor portion of the overall network capacity Specifically, the number of extra parameters added can be quantified as follows:

The reduction ratio (r), number of stages (S), output channel dimension (Cs), and repeated block number (Ns) are crucial in understanding the architecture of SEResNet-50 This model introduces an additional 2.5 million parameters, resulting in a total of 27.5 million, marking a 10% increase compared to ResNet-50 Most of these new parameters are concentrated in the final stage, where excitation occurs across the largest channel dimensions Notably, the removal of the final stage of SE blocks leads to a minimal performance drop of less than 0.1% in top-1 error on ImageNet, reducing the overall parameter increase to 4%, which is advantageous for scenarios where parameter efficiency is essential.

Both the plain network and its SE counterpart undergo training using the same optimization methods While training on ImageNet, standard practices are followed, including data augmentation with random-size cropping to 224 × 224 pixels (or 299 × 299 for Inception-ResNet-v2 and SE-Inception-ResNet-v2) and random horizontal flipping Additionally, input images are normalized through mean channel subtraction to enhance performance.

Band-pass filter

A band-pass filter is an electronic circuit that permits a specific range of frequencies to pass through while attenuating frequencies outside this range Essentially, it allows signals within a designated frequency band to pass while suppressing those that are either too low or too high in frequency.

A band-pass filter combines high-pass and low-pass filtering elements to allow a specific range of frequencies to pass through The high-pass filter permits frequencies above a designated cutoff frequency, while the low-pass filter allows frequencies below another cutoff frequency The overlapping region between these cutoff frequencies defines the band of interest, enabling the band-pass filter to transmit these frequencies with minimal attenuation.

Band-pass filters are essential components in various fields, particularly in electronics, where they extract specific frequency components from signals, eliminate unwanted noise, and separate communication channels In audio systems, these filters control the frequency response of speakers and create unique audio effects Additionally, in telecommunications and wireless communication systems, band-pass filters isolate specific frequency bands to enhance transmission and reception efficiency.

A band-pass filter is defined by key characteristics such as the center frequency, which represents the midpoint of the allowed frequency range, and the bandwidth, indicating the range of frequencies surrounding the center frequency These attributes can be tailored according to the design of the filter components Various types of band-pass filters exist, including passive filters.

(which use passive components like resistors, capacitors, and inductors) and active filters (which incorporate amplification elements like operational amplifiers)

Figure 2.5-1: Unrestricted signal (upper diagram)

Chapter conclusion

Chapter 2 explained the basic content of the ECG signal and the methods used in classifying sleep apnea In addition, this chapter answered the question of why we should be used to classify the disease

DATASET AND PROPOSED METHODS

Chapter description

Chapter 3 will describe the new methods that have been applied to the classification of sleep apnea that I have studied Thematic content analyzes the theoretical basis as well as how I do it step by step in detail The proposed methods are optimized with high accuracy in my graduation thesis.

Experimental dataset

This study utilizes the PhysioNet Apnea-ECG dataset from Philipps University, which comprises 70 records split into a training set of 35 records (a01 to a20, b01 to b05, and c01 to c10) and a testing set of 35 records (x01 to x35) Each recording ranges from just under 7 hours to nearly 10 hours and features a continuous digitized ECG signal alongside apnea annotations created by human experts based on simultaneous respiration and related signals Additionally, the dataset includes machine-generated QRS annotations that label all beats as normal, regardless of type Notably, eight recordings (a01 to a04, b01, and c01 to c03) are enhanced with four extra signals: chest and abdominal respiratory effort signals (Resp C and Resp A) from inductance plethysmography, oronasal airflow (Resp N) measured with nasal thermistors, and oxygen saturation (SpO2).

The files with names of the form rnn.dat contain the digitized ECGs (16 bits per sample, least significant byte first in each pair, 100 samples per second, nominally

The article discusses the various file types associated with signal recordings, including hea files, which are text header files that outline the names and formats of related signal files necessary for the software provided on this site Additionally, apn files are binary annotation files that indicate the presence or absence of apnea for each minute of the 35 learning set recordings Lastly, qrs files are machine-generated binary annotation files created using sqrs125, designed for users who prefer not to utilize their own QRS detectors.

ECG recordings were sampled at a rate of 100 Hz, with durations ranging from 401 to 587 minutes Each 1-minute segment of the ECG signal was expertly annotated to indicate the presence of apnea events, categorized as either SA (if an event occurred) or normal Notably, the annotation file did not differentiate between hypopnea and apnea, classifying all occurrences as either mixed or obstructive, with central apnea excluded.

This section outlines techniques for pre-processing ECG signals, extracting relevant features, and developing a classifier A flowchart illustrating the proposed method can be found in Figure 3.2-1 Specifically, the dataset undergoes pre-processing using a band-pass filter to enhance signal quality.

The process begins with a 23-pass filter, followed by the application of the TEO algorithm to identify the peak R values Subsequently, the interval and amplitude of these R peaks are determined, utilizing cubic interpolation to produce 900 values for each feature.

After pre-processing the data and extracting features, I proceed to classify the signal based on the SE-ResNeXt 50 model

Figure 3.2-1: Sleep apnea classification scheme

The proposed methods

The recorded ECG signals are frequently distorted by noise and artifacts Their frequencies, generated by the power lines’ interference are in the range of 50 to 60

Muscle contractions and electrodes on the skin produce noise in the frequency range of 40 to 48 Hz, which significantly interferes with ECG signals To enhance peak detection and minimize noise and artifacts from electrical components, I utilized a band-pass filter for the ECG with a frequency range of 3 to 40 Hz.

The band-pass filter effectively balances phase response and signal attenuation by allowing only signals within a specific frequency range to be processed, while blocking undesirable frequencies This functionality is illustrated in Figure 3.3-1, showcasing the signals before and after passing through the band-pass filter.

Figure 3.3-1: The original signal on lead V2 ECG

Figure 3.3-2: The component falls within 3 to 4 Hz frequency range of the ECG signal

Abnormal ECG signal characteristics are analyzed and fed into a machine learning classifier to identify irregular segments in patients with SA A study demonstrated a novel technique based on the Teager Energy Operator (TEO) for accurately detecting the QRS complex in ECG signals The findings indicate that this method is not only reliable but also outperforms more complex approaches, such as neural networks Overall, the TEO-based method is straightforward, efficient, and precise, making it suitable for practical applications in real-world settings.

R peaks in ECG signals in my study and then fed them into a CNN model to classify the disease a R peaks detection

The TEO algorithm is utilized to identify R peaks, retrieve their amplitudes, and estimate RR intervals based on their positions This algorithm has diverse applications, notably in speech transmission processing The TEO operates through a second-order differential equation, allowing for the calculation of total energy of oscillation, which encompasses both kinetic and potential energies.

E =   k  +   m  (3.1) where k is the spring constant and m is the mass of the oscillating body A periodic harmonic formula can be produced using the formula in (1): x(t) = Acos(  󰇜 (3.2)

The phase shift indicates the oscillation frequency, while A represents the oscillation amplitude The position of the oscillating body over time is denoted by x(t) To calculate the essential harmonic energy required for signal production, refer to equations (3.1) and (2).

The following is a simplified form of TEO: c[x(t)] =  󰇟   󰇛󰇜󰇠  x(t)–      󰇛󰇜 (3.4)

By substituting nT for t, we derive the equation c[x(t)] = x²[n] x[n-1] x[n+1] (3.6), where c[x(t)] represents the energy operator for continuous time t In this context, x(t) denotes the tth signal component, while hx′(t)i and hx′′(t)i refer to the first and second derivatives of x(t), respectively.

T is the sample period, and n is the sample size [39]

The TEO pattern is intermittent and nonlinear due to the heartbeats’ dynamic nature TEO captures the intermittent properties nonlinearly because it is a nonlinear operator itself

The process of peak detection includes the following step:

Signal[n], baseline < signal[n] n = 2, 3, 4,… (3.7)Not select: signal[n] < baseline

ECG signals are analyzed at baseline (0) to identify R peaks by locating the maximum peak within a 50-sample window around the previously identified candidate R peak (Equation (3.7)) The detection of R peaks using the TEO algorithm is illustrated for both the filtered and raw ECG signals in Figure 3.3-3.

Figure 3.3-3: The diagram block show 3 steps of E peaks detection

After preprocessing the data and extracting features, I classify the signal using the SE-ResNeXt 50 model The setup parameters include 100 epochs, a batch size of 256, a cross-entropy loss of 1e3, and the AdamW optimization algorithm.

In this study, I use accuracy, sensitivity, and specificity as measures to assess the performance of the machine learning classifier

Accuracy: It is defined as the ratio of number of correctly classified samples to that of total samples

Sensitivity is defined as the ratio of correctly classified samples to the total number of samples that actually belong to a specific class This metric measures the effectiveness of a model in accurately identifying true values within that class.

Specificity measures the accuracy of identifying negative cases within a dataset It is calculated as the ratio of true negatives to the total number of samples in the negative class.

Specificity =     (3.10) where TP: True Positive, TN: True Negative, FP: False Positive, FN : False

Hence, these metrics form a complete set of evaluating the performance of the model.

Chapter conclusion

Chapter 3 has outlined the method of classifying sleep apnea by ECG signal

Besides, the summary diagram described in detail every step I took As a result, the sleep apnea is classified with high accuracy, providing many opportunities for the medical use of ML

RESULT AND DISCUSSION

Result

This study presents two key contributions to ECG signal analysis First, it enhances the pre-processing phase by incorporating noise filtering, peak detection, and feature extraction techniques Subsequently, the TEO algorithm is employed to accurately detect R peaks and compute their amplitudes and RR intervals Furthermore, the optimization of the activation function based on the TEO algorithm significantly boosts the classification accuracy of the results.

In this study, I employ the SE-ResNeXt 50 model for classification, marking its first application in sentiment analysis (SA) classification The results demonstrate significantly improved accuracy and sensitivity As illustrated in Table 4.1-1, the performance of this model surpasses that of existing research aimed at similar objectives.

Comparison Study Year Model Accuracy Sensitivity Specificity

Discussion

In this study, it included 3 steps to detect sleep apnea:

- The pre-processing step: Use a finite impulse response band-pass filter for the ECG signal

+ Apply TEO algorithm detects R peaks

+ Calculate the amplitude and interval between the R peaks

- The classification step: Use SE-ResNext 50 model to classify SA

The network effectively learns to leverage global information, enhancing key informative features while diminishing less relevant ones, enabling feature recalibration This model has demonstrated significant utility, particularly in analyzing 1D data and ECG signals.

Conclusion

This study presents a modified approach for classifying supraventricular arrhythmia (SA) using electrocardiogram (ECG) signals A noise filter is applied to the PhysioNet dataset to enhance signal quality, followed by the application of the Teager Energy Operator (TEO) algorithm for accurate R peak detection Key features, including signal amplitudes and RR intervals, are extracted for analysis The SE-ResNeXt 50 model is then employed for classifying SA, achieving an impressive average accuracy of 89.21%, with sensitivity at 90.29% and specificity at 87.36% The TEO algorithm has gained traction in recent years, proving effective in the preprocessing stage to improve data localization.

The proposed method for R peak detection surpasses complex techniques such as neural networks in reliability and accuracy The results indicate that this approach is simple, efficient, and precise, making it well-suited for contemporary applications This serves as the foundation for demonstrating the SA classification performance of the algorithm utilizing ECG signals.

Upon completing my thesis, the results indicate that my method demonstrates a high level of accuracy, paving the way for a promising future in executing my previously developed plan.

In the future, I plan to implement advanced methods for processing ECG signals to accurately diagnose sleep apnea in patients I will enhance the pre-processing phase by utilizing improved filters that incorporate normalization and transfer spectrum images Additionally, I aim to refine the feature extraction process with a more effective algorithm Furthermore, I will select superior machine learning techniques for detecting sleep apnea My goal is for my thesis to be applied in hospitals, providing doctors with reliable support and ensuring patients feel confident in their diagnosis.

[1] Matthew L.H and Steven D.B Obstructive sleep apnea In National Library of Medicine: National Center for Biotechnology Information, pp 2-5 (2011)

[2] Mannario M.R., Filippo F.D., Pirro M Obstructive sleep apnea syndrome, Eur In

[3] Young T., Evans L., Finn L., Palta M Estimation of the clinically diagnosed proportion of sleep apnea syndrome In Middle-aged men and women, Sleep 20 (9), pp 705-706 (1997)

[4] Ali S.Q., Khalid S., Brahim B A Novel Technique to Diagnose Sleep Apnea In Suspected Patients Using Their ECG Data, IEEE Access, 7, pp 35184 35194 (2019) –

[5] Li Y., Pan W., Li K., Jiang Q., Liu G Sliding trend fuzzy approximate entropy as a novel descriptor of heart rate variability In obstructive sleep apnea, IEEE J Biomed Health Inf 23 (1), pp 175–183 (2019)

[6] Lavie P., Herer P., Hoffstein V Obstructive sleep apnea syndrome as a risk factor for hypertension In Population study, Br Med J 320 (7233), pp 479 482 (2000) –

[7] Peker Y., Kraiczi H., Hedner J., L¨oth S., Johansson A., Bende M An independent association between obstructive sleep apnea and coronary artery disease In Eur Respir J 14 (1), pp 179 184 (1999) –

[8] Yoshihisa A and Takeishi Y Sleep disordered breathing and cardiovas cular diseases In J Atheroscler Thromb 26 (4), pp 315 327 (2019) –

[9] Mark E.D and Kyoung B.I Obstructive sleep apnea and stroke In Chest, 136(6), pp 1668 1677 (2009) –

[10] Baek J.W., Kim Y.N., Kim D.E., Lee, J.H Computer-aided detection with a portable electrocardiographic recorder and acceleration sensors for monitoring obstructive sleep apnea In Sensors and Transducers, 167(3), pp 80 87 (2014) –

[11] Rundo J.V and Downey R Chapter 25 - Polysomnography In K H Levin, &

P Chauvel (Eds.), Handbook of Clinical Neurology, pp 381 392 (2019) –

[12] Syeda Q.A., Sohail K., Samir B.B A Novel Technique to Diagnose Sleep Apnea in Suspected Patients Using Their ECG Data In IEEE Access, 7, pp 35184 35194 –

[13] Manish S., Shreyansh Ag., U R.A Application of an optimal class of antisymmetric wavelet filter banks for obstructive sleep apnea diagnosis using ECG signals In Computers: Biology and Medicine, pp 100:100–113, (2018)

[14] Pombo N., Silva B.M.C., Pinho A.M., Garcia N Classifier Precision Analysis for Sleep Apnea Detection Using ECG Signals In IEEE Access, 8, pp 200477–

[15] Bozkurt F., Ucar M.K., Bozkurt M.R., Bilgin C Detection of Abnormal Respiratory Events with Single Channel ECG and Hybrid Machine Learning Model

In Patients with Obstructive Sleep Apnea Irbm, 41(5), pp 241 251 (2020) –

[16] Vega P.R., Gang L., Wan-Young C Sleep apnea classification using ECG signal wavelet-PCA features In National library of medicine, pp 2-10 (2014 )

[17] Inez B and Wiersema J.R Resting electroencephalogram in attention deficit hyperactivity disorder Developmental course and diagnostic value Author links open overlay panel In Psychiatry Research 216(3), pp 391- 397 (2014)

[18] Simranjit K., Sukhwinder S., Priti A., Damanjeet K., Manoj B Phase Space Reconstruction of EEG signals for classification of ADHD and control adults In Clinical EEG and Neuroscience (2020)

In the proceedings of the 2nd International Conference on Human-centered Artificial Intelligence, Pham T.V.H., Nguyen A.T., and Tran A.V presented a study on utilizing ensemble learning techniques to detect ADHD in children by analyzing the non-linear features of EEG signals This research highlights the potential of advanced machine learning methods in improving ADHD diagnosis through innovative signal processing.

[20] Duda M., Ma R., Haber N., Wall D.P Use of machine learning for behavioral distinction of autism and ADHD In Translational Psychiatry, vol 6 (2016)

[21] Alchalabi A.E., Shirmohammadi S., Eddin A.N., Elsharnouby M Detecting ADHD patients by an EEG-based serious game In IEEE Transactions on Instrumentation and Measurement (2018)

Nguyen D.C et al developed a method for estimating short-term cardiovascular pulses for dengue fever screening, utilizing continuous-wave Doppler radar Their approach incorporates empirical mode decomposition and continuous wavelet transform techniques, enhancing the accuracy of biomedical signal processing This innovative research is published in Biomedical Signal Processing and Control, contributing valuable insights into non-invasive diagnostic methods for dengue fever.

[23] Wessel J.R Testing Multiple Psychological Processes for Common Neural Mechanisms Using EEG and Independent Component Analysis In Brain Topography, vol 31, pp 90-100 (2016)

In their 2018 study published in the Journal of Neuroscience Methods, Katoab et al explored the online detection of amplitude modulation in motor-related EEG desynchronization They compared the effectiveness of a lock-in amplifier with traditional methods such as fast Fourier transform, continuous wavelet transform, and autoregressive algorithms The findings, detailed in volume 293, pages 289-298, highlight the advantages of the lock-in amplifier in analyzing EEG signals related to motor activity.

[25] Armin A., Alireza K., Mohammad R.M., Ali M.N Detecting ADHD Childrenusing the Attention Continuity as Nonlinear Feature of EEG In Frontiers Biomed Technol, pp 28-33 (2016)

[26] Mohammad R.M et al EEG classification of ADHD and normal children using non-linear features and neural network In Biomedical Engineering Letters, vol 6, pp 66-73 (2016)

[27] Tran A.V et al Classify arrhythmia by using 2D spectral images and deep neural network Indonesian Journal of Electrical Engineering and Computer Science Vol 25,

[28] Bozkurt F., Ucar M.K., Bozkurt M.R., Bilgin C Detection of Abnormal Respiratory Events with Single Channel ECG and Hybrid Machine Learning Model in Patients with Obstructive Sleep Apnea Irbm, 41(5), pp 241–251 (2020)

[29] Erdenebayar U., Kim Y.J., Park J.U., Joo E.Y., Lee, K.J Deep learning approaches for automatic detection of sleep apnea events from an electrocardiogram

In Computer Methods Programs Biomed, pp 105001 (2019)

[30] Nguyen H.D., Wilkins B.A., Cheng Q., Benjamin B.A An online sleep apnea detection method based on recurrence quantification analysis In IEEE J Biomed Health Inform, 18(4), pp 1285–1293 (2014)

Tao et al (2019) developed a method for detecting sleep apnea using a single-lead ECG signal, employing an automatic feature-extraction technique through a modified LeNet-5 convolutional neural network This research, conducted at Hefei University of Technology in Anhui, China, highlights the potential of advanced neural network architectures in improving the accuracy of sleep apnea diagnosis.

[32] Penzel T., Moody G.B., Mark R.G., Goldberger A.L., Peter J.H Apnea-ECG Database In Physionet (2000) https://physionet.org/content/apnea-ecg/1.0.0/

[33] Norio I An Efficient Teager Energy Operator-Based Automated QRS Complex Detection In Jounal of healthcare engineering (2018)

[34] Holambe R.S and Deshpande M.S Nonlinear measurement and modeling using Teager energy operator In Advances in Non-Linear Modeling for Speech Processing Springer Briefs in Electrical and Computer Engineering, pp 45 59 (2012) –

[35] Jie H., Li S and Gang S Squeeze and excitation networks In Proceedings of the IEEE conference on computer vision and pattern, pp 7132-7141 (2018)

[36] Dongqi W., Qinghua M., Dongming C., Hupo Z., Lisheng X Automatic detection of arrhythmia based on multiresolution representation of ECG signal In Sensors, pp 1579 (2020)

[37] Tao W., Changhua L., Guohao S., Feng H Sleep apnea detection from a single- lead ecg signal with automatic feature-extraction through a modified lenet-5 convolutional neural network PeerJ, pp 7731 (2019)

[38] Mahsa B and Mohamad F Sleep apnea detection from single-lead ecg: a comprehensive analysis of machine learning and deep learning algorithms IEEE Transactions on Instrumentation and Measurement, pp 1–11 (2022)

[39] Sinam A.S and Swanirbhar M A novel approach osa detection using single-lead ECG scalogram based on deep neural network Journal of Mechanics in Medicine and Biology, pp 1950026 (2019)

[40] Bahrami M and Forouzanfar M Detection of sleep apnea from single-lead ECG: Comparison of deep learning algorithms In IEEE International Symposium on Medical Measurements and Applications (MeMeA), pp 1-5 (2021)

[41] Andr´e P., Nuno P., Bruno M.C.S., Kouamana B., Nuno G Towards an accurate sleep apnea detection based on ECG signal: The quintessential of a wise feature selection In Applied Soft Computing, vol 83, pp 105568 (2019)

[42] Li K., Pan W., Li Y., Jiang Q., Liu G A method to detect sleep apnea based on deep neural network and hidden Markov model using single-lead ECG signal In Neurocomputing, vol 294, pp 94-101 (2018)

SUMMARY OF THE MASTER'S THESIS

Topic: A sleep apnea detection from ECG signal and classification method based on the SE-ResNeXt model

Author: Do Thi Thu Phuong 2021B –

Instructor: PhD Tran Anh Vu

Keyword: Sleep apnea, Classfication, -ResNeXt, ECG signal SE

Summary content: a) Reason of choosing the topic

Sleep apnea is a serious sleep disorder characterized by episodes of complete breath cessation, occurring at least ten times during sleep If left undiagnosed and untreated, it can lead to significant health complications Consequently, accurately classifying sleep apnea is crucial for developing effective treatment options The electrocardiogram (ECG) signal plays a key role in this classification, as it is directly linked to respiratory function.

The purpose of the thesis is to propose a method to classify apnea based on an

ECG signal, improve the accuracy compared to previous studies and use a suitable

filter to remove noise from the signal as well as combine with the Teager Energy

The TEO algorithm effectively detects the amplitude and distance of R peaks in ECG signals, while the SE-ResNeXt deep learning model classifies sleep apnea with high accuracy This innovative approach demonstrates the potential of using ECG signals for precise sleep apnea classification, paving the way for enhanced applications of artificial intelligence in healthcare and offering new avenues for disease detection and treatment.

Based on the identified research objectives and implementation process, the research objects of the thesis are determined to include the following groups:

Sleep apnea is a sleep disorder characterized by repeated interruptions in breathing during sleep, which can lead to various health complications The primary causes of sleep apnea include obesity, anatomical factors, and lifestyle choices, while its effects can range from daytime fatigue to serious cardiovascular issues Classification of sleep apnea typically involves identifying its types, such as obstructive, central, and complex sleep apnea, with practical methods for diagnosis including polysomnography and home sleep apnea testing Understanding these aspects is crucial for effective management and treatment of the condition.

- A group of objects related to the classification of sleep apnea by machine learning methods, including pre-processing techniques such as using a signal

filter, feature extraction by the TEO algorithm and SE-ResNeXt model for the classification of sleep apnea with high accuracy

Due to limited research time and dataset, I focused on solving scientific problems essential to achieving my purposes Specifically, the content of the thesis is limited to the following scope:

The thesis provides an overview of the causes and effects of untreated sleep apnea, emphasizing the pros and cons of traditional classification methods It lays the groundwork for proposing the use of artificial intelligence in the classification of sleep apnea, highlighting the potential benefits of this innovative approach.

The article discusses the classification of sleep apnea using artificial intelligence, systematically outlining the foundational principles and methodologies involved It covers essential aspects such as pre-processing techniques, feature extraction algorithms, and classification methods based on ECG signals Additionally, it highlights the author's contributions to advancing knowledge in this area.

This chapter provides a comprehensive overview of sleep apnea, highlighting the significant risks and negative consequences for patients if the condition remains undiagnosed and untreated It also discusses various studies that utilize machine learning for disease classification Additionally, the chapter introduces innovative methods to be employed in my thesis, focusing on the analysis of ECG signals.

This chapter discusses the fundamental aspects of ECG signals and the techniques employed in the classification of sleep apnea It also addresses the rationale behind utilizing ECG signals for disease classification.

Chapter 3: Dataset and proposed methods

Ngày đăng: 08/12/2023, 21:33

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w