Single Channel ECG for Obstructive Sleep Apnea
Single Channel ECG for Obstructive Sleep Apnea
Single Channel ECG for Obstructive Sleep Apnea
Email: [email protected]
arXiv:1808.10844v1 [eess.SP] 31 Aug 2018
Abstract—Obstructive sleep apnea (OSA) is a common sleep daytime sleepiness. Furthermore, it is also associated with
disorder caused by abnormal breathing. The severity of OSA can the incidence and morbidity of hypertension, coronary heart
lead to many symptoms such as sudden cardiac death (SCD). disease, arrhythmia, heart failure, and stroke [12].
Polysomnography (PSG) is a gold standard for OSA diagnosis.
It records many signals from the patient’s body for at least one The gold standard of sleep-disordered diagnosis including
whole night and calculates the Apnea-Hypopnea Index (AHI) conditions such as OSA is polysomnography (PSG). It is used
which is the number of apnea or hypopnea incidences per hour. to determine the frequency and severity of normal respiratory
This value is then used to classify patients into OSA severity disorder events per hour and reports as the Apnea-Hypopnea
levels. However, it has many disadvantages and limitations. Index (AHI) which can be used to classify the OSA as normal
Consequently, we proposed a novel methodology of OSA severity
classification using a Deep Learning approach. We focused on the (AHI<5), mild (AHI is in 5–14), moderate (AHI is in 15–30),
classification between normal subjects (AHI < 5) and severe OSA and severe (AHI>30), respectively [10]. However, this method
patients (AHI > 30). The 15-second raw ECG records with apnea is a form of clinical practice which has to be done overnight in
or hypopnea events were used with a series of one-dimensional a laboratory or hospital [13] using numerous sensors to acquire
Convolutional Neural Networks (1-D CNN) for automatic feature the necessary data, such as electroencephalogram (EEG),
extraction, deep recurrent neural networks with Long Short-
Term Memory (LSTM) for temporal information extraction, and electrooculogram (EOG), chin electromyography (EMG), leg
fully-connected neural networks (DNN) for feature encoding from movement, airflow, cannula flow, respiratory effort, oximetry,
a large number of features until it closed to two classes. The body position, electrocardiogram (ECG), and so forth [6]. One
main advantages of our proposed method include easier data study shows that this sleep disorder affects approximately 9-
acquisition, instantaneous OSA severity detection, and effective 24% of the general population, and 90% remain undiagnosed
feature extraction without domain knowledge from expertise.
To evaluate our proposed method, 545 subjects of which 364 [23] because of the limited number of diagnostic measure-
were normal and 181 were severe OSA patients obtained from ments. Since it has to be done in a sleep lab with clinicians,
the MrOS sleep study (Visit 1) database were used with the k- the diagnosis results may be distorted by the lab environment
fold cross-validation technique. The accuracy of 79.45% for OSA criteria as well as the intrusive and inconvenient measurement
severity classification with sensitivity, specificity, and F-score was sensors which are attached to the patient’s body, such as EEG,
achieved. This is significantly higher than the results from the
SVM classifier with RR Intervals and ECG derived respiration EOG, chin EMG on the patient’s head, and oximetry sensor
(EDR) signal feature extraction. The promising result shows that on the patient’s finger.
this proposed method is a good start for the detection of OSA To solve the above issues, there are several studies which
severity from a single channel ECG which can be obtained from tried to diagnose OSA by other methods. Wu et al. show that
wearable devices at home and can also be applied to near real- another condition also provides information for the prediction
time alerting systems such as before SCD occurs.
Index Terms—Obstructive sleep apnea (OSA) severity detec-
of OSA severity [27]. They consequently proposed a new AHI
tion, Deep Learning, Single channel ECG prediction method using only easily available measurements
for the estimation of OSA severity level including three BP-
related variables, age, BMI, Epworth Sleepiness Scale (a
I. I NTRODUCTION
questionnaire), neck circumference, and waistline in order to
Obstructive sleep apnea (OSA) is a common sleep disorder distinguish the OSA level of normal-mild from moderate-
in which complete or partial upper airway obstruction, caused severe with the threshold equal to 15. The results showed that
by pharyngeal collapse during sleep [15]. There are two types there is a high correlation between the predicted and actual
of events which can occur during the airway obstruction AHI values. However, the accuracy is not reliable enough since
including hypopnea which is when the inspiratory airflow the questionnaire results, which are subjective measures, are
is reduced, and apnea when it is completely absent for at included in this method. Another solution is trying to detect
least ten seconds. This sleep disorder causes loud snoring or some OSA-related events to identify the severity of OSA, for
choking, frequent awakenings, disrupted sleep, and excessive example, Młyńczak et al. reducing the number of measurement
devices attached to the patient’s body by placing only the developed an algorithm for OSA detection using novel features
wireless tracheal sensor on the patient’s neck and detecting based on bispectral analysis including a spectrum and HOS of
snoring from breathing. Snoring is a significant symptom or HRV and EDR signals. Afterwards, training with LS-SVM
sign of OSA [17]. Moreover, Lee et al. also proposed to detect allowed discrimination between normal and apnea episodes.
body postures on beds from OSA patients by using 12 capac- In 2016, Sharma and Sharma extracted features based on RR
itively coupled electrodes, and also a conductive textile sheet time series from ECG segments along with energy in the error
attached to the patient’s chest to acquire electrocardiogram of the QRS approximation and coefficients from the Hermite
(ECG) signals. Patients with severe OSA have a higher risk of decomposition. Subsequently, they performed a segment clas-
developing cardiovascular diseases, and the apnea occurs more sification between the apnea and normal segments with four
frequently and severely in a supine position than in others classifiers including K-Nearest Neighbor (KNN), Multilayer
[14]. Nevertheless, most studies still required some specific Perceptron Neural Network (MPNN), SVM, and LS-SVM
tools and attached them to several points on the patient’s body, [22]. In 2018, [25] decomposed one-minute duration (fixed-
which not only uncomfortable for the patient but also leads to length) ECG signals obtained from ECG recordings into band-
some limitations when the patient moves during sleep. limited signals using a bank of Gabor filters. After that, they
Using wearable devices which provide some necessary bio- computed phase descriptors (PDs) and extracted histogram
sensors for sleep disorder diagnosis such as ECG, EOG, features. Finally, they classified apnea events using an LS-
EMG, Heart Rate (HR), Skin Potential and Pulse Oximeter SVM classifier with radial basis function (RBF) kernel [25].
for physiological measurements is obviously a better way However, the apnea detection which extracted features from
because these devices are developed based on the key of fixed-length segments of ECG signals had some limitations
unobtrusiveness [29]. Moreover, they are also easy to use, about detailed insights such as the duration of the events
easy to find, and cheaper than clinical measurements. One of because apnea or hypopnea events can occur for less than one
the most accurate physiological signals provided by various minute, or for longer than one minute.
wearable devices and used in several OSA studies are from Instead of fixed-length segmentation, Chen et al. segmented
the ECG [16]. ECG signals by the iterated cumulative sums of squares
(ICSS) algorithm with RR Intervals. They performed feature
II. R ELATED W ORKS extractions in the frequency domain and calculated the severity
Sannino et al. focused on individual differences among all index of each patient. Then, to this value was added some
subjects’ ECGs and performed a set of IF-THEN rules by a critical subject admission information such as age, body mass
set of parameters related to HRV for each person in order to index, and gender into an SVM classifier to classify OSA
describe the occurrence of apnea events [21]. Several studies and non-OSA subjects [5]. Moreover, Song et al. also pro-
found that ECGs from different people have some identical posed an OSA detection approach which considers temporal
characteristics and show that the use of only ECG sensors dependence within segmented signals using the Discriminative
can achieve good accuracy in the detection of sleep apnea. Hidden Markov Model (HMM). The results showed that the
Since various studies show that patients with OSA have slow- accuracies were improved while classifying OSA events with
wave sleep (SWS) or N3 sleep stage or less than 25% of their the use of conventional classifiers with the Discriminative
total sleep, Yoon et al. developed an automatic SWS detection HMM. Nevertheless, the accuracies of all aforementioned
algorithm based on R-R Interval information in both the time works can be affected by the RR Interval detection method
domain and frequency domain [28]. In another methodology, because they all used this as a major feature extraction.
there are many studies which have used minute-by-minute Furthermore, all of them sought only to detect the apnea
ECG segments to classify apnea or hypopnea events from or hypopnea events which requires ECG recording for at
normal ECG data [18, 26, 1, 22, 25]. least one night in order to calculate the AHI value for the
In 2014, Nguyen et al. proposed an apnea detection method purpose of OSA severity detection. Gami et al. also showed
by using recurrence plots (RPs) and subsequent recurrence that the risk of incidence of sudden cardiac death (SCD) was
quantification analysis (RQA) of HRV data which provides significantly and independently associated with OSA, based
the statistical characterization of complex HR regulations. both on the frequency of apneas and hypopneas, and the
They proposed a combination of classifiers including Support severity of nocturnal oxygen desaturations [8].
Vector Machine (SVM) and Neural Network (NN) with a soft Recently, one study [11] proposed a novel method to detect
decision fusion rule for performance improvement [18]. In the severity of OSA without recording ECG for a whole night.
2015, Varon et al. derived all features from the RR Intervals They detected the sleep-onset period from the heart rate which
and ECG derived respiration (EDR) signals to be inputs is lower at that time than during wakefulness. Then they
of classifiers including linear discriminant analysis (LDA), detected respiration cycles from EDR signals and used this
SVM, and least-squares support vector machines (LS-SVM). as an input to the AHI prediction using regression analysis.
[26]. Atri and Mohebbi also showed that it is possible to Finally, they used the AHI value to classify the severity
acquire information regarding non-stationary signals and their of OSA into four levels according to the OSA definition.
deviation from linearity and Gaussianity using a spectrum However, the accuracy of this method is still related to the
and higher order spectrum (HOS) [1]. They consequently accuracy of sleep-onset period detection. In consideration of
all the aforementioned issues, we aim to initiate an OSA B. K-fold cross-validation
severity detection approach with three main characteristics We used 10-fold cross-validation by separating samples into
including: 1) Data acquisition is easier by using only single- 3 sets including 80%, 10% and 10% for training, validation,
channel ECG which can be acquired anywhere from many and testing, respectively. Firstly, 1000 samples were selected
wearable devices; 2) No overnight sleep study is necessary from each group of patients, and we randomly partitioned
such that we can prevent the sudden cardiac death (SCD) them into 10 equal-sized subsamples such that there were 10
occurring in severe OSA patients by using only 15 seconds subsamples with 100 samples in each. For each subsample, it
of ECG, and 3) No domain knowledge for feature extraction then remains 900 samples from the total. Then, we randomly
and feature selection is necessary by using a Deep Learning selected 100 samples from these to be the validation data and
approach [20]. the remaining 800 samples were used as the training data. This
III. M ETHODOLOGY process happened 10 times to let all subsamples be tested. Note
In this section, we first introduce our data preprocessing that the data were combined samples from normal and severe
procedures. Then, k-fold cross-validation has been applied to OSA patients together.
test our main classifier. The structure of our classifier will be C. OSA severity classification using Support Vector Machine
described at the end of this section.
To compare with our main classifier, we detected RR
A. Dataset Intervals and ECG derived respiration (EDR) signals from 15
The dataset used in this research was taken from the seconds of ECG samples and extracted features from them
MrOS sleep study (Visit 1) database [7, 4, 19, 2]. The data which are widely used in several works mentioned in Section
were recorded with 2911 people of age 65 years or older II. The set of features included:
at 6 clinical centers in a baseline examination. They provide 1) Mean: An average value of the RR intervals.
raw polysomnography (PSG) data as European Data Format 2) Serial correlation: The second and third serial correla-
(EDF) files and annotation XML files of each participant tion coefficients of the RR intervals.
exported from Compumedics Profusion. The ECG signals in 3) pNN50: The number of pairs of adjacent RR intervals
this dataset were acquired from Ag/AgCl patch sensors with where the second RR interval exceeds the first one by more
the sampling rate of 512 Hz through a high-pass filter at than 50 ms.
0.15 Hz. Each annotation file includes a marker of start time 4) SDSD: The standard deviation of the differences be-
and duration for the apnea or hypopnea occurrences for each tween adjacent RR Intervals.
EDF file. We labeled the severity of OSA for each record 5) Normalized VLF of RR intervals: The normalized power
by using the AHI variable provided in the dataset which is of very low frequency (VLF) of RR Intervals where the total
the number of apneas in all desaturations and hypopnea with power is the sum of the three components including VLF, low
4% desaturation occurring per hour [5]. In order to detect frequency (LF), and high frequency (HF).
severe OSA patients such that we can prevent the sudden 6) Normalized VLF of EDR: The normalized power of VLF
cardiac death as mentioned in Section II, we consequently used of EDR signal.
ECG records from normal patients with AHI values between 7) Normalized LF of EDR: The normalized power of LF
2 and 5, and records from extremely severe OSA patients with of EDR signal.
AHI values greater than 35. Finally, there were 545 subjects 8) Ratio of LF to HF of EDR: The ratio of a power of LF
including 364 normal subjects and 181 severe OSA subjects to HF of EDR signal.
which were preprocessed as follows: The range of signal frequency is defined by using 0.003–
1) Filter ECGs: In order to reduce noise in ECG recordings 0.04 as VLF, 0.04–0.15 as LF and 0.15–0.4 as HF.
[3], the original ECG signal was filtered through a notch filter Then, we applied these features and OSA severity labels
at 60 Hz and then filtered using a bandpass second-order as an input of the Support Vector Machine (SVM) model to
Butterworth filter with cutoff frequencies at 5 and 35 Hz. predict whether each sample was a normal or severe OSA
2) Extract apnea or hypopnea events: The ECG of each patient.
subject was extracted as a sample of apnea or hypopnea events
D. OSA severity classification using a Deep Learning (DL)
from start time to start time added by duration according to
approach
its annotation file. We used only events that lasted 28 - 32
seconds. Then, we selected 30 seconds and normalized it by As shown in Figure 1, the training dataset of 1600 samples,
using the z-score function. Finally, we selected only the first 7860 points per sample (15 seconds × 512 Hz), is fed into our
15 seconds to use. model. The model is implemented using Keras with parameter
3) Randomly selected samples: After completing all the configurations as follows:
data preprocessing procedures, there were 8604 apnea or • A stack of one-dimensional Convolutional Neural Net-
hypopnea event samples including 3270 samples from normal works (1-D CNNs) with 256, 128 and 64 units, respec-
subjects and 5334 samples from severe OSA patients. We tively, for automatic feature extraction [20].
finally randomly selected 1000 samples from each group to • Each CNN layer is followed by batch normalization; the
use for creating the classifier. rectified linear unit (ReLU) activation function as well
1-D
:=
CNNs LSTMs DNNs
normal
Softmax
severe OSA 8 4
32 32 16 32 16
64 64 1
128 128
256
validation set (10%) test set (10%)
Fig. 1. The structure of proposed OSA severity classifier using a Deep Learning approach
84.00
* R EFERENCES
79.00 [1] Roozbeh Atri and Maryam Mohebbi. Obstructive sleep apnea
detection using spectrum and bispectrum analysis of single-lead
74.00 ecg signal. Physiological measurement, 36(9):1963, 2015.
[2] Terri Blackwell, Kristine Yaffe, Sonia Ancoli-Israel, Susan
Accuracy