Available via license: CC BY-NC-ND 4.0
Content may be subject to copyright.
Advance Publication
The Journal of Veterinary Medical Science
Accepted Date: 19 April 2024
J-STAGE Advance Published Date: 29 April 2024
©2024 The Japanese Society of Veterinary Science
Author manuscripts have been peer reviewed and accepted for publication but have not yet
been edited.
Full paper. Section: Physiology
Beacon-based sleep-wake monitoring in dogs.
Takefumi Kikusui1,2, Mizuho Yagisawa1, Kahori Koyama1, Yuma Shishikura1, Kana Miyamoto1,
Koichi Fujiwara3, Kazuhiko Kume4, Kensaku Nomoto1,5 and Miho Nagasawa1,2
1Laboratory of Human-Animal Interaction and Reciprocity, School of Veterinary Medicine,
Azabu University, Sagamihara, Kanagawa, 252-5201, Japan
2 Center for Human and Animal Symbiosis Science, Azabu University, Sagamihara, Kanagawa,
252-5201, Japan
3 Department of Material Process Engineering, Nagoya University, Nagoya, Aichi, 464-8601
Japan
4 Department of Neuropharmacology, Graduate School of Pharmaceutical Sciences, Nagoya
City University, Nagoya, Aichi, 467-8603,Japan
5 Department of Physiology, Dokkyo Medical University School of Medicine, Mibu, Tochigi,
321-0293, Japan
Correspondence: Miho Nagasawa, Laboratory of Human-Animal Interaction and Reciprocity,
School of Veterinary Medicine, Azabu University
1-17-71, Fuchinobe, Chuoku, Sagamihara, Kanagawa 252-5201, JAPAN.
Tel/Fax: +81-42-769-1853
e-mail: nagasawa@azabu-u.ac.jps
Running head: Beacon-based dogs’ monitoring
Abstract
The sleep-wake cycle represents a crucial physiological process essential for maintaining
homeostasis and promoting individual growth. In dogs, alterations in sleep patterns associated
with age and dog’s correlation with temperament factors, such as nervousness, have been
reported, and there is an increasing demand for precise monitoring of sleep and physical
activity in dogs. The present study aims to develop an analysis method for measuring sleep-
wake patterns and physical activity in dogs by utilizing an accelerometer and a smartphone.
By analyzing time series data collected from the accelerometer attached to the dog's collar, a
comprehensive sleep and activity analysis model was constructed. This model classified the
activity level into seven classes and effectively highlighted the variations in sleep-activity
patterns. Two classes with lower activity levels were considered as sleep, while other five levels
were regarded as wake based on the rate of occurrence. This protocol of data acquisition and
analysis provides a methodology that enables accurate and extended evaluation of both sleep
and physical activity in dogs.
Key word: acceleration, activity, dog, machine learning, sleep
Introduction
In humans, there exists a strong correlation between the quality and duration of sleep, and
they impact on mental and physical well-being. Similarly, the investigation of sleep patterns
in animals, particularly in dogs, has garnered interest[18]. Dogs exhibit rapid eye movement
(REM) and non-rapid eye movement (NREM) sleep, which can be assessed through
behavioral and polygraphic methods[2, 17]. It has been reported that dogs possess a diurnal
sleep-wake rhythm, which aligns with human circadian rhythms[1, 18]. Various factors, such
as exercise, environments and aging influence the sleep patterns of dogs[4, 7, 10]. Moreover,
there is evidence suggesting that sleep is associated with memory formation in dogs[13].
These findings support resemblance to those observed in the human. Additionally, as
nighttime sleep and daytime wakefulness are interconnected, it is important to evaluate both
sleep quality and quantity, as well as daily physical activity.
Polysomnography (PSG) represents the most reliable and objective approach for the
assessment of sleep quality. However, due to its impracticality and requirement of the
expensive equipment, PSG cannot be widely utilized for evaluating sleep in dogs. To address
this limitation, the application of accelerometers has been proposed as an alternative method
for monitoring sleep and activity in dogs[4]. A report demonstrated a baseline sleep–wake
cycle and activity patterns based on actigraphy and functional linear modeling[18]; however,
this method requires advanced statistical processing and difficulties exist in its applicability
to situations where the general public uses it. Accelerometer-based data acquisition has been
developed for commercial use and employed for sleep and activity monitoring in dogs. For
instance, the FitBark device (Fitbark, Co. Ltd. Kanzas City, MO, USA) has been shown to
exhibit a strong correlation between human-observed step counts and the FitBark activity[6].
Another study utilized the FitBark device to assess sleep quality and quantity based on the
manufacturer's algorithm[14]. Nevertheless, access to the raw data of the FitBark device for
research purposes is currently unavailable, and the validation of the analysis and algorithmic
model has not been demonstrated in the broader scientific community. Therefore, there is a
need for additional validated techniques that are readily accessible. The present research aims
to utilize a commercially available 3-axis accelerometer to track both physical activity and
sleep patterns in dogs, with collected data being transmitted to a smartphone for analysis and
validation for broad research and ordinary use.
Materials and Methods
Dogs were recruited from household dogs, and we ensured that the dogs were in good health.
For modeling the sleep and activity prediction, various size, sex, and age of the dogs were used
(12 males and 8 females, age 5.0+/-3.9 years, see Supplementary Table 1 in detail). Their
owners were informed about a procedure of an experiment, and all of them agreed to an
informed consent before taking part in the experiment. All experimental procedures were
approved by the Animal Ethics Committee of Azabu University (#180410-1).
Experimental Materials
Devices and a data processing procedure followed our previous method used in human
study[11]. In brief, a Bluetooth beacon accelerometer (MetamotinRL, Mbientlab Co. Ltd.,
CA, USA), an Android smartphone (Aquos Sense2, SHARP, Co, ltd, Tokyo, Japan), and
Omron Sleep Meter HSL-102-M (Tokyo, Japan) were used. The accelerometer, functioning
as a beacon to measure 3-axis acceleration (X-, Y-, and Z-axis), was attached to the dog’s
collar. The beacon and the smartphone established a BLE (Bluetooth Low Energy)
connection to transmit acceleration data using a smartphone app for data collection and
processing (Quadlytics Inc., Kyoto, Japan). The acquired data consisted of timestamps, an
username, a beacon identifier, 3-axis acceleration, radio wave strength (RSSI), and location
(latitude and longitude). The sampling rate for data collection was set at 12.5 Hz.
Omron Sleep Meter was designed for human medical use and emitted 10.5 GHz radio waves
and measures the time spent in the sleep/wake state based on the frequency and magnitude
of body movements. Sleep data were classified into four sleep statuses determined by the
duration of body movements every 30 sec: stage 1 = asleep, stage 2 = awake, stage 3 = not
detected, and stage 4 = others. Since there is no similar device for veterinary clinical use to
determine sleep in dogs, this sleep monitor was used in this experiment. In our preliminary
study, video recording was conducted at the same time as the Omron sleep meter in dogs to
ensure that body movements and sleep meter data were in close agreement.
Data analysis
The experimental duration spanned 3 days for each dog. Any beacon data with a significant
number of missing values due to unstable BLE connections were excluded from the analysis.
For the comparison of sleep analysis between acceleration data and the Sleep Meter, data from
three nights between 0:00 AM and 6:00 AM were collected from the dogs. The total amount
of the data obtained from the accelerometer were 20 dogs for a total of 2006.6 hr, which
underwent processing using MATLAB programming code (MathWorks, Co. Ltd, Natick, MA,
USA) to obtain the prediction model. The three axes of the acceleration values were combined
into a scalar value, which was then averaged over a one-sec interval. Following the previously
reported procedure[11], standard deviation (SD) values of the scalar amount of acceleration
per sec were calculated every 30 sec. The subsequent analysis involved utilizing five
consecutive variables of SD data: two data points from one min before and two data points
from one min after the target epoch. Normal mixed clustering was performed to classify
activity levels into seven clusters (JMP, v13.0, SAS Institute. Ltd, Cary, NC, USA), as reported
previously[11], because it is based on probabilities of cluster membership rather than
arbitrary cluster assignments based on boundaries. Regarding the number of clusters, we
chose 7 clusters to facilitate comparison with metabolic equivalent of task (MET) scale in
humans. The number of activity clusters (low to high) followed the MET scale, where a value
of 1 corresponds to resting metabolism and a value of approximately 7 corresponds to the
highest level of daily physical activity. A Random Tree protocol on MATALB was employed
for the automatic classification of the activity levels [11]. The parameters were determined
using Bayesian optimization based on Gaussian process models, and the trees were pruned to
a level where the error did not increase by more than 10 times during cross-validation.
Results
Figure 1A presents a visual representation of the three axes’ values measured by the
accelerometer alongside the SD values of acceleration over a 30-sec interval. Notably, this
figure illustrates a strong correlation between the SD values and one-sec acceleration data.
These findings were subsequently utilized in a Random Tree method, employing a 10-fold
cross-validation technique, resulting in an accuracy rate of 97.3% for 10% of the cases (Table
1 and 2, 12 males and 8 females).
Figure 1B offers a representative analysis of the activity classes within a 24-hr timeline,
contrasting the activity patterns of an adult (9 years old, male standard poodle) and an aged
individual (14 years old, female standard poodle). A smoothing spline was applied to the data,
which facilitated highlighting the observed variations. Distinct individual differences in the
sleep-activity cycle were observed.
A comparative analysis was conducted between the seven categorized levels of activity data
and the sleep stage data obtained from the sleep meter. The acceleration data, continuously
collected from the canine subject, was classified via machine learning algorithms.
Subsequently, periods corresponding to sleep stages, as determined by the sleep meter, were
extracted from this dataset, and a cross-tabulation of both datasets was performed. Classes 1
and 2 were combined and predicted as sleep in the beacon-based measurement, and this sleep
prediction demonstrated a high level of agreement with the sleep stages determined by the
Sleep Meter. Consequently, the seven classes were divided into two categories, with Classes
3 to 7 being classified as activities. Table 3 summarizes the precision, the recall, the accuracy,
and Table 4 showed the F1 score metrics, calculated using the data measured by the Sleep
Meter. It is noteworthy that the sleep-wake coincident ratio achieved an accuracy rate of 79%.
Discussion
The current investigation employed machine learning algorithm to analyze data collected
from accelerometers. The sleep activity pattern can be visualized and there was an individual
differences found in adult and aged dogs. While this study aimed to develop a sleep-activity
analysis method and two representative dogs’ data were compared, it was found that the
proposed technique could potentially be used to detect individual differences in the sleep-
activity cycle [10, 18]. Dog sleep research is attracting attention in the veterinary field, and
reductions in sleep and activity due to temperament [12] and diseases such as pain and motor
dysfunction [9] were reported. Also, as dogs’ behavior and neurological function have been
focused on as models for human ageing, cognitive dysfunction, and neurological disorders[3,
10, 13], long-term automated monitoring of dog’s sleep and movement is also expected to
contribute to translational research in dogs.
In the comparison study of sleep prediction by accelerometers and sleep detection by the
medical Sleep Meters, this accelerometers method yielded results that closely corresponded
to those obtained from the Sleep Meters. This suggests that the data processing technique
employed in this study was valuable for detecting sleep stages in dogs. In sleep assessment,
79.7% for Precision and 89.6% for Recall were high. In Awake, the values were 65.4% for
Precision and 41.1% for Recall, which were relatively lower, but still accurate enough to be
used to detect the duration of sleep in real-life situations in dogs. Woods et al. demonstrated
a similar method to detect sleep and physical activity using an accelerometer, in which age
and size of dogs influenced sleep and activity patterns in house dogs [18]. In Woods’s study,
functional linear modeling was used to smooth and to visualize 24 hr of the activity data, which
was similar to this study regarding the usefulness of processing time series data over some
range (2.5min in this experiment) rather than observing them at epoch points. However, there
was a difference in the prediction of sleep-wake status between Wood's and our methods. In
Wood's study, functional linear modeling was used to smooth and visualize 24 hr of activity
data, which means the statistical results was obtained only after the whole data acquired. In
our study, random tree methods were used to predict the class of sleep and movement, which
can be adopted the real-time analysis of the data.
In the present study, we used the same data acquisition and processing methods developed
for human study as we previously reported (Bio archive). In human study, the Random Forest
model was able to classify sleep and wakefulness with a 97.4% and 85.4% precision,
respectively, which were comparable to those of conventional acceleration-based sleep
monitoring devices. Additionally, the same data acquisition method was used to classify
exercise intensity into seven levels and a high correlation (r=0.813, p<0.0001) was found
when comparing the classified exercise intensity to MET values. This indicates that a
comparable data processing approach may be applicable to classify sleep and physical activity
in other animals, including cats and wild animals.
As for the accuracy of the activity classifications using the acceleration data in this study, the
values are necessarily high because all the calculations are based on the acceleration data. This
is for validation to ensure that the quality and quantity of the data used to obtain the
prediction model were adequate. Using this machine learning model, it will be possible to
real-time classify sleep and physical activity using this model, which is expected to be
applicable to various clinical and daily life situations. It should be noted, however, that this is
only a proposed model, and further validation in practical settings using dogs with sleep
disorders, physical problems, and age-related cognitive disfunction is needed.
Sleep and physical activity are important for mental and physical health in humans[16], and
quantity and quality of sleep and activity influences each other. In dogs, physical activity has
been shown to influence sleep patterns; dogs that experienced high physical activity slept
more, and were more likely to have an earlier onset of drowsiness and NREM sleep, and spent
less time in drowsiness and more time in sleep [4]. Particularly, cognitive dysfunction is
commonly observed in aged dogs, and this could be related to sleep and activity similar to
humans[7, 10, 18]. Dogs with hyperactivity/impulsivity showed less sleep quality and
quantity[5]. In addition, human sleep can be influenced by dogs and cats[8, 15], and this
method can apply to the research for understanding the relationship between pets and owners
living together in a house.
In our study, we collected data from a variety of ages, sex, and breeds, but it was not able to
obtain sufficient numbers of individuals to verify how these factors affect sleep and
activity[18]. It is expected that adjusting the number of participating dogs will reveal
environmental and physiological factors influencing dogs’ sleep and activity. While it is
notable that the Sleep Meter was designed for humans, not for dogs, and further reliable
validation, such as using PSG, is needed in future. The data processing in the present study
was performed as a post-hoc analysis in MATLAB, but the process was not overly complicated.
Consequently, the sensor data can be transmitted to a smartphone and calculated on the
device. In the future, sleep and activity levels may be displayed on smartphones, leading to
personalized recommendations for sleep and activity levels.
Conflict of interests
The authors state no conflict of interest.
Acknowledgements
The authors thank Dr. Yuya Hataji for his kind help for the MATLAB coding. Omron Co. Ltd.
kindly provided the sleep meters for this research. This work was partially supported by JSPT
Kakenhi (# 21H03333 to MN and # 23H05472 to TK) and JST-Mirai Program Grant
Number JPMJMI21J3, Japan.
References
1. Adams, G. J. and Johnson, K. G. 1993. Sleep-wake cycles and other night-time behaviours
of the domestic dog Canis familiaris.
Appl. Anim. Behav. Sci.
36: 233–248.
2. Bálint, A., Eleőd, H., Körmendi, J., Bódizs, R., Reicher, V. and Gácsi, M. 2019. Potential
Physiological Parameters to Indicate Inner States in Dogs: The Analysis of ECG, and
Respiratory Signal During Different Sleep Phases.
Front. Behav. Neurosci.
13: 207.
3. Bunford, N., Andics, A., Kis, A., Miklósi, Á. and Gácsi, M. 2017. Canis familiaris As a
Model for Non-Invasive Comparative Neuroscience.
Trends Neurosci.
40: 438–452.
4. Bunford, N., Reicher, V., Kis, A., Pogány, Á., Gombos, F., Bódizs, R. and Gácsi, M. 2018.
Differences in pre-sleep activity and sleep location are associated with variability in
daytime/nighttime sleep electrophysiology in the domestic dog.
Sci. Rep.
8: 1–10.
5. Carreiro, C., Reicher, V., Kis, A. and Gácsi, M. 2023. Owner-rated
hyperactivity/impulsivity is associated with sleep efficiency in family dogs: a non-invasive
EEG study.
Sci. Rep.
13: 1–10.
6. Colpoys, J. and DeCock, D. 2021. Evaluation of the FitBark Activity Monitor for
Measuring Physical Activity in Dogs.
Animals (Basel)
. 11:.
7. Cummings, B. J., Head, E., Ruehl, W., Milgram, N. W. and Cotman, C. W. 1996. The
canine as an animal model of human aging and dementia.
Neurobiol. Aging
. 17: 259–268.
8. van Egmond, L. T., Titova, O. E., Lindberg, E., Fall, T. and Benedict, C. 2021.
Association between pet ownership and sleep in the Swedish CArdioPulmonary bioImage
Study (SCAPIS).
Sci. Rep.
11: 1–7.
9. Gruen, M. E., Samson, D. R. and Lascelles, B. D. X. 2019. Functional linear modeling of
activity data shows analgesic-mediated improved sleep in dogs with spontaneous
osteoarthritis pain.
Sci. Rep.
9: 1–6.
10. Head, E. 2013. A canine model of human aging and Alzheimer’s disease.
Biochim.
Biophys. Acta
. 1832: 1384–1389.
11. Kikusui, T., Yagisawa, M., Koyama, K., Fujiwara, K., Kume, K., Nomoto, K. and
Nagasawa, M. Beacon-based sleep status and physical activity monitoring in humans.
https://www.biorxiv.org/content/early/2023/11/02/2023.10.30.564338.
12. Landsberg, G. M., Deporter, T. and Araujo, J. A. 2011. Clinical signs and management
of anxiety, sleeplessness, and cognitive dysfunction in the senior pet.
Vet. Clin. North
Am. Small Anim. Pract.
41: 565–590.
13. Mondino, A., Catanzariti, M., Mateos, D. M., Khan, M., Ludwig, C., Kis, A., Gruen, M.
E. and Olby, N. J. 2023. Sleep and cognition in aging dogs. A polysomnographic study.
Front Vet Sci
. 10: 1151266.
14. Patel, S. I., Miller, B. W., Kosiorek, H. E., Parish, J. M., Lyng, P. J. and Krahn, L. E. 2017.
The Effect of Dogs on Human Sleep in the Home Sleep Environment.
Mayo Clin. Proc.
92: 1368–1372.
15. Piccione, G., Arfuso, F., Giannetto, C., Faggio, C. and Panzera, M. 2013. Effect of
housing conditions and owner’s schedule on daily total locomotor activity in dogs (Canis
familiaris).
Biol. Rhythm Res.
44: 778–786.
16. Stathopoulou, G., Powers, M. B., Berry, A. C., Smits, J. A. J. and Otto, M. W. 2006.
Exercise Interventions for Mental Health: A Quantitative and Qualitative Review.
Clinical Psychology: Science and Practice
. 13: 179–193.
17. Wauquier, A., Verheyen, J. L., van den Broeck, W. A. and Janssen, P. A. 1979. Visual and
computer-based analysis of 24 h sleep-waking patterns in the dog.
Electroencephalogr.
Clin. Neurophysiol.
46: 33–48.
18. Woods, H. J., Li, M. F., Patel, U. A., Lascelles, B. D. X., Samson, D. R. and Gruen, M. E.
2020. A functional linear modeling approach to sleep–wake cycles in dogs.
Sci. Rep.
10:
1–8.
Figure legends
Figure1. (A) An example of the dog’s raw data in the three axes converted to scalar values of
acceleration obtained by the beacon (black line and the first vertical axis) and the data
SD values of them calculated every 30 sec (red line and the second vertical axis).
Horizontal axis represented the time of the day. (B) A representative data of daytime and
nighttime sleep-activity cycles. The data represent average values of classified clusters by
machine learning over sequential 7 days. Blue dots and line represent 9- year-old male
standard poodle, and red dots and line represented 14years old female standard poodle.
A
B
One week average of activity
Time
9yrs male poodle
14yrs female poodle
Table 1. Results of raw data points obtained by Random Tree prediction
C1 C2 C3 C4 C5 C6 C7 Sum classified
58596 0 0 0
615
0 0 59211 C1
638 18783 110 136 122 0 0 19789 C2
0 114 9609 0 104 0 0 9827 C3
0137 0 13390 177 0 0 13704 C4
0104 121 201 34002 586 6 35020 C5
0 1 26 63 689 16150 190 17119 C6
0 0 4 6 11 235 6883 7139 C7
Table 2. Predictive Values of Random Tree prediction
Class Precision Recall Accuracy F1 Score
C1
0.989 0.990 0.973 0.989
C2
0.981 0.949 0.965
C3
0.974 0.978 0.976
C4 0.971 0.977 0.974
C5 0.952 0.971 0.961
C6
0.952 0.943 0.947
C7
0.972 0.964 0.968
C1-C7: Activity classes, higher class numbers indicate
t ti it l l
Table 3. Results of raw data points by comparison between activiy classes and sleep meter determination
Sleep stage 01234567
Sleep 11 687 241 51 89 54 24 7
Awake 8 47 37 33 69 33 20 19
Not detected 31817310730
Others 014221001
Activity class 0: not detected
Activity classes
Table 4. Predictive Values of activit y classes
Sleep stage Precision Recall Accuracy F1 score
Sleep 0.797 0.896 0.791 0.844
Awake 0.654 0.411 0.505
Not detected
0.919 0.944 0.931
Supplemental Table 1. Information of dogs
Name Age Sex Size Breeds
Ten 1 female large Mix
Uru 3 male large Mix
Harry 4 male small Mix
Omochi 2.5 male medium Mix
Kinako 2.5 female small Pomeranian
Reon 6 male large Mix
Mugi 1 female medium Welsh corgi
Daipuku 9 male medium Mix
Goma 5 male medium Mix
Dash 6 male large Mix
Adam 9 male large Standard Poodle
Girian 2 female medium Mix
Tatsuo 7 male large Labrador
Ayu 5 female small Mix (Maltese&Chihuahua)
Dorutye 5 female small Mix(Maltese&Toy Poodle)
Kuu 6 male small Yorkshire terrier
Jasmine 14 female large Standard Poodle
Kurt 4 male large Standard Poodle
Karl 4 male large Standard Poodle
Niko 4 female large Standard Poodle