# Use of weighted Fourier linear combiner filters to estimate lower trunk 3D orientation from gyroscope sensors data

- Vincent Bonnet†
^{1}Email author, - Claudia Mazzà†
^{1}, - John McCamley†
^{1}and - Aurelio Cappozzo†
^{1}

**10**:29

https://doi.org/10.1186/1743-0003-10-29

© Bonnet et al.; licensee BioMed Central Ltd. 2013

**Received: **27 April 2012

**Accepted: **14 February 2013

**Published: **11 March 2013

## Abstract

### Background

The present study aimed at devising a data processing procedure that provides an optimal estimation of the 3-D instantaneous orientation of an inertial measurement unit (IMU). This result is usually obtained by fusing the data measured with accelerometers, gyroscopes, and magnetometers. Nevertheless, issues related to compensation of integration errors and high sensitivity of these devices to magnetic disturbances call for different solutions. In this study, a method based on the use of gyroscope data only is presented, which uses a Weighted Fourier Linear Combiner adaptive filter to perform a drift-free estimate of the 3D orientation of an IMU located on the lower trunk during walking.

### Methods

A tuning of the algorithm parameters and a sensitivity analysis to its initial conditions was performed using treadmill walking data from 3 healthy subjects. The accuracy of the method was then assessed using data collected from 15 young healthy subjects during treadmill walking at variable speeds and comparing the pitch, roll, and yaw angles estimated from the gyroscopes data to those obtained with a stereophotogrammetric system. Root mean square (*RMS*) difference and correlation coefficients (*r*) were used for this purpose.

### Results

An optimal set of values of the algorithm parameters was established. At all the observed speeds, and also in all the various sub-phases, the investigated angles were all estimated to within an average *RMS* difference of less than 1.2 deg and an average *r* greater than 0.90.

### Conclusions

This study proved the effectiveness of the Weighted Fourier Linear Combiner method in accurately reconstructing the 3D orientation of an IMU located on the lower trunk of a subject during treadmill walking. This method is expected to also perform satisfactorily for overground walking data and to be applicable also to other “quasi-periodic” tasks, such as squatting, rowing, running, or swimming.

## Background

Inertial measurement units (IMUs) have gained in popularity as a tool to quantify human motion [1], thanks to their ease-of-use, robust design, and their small dimensions. In the same time, electronics mass-market companies provided low cost devices, such as cell-phones, that contain embedded IMU devices along with recording and transmission capabilities. These advantages enable their use for extended periods outside the confines of a laboratory.

An IMU normally includes accelerometers and gyroscopes to measure three accelerations and three angular velocities, respectively. Theoretically, the determination of the position and orientation in space of such a device could be obtained by double and single integration of the above signals, respectively. Unfortunately, the IMU outputs are subject to drift over time, which jeopardizes the time integration of the raw signals [2]. The additional use of magnetometers has been proposed to compensate for the integration errors, but their effectiveness is limited by their high sensitivity to magnetic disturbances [3, 4].

The present study focused on the estimate of orientation and aimed at devising a data processing procedure that would compensate for the above-mentioned drift and provide an optimal estimation of the 3-D instantaneous orientation of the IMU and, therefore, of the body segment it is attached to.

As reported in the literature, the use of recursive filters, such as the Kalman filter, allows the real-time accurate estimate of lower trunk 2D orientation (pitch and roll angles) from the measurement of three accelerations and three angular velocities [5]. A possible alternative is represented by model-based adaptive filters, which can be used when it is possible to formulate reliable hypotheses about the shape and the time evolution of the signal, which is plausible when the type of motor task performed is known [2]. Among the most popular model-based adaptive filters are the Fourier Linear Combiner (FLC) filters [6, 7]. These filters, which model the measured signal by a Fourier series, are effective when dealing with periodic signals, which is hardly ever the case in biomechanics in general, and in human movement in particular. For this reason, while dealing with the real-time analysis and cancellation movements such as hand tremor, Riviere and his colleagues [8] proposed the use of Weighted Fourier Linear Combiner (WFLC) filters. These filters are an extension of the FLC to be used when investigating signals that display an oscillatory pattern but with a time-varying period. Human walking is a phenomenon that, although for analysis purposes is most of the time hypothesized to be periodic, it does exhibit minor features that vary from stride to stride and, as such, may be defined as quasi-periodic. WFLC filters could hence be considered to be suitable for analyzing gait related data.

