1 Introduction

Microelectromechanical (MEMS) inertial sensors have long been used as an aiding component in the navigation and control applications and offered promising performance [2]. As the MEMS technology development, the application of miniature inertial sensors has been gradually explored in the field of biomechanics. Conventional camera-based motion tracking systems used in human mobility studies accurately measure position and orientation information in a small area but inevitably suffer from the range restriction, the complex laboratory setup, and the lack of long-term monitoring capability. In any case, the use of miniature MEMS inertial sensors has become very attractive in human mobility studies due to their low-cost, small-size features, and capability of sensing the motion without additional equipments [17, 20]. The orientation and position of any given body segment can be derived based on the measurements from a body-fixed inertial measurement unit (IMU), a combination of accelerometers and gyroscopes. Over the past decade, different algorithms using the inertial sensor data have been developed to detect gait events [8, 14], to recognize human activities [12], to estimate the spatio-temporal gait parameters of human gait, such as walking and running speed, stride length and stride frequency [1, 3, 9, 10, 15, 18, 23], and to estimate lower limb joint kinematics [4, 6]. However, a common issue of utilizing low-cost IMU is the cumulative calculation error resulting from sensor errors, such as the integration drift caused by acceleration measurement bias, and considerable effort has been devoted looking for ways to reduce such errors.

Two common methods to compensate the sensor errors in inertial sensor-based gait analysis systems are pre-test static/dynamic calibration and in-test compensation based on a specific sensor error model that describe the possible sensor error involved in the data collection and algorithm implementation. With pre-test calibration approach, a off-line static (stand still) or a dynamic (standardized movement) calibration process is carried out before each trial of an experiment to obtain the sensor error characteristics [7, 16, 22], which is then corrected in the calculation. An in-test sensor error compensation is implemented in the algorithm and the sensor errors are updated during a specific period of time, such as the zero-velocity duration of the foot in the mid-stance phase, so called zero-velocity update (ZUPT) [3, 19, 21], or the shank vertical event, when the shank segment is perpendicular to the floor [15]. However, no matter which compensation method is used and how accurately the sensor error is evaluated, the performance of the inertial sensor-based system strongly relies on the sensor error model, the description of the sensor error components in the system. For example, some studies made the assumption in their sensor error model that the acceleration measurement bias was constant in the global coordinate system [15, 21]. Although algorithms with this sensor error model achieved accurate estimation results for some gait parameters, such as walking speed, stride length, etc., it failed in estimating other gait parameters such as inclination of walking. Therefore, it is important to understand the effect of sensor error model on the gait parameter estimation performance.

This study compared three sensor error models (constant acceleration measurement biases in global coordinate system (CABGCS); constant acceleration measurement biases in sensor coordinate system(CABSCS); constant acceleration measurement biases in sensor coordinate system plus sensor misalignment (CABSCS plus SM)) in estimating walking speed and inclination using inertial sensors. Of the three models, CABGCS has been used in a shank-mounted IMU-based walking speed estimation algorithm, previously reported by Li et al. [15]. Two new sensor error compensation models (CABSCS and CABSCA plus SM) were developed in this paper for comparison. We hypothesized that both the CABSCS and CABSCA plus SM models could improve the walking speed estimation accuracy and that the CABSCA plus SM model could improve the inclination estimation accuracy.

2 Method

2.1 IMU-based walking speed estimation

The walking speed estimation method using shank-mounted IMU sensor was first proposed by Li et al. [15]. This method is based on the fact that human walking is a cyclic motion with distinct patterns in the inertial data that characterize shank kinematics and could be further used to determine spatio-temporal parameters including stride cycle, stride length, stride frequency, walking speed, etc. In particular, the shank angular velocity characteristics clearly define several important gait events, such as heel-strike, toe-off, shank vertical, etc. [1, 5, 11, 13]. The measured sensor accelerations, a n(t) in normal direction and a t(t) in tangential direction of the shank rotation, are first projected to the global coordinate system, a x (t) in horizontal direction and a y (t) in vertical direction:

$$ \left[ \begin{array}{l} a_{x}(t)\\ a_{y}(t) \end{array} \right] = \left[ \begin{array}{ll} \cos{\theta(t)} -\sin{\theta(t)}\\ \sin{\theta(t)} \,\cos{\theta(t)} \end{array} \right] \left[\begin{array}{l} a_{\rm t}(t)\\ a_{\rm n}(t) \end{array} \right] -\left[\begin{array}{l} 0\\ g\end{array} \right], $$
(1)

where g is the acceleration due to gravity. θ(t) is the sensor orientation angle, which is integrated from the measured shank angular velocity, ω(t) (Fig. 1).

Fig. 1
figure 1

Sensor configuration (sagittal view): An IMU is attached to the midway of the shank on the lateral side. The acceleration a n is measured along the normal direction, a t is measured along the tangential direction, and the angular velocity (ω(t)) is measured about the rotation of the shank in the sagittal plane. The arrows indicate positive axes for the corresponding sensor measurements. L is the sensor-to-ankle joint distance. To simplify the experiment procedure, the location of the lateral malleolus was used to approximate the ankle joint. θ is the shank angle with respect to the vertical direction. The world coordinate system is defined by the x and y axes

The accelerations in the global coordinate systems are then integrated to determine the instantaneous sensor velocity in each axis of the global coordinate system, v x (t) and v y (t). The average sensor velocities are the average of the instantaneous sensor velocities over the corresponding stride cycle, while the walking speed is the magnitude of the vector sum of the the averaged sensor velocities. Detailed description of the walking speed estimation method can be found in [15].

Two strategies have been implemented to reduce the speed estimation errors resulted from sensor measurement uncertainty. First, a walking sequence was segmented into a sequence of stride cycles. Specifically, in [15] the shank vertical event, when the longitudinal direction of the shank is vertical to the floor, was used to segment the walking sequence into stride cycles. Within each stride cycle, the walking speed was estimated in order to reduce drift errors caused by long-time integrations of sensor measurement biases. Second, acceleration measurement bias-induced integration drifts were further compensated in a given stride cycle by the aid of known reference velocities. Li et al. [15] assumed that the initial and the final sensor velocities are equal and both zero, which provided the reference boundary conditions for correcting integration drifts. The compensated sensor velocities, \(v_{x\_{\rm comp}}(t)\) and \(v_{y\_{\rm comp}}(t), \) are then used to calculate the average sensor velocities over one stride cycle

