SciELO - Scientific Electronic Library Online

 
vol.41 número4Plasticity in primary somatosensory cortex resulting from environmentally enriched stimulation and sensory discrimination trainingVoluntary modulations of attention in a semantic auditory-visual matching Task: an ERP study índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Biological Research

versión impresa ISSN 0716-9760

Biol. Res. v.41 n.4 Santiago dic. 2008

http://dx.doi.org/10.4067/S0716-97602008000400009 

Biol Res 41: 439-452,2008


On-line analysis of biosignals for the automation of total and specific sleep deprivation in the rat

 

ENNIO A. VIVALDI, ALEJANDRO BASSI, JORGE ESTRADA, IGNACIO GARRIDO, JAVIER DÍAZ and ADRIÁN OCAMPO-GARCÉS

Laboratorio de Sueño y Cronobiología, Programa de Fisiología y Biofísica, Facultad de Medicina, Universidad de Chile. Santiago, Chile.


ABSTRACT

A computer-based system that automates sleep studies, including sleep deprivation paradigms, is described. The system allows for total or REM-specific sleep deprivation and is based on a reliable, fast-responding, on-line state detection algorithm linked to a dependable intervention device. Behavioral state detection is achieved by dimensión reduction of short-term EEG power spectrum. Interventions are made by serial outputs to servomotors that move a cage with different patterns and variable intensity. The system can adapt itself to individual characteristics and to changes in recording conditions. Customized protocols can be designed by defining the states or stages to be deprived, including scheduling temporal patterns. A detailed analysis of the relevant signáis during and after deprivation is readily available. Data is presented from two experimental designs in rats. One consisted of specific REM-sleep short-term deprivation and the other of 10-hour total sleep deprivation. An outline of conceptual and practical considerations involved in the automation of laboratory set-ups oriented to biosignal analysis is provided. Careful monitoring of sleep EEG variables during sleep deprivation suggests peculiarities of brain functioning in that condition. A corollary is that sleep deprivation should not be considered to be merely a forced prolonged wakefulness.

Key terms: sleep, sleep deprivation, biosignal analysis, digital control, automation


INTRODUCTION

Digital technology has been of much benefit to research and clinical laboratories involved in the acquisition, display and analysis of biosignals (van Bemmel and Musen, 1997). Methodological standards have been drastically influenced by the increasingly widespread presence and elaborate capabilities of microprocessors incorporated into standard biomedical equipment and of interface cards added to inexpensive personal computers. Digital human polysomnography (Doman et al., 1995; Klosch et al., 2001; Penzel et al., 2001; Agarwal and Gotman, 2002) and automated sleep laboratory setups (Vivaldi, et al., 1984; Witting, et al., 1996; Robert, et al., 1999; Shaw, et al., 2002; Louis, et al., 2004) are significant examples of this trend.

All these computer-based systems offer quantitative analyses of relevant sleep elements and the capability of scoring the three states of the sleep wake-cycle, i.e., Wakefulness (W), NREM sleep (N), including its stages, and REM sleep (R).

Besides acquisition, display and analysis, computer-based systems also offer the capability to intervene in the ongoing processes that they monitor. Just as in intensive care units where an on-line electrocardiogram monitoring system will send off an alarm when it detects an arrhythmia, much more complex responses can be automatically triggered as a result of on-line signal analysis. Digital control refers to the development of systems based on computers that sense variables and interact with processes in the real world. An obvious application of such systems is the design of feedback loops that maintain a variable within a given range. Another illustrative example is the automation of operant conditioning paradigms (Garfield and Vivaldi, 1983). More elabórate applications may involve brain-computer interfaces where, given the ability of a patient with motor impairment to genérate specific brain waves, a computer will detect and link them to outputs that will meaningfully opérate in the real world (Birbaumer and Cohén, 2007).

Admittedly, sleep deprivation has been considered throughout sleep research history as a tool that is as controversial as it is inevitable. Sleep deprivation can be partial or total. It can affect all states and stages of sleep, or be specific for REM sleep or for the deepest stages of NREM sleep (Rechtschaffen et al., 1989; Franken et al., 1991; Rechtschaffen et al., 1999). Observing the effects of sleep curtailment seems to be a heuristically useful approach to understand both the functions that it subserves and the mechanisms that explain its homeostatic rebound.

The present report has a dual objective. It presents a detailed description of a specific computer-based system that automates sleep studies, including sleep deprivation, and it provides a general outline of some major conceptual and practical decisions involved in the automation of laboratory set-ups oriented to biosignal analysis. The methods and results sections aim particularly at the first goal, while the appendix to the discussion section aims at the second. An incentive to the joint work of neuroscientists and computer engineers in the design of automated setups is less expensive, more refined and better goal-oriented infrastructure for research laboratories. An additional issue to be briefly discussed is how the careful monitoring of sleep EEG variables during sleep deprivation may shed light on peculiarities of the brain's working under that condition. Conceptually, one may arrive to the proposition that sleep deprivation, rather than being merely a forced prolonged wakefulness, may be considered as a different and special state.

