computer methods and programs in biomedicine 82 (2006) 58â66 .... Therefore, as described below, continuous monitoring of mean. EEG frequency can be used for .... space plus an output resolution-dependent amount of free disk space for ...
c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 8 2 ( 2 0 0 6 ) 58–66
journal homepage: www.intl.elsevierhealth.com/journals/cmpb
Computer program for automated sleep depth estimation ¨ a, Antti Saastamoinen a,∗ , Eero Huupponen a , Alpo Varri Joel Hasan b , Sari-Leena Himanen b a b
Tampere University of Technology, Institute of Signal Processing, P.O. Box 553, FIN-33721 Tampere, Finland Department of Clinical Neurophysiology, Tampere University Hospital, P.O. Box 2000, FIN-33521 Tampere, Finland
a r t i c l e
i n f o
a b s t r a c t
Article history:
In this article, we present a new implementation of an amplitude-independent method for
Received 22 June 2005
continuous-scale sleep depth estimation. Having been implemented as an add-on analysis
Received in revised form 3 February
module under commercially available biosignal recording and analysis software, it can be
2006
easily applied in clinical routine. The software gives the user full freedom to change all the
Accepted 3 February 2006
analysis parameters inside theoretical limits. Computational sleep depth profiles produced
Keywords:
concentrate on systematic optimization of analysis parameters, further evaluation of the
Sleep depth
method with disturbed sleep and application of the method for automated adaptive sleep
Automated analysis
analysis.
by the presented software compare favourably with visual classifications. Future work will
© 2006 Elsevier Ireland Ltd. All rights reserved.
Analysis software Computer program
1.
Introduction
For more than 35 years, visual assessment of wakefulness and sleep in clinical sleep studies has been based on the standardized manual of Rechtshaffen and Kales [1]. By searching for well-known stage-specific waveforms and applying a certain set of interpolation rules during stage changes, each epoch of typically 20 s or 30 s of data is assigned into one of seven possible stages based on the recorded electrophysiological activity found in the electroencephalographic (EEG), electro-oculographic (EOG) and electromyographic (EMG) traces. These seven stages consist of wakefulness, rapid-eye movement sleep, four successively deepening non-REM sleep stages and movement time. For a general overview of clinical sleep recordings and a detailed discussion on the characteristics of the above-mentioned sleep stages, please see, for example, refs. [1,2]. Although the standardized scoring manual has become the gold standard inside sleep research community, it is known
∗
to contain several widely accepted drawbacks and limitations [2–4]. Originally, it was introduced for fast, cost-effective visual analysis of paper recordings without a detailed morphological analysis of every single wave. Although the manual was initially intended for the sleep recordings from young, healthy subjects only, it has been applied equally well for the analyses of disturbed sleep and sleep of elderly persons. Furthermore, rather long epoch length implies limited temporal resolution and loss of clinically important information. This is because all the epochs have a pre-defined length and they are assigned to only one stage based on the dominating characteristics although the epochs can contain stage transitions or landmarks of several stages. Additionally, the manual suggests describing a continuous process with a small set of discrete stages, part of them even being questionable. Despite the original intention to update the manual as new information on the sleep processes arises, it has never been updated. To overcome the known limitations, a considerable amount of research has been carried out to define methods that
Corresponding author. Tel.: +358 3 3115 4708; fax: +358 3 3115 3087. E-mail address: antti.saastamoinen@tut.fi (A. Saastamoinen).
0169-2607/$ – see front matter © 2006 Elsevier Ireland Ltd. All rights reserved. doi:10.1016/j.cmpb.2006.02.003
c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 8 2 ( 2 0 0 6 ) 58–66
would give a more detailed and accurate description of sleep macrostructure. During the recent decades, a multitude of methods aiming at objective, continuous-scale quantification of sleep depth have been presented [3,5,6]. Most of the important early findings of clinical sleep medicine were based on period analysis, which makes it possible to carry out time–frequency analysis even visually for properly band-pass filtered data (for a review, please see ref. [3]). Hjorth parameters were introduced to characterize amplitude, time scale and complexity of the EEG through time-domain operations and were exemplified to be applicable in the analysis of objective sleep depth [7]. More recently, at least stochastic complexity measures [8], relations of certain spectral bands [9–11], models on EEG microcontinuity [12], Hidden Markov Models [13] and segmentation approaches [14] have been applied. In this article, we present a new implementation of a computer-based method for continuous-scale sleep depth estimation. The method is strongly based on the earlier Matlab prototype published elsewhere [15–17]. The main contribution of this work is to eliminate the known limitations of the earlier prototype. Having now been implemented as an add-on analysis module under a commercially available biosignal recording and analysis software (Somnologica 3.2, Medcare Ltd., Iceland), it is much easier to apply the method in clinical practice. Additionally, the software is not anymore limited to a pre-determined sampling frequency or a certain set of experimentally selected analysis parameters but gives the user full freedom to change all the analysis parameters inside theoretical limits. The program as well as the theoretical background of the method will be discussed in details below.
2.
Background
EEG of waking state consists of low-amplitude oscillations on a relatively wide frequency band [1,2]. As the sleep deepens, more and more of its energy concentrates on the lower frequencies. This shift of mean EEG frequency is accompanied with an increase in wave amplitudes. This is believed to reflect the increased synchronization of the brain structures in which the waves originate, which in turn signals for deepened sleep. Therefore, as described below, continuous monitoring of mean EEG frequency can be used for obtaining a measure for sleep depth. The mean frequency measure applied already by Penzel et al. [5] has been contributed here by applying adjustable windowing before spectrum estimation, optional median smoothing of analysis results and amplitude spectrum instead of power spectrum. An advantage of amplitude spectrum over power spectrum is that it does not implicitly cause quadratic weighting during mean frequency estimation. Because the method is amplitude independent, that is, it is not based on absolute wave amplitudes but amplitude relations measuring EEG synchronization, it should not be affected by the ageand gender-dependent EEG amplitude changes reported in the literature (for example, see refs. [12,18]). This is because the method is based on the analysis of spectral morphology. In case the spectral morphology does not change, the output will
59
remain constant, although the spectral values are multiplied with a constant.
3.
Computational methods
Let L be the length of the analysis window in samples and let N be the radix-2 FFT length in such a way that N ≥ L. The user can set both of these values in program settings. At first, for each point for which the mean frequency inside the analysis frequency band is to be counted, a buffer of L sample points centred at the current analysis time instant is taken. After ¨ mean removal, the data buffer is windowed with a Saramaki window of equal length [19]. ¨ window is a special case of adjustable windows Saramaki that has an important property of having nearly minimum side-lobe energy. The window has one tuneable parameter ˇ that controls the width of the window. In other words, parameter ˇ controls the level of attenuation of the input buffer samples close to the start and end of the buffer (please see Fig. 1). This is a standard operation in spectrum analysis to cope with the unwanted effects related to input segment truncation [20]. The higher the ˇ, the greater is the amount of the samples inside the analysis window that will be attenuated due to windowing. After windowing, the data buffer is copied in the beginning of another data buffer of length N + 2 samples, which will be used as the input vector for spectrum analysis. Due to the inplace operation of the FFT implementation used, two extra samples are needed for storing the real and imaginary parts of the FFT at half of the sampling rate but are ignored in the input. Because all the elements of the destination vector are initially set to zero, this copy operation implicitly performs zero padding, if N > L. Next, FFT is performed to give an estimate of the amplitude spectrum of the signal and the result is scaled properly to cancel the effects of windowing. Let S(f) = X(f) + jY(f) be the complex spectrum estimate at frequency f and let w = {w[n]},
¨ windows of length 200 Fig. 1 – Examples of Saramaki samples for 4 different values of ˇ including 1.5 (dash-dot), 2.0 (dotted), 2.5 (dash) and 3.0 (solid).
60
c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 8 2 ( 2 0 0 6 ) 58–66
0 ≤ n ≤ L − 1, be the discrete window function of length L. The corresponding amplitude spectrum A(f) at frequency f can then be computed as follows:
A(f ) =
2
X2 (f ) + Y 2 (f )
L−1
n=0
(1)
w[n]
After obtaining the estimate for the amplitude spectrum of the data inside the analysis window, the search for the mean frequency inside the user-selected frequency band can be started. This is done in the following way. Let A(fa ) be the value of the amplitude spectrum at frequency fa inside the analysis frequency band fmin ≤ fa ≤ fmax , where the limits fmin and fmax can be set by the user and the frequency resolution is implicitly determined through the sampling frequency and the input buffer length L. At first, cumulative amplitude CA (fa ) for each frequency point fa inside the analysis frequency band is computed by summing up all the values of the amplitude spectrum A(f) between the frequencies fmin and fa . Cumulative amplitudes are then normalized by CA (fmax ), the cumulative amplitude at maximum band frequency fmax . This yields effectively a cumulative distribution function DC (fa ) according to the following equation: CA (fa ) DC (fa ) = = CA (fmax )
fa f =fmin
fmax
f =fmin
A(f ) A(f )
(2)
Strictly speaking, scaling of the amplitude spectrum would not be needed because the scaling factor cancels out in the division for getting the cumulative distribution function. However, the scaling was used because the same code fragment was shared with another software project in which a precise amplitude spectrum was needed. Mean frequency inside the analysis band is finally determined by searching for the crossing point frequency fcp , where the cumulative distribution function DC (fcp ) crosses the value 0.5. In case this does not appear at any precise frequency point due to insufficient frequency resolution, linear interpolation is applied between the two frequency points between which the crossing point appears. This crossing point frequency fcp is stored as the mean frequency output sample for the current analysis time instant. Optionally, a moving median filter, the length of which can be selected by the user in program settings, can be used to smooth the computed mean frequency values. In case this is not desired, setting the median window length to 1 skips the smoothing operation. After the analysis, an estimate describing the amount of deep sleep during the night is determined. This is done by simply thresholding the output trace by using a user-selectable deep-sleep threshold frequency fth and dividing the time for which fcp ≤ fth by the total time analyzed. Because all the data in the trace are used, current implementation of deep-sleep percent computation may bias the estimate if the recording contains a remarkable portion of data before the actual “lights out” time instant. However, this problem can be easily corrected by giving the user the possibility to insert some kind of analysis start and stop events in the recording and using only the time between the markers for deep-sleep percent estimation.
4.
Program description
The program was developed as a dynamic link library (DLL) using Microsoft Visual C++ 6.0, Somnologica Software Development Kit 3.2 (Medcare Inc.) and Intel Signal Processing Library Version 4.5. Somnologica SDK provided general interface to the main application, access to the data and possibilities for event insertion and graphical representation of analysis results. Intel Signal Processing Library provided efficient implementations for vector arithmetic and vector manipulation functions, spectrum estimation and internal error handling of the library functions. Due to the form of implementation, installation of the program is extremely easy. All that is needed is to copy the DLL in the Plugins folder under main application installation. After that, the main application automatically detects the new plug-in during the next program start-up. As an input data, the program supports data in the same data formats as the main application. Therefore, in addition to the native data format, the European Data Format (EDF) [21], widely used for inter-laboratory data exchange by the sleep research community, is also supported. Currently, sleep depth analysis is performed for the active trace in the recording that has been opened for visual analysis. The trace to be analyzed can be selected freely. Therefore, in principle, the software is not limited to the analysis of EEG data only, although there might not be as relevant interpretation of the results calculated from some other signals. However, there are some theoretical constraints that may limit the set of traces that can be analyzed. In addition to the standard Nyquist sampling condition, the program applies an internal oversampling requirement to ensure better quality of spectrum estimation. Currently, the program requires a minimal oversampling ratio of 2.5, meaning in practice that the highest allowed analysis bandwidth for a signal recorded, for example, at 200 Hz is 40 Hz. After selecting the trace for analysis, the program can be started in the Analysis menu of the main application. During the operation, a progress bar showing the percentage of analyzed data is visible. When the analysis has been finished, a new trace will be generated. Depending on the program settings, it either appears automatically on the screen or it can be added using the commands in the Data menu of the main application. In addition to the mean frequency values at the desired output resolution, this new trace includes an info event, which contains all the analysis parameters and the deep-sleep percent for the selected threshold. By default, output data trace is stored in native data format and the info event is stored along with the recording workpad. When needed, the output trace can be exported into an EDF or an ASCII file for further processing under some mathematical or statistical software package. User-selectable program settings can be managed through the graphical user interface implemented as property sheet structure (Fig. 2). It contains three tabs labelled Window Settings, Spectrum Analysis and Output Settings. Window Settings tab contains the settings for analysis window length, window parameter (ˇ), FFT length and median window length. The list box containing all the applicable FFT lengths is
c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 8 2 ( 2 0 0 6 ) 58–66
61
Fig. 2 – Property sheets for the user-selectable program settings.
updated on-line, according to the changes in the edit control of the analysis window length. This is to ensure that the list contains only those radix-2 FFT lengths up to 216 that are greater or equal than the selected analysis window length. Spectrum Analysis tab contains the minimum and maximum frequencies of the frequency band used in spectrum analysis. When setting the upper limit, the requirement of internal oversampling must be considered. Otherwise, the analysis on the selected trace may be skipped. Output Settings tab includes the definitions for output resolution and deep-sleep threshold. As described above, deep-sleep threshold value is used to estimate the percentage of deep sleep from the total time analyzed. All the adjustable parameters are stored in the system registry and they are specific to the current user. Therefore, different users may use their own analysis settings. In case the analysis parameters are not found in the registry, the program applies internal default values. However, before running the actual analysis, the user is informed on the application of program defaults. At this point, the user may skip the analysis and modify the analysis settings before running the analysis.
5.
Hardware and software specifications
Due to the add-on nature of the program, sleep depth analyzer module requires a similar operating environment than the main application, which runs under Microsoft Windows 2000 Service Pack 4, Microsoft Windows XP Service Pack 1a or 2 or Windows Server 2003. In addition to the operating system and the main application, it does not require any other software to work. Minimum recommended hardware specifications for main application include a PC with at least an Intel Pentium, Pentium4 or AMD Athlon class processor running around 1.3 GHz, at least 256 MB of RAM, at least 40 GB hard disk, CD or DVD drive (preferably supporting writable media) and minimum screen resolution of 1024 × 768. Additionally, data acquisition with the related hardware requires an additional connection between the amplifier and the computer. Sleep depth analysis module takes only about 90 kB disk space plus an output resolution-dependent amount of free disk space for saving the analysis results. To give some estimates on the additional disk space needed, the result data
62
c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 8 2 ( 2 0 0 6 ) 58–66
trace for an 8-h sleep recording at 1-s resolution will need about 60 kB more. Time needed for the analysis naturally depends on the length of the recording and the analysis settings used but the computational load can in general be considered relatively low. Typical computation time for an 8-h EEG trace on a Pentium4-based computer running at 1.7 GHz is about a minute.
low separation of stage pairs Wake–S1, Wake–REM and S1–REM reflects the well-known similarity of background EEG during these stages. Standard visual scoring of these stages is heavily based on the additional information from EOG and EMG recordings, not available to the program.
7. Quantitative evaluation through nearest neighbour classification 6.
Samples of program runs
As an example on the visual program output, we computed continuous mean frequency curves for two subjects with four different parameter configurations. The sleep recordings used here were recorded from a 37-year-old healthy male volunteer, free from any sleep complaints or excessive daytime sleepiness (Fig. 3) and from a 47-year-old female subject suffering from sleep apnoea syndrome (Fig. 4). Before the sleep study, the subjects had to participate in a general physical examination to exclude a primary medical or psychiatric disorder. They were also required to have regular sleep habits (bedtime between 22:00 and 24:00 h) and were not allowed to use hypnotics or any other medication affecting the central nervous system. The data were recorded after one adaptation night to the sleep laboratory conditions. Sleep depth traces were computed from a central EEG derivation on the left hemisphere with reference to the contralateral mastoid electrode (C3-M2). To experiment the system performance in a situation that corresponds to the clinical application of the method for previously unknown data, the recordings were randomly selected from a pool of recordings obtained during an EU funded project [22] and they were used as such without any kind of manual artefact processing or other a-priori information on the signal. Original EEG data were sampled at 200 Hz. The values of beta, FFT length and the length of median smoothing window were kept constant (2.5, 1024 points and 51 samples, respectively) whereas two possible values for analysis window length and maximum band frequency were allowed. Analysis window length could be either 200 or 1000 samples corresponding to 1 s or 5 s of data, respectively. In all the cases, frequency band for spectrum estimation started at 0.5 Hz but it was extended either to 12.5 Hz or 36.5 Hz. Although the parameters used are not necessarily the most optimal ones and although the recording obtained from the subject suffering from sleep apnoea syndrome contains a remarkable portion of artefacts due to recurrent arousals, the curves still compare favourably with the visually scored hypnograms. Fig. 5 shows pair-wise comparisons of mean frequency distributions inside sleep stages for the data from the healthy control subject. First, mean frequency distributions were computed at 0.1 Hz resolutions. After that, differences between the distributions were computed by comparing the nonoverlapping area of the two distributions to the total joint area of the distributions. Naturally, possible intersection of the two distributions was counted only once in the total area. The results do not include comparisons with movement time because no movement time was visually scored for this subject. Please note that although the program is not intended for direct mimicking of standard visual scoring, it can still mostly separate between the traditional sleep stages. The relatively
To give a more detailed evaluation of the presented method, we performed nearest neighbour classification of the EEG recordings of 15 healthy volunteers on C3-M2 derivation for the same 4 sets of analysis parameters that were used in Figs. 3–5. Based on the visual scorings we divided the data in four stages, namely wakefulness, light sleep (S1 + S2), deep sleep (S3 + S4) and REM. For each of these stages, we computed mean values of the sleep depth parameter. Every single sleep depth value in all the recordings was then compared to these mean values and each data point was assigned to the stage for which the absolute difference from the stage-specific mean value was the smallest. Percentages of agreement between visual scoring and automated analysis are shown in Table 1. Given the unavailability of the additional information from EOG and EMG recordings and EEG micro-events (such as sleep spindles) to the program, the results can be considered successful.
8.
Discussion and future plans
In this article, we have presented a new implementation for a continuous-scale sleep depth analyzer based on an earlier Matlab prototype [15–17]. The program has been implemented as an add-on dynamic link library for the commercially available biosignal recording and analysis software Somnologica (Medcare Inc.). The program estimates the objective sleep depth by monitoring the level of EEG synchronization through its mean frequency inside a certain frequency band and creates a graphical output trace on the results. The program gives the user a considerable freedom to select all the important analysis parameters. It also estimates the percentage of deep sleep in the recording by applying a user-selectable threshold value. By default, the results are saved in the native data format along with the original recording. However, the results can be further analyzed in other mathematical or statistical software packages by exporting them either in an ASCII or an EDF file. The program is mainly intended for the objective analysis of the macrostructure of sleep with a better temporal resolution than that achieved by applying the standard visual sleep stage scoring [1]. Real-world long-term sleep recordings typically contain a certain amount of unavoidable interference components and artefacts that may have a remarkable effect on the analysis results. In computerized sleep analysis, it seems to be rather typical to exclude these parts from the analysis. In our opinion, this is a severe limitation for a computerized method because the time needed for manual artefact pre-processing could be used for actual visual analysis as well. On the other hand, in case the manual artefact processing is omitted, the actual per-
c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 8 2 ( 2 0 0 6 ) 58–66
63
Fig. 3 – Sample runs of the program for a healthy control subject. Curves from top to bottom: visually scored hypnogram, program output 1 (analysis window length 200 samples, maximum band frequency 12.5 Hz), program output 2 (200 samples, 36.5 Hz), program output 3 (1000 samples, 12.5 Hz) and program output 4 (1000 samples, 36.5 Hz).
formance of the computerized method may be much worse than the level that could be expected based on the evaluation results obtained for pre-processed data. Therefore, instead of merely rejecting the artefacts from the analysis, their effect on the analysis results should be carefully considered. The most typical interferences and their effects on the method are discussed briefly below. A more detailed discussion can be found, for example, in [23].
The most typical sources of artefacts in all-night sleep recordings include high-frequency interferences stemming from the summation of electrical activity of muscles, body movement artefacts accompanied with movements of measurement cables and electrodes, pulse artefacts due to ECG crosstalk or blood flow under an electrode, interferences caused by eye movements and different technical artefacts including but not limited to electrode and amplifier prob-
64
c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 8 2 ( 2 0 0 6 ) 58–66
Fig. 4 – Sample runs of the program for a patient suffering from obstructive sleep apnoea syndrome. Curves from top to bottom: visually scored hypnogram, program output 1 (analysis window length 200 samples, maximum band frequency 12.5 Hz), program output 2 (200 samples, 36.5 Hz), program output 3 (1000 samples, 12.5 Hz) and program output 4 (1000 samples, 36.5 Hz).
lems and signal saturation. Summation of muscle activity and other high-frequency bursts generally increases signal power at higher frequencies thus causing the mean frequency to rise, too. This is a desired property because the increase in mean frequency often signals at least a short-time vigilance change, arousal or movement time. However, the actual effect of high-frequency bursts on the mean frequency depends on the selection of maximum analysis band frequency fmax .
The higher the fmax , the greater the shifts towards a higher mean frequency due to the superposition of high-frequency components. Although the burst might be of technical origin, increase in mean frequency is still desired because the segment can then be more easily separated from original cerebral activity. Spectral characteristics of ECG typically show high peaks at pulse frequency and its second and third harmonics. In
c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 8 2 ( 2 0 0 6 ) 58–66
Fig. 5 – Pair-wise comparisons of mean frequency distributions inside sleep stages. The results do not include comparisons with movement time because no movement time was visually scored for this subject. Solid line shows the results for analysis window length of 200 samples and maximum band frequency of 12.5 Hz. In a similar way, dotted, dashed and dash-dot lines correspond to combinations (200 samples, 36.5 Hz), (1000 samples, 12.5 Hz) and (1000 samples, 36.5 Hz), respectively. For clarity, following abbreviations for sleep stages have been used. Letters W and R stand for wakefulness and REM sleep, respectively, whereas the numbers 1–4 correspond to NREM sleep stages S1–S4, respectively. Please note that although the program is not intended for direct mimicking of standard visual scoring, it can mostly separate between the sleep stages. The relatively low separation of stage pairs W–1, W–R and 1–R reflect the well-known similarity of background EEG during these stages. Standard visual scoring of these stages is heavily based on the additional information from EOG and EMG traces, not available to the program.
addition to that, the spectrum contains a remarkable portion of energy at frequencies roughly between 5 and 20 Hz. Therefore, depending on the selection of maximum analysis band frequency fmax and the detailed spectral morphology of the interference components, superposed pulse artefact may either raise or lower the mean frequency or keep it intact. The
Table 1 – Percentages of agreement for nearest neighbour classification of the recordings of 15 healthy volunteers Parameters
Wake
Light sleep
Deep sleep
REM
200, 12.5 Hz 200, 36.5 Hz 1000, 12.5 Hz 1000, 36.5 Hz
69.7 77.0 67.9 76.6
41.3 42.8 41.2 43.1
87.0 92.1 88.5 93.1
44.8 51.5 44.7 51.4
Parameter 1: analysis window length in samples. Parameter 2: maximum analysis band frequency.
65
higher the fmax , the smaller is the expected effect on the mean frequency due to the balancing effect of the superposed highfrequency components. Zero-level saturations, which often occur in the end of European Data Format files and also during dead-electrode conditions, are detected automatically by requiring that the cumulative amplitude at maximum frequency, CA (fmax ), must be greater than zero. In case this condition fails, mean frequency for the current time instant is set to 0.0 Hz. Saturations at other amplitude levels may increase signal power close to zero frequency but these effects can be reduced by applying a non-zero minimum frequency (0.5 Hz in this work) for the analysis frequency band. Based on the current experience, summation of highamplitude blinks and other eye movement related artefacts are probably the most problematic type of interference because they generally contain a relatively high amount of low-frequency components that sometimes resemble the waveforms found during sleep. This tends to decrease the mean frequency especially in the frontal leads thus giving an illusion of a sharp transition to deeper sleep. However, when topographical information on other electrode derivations is included, these problems can be reduced. As it can be seen from the example traces in Figs. 3 and 4 and from the pair-wise differences between distributions shown in Fig. 5, the selections of analysis parameters, especially the analysis bandwidth, clearly affects the dynamic range of the mean frequency results and, therefore, the deepsleep percent threshold value, too. In general, it would be desirable to use as short analysis window as possible in order to maximize the temporal resolution of the detected changes in the sleep depth. This should be accompanied with a minimal possible smoothing so that the short vigilance fluctuations during sleep are not lost. For these reasons, a systematic parameter optimization is on the way. After that, we plan to evaluate the method further with disturbed sleep and with recordings after sleep deprivation. Finally, we intend to apply the method for automating our adaptive sleep scoring system, which has been discussed, for example, in [24–26]. We hope that this work will contribute the extensive research within the sleep research community on the search for more suitable methods for computerized sleep analysis.
9.
Availability
In order to determine the optimal analysis parameter values for different applications, we are still performing some additional research. Also, the negotiations with the owner of the rights of the program are still unfinished. We hope that the software can be made publicly available in the nearest future.
Acknowledgements Development of the software was financially supported by the National Technology Agency of Finland, the project Microsleep (“Analysis method of studying the microstructure of sleep”, 2003–2006). We also want to thank Medcare Inc. for the pos-
66
computer methods and programs in biomedicine
sibility to use Somnologica 3.2 Software Development Kit and for technical support during the project.
references
[1] A. Rechtschaffen, A. Kales, A Manual of Standardized Technology, Techniques, and Scoring System for Sleep Stages of Human Subjects, National Institute of Health, Publication No. 204, U.S. Govt. Printing Office, 1968. [2] S.-L. Himanen, J. Hasan, Limitations of Rechtscaffen and Kales, Sleep Med. Rev. 4 (2) (2000) 149–167. [3] J. Hasan, Past and future of computer-assisted sleep analysis and drowsiness assessment, J. Clin. Neurophysiol. 13 (4) (1996) 295–313. [4] T. Penzel, R. Conradt, Computer based sleep recording and analysis, Sleep Med. Rev. 4 (2) (2000) 131–148. [5] T. Penzel, K. Stephan, S. Kubicki, W.M. Herrmann, Integrated sleep analysis, with emphasis on automatic methods, in: R. Degen, E.A. Rodin (Eds.), Epilepsy, Sleep and Sleep Deprivation, second ed., Elsevier Science Publishers B.V., 1991, pp. 177–200 (Epilepsy Res. Suppl. 2). [6] B. Kemp, A proposal for computer-based sleep/wake analysis, J. Sleep Res. 2 (1993) 179–185. [7] B. Hjorth, EEG analysis based on time domain properties, Electroencephalogr. Clin. Neurophysiol. 29 (1970) 306–310. [8] I. Rezek, S. Roberts, Stochastic complexity measures for physiological signal analysis, IEEE Trans. Biomed. Eng. 45 (9) (1998) 1186–1191. ¨ [9] M. Jobert, H. Schulz, P. Jahnig, C. Tismer, F. Bes, H. Escola, A computerized method for detecting episodes of wakefulness during sleep based on the alpha slow-wave index (ASI), Sleep 17 (1) (1994) 37–46. [10] W. Dimpfel, H.-C. Hofmann, F. Schober, A. Todorova, Validation of an EEG-derived spectral frequency index (SFx) for continuous monitoring of sleep depth in humans, Eur. J. Med. Res. 3 (1998) 453–460. [11] N. Hammer, A. Todorova, H.-C. Hofmann, F. Schober, B. Vonderheid-Guth, W. Dimpfel, Description of healthy and disturbed sleep by means of the spectral frequency index (SFx)—a retrospective analysis, Eur. J. Med. Res. 6 (2001) 333–344. [12] M.S. Mourtazaev, B. Kemp, A.H. Zwinderman, H.A.C. Kamphuisen, Age and gender affect different characteristics of slow waves in the sleep EEG, Sleep 18 (7) (1995) 557–564. [13] A. Flexer, G. Gruber, G. Dorffner, A reliable probabilistic sleep stager based on a single EEG signal, Artif. Intell. Med. 33 (3) (2005) 199–207.
82
( 2 0 0 6 ) 58–66
¨ [14] A. Kaplan, J. Roschke, B. Darkhovsky, J. Fell, Macrostructural EEG characterization based on nonparametric change point segmentation: application to sleep analysis, J. Neurosci. Meth. 106 (2001) 81–90. ¨ [15] E. Huupponen, A. Varri, J. Hasan, S.-L. Himanen, M. Lehtokangs, J. Saarinen, Optimization of sigma amplitude threshold in sleep spindle detection, J. Sleep Res. 9 (4) (2000) 327–334. ¨ [16] E. Huupponen, S.-L. Himanen, J. Hasan, A. Varri, Sleep depth oscillations: an aspect to consider in automatic sleep analysis, J. Med. Syst. 27 (4) (2003) 337–345. ¨ [17] E. Huupponen, S.-L. Himanen, J. Hasan, A. Varri, Automatic quantification of light sleep shows differences between apnea patients and healthy subjects, Int. J. Psychophysiol. 51 (2004) 223–230. [18] D.J. Dijk, D.G.M. Beersma, R.G. van den Hoofdakker, All night spectral analysis of EEG sleep in young adult and middle-aged male subjects, Neurobiol. Aging 10 (6) (1989) 677–682. ¨ [19] T. Saramaki, A class of window functions with nearly minimum sidelobe energy for designing FIR filters, in: Proceeding of the IEEE International Symposium on Circuits and Systems, IEEE, New York, 1989, pp. 359–362. [20] A.V. Oppenheim, R.W. Schafer, Discrete-Time Signal Processing, Prentice-Hall Inc., Englewood Cliffs, NJ, 1989. ¨ [21] B. Kemp, A. Varri, A.C. Rosa, K.D. Nielsen, J. Gade, A simple format for exchange of digitized polygraphic recordings, Electroencephalogr. Clin. Neurophysiol. 82 (1992) 391–393. ¨ ¨ [22] G. Klosch, B. Kemp, T. Penzel, A. Schlogl, P. Rappelsberger, E. Trenker, G. Gruber, J. Zeitlhofer, B. Saletu, W.M. Herrmann, S.-L. Himanen, D. Kunz, M.J. Barbanoj, J. ¨ ¨ Roschke, A. Varri, G. Dorffner, The SIESTA project polygraphic and clinical database, IEEE Eng. Med. Biol. Mag. 20 (3) (2001) 51–57. ¨ A. Varri, ¨ [23] A. Saastamoinen, T. Pietila, M. Lehtokangas, J. Saarinen, Waveform detection with RBF network—application to automated EEG analysis, Neurocomputing 20 (1998) 1–13. [24] S.-L. Himanen, A. Saastamoinen, J. Hasan, Increasing the temporal resolution and stage specificity by visual adaptive scoring (VAS)—a preliminary description, Sleep Hypnosis 1 (1999) 22–28. [25] S.-L. Himanen, A new visual adaptive scoring system for sleep recordings, Acta Universitatis Tamperensis 769, Academic Dissertation, University of Tampere, Finland, 2000. [26] A. Saastamoinen, S.-L. Himanen, J. Hasan, Computer programs for adaptive sleep analysis, in: 12th Nordic Baltic Conference on Biomedical Engineering and Medical Physics, Proceedings of the IFMBE 2, 2002, pp. 146–149.