# Signal Quality Improvement Algorithms for MEMS Gyroscope-Based Human Motion Analysis Systems: A Systematic Review

^{1}

School of Innovation, Design and Engineering, Mälardalen University, 721 23 Västerås, Sweden

^{2}

Motion Control i Västerås AB, 721 30 Västerås, Sweden

^{*}

Author to whom correspondence should be addressed.

Received: 7 March 2018 / Revised: 2 April 2018 / Accepted: 4 April 2018 / Published: 6 April 2018

(This article belongs to the Special Issue Sensor Signal and Information Processing)

Motion sensors such as MEMS gyroscopes and accelerometers are characterized by a small size, light weight, high sensitivity, and low cost. They are used in an increasing number of applications. However, they are easily influenced by environmental effects such as temperature change, shock, and vibration. Thus, signal processing is essential for minimizing errors and improving signal quality and system stability. The aim of this work is to investigate and present a systematic review of different signal error reduction algorithms that are used for MEMS gyroscope-based motion analysis systems for human motion analysis or have the potential to be used in this area. A systematic search was performed with the search engines/databases of the ACM Digital Library, IEEE Xplore, PubMed, and Scopus. Sixteen papers that focus on MEMS gyroscope-related signal processing and were published in journals or conference proceedings in the past 10 years were found and fully reviewed. Seventeen algorithms were categorized into four main groups: Kalman-filter-based algorithms, adaptive-based algorithms, simple filter algorithms, and compensation-based algorithms. The algorithms were analyzed and presented along with their characteristics such as advantages, disadvantages, and time limitations. A user guide to the most suitable signal processing algorithms within this area is presented.

## 1. Introduction

In contemporary/modern society, demographic changes of population and multiple diseases lead to increasing demands on and costs for the healthcare systems [1]. Thus, home-based wearable self-controlled medical sensor systems have become a research topic of interest in the healthcare area, in which human motion analysis is important because of its crucial applications. For example, sensor systems for rehabilitation, athletic performance evaluation/analysis, and monitoring of health for the elderly who are alone at home are in extremely high demand [2].

Microelectromechanical system (MEMS) sensors have been widely used in many areas where miniature sensors that are of a low cost and low weight are desired [3]. MEMS technology has enabled the development of miniaturized inertial sensors, which have been used in motor activity and other health status monitoring systems [4]. They have already been widely applied in motion analysis systems in the medical field for knee/ankle joint measurement [5,6,7,8], gait analysis [9,10], ambulatory measurement and analysis of the lower limbs [11,12], the collection of anatomical joint angles during stair ascent [13], hand gesture recognition [14,15,16], head-motion-controlled wheelchairs [17], a head-motion-controlled mouse [18,19], and digital motion analysis systems for rehabilitation from impairments such as those caused by accidents or stroke [20,21]. An MEMS-based small wearable embedded sensor system for motion analysis is a typical solution for a free-living measurement environment.

MEMS-based motion sensors such as MEMS gyroscopes and MEMS accelerometers are microscale inertial sensors that have the advantages of a small size, light weight, low cost, low power consumption, high sensitivity, and high precision [22]. However, the resolution and stability of MEMS inertial sensors are not adequate and must be improved in sensor networking, for example, for the monitoring of human motion, the distribution of earthquakes, and the vibration of buildings [23]. MEMS gyroscope signal errors are often due to their high sensitivity to environmental disturbances such as shocks, vibrations, and temperature changes [24]. For human motion analysis with wearable sensor systems, large amounts of noise, such as human tremors and environmental vibrations, are included in the measurement signals [25,26,27]. For position measurements, the angular position can be determined by integrating the measured MEMS gyroscope signal. One step of integration is needed from the measured MEMS gyroscope signal to the angular position. However, errors are accumulated by the integration. Accumulated error can also be regarded as drift due to numerical integration during the position calculation [28]. Signal processing algorithms/methods are an important part of motion analysis system development with MEMS gyroscopes, which should be able to minimize the signal errors, improve the signal quality, and further improve the system stability.

The aim of this paper is to present a systematic review of the signal error reduction algorithms/methods that are used for MEMS gyroscope-based motion analysis systems for human motion analysis or have the potential to be used in this area. The content is presented as a user guide for selecting the most suitable signal processing algorithms for MEMS gyroscopes in various situations.

## 2. Methodology/Methods

#### 2.1. Inclusion and Exclusion Criteria

The inclusion criteria were as follows:

- The article was published as a journal article or a conference paper in English.
- The article was published in the past 10 years (between 2007 and 2017).
- The primary subject of the study was signal error reduction methods/algorithms for MEMS gyroscope-based motion analysis systems that are intended for human motion analysis or have the potential to be used in this area.

Articles were excluded from this paper if they instead focused on avoiding errors in the development and fabrication of the MEMS gyroscope inertial structures or on systems that were not intended for the application of human motion analysis but for other applications, e.g., navigation, global positioning, attitude compensation, space contrail detection, missile control, and trajectory analysis. Articles were also excluded if they focused on methods that were not intended for signal error reduction or signal quality improvement, but rather for other special areas such as fall detection, pedestrian indoor localization, and motion/gesture recognition.

#### 2.2. Searching Strategy and Analysis

With the inclusion and exclusion criteria specified above, the search was performed in the following electronic databases: Association for Computing Machinery (ACM) digital library within the area of computer science [29]; IEEE Xplore with the contents of engineering science, scholarly journals, conference reports, and IEEE standards [30]; PubMed with the contents of medicine and health science and scholarly journal articles [31]; and Scopus, which is a multidisciplinary citation database [32]. The searched keyword string was set as (((signal processing OR noise OR drift OR error OR reduction) AND motion*) AND “MEMS gyroscope”).

