Sensors 2013, 13(1), 918-937; doi:10.3390/s130100918

Article
Quasi-Real Time Estimation of Angular Kinematics Using Single-Axis Accelerometers
Alessio Caroselli 1, Fabio Bagalà 1,* and Angelo Cappello 1,2
1
Department of Electrical, Electronic and Information Engineering-Guglielmo Marconi, University of Bologna, Viale Risorgimento 2, 40136 Bologna, Italy; E-Mails: alessio.caroselli@gmail.com (A.C.); angelo.cappello@unibo.it (A.C.)
2
Health Sciences and Technologies Interdepartmental Center for Industrial Research (HST-ICIR), University of Bologna, Via Tolara di Sopra 50, 40064 Ozzano Emilia, Bologna, Italy
*
Author to whom correspondence should be addressed; E-Mail: fabio.bagala@unibo.it; Tel.: +39-051-209-3067.
Received: 9 November 2012; in revised form: 28 December 2012 / Accepted: 5 January 2013 /
Published: 15 January 2013

Abstract

: In human movement modeling, the problem of multi-link kinematics estimation by means of inertial measurement units has been investigated by several authors through efficient sensor fusion algorithms. In this perspective a single inertial measurement unit per link is required. This set-up is not cost-effective compared with a solution in which a single-axis accelerometer per link is used. In this paper, a novel fast technique is presented for the estimation of the sway angle in a multi-link chain by using a single-axis accelerometer per segment and by setting the boundary conditions through an ad hoc algorithm. The technique, based on the windowing of the accelerometer output, was firstly tested on a mechanical arm equipped with a single-axis accelerometer and a reference encoder. The technique is then tested on a subject performing a squat task for the knee flexion-extension angle evaluation by using two single-axis accelerometers placed on the thigh and shank segments, respectively. A stereo-photogrammetric system was used for validation. RMSEs (mean ± std) are 0.40 ± 0.02° (mean peak-to-peak range of 147.2 ± 4.9°) for the mechanical inverted pendulum and 1.01 ± 0.11° (mean peak-to-peak range of 59.29 ± 2.02°) for the knee flexion-extension angle. Results obtained in terms of RMSE were successfully compared with an Extended Kalman Filter applied to an inertial measurement unit. These results suggest the usability of the proposed algorithm in several fields, from automatic control to biomechanics, and open new opportunities to increase the accuracy of the existing tools for orientation evaluation.
Keywords:
inverted pendulum; single-axis accelerometer; second order differential equation; postural sway; unstable non linear system; boundary conditions

1. Introduction

The inverted pendulum (IP) is a simple system that finds application in many disciplines of science. Despite its simple nature, it represents a non-linear, unstable and non-minimum phase system, finding several applications in control theory and biomechanics. Achieving stability of an IP has become a common engineering challenge for researchers and the problem has been discussed theoretically by several authors [15] and experimentally demonstrated by others [47].

There are many examples of the IP model, both man made and found in the natural world. In control theory the challenge of control made the IP system a classic tool in control laboratories [812]. The balancing of an IP by moving a cart along a horizontal track is a classic problem in the area of control. Usually one of the state variables of the system which is also the controlled variable, the sway angle, is evaluated from expensive measurement system (e.g., encoder) placed at the pivot joint. The main limitation of this approach is that placing the encoder at the pivot is not always possible.

Arguably the most prevalent example of an IP is a human being. A standing human looks like an IP with the center of mass well above the ground [1315]. The mechanism to keep balance during the standing posture has intrigued scientists from several fields for a long time [14] and has much significance in clinics. Several authors focused on the estimation of the sway angle since this measurement is related to oscillation of the center of mass of a subject and to the neural control of posture during perturbed and unperturbed stance. However, recent studies [16,17] focused on the contribution of hip and knee to balance control. Given the implications that non-rigidity at the knee and hip may have for the postural control during unperturbed stance, a comprehensive analysis of the ankle, knee and hip movements is required. The analysis revealed that the one-segment IP model is an oversimplification of reality. A multilink model which takes into account thigh, shank and arm-trunk-head segments should be adopted to have a more accurate description of standing balance. From this perspective, the IP model plays the role of the basic element of a multilink chain [18,19]. Kinematics analysis of a multi-link chain should be analyzed using the framework of multiple IPs [16].

In the last years, sensing hardware developments have made available on the market miniaturized inertial (accelerometers and/or gyroscopes) and magnetic sensors. These sensors have found applications in robotics and biomechanics because of their low cost, small size and weight, low power consumption, ease of use and portability. The problem of accurate tracking of orientation by means of these sensors has thus become important in several domains since these wearable sensors can be considered the most valuable opportunity to monitor kinematics and dynamics of human subjects outside specialized laboratories. The problem of solving orientation estimation by using efficient sensor fusion filtering algorithms has been investigated by several authors [2024] in order to overcome some relevant limitations related to the use of inertial and magnetic sensors one by one:

  • orientation estimated by time-integrating, from unknown initial conditions, the signals from a triad of mutually orthogonal uni-axial gyros is prone to errors that grow unbounded over time, due to low-frequency gyro bias drifts;

  • it is difficult give a simple interpretation to the accelerometer signals, where the component due to the gravity field (vertical reference) coexists with the component related to the motion of the object;

  • nearby ferromagnetic materials are critically disturbing sources when attempts are made to interpret the signals from a tri-axial magnetic sensor as the horizontal reference.

However, the set-up including one inertial measurement unit (IMU) per segment is not cost-effective compared with a solution in which a single-sensor is used. Recently, Bagalà et al.[19] showed that it is possible to separate the two different contributions (gravity and inertia) of the accelerometer signal through a bidirectional low-pass filter and a model-based approach. The accuracy in the joint angles estimation using a single-axis accelerometer (SAA) per segment was comparable with that obtained in several previously published studies where two or more sensors per segment were required [2530].

