Keywords

1 Introduction

It has been proven that an active lifestyle can lower the risk of several chronic diseases, such as cardiovascular disease, cancer, diabetes, hypertension, etc. [1]. Unfortunately, more than 85% of Americans did not achieve a healthy level of physical activity [2]. As a result, physical inactivity has become a significant risk factor for premature morbidity and mortality [3]. The consequence of physical inactivity can be even more serious for power wheelchair users due to their limited mobility [1,2,3,4]. Although a power wheelchair can provide independent mobility to its users, research has shown that wheelchair users are more likely to live an inactive lifestyle than people without disabilities [5]. Since basic mobility activities are fundamental for more complex behaviors and social integration, it is important to assess power wheelchair users’ mobility characteristics, which can provide insights about an individual’s quality of life and health status [6, 7].

To assess wheelchair users’ mobility, the current practice typically attaches inertial sensors (e.g., accelerometers or gyroscopes) to the wheels of a wheelchair to collect wheelchair maneuvering data [8,9,10]. The advantage of such sensor placement is that it eases data analysis. For example, a tri-axis accelerometer measures acceleration in three axes. If the accelerometer is attached to a wheel, the acceleration from the axis aligned with the direction of wheel rotations resembles a sinusoid curve over time, which can be utilized to calculate the number of wheel revolutions. However, mounting inertial sensors to the wheel is impractical in daily life because wheelchair users can hardly set up the sensor by themselves, not to mention regularly maintaining the sensor (e.g., charging the sensor or downloading sensor data).

To provide a practical and effective approach for measuring wheelchair users’ mobility, we propose to use a smartphone (particularly, its accelerometer) to effectuate wheelchair data collection. The challenge is that the collected accelerometer data does not have the sinusoid-like pattern because the smartphone will not be attached to the wheel of a wheelchair. Furthermore, the accelerometer is subject to both sensor and environmental noise, which may vary greatly from one place to another. As a result, sensor data demonstrates a wide variety of patterns, which are difficult for traditional methods to process.

To overcome the aforementioned challenges, we employed advanced mathematics and physics techniques to process and analyze data. Specifically, we process raw accelerometer data by calculating its derivatives, which are called jerks. Since jerk measures the change of accelerations, noise can be greatly reduced because noise tends to produce similar accelerations within a very short time period. Then, we propose to use a regression-based method to transform the un-patterned jerk data into a sinusoid-like curve. Although many regression methods (e.g., splines fitting, least square curve fitting, etc.) can be used, we selected the kernel regression method [11] because it only requires one parameter, i.e., bandwidth, which can be effectively tuned by using statistics methods.

Based on the kernel regression, we have developed a two-phase curve fitting algorithm to analyze jerk data. The goal of the first phase is to find the number of bouts (i.e., periods of continuous wheelchair movement), while the goal of the second phase is to determine the bout durations. The reason that we focus on bout and bout duration is that these are fundamental metrics for evaluating a wheelchair user’s mobility. Among the mobility metrics for wheelchair users, the mobility bout is useful in measuring activity and social participation because a bout denotes a transition between locations. Hence, the number of bouts can reveal activities performed at different locations [6]. Research has shown that the number of bouts as well as the accumulated wheelchair maneuvering time have small variations for a wheelchair user and thus provide a reliable measure for mobility [6, 8]. The proposed two-phase curve fitting algorithm will provide a new way to accurately analyze the number of bouts and the accumulated maneuvering time.

To evaluate the proposed approach, we have conducted a series of experiments in an indoor setting, which contains various terrains, such as slope, curving floor, and flat floor. Experimental results showed that our approach correctly recognized all the bouts and achieved accurate measurements on accumulated maneuvering time, which are fundamental for evaluating a wheelchair user’s mobility.

The rest of the paper is organized as follows. In Sect. 2, we present the proposed curve fitting approach. In Sect. 3, we show and discuss the experimental results. In Sect. 4, we conclude the paper and identify future research directions.

2 Method

In Sect. 2.1, we discuss how to collect and model wheelchair maneuvering data. In Sect. 2.2, we present how to reduce noise by transforming raw accelerometer data into jerk to facilitate data analysis. The obtained jerk data will be further processed by normalization and outlier removal. Based on the processed data, we develop a novel curve-fitting based algorithm to evaluate a wheelchair user’s mobility, including the number of bouts, bout durations, and accumulated maneuvering time, in Sect. 2.3. Then, in Sect. 2.4, we present the experimental design for evaluating the proposed approach.

2.1 Data Collection