Through database searching without a time limitation, 33 results from 2001 to 2017 were initially found in ACM; 120 results from 1999 to 2017 were found in IEEE Xplore; three results from 2010 to 2016 were found in PubMed; and 35 results from 2005 to 2017 were found in Scopus. Within the publishing year limitation of the most recent 10 years, namely, from 2007 to 2017, 165 (28 from ACM + 104 from IEEE + three from PubMed + 30 from Scopus) results remained. After eliminating the duplicates, 148 results remained. The main author read through the titles and abstracts of the retrieved results and performed an initial analysis to determine whether the inclusion criteria were fulfilled or not. The full texts of those articles that fulfilled the inclusion criteria based on the title and abstract were assessed in detail by the main author. Irrelevant articles were excluded based on the exclusion criteria. The eligibility was checked.

The searching and review procedure is illustrated in Figure 1.

## 3. Results

From the 16 reviewed articles, 17 algorithms/methods were identified. They were categorized into four groups, namely, Kalman-filter-based algorithms, adaptive-based algorithms, simple filter algorithms, and compensation-based algorithms, and are presented below. All algorithms/methods were aimed at reducing different signal errors for the MEMS gyroscope-based human motion analysis system (or had the potential for human applications). The proportions of the four types of algorithms in the reviewed results are shown in Figure 2.

#### 3.1. Kalman Filter (KF)-Based Algorithms

#### 3.1.1. Kalman Filter

The Kalman filter is a common filter that is used for sensors. It consists of a loop that contains two steps: time updating, which is a prediction process, and measurement updating, which is a correction process [33]. The Kalman filter process is as follows:

- First, initial estimates for ${\widehat{x}}_{k-1}$ and ${P}_{k-1}$ are obtained.
- Then, the two-step loop is entered, as shown below:

Time updating process:

$${\widehat{x}}_{k}^{-}=A{\widehat{x}}_{k-1}+B{u}_{k-1}$$

$${P}_{k}^{-}=A{P}_{k-1}{A}^{T}+Q$$

Measurement updating process:
where $\widehat{x}$ is the posteriori estimated state, ${\widehat{x}}^{-}$ is the priori state, $u$ is the control vector, $z$ is the measurement signal, $k$ is a discrete point in time, $A$ is the state transition model, $B$ is the control input model, $P$ is the error covariance, $Q$ is the process noise covariance, $K$ is the Kalman gain, $H$ is the measurement matrix, $R$ is the measured noise covariance, and $I$ is the identity matrix.

$${K}_{k}={P}_{k}^{-}{H}^{T}{(H{P}_{k}^{-}{H}^{T}+R)}^{-1}=\frac{{P}_{k}^{-}{H}^{T}}{H{P}_{k}^{-}{H}^{T}+R}$$

$${\widehat{x}}_{k}={\widehat{x}}_{k}^{-}+{K}_{k}({z}_{k}-H{\widehat{x}}_{k}^{-})$$

$${P}_{k}=(I-{K}_{k}H){P}_{k}^{-}$$

Some common applications of the Kalman filter are noise reduction and signal prediction and estimation. It is one of the most common algorithms for sensor problems such as gyro sensor drift compensation [34].

#### 3.1.2. Discrete KF in an Optimal Approach

A Kalman filter is designed based on a steady-state filter gain that is obtained from an analysis of Kalman filter observability with the aim of reducing the bias drift and noise from the outputs signal of the MEMS gyroscope [37]. The Kalman filter is designed with a system state vector that is modeled based on both the true angular rate $\omega $ and the bias drift $b$. The parameters of covariance matrices Q and R are derived from the noise variance of the angular random walk (ARW) and the rate random walk (RRW) and the variance ${q}_{\omega}$. The steady-state Kalman filter gain ${K}_{s}$ is analyzed off-line in advance. Parameters A and B are calculated based on the eigenvector matrix S and eigenvalues ${\lambda}_{1}$ and ${\lambda}_{2}$. Finally, with these parameters, the discrete-time KF is applied as shown in Figure 3, which is derived from the figure in the original paper.

#### 3.1.3. Simplified Basic KALMAN Filter

The simplified basic Kalman filter can be used to reduce the noise [25] and temperature drift [26,27]. It is used digitally/discretely to reduce the noise and to estimate the temperature drift trend. The Kalman filter is used to estimate the offset and drift trend. The structure of drift/offset reduction by the Kalman filter is illustrated in Figure 4.

#### 3.1.4. Kalman-Filter-Based Position Estimation Algorithm

A Kalman-filter-based position estimation algorithm for correcting the yaw was presented by Pedro Neto et al. [38] and is illustrated in Figure 5. Figure 5 is derived from the figure in the original paper and shows the relationship between the MEMS gyroscope, the Kalman filter, and the additional accelerometer and magnetometer.

#### 3.2. Adaptive-Based Algorithms

#### 3.2.1. Least Mean Square (LMS) Algorithm

The LMS algorithm was applied in a MEMS gyroscope-based computer head-borne mouse to reduce the noise [25]. The structure of the LMS adaptive filter is illustrated in Figure 6, where d is the desired signal, x is the input, $\widehat{d}$ is the output of the adaptive filter, e is the error signal, and W is the LMS adaptive filter.

#### 3.2.2. Adaptive Sliding Mode Controller

The adaptive sliding mode controller for the MEMS gyroscope was introduced in [39], which can compensate in real time for the fabrication imperfections and estimate the angular velocity and the damping and stiffness coefficients. The block diagram is shown in Figure 7, where W stands for the adaptive indirect sliding mode controller. Figure 7 is derived from Figure 2 in the original paper.

#### 3.2.3. Adaptive Bandpass Filter (ABPF)

The ABPF algorithm is a basic algorithm for reducing the typical noises and tremors in inertial sensor data [40]. As described in the paper, tremor patient data were collected with both a gyroscope and an accelerometer. A Butterworth second-order bandpass filter with an adapted center frequency was designed in the program in a MATLAB Simulink environment. As shown in Figure 8, the method can be mainly summarized as bandpass filtering and filter center frequency adaption. The bandpass filter transfer function is:
where ${\omega}_{a}$ is the filter center frequency, which is adapted in the closed loop based on the dominant frequency of the input signal. In Figure 8, frequency f is equal to 2π${\omega}_{a}$. The damping block limits the changes of the tremor frequency estimation with the frequency step ∆f according to the input modal frequency f

