Actiwatch 2 (Phillips-Respironics, Bend, Oregon) is a popular actigraphic device that can detect nighttime sleep/wake patterns and derive sleep parameters based on acceleration (ACC) signals. However, in October 2022, Philips announced that it is “discontinuing offering wrist-worn products in the clinician and research markets”, making all Actiware, Actiwatch 2, Actiwatch PRO, and Actiwatch Plus products unavailable for purchase after Dec. 29, 2022.
To evaluate whether an affordable consumer smartwatch, Vivosmart 4(Garmin, Olathe, Kansas), can effectively replace Actiwatch 2, we reverse-engineered the algorithm for Actiwatch 2 and applied the same algorithm to the raw-ACC data obtained from Vivosmart 4. The Vivosmart 4 does not routinely provide raw ACC data, but through our partnership with Garmin, a customized SDK was created to extract raw ACC signal from Vivosmart 4 and used to reproduce the sleep analysis obtained from Actiwatch 2.
This post introduces the signal processing method of detecting nighttime sleep/wake patterns based on the acceleration signal. As described here, we found the sleep/wake patterns derived from Vivosmart 4 consistent with that of Actiwatch 2. In the following two posts, we will explore how Actiwatch 2 derives sleep parameters from sleep/wake patterns, and compare the performance between Actiwatch 2 and Vivosmart 4 with more sleep data.
1. Experiment Setup
Our experiment setup is shown in Figure 1. Actiwatch 2 and Vivosmart 4 were worn simultaneously during sleep for comparison. Actiwatch 2 is a piezoelectric accelerometer with a sampling rate of 32 Hz. Vivosmart 4 is a 3-axis MEMS accelerometer with a sampling rate of 25 Hz.
2. From Acceleration Signal to Sleep/Wake Detection
2.1 Signal Processing
Figure 2 illustrates the signal processing method for deriving sleep/wake patterns. The general idea of the method can be referred to the reference [1-2].
Figure 2(a) illustrates the acceleration signal from Vivosmart 4 in terms of a't=ax'2t+ay'2t+az'2t. In the equation, ax'(t) is the raw x-axis acceleration subtracting its moving average of window length 9 to eliminate the low-frequency variation. And ay'(t), az'(t) are derived the same way.
Figure 2(b) illustrates the activity count time series labeled as AC(n), where n is the epoch index with an epoch length of 30 sec. The process of deriving AC(n) consists of three steps. First, the max 𝑎’ (t) in every second is extracted. Then, the values in 𝑎’ (t) below 50 mG (noise threshold) are set to 0. Finally, a’ (t) in every 30s epoch is summed up and then divided by 35 to represent the activity count in the epoch.
Figure 2(c) illustrates the total activity count labeled as TAC(t), which is derived from AC(n) as TACn=0.04∙ACn-4+0.04∙ACn-3+0.2∙ACn-2+0.2∙ACn-1+2∙ACn++0.2∙AC(n+1)+0.2∙AC(n+2)+0.04∙AC(n+3)+0.04∙AC(n+4) .
Finally, the epochs with TAC(t) below and above 40 are detected as sleep and awake period, respectively. The value 40 is the default sleep/wake threshold set in the Actiwatch software, which can also be set as 20 or 80. Accordingly, Figure 2(d) illustrates the sleep/wake patterns.
2.2 Comparison between Actiwatch 2 and Vivosmart 4
As can be seen in Figure 2(d), the sleep onset to offset time is 2:02 to 10:08 with an interval of 488 mins. Table 1 lists the consistent and inconsistent results between Actiwatch 2 and Vivosmart 4. Treating the result from Actiwatch 2 as a standard, the sensitivity (to detect sleep) of Vivosmart 4 is near 1.00, and the specificity is 0.87.
We reverse-engineered the full algorithm utilized in the Actiwatch 2 to derive nighttime sleep/wake patterns from the raw acceleration signal. The sleep/wake patterns derived from Vivosmart 4 are consistent with that of Actiwatch 2. In the following two posts, we will explore how Actiwatch 2 derives sleep parameters from sleep/wake patterns, and compare the performance between Actiwatch 2 and Vivosmart 4 with more sleep data.
 K. Y. Chen and D. R. Bassett, “The technology of accelerometry-based activity monitors: current and future,” Med. Sci. Sports Exer., vol. 37, pp. S490–S500, Nov. 2005.
 CamNtech, “The MotionWatch 8 and MotionWare User Guide,” Available at http://www.medicoimpianti.it/files/The- MotionWatch-User-Guide.pdf, 2018.
 Respironics, “Instruction manual of Actiwatch Communication and Sleep Analysis Software. Instruction manual. “Available at https://johnawinegarden.files.wordpress.com/2015/03/actiwatchsoftware.pdf, 2018
Francis is a research Lead at Labfront, responsible for data validation and analysis. He is interested in applying physics or math to medical research.
Research Lead (and Designated Plant Caretaker) at Labfront. Han-Ping is a researcher who seeks interesting phenomena, especially the interdisciplinary ones. His dream is to make all the riveting research be easily explored.
Dr. Ahn is an internal medicine physician with a background in physics/engineering and physiological signal analyses. He is the Chief Medical Officer at Labfront and an Assistant Professor in Medicine & Radiology at Harvard Medical School. Dr. Ahn is passionate about democratizing health sciences and exploring health from an anti-disciplinary perspective.