METHODS

Recording environment and data acquisition

The main purpose of the present report is to present an automated sleep deprivation setup in rats. The data to be used to illustrate the deprivation system come from two sets of experiments. One set consists of a short-term REM-sleep deprivation experiment (Estrada and Vivaldi, 2007) in which six male Sprague-Dawley rats underwent a 5-day protocol, taking as baseline the first and fifth days. In the middle three days the animáis were subjected to a specific REM sleep deprivation lasting 20, 40 or 60 minutes, in a balanced design, with deprivation always starting at hour 6 after lights-on. Data analysis for this protocol is focused on the REM sleep deprivation period and on the two hours that follows it, i.e., the recovery period. The second set of data comes from six male Sprague-Dawley rats that underwent 10-hour total sleep deprivation. In both cases the animáis were continuously recorded during, before and after the experimental paradigms. Experiments conformed to the policies of the American Physiological Society. The animáis weighed 250-300 g and were previously implanted with chronic eleetrodes under intraperitoneal chlornembutal 3 ml/kg anesthesia. After surgery, rats were housed in a 30x30x25 cm cage, placed within an 80x80x80 cm sound isolated cube, under a light-dark schedule with lights-on, approximately 500 luxes, from 0700 to 1900 local time; ambient temperature 21-24°C; water and food ad libitum.

Six epidural and four neck-muscle stainless steel eleetrodes were implanted. Two epidural eleetrodes were placed at 2.0 millimeter from midline cióse to the bregma; two were placed at 2.0 millimeter from midline cióse to lambda and two were placed at 3.0 millimeter from the mid-line and 5.0 mm from the bregma (See Figure 4). Three EEG and one EMG leads were selected, amplified and wide-band filtered by a GRASS model 15 LT Physiodata System equipped with 15A54 quad amplifiers. For EEG channels the amplification was by approximately 2,000 for a 1 volt input and the filtering encompassed the .1-30 range. The setup was designed to simultaneously record those four channels from four rats. Data from those sixteen channels were sampled at a 250 Hz rate and stored with 8-bit resolution.

On-line analysis and state transition detection

The automated sleep deprivation system had to meet two requirements: a processing speed that would allow a short latency between a state transition and the deprivation intervention, and some system flexibility to adapt to different subjects or to changing conditions through several days of recording in the same subject.

To minimize state detection latency, a short-time Fourier transform (Oppenheim 1999) is applied over three EEG channels and one EMG channel using Hamming windowed segments of 500 samples, equivalent to 2.0 seconds at our sampling rate. The spectral resolution is thus 0.5 Hz. Running segments have a 75% overlapping, i.e., every 0.5 seconds of the last 2.0 seconds are analyzed. Four variables are assessed. Three of them correspond to the activity of delta, theta and sigma bands, each obtained from an EEG channel appropriate for each band. The fourth variable corresponds to muscle activity from a low noise EMG band. Activities are calculated as the mean log power spectra of each band. Log power is preferred over raw data because its distribution is closer to normal and because ratios between variables become simply level differences. A time series of one data point every 0.5 second is obtained for each activity. Before they become input features for the state detection stage, these time series are exponentially smoothed to reduce noise. Figure 1A displays an EEG spectrogram and Figure IB displays under the same time base the Fourier analysis EEG theta, delta and sigma bands and of the EMG.

The state detection method is based on the unsupervised clustering of a two-coordinate reduction of the four original variables, using up to 24-hour baseline recording. The dimensión reduction consists of a 3-way axial projection over the plañe of the muscle activity, the mean of delta and sigma activities, and theta activity. The ensuing two-dimensional projection, shown as a scatter plot in Figure 2A, expectedly configures three state compact clusters.

The coordinates of the centroid of each state are the parameters that will be used for on-line decisión making. A further effort at standardization is performed to obtain similar patterns from the recordings of different animáis. This goal is achieved by a transformation defined in the original coordinates that normalize the position of the centroids so that their respective coordinates become the vértices of an equilateral triangle of unit side. A threshold or perimeter around each centroid is defined that will allow the detection of a transition to that state. During the deprivation experiment each 2.0 second segment is analyzed and becomes a data point in a plañe like the one presented in Figure 2A; it then undergoes the previously defined transformation to assess its distance to the state centroids. When a point is found inside the área of a forbidden state, a transition is diagnosed that triggers the deprivation mechanism process. Figure 1C displays the data-point sequence of the two-dimensional projection coordinates, while Figure ID displays the time course of the normalized distances to each centroid. Since the definition of a state is based on proximity to its centroid, subdivisions can be achieved by concentric rings around it, as will be the case with results to be presented below.

