SLEEPIC
Developments for a Wearable On-line Sleep and Wake Discrimination System
Walter Karlen
Electrical and Computer Engineering in Medicine Group, Department of Electrical and Computer Engineering
The University of British Columbia (UBC), 2332 Main Mall, V6T 1Z4, Vancouver, BC, Canada
Dario Floreano
Laboratory of Intelligent Systems, Institute of Micro-engineering
Ecole Polytechnique F
´
ed
´
erale de Lausanne (EPFL), CH-1015 Lausanne, Switzerland
Keywords:
Wearable, Context awareness, Sleep and wake discrimination, On-line classification, Embedded intelligence.
Abstract:
The design of wearable systems comes with constraints in computational and power resources. We describe
the development of customized hardware for the wearable discrimination of human sleep and wake based on
cardio-respiratory signals. The device was designed for efficient and low-power computation of Fast Fourier
Transforms and artificial neural networks required for the on-line classification. We discuss methods for
reducing computational load and consequently power requirements. The SleePic prototype was tested for
autonomy and comfort on eight healthy subjects. SleePic showed an energetic autonomy of more than 36
hours. The SleePic device will require further integration for increased comfort and improved user interaction.
1 INTRODUCTION
Monitoring sleep and wake behavior of subjects at
home allows the early detection of sleep troubles and
disorders, and can reduce health care costs (Colten
and Altevogt, 2006). Home monitoring of sleep/wake
behavior imposes particular challenges, namely that
necessary sensors, electronics and intelligent signal
processing algorithms require integration into a com-
fortable, wearable device.
The most common physiological signal used for
sleep discrimination in clinical sleep monitoring is the
recording of brain activity with an electroencephalo-
gram (EEG) (Ogilvie, 2001). Unfortunately, EEG
cannot be easily recorded with a wearable system. Al-
ternatively, actigraphs are often used for long term
sleep studies (Sadeh, 2002). Actigraphy is a pas-
sive measure of sleep/wake behavior. The actigraphy
wristbands are small, lightweight, low-power, and
therefore easy to wear over several days. However,
actigraphy algorithms often incorrectly classify low
activity tasks (e.g. reading or watching television) as
sleep because the measured behavioral quiescence is
not unique to sleep (Sadeh, 2002; de Souza et al.,
2003). In previous studies we showed that sleep /
wake classification is possible with frequency-domain
features of cardio-respiratory signals using a single-
layer, feed-forward artificial neural network (ANN)
(Karlen et al., 2008; Karlen et al., 2009).
Comfort and wearability imposes constraints on
the design of devices. For instance, micro-controllers
are preferred to the high-performance 32-bit ap-
plication processors from the standpoint of power
consumption (i.e. compared <0.1 W for micro-
controllers to 1-2 W for application processors used
in smart phones). However, micro-controllers are
limited by the computational resources they provide,
as well as being less flexible by not running operat-
ing systems and rich data formats. These constraints
therefore impose particular challenges in the design
of accompanying digital signal processing (DSP) al-
gorithms to have low computational complexity.
We have developed a wearable hardware sys-
tem called SleePic (derived from Sleep discrimination
with a Programmable interface controller).
The SleePic implements the preprocessing and
ANN classification principles previously suggested
in (Karlen et al., 2009). We describe the research
and development of the wearable hardware design of
SleePic and present methods to minimize the power
132
Karlen W. and Floreano D..
SLEEPIC - Developments for a Wearable On-line Sleep and Wake Discrimination System.
DOI: 10.5220/0003131701320137
In Proceedings of the International Conference on Bio-inspired Systems and Signal Processing (BIOSIGNALS-2011), pages 132-137
ISBN: 978-989-8425-35-5
Copyright
c
2011 SCITEPRESS (Science and Technology Publications, Lda.)
consumption of the classification algorithm to be em-
bedded in wearable systems. We also describe valida-
tion experiments with data obtained from eight users
wearing SleePic for 36 hours.
2 HARDWARE REQUIREMENTS
For the development of the wearable sleep / wake
discrimination system, we formulated a series of de-
sign criteria that were based on general recommenda-
tions for a wearable bio-medical device (Martin et al.,
2000; Scheffler and Hirt, 2004) and the classification
algorithm described in (Karlen et al., 2009). The sys-
tem was expected to:
Be wearable. From sensors to user feedback, we
wanted to integrate all elements of the device into
a wearable system. This implies low size and low
weight. It is desirable that the wearable system
is comfortable and does not display any cables or
wires.
Be autonomous: The system is expected to have
power autonomy for at least 24 hours. After us-
age, easy recharge is a plus.
Record cardio-respiratory data. The algorithm in
(Karlen et al., 2009) processes electrocardiogram
(ECG) and respiratory (RSP) signals for classifi-
cation.
Be able to execute the classification algorithm on-
line. The processing resources on the system need
to cope with the signal processing and classifi-
cation in minimal time without excessive energy
consumption.
Give feedback to the user. The system needs an
interface to communicate with the wearer. The
feedback method has to adhere to the energy re-
strictions.
To our knowledge, there exist no systems on
the market that comply with all these design crite-
ria. Therefore, to embed the classification algorithm
developed in (Karlen et al., 2009) into a wearable
demonstrator, we built our own prototype. To keep
development cost low, we relied on commercially
available sensors and components for prototyping.
Missing functionality, such as user interface and com-
putational resources for on-line classification, were
added by designing custom extension modules.
3 SLEEPIC DESCRIPTION
The SleePic sleep / wake discrimination system is
composed of three modules (Figure 1):
1
2
3
Figure 1: A subject wearing the complete SleePic sleep
/ wake detection system. 1) Equivital
TM
Sensor Belt; 2)
SleePic Core extension module; and 3) SleePic Watch for
user interaction.
1. The SleePic Sensor module is worn around the
chest.
2. The SleePic Core processing module is responsi-
ble for all signal preprocessing and classification.
The module connects directly to the SleePic Sen-
sor module.
3. The SleePic Watch is worn on the wrist. The
SleePic Watch is responsible for remote sensing
and user feedback. It communicates wirelessly
with the SleePic Core.
3.1 Wearable Sensor Module
Sensors integrated into textiles appeared on the mar-
ket only recently. The technology is not yet estab-
lished and expensive. The Equivital
TM
physiological
monitoring system (Hidalgo Ltd, UK) has been cho-
sen as sensor module for this system development. It
offers a good compromise between cost, wearability
and real time sensor access. It offers high integration
of sensors and textile electrodes in a single belt worn
across the upper chest area, which facilitates the cor-
rect wearing and use of the system by inexperienced
users. Equivital
TM
can operate continuously for up to
48 hours with the integrated, rechargeable Lithium-
Ion battery (760 mAh). However, there is a lack of
user feedback possibilities, and options for comput-
ing the classification algorithm on-line are also miss-
ing. Equivital
TM
is composed of two units:
1. A washable sensor belt which integrates 3 textile
dry electrodes for 2-lead ECG recordings and a
piezo-resistive strain gauge to measure RSP. The
sensor belt weights 94 grams (size M).
SLEEPIC - Developments for a Wearable On-line Sleep and Wake Discrimination System
133
2. A Sensor Electronics Module (SEM) that can be
attached to the sensor belt with ve connective
clips. The SEM measures 3-axis acceleration
(ACC), temperature and features a real time clock
(RTC). The SEM also embeds a vibrating actu-
ator. The SEM weights 75 grams including the
battery.
3.2 SleePic Core Processing Module
The SleePic Core (Figure 2) is a printed circuit board
(PCB) that plugs to the SEM. It was designed for re-
ceiving the raw sensor data from the Wearable Sensor
module and the SleePic Watch , the processing of the
sensor signals, executing the classification task, and
the coordination of the tasks between all three SleePic
modules.
The SleePic Core is composed of a process-
ing unit, a power unit, storage unit and a com-
munication unit. The processing unit is the cen-
tral element on the SleePic Core and contains the
40 MIPS dsPIC33256GP710 micro-controller (Mi-
crochip Technology Inc., USA). This programmable
interface controller has a 16-bit architecture, 32 kB
RAM, 256 kB program memory and DSP function-
ality. It has been chosen because of the presence of
multiply-and-accumulate (MAC) and a barrel shifter
functionality which simplifies the Fast Fourier Trans-
formation (FFT) and ANN calculation. At time
of development, it was the largest available micro-
controller from the dsPIC33 series. The relatively
high amount of RAM was required for the FFT
preprocessing. The communication unit contains a
UART port for the communication with the SEM, an-
other UART port to communicate with a PC over a
USB converter and an SPI port for the NRF02L wire-
less chip (Nordic Semiconductor ASA, Norway) to
communicate with the SleePic Watch module. For
saving energy, each of the units can be disabled when
not needed by the micro-controller, including itself.
The dimensions of the SleePic Core module are 65
mm×35 mm×8 mm, and weights 8 grams without
battery.
3.3 SleePic Watch Module
The SleePic Watch module is used for the SleePic
user interaction (Figure 2). The module is placed on
the wrist to be highly visible to the user. The user in-
teraction unit is composed of 5 LED’s in the colors of
green, orange, red. A button provides the user possi-
bilities for feedback. The sensor unit contains a 3-axis
accelerometer (Freescale Semiconductor, USA) and a
photo-diode to measure ambient light. The data from
Antenna
Power
Switch
Micro-
controller
Wireless
Chip
MicroUSB
Connector
Button
LED’s
Photodiode
On/o
Switch
Figure 2: Bottom view of the SleepPic Core processing
module (left). Top view of the SleePic Watch module pro-
totype (right).
these sensors were not evaluated in this study. The
communication unit is composed of a USB-UART
converter which allows data exchange and recharg-
ing via microUSB The diameter of the SleePic Watch
module is 41 mm and the height 10 mm. A fully as-
sembled SleePic Watch weights 28 grams.
4 EXPERIMENTS
A series of recordings were conducted to test the
SleePic device and to obtain sleep / wake data in real-
life situations. Following informed consent, eight
(two female and six male) volunteers in the age be-
tween 24 and 30 years wore the SleePic system. The
subjects were in good health and reported no cardio-
respiratory disease or any sleep disorders. The sub-
jects came to the laboratory in the evening and were
instructed about the experiment procedure and how to
wear the device. The subjects wore the SleePic device
for a minimum of 36 hours that included two nights.
They were allowed to remove the belt during heavy
sport or when showering. During the experiment,
the subjects performed a randomly scheduled reaction
task using the button on the SleePic Watch. The sub-
jects were asked to sleep at home. After the recording,
the subjects returned the SleePic recording system to
the laboratory, were debriefed, and filled out a ques-
tionnaire about the usability and comfort of the sys-
tem. Because of the ambulatory nature of the experi-
ment, the subjects were expected to move freely and
perform normal daily activities. Therefore, we did not
consider the possibility of recording EEG signals for
reference. Instead, the subjects had to maintain a log-
book by indicating the system-off times, their sleep
times, and particular events related to the system that
may happen during the experiment. Additionally, a
technician installed an infra-red video camera in the
bedroom to record the sleep behavior during bedtime.
After the study, the technician analyzed the logbook
entries and video recordings and labeled the wake /
sleep periods of the subjects.
BIOSIGNALS 2011 - International Conference on Bio-inspired Systems and Signal Processing
134
5 RESULTS & DISCUSSION
Using the SleePic system, 250 hours of valid record-
ings were obtained and 37 % of which were labeled by
the technician as sleep. Classification and user adap-
tation experiments involved the cardio-respiratory
and activity data obtained. These experiments were
designed to assess the sleep/wake prediction perfor-
mance and are not described in details in this paper.
5.1 User Acceptance
From the post-study questionnaire, we were able to
evaluate the subjects’ acceptance of the SleePic proto-
type. Interestingly, the female subjects felt the wear-
able device comfortable enough, whereas the male
subjects either could not decide (50 %) or were not
comfortable with it (50 %). The male participants ar-
gued that they could not get used to the belt because
of it was either too tight or too big. The SleePic sys-
tem was most disturbing when the subjects were lying
face down. An integration of the SleePic Core ex-
tension module into the Sensor module would reduce
the overall size of the system worn on the chest and
decrease disturbance when lying on it. All subjects
found the light vibration that accompanied the reac-
tion task helpful and not as disturbing. The subjects
also agreed with the frequency of the reaction time
tasks. Wearing the device was influencing the daily
activities of the subjects only slightly (60 %) or not
at all (40 %). Compared to the perceived decrease in
comfort from an actigraphy device, the users did not
have a visible advantage from the device in this study.
Additional experiments with a device displaying on-
line sleep/wake schedules are required. For this, a
low-power liquid crystal display might be added to
the SleePic Watch. We also plan to demonstrate im-
proved comfort by embedding the SleePic Core mod-
ule into the body of the Sensor module.
5.2 Reducing Computational Load of
Preprocessing
Although the dsPic micro-controller with the highest
amount of RAM memory available was embedded in
the SleePic Core, the RAM was not sufficient to cal-
culate the FFT of ECG and RSP at the Sensor Module
sampling rates. As the high frequency features were
not needed for the classification, it was reasonable to
reduce the sampling rate accordingly. We therefore
sub-sampled the ECG from 256 Hz to 51.2 Hz and
maintained the RSP at the recording sampling rate of
the Equivital
TM
(25.6 Hz). For an efficient calculation
of the FFT on the dsPic micro-controller, the sliding
80
85
90
95
5 10 20 40
Test Accuracy [%]
a) FFT Window Size [s]
original pruned
80
85
90
95
b) ANN Input
Figure 3: a) Performance analysis for different sliding win-
dow sizes (5, 10, 20 and 40 seconds) for the FFT prepro-
cessing. b) Performance comparison when the entire fea-
ture set (original) or the reduced feature set (pruned) is used
as input of the ANN. The bullets represent the mean over
all trials and subjects, the bars cover the standard deviation.
window size had to contain power of two sampling
points for each window. The use of a window size
of 40 seconds was suggested (Karlen et al., 2009).
For our sampling rate, this window size resulted in
1024 (RSP) and 2048 (ECG) samples. The window
fitted the available RAM, but left only little space for
other variables. Therefore, the processing load was
further reduced by decreasing the window size for the
FFT preprocessing. However, by the nature of the
FFT, with an increase in time resolution, the resolu-
tion of the frequency output decreases. The reduction
of the window from 40 to the next possible size of 20
seconds resulted in a frequency resolution shift from
0.0122 Hz to 0.025 Hz. This change could result in
a change in classification accuracy which had to be
investigated.
We conducted an off-line experiment using data
from (Karlen et al., 2008) and compared the classi-
fication accuracies depending of the size of the win-
dows. Figure 3a shows the test results when the FFT
was calculated on a window size of 5, 10, 20 and 40
seconds respectively. Smaller sliding windows than 5
seconds were not meaningful because all useful fre-
quencies contained in the original physiological sig-
nal would lie in one frequency band. Larger win-
dows could not be computed with the dsPic micro-
controller and were not considered. Although the ac-
curacies for the different window sizes were not sig-
nificantly different (Figure 3a), we observed a posi-
tive trend toward the 20-second segments. This was
expressed with the highest mean performance, mini-
mal standard deviation and the highest total accuracy.
It was therefore reasonable to use a 20-second win-
dow instead of the 40-seconds suggested in (Karlen
et al., 2009) for the FFT computation on the SleePic
device.
5.3 Network Inputs
We analyzed the input network weights of the sin-
gle layer ANNs obtained from the previous experi-
SLEEPIC - Developments for a Wearable On-line Sleep and Wake Discrimination System
135
ment where the entire frequency spectrum served as
input. We observed that the weights of the neural in-
puts with the higher frequencies of the ECG and RSP
spectrum did show a very weak activation and varia-
tion compared to the weights of the low frequencies.
Based on physiological reasons and because the sim-
ple structure of the ANN, we hypothesized that the
low activation and variation in the domain above 3
Hz is linked to a reduced importance of these features
for the classification. Therefore we designed a differ-
ent network topology that only used the most relevant
input weights. In our particular case (single-layered
network), all input features i 1, ..., N were consid-
ered as relevant when the mean weight over all train-
ing runs 1 to M was larger than the median standard
deviation of all layer weights of all runs, as follows
S(w
i
) =
1 mean(~w
i
)
> median(std(~w
1,...,N
))
0 otherwise,
(1)
where ~w
i
= (w
1
i
,. .. ,w
M
i
) and S is the selection func-
tion. The resulting pruned network input numbers and
the pruning frequencies for each signal are shown in
Table 1. The input size of the pruned network was
reduced to 8.3 % of its original size.
We compared the performance of the reduced net-
works with the networks using all frequency inputs.
Figure 3b shows the accuracy for the original and
pruned network inputs when the experiments from
(Karlen et al., 2008) were repeated. We observed
that the accuracies showed no statistical difference,
but revealed a tendency for a higher median and bet-
ter worst performance for the pruned input. The pos-
itive effects in accuracy of the pruned ANNs can be
attributed to the reduction of the search space and
therefore to the reduction of over-fitting due to the
increased noise on the higher-frequency inputs. A
smaller input feature set did accelerate the training
and the network computation, and also reduced the
required amount of training input vectors (curse of di-
mensionality). It was therefore reasonable to use the
pruned network for the SleePic implementation.
Using DSP functionality, 202’742 instruction cy-
cles were necessary to compute a single classification.
If the device is running at the maximum speed of 40
MIPS, the required processing time is about 10 ms.
5.4 Energy Consumption
For a wearable device it is important to keep energy
consumption minimal. In the initially designed con-
figuration, both energetically independent systems on
chest and wrist achieved an energetic autonomy of 36
hours as required by the design criteria. Both systems
could easily be recharged by connecting them to a PC.
Table 1: Properties of the input feature space for the ANN
topology. The original features are all the frequency bins
available from the FFT preprocessing, as used in (Karlen
et al., 2008). The pruned features correspond to the features
obtained by applying Equation 1.
RSP ECG Total
Frequencies [Hz]
original 0-12.8 0-25.6
pruned 0-1.4 0-2.25
ANN Input Size [number]
original 257 513 770
pruned 28 46 74
5.4.1 SleePic Core and Sensor Module
The total average power consumption of 18.06 mW
(6.02 mA @ 3 V) measured at room temperature lead
to an autonomy of 36 hours. We observe that the ma-
jor energy resources went to the dsPic and the wire-
less chip (NRF) in rx (receiving) mode. Compared to
a standard micro-controller, the dsPic was relatively
power hungry, because of the high clocking and the
large RAM size. The power consumption was re-
duced by putting the dsPic into a very efficient idle
mode (0.1 mA) at 93 % of the time.
In a future design, a significant decrease in en-
ergy consumption (50 %) could be achieved when the
Recording Mode would be substituted by a single re-
quest for the 20-second sensor data packet instead of
the continuous recording of the data stream. This was
not possible with the Equivital
TM
because it only al-
lowed a single continuous output stream for the sen-
sor values. The total consumption could further be
decreased by 20 % by reducing the duty time of the
wireless chip. This could be achieved by implement-
ing an updated communication protocol that would
not require a continuous powering of the wireless chip
while waiting for a message from the SleePic Watch.
A more radical, but surely very energy efficient
and power saving option would be the replacement
of the dsPic micro-controller with a dedicated silicon
chip for the recording, preprocessing and ANN cal-
culation. However, these types of chips are very task
dependent and their development expensive. There-
fore we preferred the more flexible micro-controller
solution for the prototyping.
5.4.2 SleePic Watch
The total average power consumption of 10.36 mW
(2.8 mA @ 3.7 V) lead to an autonomy of 51 hours
when using the 145 mAh Lithium-Polymer battery.
The energy autonomy of the SleePic Watch could be
increased in a next step by selecting a smaller and
BIOSIGNALS 2011 - International Conference on Bio-inspired Systems and Signal Processing
136
more energy efficient micro-controller that also of-
fers a lower stand-by power consumption. The func-
tion of the SleePic Watch in our experiments was to
attract attention from the users during the reaction
task (LEDs) and provide an interface for respond-
ing (button). The peripheral location of the SleePic
Watch required wireless transmission of data and an
independent energy storage. The frequent wireless
communication increases the power consumption of
the SleePic Watch and Core. In future versions it is
imaginable to replace the custom SleePic Watch with
another, already existing pervasive device such as a
smart phone or digital wristwatch.
6 CONCLUSIONS
We developed a SleePic prototype based on com-
mercially available sensors and components. Miss-
ing functionality, such as user interface and com-
putational resources for on-line classification, were
added by custom designed extension modules. A DSP
micro-controller was used to efficiently compute FFT
for extracting the frequency features of the signals and
to compute the ANN for classification. FFT and ANN
were optimized for speed and lower power consump-
tion. We used no liquid crystal display. To render the
feedback information more meaningful to the user, it
might be advantageous to integrate a liquid crystal
display in a next step into the SleePic Watch.
Although cardio-respiratory signals were mea-
sured non-invasively with a wearable belt, it was more
cumbersome to use than a wrist worn actigraphy de-
vice. It is therefore application-dependent whether
a single actigraph device or a combined system like
SleePic should be adopted. If, for example, the appli-
cation is oriented toward sleep disorder diagnosis, the
system with additional cardio-respiratory functional-
ity offer a clear advantage, because current standards
in sleep disorder diagnosis require the recording of
these signals (Patel and Davidson, 2007).
The SleePic prototype demonstrated wearable
sleep/wake classification that is less obtrusive than the
EEG monitors currently used in sleep centers. We
also showed how existing classification algorithms
can be modified in order to comply with the narrow
constraints given by wearable systems.
The SleePic prototype can be considered as a
proof-of-concept for a new generation of health and
wellness devices. It shows the feasibility of a wear-
able, on-line sleep/wake classifier using low-cost
components. The minimal processing power require-
ments of the presented system opens new doors for
the use of high-level algorithms required for context-
awareness or automated diagnostics in point-of-care
health care.
ACKNOWLEDGEMENTS
We thank all subjects for participating in the SleePic
validation study. Dr. Steffen Wischmann and Michael
Chiang provided valuable comments on previous ver-
sions of this manuscript. Adam Klaptocz and James
Roberts contributed to the PCB design. Andr
´
e
Badertscher and Peter Br
¨
uhlmeier helped with the
manufacturing and assembling of SleePic. We would
like to thank Dr. med Werner Karrer, Dr. med Thomas
Rote and Isabelle Arnold of the Luzerner H
¨
ohenklinik
Montana, Switzerland, for providing expert knowl-
edge on sleep analysis.
REFERENCES
Colten, H. and Altevogt, B. (2006). Sleep disorders and
sleep deprivation: an unmet public health problem.
National Academies Press, Washington, DC.
de Souza, L., Benedito-Silva, A., Pires, M., Poyares, D.,
Tufik, S., and Calil, H. (2003). Further validation of
actigraphy for sleep studies. Sleep, 26(1):81–5.
Karlen, W., Mattiussi, C., and Floreano, D. (2008). Improv-
ing actigraph sleep/wake classification with cardio-
respiratory signals. In Annual International Confer-
ence of the IEEE Engineering in Medicine and Biol-
ogy Society, pages 5262–5.
Karlen, W., Mattiussi, C., and Floreano, D. (2009). Sleep
and Wake Classification With ECG and Respiratory
Effort Signals. IEEE Transactions on Biomedical Cir-
cuits and Systems, 3(2):71–8.
Martin, T., Jovanov, E., and Raskovic, D. (2000). Issues
in Wearable Computing for Medical Monitoring Ap-
plications: A Case Study of a Wearable ECG Moni-
toring Device. International Symposium on Wearable
Computers ISWC 2000, Atlanta, October.
Ogilvie, R. (2001). The process of falling asleep. Sleep
Medicine Reviews, 5(3):247–70.
Patel, M. R. and Davidson, T. M. (2007). Home sleep test-
ing in the diagnosis and treatment of sleep disordered
breathing. Otolaryngologic Clinics of North America,
40(4):761–784.
Sadeh, A. (2002). The role of actigraphy in sleep medicine.
Sleep Medicine Reviews, 6(2):113–124.
Scheffler, M. and Hirt, E. (2004). Wearable devices for
emerging healthcare applications. In Proc. 26th An-
nual International Conference of the IEEE Engineer-
ing in Medicine and Biology Society IEMBS ’04, vol-
ume 2, pages 3301–3304.
SLEEPIC - Developments for a Wearable On-line Sleep and Wake Discrimination System
137