This paper proposes the use of a WFLC adaptive filter to perform drift-free 3D orientation angle estimation starting from the measurement of three angular velocities as provided by three orthogonally mounted gyroscopes. The accuracy of the method was assessed using data concerning the orientation of the lower trunk and collected while volunteers walked on a treadmill at different speeds, both at quasi steady-state and in accelerating and decelerating conditions.

## Methods

The proposed method for the estimate of the 3D sensor orientation is based on two main steps. First, a tracking of each of the three measured angular velocity components is performed by identifying the corresponding Fourier series coefficients using the WFLC. The identified Fourier series are then analytically integrated to estimate the three orientation angles.

### The WFLC filter

*k*(

*s*

_{ k }). Depending on the instantaneous difference

*ε*

_{ k }between the signal

*s*

_{ k }and the output estimated by the WFLC, $\left({\widehat{S}}_{k}\right)$, the WFLC computes the Fourier series coefficients that will represent the measured signal at time

*k*+1. This result is obtained by adjusting, at each iteration, the so-called filter weights, ${w}_{{0}_{k}}$ (the frequency weight, taking into account for the fundamental pulsation) and w

_{ k }(the vector containing the amplitude weights), using the least mean square (LMS) algorithm proposed by Widrow et al. [9]. Initial values of the weights, ${w}_{{0}_{1}}$ and w

_{1,}need, of course, to be provided.

where *M* is the order of the Fourier series representing the measured signal *s*.

*μ*

_{0}and

*μ*being the so called frequency and amplitude adaptation gains, respectively. ${w}_{{b}_{k}}$ is introduced in the computation of

*ε*

_{ k }to estimate the bias present in the signal [9–11], due to possible low frequency components and/or drift, and remove it. It is computed as:

where *μ*_{
b
} is the so called bias adaptation gain.

The three adaptation gains, *μ*_{0}, *μ,* and *μ*_{
b
} determine the convergence time, the accuracy of the algorithm in tracking the measured signal, and the algorithm stability at each sample of time. It has to be noted that the algorithm convergence time cannot be analytically computed [8] and that high values of the gains can improve tracking of the input signal, but can also cause the algorithm to diverge.

In order to allow the use of higher gains, the WFLC can be run twice [8]: the first time using high *μ*_{0} and low *μ* values to identify the frequency weight ${w}_{{0}_{k}}$ and the second time using the so identified ${w}_{{0}_{k}}$ and a higher *μ* (*μ*_{
FLC
}) to identify w_{k}. It has to be noted that the latter use of the WFLC algorithm, in which equation 1c is ignored, makes it equivalent to an FLC [6–8].

### Analytical integration

*f*

_{s}is the sampling frequency. The instantaneous estimate ${\widehat{s}}_{{i}_{k}}$ of the integral of the measured angular velocity is then obtained as [2], [11, 12]:

### Experimental session

A total of 18 volunteers (10 males, 8 females, age range: 24–64 years, stature: 1.76±0.09 m, mass: 78±11 kg) were included in the study after signing an informed consent. They were asked to perform three walking trials at natural walking speed (as measured over level ground), 80% and 120% of natural speed on a motorized treadmill. The subjects initially stood on the treadmill, which was then accelerated to the desired velocity. After 35 s of steady state walking, the treadmill was decelerated and stopped for 5 s, before being reaccelerated to the same velocity for additional 35 s and then stopped again, for a total recording time of 80 s. The transition and stopping phases were used to assess the ability of the proposed algorithm to provide accurate estimates also during non-periodic motion over a short interval of time.

An IMU (Freesense, Sensorize srl) was located on the lower back of the subjects so that the unit local frame (ULF) axes were aligned with the anatomical axes of the lower trunk. In addition, three retro-reflective markers were attached to the IMU sensor in order to define a marker-cluster local frame (MLF). Acceleration and angular velocity data were collected from the IMU (*f*_{
s
}*=* 100 samples·s^{-1}) while the marker trajectories were tracked by five infrared cameras (MX, Vicon, *f*_{
s
}*=* 100 samples·s^{-1}).

Pitch, roll and yaw angles, describing the orientation of the ULF, were estimated from the IMU data using the WFLC algorithm and those describing the orientation of the MLF were reconstructed using the stereophotogrammetric system. The time invariant offset of the MLF orientation relative to the ULF orientation was mathematically removed through a rigid transformation while the subject was standing still. In this way both instruments could be assumed to provide pitch, roll, and yaw angles of the same lower trunk anatomical frame. Pitch, roll and yaw angles, can hence be associated with lower-trunk frontal and lateral bending and axial rotation, respectively.

It should be noted that in this study the stereophotogrammetric errors [13] propagate to the angles of interest causing a maximal inaccuracy of 0.5 deg.