For the total sleep deprivation paradigm the forbidden zones to be considered are defined around the centroids N and R, whereas for specific REM sleep deprivation only R will be considered. In the actual implementation of the system, a LabVIEW graphic user interface allows for the setting of the desired deprivation paradigm, the time at which it starts and finishes, and the valúes of the W, actual valué of the distances to each centroid are continually monitored, so that an observer can overview the whole process.

Automated intervention system

As explained above, every 0.5 second the result of the on-line analysis of the previous 2.0 seconds may or may not indicate that a forbidden state is present in a given rat recording. The detection of a forbidden state is translated into output pulses at a serial port that will arrive as control signáis at the corresponding cage. The pulses will activate two servomotors provided with drive shafts that will shake that cage and wake up the rat.

As shown in Figure 3, the wake-up system is based on two standard hobbyist radio controlled servomotors ("RC servos") that have a rotation of about 160 degrees. Drive shafts at two orthogonal axes link these motors to the recording cage that hangs within the isolation box.

An electronic board connected to the computer through a standard serial port controls the servomotors. Movements of various intensity and topology can be achieved, since each servo generates displacements as defined by the amplitude and direction of positional changes and by the interval between them. This feature provides several options for movement patterns, from soft, uniform swinging, to strong, irregular shakes.

Pulse-width modulated signáis drive the servomotors and determine the position the servo will try to reach and hold. The servomotors do not reach the desired position instantly, the delay going from a few milliseconds to tenths of seconds, depending on the actual position, the aimed position and the load. This uncertainty becomes a physical restriction for controlling the velocity of displacement. Finding the best movement patterns turns out to be an empirical process, with short and small movements being potentially more effective than large movements.

The electronic boards within the cages are based on an 8-bit microcontroller running a program that receives commands from the system computer and generates the required pulse-width modulated signal for the servos. Test buttons allow the checking of the boards. In our four-cage setup, the four boards are serially linked, only the first one being connected to the computer, although they are independently operated.

A command sequence consists of up to 12 bytes. The first byte is always 0 and marks the start of the command. The second and third bytes indicate the board and its servomotor number, respectively. The fourth byte establishes the delay between position changes, and the remaining bytes are interpreted as relative positions.

Two modules are provided to interface with LabVIEW. The first one provides a basic interface to genérate low level commands for the elementary movements described previously. The second module uses the first one to provide a set of predefined movement patterns. This higher level module uses as parameters the serial port to which the system is linked, the predefined board/cage number and the code for a given predefined stimulus pattern.

RESULTS

The system operation will be exemplified with data obtained from two sets of experiments, a 10-hour total sleep deprivation paradigm and a 1-hour specific REM sleep deprivation paradigm.

Figure 1 displays total sleep deprivation data from the for a 20-minute period and illustrates the stages of the overall processing in its four panels. The animal is mostly asleep throughout this lapse, with two REM sleep segments starting at approximately time 00:23 and 00:28. Figures 1A represents an EEG spectrogram. The theta band stands out during REM sleep. Figure IB displays the time course of the four variables. Note that during REM sleep the theta band is not necessarily much increased, but rather the outstanding feature is its predominance over the other bands, providing the visual contrast in the spectrogram and the descent of the other bands. As stated in methods, Figure IC and ID display, respectively, the two-dimensional projection coordinates and the normalized distances 'to each state centroid.

Figure 4 presents data from the REM specific deprivation paradigm. Figure 4A illustrates an actual 15-second raw recording where a transition into REM is detected and terminated by an intervention that wakes up the rat. The recovery of muscle tone evidences the success of the intervention. Note that the intervention is triggered by the appearance of theta activity characteristic of REM sleep, i.e., regular in frequency and amplitude. Typically, the occurrence of theta activity lasts for 3 to 5 seconds before the state is interrupted. A relevant issue for researchers during deprivation experiments is to consider the transitions attempts to the state to be deprived as a point process, i.e., as discrete, instantaneous events whose occurrence can be visualized as points in a time-line. The intervals between events can then be analyzed, particularly their time course throughout the deprivation protocol. Figure 4B provides a 60-minute specific REM sleep deprivation experiment where the occurrence of interventions and the presence of the W and N are displayed. This figure evidences the expected increase in the frequency of transition attempts as the protocol develops (Morden et al., 1967; Benington et al., 1994).

Various prominent aspects of the 10-hour total sleep deprivation paradigm are shown in Figures 2, 5, 6 and 7. As explained in the methods section, Figure 2A displays three compact state clusters that represent Wakefulness, NREM and REM sleep. It is worth noticing that the presence of three well defined clusters in the projection additionally provides an immediate visual assessment of the quality of the baseline data. Furthermore, the points classified as W, N and R, constitute, respectively, 48.7, 45.0 and 6.3 % of the 24 hours.

