Detection of Sleep Apnea Using Sub-Frame Based
Detection of Sleep Apnea Using Sub-Frame Based
Detection of Sleep Apnea Using Sub-Frame Based
Abstract—Sleep apnea is a sleep disorder that affects one’s studies that a single channel (C3-A2 or C4-A1) of the EEG
breathing during sleep. A large number of people all over the signal is efficient in analyzing sleep related problem [2].
world are suffering from this disease. Electroencephalogram Therefore, to identify sleep stages as well as the quality of
(EEG) provides electrical activity of the brain signal that enables
physicians to diagnose and monitor sleep apnea events. In this sleep, it is widely used. An automatic sleep stage scoring
paper, an efficient scheme for classifying apnea and non-apnea and apnea-hypopnea detection using EEG, ECG, EOG and
events of an apnea patient is proposed based on temporal EMG signals is presented in [3]. The method comprises
variation of Beta band energy in a frame of EEG data. Unlike of Fourier and wavelet transforms, derivative dynamic time
conventional approaches, instead of extracting features from the warping and waveform recognition. In [4], the exponents
whole frame at a time, a given test frame of EEG signal is
divided into overlapping sub-frames and spectral characteristics of EEG scaling are computed using detrended fluctuation
are extracted from each pre-processed sub-frame. By investi- analysis (DFA). Here a comparison between apnea and
gating the spectro-temporal characteristics of all the traditional healthy subjects during sleep is carried out. Instead of using
frequency bands of EEG signal, it is found that the temporal the full band EEG signal, band limited EEG signals are
variation of spectral energy in Beta band plays the dominant role also utilized in several applications. The whole frequency
in classifying apnea and non-apnea events. Statistical features
are extracted from the temporal pattern of Beta band energy band of EEG signal can be divided into some well-known
and are used in K nearest neighborhood classifier. Extensive sub-bands depending on human activities such as delta,
experimentation is carried out on several apnea patients with theta, alpha, sigma, and beta. In [5], energy and variance are
various apnea indices and a very satisfactory apnea detection used as features for sleep apnea detection computed from
performance is achieved in comparison to that obtained by some each frequency sub-band. Method reported in [6] detects
existing methods.
Index Terms—Electroencephalogram (EEG) signal analysis, obstructive sleep apnea from the Hilbert spectrum frequency
Sleep Apnea , Sub-frame, Beta band energy, temporal variation, variation. Bispectral characteristics of EEG signal is used in
feature extraction, classification. [7] to classify between apnea and healthy subject.
I. I NTRODUCTION
The objective of this paper is to develop an automatic
Sleep is a vital indicator of overall health and well-being. sleep apnea detection scheme for apnea patients based on
It is very afflicting if one is bereft of quality sleep or suffers spectro-temporal characteristics of EEG signal. A given test
from sleep disorder. About 4% men and 2% women in frame of EEG data is divided into consecutive overlapping
general are affected by a very common sleep disorder, named sub-frames and the beta band energy is extracted from pre-
sleep apnea [1]. This disorder is characterized by either processed sub-frames. Resulting temporal variation of beta
pauses in breathing or periods of shallow breathing while band energy is proposed to be used for statistical feature
a person is sleeping. The pause in breathing can last for extraction. Finally K nearest neighborhood KNN classifier is
a few seconds to several seconds. Sleep apnea disrupting employed for supervised classification. Performance of the
normal sleep leads to some serious health issues and thus proposed method is tested on EEG data collected from several
apnea detection is very important. The detection of apnea apnea patients.
is traditionally done with the help of an expert which is
very laborious, time consuming and also the process is
prone to fatal human error. Therefore, for long, it has been
II. P ROPOSED M ETHOD
of great interest to invent a definitive method to automate
sleep apnea detection. Different biomedical signals obtained
from electroencephalogram (EEG), electrocardiogram (ECG), A brief overview of the proposed method is shown in Fig.1.
electromyogram (EMG) and electro-oculogram (EOG) have The major steps involved in the proposed method to detect
been extensively investigated to extract physiological changes apnea and non-apnea events are- sub-framing, preprocessing,
due to sleep apnea. Among them recently EEG signal is extraction of temporal variation of Beta band energy, statistical
getting popularity for apnea detection because of its direct feature extraction and classification. Detailed description of the
relationship with neural activity of brain. It is found in many steps is provided in this section.
259
in section IIA. Beta band energy for each of the sub-frame is D. Feature Extraction
calculated and shown in Figures 4 and 5. Temporal variation A test frame of length N, considering the sub-frame of
of beta band energy for apnea and non-apnea events is clearly length M with a frame shift of m samples, there will be
observed from the figures. In Fig. 4, it is observed that there total N −M + 1 number of sub-frames. Beta band energy of
m
is a sharp transition of energy in beta band in an apnea frame each of these sub-frames is determined. Hence, an array of
while in Fig. 5, there is no such sharp transition observable N −M
+ 1 number of beta band energy values is produced.
m
for a non-apnea frame. This array, showing the temporal variation of beta band
energy, is considered for extracting various statistical features
for classifying apnea and non-apnea events. Among different
features, Energy, Geometric mean, Arithmetic mean are
considered in the proposed method. For a temporal variation
x[n] of length N, the features are calculated as:
N
X
Energy = x[n]2 (1)
n=1
p
N
Geometric mean = x[1].x[2].....x[N ] (2)
PN
Fig. 4. Temporal Variation of beta band energy of 100 sub-frames in apnea xi
i=1
Arithmetic M ean = (3)
N
E. Classifier
The proposed method uses the K-nearest neighborhood (K-
NN) classifiers. It computes a distance function among the
features belonging to the EEG pattern in the test set and K
neighboring EEG patterns from both apnea and non-apnea
groups in the training set. The EEG pattern from the test set is
classified based on the class labels of K closer EEG patterns
in the train set.
III. R ESULTS AND DISCUSSION
A. Database
In order to investigate the performance of the proposed
Fig. 5. Temporal Variation of beta band energy of 100 sub-frames in non- method, five different subjects with wide variations in apnea
apnea
hypopnea index (AHI) are taken into consideration [9]. Single
channel EEG data sampled at 250 Hz are taken for experi-
Figure 6 also clarifies the reason for focusing on beta band mentation. Ground truth of each 30 second duration of EEG
energy. It shows the percentage change of energy from apnea data marked by experts as apnea or non-apnea is provided in
to non-apnea frames. It is clearly seen from the figure that beta the database.
band energy undergoes the highest change compared to other
four bands from apnea to non-apnea. Hence, in the proposed B. Classification Result
method, beta band energy is considered to be the most decisive For the purpose of testing the classification performance,
part in apnea detection. equal numbers of apnea and non-apnea frames of each subject
are taken. The performance of the proposed method is evalu-
ated using standard measures such as accuracy, sensitivity and
specificity whose equations are represented in (4), (5) and (6),
respectively.
T P +T N
Accuracy = T P +T N +F P +F N × 100 (4)
TP
Sensitivity = T P +F N × 100 (5)
Fig. 6. Relative change in energy from apnea to non-apnea in all 5 subbands
TN
Specif icity = T N +F P × 100 (6)
260
TABLE I
C OMPARISON OF A PNEA D ETECTION R ESULTS OF P ROPOSED M ETHOD WITH OTHER M ETHODS
where, TP= True Positive (Apnea detected as apnea), of using beta band and sub-framing in classifying apnea and
FP=False Positive (Non-apnea detected as apnea), non-apnea events.
TN= True Negative (Non-apnea detected as non-apnea) and
IV. C ONCLUSION
FN=False Negative(Apnea detected as non-apnea)
This paper proposes a simple but effective method of sleep
For the purpose of simulation, each 30 seconds apnea/non- apnea detection using EEG signal. The drastic temporal energy
apnea frame containing 7500 samples is first segmented into variation of Beta band between apnea and non-apnea events
10 seconds overlapping sub-frames with an overlap length of an apnea patient is exploited for apnea detection. Instead of
of 9.8 seconds. In this way, a 30 second duration of apnea/ considering the entire frame of given EEG data at a time, in
non-apnea frame produces 101 numbers of sub-frames, each this paper, sub-frame based analysis is introduced. Sub-frame
of 10 seconds duration. Beta band energy values are obtained based analysis can precisely capture sharp changes in spectral
from each of these sub-frames. These array of beta band characteristics with respect to time and generate temporal
energy values, showing the temporal variation, is subjected variation of spectral energy. In particular, choice of using only
to feature extraction and extracted features are used for the beta band instead of all other traditional bands not only
classification. The proposed method is compared with two offers better classification performance but also significantly
existing methods- [5] and [6]. In the proposed method, reduces the computational complexity. The proposed method
the value of K in the K-NN classifier is varied several yields superior performance in terms of sensitivity, specificity
times and it is found that for K equal to seven gives the and accuracy compared to that obtained by other methods.
best classification result. The leave-one out cross validation As a result the proposed scheme can readily be employed in
technique is employed for performance evaluation. clinical applications to reduce the burden of the clinicians in
apnea detection.
In [5], raw EEG signal is decomposed into five frequency R EFERENCES
bands. Energy of each band limited signal and variance [1] T. Young, M. Palta, J. Dempsey, J. Skatrud, S. Weber, and S. Badr, “The
of raw EEG frame are used as features. In [6], with 0.1 Occurrence of Sleep-Disordered Breathing Among Middle-Aged Adults,”
second shift 10 second successive test frames are taken and New England Journal of Medicine, vol. 328, no. 17, pp. 1230–1235, 1993.
[2] A. R. See and C.-K. Liang, “A study on sleep eeg using sample entropy
delta ratio for each frame is calculated and used as feature, and power spectrum analysis,” in Proc.IEEE Defense Science Research
where Delta ratio = Pdelta +Ptheta +PPalpha
delta
+Psigma +Pbeta ; P =
Conference and Expo (DSR), 2011, pp. 1–4.
[3] T. Schlüter and S. Conrad, “An approach for automatic sleep stage scoring
power. The comparison is also performed with taking the and apnea-hypopnea detection,” Frontiers of Computer Science, vol. 6,
same features as the proposed method from the beta band of no. 2, pp. 230–241, 2012.
full EEG frame, without taking sub-frame (W.S.). [4] J. Zhou, X.-m. Wu, and W.-j. Zeng, “Automatic detection of sleep apnea
based on eeg detrended fluctuation analysis and support vector machine,”
Journal of clinical monitoring and computing, vol. 29, no. 6, pp. 767–772,
Comparison result of the proposed method (Prop.) with 2015.
other methods is tabulated in Table I. It is observed from [5] W. S. Almuhammadi, K. A. Aboalayon, and M. Faezipour, “Efficient
obstructive sleep apnea classification based on eeg signals,” in Proc.
the table that the proposed method offers very satisfactory IEEESystems, Applications and Technology Conference (LISAT), 2015,
performance in all three scales of sensitivity, specificity and pp. 1–6.
accuracy with respect to the aforementioned three methods. [6] C.-C. Hsu and S. Ping-Ta, “An intelligent sleep apnea detection system,”
in Proc. IEEE International Conference on Machine Learning and
While [5] and [6] are using all the five frequency bands, the Cybernetics, vol. 6, 2010, pp. 3230–3233.
proposed method is only using Beta band. Hence, the proposed [7] M. E. Tagluk and N. Sezgin, “A new approach for estimation of
method is giving better performance with a much lesser feature obstructive sleep apnea syndrome,” Expert Systems with Applications,
vol. 38, no. 5, pp. 5346–5351, 2011.
dimension. It is to be noted from the result of W.S. that the use [8] M. R. Azim, S. A. Haque, M. S. Amin, and T. Latif, “Analysis of EEG
of beta band instead of five bands provides better classification and EMG signals for detection of Sleep Disordered Breathing events,”
performance than the existing methods. Thus it validates the in Proc. IEEE Electrical and Computer Engineering (ICECE), 2010, pp.
646–649.
emphasis given on the beta band in the proposed method. [9] Sleep apnea database. [Online]. Available: https://www.physionet.org/
Moreover, the proposed method is giving better result than physiobank/database/slpdb/
without sub-frame (W.S.) approach, proving the importance
261