### Tuning of the algorithm parameters

The order of the Fourier series *M,* representing the measured signal *s,* was set to *M*=1. This conservative choice was initially made following the literature [2, 8] and was supported by a preliminary analysis, in which higher values of *M* caused convergence problems, leading to very inaccurate and unrealistic estimates for some of the investigated trials. Conversely, the choice of *M*=1 guaranteed the stability of the algorithm for all trials and all subjects.

In order to provide the best trade-off between accuracy, stability and robustness of the above described method, data recorded from three randomly selected subjects at three different speeds were used to determine the optimal combination of the WFLC gains *μ*, *μ*_{
0
}, *μ*_{
b
}. To this purpose, the three combinations of gains that minimize the three cost functions defined for the pitch, roll, and yaw angles, *J*_{
P
}, *J*_{
R,
}*J*_{
Y
}*,* respectively, were searched for. Each of these cost functions was calculated as the average over the nine trials of the root mean square (*RMS*) differences between the angle calculated from the stereophotogrammetric data and the one calculated from the IMU.

The WFLC algorithm requires an initial estimate of the value of the frequency weight *w*_{
0
} (equation 1c and Figure 1). A sensitivity analysis of the effects of varying *w*_{
0
} was performed to choose this value by searching for the frequency value that minimized the cost function *J*_{
RMS
} = (*J*_{
P
} + *J*_{
Y
} + *J*_{
R
})/3. The tested range of frequencies was 0.1-5 Hz, which is expected to include all possible walking related frequencies.

### Assessment of estimate accuracy

*RMS*, correlation coefficient

*r*, and offset values between estimated and measured angles were calculated for the whole trials (80 s), for the steady-state sub-phase (25 s), and for the transient sub-phase, which included the deceleration, stopping and acceleration phases (15 s) (Figure 3).

## Results

*μ*=0.160,

*μ*

_{ 0 }=1e

^{-5},

*μ*

_{ b }=5e

^{-4}; Roll:

*μ*=0.160,

*μ*

_{ 0 }=5e

^{-5},

*μ*

_{ b }=1e

^{-3}; Yaw:

*μ*=0.135,

*μ*

_{ 0 }=1e

^{-3},

*μ*

_{ b }=5e

^{-4}. The corresponding

*RMS*values were

*J*

_{ P }=0.8±0.2 deg,

*J*

_{ R }=0.4±0.1 deg, and

*J*

_{ Y }=1.0±0.5 deg.

The results of the sensitivity analysis concerning the choice of *w*_{
0
} are shown in Figure 2. The values obtained for *J*_{
RMS
} ranged from 1.3 to 0.65 deg, with very small variations observed for *w*_{
0
} varying in the range of 1–3 Hz, indicating a low sensitivity of the outputs to this initial condition.

The minimum *J*_{
RMS
} value was found for *w*_{
0
}*=* 2 Hz*.*

The ability of the WFLC algorithms to track a measured angular velocity is depicted in Figure 3, where the results are shown for one randomly selected entire trial. It should be noted that, after the stopping phase, the algorithm rapidly re-converges as soon as the subject starts walking again.

**Results of the accuracy analysis**

Pitch | Roll | Yaw | ||||||||
---|---|---|---|---|---|---|---|---|---|---|

Trials | RMS(deg) | r | Offset (deg) | RMS(deg) | r | Offset (deg) | RMS(deg) | r | Offset (deg) | |

Whole trial | Slow | 0.9±0.3 | 0.93±0.04 | 2.2±1.6 | 0.5±0.1 | 0.92±0.04 | 0.7±0.4 | 1.1±0.6 | 0.80±0.16 | 2.4±3.0 |

Natural | 0.8±0.2 | 0.95±0.03 | 1.4±1.4 | 0.4±0.1 | 0.94±0.02 | 0.9±0.0 | 1.1±0.7 | 0.82±0.14 | 2.6±2.6 | |

Fast | 0.9±0.3 | 0.93±0.03 | 2.4±1.5 | 0.4±0.0 | 0.95±0.02 | 0.9±0.0 | 1.2±0.7 | 0.82±0.19 | 2.9±2.8 | |

Steady state | Slow | 0.7±0.2 | 0.97±0.02 | 2.0±1.6 | 0.4±0.1 | 0.95±0.03 | 0.8±0.4 | 0.7±0.4 | 0.86±0.14 | 2.9±2.9 |