The centroid of each state cluster in 2A can be conceived as the archetype of the state. The time courses of the distances to the centroids of each state are displayed in Figure 5. This is the same type of data displayed in Figure ID but here the ordinate axis has been inverted so that a higher level indicates that the variable is closer to the centroid. In Figures 5A and 5B the abscissa corresponds to a 13-hour lapse that starts 2 hours before lights-on. The data are obtained from the preceding baseline day for Figure 5 A and from an experimental day for Figure 5B. In the latter case, data correspond to a 10-hour total sleep deprivation lapse followed by a 3-hour recovery lapse. In Figure 5B an additional panel with the incidence of interventions per minute is shown. The main features to be highlighted are the closeness to the W centroid throughout the deprivation period with a sustained depression of the NREM curve and, even more markedly, of the REM curve.

Figure 6 condenses the information conveyed by Figure 5 by showing the hourly incidence of epochs assigned to REM and NREM sleep. A total of 37 hours are displayed, starting with the 13-hour lapse corresponding to Figure 5A and ending with the 13-hour lapse corresponding to Figure 5B. The stack bars indicate time assigned to REM sleep and to two subdivisions of NREM sleep defined according to whether they are closer (NI) or farther (N2) from the N centroid. Figure 6 makes evident that in the ten-hour deprivation lapse almost no REM ñor NI sleep are detected by the automated analysis.

The deprivation effect can also be illustrated by changes in the density plot of a two-dimensional projection of epochs, as in the comparison of Figures 2A and 2B, corresponding to a 24-hour baseline and to a 10-hour deprivation time, respectively. Figure 2C further emphasizes the comparison by superposing the deprivation data over three-cluster data from the baseline day. The most notable differences are the absence of the REM sleep cluster and the apparent displacement of the NREM cluster toward the W centroid position during the deprivation experiment. Figure 7 may help in clarifying the biological meaning of this seemingly displaced NREM cluster, by displaying the same variables as Figure 5 with a much higher time resolution. These 20-minute close-ups compare baseline data with a time segment representative of the displaced NREM cluster. It should be noted that during baseline the distances to the centroids reach stability at a scale of minutes. On the contrary, during deprivation those variables unremittingly oscillate between two poles that would correspond to the centroids of Figure 2B.

DISCUSSION

The two main features of the automated deprivation system that must be assessed are the reliability of state detection and the effectiveness of the deprivation interventions. The time courses of both features as a deprivation experiment progresses are particularly relevant.

Automated state diagnosis is an obvious prerequisite for automated state deprivation. The existence of three behavioral states controlled by specific brain mechanisms subserving specific functions has been a central notion in sleep research. The definition of a state is based on the presence of certain features, such as EEG activities, eye movements and muscle tone. The state concept is founded on the configuration of those features and many other physiological variables into discrete, recurrent and consistent arrangements that are stable over time. In the rat, the most relevant variables to be detected in visual state scoring are theta activity and muscle atonia for REM sleep, delta and sigma activities and low muscle tone for NREM sleep, and high muscle activity or lack of specific sleep indicators for W. Those are the variables that an expert would use for state scoring. Alternatively, more abstract, unprejudiced variables may be generated by principal component analysis. If the first two components of the EEG spectrogram are projected in a plañe, three fairly compact clusters emerge, one for each state (Vivaldi and Bassi, 2006). The behavior of the relevant variables that compose the fe ature vector is critical for the outcome of these statistical techniques. Besides the obvious care for the quality of the recorded raw signal, some mathematical principies may become helpful. A notable example is simply the log scaling of the variables that highlights statistical modes.

In the computer-based system presented here, the relevant variables are features obtained by FFT analysis. A clustering algorithm operating over the incidence of these features defines centroids. The distances of an epoch to these centroids define the state diagnosis. This unsupervised machine learning technique based on distances to centroids, has the great advantage of being easily generalized to different individuáis, and is even capable of adapting itself to changing recording conditions in long-term studies. On the other hand, supervised learning techniques depend on large samples of case-specific scoring from an expert (Crisler et al., 2008). Nevertheless, the recurrent stable clustering configuration evidences the existence of states as emerging from data analysis alone, independently of any preconception, since having no other information than the relevant variables, a computer should operationally define the three states.