The aim of this study is to provide a novel technique, faster than that proposed previously [19], based on the Thomas algorithm [31], for the quasi-real time estimation of the sway angle of an IP using (only) one SAA. The algorithm is then extended to a 2-link chain for the estimation of the knee flexion-extension angle of a subject performing a squat task. Furthermore, a comparison with an Extended Kalman Filter (EKF) applied to different sensor configurations was performed.

2. Experimental Section

2.1. Inverted Pendulum Kinematics

An IP model in 2D is analyzed. A SAA is placed at height h from the pivot point P with the sensitive axis orthogonal to the longitudinal axis of the IP (Figure 1(a)). The accelerometer output, ax(t) can be expressed in the continuous-time domain as the sum of an inertial contribution depending on the angular acceleration component, α(t) (the second derivative of the sway angle, θ(t)) and a gravitational term depending on the sway angle, as follows:

a x ( t ) = h α ( t ) g sin θ ( t )
where g is the gravitational acceleration. Equation (1) is a second order differential equation which has a clear similarity with the equation of motion of the IP: under the assumption of no friction or any other resistance to movement, if d is the distance between the center of mass of the pendulum and the pivot, m is the mass of the pendulum, M is the moment at the pivot and J is the moment of inertia, the equation of motion is M = (t) – mgd·sinθ(t). Dividing by md the equation of motion M m d = J m d α ( t ) g sin θ ( t ) becomes similar to Equation (1) since M m d has the dimension of an acceleration and J m d the dimension of a length. Moreover, from a mechanical point of view, the accelerometer is described by a mass-spring system whose behavior is similar to that of a pendulum. The accelerated mass has the same direction of the gravity when the accelerometer is placed on a classical pendulum (stable behavior) and has opposite direction in the case here presented of the IP (unstable behavior).

Several authors [2830] used an IP and a quasi-static model in which the inertial term in Equation (1) is neglected, so the sway angle can be easily evaluated from the gravitational term and the accelerometer output. This approximation introduces significant errors when the inertial term is not negligible and the frequency bandwidth content of the angular sway is wide.

Unlike the ideal condition of the mathematical model described by Equation (1), the placement of the sensor on a mechanical link potentially introduces some errors due to the non-orthogonality of the sensitive axis of the SAA to the segment. Under the assumption of small misalignment angle, Equation (1) is modified taking into account the projections of the centripetal, tangential and gravity accelerations on the sensitive axis:

a x ( t ) = h α ( t ) g sin θ ( t ) + β [ h ω 2 ( t ) g cos θ ( t ) ]
where ω(t) represents the angular velocity and β describes the SAA non-orthogonality, as shown in Figure 1(b).

In the discrete-time domain, Equation (2) can be rewritten as:

a x , k = h α k g sin θ k + β [ h ω k 2 g cos θ k ] k = 1 , , N
where N is the number of samples.

By using the first and second derivative approximations for the angular velocity, ω(t), and the angular acceleration, α(t), the relationship between the accelerometer output and the angular sway becomes:

a x , k = h T 2 ( ϑ k + 1 2 θ k + θ k 1 ) g sin θ k θ k θ k + β [ h ( θ k + 1 θ k 1 2 T ) 2 g cos θ k ] k = 2 , , N 1
where T is the sample time. Equation (4) can be rewritten as follows:
a x , k = h T 2 θ k 1 h T 2 θ k + 1 + ( 2 h T 2 g sin θ k θ k ) ϑ k + β ( h T 2 ( θ k + 1 θ k 1 ) 2 4 g cos θ k ) k = 2 , , N 1

For a given time window of W samples, Equation (5) is a system of W2 non linear 2nd order differential equations. After setting the two boundary conditions θ1, θW, whose details will be provided in the next section, Equation (5) can be expressed in a matrix form as:

[ a x , 2 a x , W 1 ] A = [ C 2 B 0 0 B C 3 0 0 B 0 0 B C W 1 ] C [ θ 2 θ W 1 ] θ + { B [ θ 1 0 0 θ W ] + β B 4 [ ( θ 3 θ 1 ) 2 ( θ 4 θ 2 ) 2 ( θ W 1 θ W 3 ) 2 ( θ W θ W 2 ) 2 ] g β [ cos θ 2 cos θ W 1 ] } D
where B = h T 2, C k = 2 B g sin θ k θ k ( k = 2 , , W 1 ). Equation (6) can be rewritten in matrix form as A = Cθ + D and the sway angle θ can be obtained from the accelerometer output vector A, through the C-matrix inversion as:
θ = C 1 ( A D )

The computational cost for the inversion of N-square tridiagonal matrix is 1 6 N 3 + O ( N 2 ), which can be reduced to O(N) by using the tridiagonal matrix algorithm proposed by Thomas [31], which is a simplified form of Gaussian elimination, based on three steps (factorization, forward and backward substitution).

In order to apply the Thomas algorithm for the evaluation of the sway angle, Equation (7) was rewritten in the form of a tridiagonal equation system as:

C θ = ( A D ) A C θ = A

2.2. Algorithm Overview