During data collection, we equipped a wheelchair with a smartphone holder since it is inconvenient for a user to drive the power wheelchair while operating the smartphone. We developed an Android app to control the accelerometer in a smartphone to collect wheelchair maneuvering data. The sampling rate of the accelerometer was set to the predefined SENSOR_DELAY_UI (14–16 Hz), which would not consume significant battery energy while still maintaining sufficient data precision [9]. During a time period [t1, t2], the collected data is modeled as a sequence of accelerations:

$$ D_{R} = \left\{ {r_{1} ,r_{2} , \ldots ,r_{n} } \right\} $$
(1)

where \( r_{i} = \left\langle {\alpha_{i}^{x} ,\alpha_{i}^{y} ,\alpha_{i}^{z} ,t_{i} } \right\rangle \) (\( 1 \le i \le n \) and \( t_{1} \le t_{i} \le t_{2} \)) and \( \alpha_{i}^{x} ,\alpha_{i}^{y} ,\alpha_{i}^{z} \) are accelerations measured along three axes at time ti.

2.2 Data Processing

In [12], we proposed to use jerk to mitigate the impact of noise. In physics, jerk is defined as the derivative of acceleration, i.e., \( j(t) = d\alpha \left( t \right)/dt \), where \( \alpha \left( t \right) \) is an acceleration function. For example, Fig. 1 shows a segment of raw acceleration data along one axis of the smartphone (i.e., the blue curve on the top) as well as the corresponding jerk curve (i.e., the red curve at the bottom). The initial portions of the curves represent a stationary period when the wheelchair stays put, while the subsequent portions denote a moving period. The raw sensor data curve was elevated above the X axis by the inherent sensor noise as well as the environmental noise, which is largely caused by gravity. Particularly, since the smartphone is arbitrarily placed into the smartphone holder, the gravity decomposes along three axes of the smartphone. As a result, even though the wheelchair is stationary, the sensor still detects significant accelerations. In comparison, the corresponding jerk curve is more accurate in illustrating the actual movements of the wheelchair.

Fig. 1.
figure 1

Using jerk to reduce noise (Color figure online)

In general, the sequence of raw accelerometer data defined in (1) is transformed into the following jerk data set:

$$ D_{F} = \left\{ {\left. {f_{1} ,f_{2} , \ldots ,f_{n - 1} } \right|f_{i} = \sqrt {f_{ix}^{2} \text{ + }f_{iy}^{2} \text{ + }f_{ix}^{2} } \;\;{\text{and}}\;\; 1\le i \le n} \right\} $$
(2)

where \( f_{ix} = d\alpha_{i}^{x} /dt \approx \alpha_{i + 1}^{x} - \alpha_{i}^{x} \) (\( \alpha_{i}^{x} \) is defined in (1)) because two consecutive accelerations are collected in a very short period of time. Correspondingly, we have \( f_{iy} \approx \alpha_{i + 1}^{y} - \alpha_{i}^{y} \) and \( f_{iz} \approx \alpha_{i + 1}^{z} - \alpha_{i}^{z} \).

In addition, we apply the quartiles and the interquartile range (IQR) method [10] to remove outliers, whose values could be much larger than the true wheelchair maneuvering signals. Figure 2 shows an example in which the raw jerk data is normalized first, followed by outlier removal. After outliers are removed, the jerk data curve demonstrates clearer patterns that reveal wheelchair maneuvering status.

Fig. 2.
figure 2

Data processing with outliers removed

2.3 Data Analysis

Although the processed jerk data demonstrates clearer patterns, the large oscillations, as shown in Fig. 2, still make it difficult for data analysis. To obtain a smoother data curve, we propose to use a regression method to transform the un-patterned jerk data into a sinusoid-like curve. Although many regression methods can be used (e.g., splines fitting, least square curve fitting, etc.), we selected the kernel regression algorithm [11] because it only requires one parameter, i.e., bandwidth, to control the smoothness of the fitted curve. More importantly, bandwidth can be effectively tuned by using statistics methods.

Bandwidth Tuning.