Natural | 0.8±0.2 | 0.96±0.02 | 1.4±1.4 | 0.4±0.1 | 0.97±0.02 | 0.9±0.0 | 1.1±0.7 | 0.83±0.17 | 2.6±2.6 | |

Fast | 0.7±0.3 | 0.96±0.03 | 2.7±1.7 | 0.4±0.1 | 0.96±0.05 | 0.7±0.6 | 1.1±0.8 | 0.86±0.24 | 2.9±2.4 | |

Stopping Phase | Slow | 0.6±0.2 | 0.98±0.01 | 2.4±1.9 | 0.4±0.1 | 0.96±0.02 | 0.8±0.7 | 0.7±0.4 | 0.93±0.04 | 2.9±3.4 |

Natural | 0.8±0.2 | 0.98±0.02 | 2.4±1.4 | 0.4±0.1 | 0.95±0.01 | 0.9±0.0 | 1.1±0.7 | 0.94±0.03 | 2.6±2.6 | |

Fast | 0.7±0.2 | 0.98±0.01 | 2.3±1.5 | 0.4±0.1 | 0.96±0.03 | 0.7±0.0 | 1.2±0.8 | 0.89±0.06 | 2.9±3.1 |

The mean (standard deviation), *RMS*, *r* and offset values for the 45 trials that were not used for the gains identification are reported in Table 1. At all the observed speeds, all the investigated angles were estimated within an average of less than 1.2 deg and with average correlation coefficients greater than 0.90 (with the highest values found for the yaw angles). This applied to both the whole trials and to their sub-phases. An average offset of less than 3 deg was found, with lowest values observed for the roll angle.

## Discussion

The aim of this study was to validate a method based on the use of a WFLC adaptive filter approach, to obtain a drift-free estimate of the 3D orientation of a sensor attached to the lower trunk for a prolonged period of time during treadmill walking, from angular velocities recorded using only one IMU.

A tuning of the WFLC was initially performed, to find optimal values of its gains. A sensitivity analysis was then performed to assess the effects of changes in algorithm frequency weight *w*_{
0
}, which is crucial for ensuring that equation 2, and hence the output of the proposed method, are not determinate. Results of this analysis showed that the outputs were always determinate for frequencies ranging between 0.1 Hz and 5 Hz, and that frequencies ranging from 1 Hz to 3 Hz led to very similar results. It has to be noted that these frequencies are actually those expected to be of interest when dealing with human locomotor tasks.

After the above tuning process, the method proved to be very accurate in estimating all the three angles, for all the observed speed conditions and also when the subjects were not walking at steady state. Interestingly, the convergence time of the algorithms, which generally depends on the signal properties, appeared to be negligible for the specific investigated application, as shown by the fact that the results obtained for the transition phases were almost identical to those obtained in the steady state phase (Table 1). This ability of the method to provide accurate angle estimations during non-periodic motion (acceleration and deceleration phases) and during short intervals of almost no motion (stopping phase) opens the way to future applications, such as uncontrolled walking.

The accuracy of the estimates of lower trunk bending in the sagittal (pitch) and frontal (roll) planes is similar to that obtained in a previous study using a properly optimized Kalman filter [5]. A clear advantage of the proposed method is that, conversely from the previous approach, it uses only the angular velocity signals. Nevertheless, the Kalman filter approach is expected to be more robust for non-periodic motions than the proposed method, since it does not require any a-priori assumption about the signal characteristics.

It has been previously shown that when tracking signals that have a frequency content composed by many frequencies that are close to each other, the performance of the WFLC can be degraded [8]. A Band-limited Multiple Fourier Linear Combiner (BMFLC) [12], [14] can be used to overcome this problem. However, the BMFLC filter requires an *a priori* determined set of frequencies, which is not always available when dealing with human movement analysis applications [15, 16]. Numerical integration, as associated with WFLC-BMFLC adaptive filters, has been recently used successfully for tremor cancelation [14]. This numerical approach, however, requires the use of a high-pass filter, which allows easy separation of the tremor oscillations (high frequency) from the voluntary motion (low frequency). Unfortunately, this approach is not suitable for lower trunk angular velocity data recorded during walking, when the determination of high-pass filter cut-off frequency is not straight forward due to the variability of walking speed and to the fact that most of the gyroscope signals power is within the low frequencies, which hinder the determination of a proper high-pass cut-off frequency

In conclusion, this study proved the effectiveness of the WFLC method in accurately reconstructing the 3D orientation of an IMU located on the lower trunk of a subject during treadmill walking. This method is expected to also perform satisfactorily for overground walking data. The small differences in the values of the measured angular velocities which might be observed between treadmill and level walking data, might require an adjustment of the identified values of the algorithm gains. Further studies are needed to test the suitability of the method for the assessment of pathological gaits and to examine the generalizability of the method to other “quasi-periodic” tasks, such as squatting, rowing, running, or swimming.