The unsupervised learning approach presented here standardizes the data so that the system will not need case-specific rules but will use instead general rules adapting them to different subjects or to changing recordings. This approach can also be fruitfully extended beyond the main W, N and R state classification to subdivisions within the clusters. These subdivisions are particularly relevant for NREM sleep, since the concept of depth of this state, usually associated with delta activity, is taken into account in human as well as in animal studies. This aspect is potentially applicable to more refined deprivation paradigms in terms of what will and will not be allowed (and for how long) for the deprived subject to express. These goals of sub-classifying states may in some cases be better served by time-domain techniques, e.g. zero-crossing, if wave amplitude, duration, trains or envelopes become more relevant.

Sleep deprivation has been historically employed as an obvious tool to deduce the function of sleep by observing the consequences of its curtailment. The interest in this subject has been widespread in human and animal studies, and it has included attempts to link sleep deprivation to áreas as diverse as learning, hormone secretion patterns or psychosis. Recently, progressive attention has been paid to the effects of chronic partial sleep deprivation as opposed to continuous, uninterrupted wakefulness maintenance, since the former type of deprivation would be more relevant to common real life situations, such as shift-work or diseases that affect sleep continuity (Jewett et al., 1999). Animal models of sleep fragmentation (McKenna et al., 2007) and chronic sleep restriction (Machado et al., 2005) have also been developed. Besides sleep function, monitoring the recovery from sleep deprivation may help in understanding sleep homeostatic mechanisms. The hypothesis that delta waves correspond to the restorative function of sleep has gained support by their rebound after sleep deprivation in humans and after short-term deprivation in rats (Borbely 1982; Dijk et al., 1990). On the other hand, long term deprivation in rats is followed only by massive REM sleep rebound (Rechtschaffen et al., 1999). Some more elabórate experimental designs have compared the effects of sequential combinations of different types of derivation (Endo et al., 1997; Ocampo-Garcés et al., 2000) or its timing within the light-dark cycle (Vyazovskiy et al., 2007).

A major issue concerning sleep deprivation has been whether it is possible at all to isolate it as a variable uncontaminated of fatigue or stress (Mendelson et al., 1974a). In this respect, the importance of methodological issues was appropriately emphasized from the outset. In sleep research in rats, some early methods were forced locomotion by placing the rat in rotating cylinders (Levitt, 1966; Stefurak et al., 1977), and monitoring vigilance state to interrupt attempts at sleep transition (Vyazovskiy et al., 2007). It is obvious that after a very long time, the first method will be contaminated by fatigue and the second may become impractical. A third method, the disk-over-water, was designed by Rechtschaffen (Bergmann et al., 1989) and presented in a landmark series of papers on sleep deprivation. Earlier, a specific REM sleep deprivation method was proposed, the flowerpot technique, that consisted of placing the rat in a small platform surrounded by water (Morden et al., 1967; Mendelson et al., 1974b; Hicks et al., 1977). It should also be noted that methods based on monitoring vigilance and manually or automatically acting when the deprived state is observed, must inherently allow for the occurrence of some actual expression of the state that is being deprived. A less obvious issue is to what extent the sleep deprivation state should be equated to wakefulness. After some time the functioning of the brain may be different from normal wakefulness, and it can even be claimed that some normally sleep-specific functions may appear in apparently awake animal (Rechtschaffen et al., 1999).

It is admittedly difficult to maintain rats under deprivation for long term. The mechanical system presented here is able to genérate a range of intensity and patterns of movements given by the forcé and length of torques and the geometric disposition of the drive shafts, allowing thus for a great assortment of stimuli. A scale of increasing strength can be devised and programmed so that when many transitions separated by short intervals are detected, the stimulus can be changed and intensified. The issue of the state not being entirely suppressed because it must first be detected as present, can be at least ameliorated by testing shorter latencies and, eventually, by better characterizing the pre-transition EEG patterns.

A major advantage of a technique that closely analyses the EEG signáis during deprivation is that it can detect changes in the waking state due to prolonged deprivation. As stated above in reference to Figure 7, the distances to the centroids during deprivation oscillate between two poles that would correspond to the centroids of Figure 2B. This lack of stability questions an aspect inherent to the concept of behavioral state, the persistence in a given configuration, and reinforces the suggestion that peculiar dynamics, different from normal functioning, opérate during deprivation. A sleep deprivation setup with the properties of the system presented here offers ampie possibilities of customized protocols for defining what, how much and for how long it is going to be deprived, plus a detailed analysis of brain functioning during and after deprivation.

Appendix: Computers, biosignals and sleep studies

Computers handle biosignals as a sequence of data points or samples. Data acquisition by computers is based on analog-to-digital conversión. A continuous signal is sampled at a given rate and each sample is represented as a binary number. The precisión of that representation depends on the bit length of the binary number. The temporal and amplitude resolutions depend, respectively, on those two parameters. Since longer and more frequent data points imply higher demands on data handling and storage, a trade-off must be sought.