When using kernel-based methods, the resulting fit can be significantly influenced by the choice of bandwidth. Using a smaller bandwidth can lead to results with increased variability since fewer observations are used for estimation. Selecting a larger bandwidth can decrease variance by using more information, but this often comes with a cost of increasing bias. Several approaches have been proposed in the literature to handle this issue for both kernel density estimation and kernel regression. Basic rule-of-thumb estimators, including the popular estimator from Silverman [13], are perhaps the most straightforward approaches. These estimators are relatively easy to compute and are optimal provided that strong distributional assumptions are met. Unfortunately, it is often unrealistic to assume that the underlining data distribution is known. A class of estimators referred to as “plug-in” estimators provide an alternative technique without needing the same strong distributional assumptions. These plug-in estimators select the bandwidth by plugging in estimates of unknown quantities that appear in expressions for the optimal bandwidth [14]. While the plug-in methods are more flexible than rule-of-thumb estimators, they still have potential drawbacks since a pilot bandwidth is required [15]. Cross-validation is another popular approach for bandwidth selection that is also used in many other statistical contexts to find optimal values for unknown parameters. Estimates are chosen by finding values that minimize the cross-validation error, which results in a very flexible, data-driven approach. In our approach, we perform bandwidth selection using cross-validation by searching a grid of potential values for the one that minimizes the error. This is an attractive method because it allows for reliable bandwidth selection for a wide range of datasets by automatically choosing a value from the data. Loader [16] provides a detailed discussion on the benefits of methods such as cross-validation over plug-in estimates for bandwidth selection.

Specifically, to accomplish bandwidth tuning, we create a grid of possible bandwidth values evenly spaced between 0 and 1 in an increment of 0.1. For each value in the grid, a kernel smoother is fit to the data and the generalized cross-validation (GCV) score is calculated. This GCV statistic is an estimate of the test error. Therefore, the value of the bandwidth that minimizes the GCV is then selected for the final model fitting. In general, this approach works well in practice, but there occasionally are situations where the chosen bandwidth might not produce a curve that is smooth enough. This can happen, for instance, when the cross-validation error curve does not have a prominent minimum value resulting in several bandwidth values that have almost identical cross-validation errors. This phenomenon is seen throughout many cross-validation applications and a “one-standard-error rule” has been proposed to overcome this [17]. This involves selecting a value of the parameter that is within one standard error of the value that achieves the minimum error. In this spirit, we can modify our bandwidth selection algorithm by choosing the next largest value in the grid when it is desirable to increase the smoothness of the fitted curve.

The Two-Phase Curve Fitting Algorithm.

After the kernel regression algorithm is applied to the processed jerk data, we obtain a smooth sinusoid-like curve as shown in Fig. 3 (i.e., the red curve). Every concave-down segment represents a continuous moving period (i.e., a bout), while each concave-up segment denotes a stationary period. Hence, the data analysis problem has been reduced to a problem of finding peaks and valleys in the curve. The number of peaks represents the number of bouts (segments of continuous movement). The boundary for each bout can be identified by finding the critical points (i.e., the start and end points) of a bout.

Fig. 3.
figure 3

Curve fitting (Color figure online)

Specifically, we have developed a two-phase curve fitting algorithm. In the first phase, we begin by fitting a kernel smoother to the jerk data. Model fitting is performed using the locfit package available in the R programming language [18]. The bandwidth is selected using cross-validation as described in the previous section by means of the gcv function. The locfit package has the ability to implement several different possible kernels, and we have elected to use the popular Epanechnikov kernel because it has compact support and has been shown to be preferred in many situations [16]. As a result, the kernel regression algorithm fits the data into a smooth curve as shown in Fig. 3. A smooth curve makes it easy to determine the peak location for each bout. This is important because the goal of the first phase is to find the number of bouts. We used the built-in function findPeaks provided by the quantmod package, which is also available in R [19], to determine the peak location for each bout. This package also provides the findValleys function that is used to find valleys.

The second phase of the proposed algorithm is to determine bout durations. This is equivalent to finding the critical points (i.e., the start and end points) of a bout. For example, Fig. 4-A shows a fitted curve that contains the peak points (marked in red), which are identified in the first phase, and critical points (marked in blue). To obtain the critical points, the second phase algorithm utilizes the following heuristic: A critical point can be heuristically determined by finding the point with the steepest slope from the fitted curve. The reason is that a critical point separates a static period from a moving one or vice versa, thus representing the most significant change in wheelchair maneuvers.

Fig. 4.
figure 4

Curve-fitting in the second phase (Color figure online)

To obtain the slopes, we derive another curve by calculating the derivatives (i.e., slopes) for the curve obtained in the first phase. Figure 4-B shows the resultant curve (i.e., the black curve), which represents slopes for the fitted curve in Fig. 4-A. Since the resultant curve is still ragged, we apply the kernel regression again to the ragged curve to make it smoother (i.e., the red curve in Fig. 4-B). Then, to determine the critical points is to find the peaks and valleys. Specifically, a peak represents the start point of a bout and the following valley represents the end point of the same bout. The reason is that the slopes are positive (i.e., going up) in the beginning of a bout while the slopes are negative (i.e., going down) by the end of the bout, as shown in Fig. 4-A.