## Notes

## Declarations

### Acknowledgments

This study is part of the SIVAM project co-funded by the Italian Ministry of Economic Development – ICE (framework agreement with CRUI) – call 2010, by Letsense srl, by ITOP Officine Ortopediche spa, and by the authors’ University.

## Authors’ Affiliations

## References

- Moe-Nilssen R, Helbostad JL:
**Estimation of gait cycle characteristics by trunk accelerometry.***J Biomech*2004,**37:**121-126. 10.1016/S0021-9290(03)00233-1View ArticlePubMedGoogle Scholar - Tan UX, Veluvolu KC, Latt WT, Shee CY, Riviere CN, Ang WT:
**Estimating displacement of periodic motion with inertial sensors.***IEEE Sensors J*2008,**8:**1385-1388.View ArticleGoogle Scholar - Caruso MJ:
**Applications of magnetic sensors for low cost compass systems.**In*Proceedings of IEEE Position, Location and Navigation Symp:13–16 March 2000*. San Diego, CA; 2000:177-184.View ArticleGoogle Scholar - Kemp B, Janssen AJMW, van der Kamp B:
**Body position can be monitored in 3D using accelerometers and earth-magnetic field sensors.***Electroencephalogr ClinNeurophysiol*1998,**109:**484-488. 10.1016/S0924-980X(98)00053-8View ArticleGoogle Scholar - Mazzà C, Donati M, McCamley J, Picerno P, Cappozzo A:
**An optimized Kalman filter for the estimate of trunk orientation from inertial sensors data during treadmill walking.***Gait Posture*2011,**35:**138-142.View ArticlePubMedGoogle Scholar - Vaz CA, Kong X, Thakor NV:
**An adaptive estimation of periodic signals using a Fourier linear combiner.***IEEE Trans Signal Process*1994,**42:**1-10. 10.1109/78.258116View ArticleGoogle Scholar - Vaz CA, Thakor NV:
**Adaptive Fourier estimation of time varying evoked potentials.***IEEE Trans Biomed Eng*1989,**36:**448-455. 10.1109/10.18751View ArticlePubMedGoogle Scholar - Riviere CN, Rader RS, Thakor NV:
**Adaptive cancelling of physiological tremor for improved precision in microsurgery.***IEEE Trans Biomed Eng*1998,**45:**839-846. 10.1109/10.686791View ArticlePubMedGoogle Scholar - Widrow B, Stearns SD:
*Adaptive Signal Processing*. Englewood Cliffs: Prentice-Hall; 1985.Google Scholar - Gallego JA, Rocon E, Roa JO, Moreno JC, Pons JL:
**Real-time estimation of pathological tremor parameters from gyroscope data.***Sensors J*2010,**10:**2129-2149. 10.3390/s100302129View ArticleGoogle Scholar - Veluvolu KC, Ang WT:
**Estimation of physiological tremor from accelerometers for real-time applications.***Sensors J*2011,**11:**3020-3036. 10.3390/s110303020View ArticleGoogle Scholar - Veluvolu KC, Latt WT, Ang WT:
**Double adaptive bandlimited multiple Fourier linear combiner for real-time estimation/filtering of physiological tremor.***Biomed Signal Proces*2009,**5:**37-44.View ArticleGoogle Scholar - Chiari L, Della Croce U, Leardini A, Cappozzo A:
**Human movement analysis using stereophotogrammetry. Part 2: instrumental errors.***Gait Posture*2005,**21:**197-211. 10.1016/j.gaitpost.2004.04.004View ArticlePubMedGoogle Scholar - Latt WT, Veluvolu KC, Ang WT:
**Drift-free position estimation of periodic or quasi-periodic motion using inertial sensors.***Sensors*2011,**11:**5931-595. 10.3390/s110605931PubMed CentralView ArticlePubMedGoogle Scholar - Pecoraro F, Mazzà C, Zok M, Cappozzo A:
**Assessment of level-walking aperiodicity.***J Neuroeng Rehabil*2006,**3:**28. 10.1186/1743-0003-3-28PubMed CentralView ArticlePubMedGoogle Scholar - Balasubramanian CK, Neptune RR, Kautz SA:
**Variability in spatiotemporal step characteristics and its relationship to walking performance post-stroke.***Gait Posture*2009,**2:**408-414.View ArticleGoogle Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.