1. Introduction
Acceleration due to the human activities is proven to be of great importance in epidemiological research and physical activity-based health assessment. MEMS accelerometer-based, wrist-worn devices, such as smart watches and smart wrist-bands, are becoming more and more popular for PA monitoring. These devices are not only being used to perform sleep assessment [
1,
2,
3] but also for activity monitoring. Most of them provide number of steps and calorie consumption during the wearing period, and may even try to identify types of activities performed from the acceleration data measured by the accelerometer inside the devices. However, there are still unanswered questions such as: How accurate are these for the identified types of activities and calories burned, due to the fact the information is derived indirectly from acceleration information?
Having a good physically active life style can reflect one’s health condition and could be used to predict whether subjects might suffer from some diseases or not [
4]. More importantly, having a regular life style and good sleep quality in the long run will even impact the subject’s health condition. However, there is no quantitative way to assess the regularity of daily life. Inadequate PA may result in many health problems and diseases related to the lungs, heart, etc. [
5,
6,
7]. Tracking PA on daily basis provides valuable information related to the human body [
8,
9]. A number of platforms have been designed, implemented, and tested successfully in order to track subjects’ PA based on the wearable MEMS accelerometer [
10,
11]. Recent growth of IoT [
12,
13] and the capability of smart-phones in the past few years made PA recognition a dynamic field of study [
14,
15,
16]. Bender et al. conducted an empirical study of various fitness devices such as Fitbit Flex, Fitbit Charge HR, Garmin Vívoactive, and Apple Watch to compare PA recognition accuracy and device performance [
17].
Several previous works also proposed methods for activity identification and PA pattern analysis using external software, such as those executed on PCs or smart phones. For instance, Guillermo R. Oviedo et al. [
18] have used GT3X ActiGraph accelerometer (Firmware 4.4.0, ActiGraph™, FortWalton Beach, FL, USA), and data were downloaded with the ActiLife 6 Software (v.6.12.0., ActiGraph™, Fort Walton Beach, FL, USA) for certain types of activity identification through activity patterns on PCs. Chelsea Dobbins and Reza Rawassizadeh [
19] used principal component analysis feature selection (PCAFs) and correlation feature selection (CFs) on PCs to refine clustering of raw accelerometer data that had a positive effect on the computational burden that is associated with processing large sets of data, as energy efficiency and resource use is decreased, because less data is processed by the clustering algorithms, but a tremendous amount of raw data from devices is still required. A. K. Chowdhury et al. [
20] have proposed the use of posterior-adapted, class-based weighted decision fusion to effectively combine data from multiple accelerometer-based devices for improving physical activity recognition. Nan Zeng et al. [
21] have used NL-1000 pedometer and ActiGraph GT3X accelerometer for assessing the reliability of using motion sensors to measure children’s PA Levels in Exergaming. Matin Kheirkhahan et al. [
22] have developed machine learning methods for identifying activity types and computing energy expenditures using standard statistical methods, as well as the bag-of-words (BoW) approach. However, this research poorly describes further applications for the results that have been analyzed.
In summary, these results are not found to be accurate enough or to have a close association with the timing information so that they could be considered for medical-care systems and clinical applications. Therefore, this research aims to bridge this gap and to develop simple mathematical models and algorithms for achieving parameters and results that are closely associated with actual on-set timing information. Moreover, the models and algorithms are simple enough to be easily deployed inside wrist-worn, accelerometer-based devices, and the results obtained are accurate and precise enough to be considered for medical-care systems and clinical applications.
Therefore, in this study we have proposed a methodology for the quantification of physical activities performed the daily life, i.e., activity index (AI), which is closely associated with human body acceleration [
23]. These results can be used to categorize activities into 5 different levels, i.e., rest/sleep, sedentary, light, moderate, and vigorous activity states. Based on the AIs, a sleep duration detection algorithm has also been developed. Furthermore, by calculating the correlation coefficient for AIs on a daily or weekly basis, a quantitative method to express the regularity of daily life, i.e., the regularity index (RI), has been proposed in this study. By combining all these quantitative indices, such as activity, sleep duration, and regularity of ADL, this index can be used for many activity monitoring-based medical-care applications. Moreover, these results could be synced to smart phones for IoT applications with a greater capability of sensing human activity ubiquitously and unobtrusively through advancements in miniaturization and sensing abilities. This could unleash a systematic methodology in mobile-health for the prevention and early detection of chronic diseases.
2. Materials and Methods
This study was reviewed and approved by the institutional review board (IRB) of the Chang Gung Memorial Hospital, Taiwan, R.O.C. An accelerometer-based, wrist-worn device (GeneActiv, Activinsights Ltd., Huntingdon, UK, as in
Figure 1) has been used to record wrist movement acceleration in three orthogonal directions along with timestamp and body temperature. This device is equipped with MEMS-based accelerometer, which was set for a sensing range of ±8 g at a 12-bit digital resolution (i.e., 3.9 mg resolution, 1 mg = 1/1000 g), in which ‘g’ is the gravitational force. Even though the sampling frequency of this device was configurable, the sampling frequency was set to 20.0 Hz, as it was used to monitor ADL and also to prevent too much data were generated due to high sampling rate. Ten normal subjects were chosen and have been asked to wear the device for 24 h a day during their normal routine. After a maximum of 30-days, data were downloaded at the data-server station, and the subjects were given another device immediately for continuous data recording.
Downloaded data were then further analyzed and interpreted. A mathematical model has been proposed and implemented for the data processing and parameters for quantifying and assessing PAs that were defined, quantified, and evaluated. A brief description about data analytical models are as given below.
2.1. Data Analytical Models
With the fact that the kinematic energy associated with human activities can be given as (1),
in which
is the human’s body mass moving with a velocity of
. Since
, in which
a is the moving acceleration of the body in the time interval of
, and ‘
’ is the initial velocity. If the movement starts from rest position, then the initial velocity, ‘
’, can be taken as 0, and
Now, the kinematic energy in (1) will be proportional to the square of acceleration, as in (2), assuming that the subject’s mass is constant over the period
.
The magnitude of acceleration,
, at the data instance
j could be calculated as in (3), and since only the magnitude is calculated, the impact of the orientation of accelerometer will be eliminated.
In (3),
,
, and
are the raw data from accelerometer along the X-, Y-, and Z-axis sampled at the time instance
j. The standard deviation,
, of the acceleration magnitude within a pre-defined epoch period can be calculated as in (4).
In (4),
N is total number of acceleration data points measured in the epoch period, and
is the mean value of the total acceleration within that period. Since the acceleration measured by the accelerometer also contains gravity force all the time; therefore, the average of total acceleration within a short period can be considered as the gravity. Hence, deducting the acceleration’s mean value
from the magnitude of acceleration
measured by accelerometer will give the net acceleration of the body movement. Therefore, the square of standard deviation,
, calculated in (4) can be considered as the average of the square of total net acceleration within the epoch period, such that the human kinematic energy will also be proportional to the square of standard deviation,
, as in (5).
Since the square of standard deviation,
, over the epoch period is very small and usually less than 1, so the standard deviation,
, is taken into consideration in the model proposed in this study for the larger value represented. Regarding the results, an activity index (AI) is proposed as the summation of the standard deviation,
, over a desired time interval, as shown in (6).
in which
M is the total number of epoch periods within the time interval and
represents the standard deviation of acceleration in the
k-th epoch period within that time interval. In the implementation of the data analytical models described here, a 5-s epoch period is considered. The choice of 5-s epoch period typically will not cover more than two activities within that epoch period and will still generate manageable amounts of data in the computation. Since the sampling frequency of the accelerometer in the device was set to 20 Hz, within the 5-s epoch period, there will be 100 measured data points, i.e.,
N = 100 as in (4). To generate a minutely-wise AIs, i.e., choosing one minute as a basic time interval, then there will be 12 epoch periods in the time interval, and hence
M = 12 as in (6).
2.2. Categorization for Different Levels of Activities
With the AI introduced in
Section 2.1, testing of 14 different activities of daily life (ADL) and each activity lasted for 3 min was conducted with 10 normal subjects wearing the device. These activities included sleeping, sitting and watching TV, sitting and reading newspaper, sitting and web browsing, housekeeping, driving, walking—no hand-swing, walking—with hand-swing, upstairs—no hand-swing, upstairs—with hand-swing, downstairs—no hand-swing, downstairs—with hand-swing, jogging—no hand-swing, and jogging—with hand-swing. Among these 10 different normal subjects under test, only the types of activities to perform for testing were instructed; no detailed constraints, such as numbers of body turns during the sleep, moving (swing) frequency of the arms, walking speed, etc., were asked to be followed.
Figure 2a shows a normal subject walking with hand-swing during the test, and
Figure 2b depicts the magnitude of acceleration recorded over an epoch period, 5 s, for the activity, and a sample calculation for the standard deviation of acceleration recorded within that period is shown as
Figure 2b.
Figure 2b shows that the 12 standard deviations,
, calculated in a one minute time interval, and by accumulating such 12
, a minute-wise activity index, AI, for the walking with hand-swing is obtained.
Among these 14 ADL tested, sleeping is considered as a typical rest/sleep level of activity; the activities sitting and watching TV, sitting and reading newspaper, and sitting and web browsing, which were all performed in sitting position, are sedentary level activities; housekeeping, driving, and walking without hand-swing are classified as light level of activities; walking with hand-swing and up and down stairs, with or without hand-swing, are all moderate levels of activities; finally, jogging with or without hand-swing are considered vigorous levels of activity.
2.3. Sleep Duration Detection
Figure 3 shows the 24-h AI pattern of a subject. These AIs were calculated minute-wise, and hence there are 1440 AI values within 24-h period of daily life. The 24-h period started from 12:00:00.000 on the day and end at 11:59:59.950 on the next day, so that the typical sleep duration during the night can be covered in a 24-h minute-wise AI pattern completely. From this pattern, it is very clear that around 14:07, the level of AI is very low, as the subject was taking a nap, and the duration between 23:13:00 to 05:52:00 of the next day is also low, as the subject was sleeping.
Although detecting sleep duration with accelerometer has been practiced for a long time, neither methods use the proposed AI for recognition nor results are precise and accurate enough so that they can be used for clinical applications. Sleep duration detection is of utmost importance in the diagnosis of diseases like insomnia, drowsiness, and other sleep-related disorders. A smart sleep duration detection algorithm has been developed and is introduced in more detail below. The algorithm is based on the AI models that have been proposed in previous section.
The flow chart of the sleep duration detection algorithm is shown in
Figure 4. The proposed algorithm consists of two phases. Phase I is to judge whether the subject in current time interval is in sleeping or awake state. In this phase, the proposed algorithm will thoroughly process all of the AIs corresponding to all basic time intervals. If the previous time interval is in awake state, the algorithm will judge if the subject falls asleep in the current time interval; otherwise, it will see if the subject wakes up during this time interval.
A subject is said to be in a fuzzy period when the subject just woke up within certain period of time within the sleep duration, and there are two different criteria to judge if the subject falls asleep in current time interval or not based on if the subject is in a fuzzy period. This reflects the fact that a subject will be most likely to fall asleep again when the awaking duration is not long enough. As a result, relaxed criteria (higher threshold value considered for current AI) could be used to judge if the subject falls into asleep or not when the subject is in a fuzzy state. Otherwise, stricter criteria (lower threshold value could be considered for current AI) is used to detect if the subject falls asleep. Besides the threshold value used, the criteria for a subject to fall asleep in current time interval requires the number of AIs, i.e., SLEEP_MIN, that is lower than the threshold value, SLEEP_TH, within the following certain time window 1 to be more than some pre-defined value, SLEEP_MINTH, and also that the AI of current time interval be lower than the threshold value.
Similarly, judging if the subject wakes up in current time interval requires meeting wake-up criteria. It is defined as the number of AIs, i.e., SLEEP_MIN, that are lower than the threshold value within the following certain time window 2 to be less than some pre-defined value, WAKEUP_MINTH, and for the AI of current time interval to be greater than the threshold value.
After all the AIs of the all basic time intervals have been processed thoroughly, all the sleeping periods are detected. Then, the algorithm goes into Phase II. Phase II is to merge any two adjacent sleeping periods into a single period if the duration is less than certain pre-defined time. This phase could eliminate the results of fragmented sleep durations detected in Phase I that falsely indicate bad sleep quality. Typically, people will consider they sleep for a whole period of time but often wake up during sleep instead of having fragmented sleep durations. Phase II considers this situation and, as a result, will have more matched and accurate sleep duration with the subject’s intuitive cognition.
As per the assessment of AI under rest/sleep level of activities in previous section, the AI is less than 0.1 within the 1-min time interval under rest/sleep status. Hence, AI value of 0.1 is used in the very beginning of the sleep duration detection algorithm to judge if that time interval is in AWAKE state or not.
2.4. Quantification of Regularity of ADL
In the IRB testing, a typical situation was that a single subject with un-regular living patterns in two consecutive days has been observed; this is shown in
Figure 5. Indeed, the subject went to the emergency room (ER) for urgent health situation on the next day. Apparently, as in top of
Figure 5, the subject’s sleep duration was between 21:21:01 on the day to 04:41:01 of the next day. However, according to the AI pattern of the next day, as in the bottom of
Figure 5, the subject went to bed around 04:00:01 in the morning and woke up at 07:21:01 with only very short sleep duration and also in extremely irregular time slot. This situation suggested that the subject’s life style on these two consecutive days was extremely irregular, which might result in his visiting ER the next day. This observation motivated the need for a quantification assessment of regularity of ADL.
As shown in
Figure 6a, there are 1440 data points of minute-wise AIs in a 24-h day, which raises significant complexities for further processing. Therefore, hour-based AI patterns were generated by taking the cumulative values of 60 min-wise AIs patterns into the total AI within an hour. As a result, hourly AI patterns of the day are generated, as shown in
Figure 6b. By finding the correlation coefficient between the hourly AI patterns of day
i−1 and day
i, as shown in
Figure 6c, the result can indicate the regularity of ADL of the day
i with respect to the previous day
i−1, namely, day-to-day Regularity Index (RI). Similarly, if the hourly AI patterns of day
i are compared with the patterns of the day one week before, i.e., day
i−7, then it is called week-to-week Regularity Index. Since the range of the correlation coefficient is in between −1 and +1, the result of +1 means the ADL pattern of day
i is the same as day
i−1. 0 stands for totally uncorrelated and −1 stands for totally inversely correlated. With the continuous monitoring of days for human’s ADL, the trend for the regularity of that subject’s living style can be plotted as in
Figure 6d.
3. Results
As described in
Section 2.2, 14 different types of daily physical activities (PAs) were performed by 10 normal subjects with GeneActiv devices worn on their wrists. Maximum and minimum values of AI for a specific PA have been identified; furthermore, the mean value of AI for that type of PA was calculated. As there were no detailed constraints, such as numbers of body turns during sleep, moving (swing) frequency of the arms, walking speed, etc., for any specific type of activity that were followed in the test, the range of maximum and minimum AIs for some types of activities were quite large. However, they can still be categorized into different levels of activity based upon their mean AI values; furthermore, the AI value falls between the specific maximum and minimum ranges, as shown in
Table 1. For instance, mean AI value less than 0.1 indicates that the subject under observation was sleeping or resting, similarly, mean AI value between 0.1 and 0.5 will be considered as subject was performing sedentary types of PAs. For light PAs, the mean AI falls between 0.5 and 2.0. Moderate PAs could be considered as having mean AI in the range of 2.0~4.0. Additionally, all PAs having mean AI greater than 4.0 could be considered as performing the vigorous activities. The level of activities that have been categorized are shown as the yellow line in
Figure 5, with rest/sleep leveled at 0 and vigorous activities leveled at 4 respectively.
With the same acceleration data, a 24-h minute-wise AI pattern starting from the noon of a day to the noon of next day were analyzed by the proposed smart sleep duration detection algorithm to detect the sleep duration with a precision up to 1 min. The red line in
Figure 3 shows the identified sleep states, and it represents ‘awake’ state by ‘0’ and ‘sleep’ state by ‘1’. As stated, through the phase II—sleep period merging, no more fragmented sleep periods were generated due to the bad sleep quality. The sleep quality can also be quantified by calculating the average minute-wised AI during the sleep duration. Larger value means there were more activities during the sleep, and hence it stands for bad sleep quality. Smaller values mean few activities occurred during the sleep, which indicates good sleep quality.
Regularity Index (RI) of ADL, which is the correlation coefficient between the hourly AI patterns of day
i−1 and day
i, effectively represents the regularity of PAs on hourly-basis on the day
i and is in the range of ±1.
Table 2 lists an example of one-week data for a subject, arranged from noon to noon of next day; hourly AIs are listed in different columns with respect to the dates. RI value of +1 means the ADL pattern of the day
i is the same as of day
i−1; 0 stands for totally uncorrelated, and −1 stands for inversely correlated.
4. Discussions and Conclusions
With the proposed analytical model representing the quantified PAs and different levels of PAs identified in this study, several parameters can be used to evaluate the status of subject with the activity-based information. As shown in
Table 3, besides the AI/min. (minute-wised activity index) and day-to-day RI introduced previously, a simple total summation of the AIs over the whole day, i.e., T_AI, can simply indicate the total amount of activities within the day performed by the subject. The SL_T and SL_Q representing the sleep hours and sleep quality can indicate the amount of time that the subject was asleep or in rest during the day and the quality of the sleep/rest, respectively. T_[level of activity] stands for the total number of hours that a subject can perform certain level of activities. For example, if the information of the duration that a subject performed activities above certain level (including the specific level) is required, then it can be calculated with T_[Level] + T_[Level+1] + … + T_[4]. The last parameters, A[x]_T_[level of activity], which are of interest, constitute the time duration that a subject performed certain level of activities within certain time window from when the subject was awoke. This may indicate the capability of that subject performing certain level activities within the time window from getting enough rest, i.e., period from when they awoke. For example, in some clinical applications, the capability (evaluated by the time duration) that people can perform activity levels greater than or equal to 3 (moderate level) within 3 h when they awake may be a strong indication representing their lung condition.
With these parameters or even by combining these, they could be strong indicators for many medical-care applications by analyzing either the changes of the long-term trends of these parameter or some machine learning algorithms. In this study, analytical models and methods were proposed to perform activity-based monitoring with accelerometer-based wearable devices. A new parameter, activity index (AI), has been introduced and used to categorize different PAs into 5 levels. Another new parameter, regularity index (RI), has been proposed to represent the degree of regularity of ADL. It provides a quantitative measurement of the regularity of living and can be used for many quantified risk assessments of certain diseases. The proposed models and calculations are simple enough to have them implemented into existing accelerometer-based wearable devices. Hence, they are extremely suitable for further applications combining cloud computing services and IoT-based online health monitoring platform, or for monitoring the health condition of a patient discharged from the hospital and predicting their next re-hospitalization by observing varying patterns in ADL.