Wireless sensing system
The sensing system (see Fig. 1) is composed of several body area wireless inertial sensor nodes based on the ProMove platform [15]. ProMove creates a bridge between inertial measurement units (IMUs) and wireless sensor networks (WSNs) by embedding in one device the following:
-
8 degrees-of-freedom inertial sensors: ±1.5 to 6 g three-axial accelerometer, ±500°/s two-axial gyroscope and 6 gauss three-axial magnetometer.
-
Low-power MSP430 micro-controller, widely used in “motes”-like sensor node platforms.
-
IEEE 802.15.4-compliant system-on-a-chip (SoC) for low-power wireless networking.
The micro-controller is dedicated for sampling the inertial sensors and running specific data processing algorithms. The SoC provides the developer with the necessary computational and memory resources for implementing the wireless networking protocol stack. This facilitates a two-tier approach and a beneficial separation of resources between sensor data processing and wireless networking.
Measurement of kinematic parameters
As shown in Fig. 2, we use three ProMove nodes placed along the left leg of the cyclist, on the thigh, shank and foot. For each node, we compute its orientation relative to the Earth reference frame in terms of roll, pitch and yaw (R-P-Y) angles. By combining the orientation of each node, we obtain the joint motions of the three segments of the lower limb. In our current experiments the kinematic parameters of interest are the knee and ankle joint angles, noted with K and A, respectively. As depicted in Fig. 3, both K and A can be computed from the roll angles derived from the motion of the three nodes in the sagittal plane, as follows:
$$ \begin{aligned} K&= \pi - R_1 - R_2\\ A&= R_2 + R_3 \end{aligned} $$
(1)
The measurement process can be therefore divided in two steps: (1) the computation of the orientation of each node and (2) the determination of the joint angles.
Orientation computation
At any given time, the stationary condition is detected by analyzing the variance of the acceleration magnitude over a sliding time interval. If the variance is below a given threshold, then the node is considered stationary and its orientation is computed using the accelerometer and compass readings: considering that a
x
, a
y
and a
z
are the projections of static acceleration on x, y and z axis (i.e. the readings of the accelerometer sensor), the roll and pitch angles are computed as follows [16] (see also Fig. 4a):
$$ \begin{aligned} R &= \hbox{arctan}\left(\frac{a_y}{\sqrt{a_x^2+a_z^2}}\right)\\ P &=\hbox{arctan}\left(\frac{a_x}{\sqrt{a_y^2+a_z^2}}\right) \end{aligned} $$
(2)
Considering that c
x
, c
y
and c
z
represent the projections of the magnetic field on the three axes (i.e. the readings of the compass sensor), then the yaw angle Y is computed as follows [17] (for brevity we use the short trigonometric notations cα, sα, tα to denote the cos, sin, tan of angle α):
$$ Y =\hbox{arctan}\left(\frac{c_x cR + c_z sR}{c_y cP + (c_x sR-c_z cR) sP}\right) $$
(3)
During cycling (i.e. when the variance of the acceleration magnitude exceeds the given threshold), the R-P-Y angles are updated using the gyroscope readings g
x
, g
y
and g
z
. Given the fact that the nodes have only a 2D gyroscope, the angular velocity g
z
is assumed 0. Using the rotation matrix [18]:
$$ M = \left(\begin{array}{ccc} 1 & tP sR & -tP cR \\ 0 & cR & sR \\ 0 & -sR/cP & cR/cP \end{array}\right) $$
(4)
we compute the new angles R′, P′ and Y′:
$$ \left( \begin{array}{c} R^{\prime} \\ P^{\prime} \\ Y^{\prime} \\ \end{array} \right) = \left( \begin{array}{c} R \\ P \\ Y \\\end{array}\right) + M \left( \begin{array}{c} g_x \\ g_y \\ 0 \\ \end{array}\right) $$
(5)
A well-know problem of Eq. 5 is the effect of error accumulation due to the integration of the gyroscope data. During stationary periods, the orientation angles can be reset to the values computed through Eqs. 2 and 3, but while moving the errors can accumulate in time indefinitely. Our approach to this problem is to exploit the repetitive pattern of the cycling motion and to reset the orientation angles to values computed from the compass readings. The advantage of the compass sensor is that it gives an absolute attitude measure, without suffering from error accumulation. The disadvantage is represented by possible disturbances of ferrous or magnetic nearby structures, but this problem is relatively minor in our case because most modern bikes have lightweight non-metallic structures. For a more detailed discussion on these aspects, see Sect. 6.
The reset is applied when the lower limb is at the pedal-up position, which corresponds to a minimum peak in the roll angle. If we denote with st the values obtained during the most recent stationary period (using Eq. 2) and with pk the values when reaching the pedal-up position, we compute the new roll angle (see also Fig. 4b):
$$ R_{pk} = R_{st} - C_{st} + C_{pk} $$
(6)
where \(C_{st}=\hbox{arctan}(\frac{c_{z,st}}{c_{y,st}})\) and \( C_{pk} =\hbox{arctan}(\frac{c_{z,pk}}{c_{y,pk}})\).
The pitch angle is assumed to remain unchanged, i.e. P
peak
= P
static
and the new yaw angle Y
peak
is derived using R
peak
and P
peak
in Eq. 3 (see Sect. 6 for a discussion of this assumption). Until the next pedal-up position, the integration step continues as in Eq. 5.
Joint angles
As described in Eq. 1, the knee and ankle joint angles can be determined using the absolute roll angles from all three nodes. This means that the nodes have to exchange the roll angle values among them, while also interacting with the feedback device. If we denote by D the feedback device and by T, S and F the node on the thigh, shank and foot, respectively, we have the following possibilities:
-
1.
T, S and F compute the roll angles and send them periodically to D, which determines the joint angles.
-
2.
S broadcasts periodically its roll angle, T determines the joint angle K and sends it to D, S determines the joint angle A and sends it to D.
-
3.
T and F send periodically their roll angles to S, S determines both joint angles and send them to D.
Each of these strategies has its advantages and drawbacks, in terms of computational effort and wireless communication overhead. Depending on the hardware resources available on the feedback device, the first strategy is preferred because:
-
There is less computational effort and less communication overhead for the nodes (the nodes only have to transmit their data to D, without any inter-node communication that would further complicate the medium access protocol).
-
The nodes run the same algorithm, in other words there is no specialization among nodes.
-
D can ensure a proper synchronization among the data received from the nodes, for example by arbitrating the medium access in a TDMA manner and imposing sequence number matching. Data synchronization is an essential point for a correct measurement procedure, as any mismatch between the absolute angle information can produce erroneous results in the joint angles.