Digital data visualization offers enormous advantages over analog ink-over-paper systems. Montages for display can be selected after recording time and new differential signáis can be generated from stored leads. The time base can be changed so that, for example, when visually inspecting polysomnography signáis the screen width may cover 15 seconds for observing EEG waves or 5 minutes for the appraisal of respiratory patterns. Gain modification, digital filtering and signal conditioning can all be applied off-line. Stored data facilitates comparison of recordings made at different times.

Beyond acquisition, display and storage, computers can also be used to automate data analysis. In the context of sleep studies, data analysis algorithms emulate firstly, the human detection of relevant graphoelements and, secondly, they apply these features to assign each epoch, as recording time units are denominated, to a given behavioral state. In humans, Rechtschaffen and Kales sleep scoring criteria allow for the diagnosis of W, R and N, and of the four stages of NREM sleep. The scoring is typically done for 30-second epochs, based on the incidence of well defined elements in the EMG and EOG, and of specific EEG frequency bands (Rechtschaffen and Kales, 1968).

In the rat, the main relevant elements in sleep recordings are EMG amplitude and the presence of waves of certain frequency and amplitude in the EEG. These bands are delta (approximately 0.5-4 Hz) and sigma corresponding to sleep spindles (approximately 12-16 HZ) in N and theta (approximately 5-9 Hz) in R. These wave activities are defined mainly by frequency and amplitude. Two main approaches can be followed to detect them (Geering et al., 1993). In the time-domain, a simple technique is zero-crossing, where the detection of the start and end of each wave as they cross the baseline yield its period, and the detection of the minimal and maximal valué that they reach yield its amplitude. The requirement of trains of waves as opposed to isolated ones improves detection of true sigma and theta activities. In the frequency-domain, the most popular technique is Fast Fourier Transform (FFT) that provides the power that each frequency contributes to the signal. Short-term FFT treats the signal as a sequence of analysis windows so that their time course can be assessed. The frequency range extends to half the sampling rate and the frequency resolution is the reciprocal of the time length of the analysis window. The ratio between bands may be more important than their absolute valúes, as is the case with REM sleep where the increase in theta/delta ratio is more informative than the actual amount of theta power. There are more sophisticated techniques such as wavelets and specific feature-extraction algorithms that may have a better performance in detecting graphoelements related to sleep EEG, but the availability of very powerful algorithms makes FFT a very efficient alternative when rapid on-line processing is needed.

Whether counting waves and trains of waves by zero-crossing or establishing absolute or relative power by FFT, the relevant-element-detection stage will end up with a matrix where rows are epochs and columns are the incidence of detected relevant elements. In the case of the rat, an epoch is usually predefined as a time bin between 5-15 seconds (Trachsel, 1991; Robert et al., 1999). A row containing the valué of each relevant element for a given epoch is called a feature vector. A human expert could add a new column with his visual state-by-epoch scoring. Another column could then be generated consisting of an automated state-by-epoch scoring, obtained by the definition and application of classification rules. These rules would use as input the incidence of the relevant elements in the feature vector. A simple case may consist of setting thresholds for EMG, delta, sigma and theta activities and applying the following algorithm: if EMG activity is higher than its threshold, the epoch is assigned to W; if that is not the case and theta activity is higher than its threshold, the epoch is assigned to R; if that is not the case and delta or sigma activities are higher than their threshold, the epoch is assigned to N; if none of those three alternatives is true, the epoch is assigned to W (Roncagliolo and Vivaldi, 1991). More detailed algorithms have been proposed for better resolving bins with ambiguous profiles (Costa-Miserachs et al., 2003).

In the previously described strategy the expert must set thresholds for relevant variables to genérate the automated diagnosis, and, by comparing those results with his own, he can optimize by trial and error the sensitivity and specificity of the process. The goal of the expert would be to make the visual and the automated diagnosis columns as similar as possible. The same optimization can be achieved by statistical pattern recognition techniques (van Bemmel et al., 1997). Supervised machine learning would take as input, on the one hand, the feature vectors containing the relevant elements, and on the other, the expert diagnosis, and it would then infer by statistical techniques such as discriminant analysis, support vector machine (SVM) or neural networks the optimal classification rules. Alternatively, unsupervised machine learning does not require the human expert diagnosis since it is based only on the distribution of relevant elements. This is possible because, as implied in the concept of state, data points will be naturally grouped in clusters reflecting the common properties of the relevant variables within a state. One could envision that if clusters obtained by unsupervised computer analysis and projected into a plañe were cross-matched with actual expert scoring by some type of coding such as using state- specific colors, each computer-generated cluster would display epochs of very much the same code, thus validating the reliability of unsupervised learning (Vivaldi and Bassi, 2006).