$$ \begin{aligned} \bar{v}_{x}=\frac{1}{T}\int_0^T{v_{x\_{\rm comp}}(\tau)\hbox{d} \tau},\\ \bar{v}_{y}=\frac{1}{T}\int_0^T{v_{y\_{\rm comp}}(\tau)\hbox{d} \tau}. \end{aligned} $$
(2)

Thus, the estimated walking speed, \(\bar{V}_{\rm estimated},\) and inclination in percentage of grade, \(\Upphi, \) can be calculated as

$$ \bar{V}_{\rm estimated}=\sqrt{\bar{v}_{x}^2+\bar{v}_{y}^2} $$
(3)
$$ \Upphi_{\rm estimated}=\frac{\bar{v}_{y}}{\bar{v}_{x}}100. $$
(4)

2.2 Sensor measurement error compensation

The goal of the compensation is to reduce the effect of the sensor measurement error on the estimated walking speed and achieve an accurate estimation. There are two main sources of sensor measurement error: (1) sensor uncertainty including accelerometer bias and gyroscope drift. and (2) uncertainty related to the procedure and algorithm such as initial sensor orientation: it is unavoidable that there is a discrepancy between the actual sensor orientation and the initial orientation used in the algorithm.

To achieve error compensation, it requires reference measurements which could be used to correct estimation error in the algorithm. There are two prerequisites for the reference measurement. First, it should be available for each stride cycle. Second, it should be relatively accurate and can be directly compared with results from integration of the sensor accelerations. For the shank-mounted IMU-based walking speed estimation algorithm [15], It used zero initial/final sensor velocities as reference measurements for correcting integration drifts. However, a follow-up evaluation experiment and analysis identified a systematic error associated with the zero-velocity assumption, which resulted in an underestimation of walking speed [23]. This is due to the facts that initial and final velocities are not exactly zero. One remedy to achieve accurate reference is to use the shank angular velocity measurements, ω(t), to calculate initial/final velocities. During the mid-stance shank vertical events (i.e. the beginning and the end of the stride cycle), the shank rotates around the ankle joint as an inverted pendulum. Therefore, the sensor velocities can be accurately estimated as the product of angular velocities and rotation radius

$$ \begin{aligned} v_{x\_{\rm ref}}(t)&=\omega(t)\cdot L\\ v_{y\_{\rm ref}}(t)&=0, \end{aligned}\quad t=0,T $$
(5)

where \(v_{x\_{\rm ref}}(t)\) and \(v_{y\_{\rm ref}}(t)\) are the initial (when t = 0) and final (when t = T) sensor horizontal and vertical velocities in the global coordinate system, respectively, and T is the period of the corresponding stride cycle. L is the distance from the sensor to the ankle joint (Fig. 1).

As the reference measurements (sensor instantaneous velocities) are only available at limited time instants (e.g. the beginning and the end of a stride cycle), it is not possible to compare the estimated instantaneous velocities from acceleration integration with the reference velocities continuously. Instead, a sensor error model needs to be developed to account for the sensor measurement error compensation in the middle of a stride cycle when the reference is not available. Even though the end velocities are the same, the compensated sensor instantaneous velocities in the middle of a stride cycle are determined by the sensor measurement error compensation model (Fig. 2). As the stride-by-stride velocities are calculated as the average of the compensated sensor instantaneous velocities over one stride cycle (Eq. 2), the difference between the instantaneous velocity paths in the middle of a stride will have an impact on the estimated speed and inclination.

Fig. 2
figure 2

Instantaneous sensor velocities for different sensor error models over one stride cycle. The solid curve is the sensor velocity calculated by direct sensor acceleration integration without any sensor error compensation starting from the reference initial sensor velocities \((v_{x\_{\rm ref}}(0)\) and \(v_{y\_{\rm ref}}(0)\)), which ends up with the final sensor velocities \((v_{x\_{\rm int}}(T)\) and \(v_{y\_{\rm int}}(T)\)), which are different from the reference final sensor velocities \((v_{x\_{\rm ref}}(T)\) and \(v_{y\_{\rm ref}}(T)\)). The dashed, dotted, and dash-dotted curves represent three different sensor error compensation methods (CABGCS, CABSCS and CABSCS plus SM). All methods attain the final reference sensor velocities but with different instantaneous velocities in the middle of the stride cycle

To determine the effects of sensor measurement error compensation model on the estimated speed and inclination, three models are evaluated in this study:

  • CABGCS constant acceleration measurement biases in global coordinate system;

  • CABSCS constant acceleration measurement biases in sensor coordinate system;

  • CABSCS plus SM constant acceleration measurement biases in sensor coordinate system plus sensor misalignment.

2.2.1 CABGCS

CABGCS has been used in the previous studies [15, 23] and achieved reasonable accuracy in estimating walking speeds, but unsatisfactory inclination estimation. This sensor error model assumes a constant acceleration measurement bias in each axis of the global coordinate system, \(a_{x\_{\rm bias}}\) and \(a_{y\_{\rm bias}}, \) such that the compensated sensor acceleration in global coordinate system can be expressed as the original sensor acceleration (Eq. 1) with added biases

$$ \left[ \begin{array}{l} a_{x}(t)\\ a_{y}(t) \end{array} \right] = \left[ \begin{array}{ll} \cos{\theta(t)} -\sin{\theta(t)}\\ \sin{\theta(t)} \,\cos{\theta(t)} \end{array} \right] \left[\begin{array}{l} a_{\rm t}(t)\\ a_{\rm n}(t) \end{array} \right] - \left[\begin{array}{l} a_{x\_{\rm bias}}\\ a_{y\_{\rm bias}} \end{array} \right] - \left[ \begin{array}{l} 0\\ g \end{array} \right]. $$
(6)

The constant biases, \(a_{x\_{\rm bias}}\) and \(a_{y\_{\rm bias}},\) in the sensor measurement model could be determined using the reference end velocities,\(v_{x\_{\rm ref}}(T)\) and \(v_{y\_{\rm ref}}(T),\) obtained from Eq. (5). The biases should be selected such that the velocities, integrating Eq. (6) from time 0 to T reach the reference end velocities