$$H(s)=\frac{\sqrt{2}{\omega}_{a}s}{{s}^{2}+\sqrt{2}{\omega}_{a}s+{\omega}_{a}^{2}}$$

_{mod}to adjust the speed of the adaptation.#### 3.2.4. Weighted-Frequency Fourier Linear Combiner (WFLC) Algorithm

The WFLC algorithm is the most widely used algorithm for tremor modeling [35]. It is a type of adaptive algorithm. It was used to reduce the noise that is associated with human tremors and electrical noise in the application of an MEMS gyroscope-based computer head-borne mouse [25,27]. The discrete WFLC algorithm is:
where $M$ is the number of harmonics; ${\mu}_{0}$, ${\mu}_{1}$, and ${u}_{b}$ are the adaptive parameters; ${s}_{k}$ is the input and ${\epsilon}_{k}$ is the error signal at time point k; and ${W}_{k}={[{w}_{{1}_{k}},...,{w}_{2{M}_{k}}]}^{T},{X}_{k}={[{x}_{{1}_{k}},...,{x}_{2{M}_{k}}]}^{T}$.

$${x}_{{r}_{k}}=\{\begin{array}{c}\mathrm{sin}(r{\displaystyle {\sum}_{t=0}^{k}{w}_{{0}_{k}}}),1\le r\le M\\ \mathrm{cos}((r-M){\displaystyle {\sum}_{t=0}^{k}{w}_{{0}_{k}}}),M+1\le r\le 2M\end{array}$$

$${y}_{k+1}={y}_{k}+{W}^{T}X$$

$${\epsilon}_{k}={s}_{k}-{y}_{k}-{w}_{bia{s}_{k}}$$

$${w}_{bia{s}_{k+1}}={w}_{bia{s}_{k}}+2{\mu}_{b}{\epsilon}_{k}$$

$${w}_{{0}_{k+1}}={w}_{{0}_{k}}+2{\mu}_{0}{\epsilon}_{k}{\displaystyle {\sum}_{i=1}^{M}({w}_{i}{x}_{M+i}-{w}_{M+i}{x}_{i})}$$

$${W}_{k+1}={W}_{k}+2{\mu}_{1}{X}_{k}{\epsilon}_{k}$$

#### 3.2.5. Bandlimited Multiple Fourier Linear Combiner (BMFLC) Algorithm

The BMFLC algorithm is derived from the Fourier Linear Combiner (FLC) and was proposed more recently [35]. Similar to the WFLC algorithm, it can be used to estimate tremors [35]. As shown in the paper [35], the discrete BMFLC algorithm can be described as:
where M is the number of harmonics; G is the number of FLC-filters in between; $\mu $ is the amplitude adaptation gain; ${\omega}_{0}$ and ${\omega}_{f}$ are the lower and upper frequencies of the FLC bank, respectively; and ${\mu}_{b}$ is a bias weight.

$${x}_{{r}_{k}}=\{\begin{array}{c}\mathrm{sin}({\omega}_{0}+({\omega}_{f}-{\omega}_{0})\frac{r-1}{G+1}k),1\le r\le M\\ \mathrm{cos}({\omega}_{0}+({\omega}_{f}-{\omega}_{0})\frac{r-1}{G+1}k),M+1\le r\le 2M\end{array}$$

$${\epsilon}_{k}={s}_{k}-{W}_{k}^{T}{X}_{k}-{\mu}_{b}$$

$${W}_{k+1}={W}_{k}+2\mu {X}_{k}{\epsilon}_{k}$$

#### 3.2.6. Sensor Fusion

Sensor fusion approaches are adaptive algorithms that combine sensory data from independent sources, irrespective of their advantages and disadvantages, to optimize the system performance, as mentioned in [41]. They often involve combining accelerometer and magnetometer data for their compensation characteristics, which is a good solution for complementing the drift-free gyroscope [41].

A sensor fusion method is often applied to reduce error propagation and obtain the integration process initial conditions [42]. In these cases, the MEMS gyroscope signal is still the basis for orientation estimation, but it is refined with the data from the MEMS accelerometer and magnetic sensors in the Miniature Inertial Measurement Unit (MIMU) [43], where the MEMS gyroscope is not used alone, but together with the MEMS accelerometer and magnetometer.

The main structure of the sensor fusion approach exploiting accelerometer and magnetometer data is presented in Figure 9. The detailed algorithms depend on different filter algorithms. The most common filter algorithm used is the Kalman filter, which consists of prediction and correction steps and connects for the adaption of accelerometer and magnetometer estimation.

#### 3.3. Simple Filter Algorithms

#### 3.3.1. Low-Pass Filter

A simple digitally implemented RC low-pass filter was applied in the MEMS gyroscope-based motion detection system for noise reduction [25]. The low-pass filter can be described as [44]:
where α is the low-pass cut-off frequency parameter, which has a value from zero to one. Using a suitable parameter value, the high-frequency noise can be filtered out.

$${y}_{i}={y}_{i-1}+\alpha ({x}_{i}-{y}_{i-1})$$

#### 3.3.2. High-Pass Filter

Analogous to the low-pass filter that is described above, a simple digital high-pass filter was implemented in a similar way in a MEMS gyroscope-based motion detection system for drift/offset reduction [26]. The digitally implemented high-pass filter can be described as [26]:
where β is the parameter of the cut-off frequency for the high-pass filter, which has a value from zero to one; ${x}_{i}$ and ${x}_{i-1}$ are the input signals at time points i and i−1, respectively; and ${y}_{i}$ and ${y}_{i-1}$ are the output signals at time points i and i−1, respectively.

$${y}_{i}=\beta {y}_{i-1}+\beta ({x}_{i}-{x}_{i-1})$$

The high-pass filtering operation was also used to remove most of the sensor measurement biases [45].

#### 3.3.3. Threshold with Delay Method (TWD)

Based on the original threshold method, the threshold with delay (TWD) method is developed with a delay parameter with the aim of not interrupting the continuity of the movement signal when using a threshold method [27]. The algorithm can be described mathematically as:
where x and y are the input and output signals, k is the discrete point in time, and D is the delay. With suitable threshold and delay values, the TWD algorithm can be used to filter out the noise around zero and obtain a smooth continuous signal, even if the movements make the signal cross the threshold level several times. The threshold level is usually set to as close to the noise level as possible, but slightly above it [27].

$${y}_{k}=\{\begin{array}{c}{x}_{k},{x}_{k}\ge T\parallel {t}_{y\le T}<D\\ 0,{x}_{k}<T\text{}\text{}{t}_{y\le T}D\end{array}$$

#### 3.4. Compensation-Based Algorithms

#### 3.4.1. Drift and Offset Compensator (DOC)

The drift and offset compensator (DOC) is a model-free method for compensating for the drift and offset in the MEMS gyroscope signals [45]. It employs FIR/IIR filtering techniques and lends itself to implementation in hardware such as DSPs and FPGAs [45]. The simplified main structure of the filtering process of DOC is illustrated in Figure 10, which is derived from Figure 1 in the original paper.

To compensate for the drawbacks of the angular rate estimation based on only the encoder signals if the encoder step size is higher than the angle that is passed during the sampling interval or of the same order of magnitude [45], an enhanced DOC is also presented in the paper [45]. As shown in Figure 11, the enhanced DOC employs both an accelerometer and a gyroscope for angular rate estimation.

#### 3.4.2. Compensation Method with Temperature

This method employs orientation-based gyroscope compensation, including temperature, and further employs a Kalman-based model that uses an orientation sensor and temperature [46]. The corrected value of the gyro sensor is expressed as [46]:
where ${G}_{real}$ is the gyro sensor value, ${S}_{bias}$ is the static bias, ${t}_{bias}$ is the bias due to temperature, ${M}_{error}$ is the error during motion, and $\epsilon $ is white noise.

$${G}_{Corr}={G}_{real}-{S}_{bias}-{t}_{bias}-{M}_{error}-\epsilon $$

The median filter on a moving window of size 7 is used to remove the white noise [46]. Then, static bias prediction is used to capture the static drift parameter for static drift compensation. With a separate chip for measuring the temperature of the sensor, the static sensor data variation with the temperature for each axis is analyzed to determine the temperature bias. The total bias is the sum of the temperature bias and the static bias, which can be expressed as:
where T is the temperature mean, m × T is the temperature bias, and C is the static bias.

Bias = m × T + C,

After removing the static bias and the bias due to temperature, to eliminate the misalignment error that results in incorrect distribution of the angular velocity along different axes in a tri-axial gyroscope, the Kalman filter is used to remove the noise and compensate for the orientation error by compensating for the value of gyroscope with the values of the orientation sensors [46]. The state space equation is [46]:
where ${\theta}_{t}$ is the value from the orientation sensor, $\dot{\theta}$ is the value from the gyroscope sensor, and $\mathsf{\Delta}t$ is the sampling time. For the Kalman filter coefficients, the state transition matrix and the observation matrix are $A=\left[\begin{array}{cc}1& \mathsf{\Delta}t\\ 0& 1\end{array}\right]$ and $H=\left[\begin{array}{cc}1& 0\\ 0& 1\end{array}\right]$, respectively [46]. The processing noise and experiment noise are $Q=\left[\begin{array}{cc}0.00009& 0\\ 0& 0.00009\end{array}\right]$ and $R=\left[\begin{array}{cc}0.002& 0\\ 0& 0.002\end{array}\right]$, respectively [46]. The input of the Kalman filter is ${X}_{input}=\left[\begin{array}{c}Orientation\_angle\\ Gyroscope\_data\end{array}\right]$ [46].

$${\theta}_{t+\mathsf{\Delta}t}={\theta}_{t}+\mathsf{\Delta}t\times \dot{\theta}$$

The procedure of the filter method is illustrated in Figure 12.

This gyro drift compensation method is not implemented in hardware, such as a microprocessor or dsPIC, but over the sensor service layer of the existing Android sensor stack [46].

#### 3.4.3. Compensation Method with Accelerometer and Magnetometer Data

A complementary-filter-based filter is designed for estimating the angle in the application of a mini wearable wireless sensor system for rehabilitation [47]. It has the advantages of a lower computational burden and higher precision than the Kalman filter [47]. However, it requires the accelerometer data and magnetometer data to be analyzed together with the gyroscope data [47].

A robust and easy-to-implement method for calibrating an inertial measurement unit (IMU) with an MEMS gyroscope, accelerometer, and often a magnetometer, without any external equipment, is introduced in the paper by D. Tedaldi et al. [48]. The calibration protocol can be summarized as the following steps: Let IMU be static for T seconds. Then, rotate the IMU to a different attitude and wait at least t

_{wait}seconds. Finally, repeat the rotation process N times to estimate the parameters by the calibration algorithm. The signal must be averaged over a suitable time interval. The accuracy of the calibration strongly depends on the reliability of the classification between static and motion intervals: static intervals are used to calibrate the accelerometers, while motion intervals are also included between consecutive static intervals for gyroscopes [48].#### 3.5. Category of the Algorithms

The reviewed articles, with their corresponding algorithms, were categorized into four groups. The details of their classifications, characteristics/functions, supplements/requirements, related applications, and numbers of papers are summarized in Table 1.

In Table 2, these algorithms were also categorized into groups, and details regarding the main functions, advantages, disadvantages, and numbers of studies are specified.

## 4. Discussion

A systematic review was performed with a focus on error reduction algorithms in MEMS gyroscope-based motion analysis systems within the area of human motion analysis or with a clear potential for use in this area (e.g., for robotics). A total of 17 algorithms have been classified into four categories: Kalman-filter-based algorithms, adaptive-based algorithms, simple filter algorithms, and compensation-based algorithms. The most commonly used solution for MEMS gyroscope error reduction within this area is adaptive-based algorithms, followed by Kalman-filter-based algorithms. The majority of them (12 of 17) showed the potential to be simplified to limit the calculation time. All the algorithms can be implemented in real time and used alone or combined with other algorithms or sensors, e.g., accelerometers and/or magnetometers. They are suitable for use in human motion analysis systems, especially for hand, wrist, and head movements.

Kalman-filter-based algorithms are commonly applied for error compensation, position correction, and orientation estimation in different areas. With a focus on error reduction, related Kalman-filter-based algorithms, including the Kalman filter, discrete Kalman filter in an optimal way, simplified basic Kalman filter, and Kalman-filter-based position estimation algorithms, are presented in this paper. They are all based on the Kalman filter and have the main function of noise reduction and offset/drift signal prediction and estimation, including human tremor reduction, drift estimation, and yaw correction during motion analysis.

Adaptive-based and related algorithms, such as LMS, the adaptive sliding mode controller, the adaptive bandpass filter, WFLC, and the sensor fusion algorithm, were used for noise reduction, error compensation and estimation, and human tremor reduction, modeling, and estimation. Sensor fusion algorithms often combine accelerometer and magnetometer data to achieve their compensation characteristics.

Some simple filter algorithms, such as the low-pass filter, high-pass filter, and TWD algorithm, were also applied to reduce signal errors, e.g., noise, drift/offset, and integration drift. They have simple characteristics and thus simple functions. They are simple and easy to implement in real time, but only with simple functions. They are good solutions for simple tasks. However, a better result is usually achieved if they are combined with other algorithms.

Compensation algorithms include DOC, compensation with temperature, compensation with accelerometer and magnetometer data, and the IMU calibration method. They can be applied for noise reduction and angle estimation by compensating for the related gyroscope errors, e.g., drift/offset and bias due to temperature. The compensation algorithms are satisfactory solutions for complementing the drift-free gyroscope, but require other resources in combination to perform their function, including other filter algorithms and additional hardware, such as accelerometers and magnetometers, or even the same sensor unit as a reference.

## 5. Conclusions

This paper presents a systematic overview of signal processing algorithms with a focus on MEMS gyroscope error reduction for human motion analysis systems. Sixteen MEMS gyroscope-related signal processing papers that were published in the past 10 years were reviewed to evaluate their functions, error reduction/minimization, and signal improvements. All of them are within the area of human motion analysis applications or have a clear potential for use in this area. Seventeen algorithms, which were categorized into four main groups (Kalman-filter-based algorithms, adaptive-based algorithms, simple filter algorithms, and compensation-based algorithms), were investigated and summarized in terms of their characteristics, functions, supplements/requirements, related applications, advantages, and disadvantages. Some signal processing algorithms can be used alone for MEMS gyroscope error reduction, whereas others should be used with other signal processing algorithms to achieve better results. Some algorithms combine MEMS gyroscope data with data from other sensors as accelerometers or both accelerometers and magnetometers, while some require a reference sensor model. This study also showed the possibility of simplifying the algorithms for a limited calculation capacity and real-time implementation. The algorithms that were investigated in this paper are useful for signal error reduction and signal quality improvement for MEMS gyroscope-based human motion analysis. With a focus on MEMS gyroscope-based movement measurement, the paper aims at being a user guide on when to use which algorithms in related studies.

## Acknowledgments

The authors would like to gratefully acknowledge the support from the ITS-EASY Post Graduate School for Embedded Software and Systems and the research profile Embedded Sensor System for Health (ESS-H) at Mälardalen University, Sweden, which is financed by the KK-stiftelsen in Sweden.

## Author Contributions

Jiaying Du carried out the study selection, data extraction, and manuscript drafting. Jiaying Du and Maria Lindén have been involved in critically revising the manuscript for important intellectual content. All the authors have contributed to the final paper and approved the final paper for publication.

## Conflicts of Interest

The authors declare no conflict of interest.

## References

- World Report on Ageing and Health, World Health Organisation. 2015. Available online: http://apps.who.int/iris/bitstream/10665/186463/1/9789240694811_eng.pdf?ua=1 (accessed on 31 March 2018).
- Aggarwal, J.K.; Cai, Q. Human motion analysis: A review. Comput. Vis. Image Underst.
**1999**, 73, 428–440. [Google Scholar] [CrossRef] - Pantelopoulos, A.; Bourbakis, N.G. A survey on wearable sensor-based systems for health monitoring and prognosis. IEEE Trans. Syst. Man Cybern.
**2010**, 40, 1–12. [Google Scholar] [CrossRef] - Patel, S.; Park, H.; Bonato, P.; Chan, L.; Rodgers, M. A review of wearable sensors and systems with application in rehabilitation. J. Neuro Eng. Rehabil.
**2012**, 9, 21. [Google Scholar] [CrossRef] [PubMed][Green Version] - Favre, J.; Aissaoui, R.; Jolles, B.M.; Siegrist, O.; de Guise, J.A.; Aminian, K. 3D joint rotation measurement using mems inertial sensors: Application to the knee joint. In Proceedings of the Ninth International Symposium on the 3-D Analysis of Human Movement, Valenciennes, France, 28–30 June 2006; pp. 28–30. [Google Scholar]
- Favre, J.; Jolles, B.M.; Aissaoui, R.; Aminian, K. Ambulatory measurement of 3D knee joint angle. J. Biomech.
**2008**, 41, 1029–1035. [Google Scholar] [CrossRef] [PubMed] - 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. [Google Scholar] [CrossRef] [PubMed] - Saito, H.; Watanabe, T.; Arifin, A.; Dössel, O.; Schlegel, W.C. Ankle and knee joint angle measurements during gait with wearable sensor system for rehabilitation. In Proceedings of the World Congress on Medical Physics and Biomedical Engineering, Munich, Germany, 7–12 September 2009; pp. 506–509. [Google Scholar]
- Takeda, R.; Tadano, S.; Todoh, M.; Morikawa, M.; Nakayasu, M.; Yoshinari, S. Gait analysis using gravitational acceleration measured by wearable sensors. J. Biomech.
**2009**, 42, 223–233. [Google Scholar] [CrossRef] [PubMed] - Doheny, E.P.; Foran, T.G.; Greene, B.R. A single gyroscope method for spatial gait analysis. In Proceedings of the Engineering in Medicine and Biology Society (EMBS), Buenos Aires, Argentina, 31 August–4 September 2010; pp. 1300–1303. [Google Scholar]
- Liu, K.; Liu, T.; Shibata, K.; Inoue, Y. Ambulatory measurement and analysis of the lower limb 3D posture using wearable sensor system. In Proceedings of the IEEE International Conference on Mechatronics and Automation, Changchun, China, 9–12 August 2009; pp. 3065–3069. [Google Scholar]
- Dejnabadi, H.; Jolles, 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. [Google Scholar] [CrossRef] [PubMed] - Bergmann, J.H.; Mayagoitia, R.E.; Smith, I.C. A portable system for collecting anatomical joint angles during stair ascent: A comparison with an optical tracking device. Dyn. Med.
**2009**, 8, 3. [Google Scholar] [CrossRef] [PubMed] - Xu, R.; Zhou, S.; Li, W.J. MEMS accelerometer based nonspecific-user hand gesture recognition. IEEE Sens. J.
**2012**, 12, 1166–1173. [Google Scholar] [CrossRef] - Linsie, A.A.; Mangaiyarkarasi, J. Hand gesture recognition using mems for specially challenged people. Int. J. VLSI Embed. Syst.
**2013**, 4, 238–241. [Google Scholar] - Meenaakumari, M.; Muthulakshmi, M. Mems accelerometer based hand gesture recognition. Int. J. Adv. Res. Comput. Eng. Technol.
**2013**, 2, 1886–1892. [Google Scholar] - Shetty, V.J.; Laxman, M.; Magdum, M.S.; Sidnal, S.B.; Paraddi, S. Head motion controlled wheel chair using mems. Int. Adv. Res. J. Sci. Eng. Technol.
**2015**, 2, 84–86. [Google Scholar] - Anbarasu, V.; Ravi, T. Head mounted input device using mems sensors. Indian J. Comput. Sci. Eng.
**2012**, 3, 1886–1892. [Google Scholar] - Gerdtman, C.; Bäcklund, Y.; Lindén, M. A gyro sensor based computer mouse with a USB interface: A technical aid for motor-disabled people. Technol. Disabil.
**2012**, 24, 117–127. [Google Scholar] - Oarde, D.E.; Libatique, N.C.; Tangonan, G.L.; Sotto, D.M.; Pacaldo, A.T. Digital motion analysis system for rehabilitation using wearable sensors. In Proceedings of the 7th IEEE International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment and Management (HNICEM), Palawan, Philippines, 12–16 November 2014; pp. 1–7. [Google Scholar]
- Gerdtman, C.; Folke, M.; Bexander, C.; Brodd, A.; Lindén, M. Portable sensor system for rehabilitation of wad patients. In Proceedings of the Wearable Micro and Nano Technologies for Personalized Health (pHealth), Oslo, Norway, 24–26 June 2009; pp. 65–68. [Google Scholar]
- MECH 466 Microelectromechanical Systems, University of Victoria, Department of Mechanical Engineering. 2015. Available online: http://www.engr.uvic.ca/~mech466/MECH466-Lecture-1.pdf (accessed on 16 February 2018).
- Maenaka, K. MEMS inertial sensors and their applications. In Proceedings of the 5th International Conference on Network Sensing Systems (INSS), Kanazawa, Japan, 17–19 June 2008; pp. 71–73. [Google Scholar]
- Li, J.; Mattila, T.; Vuorinen, V. MEMS Reliability. In Handbook of Silicon Based MEMS Materials and Technologies, 2nd ed.; Tilli, M., Motooka, T., VAiraksinen, M., Franssila, S., Paulasto-Krockel, M., Lindroos, V., Eds.; Elsevier: Amsterdam, The Netherlands, 2015; pp. 751–752. ISBN 9780323299657. [Google Scholar]
- Du, J.; Gerdtman, C.; Lindén, M. Noise reduction for a MEMS-gyroscope-based head mouse. In Proceedings of the 12th International Conference on Wearable Micro and Nano Technologies for Personalized Health (pHealth2015), Västerås, Sweden, 2–4 June 2015; pp. 36–39. [Google Scholar]
- Du, J.; Gerdtman, C.; Lindén, M. Signal processing algorithms for temperature drift in a MEMS-gyro-based head mouse. In Proceedings of the 21st International Conference on Systems, Signals and Image Processing (IWSSIP2014), Dubrovnik, Croatia, 12–15 May 2014; pp. 123–126. [Google Scholar]
- Du, J.; Gerdtman, C.; Gharehbaghi, A.; Lindén, M. A signal processing algorithm for improving the performance of a gyroscopic head-borne computer mouse. J. Biomed. Signal Process. Control
**2017**, 35, 30–37. [Google Scholar] [CrossRef] - Kempe, V. Inertial MEMS: Principle and Practice; Cambridge University Press: Cambridge, UK, 2011; ISBN 13 978-0521766586. [Google Scholar]
- ACM Digital Library. Available online: https://www.acm.org/publications/digital-library (accessed on 16 February 2018).
- IEEE Xplore Digital Library. Available online: http://ieeexplore.ieee.org.ep.bib.mdh.se/Xplore/home.jsp (accessed on 16 February 2018).
- PubMed US National Library of Medicine National Institutes of Health. Available online: https://www.ncbi.nlm.nih.gov/pubmed/ (accessed on 16 February 2018).
- Scopus. Available online: https://www.scopus.com (accessed on 16 February 2018).
- Welch, G.; Bishop, G. An Introduction to the Kalman Filter, TR 95-041. 2006. Available online: https://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf (accessed on 16 February 2018).
- Lee, H.J.; Jung, S. Gyro sensor drift compensation by Kalman filter to control a mobile inverted pendulum robot system. In Proceedings of the IEEE International Conference on Industrial Technology (ICIT), Gippsland, VIC, Australia, 10–13 February 2009; pp. 1–6. [Google Scholar]
- Gallego, A.; Rocon, E.; Roa, J.O.; Moreno, J.C.; Pons, J.L. Real-time estimation of pathological tremor parameters from gyroscope data. Sensors
**2010**, 10, 2129–2149. [Google Scholar] [CrossRef] [PubMed][Green Version] - Naik, N.S.; Rube, P.R. Physiological tremor estimation methods: An overview. Int. J. Innov. Sci. Eng. Technol.
**2014**, 1, 556–559. [Google Scholar] - Xue, L.; Jiang, C.; Wang, L.; Liu, J.; Yuan, W. Noise reduction of MEMS gyroscope based on direct modeling for an angular rate signal. Micromachines
**2015**, 6, 266–280. [Google Scholar] [CrossRef] - Neto, P.; Pires, J.N.; Moreira, A.P. 3-D position estimation from inertial sensing: Minimizing the error from the process of double integration of accelerations. In Proceedings of the 39th Annual Conference of the IEEE Industrial Electronics Society (IECON 2013), Vienna, Austria, 10–13 November 2013; pp. 4026–4031. [Google Scholar]
- Fei, J.; Batur, C. Robust adaptive control for a MEMS vibratory gyroscope. Int. J. Adv. Manuf. Technol.
**2009**, 42, 293–300. [Google Scholar] [CrossRef] - Popovic, L.Z.; Sekara, T.B.; Popovic, M.B. Adaptive band-pass filter for tremor extraction from inertial sensor data. Comput. Methods Programs Biomed.
**2010**, 99, 298–305. [Google Scholar] [CrossRef] [PubMed] - Yean, S.; Lee, B.S.; Yeo, C.K.; Vun, C.H. Algorithm for 3D orientation estimation based on Kalman filter and gradient descent. In Proceedings of the 7th IEEE Annual Conference on Information Technology, Electronics and Mobile Communication (IEMCON), Vancouver, BC, Canada, 13–15 October 2016; pp. 1–6. [Google Scholar]
- Bergamini, E.; Ligorio, G.; Summa, A.; Vannozzi, G.; Cappozzo, A.; Sabatini, A.M. Estimating orientation using magnetic and inertial sensors and different sensor fusion approaches: Accuracy assessment in manual and locomotion tasks. Sensors
**2014**, 14, 18625–18649. [Google Scholar] [CrossRef] [PubMed] - Pasciuto, I.; Ligorio, G.; Bergamini, E.; Vannozzi, G.; Sabatini, A.M.; Cappozzo, A. How angular velocity features and different gyroscope noise types interact and determine orientation estimation accuracy. Sensors
**2015**, 15, 23983–24001. [Google Scholar] [CrossRef] [PubMed] - Krishna, S.M. Digital Implementation of RC Low Pass Filter, MathWorks, 2008. Available online: https://se.mathworks.com/matlabcentral/fileexchange/19407-digital-implementation-of-rc-low-pass-filter (accessed on 16 February 2018).
- Kubus, D.; Wahl, F.M. A sensor fusion approach to angle and angular rate estimation. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), San Francisco, CA, USA, 25–30 September 2011; pp. 2481–2488. [Google Scholar]
- Jaiswal, R.; Nair, R.C.; Yarlagadda, N.K.; Senapati, A.A.K.; Mulage, P. Adaptive Gyroscope drift compensation based on Temporal Noise Modelling. In Proceedings of the International Conference on Microelectronics, Computing and Communications (MicroCom), Durgapur, India, 23–25 January 2016. [Google Scholar]
- Abbasi-Kesbi, R.; Nikfarjam, A. A mini wearable wireless sensor for rehabilitation applications. In Proceedings of the 3rd RSI International Conference on Robotics and Mechatronics (ICROM), Tehran, Iran, 7–9 October 2015; pp. 618–622. [Google Scholar]
- Tedaldi, D.; Pretto, A.; Menegatti, E. A Robust and Easy to Implement Method for IMU Calibration without External Equipments. In Proceedings of the IEEE International Conference on Robotics & Automation (ICRA), Hong Kong, China, 31 May–7 June 2014; pp. 3042–3049. [Google Scholar]

**Figure 2.**Proportions of the four types of algorithms in the reviewed results. (Kalman-filter-based algorithms 27.6%; Adaptive-based algorithms 44.8%; Simple filter algorithms 13.8%; Compensation-based algorithms 13.8%).

**Figure 7.**Indirect adaptive sliding mode control for an MEMS gyroscope. (W is the indirect sliding mode controller with an adaptive law).

Algorithm Group | Algorithms | Characteristics/Functions with References | Number of Papers | Supplements/Requirements | Applications | |||
---|---|---|---|---|---|---|---|---|

Limited Calculation Time | Real Time/on- or off-Line | Working Environment | Need for Combination | |||||

Kalman-filter-based algorithm | Kalman filter (KF) | Noise reduction; signal prediction and estimation: human tremor estimation and modeling [35]; physiological tremor estimation [36]; drift compensation together with a compensation method [47] | 3 | - ^{1} | Real-time estimation of tremor parameters | MATLAB | Together with the WFLC algorithm to estimate the instantaneous tremor frequency; together with a compensation method to compensate for the drift | Tremor motion extraction from voluntary movement (hand motion/wrist rotation) estimation with MEMS gyroscope; Drift compensation for MEMS gyroscope in mobile devices for human motion analysis |

Discrete KF in an optimal way | Optimal estimation of the bias drift and noise from MEMS gyroscopes signals [37] | 1 | Simplification of KF implementation | Real-time processing | Digital signal processor (DSP) | Without needing other sensor’s information | MEMS gyroscope (not human motion in the article, but with potential to be used in human motion analysis) | |

Simplified basic Kalman filter | Noise reduction [25]; temperature drift estimation [26,27] | 3 | Within limited calculation time | Real time | MATLAB and DSPs | Can be used alone | Gyroscopic head-borne computer mouse | |

KF based position estimation algorithm | Yaw correction during position estimation [38] | 1 | - ^{1} | Real time | MATLAB | Need additional accelerometer and magnetometer/compass data | Hand motion and hand position estimation | |

Adaptive-based algorithm | Least Mean Square (LMS) | Noise reduction [25]; tremor modeling [35] | 2 | Within limited calculation | Real time | MATLAB and DSPs | Can be used alone | Gyroscopic head-borne computer mouse |

Adaptive slide mode controller | Fabrication imperfection compensation, external disturbances reduction [39] | 1 | - ^{1} | Real time | MATLAB/Simulink | Need a reference model (ideal oscillator) | Oscillatory motion by MEMS z-axis vibrating gyroscope system (with potential to be used in human motion analysis) | |

Adaptive bandpass filter | Typical noise/pathological tremor reduction [40] | 1 | Simple and easy to implement | Real time | MATLAB Simulink | Both gyroscope and accelerometer | Volitional hand movement | |

WFLC | Noise reduction [25,27]; human tremor frequency tracking [35]; physiological tremor estimation [36] | 4 | Within limited calculation time | Real time | MATLAB and DSPs | Can be used alone | Gyroscopic head-borne computer mouse | |

BMFLC | Human tremor frequency tracking [35]; physiological tremor estimation [36] | 2 | - ^{1} | Real time | MATLAB | Can be used alone | Tremor motion extraction from voluntary movement (hand motion/wrist rotation) estimation with MEMS gyroscope | |

Sensor fusion | Integration drift error reduction and error propagation reduction during orientation/position estimation [42,43]; drift compensation [41];, etc. | 3 | Developed with shorter computation time (than rotation matrix) | Real time [42] | MATLAB; Mobile phone API, IoT | Need to exploit accelerometer and magnetometer aiding sensors, and need reference data | 3D human movement analysis; rehabilitation application, monitoring dynamic changes of movement for clinical prognosis | |

Simple filter algorithm | Low-pass filter | Noise reduction [25] | 1 | Within limited calculation time | Real time | MATLAB and DSPs | Can be used alone | Gyroscopic head-borne computer mouse |

High-pass filter | Drift/offset reduction [26]; bias reduction [45] | 2 | Within limited calculation time | Real time | MATLAB and DSPs | Can be used alone | Gyroscopic head-borne computer mouse | |

TWD | Noise reduction around zero within the threshold [27] | 1 | Within limited calculation time | Real time | MATLAB and DSPs | Followed with other algorithms to obtain better results | Gyroscopic head-borne computer mouse | |

Compensation-based algorithm | Drift and offset compensator (DOC) | Drift/offset compensation [45] | 1 | Low computational demands | Real time | DSPs and FPGAs | Based on encoder measurement. Combination of encoder and even MEMS accelerometer | Demanding robotic and mechatronic systems; parallel or serial kinematic machines such as industrial manipulators (with the potential to be used in human motion analysis) |

Compensation method with temperature | Noise reduction and drift compensation (including bias due to temperature) [46] | 1 | - ^{1} | Real time | Android | Combination of Median filter, Kalman filter | Drift compensation for MEMS gyroscope in mobile devices that are in motion, static, or with temperature variance. This method optimally filters drift to be usable in MARG, IMU, indoor navigation and human activity classification | |

Compensation method with accelerometer and magnetometer | Noise reduction and angle estimation [47] | 1 | Required less computation | Real time | Microprocessor | Need to combine with MEMS accelerometer and magnetometer data | Capture real time body movement with a mini wearable wireless sensor system for rehabilitation | |

IMU calibration method | Absolute error reduction; calibration parameter estimation [48] | 1 | Robust and easy to implement | Real time | MATLAB | An IMU consists of a tri-axial MEMS gyroscope, an accelerometer and often a magnetometer. Does not require other external equipment | Low-cost IMU sensors equipped on smartphones and similar devices for motion analysis of robotics. It is possible to use it for human motion analysis |

^{1}‘-’ indicates that no information could be found in the original paper.

**Table 2.**Summary of error reduction algorithms in groups with corresponding functions, advantages, and disadvantages.

Main/Common Functions | Advantages | Disadvantages | Number of Studies | |
---|---|---|---|---|

Kalman-filter-based algorithm | - Noise reduction including tremors
- Signal prediction and estimation
- Offset/drift error estimation
- Yaw correction
| - One of the most common signal processing algorithms for the MEMS gyroscope
- Can be implemented in real time
- Can be simplified for limited calculation capacity
| - Sometimes requires information from another sensor, e.g., MEMS accelerometer or magnetometer
- or must work together with other algorithms for specific applications, e.g., with WFLC for tremor motion extraction
| 8 |

Adaptive-based algorithm | - Noise reduction
- Tremor modeling and estimation
- Tremor modeling and estimation
- Drift compensation
| - The most common signal processing algorithm for the MEMS gyroscope
- Can be implemented in real time
- Can be simplified for limited calculation capacity
| - Some algorithms (e.g., sensor fusion) must be combined with other sensors, e.g., accelerometer or magnetometer
- Or require a reference model
| 13 |

Simple filter algorithm | - Noise reduction
- Or offset/drift reduction, integration drift reduction
| - Simple to implement
- Can be implemented in real time
| - Usually for a single simple function
- Need to be combined with other algorithms for a better result
- Some algorithms need to be combined with other sensors, e.g., MEMS accelerometer
- Common in practical applications but not in research publications
| 4 |

Compensation-based algorithm | - Offset/drift compensation
- Noise reduction
- Angle estimation
| - Can be implemented in real time
- Can demand low computation
| - Usually combined with other hardware, e.g., encoder, accelerometer, or magnetometer
- Combined with other algorithms, e.g., median filter, Kalman filter
- The accuracy of the calibration method strongly depends on the reliability of the classification between static and motion intervals
| 4 |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).