In studies designed for off-line analysis only, the computer burden at recording time is limited to data acquisition and storage. On the contrary, control and intervention of processes require, in addition to those two tasks, accomplishing on-line data analysis, decisión making and command execution. These tasks must be met in real time, placing obvious constraints on the time available for algorithm execution. The interaction of the computer with the outside world is achieved by sending control signáis to external devices. This can be done through standard serial or parallel output ports or through a digital-to-analog converter and one-bit output Une capabilities implemented in interface cards.

ACKNOWLEDGEMENTS

Research supported by grants Fondecyt 1060250 and 1061089.

REFERENCES

AGARWAL R, GOTMAN J (2002) Digital tools in polysomnography. J Clin Neurophysiol 19: 136-43        [ Links ]

BENINGTON JH, WOUDENBERG MC, HELLER HC (1994) REM-sleep propensity accumulates during 2-h REM-sleep deprivation in the rest period in rats. NeurosciLett 180: 76-80        [ Links ]

BERGMANN BM, KUSHIDA CA, EVERSON CA, GILLILAND MA, OBERMEYER W,RECHTSCHAFFEN A (1989) Sleep deprivation in the rat: II. Methodology. Sleep 12: 5-12        [ Links ]

BIRBAUMER N, COHÉN LG (2007) Brain-computer interfaces: communication and restoration of movement in paralysis. J Physiol 579: 621-36        [ Links ]

BORBELY AA (1982) A two process model of sleep regulation. Hum Neurobiol 1: 195-204        [ Links ]

COSTA-MISERACHS D, PORTELL-CORTÉS I, TORRAS-GARCÍA M, MORGADO-BERNAL I (2003) Automated sleep staging in rat with a standard spreadsheet. J Neurosci Methods 130: 93-101        [ Links ]