$$ \left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{y\_{\rm ref}}(T) \end{array}\right] = \int\limits_0^T{\left(\left[\begin{array}{ll} \cos{\theta(\tau)} -\sin{\theta(\tau)}\\ \sin{\theta(\tau)} \,\cos{\theta(\tau)} \end{array}\right] \left[\begin{array} {l} a_{\rm t}(\tau)\\ a_{\rm n}(\tau) \end{array} \right] - \left[ \begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau} + \left[ \begin{array}{l} v_{x\_{\rm ref}}(0)\\ v_{y\_{\rm ref}}(0) \end{array} \right] - \left[ \begin{array}{l} \hat{a}_{x\_{\rm bias}}\\ \hat{a}_{y\_{\rm bias}} \end{array} \right]T, $$
(7)

where \(v_{x\_{\rm ref}}(0)\) and \(v_{y\_{\rm ref}}(0)\) are the initial velocities determined using Eq. (5), and \(\hat{a}_{x\_{\rm bias}}\) and \(\hat{a}_{y\_{\rm bias}}\) are the estimated sensor acceleration measurement biases in the global coordinate system. To simplify the expression, the sensor velocities calculated from direct integration without considering the acceleration measurement biases, \(v_{x\_{\rm int}}(t)\) and \(v_{y\_{\rm int}}(t), \) are defined as

$$ \left[ \begin{array}{l} v_{x\_{\rm int}}(t)\\ v_{y\_{\rm int}}(t) \end{array}\right] = \int\limits_0^t{\left(\left[\begin{array}{ll} \cos{\theta(\tau)} -\sin{\theta(\tau)}\\ \sin{\theta(\tau)} \,\cos{\theta(\tau)} \end{array}\right] \left[ \begin{array}{l} a_{\rm t}(\tau)\\ a_{\rm n}(\tau) \end{array} \right] -\left[ \begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau} + \left[ \begin{array}{l} v_{x\_{\rm ref}}(0)\\ v_{y\_{\rm ref}}(0) \end{array}\right] $$
(8)

Combining Eqs. (7) and (8),

$$ \left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{y\_{\rm ref}}(T) \end{array}\right] = \left[ \begin{array}{l} v_{x\_{\rm int}}(T)\\ v_{y\_{\rm int}}(T) \end{array}\right] - \left[ \begin{array}{l} \hat{a}_{x\_{\rm bias}}\\ \hat{a}_{y\_{\rm bias}} \end{array} \right]T . $$
(9)

Thus, the constant biases are calculated as

$$ \left[ \begin{array}{l} \hat{a}_{x\_{\rm bias}}\\ \hat{a}_{y\_{\rm bias}} \end{array} \right] = \frac{1}{T} \left(\left[\begin{array}{l} v_{x\_{\rm int}}(T)\\ v_{y\_{\rm int}}(T) \end{array}\right] - \left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{y\_{\rm ref}}(T) \end{array}\right]\right) . $$
(10)

Upon the determination of biases, the effect of the biases are compensated by subtracting the velocity integration drift from the instantaneous sensor velocities over the corresponding stride cycle,

$$ \left[ \begin{array}{l} v_{x\_{\rm comp}}(t)\\ v_{y\_{\rm comp}}(t) \end{array}\right] = \int\limits_0^t{\left(\left[\begin{array}{ll} \cos{\theta(\tau)} -\sin{\theta(\tau)}\\ \sin{\theta(\tau)} \,\cos{\theta(\tau)} \end{array}\right] \left[\begin{array}{l} a_{\rm t}(\tau)\\ a_{\rm n}(\tau) \end{array} \right] -\left[ \begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau} + \left[ \begin{array}{l} v_{x\_{\rm ref}}(0)\\ v_{y\_{\rm ref}}(0) \end{array} \right] - \left[ \begin{array}{l} \hat{a}_{x\_{\rm bias}}\\ \hat{a}_{y\_{\rm bias}} \end{array} \right]t .$$
(11)

The implementation of this compensation algorithm benefits from its simplicity and has been reported in inertial sensor-based gait analysis studies [15, 21].

2.2.2 CABSCS

Although CABGCS significantly improved the performance in estimating walking speeds, we mush realize that accelerometer biases are physically with respect to the measurement axes of the accelerometer, a n and a t, but not the global coordinate axes, a x and a y .

Therefore, it makes better sense to develop a sensor error model that considers the accelerometer biases in the measurement axes, \(a_{t\_{\rm bias}}\) and \(a_{n\_{\rm bias}}.\) The new sensor error model, CABSCS, is developed as

$$ \left[ \begin{array}{l} a_{x}(t)\\ a_{y}(t) \end{array} \right] = \left[ \begin{array}{ll} \cos{\theta(t)} -\sin{\theta(t)}\\ \sin{\theta(t)} \,\cos{\theta(t)} \end{array} \right] \left[\begin{array}{l} a_{\rm t}(t)-a_{t\_{\rm bias}}\\ a_{\rm n}(t)-a_{n\_{\rm bias}} \end{array} \right] - \left[ \begin{array}{l} 0\\ g \end{array}\right]. $$
(12)

The acceleration measurement biases in global coordinate system can then be isolated and written as functions of time, t

$$ \left[ \begin{array}{l} a_{x}(t)\\ a_{y}(t) \end{array} \right] = \left[ \begin{array}{ll} \cos{\theta(t)} -\sin{\theta(t)}\\ \sin{\theta(t)} \,\cos{\theta(t)} \end{array} \right] \left[ \begin{array}{l} a_{\rm t}(t)\\ a_{\rm n}(t) \end{array} \right] - \left[ \begin{array}{l} a_{x\_{\rm bias}}(t)\\ a_{y\_{\rm bias}}(t) \end{array} \right] - \left[ \begin{array}{l} 0\\ g \end{array} \right], $$
(13)

where

$$ \left[ \begin{array}{l} a_{x\_{\rm bias}}(t)\\ a_{y\_{\rm bias}}(t) \end{array}\right] = \left[ \begin{array}{ll} \cos{\theta (t)} -\sin{\theta(t)}\\ \sin{\theta (t)} \,\cos{\theta (t)} \end{array} \right] \left[ \begin{array}{l} a_{t\_{\rm bias}}\\ a_{n\_{\rm bias}} \end{array}\right]. $$
(14)

Thus, at the end of the stride cycle when t = T

$$\left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{y\_{\rm ref}}(T) \end{array}\right] = \int\limits_0^T{\left(\left[\begin{array}{ll} \cos{\theta(\tau)} -\sin{\theta(\tau)}\\ \sin{\theta(\tau)} \,\cos{\theta(\tau)} \end{array}\right] \left[\begin{array}{l} a_{\rm t}(\tau)\\ a_{\rm n}(\tau) \end{array} \right] -\left[ \begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau} +\left[ \begin{array}{l} v_{x\_{\rm ref}}(0)\\ v_{y\_{\rm ref}}(0) \end{array} \right] - \int\limits_0^T{\left(\left[ \begin{array}{l} \hat{a}_{x\_{\rm bias}}(\tau)\\ \hat{a}_{y\_{\rm bias}}(\tau) \end{array} \right]\right)\hbox{d} \tau}, $$
(15)

where \(\hat{a}_{x\_{\rm bias}}\) and \(\hat{a}_{y\_{\rm bias}}\) are the estimated sensor accelerometer biases projected in the global coordinate system. Similar to Eqs. (6)–(10), the differences between the reference velocities and the velocities through integration can be expressed as

$$ \begin{aligned}\left[\begin{array}{l} v_{x\_{\rm ref}}(T)-v_{x\_{\rm int}}(T)\\ v_{y\_{\rm ref}}(T)-v_{y\_{\rm int}}(T) \end{array}\right] & = \left[\begin{array}{l} \int\limits_0^T{\hat{a}_{x\_{\rm bias}}(\tau)\hbox{d} \tau}\\ \int\limits_0^T{\hat{a}_{y\_{\rm bias}}(\tau)\hbox{d} \tau} \end{array}\right]\\ & = \left[\begin{array}{ll} \int\limits_0^T{cos(\tau)\hbox{d} \tau} -\int\limits_0^T{sin(\tau)\hbox{d} \tau}\\ \int\limits_0^T{sin(\tau)\hbox{d} \tau} \, \int\limits_0^T{cos(\tau)\hbox{d} \tau} \end{array}\right] \left[\begin{array}{l} \hat{a}_{t\_{\rm bias}}\\ \hat{a}_{n\_{\rm bias}} \end{array}\right]\end{aligned}, $$
(16)

where \(v_{x\_{\rm ref}}(T), v_{y\_{\rm ref}}(T), v_{x\_{\rm int}}(T)\) and \(v_{y\_{\rm int}}(T)\) are, respectively, calculated using Eq. (5) and (8), and \(\hat{a}_{t\_{\rm bias}}\) and \(\hat{a}_{n\_{\rm bias}}\) are the estimated sensor acceleration measurement biases in the sensor coordinate system.

Thus, the constant acceleration measurement biases can be calculated by solving Eq. (15),

$$ \left[ \begin{array}{l} \hat{a}_{t\_{\rm bias}}\\ \hat{a}_{n\_{\rm bias}} \end{array} \right] = \left[\begin{array}{ll} \int\limits_0^T{\cos(\tau)d \tau} -\int\limits_0^T{\sin(\tau)\hbox{d} \tau}\\ \int\limits_0^T{\sin(\tau)\hbox{d} \tau} \, \int\limits_0^T{\cos(\tau)\hbox{d} \tau} \end{array}\right]^{-1} \left[\begin{array}{l} v_{x\_{\rm ref}}(T)-v_{x\_{\rm int}}(T)\\ v_{y\_{\rm ref}}(T)-v_{y\_{\rm int}}(T) \end{array}\right] $$
(17)

Therefore, similar to Eq. (11), the compensated instantaneous sensor velocities over the corresponding stride cycle are calculated as

$$\left[ \begin{array}{l} v_{x\_{\rm comp}}(t)\\ v_{y\_{\rm comp}}(t) \end{array}\right] = \int\limits_0^t\left({\left[ \begin{array}{ll} \cos{\theta(\tau)} -\sin{\theta(\tau)}\\ \sin{\theta(\tau)} \, \cos{\theta(\tau)} \end{array} \right] \left[ \begin{array}{l} a_{\rm t}(\tau)-\hat{a}_{t\_{\rm bias}}\\ a_{\rm n}(\tau)-\hat{a}_{n\_{\rm bias}} \end{array} \right] - \left[\begin{array}{l} 0\\ g \end{array} \right]}\right)\hbox{d} \tau $$
(18)

2.2.3 CABSCS plus SM

Both the CABGCS and CABSCS are developed based on the assumption that the sensor is perfectly aligned with the global coordinate system at the shank vertical event with no error, i.e. θ(0) = 0; however, the exact orientation of the sensor, θ(0), at the beginning of a stride cycle, most likely does not equal to zero. To account for the measurement error in the sensor orientation angle, we developed the sensor measurement model CABSCS plus SM. In the new sensor error model, we introduce a constant bias to the measured sensor orientation angle, θ(0) = θ0, which describes the sensor misalignment at the shank vertical event. In the mean time, we preserve the fact that sensor acceleration measurement biases are in sensor coordinate system (CABSCS). With the initial sensor misalignment angle, θ0, the CABSCS plus SM is given by

$$ \left[\begin{array}{l} a_{x}(t)\\ a_{y}(t) \end{array} \right] = \left[\begin{array}{ll} \cos{\theta_0} -\sin{\theta_0}\\ \sin{\theta_0} \, \cos{\theta_0} \end{array} \right] \left[\begin{array}{ll} \cos{\theta(t)} & -\sin{\theta(t)}\\ \sin{\theta(t)} & \cos{\theta(t)} \end{array} \right] \left[\begin{array}{l} a_{\rm t}(t)-a_{t\_{\rm bias}}\\ a_{\rm n}(t)-a_{n\_{\rm bias}} \end{array} \right] - \left[ \begin{array}{l} 0\\ g \end{array} \right] $$
(19)

In this sensor error model, there are three constants, \(a_{t\_{\rm bias}}, a_{n\_{\rm bias}}\) and \(\theta_0,\) need to be determined using the end reference velocity measurements. Because we only have two equations with two reference end velocity measurements, we could only determine two of the three constants. As the two acceleration measurement biases are small and close to each other, we make a reasonable assumption as \(a_{t\_{\rm bias}}=a_{n\_{\rm bias}}=a_{\rm bias}\) to reduce the number of unknowns to two as the accelerometer bias and the sensor misalignment angle, a bias and θ0. Integrating Eq. (19), and comparing with the reference end velocities,

$$ \left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{x\_{\rm ref}}(T) \end{array} \right] = \int\limits_0^T{\left( \left[ \begin{array}{ll} \cos{\hat{\theta_0}} -\sin{\hat{\theta_0}}\\ \sin{\hat{\theta_0}} \, \cos{\hat{\theta_0}} \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right]\left[ \begin{array}{l} a_{\rm t}(\tau) -\hat{a}_{\rm bias}\\ a_{\rm n}(\tau)-\hat{a}_{\rm bias} \end{array} \right] - \left[\begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau} $$
(20)

where \(v_{x\_{\rm ref}}(T), v_{y\_{\rm ref}}(T)\) are calculated using Eq. (5), and \(\hat{\theta_0}\) and \(\hat{a}_{\rm bias}\) are the estimated sensor misalignment angle and sensor accelerometer measurement bias. To solve Eq. (20), two methods, analytical and numerical, have been developed.

Analytical solution In order to simplify and analytically solve the non-linear equation, the small-angle approximation was utilized based on the assumption that the sensor misalignment angle is very small (<5°), such that Eq. (20) can be re-written as

$$ \left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{x\_{\rm ref}}(T) \end{array} \right] = \int\limits_0^T{\left( \left[ \begin{array}{ll} 1 -\hat{\theta_0}\\ \hat{\theta_0} \, 1 \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right] \left[ \begin{array}{l} a_{\rm t}(\tau)-\hat{a}_{\rm bias}\\ a_{\rm n}(\tau)-\hat{a}_{\rm bias} \end{array} \right] - \left[ \begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau} $$
(21)

Isolating the acceleration measurement bias and rearrange the equation, we get

$$ \begin{array}{ll} \left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{x\_{\rm ref}}(T) \end{array} \right] & = \int\limits_0^T{\left( \left[ \begin{array}{ll} 1 & -\hat{\theta_0}\\ \hat{\theta_0} & 1 \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right] \left[\begin{array}{l} a_{\rm t}(\tau)\\ a_{\rm n}(\tau) \end{array} \right] - \left[\begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau}\\ & \quad-\int\limits_0^T{\left( \left[ \begin{array}{ll} 1 & -\hat{\theta_0}\\ \hat{\theta_0} & 1 \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right] \left[ \begin{array}{l} \hat{a}_{\rm bias}\\ \hat{a}_{\rm bias} \end{array} \right]\right)\hbox{d} \tau} \end{array} $$
(22)

Further, we decompose the approximated misalignment angle transformation matrix into an identity matrix and an anti-diagonal matrix about \(\hat{\theta_0},\)

$$\begin{aligned} \left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{x\_{\rm ref}}(T) \end{array} \right] &= \int\limits_0^T{\left( \left[\begin{array}{ll} 1 & 0\\ 0 & 1 \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right] \left[ \begin{array}{l} a_{\rm t}(\tau)\\ a_{\rm n}(\tau) \end{array} \right] - \left[ \begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau}\\ & \quad+ \int\limits_0^T{\left( \left[\begin{array}{ll} 0 & -\hat{\theta_0}\\ \hat{\theta_0} & 0 \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right] \left[ \begin{array}{l}a_{\rm t}(\tau)\\ a_{\rm n}(\tau) \end{array} \right] \right)\hbox{d} \tau}\\ &\quad -\int\limits_0^T{\left( \left[ \begin{array}{ll} 1 & 0\\ 0 & 1 \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right] \left[ \begin{array}{l}\hat{a}_{\rm bias}\\ \hat{a}_{\rm bias} \end{array} \right]\right)\hbox{d} \tau}\\ & \quad- \int\limits_0^T{\left( \left[ \begin{array}{ll} 0 & -\hat{\theta_0}\\ \hat{\theta_0} & 0 \end{array} \right] \left[\begin{array}{ll}\cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right]\left[ \begin{array}{l} \hat{a}_{\rm bias}\\ \hat{a}_{\rm bias} \end{array}\right]\right)\hbox{d} \tau}\end{aligned} $$
(23)

Note that the first term of Eq. (23) is the same as the right side of Eq. (8), while the last term can be rewritten as

$$ \begin{array}{ll} \int\limits_0^T{\left( \left[\begin{array}{l} \sin(\tau)+\cos(\tau)\\ \cos(\tau)-\sin(\tau) \end{array}\right]\right)\hbox{d} \tau}\cdot\hat{\theta_0}\cdot\hat{a}_{\rm bias}, \end{array} $$
(24)

which can be omitted since the magnitude of \(\hat{\theta_0}\) and \(\hat{a}_{\rm bias}\) is very small and the product of them is negligible. Thus, Eq. (23) is simplified to

$$ \begin{aligned} \left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{x\_{\rm ref}}(T) \end{array} \right] &= \left[ \begin{array}{l}v_{x\_{\rm int}}(T)\\ v_{y\_{\rm int}}(T) \end{array} \right]\\ &\quad + \int\limits_0^T{\left( \left[ \begin{array}{ll} 0 & -\hat{\theta_0}\\ \hat{\theta_0} & 0 \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right] \left[ \begin{array}{l} a_{\rm t}(\tau)\\ a_{\rm n}(\tau) \end{array} \right] \right)\hbox{d} \tau}\\ & \quad- \int\limits_0^T{\left( \left[\begin{array}{ll} 1 & 0\\ 0 & 1 \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right] \left[ \begin{array}{l}\hat{a}_{\rm bias}\\ \hat{a}_{\rm bias} \end{array} \right]\right)\hbox{d} \tau} \end{aligned} .$$
(25)

We rearranged the equation such that \(\hat{\theta_0}\) and \(\hat{a}_{\rm bias}\) are isolated,

$$ \begin{aligned} \left[ \begin{array}{l} v_{x\_{\rm ref}}(T) -v_{x\_{\rm int}}(T)\\ v_{x\_{\rm ref}}(T) - v_{y\_{\rm int}}(T) \end{array} \right] & = \int\limits_0^T{\left( \left[\begin{array}{l} -a_t(\tau)\sin(\tau)-a_n(\tau)\cos(\tau)\\ a_t(\tau)\cos(\tau)-a_n(\tau)\sin(\tau) \end{array}\right]\right)d \tau}\cdot\hat{\theta_0}\\ & \quad- \int\limits_0^T{\left(\left[\begin{array}{l} \cos(\tau)-\sin(\tau)\\ \sin(\tau)+\cos(\tau) \end{array}\right]\right)\hbox{d} \tau}\cdot\hat{a}_{\rm bias}\\ & = \left[\begin{array}{ll} \int\limits_0^T{(-a_t(\tau)\sin(\tau)-a_n(\tau)\cos(\tau))}\hbox{d} \tau & \int\limits_0^T{(\cos(\tau)-\sin(\tau))}\hbox{d} \tau\\ \int\limits_0^T{(a_t(\tau)\cos(\tau)-a_n(\tau)\sin(\tau))}\hbox{d} \tau & \int\limits_0^T{(\sin(\tau)+\cos(\tau))}\hbox{d} \tau \end{array}\right] \left[\begin{array}{l} \hat{\theta_0} \\ \hat{a}_{\rm bias} \end{array}\right] \end{aligned} .$$
(26)

Thus, we solved \(\hat{\theta_0}\) and \(\hat{a}_{\rm bias}\) as

$$ \left[\begin{array}{l} \hat{\theta_0} \\ \hat{a}_{\rm bias} \end{array}\right] = \left[\begin{array}{ll} \int\limits_0^T{(-a_t(\tau)\sin(\tau)-a_n(\tau)\cos(\tau))}\hbox{d} \tau & \int\limits_0^T{(\cos(\tau)-\sin(\tau))}\hbox{d} \tau\\ \int\limits_0^T{(a_t(\tau)\cos(\tau)-a_n(\tau)\sin(\tau))}\hbox{d} \tau & \int\limits_0^T{(\sin(\tau)+\cos(\tau))}\hbox{d} \tau \end{array}\right]^{-1} \left[ \begin{array}{l} v_{x\_{\rm ref}}(T) - v_{x\_{\rm int}}(T)\\ v_{x\_{\rm ref}}(T) - v_{y\_{\rm int}}(T) \end{array} \right] $$
(27)

Numerical solution Instead of determine the constants in the nonlinear equation of Eq. (20) analytically based on first-order approximation, we solve the constants numerically using MATLAB optimization routine FMINUNC. We first rearrange Eq. (20) and form two functions (f x and f y ) with respect to \(\hat{\theta_0}\) and \(\hat{a}_{\rm bias}: \)

$$ \left[ \begin{array}{l} f_x(\hat{\theta_0}, \hat{a}_{\rm bias})\\ f_y(\hat{\theta_0}, \hat{a}_{\rm bias})\end{array} \right] = \left[ \begin{array}{l} v_{x\_{\rm ref}}(T)\\ v_{x\_{\rm ref}}(T) \end{array} \right] - \int\limits_0^T{\left( \left[ \begin{array}{ll} \cos{\hat{\theta_0}} -\sin{\hat{\theta_0}}\\ \sin{\hat{\theta_0}} \, \cos{\hat{\theta_0}} \end{array} \right] \left[\begin{array}{ll} \cos(\tau) & -\sin(\tau)\\ \sin(\tau) & \cos(\tau) \end{array}\right] \left[ \begin{array}{l} a_{\rm t}(\tau)-\hat{a}_{\rm bias}\\ a_{\rm n}(\tau)-\hat{a}_{\rm bias} \end{array} \right] + \left[ \begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau} $$
(28)

Ideally, f x and f y should be zero when the exact value of θ0 and a bias is found. We use another function f err as the criteria for the MATLAB optimization routine,

$$ f_{\rm err}(\hat{\theta_0}, \hat{a}_{\rm bias})=f^2_x(\hat{\theta_0}, \hat{a}_{\rm bias})+f^2_y(\hat{\theta_0}, \hat{a}_{\rm bias}). $$
(29)

To start the optimization routine, an initial value is provided for the unknown misalignment angle (\(\hat{\theta_0}\)) and sensor acceleration measurement bias (\(\hat{a}_{\rm bias}\)), and then FMINUNC searches for the best value of \(\hat{\theta_0}\) and \(\hat{a}_{\rm bias}\) such that f err is minimized. The resulting \(\hat{\theta_0}\) and \(\hat{a}_{\rm bias}\) are the numerical solution for Eq. (20).

Upon the determination of \(\hat{\theta_0}\) and \(\hat{a}_{\rm bias},\) the compensated instantaneous sensor velocities in the stride cycle are simply calculated by plugging \(\hat{\theta_0}\) and \(\hat{a}_{\rm bias}\) back to Eq. (19) and integrating both sides,

$$ \left[ \begin{array}{l} v_{x\_{\rm comp}}(t)\\ v_{y\_{\rm comp}}(t) \end{array}\right] = \int\limits_0^T{\left( \left[ \begin{array}{ll} \cos{\hat{\theta_0}} -\sin{\hat{\theta_0}}\\ \sin{\hat{\theta_0}} \, \cos{\hat{\theta_0}} \end{array} \right] \left[\begin{array}{ll} \cos{\theta(\tau)} & -\sin{\theta(\tau)}\\ \sin{\theta(\tau)} & \cos{\theta(\tau)} \end{array}\right] \left[ \begin{array}{l} a_{\rm t}(\tau)-\hat{a}_{\rm bias}\\ a_{\rm n}(\tau)-\hat{a}_{\rm bias} \end{array} \right] - \left[\begin{array}{l} 0\\ g \end{array} \right] \right)\hbox{d} \tau} . $$
(30)

With the compensated instantaneous sensor velocities, \(v_{x\_{\rm comp}}(t)\) and \( v_{y\_{\rm comp}}(t),\) from each sensor error model, the stride-by-stride walking speed and inclination are calculated according to Eqs. (3) and (5).

2.3 Experimental method

An IMU sensor was attached to the midway of the right shank on the lateral side. The IMU sensor (Xsens Technology B.V., Netherlands) consists of a triaxial accelerometer (± 18 g, where g is the gravitational acceleration) and a triaxial gyroscope (± 1200°/s). Since we are only interested in the shank movement in the progression plane (sagittal plane), only the measurements from two accelerometer axes and one gyroscope axis were used in the calculation. The acceleration and angular velocity data were collected at 120 Hz with MVN Studio (Xsens Technology B.V., Netherlands). The raw sensor measurements were filtered using a second-order Butterworth low-pass filter with cut-off frequency of 3 Hz. The section of the cut-off frequency of 3 Hz is based on the tread-off between obtaining a smooth angular velocity profile for reliable stride cycle segmentation and retaining acceleration measurements for accurate gait speed integration. The sensor-to-ankle distance (L) was measured and recorded for the off-line algorithm implementation. Before each walking trial, the subject was asked to stand still with the shank in vertical direction and the IMU was adjusted such that the readings from its normal and tangential axes were 1g and 0g, respectively. At this orientation the sensor’s normal and tangential axes were aligned as closely as possible to vertical and horizontal directions of the world coordinate system, respectively (Fig. 1).

Two sets of experiments have been conducted to evaluate the performance of the three sensor error models in estimating walking speeds and slopes. The first experiment aims at the walking speed estimation performance comparison. Ten healthy subjects without any history of orthopedic impairments were recruited from the university community, including five males and five females (age: 21.0 ± 0.5 years; height: 172.9 ± 10.0 cm; weight: 68.9 ± 12.4 kg; sensor-to-ankle distance: 27.6 ± 3.2 cm). The subjects were asked to walk on a treadmill (NordicTrack Comfort Stride,  ICON Health & Fitness, Logan, UT, USA) at five different preset treadmill speeds (0.8, 1.0, 1.2, 1.4 and 1.6 m/s) with 0 % inclination. The second experiment aims at evaluating the performance in estimating inclination of walking. Four healthy subjects without any history of orthopedic impairments were recruited, including three males and one female (age: 22.5 ± 3.3 years; height: 178.4 ± 13.5 cm; weight: 72.4 ± 16.6 kg; sensor-to-ankle distance: 30.9 ± 2.9 cm). The subjects were instructed to walk at three different preset treadmill inclines (0, 5 and 10 %) with 1.0 m/s treadmill speed. The vertical reference speeds under the inclined conditions were calculated as the product of the preset treadmill speed and the percentage incline. For each trial, the IMU data were recorded for a duration of 60 s. The stride-by-stride walking speed and inclination were estimated off-line with different sensor measurement error compensation methods implemented in MATLAB (The MathWorks, Natick, MA, USA). Twenty strides from the steady walking period of each trial were used in the error analysis. Before experiment, subjects gave their informed consent to participate in accordance with university policy, and the study was approved by the Queen’s Research Ethics Board.

2.4 Data analysis

For the walking speed estimation performance comparison, estimation error of each trial (20 strides from the steady walking period) was calculated as the difference between the average estimated stride-by-stride walking speed over 20 strides and the corresponding preset treadmill speed. The mean absolute estimation error (Mean) and standard deviation (SD) were determined for each treadmill speed across all the subjects. A percentage root mean squared error (%RMSE) for each treadmill speed was also computed by averaging the results over all subjects,

$$ \%\hbox{RMSE}=\frac{\sqrt{\sum(\bar{V}_{\rm estimated}-V_{\rm treadmill})^{2}/N}}{V_{\rm treadmill}}100\%, $$
(31)

where N = 10 for each walking speed, \(\bar{V}_{\rm estimated}\) is the average estimated walking speed for each treadmill speed across all subjects, and V treadmill is the corresponding preset treadmill speed. At each walking speed, the walking speed estimation error difference between different sensor error models were tested using the one-way ANOVA. With the p-values smaller than the significance level, 0.05, the performances of sensor error models were considered different. The estimated horizontal, vertical sensor velocities, and estimated inclination were also analyzed separately using the one-way ANOVA. For the walking inclination estimation performance comparison, the one-way ANOVA was used to test the difference between the estimated inclination of different sensor error models.

3 Results

Both CABSCS and CABSCS plus SM based walking speed estimation methods achieved smaller absolute error and %RMSE than the previously used CABGCS, as shown in Table 1. An improvement of overall %RMSE from CABSCS (3.7%) and CABSCS plus SM (3.4% from numerical solution and 3.5% from analytical solution) could be observed in comparison with that from CABGCS (4.1%). Overall, CABSCS plus SM shows the best performance in the walking speed estimation error comparison. However, one-way ANOVA showed that the estimation error difference between three error models were not statistically significant.

Table 1 Walking speed estimation errors comparison between methods

The comparisons between estimated average horizontal and vertical sensor velocities with different sensor error models are shown in Fig. 3a. As the experiment was carried out on the treadmill with 0° inclination, the horizontal sensor velocities estimated with all three sensor error models approach the preset treadmill speeds; however, much smaller vertical sensor velocities are obtained from CABSCS and CABSCS plus SM, which are significantly different from CABGCS, where the ideal estimated vertical sensor velocity should be zero. The estimated vertical velocities in CABSCS plus SM are slightly better than those by CABSCS at lower walking speeds (0.8 and 1.0 m/s). However, as the treadmill speed increases, the difference becomes significant and CABSCS shows larger errors while CABSCS plus SM still provides accurate estimates of vertical velocities. On the other hand, the comparison between numerical and analytical solutions for CABSCS plus SM in Fig. 3b indicates that the numerical method provided a better vertical sensor velocity estimate. Significant difference is observed in the vertical sensor velocity estimation under two out of five treadmill speeds, and the estimation variability is larger for the analytical solution.

Fig. 3
figure 3

a Estimated average sensor velocities (global coordinate system) under different sensor error models. The light gray bars indicate the results with CABGCS. The mid-gray bars show the results with CABSCS. The dark gray bars show the results from CABSCS plus SM. The error bars represent ± one standard deviation, indicating the estimation inter-subject variability. The asterisks indicate that the results are significantly different between pairs. b Comparison between the numerical and analytical solution of CABSCS plus SM method. The light gray bars indicate the numerical solution, while the mid-gray bars represent the analytical solution

In the inclination estimation experiment, the estimated inclination between any two of the three sensor error models are significantly different, as shown in Fig. 4a, where CABSCS plus SM provides the most accurate inclination estimates and the performance of CABSCS is better than CABGCS. Significant difference is observed in the inclination estimation results between the numerical and analytical solutions for CABSCS plus SM, as depicted in Fig. 4b.

Fig. 4
figure 4

a Estimated inclinations between different sensor error models. The light gray bars indicate the estimated average inclination with CABGCS. The mid-gray bars show the estimated inclination with CABSCS. The dark gray bars show the estimated inclination with CABSCS plus SM. The error bars represent ± one standard deviation, indicating the estimation inter-subject variability. The asterisks indicate that the results are significantly different between pairs. b Comparison between the numerical and analytical solution of CABSCS plus SM method. The light gray bars indicate the numerical solution, while the mid-gray bars represent the analytical solution

4 Discussion

Although accurate in estimating walking speeds for all three sensor error models, only CABSCS plus SM with numerical implementation achieved accurate results in estimating inclination. In the original shank-mounted IMU walking speed estimation [15], the initial shank angle at the shank vertical event was assumed to be zero, θ(0) = 0°; however, this requires perfect sensor initial sensor angle at the beginning of each stride cycle, which cannot be guaranteed. The walking speed estimation results are similar and accurate (Table 1) because the amplitudes of the estimated vertical sensor velocity were small for all error models and the walking speed amplitude was calculated as the vector sum of the horizontal and the vertical velocities. As such, the incorrect distribution of the vertical and horizontal velocities cannot be reflected in the overall walking speed estimation. However, the walking inclination estimation was severely affected because the calculation of the inclination totally depends on the distribution of the vertical and horizontal velocities. Previous studies with IMU attached to human body have attempted to estimate inclination during inclined walking, but failed to provide accurate results [15, 21]. The unsuccessful estimation of inclination is most likely due to the use of an sensor error model that is insufficient to describe the sensor errors involved in the system. In Fig. 3a, CABSCS and CABSCS plus SM do not present significant difference in the sensor vertical velocity estimation; however, as the walking speed increases, the difference becomes significant, which to some extent indicates that using shank angular velocity characteristics to determine shank vertical event in high walking speed may not be as accurate as in low walking speed. Comparing CABSCS and CABSCS plus SM in Fig. 5, it is obvious that the vertical sensor velocity profile is very sensitive to shank angle changes and even the small sensor misalignment angle (<5°) will make a big discrepancy. Therefore, the inclusion of the misalignment angle in the sensor error model is essential for the walking inclination estimation.

Fig. 5
figure 5

Estimated sensor velocity comparison (global coordinate system) over one stride cycle between different sensor error models. The solid curves represent the estimated horizontal and vertical sensor velocities without any compensation. The dotted curves show the estimated velocities corrected with CABGCS, the dashed curves represent the estimated velocities corrected with CABSCS, and the dash-dotted curves represent the estimated velocities corrected with CABSCS plus SM

The main difference between sensor error models lies in the instantaneous vertical velocities between 25 and 80 % of the stride cycle (Fig. 5). This duration corresponds to the swing phase of a stride cycle when the accelerations of the shank-mounted sensor becomes large. Since the sensor acceleration measurement biases are independent of the orientation of the sensor and the direction of the acceleration, the effect of the acceleration measurement biases in global coordinate system strongly relies on the shank angle that is used in the acceleration projection. The constant acceleration measurement bias model in global coordinate system applied in CABGCS ignores such fact and uses a rough approximation in the calculation, CABSCS senses the shank angle changes and realistically models the projection of the biases in horizontal and vertical directions, and CABSCS plus SM further takes care of the sensor misalignment angle. Meanwhile, the contribution of the gravity on sensor coordinate system also influences the calculated sensor acceleration measurement biases if the shank angle is not accurate. Due to the consideration of relationship between the shank angle and sensor error in global coordinate system, CABSCS observably corrects the sensor velocity estimation in vertical direction, and CABSCS plus SM significantly minimizes such error (Fig. 3a).

All in-test sensor error correction methods require some reference measurements to determine the sensor acceleration measurement bias. For example, the ZUPT has been used in foot-mounted IMU based algorithm [3, 19] and shank-mounted IMU based algorithm [15] to correct sensor measurement error. CABGCS, CABSCS and CABSCS plus SM all use the angular velocities measured during the end of stride cycle to generate the reference measurements, which is easy to implement and much simpler than other sensor fusion algorithms, e.g. Kalman filtering [3]. In comparison with CABGCS [15, 21], CABSCS and CABSCS plus SM require the consideration of sensor acceleration measurement biases for every sample collected in the walking trial, i.e. describing the sensor errors in global coordinate system as a function of time, and a relatively more complicated implementation is needed. We developed numerical and analytical methods for CABSCS plus SM. Both methods obtained accurate walking speed estimation results; however, the numerical solution performed better in terms of the inclination estimation. The small angle approximations we used in the derivation for the analytical solution are the main reason for the discrepancy found between numerical and analytical methods. The omission of the term in (Eq. 24) also accounts for part of the estimation error. As the vertical displacement is relatively small, these approximations could introduce a small absolute error in the estimated vertical displacement but relatively large percentage error. This will ultimately cause the wrong inclination estimation. On the other hand, the numerically implemented CABSCS plus SM solves the nonlinear equation directly without approximation, achieving accurate inclination estimation. One shortcoming of this implementation is the computational complexity because it involves solving a nonlinear equation in each stride cycle. In this study, we only conducted inclined walking due to the limitation of treadmill, which can only be adjusted to positive inclinations. The performance of these three sensor measurement error compensation methods under declined walking conditions deserves further evaluation.

In summary, this study proposed two new sensor error models and evaluated the performance in comparison with one sensor error model from previous study ([15]). The results suggested that either method (CABSCS, CABGCS, or CABSCS plus SM) could be used to estimate walking speeds accurately. In the case of estimating walking inclination, CABSCS plus SM with a numerical implementation will be the best choice. The use of advanced sensor error model can further benefit some closely related applications, such as personal positioning system [3]; Although in the present study the proposed error models are used to correct the walking speed and inclination estimation errors, the way of modeling body-mounted inertial sensor error can be migrated to other applications, such as human activities recognition [12].