In order to solve Equation (8), a novel algorithm (Figure 2) for the quasi-real time estimation of the sway angle θ from the accelerometer output vector A, was implemented in Matlab2008. The algorithm is based on the windowing of W sample sliding window to the accelerometer output vector A. As shown in the right member of Equation (6), the solution of Equation (8) requires setting the two boundary conditions, θ1, θW of the sway angle vector θ. They are zeroed when the process starts and are updated, step by step, through the equations described in the following. If the boundary conditions are unknown, as usually occurs in experimental conditions, the angular sway estimate is negatively affected by a transient response at the boundaries. Nevertheless, if the window size is sufficiently large, the central term of the vector θ, obtained after solving Equation (8), is largely independent from the boundary conditions.

In the following, the vectors θ(k) and A(k) represent the sliding window of W samples at step k. Assuming known the misalignment angle, β, the sway angle can be obtained by the following steps (Figure 2):

  • Initialization: at the first step, Equation (8) is initialized by zeroing the windowed angle vector θ(1) = [θ2, …, θW1]T and the two boundary conditions (θ1 = 0, θW = 0). The terms on the diagonal of the matrix C are assumed to be constant (Ck = −2Bg, k = 2, …, W − 1) by approximating sin θ k θ k 1. The sliding window of the accelerometer output A(1) = [ax,2 …, ax,W−1]T is considered as input.

  • Thomas algorithm: the sway-angle vector θ(k) is estimated from Equation (8) with I iterations by using the Thomas algorithm [31]. A single iteration is enough to have accurate estimates, except for the first cycle, which requires more iterations (I = 3) to converge because of the initialization process. Increasing the number of iterations I does not significantly improve the estimation accuracy but increases the computational cost.

  • Get center sample: as discussed before, at step k, the center sample θ W + 1 ( k ) / 2 of the estimated vector θ(k) is considered as correct estimate, under the assumption of adequately large time windows.

  • Boundary conditions update: according to the result provided by the Thomas algorithm at the previous step, at step k > 1 the two boundary conditions are set as the first element of the vector θ(k) (left boundary) and as the linear interpolation of the last two elements of the vector θ(k) (right boundary) as follows:

    { θ 1 ( k + 1 ) = θ 2 ( k ) θ W ( k + 1 ) = 2 θ W 1 ( k ) θ W 2 ( k ) k = 2 , , N 1

    The terms of the matrix C are updated with the angle vector elements.

  • Window Slide: the input vector A(k) is updated by adding the new sample at the end of the vector and deleting the first one.

Steps (2–5) are iterated for the total length of the accelerometer output.

The algorithm's computational cost, CT can be expressed as:

C T = f s ( N W ) I ¯ C i
where Ci is the computational cost to process W samples by the Thomas algorithm, the average number of iterations per window and N the total number of samples of the signal to be processed.

The computational cost is therefore reduced with respect to the offline method previously published [19], based on the bidirectional filtering of the accelerometer output. In a linear case (small sway angles), the similarity between the quasi-real time algorithm and the previously published method is demonstrated in Appendix A.

2.3. Mechanical Inverted Pendulum

To test the method, the same experimental setup used in [19] was adopted. An aluminum rectangular link was used as an IP driven by hand to sway with a fixed pivot point. The frequency content of the angular sway is [0–2] Hz. Five trials were performed. The mechanical arm was equipped with an absolute encoder (Gurley, mod. 7700, resolution 19 bit, Gurley Precision Instruments, Troy, NY, USA) and an IMU (MTx, Xsens Technologies, Eschede, The Netherlands), consisting of a tri-axial accelerometer, a tri-axial gyroscope and a tri-axial magnetometer, placed at height h = 0.20 m from the pivot point P (Figure 3).

The IMU's outputs were acquired at fs = 50 Hz sampling frequency. To test the algorithm presented in this paper, only the accelerometer output related to the axis orthogonal to the mechanical arm, ax was considered as input. A preliminary calibration, in which the encoder output was used as reference, was performed to estimate the two geometric parameters h and β. The two parameters were estimated by minimizing the RMSE between the encoder output and the estimated angle.

In order to test the robustness of the method proposed in this paper, results in terms of RMSE were compared with:

  • those obtained by using the offline method proposed in [19], where a bidirectional low-pass filtering of the accelerometer output, with a cut-off frequency depending on the position of the sensor, was implemented;

  • those obtained by using an EKF applied to the outputs of the IMU (Figure 3), in particular to the accelerometers with sensitive axis orthogonal and along the mechanical arm, ax and ay, and to the output of the gyroscope with sensitive axis orthogonal to the plane of the movement, gz as discussed in the next section.

2.4. Extended Kalman Filter

The outputs of the accelerometers along the x and y directions and the output of the gyroscope with the sensitive axis orthogonal to the plane of the movement (z) are expressed as follows:

a x , k = h α k g sin θ k + β [ h ω k 2 g cos θ k ] a y , k = h ω k 2 + g cos θ k + β [ h α k g sin θ k ] g z , k = ω k k = 1 , , N

The main equations of the EKF are shown in Equation (11), where wk and vk represent the process and measurement noise, assumed to be independent, white and with normal probability distribution with a process noise covariance Q and a measurement noise covariance R. More details about the algorithm are presented elsewhere [32,33]. The state-space model of the EKF is described by the process and measurement model equations:

x k + 1 = A x k + w k z k = h ( x k ) + v k

The state vector of the EKF, x(k)[3×1], at every sampled instant of time k, was defined as x ( k ) = [ θ ( k ) ω ( k ) α ( k ) ] T.

In the discrete-time domain the predicted state at the instant k + 1 was obtained as:

x k + 1 = [ 1 T T 2 / 2 0 1 T 0 0 1 ] A [ 3 × 3 ] x k

The vector of the measurements z(k)[3×1] was defined considering the outputs of the sensors as z ( k ) = [ a x ( k ) a y ( k ) g z ( k ) ] T.

According to (10), the output vector is related to the state vector through the non-linear relationship z(k) = h(xk). The output matrix H(k)[3×3] which relates the measurements z(k)[3×1] to the state x(k) was thus obtained evaluating the Jacobian matrix of h(xk) with respect to the state vector.

The process covariance matrix Q[3×3] was defined under the assumption that process noise affects the jerk only and there are no correlations between the jerk noise sequences. Q[3×3] has therefore only one non-zero element Q(3,3) set to 10−3. The measurement noise covariance matrix R[3×3] was defined considering the noise which affects the gyroscope and accelerometer outputs. Since correlations between noise of the sensors were assumed to be zero, the covariance matrix was put in the form 10−8·I[3×3]. All these tuning parameters were defined after an optimization procedure in which the encoder was assumed as validation standard. In order to start the filtering procedure, initial estimate of the state vector was zeroed whereas the initial estimate of the error covariance matrix P[3×3] was set equal to the identity matrix.

In order to compare the performance of the window-based algorithm proposed in this study with the EKF, seven different configurations of the EKF were implemented by considering the following measurement vectors:

  • z ( k ) = [ a x ( k ) a y ( k ) g z ( k ) ] T;

  • z ( k ) = [ a x ( k ) g z ( k ) ] T;

  • z ( k ) = [ a y ( k ) g z ( k ) ] T;

  • z ( k ) = [ a x ( k ) a y ( k ) ] T;

  • z(k) = ax(k);

  • z(k) = ay(k);

  • z(k) = gz(k);

For each case, the output matrix H(k) and the measurement noise covariance matrix R were adjusted to the dimension of the measurement vector. The tuning parameters, Q and R, were optimized for each case to have the best performance in terms of RMSE of the angle estimation.

2.5. 2-Link Chain: Knee Flexion-Extension Angle Evaluation

In order to show an application of the algorithm proposed in this paper and its extension to a multi-link model for human movement kinematics estimation, the knee flexion-extension angle of a subject performing a squat task was evaluated.

The method is tested on one subject (male, 29 years old, weight 74 kg, height 176 cm) who participated after giving his informed consent. In order to estimate the thigh and shank sway in the sagittal plane during squat tasks [34], a 2-link biomechanical model is introduced for the two segments (Figure 4). The feet are supposed rigidly connected to the ground; the ankle and the knee joints are represented as two hinge joints and the shank (segment 1, length l1 = 0.41 m and the thigh (segment 2) are modeled as two rigid segments. The HAT kinematics has not been investigated in the present study. The subject was asked to perform a repetition of squat exercises for one minute with arms folded, keeping his movement in the sagittal plane. Five trials were performed. In order to estimate the knee flexion-extension angle, two IMU's (MTx, Xsens Technologies) were placed at measured heights h1 = 0.27 m, h1 = 0.19 m with respect to the ankle and knee joint, respectively. Each of the two sensors was placed on a rhomboid rigid plate and mounted on the skin at the lateral side of the thigh and the shank by using three hook-and-loop fastener belts.

Four reflective markers were placed on the vertices of each plate, and a stereo-photogrammetric system (SMART eMOTION, BTS) was used for calibration of the geometric parameters (h1, h2, l1, β1, β2). The two reference angles with respect to the vertical were evaluated through the 2D Singular Value Decomposition (SVD) method [35,36]. Stereo-photogrammetric and inertial data were sampled at 100 Hz.

The outputs of the sensor placed on the thigh can be evaluated by modifying Equation (10) by adding the projection of the accelerations at and ac on the measurement axis of the sensor.

These two contributions can be evaluated considering the second derivative of the position of the knee joint with respect to the ankle joint:

{ a t , x = l 1 d 2 [ sin θ 1 ( t ) ] d t 2 | t = k T l 1 sin θ 1 , k + 1 2 sin θ 1 , k + sin θ 1 , k 1 T 2 a c , x = l 1 d 2 [ cos θ 1 ( t ) ] d t 2 | t = k T l 1 cos θ 1 , k + 1 2 cos θ 1 , k + cos θ 1 , k 1 T 2

The accelerometer and gyroscope outputs placed on the thigh can thus be expressed as follows:

a x , k ( 2 ) = h 2 α 2 . k g sin θ 2 . k + β 2 [ h 2 ω 2 , k 2 g cos θ 2 . k ] + a t , k cos ( θ 2 , k + β 2 ) a c , k sin ( θ 2 , k + β 2 ) a y , k ( 2 ) = h 2 ω 2 , k 2 + g cos θ 2 . k + β 2 [ h 2 α 2 . k g sin θ 2 . k ] + a t , k sin ( θ 2 , k + β 2 ) + a c , k cos ( θ 2 , k + β 2 ) g z , k ( 2 ) = ω 2 , k k = 1 , , N
where the Equation (A2) indicates that Equation (14) are referred to the thigh segment.

The accelerometer and gyroscope outputs placed on the shank segment are expressed as Equation (10) as follows:

a x , k ( 1 ) = h 1 α 1 , k g sin θ 1 , k + β 1 [ h 1 ω 1 , k 2 g cos θ 1 , k ] a y , k ( 1 ) = h 1 ω 1 , k 2 + g cos θ k + β 1 [ h 1 α 1 , k g sin θ 1 , k ] g z , k ( 1 ) = ω 1 , k k = 1 , , N

The accelerometers outputs a x , k ( 1 ), a x , k ( 2 ) are used as inputs to the Thomas algorithm. In particular, for the second link, the sway angle can be obtained from (7) as θ = C−1(AD′) where D′ is:

D = D + [ a t , k cos ( θ 2 , 2 + β 2 ) a c , 2 sin ( θ 2 , 2 + β 2 ) a t , W 1 cos ( θ 2 , W 1 + β 2 ) a c , W 1 sin ( θ 2 , W 1 + β 2 ) ]

In addition, the IMU's outputs Equations (14) and (15) were considered as the measurement vector for the EKF and, as described in the previous section, seven different configurations were considered:

  • z ( k ) = [ a x ( 1 ) ( k ) a y ( 1 ) ( k ) g z ( 1 ) ( k ) a x ( 2 ) ( k ) a y ( 2 ) ( k ) g z ( 2 ) ( k ) ] T;

  • z ( k ) = [ a x ( 1 ) g z ( 1 ) a x ( 2 ) g z ( 2 ) ] T;

  • z ( k ) = [ a y ( 1 ) g z ( 1 ) a y ( 2 ) g z ( 2 ) ] T;

  • z ( k ) = [ a x ( 1 ) a y ( 1 ) a x ( 2 ) a y ( 2 ) ] T;

  • z ( k ) = [ a x ( 1 ) ( k ) a x ( 2 ) ( k ) ] T;

  • z ( k ) = [ a y ( 1 ) ( k ) a y ( 2 ) ( k ) ] T;

  • z ( k ) = [ g z ( 1 ) ( k ) g z ( 2 ) ( k ) ] T;

The knee flexion-extension angle was evaluated from the shank and thigh angles, θshank and θthigh respectively, as:

θ knee = π ( θ shank θ thigh )

RMSEs between the flex-extension angles estimated by (1) the algorithm proposed in this paper, (2) the EKF in the seven different configurations described above, were evaluated with reference to the stereo-photogrammetric measurements.

3. Results

3.1. Mechanical Inverted Pendulum

Five trials were performed. For each of them, the calibration parameters were estimated (mean ± std): the distance h = 0.20 ± 0.00 m of the origin of the sensor reference system to the pivot point (the measured distance equals 0.20 m), and the angle β = −1.24 ± 0.07°, related to the non-orthogonality of the measurement axis of the SAA to the link. These values were then used along the sensor data to predict the sway angle which was compared with the encoder angle. RMSEs, averaged over the five trials, were computed and compared with those obtained in [19] and those obtained by using the EKF in seven different cases. Peak-to-peak range (mean ± std), averaged over the five trials, is 147.2 ± 4.9°. Results are reported in Table 1.

In Figure 5 the residual error between the estimated sway angle with the algorithm proposed in this paper and the encoder angle. The RMSE obtained by the quasi-real time algorithm is slightly greater than the RMSE obtained with the offline algorithm proposed by Bagalà et al.[19], but with lower standard deviation. Moreover, the proposed algorithm improves the previous method [19] by significantly reducing the computational cost (from 10–15 iterations to a single iteration). RMSEs obtained with the EKF are greater than the RMSE obtained with the algorithm proposed in this paper in all the seven configurations analyzed. In particular, RMSEs are comparable if at least two sensors are used. The best performance is obtained by fusing the outputs of the two accelerometers and the gyroscope but the RMSE dramatically increases when a single sensor is used, since integration errors are not compensated by fusing measurements from different sensors.

The time required by the algorithm was about 170 ms to process 50 s of acquisition with a window of 100 samples, by using a DELL Studio 1,535 computer (processor Intel Core 2 Duo T9300, 2.50 GHz, 4 GB Memory, OS: Windows Vista 32 bit).

A good trade-off between the algorithm's speed and accuracy may be obtained by using Figure 6 which shows the effect of the window size W on the time required to process 50 s of the signal in Figure 6(a), and on the percentage ratio between RMSE and peak-to-peak range in Figure 6(b).

It is trivial to note that high values of W increase the computational cost because the size of the matrix C to be solved by the Thomas algorithm increases.

The RMSE shows an exponential dependence on the window size with a significant reduction for a window duration defined by the time constant of the system in Equation (1). For a bidirectional 1st order filter, the transient effect is negligible if the window size is at least 9.2τ where τ = h / g and g′ = g·sinθ/θ. Assuming h = 0.20 m, a maximum value of the sway equal to π/3 and a mean value of the term sinθ/θ ≈ 0.8 the window size should be W = 9.2τfs ≈ 73 samples. This is confirmed by Figure 6(b) where the RMSE significantly decreases when the window size exceeds 100 samples. Furthermore, as shown in Figure 6(a), the algorithm's computational cost linearly increases with the window size as one would expect: according to (9), if NW, CTCi and the computational cost Ci is O(W) for tridiagonal matrix inversion using the Thomas algorithm. Increasing the window size over 100 samples does not provide significant variation in terms of RMSE but produces an increase of the computational cost.

3.2. Knee Flex-Extension Angle

The mean values and the standard deviations of the calibration parameters for the five trials, obtained by minimizing sway angle errors between stereo-photogrammetric and inertial sensor data, are (mean ± std): h1 = 0.20 ± 0.01 m, h2 = 0.22 ± 0.00 m, l1 = 0.40 ± 0.06 m, and β1 = −8.98 ± 0.24°, β2 = −2.25 ± 0.71°. These parameters are then used to predict angular sway by using the two accelerometer outputs, a x , k ( 1 ), a x , k ( 2 ), for the quasi-real time algorithm, and by using the IMUs outputs for the EKF, as described in the Section 2.4. RMSEs (mean ± std) are reported in Table 2. Peak-to-peak range (mean ± std), averaged over the five trials, is 59.29 ± 2.02°.

RMSEs reported in Table 2 confirm the results obtained in the mechanical inverted pendulum. The quasi-real time algorithm provides an RMSE comparable with previous published method [19] and lower than that obtained using an EKF in the best configuration where accelerometers and gyroscope outputs are fused. Figure 7 shows residual error of the knee flexion-extension angle during a squat cycle evaluated using the quasi-real time algorithm and the EKF in the best case. Stereo-photogrammetric angle was used as reference.

4. Discussion and Conclusions

This paper suggests a novel method for the quasi-real time estimation of the sway angle in an IP model by using one SAA per segment. The relationship between the sway angle and the SAA output is described by a second order differential equation which is solved by applying the Thomas algorithm [31] to the sliding window of the accelerometer output and by setting the boundary conditions of the sway angle through an ad hoc algorithm. The method allows the 2D orientation estimation of the IP overcoming the limitations of the double-integration of the accelerometer output, recently discussed in [20]. The method is successfully tested on a mechanical IP providing accurate estimation of the sway angle compared with the encoder output. In addition, the method is extended to a 2-link chain for an application in human movement analysis. The knee flexion-extension angle of a subject performing a squat task was evaluated by using the outputs of two SAAs, placed on the thigh and shank segments, and successfully compared with a stereo-photogrammetric system. The extension to a multi-link chain is straightforward. Our method is further compared with an EKF applied to the IMU's outputs both on the mechanical IP and the human subject. The proposed technique, based on the Thomas algorithm, is more accurate than the EKF as confirmed by the results reported in Tables 1 and 2. According with these considerations the quasi-real time algorithm applied to the output of a SAA represents a cost-effective solution when multi-link kinematics estimation is required: using one IMU per segment is much expensive than using a SAA per segment.

It is worth noting that the geometric parameters (position of the sensor with respect the pivot point, misalignment angle, segment lengths) are estimated by using encoder outputs or stereo-photogrammetric system as validation instruments only in a preliminary calibration phase. After this calibration the parameters are used to predict the sway angle with the algorithm proposed in the paper using inertial sensor only. As shown in the Results section, the estimated segment lengths and the position of the sensor with respect to the pivot are quite similar to those measured by hand. The misalignment angles are lower than 9° and neglecting the misalignment does not significantly increase the RMSE.

The method presented in this paper improves the previous method [19] by significantly reducing the computational cost (from 10–15 iterations to a single iteration). Furthermore, the algorithm is quasi-real time since it provides the estimated angles with a delay of W/2fs s, while the previous proposed algorithm [19] is offline since it requires the whole accelerometer signal to be processed.

The performance of the estimation method depends on the window size. Figure 6(a,b) provides useful information about the window size, the algorithm speed and the RMSE according to the specifications required. If the speed of the algorithm and the real time performance are the most important requirements, choosing a short time window reduces the computational cost and the angular sway latency. Nevertheless, a short time window reduces the accuracy of the estimation because of the time required for the exhausting the transient effect. For these reasons, if the accuracy is the main specification, increasing the window size provides the best results in terms of RMSE. The sway angle is always estimated with a delay equal to half of the time window.

The results suggest possible applications in various fields, from automatic control to bioengineering. Mainly in biomechanics, the algorithm proposed in this paper may speed up the procedure for the kinematics evaluation of human movement with a cost-effective set-up. An IMU integrating accelerometers and gyroscopes is more expensive and requires the use of a more complex HW/SW architecture for efficient signal processing. These costs increase even more with a multilink chain where one sensor per segment is required. One of the limitations of this study is the quasi-real time implementation due to the intrinsic delay imposed by the window size. Future studies will be addressed to this issue.

We would like to thank the reviewers for providing valuable suggestions that helped us to improve the manuscript.

Appendix A

For the sake of clarity, Equation (A1) is linearizable under the assumption of small angles and the sway angle θ(t) can be rewritten in the Laplace domain as sum of two first-order low-pass filters (FF, forward filter; BF, backward filter) applied to the accelerometer output:

θ ( s ) = a ( s ) 2 g ( 1 1 + τ s F F + 1 1 τ s B F ) τ = h g

In the discrete-time domain, assuming θ⃗k the signal obtained after the forward filtering and θ⃖k the signal after the backward filtering of the accelerometer output, Equation (A1) can be split in the two following equations:

{ θ k = a k 2 g + τ θ k + 1 2 θ k 1 2 T θ k = a k 2 g τ θ k + 1 2 θ k 1 2 T

By summing up and subtracting the two filtered signals of Equation (A2) we got:

{ θ k + θ k = a k g + τ T ( θ k + 1 2 θ k 1 2 θ k + 1 2 + θ k 1 2 ) = θ k θ k θ k = τ T ( θ k + 1 2 θ k 1 2 + θ k + 1 2 θ k 1 2 ) = τ T ( θ k + 1 2 θ k 1 2 )

By manipulating Equation (A3), the forward and backward filtered angles can be expressed as function of the sway angle as follows:

{ θ k = 1 2 [ θ k + τ T ( θ k 1 2 θ k + 1 2 ) ] θ k = 1 2 [ θ k τ T ( θ k 1 2 θ k + 1 2 ) ]

By substituting the two terms of Equation (A4) in the first of Equation (A3), it is trivial to obtain:

h T 2 θ k 1 2 ( g + h T 2 ) θ k + h T 2 θ k + 1 = a k
which has the same form of the tridiagonal system aixi−1 + bixi + cixi+1 = di (see Equation (8)) which is usually solved by applying the Thomas algorithm. It is worth noting that the coefficients of the tridiagonal system described by Equation (A5) are constant only for the linear case.

References

  1. Landau, L.D.; Lifshitz, E.M. Mechanics, 3rd ed. ed.; Pergamon: New York, NY, USA, 1976; pp. 93–95.
  2. Stocker, J.J. Nonlinear Vibrations in Mechanical and Electrical Systems, 1st ed. ed.; Wiley/Interscience: New York, NY, USA, 1966; pp. 202–213.
  3. Corben, H.C.; Stehele, P. Classical Mechanics, 2nd ed. ed.; Wiley: New York, NY. USA, 1960; pp. 67–69.
  4. Kalmus, H.P. The inverted pendulum. Am. J. Phys. 1978, 38, 874–878.
  5. Michaelis, M.M. Stroboscopic study of the inverted pendulum. Am. J. Phys. 1985, 53, 1079–1083.
  6. Friedman, M.H.; Campana, J.E.; Yergey, A.L. The inverted pendulum: A mechanical analog of the quadrupole mass filter. Am. J. Phys. 1982, 50, 924–931.
  7. Smith, H.J.T.; Blackburn, J.A. Experimental study of an inverted pendulum. Am. J. Phys. 1992, 60, 909–911.
  8. Lee, H.; Jung, S. Balancing and navigation control of a mobile inverted pendulum robot using sensor fusion of low cost sensors. Mechatronics 2012, 22, 95–105.
  9. Sivaraman, E.; Arulselvi, S. Modelling of an inverted pendulum based on fuzzy clustering technique. Int. J. Comp. Appl. 2012, 9, 23–31.
  10. Park, J.H.; Kim, K.D. Biped Robot Walking Using Gravity-Compensated Inverted Pendulum Mode and Computed Torque Control. Proceedings of the 1998 IEEE International Conference on Robotics & Automation, Leuven, Belgium, May 1998.
  11. Anderson, C.W. Learning to control an inverted pendulum using neural networks. IEEE Contr. Syst. Mag. 1989, 9, 31–37.
  12. Huang, S.J.; Huang, C.L. Control of an inverted pendulum using grey prediction model. IEEE Trans. Ind. Appl. 1994, 36, 452–458.
  13. Loram, I.D.; Lakie, M. Human balancing of an inverted pendulum: Position control by small, ballistic-like, throw and catch movement. J. Physiol. 2002, 540, 1111–1124.
  14. Macpherson, J.M.; Horak, F.B. Posture. In Principles of Neural Science; Kandel, E.R., Schwartz, J.H., Jessell, T.M., Eds.; McGraw-Hill: New York, NY, USA, 2000. Chapter 39.
  15. Guelton, K.; Delprat, S.; Guerra, T.M. An alternative to inverse dynamics joint torques estimation in human stance based on Takagi-Sugeno unknown-inputs observer in the descriptor form. Contr. Eng. Pract. 2008, 16, 1414–1426.
  16. Pinter, I.J.; van Swigchem, R.; van Soest, A.J.; Rozendaal, L.A. The dynamics of postural sway cannot be captured using a one-segment inverted pendulum model: A PCA on segment rotations during unperturbed stance. J. Neurophysiol. 2008, 100, 3197–3208.
  17. Creath, R.; Kiemel, T.; Horak, F.; Peterka, R.; Jeka, J. A unified view of quiet and perturbed stance: simultaneous co-existing excitable modes. Neurosci. Lett. 2005, 377, 75–80.
  18. Fuschillo, V.L.; Bagalà, F.; Chiari, L.; Cappello, A. Accelerometry-based prediction of movement dynamics for balance monitoring. Med. Biol. Eng. Comput. 2012, 50, 925–936.
  19. Bagalà, F.; Fuschillo, V.L.; Chiari, L.; Cappello, A. Calibrated 2D angular kinematics by single-axis accelerometers: From inverted pendulum to n-link chain. IEEE Sens. J. 2012, 12, 479–486.
  20. Sabatini, A.M. Estimating three-dimensional orientation of human body part by inertial/magnetic sensing. Sensors 2011, 11, 1489–1525.
  21. Bagalà, F.; Klenk, J.; Cappello, A.; Chiari, L.; Becker, C.; Lindemann, U. Quantitative description of the Lie-to-Sit-to-Stand-to-Walk transfer by a single body-fixed sensor. IEEE Trans. Neural. Syst. Rehabil. Eng. 2012. in press.
  22. Rotenberg, D.; Slycke, P.J.; Veltink, P.H. Ambulatory position and orientation tracking fusing magnetic and inertial sensing. IEEE Trans. Biomed. Eng. 2007, 54, 883–890.
  23. Cooper, G.; Sheret, I.; McMillian, L.; Siliverdis, K.; Sha, N.; Hodgins, D.; Kenney, L.; Howard, D. Inertial sensor-based knee flexion/extension angle estimation. J. Biomech. 2009, 42, 2678–2685.
  24. Dejnabadi, H.; Jolle, B.M.; Casanova, E.; Fua, P.; Aminian, K. Estimation and visualization of sagittal kinematics of lower limbs orientation using body-fixed sensors. IEEE Trans. Biomed. Eng. 2006, 53, 1385–1393.
  25. Kamen, G.; Patten, C.; Duke, D.C.; Sison, S. An accelerometry-based system for the assessment of balance and postural sway. Gerontology 1998, 44, 40–45.
  26. Moe-Nilssen, R. A new method for evaluating motor control in gait under real-life environmental conditions. Part 1: The instrument. Clin. Biomech. 1998, 13, 320–327.
  27. Mayagoitia, R.E.; Lötters, J.C.; Veltink, P.H.; Hermens, H. Standing balance evaluation using a triaxial accelerometer. Gait Posture 2002, 16, 55–59.
  28. Mayagoitia, R.E.; Nene, A.V.; Veltink, P.H. Accelerometer and rate gyroscope measurement of kinematics: An inexpensive alternative to optical motion analysis systems. J. Biomech. 2002, 35, 537–542.
  29. Lyons, G.M.; Culhane, K.M.; Hilton, D.; Grace, P.A.; Lyons, D. A description of an accelerometer-based mobility monitoring technique. Med. Eng. Phys. 2005, 27, 497–504.
  30. Williamson, R.; Andrews, B.J. Detecting absolute human knee angle and angular velocity using accelerometers and rate gyroscopes. Med. Biol. Eng. Comput. 2001, 39, 1–9.
  31. Thomas, L.H. Elliptic Problems in Linear Differential Equations over a Network. Watson Science Computer Laboratory Report; Columbia University: New York, NY, USA, 1949.
  32. Kalman, R. A new approach to linear filtering and prediction problems. Trans. ASME 1960, 82, 35–45.
  33. Welch, G.; Bishop, G. An Introduction to the Kalman Filter; University of North Carolina at Chapel Hill: Chapel Hill, CA, USA, 1995.
  34. Salem, G.J.; Salinas, R.; Harding, F.V. Bilateral kinematic and kinetic analysis of the squat exercise after anterior cruciate ligament reconstruction. Archive Phys. Med. Rehab. 2003, 84, 1211–1216.
  35. Arun, K.; Huang, T.; Blostein, S. Least-squares fitting of two 3-D point sets. IEEE Trans. Pattern Anal. Mach. Intell. 1987, 9, 698–700.
  36. Hanson, R.; Norris, M. Analysis of measurements based on the singular value decomposition. SIAM J. Sci. Stat. Comp. 1981, 2, 363–373.
Sensors 13 00918f1 200
Figure 1. (a) IP model and (b) IP model with misalignment of the sensitive axis of the SAA.

Click here to enlarge figure

Figure 1. (a) IP model and (b) IP model with misalignment of the sensitive axis of the SAA.
Sensors 13 00918f1 1024
Sensors 13 00918f2 200
Figure 2. Algorithm structure.

Click here to enlarge figure

Figure 2. Algorithm structure.
Sensors 13 00918f2 1024
Sensors 13 00918f3 200
Figure 3. Mechanical Inverted Pendulum.

Click here to enlarge figure

Figure 3. Mechanical Inverted Pendulum.
Sensors 13 00918f3 1024
Sensors 13 00918f4 200
Figure 4. Two-links model for the knee flexion-extension angle estimation.

Click here to enlarge figure

Figure 4. Two-links model for the knee flexion-extension angle estimation.
Sensors 13 00918f4 1024
Sensors 13 00918f5 200
Figure 5. Residual error between the encoder output and sway angle estimated from the accelerometer output in the mechanical inverted pendulum.

Click here to enlarge figure

Figure 5. Residual error between the encoder output and sway angle estimated from the accelerometer output in the mechanical inverted pendulum.
Sensors 13 00918f5 1024
Sensors 13 00918f6 200
Figure 6. (a) Window size vs. algorithm speed. (b) Window size vs. RMSE [%].

Click here to enlarge figure

Figure 6. (a) Window size vs. algorithm speed. (b) Window size vs. RMSE [%].
Sensors 13 00918f6 1024
Sensors 13 00918f7 200
Figure 7. Residual error of the knee flexion-extension angle estimated by the quasi-real time algorithm and the EKF fusing accelerometers and gyroscope outputs. The angle estimated by stereo-photogrammetry was used as reference.

Click here to enlarge figure

Figure 7. Residual error of the knee flexion-extension angle estimated by the quasi-real time algorithm and the EKF fusing accelerometers and gyroscope outputs. The angle estimated by stereo-photogrammetry was used as reference.
Sensors 13 00918f7 1024
Table 1. Averaged RMSEs for the mechanical IP.

Click here to display table

Table 1. Averaged RMSEs for the mechanical IP.
Tested algorithmsRMSE [°]
mean ± std
Quasi-real time algorithm0.40 ± 0.02
Bagalàet al. algorithm [19]0.39 ± 0.05
EKF: z ( k ) = [ a x ( k ) a y ( k ) g z ( k ) ] T0.45 ± 0.05
EKF: z ( k ) = [ a x ( k ) g z ( k ) ] T0.46 ± 0.05
EKF: z ( k ) = [ a y ( k ) g z ( k ) ] T2.12 ± 0.15
EKF: z ( k ) = [ a x ( k ) a y ( k ) ] T20.64 ± 12.48
EKF: z(k) = ax(k)26.71 ± 0.70
EKF: z(k) = ay(k)41.83 ± 7.50
EKF: z(k) = gz(k)8.87 ± 6.92
Table 2. Averaged RMSEs for the knee flex-extension angle.

Click here to display table

Table 2. Averaged RMSEs for the knee flex-extension angle.
Tested algorithmsRMSE [°]
mean ± std
Quasi-real time algorithm1.01 ± 0.11
Bagalà et al. algorithm [19]0.95 ± 0.48
EKF: z ( k ) = [ a x ( k ) a y ( k ) g z ( k ) ] T2.43 ± 0.76
EKF: z ( k ) = [ a x ( k ) g z ( k ) ] T2.46 ± 0.62
EKF: z ( k ) = [ a y ( k ) g z ( k ) ] T2.83 ± 0.24
EKF: z ( k ) = [ a x ( k ) a y ( k ) ] T37.13 ± 18.28
EKF: z(k) = ax(k)19.31 ± 0.64
EKF: z(k) = ay(k)43.27 ± 5.05
EKF: z(k) = gz(k)3.95 ± 2.59
Sensors EISSN 1424-8220 Published by MDPI AG, Basel, Switzerland RSS E-Mail Table of Contents Alert