Skip to main content
Sensors (Basel, Switzerland) logoLink to Sensors (Basel, Switzerland)
. 2013 Jan 15;13(1):918–937. doi: 10.3390/s130100918

Quasi-Real Time Estimation of Angular Kinematics Using Single-Axis Accelerometers

Alessio Caroselli 1, Fabio Bagalà 1,*, Angelo Cappello 1,2
PMCID: PMC3574712  PMID: 23322097

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:

ax(t)=hα(t)gsinθ(t) (1)

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 Mmd=Jmdα(t)gsinθ(t) becomes similar to Equation (1) since Mmd has the dimension of an acceleration and Jmd 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).

Figure 1.

Figure 1.

(a) IP model and (b) IP model with misalignment of the sensitive axis of the SAA.

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:

ax(t)=hα(t)gsinθ(t)+β[hω2(t)gcosθ(t)] (2)

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:

ax,k=hαkgsinθk+β[hωk2gcosθk]k=1,,N (3)

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:

ax,k=hT2(ϑk+12θk+θk1)gsinθkθkθk+β[h(θk+1θk12T)2gcosθk]k=2,,N1 (4)

where T is the sample time. Equation (4) can be rewritten as follows:

ax,k=hT2θk1hT2θk+1+(2hT2gsinθkθk)ϑk+β(hT2(θk+1θk1)24gcosθk)k=2,,N1 (5)

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:

[ax,2ax,W1]A=[C2B00BC300B00BCW1]C[θ2θW1]θ+{B[θ100θW]+βB4[(θ3θ1)2(θ4θ2)2(θW1θW3)2(θWθW2)2]gβ[cosθ2cosθW1]}D (6)

where B=hT2, Ck=2Bgsinθkθk(k=2,,W1). 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:

θ=C1(AD) (7)

The computational cost for the inversion of N-square tridiagonal matrix is 16N3+O(N2), 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θ=(AD)ACθ=A (8)

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.

Figure 2.

Figure 2.

Algorithm structure.

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):

  1. 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θk1. The sliding window of the accelerometer output A(1) = [ax,2 …, ax,W−1]T is considered as input.

  2. 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.

  3. 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.

  4. 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θW1(k)θW2(k)k=2,,N1

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

  5. 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:

CT=fs(NW)I¯Ci (9)

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).

Figure 3.

Figure 3.

Mechanical Inverted Pendulum.

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:

ax,k=hαkgsinθk+β[hωk2gcosθk]ay,k=hωk2+gcosθk+β[hαkgsinθk]gz,k=ωkk=1,,N (10)

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:

xk+1=Axk+wkzk=h(xk)+vk (11)

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:

xk+1=[1TT2/201T001]A[3×3]xk (12)