CRISLER S, MORRISSEY MJ, ANCH AM, BARNETT DW (2008) Sleep-stage scoring in the rat using a support vector machine. J Neurosci Methods 168(: 524-34        [ Links ]

DIJK DJ, BRUNNER DP, BORBELY AA (1990) Time course of EEG power density during long sleep in humans. Am J Physiol 258: R650-61        [ Links ]

DOMAN J, DETKA C, HOFFMAN T, KESICKI D, MONAHAN JP, BUYSSE DJ, REYNOLDS CF, 3RD, COBLE PA, MATZZIE J, KUPFER DJ (1995) Automating the sleep laboratory: implementation and validation of digital recording and analysis. Int J Biomed Comput 38: 277-90        [ Links ]

ENDO T, SCHWIERIN B, BORBELY AA, TOBLER I (1997) Selective and total sleep deprivation: effect on the sleep EEG in the rat. Psychiatry Res 66: 97-110        [ Links ]

ESTRADA JG, VIVALDI EA (2007) Recovery after 20, 40 and 60-minute specific REM sleep deprivation in the rat. Sleep and Biological Rhythms 5: A83        [ Links ]

FRANKEN P, DIJK DJ, TOBLER I, BORBELY AA (1991) Sleep deprivation in rats: effects on EEG power spectra, vigilance states, and cortical temperature. Am J Physiol 261: R198-208        [ Links ]

GARFIELD JM, VIVALDI EA (1983) Effects of halothane and enflurane on schedule-controlled behavior in the rat. Anesthesiology 59: 207-14        [ Links ]

GEERING BA, ACHERMANN P, EGGIMANN F, BORBELY AA (1993) Period-amplitude analysis and power spectral analysis: a comparison based on all-night sleep EEG recordings. J Sleep Res 2: 121-129        [ Links ]

HICKS RA, OKUDA A, THOMSEN D (1977) Depriving rats of REM sleep: the identification of a methodological problem. Am J Psychol 90: 95-102        [ Links ]

JEWETT ME, DIJK DJ, KRONAUER RE, DINGES DF (1999) Dose-response relationship between sleep duration and human psychomotor vigilance and subjective alertness. Sleep 22: 171-9        [ Links ]

KLOSCH G, KEMP B, PENZEL T, SCHLOGL A, RAPPELSBERGER P, TRENKER E, GRUBER G, ZEITLHOFER J, SALETU B, HERRMANN WM, HIMANEN SL, KUNZ D, BARBANOJ MJ, ROSCHKE J, VARRI A, DORFFNER G (2001) The SIESTA project polygraphic and clinical datábase. IEEE Eng Med Biol Mag 20: 51-7        [ Links ]

LEVITT RA (1966) Sleep deprivation in the rat. Science 153: 85-7        [ Links ]

LOUIS RP, LEE J, STEPHENSON R (2004) Design and validation of a computer-based sleep-scoring algorithm. J Neurosci Methods 133: 71-80        [ Links ]

MACHADO RB, SUCHECKI D, TUFIK S (2005) Sleep homeostasis in rats assessed by a long-term intermittent paradoxical sleep deprivation protocol. Behav Brain Res 160: 356-64        [ Links ]

MCKENNA JT, TARTAR JL, WARD CP, THAKKAR MM, CORDEIRA JW, MCCARLEY RW, STRECKER RE (2007) Sleep fragmentation elevates behavioral, electrographic and neurochemical measures of sleepiness. Neuroscience 146: 1462-73        [ Links ]

MENDELSON W, GUTHRIE RD, GUYNN R, HARRIS RL, WYATT RJ (1974a) Rapid eye movement (REM) sleep deprivation, stress and intermediary metabolism. J Neurochem 22: 1157-9         [ Links ]

MENDELSON WB, GUTHRIE RD, FREDERICK G, WYATT RJ (1974b) The flower pot technique of rapid eye movement (REM) sleep deprivation. Pharmacol Biochem Behav 2: 553-6         [ Links ]

MORDEN B, MITCHELL G, DEMENT W (1967)Selective REM sleep deprivation and compensation phenomena in the rat. Brain Res 5(3): 339-49
        [ Links ]

OCAMPO-GARCÉS A, MOLINA E, RODRÍGUEZ A, VIVALDI EA (2000) Homeostasis of REM sleep after total and selective sleep deprivation in the rat. J Neurophysiol 84: 2699-702         [ Links ]

OPPENHEIM AVS, RONALD W, BUCK JA (1999).Discrete-time signal processing. Upper Saddle River, N.J.,Prentice Hall         [ Links ]

PENZEL T, KEMP B, KLOSCH G, SCHLOGL A, HASAN A, VARRI A, KORHONEN I (2001) Acquisition of biomedical signáis databases. IEEE Eng Med Biol Mag 20: 25-32         [ Links ]

RECHTSCHAFFEN A, KALES A (1968). A manual of standarized terminology, techniques and scoring system for sleep stages in human subjects. , US Government Printing Office        [ Links ]

RECHTSCHAFFEN A, BERGMANN BM, EVERSON CA,KUSHIDA CA, GILLILAND MA (1989) Sleep deprivation in the rat: I. Conceptual issues. Sleep 12: 1-4        [ Links ]

RECHTSCHAFFEN A, BERGMANN BM, GILLILAND MA, BAUER K (1999) Effects of method, duration, and sleep stage on rebounds from sleep deprivation in the rat. Sleep 122: 11-31         [ Links ]

ROBERT C, GUILPIN C, LIMOGE A (1999) Automated sleep staging systems in rats. J Neurosci Methods 88: 111-22        [ Links ]

RONCAGLIOLO M, VIVALDI EA (1991) Time course of rat sleep variables assessed by a microcomputer-generated data base. Brain Res Bull 27: 573-80        [ Links ]

SHAW FZ, LAI CJ, CHIU TH (2002) A low-noise flexible integrated system for recording and analysis of múltiple electrical signáis during sleep-wake states in rats. J Neurosci Methods 118: 77-87        [ Links ]

STEFURAK SJ, STEFURAK ML, MENDELSON WB, GILLIN JC, WYATT RJ (1977) A method for sleep depriving rats. Pharmacol Biochem Behav 6: 137-9        [ Links ]

TRACHSEL L, TOBLER I, ACHERMANN P, BORBÉLY AA (1991) Sleep continuity and the REM-nonREM cycle in the rat under baseline conditions and after sleep deprivation. Physiol Behav 49: 575-80        [ Links ]

VAN BEMMEL JH, MUSEN MA (1997). Handbook of Medical Informatics, Springer-Verlag        [ Links ]

VIVALDI EA, BASSI A (2006) Frequency domain analysis of sleep EEG for visualization and automated state detection. Conf Proc IEEE Eng Med Biol Soc 1: 3740-3        [ Links ]

VIVALDI EA, PASTEL RH, FERNSTROM JD, HOBSON JA (1984) Long term stability of rat sleep quantified by microcomputer analysis. Electroencephalogr Clin Neurophysiol 58: 253-65        [ Links ]

VYAZOVSKIY VV, ACHERMANN P, TOBLER I (2007) Sleep homeostasis in the rat in the light and dark period. Brain Res Bull 74: 37-44        [ Links ]

WITTING W, VAN DER WERF D, MIRMIRAN M (1996) An on-line automated sleep-wake classification system for laboratory animáis. J Neurosci Methods 66:109-12.        [ Links ]Corresponding author: Ennio A. Vivaldi, Facultad de Medicina, Universidad de Chile, Independencia 1027, Casilla 70005, Santiago, Teléfono 56-2-9786402, Fax 56-2-7776916, Email evivaldi@med.uchile.cl

Received: September 8, 2008. In Revised form: January, 19, 2009. Accepted: January 20, 2009