2.4 Experimental Design

We evaluated the proposed approach in a multi-story building. This building was selected because it has various types of terrains, e.g., flat floor, curving floor, and slopes. Hence, we could evaluate whether the proposed approach could achieve accurate data analysis when the wheelchair was operating in different environmental settings. As discussed in Sect. 2.1, we equipped the power wheelchair (Invacare FDX) with a smartphone holder (Arkon Tab-802). An LG G2 (D800) smartphone was used to collect wheelchair maneuvering data.

Figure 5 shows the experimental setting in a bird’s eye view. The building consists of two halves (i.e., left and right), which are connected by bridges on the second and third floors. The experiments were conducted on the second floor for 6 trials. Each trial was composed of 10 bouts. There was a 5-s pause (i.e., the wheelchair stayed put) in between two consecutive bouts. Specifically, all trials started from point a in the right half of the building, the research participant would:

Fig. 5.
figure 5

Experimental setting.

  1. 1.

    Drive to the bridge

  2. 2.

    Turn left onto the bridge and continue to drive until it is halfway on the bridge

  3. 3.

    Drive to the left half of the building

  4. 4.

    Turn left (for even numbered trials) or right (for odd numbered trials), and then continue to drive until it is halfway to point b or c

  5. 5.

    Drive to point b or c depending on the even or odd numbered trial, and make a U turn

  6. 6.

    Drive back and stop when it is halfway toward the bridge

  7. 7.

    Continue to drive to the bridge

  8. 8.

    Turn left/right onto the bridge and continue to drive until it is halfway on the bridge

  9. 9.

    Drive to the right half of the building, and

  10. 10.

    Turn right and drive to point a.

In addition, we used a timer to record the duration of each bout as a baseline for the evaluation of the proposed algorithm.

3 Results

We found that the proposed curve fitting algorithm could correctly recognize all the bouts by finding the number of peaks (i.e., the outcome of the first phase of the proposed algorithm). Table 1 shows the experimental results on bout durations. The rows labeled with “Timer” were the baseline values recorded by the timer, while the rows labeled with “Calculated” were the results calculated by the proposed algorithm (i.e., the outcome of the second phase of the proposed algorithm). It can be seen that the average error on all the bouts is 19%, and the error for accumulated maneuvering time (i.e., the sum of all the bout durations) is 4%. To verify whether the calculated bout durations were correlated with the baseline values, we performed a chi-square test. The result showed the set of calculated bout durations fitted the set of baseline values (p = 0.58).

Table 1. Experimental results (unit: second)

3.1 Discussion

The ability to determine the bout duration is important for analyzing power wheelchair users’ mobility. For example, the mobility metric “maximum period of continuous movement” can be obtained by identifying the bout with the longest duration. The metric “accumulated maneuvering time” can be calculated by summing up all the bout durations. Based on the “accumulated maneuvering time” and the number of bouts, we can easily calculate the average maneuvering time.

The proposed two-phase algorithm achieved accurate analysis on the metrics of the number of bouts and accumulated maneuvering time, which can provide reliable assessment of a wheelchair user’s mobility [6, 8]. However, Table 1 shows that the bout durations calculated by the proposed approach have large variations. Since the calculated and baseline bout durations were correlated (p = 0.58), the positive and negative deviations of the calculated durations cancelled out, resulting in accurate estimation of the accumulated maneuvering time. The variations in bout durations suggest that an adaptive method will be desirable, which can determine the bandwidth according to the characteristics of the slope curve in the second phase of the proposed algorithm.

4 Conclusion and Future Direction

In this paper, we proposed a novel regression-based approach, which exploits the curve-fitting technique to transform an un-patterned jerk data sequence into a sinusoid-like curve. Although existing approaches can also generate similar data curves, they have to be implemented at the cost of placing dedicated sensors to the wheels of a wheelchair, which is not convenient in practice. In comparison, our approach allows wheelchair users to easily use a smartphone to measure their mobility activities. Further, we have developed a two-phase algorithm to recognize bouts and estimate bout durations from the transformed jerk data. Experimental results showed that the first phase of the proposed algorithm could accurately recognize all the bouts. Meanwhile, the second phase of the proposed algorithm achieved satisfactory accuracy on the accumulated movement time.

In the next step, we will investigate an adaptive method to facilitate the determination of the critical points, which are the boundary points for bouts. Particularly, we will use machine-learning techniques to capture the characteristics associated with critical points. Thus, the curve-fitting based approach will achieve more stable and accurate analysis on wheelchair users’ mobility.