The vector of the measurements z(k)[3×1] was defined considering the outputs of the sensors as z(k)=[ax(k)ay(k)gz(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)=[ax(k)ay(k)gz(k)]T;

  • z(k)=[ax(k)gz(k)]T;

  • z(k)=[ay(k)gz(k)]T;

  • z(k)=[ax(k)ay(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.

Figure 4.

Figure 4.

Two-links model for the knee flexion-extension angle estimation.

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:

{at,x=l1d2[sinθ1(t)]dt2|t=kTl1sinθ1,k+12sinθ1,k+sinθ1,k1T2ac,x=l1d2[cosθ1(t)]dt2|t=kTl1cosθ1,k+12cosθ1,k+cosθ1,k1T2 (13)

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

ax,k(2)=h2α2.kgsinθ2.k+β2[h2ω2,k2gcosθ2.k]+at,kcos(θ2,k+β2)ac,ksin(θ2,k+β2)ay,k(2)=h2ω2,k2+gcosθ2.k+β2[h2α2.kgsinθ2.k]+at,ksin(θ2,k+β2)+ac,kcos(θ2,k+β2)gz,k(2)=ω2,kk=1,,N (14)

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:

ax,k(1)=h1α1,kgsinθ1,k+β1[h1ω1,k2gcosθ1,k]ay,k(1)=h1ω1,k2+gcosθk+β1[h1α1,kgsinθ1,k]gz,k(1)=ω1,kk=1,,N (15)

The accelerometers outputs ax,k(1), ax,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+[at,kcos(θ2,2+β2)ac,2sin(θ2,2+β2)at,W1cos(θ2,W1+β2)ac,W1sin(θ2,W1+β2)] (16)

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)=[ax(1)(k)ay(1)(k)gz(1)(k)ax(2)(k)ay(2)(k)gz(2)(k)]T;

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

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

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

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

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

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

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

θknee=π(θshankθthigh) (17)

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.

Table 1.

Averaged RMSEs for the mechanical IP.

Tested algorithms RMSE [°]
mean ± std
Quasi-real time algorithm 0.40 ± 0.02
Bagalàet al. algorithm [19] 0.39 ± 0.05
EKF:
z(k)=[ax(k)ay(k)gz(k)]T
0.45 ± 0.05
EKF:
z(k)=[ax(k)gz(k)]T
0.46 ± 0.05
EKF:
z(k)=[ay(k)gz(k)]T
2.12 ± 0.15
EKF:
z(k)=[ax(k)ay(k)]T
20.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

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.

Figure 5.

Figure 5.

Residual error between the encoder output and sway angle estimated from the accelerometer output in the mechanical inverted pendulum.

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).

Figure 6.

Figure 6.

(a) Window size vs. algorithm speed. (b) Window size vs. RMSE [%].

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, ax,k(1), ax,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°.

Table 2.

Averaged RMSEs for the knee flex-extension angle.

Tested algorithms RMSE [°]
mean ± std
Quasi-real time algorithm 1.01 ± 0.11
Bagalà et al. algorithm [19] 0.95 ± 0.48
EKF:
z(k)=[ax(k)ay(k)gz(k)]T
2.43 ± 0.76
EKF:
z(k)=[ax(k)gz(k)]T
2.46 ± 0.62
EKF:
z(k)=[ay(k)gz(k)]T
2.83 ± 0.24
EKF:
z(k)=[ax(k)ay(k)]T
37.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

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.

Figure 7.

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.

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.

Acknowledgments

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)2g(11+τsFF+11τsBF)τ=hg (A1)

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=ak2g+τθk+12θk12Tθk=ak2gτθk+12θk12T (A2)

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

{θk+θk=akg+τT(θk+12θk12θk+12+θk12)=θkθkθk=τT(θk+12θk12+θk+12θk12)=τT(θk+12θk12) (A3)

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

{θk=12[θk+τT(θk12θk+12)]θk=12[θkτT(θk12θk+12)] (A4)

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

hT2θk12(g+hT2)θk+hT2θk+1=ak (A5)

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. Pergamon; New York, NY, USA: 1976. pp. 93–95. [Google Scholar]
  • 2.Stocker J.J. Nonlinear Vibrations in Mechanical and Electrical Systems. 1st ed. Wiley/Interscience; New York, NY, USA: 1966. pp. 202–213. [Google Scholar]
  • 3.Corben H.C., Stehele P. Classical Mechanics. 2nd ed. Wiley; New York, NY. USA: 1960. pp. 67–69. [Google Scholar]
  • 4.Kalmus H.P. The inverted pendulum. Am. J. Phys. 1978;38:874–878. [Google Scholar]
  • 5.Michaelis M.M. Stroboscopic study of the inverted pendulum. Am. J. Phys. 1985;53:1079–1083. [Google Scholar]
  • 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. [Google Scholar]
  • 7.Smith H.J.T., Blackburn J.A. Experimental study of an inverted pendulum. Am. J. Phys. 1992;60:909–911. [Google Scholar]
  • 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. [Google Scholar]
  • 9.Sivaraman E., Arulselvi S. Modelling of an inverted pendulum based on fuzzy clustering technique. Int. J. Comp. Appl. 2012;9:23–31. [Google Scholar]
  • 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. [Google Scholar]
  • 11.Anderson C.W. Learning to control an inverted pendulum using neural networks. IEEE Contr. Syst. Mag. 1989;9:31–37. [Google Scholar]
  • 12.Huang S.J., Huang C.L. Control of an inverted pendulum using grey prediction model. IEEE Trans. Ind. Appl. 1994;36:452–458. [Google Scholar]
  • 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. doi: 10.1113/jphysiol.2001.013077. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Macpherson J.M., Horak F.B. Posture. In: Kandel E.R., Schwartz J.H., Jessell T.M., editors. Principles of Neural Science. McGraw-Hill; New York, NY, USA: 2000. Chapter 39. [Google Scholar]
  • 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. [Google Scholar]
  • 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. doi: 10.1152/jn.01312.2007. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1016/j.neulet.2004.11.071. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1007/s11517-012-0940-6. [DOI] [PubMed] [Google Scholar]
  • 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. [Google Scholar]
  • 20.Sabatini A.M. Estimating three-dimensional orientation of human body part by inertial/magnetic sensing. Sensors. 2011;11:1489–1525. doi: 10.3390/s110201489. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 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 doi: 10.1109/TNSRE.2012.2230189. in press. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1109/TBME.2006.889184. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1016/j.jbiomech.2009.08.004. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1109/TBME.2006.873678. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1159/000021981. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1016/s0268-0033(98)00089-8. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1016/s0966-6362(01)00199-0. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1016/s0021-9290(01)00231-7. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1016/j.medengphy.2004.11.006. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1007/BF02345283. [DOI] [PubMed] [Google Scholar]
  • 31.Thomas L.H. Elliptic Problems in Linear Differential Equations over a Network. Columbia University; New York, NY, USA: 1949. Watson Science Computer Laboratory Report. [Google Scholar]
  • 32.Kalman R. A new approach to linear filtering and prediction problems. Trans. ASME. 1960;82:35–45. [Google Scholar]
  • 33.Welch G., Bishop G. An Introduction to the Kalman Filter. University of North Carolina at Chapel Hill; Chapel Hill, CA, USA: 1995. [Google Scholar]
  • 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. doi: 10.1016/s0003-9993(03)00034-0. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1109/tpami.1987.4767965. [DOI] [PubMed] [Google Scholar]
  • 36.Hanson R., Norris M. Analysis of measurements based on the singular value decomposition. SIAM J. Sci. Stat. Comp. 1981;2:363–373. [Google Scholar]

Articles from Sensors (Basel, Switzerland) are provided here courtesy of Multidisciplinary Digital Publishing Institute (MDPI)

RESOURCES