# Performance Analysis of Alignment Process of MEMS IMU

Authors: Vadim Bistrov
Journal: International Journal of Navigation and Observation
 (2012)

---

## Abstract

The procedure of determining the initial values of the attitude angles (pitch, roll, and heading) is known as the alignment. Also, it is essential to align an inertial system before the start of navigation. Unless the inertial system is not aligned with the vehicle, the information provided by MEMS (microelectromechanical system) sensors is not useful for navigating the vehicle. At the moment MEMS gyroscopes have poor characteristics and it’s necessary to develop specific algorithms in order to obtain the attitude information of the object. Most of the standard algorithms for the attitude estimation are not suitable when using MEMS inertial sensors. The wavelet technique, the Kalman filter, and the quaternion are not new in navigation data processing. But the joint use of those techniques for MEMS sensor data processing can give some new results. In this paper the performance of a developed algorithm for the attitude estimation using MEMS IMU (inertial measurement unit) is tested. The obtained results are compared with the attitude output of another commercial GPS/IMU device by Xsens. The impact of MEMS sensor measurement noises on an alignment process is analysed.  Some recommendations for the Kalman filter algorithm tuning to decrease standard deviation of the attitude estimation are given.


---

## Body

## 1. Introduction

Navigation can be defined as the process of determining the position, orientation, and velocity of an object. A GPS-based navigation is quick and drift free and is readily available most of the time. However, as the GPS requires direct line of sight signals from at least four GPS satellites, the navigation can be frequently interrupted in the land based applications. The GPS signal gets lost due to various factors such as the blockage by buildings, trees, and other natural and nonnatural obstructions. This affects both the amplitude and phase of the received satellite signals and causes the receiver to lose lock on the blocked satellite, meaning that it needs both to reacquire the signal and to resolve the ambiguities in the phase measurements. Both these processes take time, and if there are several satellites affected, the receiver cannot provide a position solution for a significant period of time. Also it is worth mentioning that the data rate for the GPS can be too low for the particular application. In such situations when the GPS signals are not available, a relative navigation can be performed using the inertial sensors (accelerometers and gyroscopes) and magnetometers.The strapdown inertial navigation system (SINS) has been widely used in numerous fields such as the positioning and navigation of ships, aeroplanes, vehicles, and missiles. To initialize the navigation Kalman filter (KF), all three attitude angles including the roll, pitch, and heading (azimuth) are required. The initial misalignment is one of the major error sources of the SINS. So, it is crucial to have an accurate initial alignment in order to implement the integrated navigation system. The tactical and navigation grade sensors are limited to commercial and military applications and very expensive, but, with the introduction of the compact, low-power, and cost-efficient MEMS sensors, it is possible to have portable integrated INS/GPS navigation modules. For low-cost INS, the initial alignment is still a challenging issue because of the high noises from the low-cost inertial sensors. The SINS must be preferably aligned before positioning and navigation. The aim of the initial alignment of the SINS is to get a coordinate transformation matrix from the body frame to the navigation frame and conduct the misalignment angles to zero or as small as possible. In many applications, it is essential to achieve an accurate alignment of the SINS within a very short period of time.Accordingly, a number of filtering algorithms have been developed for integrating the output of the gyros and the accelerometers, to estimate the attitude. Previous studies of the attitude calculation methods, using the inertial sensors only, have been researched for use in the robotics [1], aircrafts [2], and human motion tracking [3]. The initial alignments of the high precision INS and low-cost INS should be treated using different methods, because the noise levels of the inertial sensors are quite different for these two types of systems.The low-cost IMUs usually use gyroscopes with noise levels larger than the Earth’s rotation rate, and, hence, they cannot be aligned in the static mode. In this case, the external heading measurements using, for instance, the magnetic compass, are usually used to provide the alignment information [4]. Another possibility is to transfer the obtained attitudes of another, statically aligned, better quality IMU through the master-slave initialization process [5]. In addition, the dynamic alignment can be performed through the velocity matching techniques by using the velocity updates from an aiding system such as the Differential Global Positioning System (DGPS) or the Doppler radar [6–8].This paper proposes the attitude estimation of the low-cost IMU using the linear Kalman filter (standard and modified) in the stationary and dynamic mode. The linear accelerations and angular rates are measured by MEMS IMU.  The gyro and accelerometer data is denoised by wavelet algorithm. Next, the Kalman filter algorithm was used to estimate the pitch and roll. The magnetometer data was used for estimation of the heading. Finally, the test results are presented to show the performance of the proposed algorithm for attitude estimation of the low-cost IMU in the stationary mode and attitude estimation of the moving vehicle.


## 2. Alignment

Here we are discussing the practical aspects of alignment mainly regarding the vehicle navigation. For land vehicles, it can be assumed that the direction of travel is identical to the direction of the b-framex-axis and the roll angle is near to zero. There are two types of alignment that are required before the navigation parameters can be estimated for the portable navigation module in a vehicle. The first alignment is the alignment of the IMU axes with respect to the vehicle axes (i.e., making the b-frame coincide with the v-frame), which is referred to as the relative alignment. Once the relative alignment is achieved, the next step is to align the b-frame with the l-frame, which is referred to as the absolute alignment [6, 8].In a broad sense, the initial absolute alignment of the SINS can be divided into two categories, that is, the stationary based and the moving based alignment. The moving based alignment is used mainly when the good quality GPS signals are available. Here we are discussing the stationary based alignment using the inertial sensor signals only. The requirements of the initial alignment of the SINS are high accuracy and short time. An accurate alignment is crucial; however, this is based on the alignment over a long period of time. A compromise of accuracy and time consumption of the initial alignment should be made. During the process of absolute alignment the pitch, roll, and heading are estimated. The misaligned portable navigation system (PNS) with respect to the vehicle frame is shown in Figure1. If the relative alignment is not done properly, the navigation solution will be erroneous. The relative alignment means alignment of the b-frame with respect to the v-frame. For the vehicle frame, the axes are generally defined as x (direction of travel), z (direction of gravity), and y—completing the orthogonal set. In case of misalignment, the x-axis accelerometer will not measure the true vehicle acceleration in the travel direction. This is due to an additional accelerometer error—not correctly compensated gravity, which is caused by the IMU misalignment. Also the initial attitude angles of the vehicle will be incorrectly estimated if the relative misalignment is not taken into account. And this, in its turn, will cause additional velocity and position drift.Figure 1
The misaligned IMU with respect to the vehicle frame.The orientation accuracy of the PNS in this case will totally depend on the user and it is quite easy to assume that even a careful user cannot align the system properly at every use. An easy way to solve this problem is the introduction of a holder inside the vehicle that is aligned with the vehicle and provides the user an easy way to align the system at every use [6].Inertial sensors do not need external sources for the initial attitude measurement. It can align itself by using the measurements of the local gravity and earth rate. The gyroscope compassing method is used for estimation of the heading [8]. However, the MEMS sensors have significantly high drift rates and noise characteristics, and, therefore, the gyroscope outputs cannot be used to estimate the azimuth or heading of the vehicle. The main reason is that the gyroscope compassing uses the rotation rate of the Earth. The Earth rate is about 15 deg/h, so the noise levels of the low cost gyros are near or higher than the Earth rate. This means that the Earth rate cannot be monitored with the MEMS gyroscopes for the moment. The heading is important in the initialization of the navigation algorithm. Magnetometers are used for the heading estimation. When the vehicle is moving the heading or the azimuth of a vehicle can be determined by incorporating the north and east velocity components from the GPS receiver.The gravity is a relatively large quantity; even the low-cost accelerometers can measure it properly. So, for the MEMS sensors, the strong gravity signals from accelerometers can be measured and these measurements are used for estimation of the roll and pitch of the inertial system with respect to the l-frame.


## 3. MTi-G Device

The calibrated data (the rate of turn, acceleration, and the magnetic field) is expressed in the sensor fixed coordinate system [9]. All calibrated vector sensor readings are in the right-handed Cartesian coordinate system. This coordinate system is body fixed to the device and is defined as the sensor co-ordinate system or the body frame. The coordinate system is aligned to the external housing of the MTi-G. The aluminium base plate of the MTi-G is carefully aligned with the output coordinate system.The MTi-G default local tangent plane of the North-West-Up is defined in the Figure2 above; it has X pointing to the North and it is tangent to an arbitrary reference point. The third component (Z) is chosen Up which is common for many applications (according to the ISO/IEC 18026). The vertical vector Z is perpendicular to the tangent of the ellipsoid as defined in Figure 2. The alignment of the bottom plane and the sides of the aluminium base plate of the MTi-G with respect to the sensor-fixed output coordinate system is within 0.1 deg.Figure 2
Definition of the default MTi-G local tangent plane [9].The orientation output of the MTi-G is the orientation between the sensor-fixed coordinate system (the body frame) and the local tangent plane coordinate system, as the reference coordinate system. The output orientation can be presented in different parameterizations such as the quaternion, direction cosine matrix, or the Euler angles (roll, pitch, and yaw). The Euler angles have more meaningful attitude expression than the quaternion method or the direction cosine matrix method and the user recognizes the attitude of the object directly. According to the definition of the Euler angles, the coordinate system rotates in the angleψ (yaw) on the Z-axis; the coordinate system rotates in the angle θ (pitch) on the Y-axis. Finally this coordinate system can rotate in the angle ϕ (roll) on its X-axis (see Figure 3).Figure 3
Definition of the Euler angles.


## 4. Sensor Data Denoising

It is advisable to reduce the noise level of the inertial sensor signals before using the measurements in the alignment procedure. The objective is to provide more accurate computation of the initial attitude angles and speed up the convergence of the Kalman algorithm.Most of the standard inertial denoising methods such as the low pass filtering are not efficient enough for reducing the high noise levels of the MEMS inertial measurement unit without corrupting some useful information in the sensors’ signal.In [10] it was demonstrated that the wavelet tool can be useful for the analysis of the inertial measurements in order to decrease the noise level.Since the low frequency fraction(ΔF<0.5 Hz) of the inertial measurement reading contains the majority of the inertial sensor dynamics during the static alignment phase, these inertial measurement readings can be denoised using the wavelet multilevel of decomposition to separate the low and high frequencies.Consequently, five levels of decomposition will limit the frequency band to 0.5 Hz. Five levels of decomposition (LOD) are adequate to reduce the high frequency noise from the real inertial sensor measurement [10].  Increasing the level of decomposition results in the undesired features of the navigation solution since the original features of the IMU data will be lost after wavelet filtering with too high LOD. Denoising of the inertial sensor signals by wavelet decomposition has proven its success in reducing errors of the estimated attitude angles for the integrated navigation systems [10]. The analysis of the gyroscope signal is made in order to demonstrate the effect of the wavelet denoising. The results are shown in Figure 4. As we can see, there is a considerable decrease of the noise level. The standard deviation of the gyroscope signal before the wavelet filtering was σ1 = 0.0063 rad/s, but, after it, it decreases till σ2 = 0.0011 rad/s. The same effect of the noise reducing can be demonstrated for the accelerometer signal too.Figure 4
Low-cost gyroscope signal analysis using the wavelet (LOD = 5).


## 5. Heading Estimation Algorithm

When the GPS signal is available and the vehicle has a nonzero velocity, it’s possible to calculate a heading of the vehicle using the GPS-derived velocity. When the GPS signal is not available, the magnetometers (which sense the Earth’s magnetic field strength) can be used for the determination of the absolute heading with reference to the local magnetic North. The deviation between the true north and the local magnetic north is known as the magnetic declination. This declination can be calculated as a function of latitude, longitude, and time using a global model such as the World Magnetic Model (WMM). The global model is typically accurate to about 0.5 degree. The declination angle according to the WMM 2010 for latitude 55° 52′ 19′′N, longitude 26° 31′ 4′′E, and attitude 100 m is 7.284°E. The calculation was done using a software of the open access from the website of the British Geological Survey.The short-term temporal variations of the Earth’s magnetic field can be caused by the magnetic storms [5]. The heading with reference to the local magnetic north is derived from the horizontal force of the magnetic field. If the magnetometer was aligned with the local horizontal the heading, ψ, would be calculated as [11]
(1)ψ=arctan2(Mxlevel,Mylevel),
where Mxlevel, Mylevel   represent the Earth’s magnetic field along the x- and y-axes, aligned with the horizontal plane.Different types of magnetic disturbances distort the measured magnetic field. The magnetic fields are produced not only by the earth but also by the man-made objects such as vehicles, buildings, bridges, and power lines.Hence, the quality of the magnetometer heading strongly depends on the tilt compensation (if not horizontally located) and the calibration procedure, including identifying the possible error sources and removing them from the measurements.The traditional autocalibration method [4] is based on the fact that the locus of the error free magnetometer measurements is a circle if the sensor moves around the circle. The impact of various magnetometer errors would distort the shape of this circle; however, the circular constraint eventually can be used to partially estimate the local variations of the Earth’s magnetic field.Practical implementation of the auto-calibration does not require any reference headings, but this method strongly depends on the position and the effect of ferromagnetic materials in the proximity of the sensor. If the sensor’s location is changed or it is placed in a new environment, a new calibration is needed for identifying and removing the effects of the new magnetic environment.The magnetometer calibrated measurementsMx, My for horizontal components can be represented as follows:
(2)Mx=SxMxlevel+Bx,My=SyMylevel+By,
where Sx, Sy are two scale factors, Bx, By are two biases along the horizontal axes of the magnetic field and Mxlevel, Mylevel are the levelled magnetic components of the Earth. The scale factors and biases can be found using the following equations:
(3)Sx=Max(1,MyMax-MyMinMxMax-MxMin),Sy=Max(1,MxMax-MxMinMyMax-MyMin),Bx=(MxMax-MxMin2-MxMax)Sx,By=(MyMax-MyMin2-MxMax)Sy,
where Sx,Sy are two scale factors, Bx,By are two biases along the horizontal axes of the magnetic field, MyMax, MxMin, MyMin, MxMax—the maximum and minimum of the measured magnetic field along the x- and y-axes.To calibrate the magnetometer using the above equation, it’s necessary to rotate the levelled magnetometer several times by 360 degrees and then determine the scale factors as the ratio of the major and minor axes, changing the circle to an ellipse, and bias parameters as the offset center of the ellipse, after it’s possible to calculate the magnetometer calibrated horizontal components using (2). And the heading can be estimated using (1).The above-mentioned auto-calibration approach has been implemented in MATLAB and applied to the MTi-G magnetometers’ signals in order to test the implementation of the auto-calibration procedure. The results are shown in Figure5. Here the magnetic field strength of the Earth is defined in the arbitrary units (a.u.), normalized to the Earth’s field strength.Figure 5
Performance of the implemented auto-calibration procedure.


## 6. Kalman Filter Algorithm for Roll and Pitch Estimation

### 6.1. Process Model

In this paper quaternions were used as state variables for the Kalman filter. The equations for the linear Kalman filter algorithm used here can be found in [11]. Quaternion implementation of the attitude update is computationally efficient [5]. There’s no trigonometric function during the quaternion based attitude updating.Quaternion is hypercomplex numbers with four components:(4)q=(q1q2q3q4),
where q4 represents the magnitude of rotation, and other three components represent the axis about which that rotation takes place.The differential equations for the process model have the following form [12]:
(5)(q˙1q˙2q˙3q˙4)=12(0ωz-ωyωx-ωz0ωxωyωy-ωx0ωz-ωx-ωy-ωz0)·(q1q2q3q4)+(η1η2η3η4),
where ωx, ωy, ωz   are the output signal of gyroscopes and η1, η2, η3, η4   are zero mean Gaussian noise with the corresponding PSD σP,12,σP,22,σP,32,σP,42. Allan variance method can be used in order to make coarse estimation of σP2. Also sensor noise specification given by the manufacturer can be used for σP2 estimation. Then system noise matrix for the Kalman filter can be determined taking into account σP2 value. And the elements of this matrix can be precised in order to achieve better performance of the filter. For example, elements of the system noise matrix can be adjusted to minimize standard deviation of state vector values. Usually it’s preferable to increase values of the noise matrix elements in order to take into account other unmodelled noise of the system.The defined system model (5) is linear and can be used in the linear Kalman algorithm (LKF).


### 6.2. Measurement Model

The pitch and roll angles calculated using the accelerometer data do not diverge with time because they are not calculated via integration, but rely on the earth’s gravity measured on each axis. Also, the low cost accelerometers have better characteristics (noise level, and stability) comparing with the low cost gyroscopes. The pitch and roll [5] may be determined using
(6)θ=arctan(-ax(ay)2+(az)2),ϕ=arctan2(-ay,az),
where ax,ay,az   are accelerometer signal and arctan2 is the four-quadrant arctangent function.Transforming the pitch, yaw, and roll angles to quaternion, we get the measurement vectorz for updating a step of the Kalman filter. The value of yaw angle for the Kalman filter update step is calculated based on magnetometer data.The measurement equation for the LKF has the following form:(7)z^=H·q+u,
where H  is the measurement matrix, uis vector of the zero mean Gaussian measurement noises and q=[q1q2q3q4]T   is the state vector.The defined measurement model is linear and can be directly used in the linear Kalman algorithm.At any time of the LKF algorithm processing attitude angles can be calculated using [5]
(8)ϕ=arctan2(2(q2q3-q1q4),(q42-q12-q22+q32)),θ=-arcsin(2(q1q3+q2q4)),ψ=arctan2(2(q1q2-q3q4),(q42+q12-q22-q32)),
where q=[q1q2q3q4]  is the quaternion.


## 6.1. Process Model

In this paper quaternions were used as state variables for the Kalman filter. The equations for the linear Kalman filter algorithm used here can be found in [11]. Quaternion implementation of the attitude update is computationally efficient [5]. There’s no trigonometric function during the quaternion based attitude updating.Quaternion is hypercomplex numbers with four components:(4)q=(q1q2q3q4),
where q4 represents the magnitude of rotation, and other three components represent the axis about which that rotation takes place.The differential equations for the process model have the following form [12]:
(5)(q˙1q˙2q˙3q˙4)=12(0ωz-ωyωx-ωz0ωxωyωy-ωx0ωz-ωx-ωy-ωz0)·(q1q2q3q4)+(η1η2η3η4),
where ωx, ωy, ωz   are the output signal of gyroscopes and η1, η2, η3, η4   are zero mean Gaussian noise with the corresponding PSD σP,12,σP,22,σP,32,σP,42. Allan variance method can be used in order to make coarse estimation of σP2. Also sensor noise specification given by the manufacturer can be used for σP2 estimation. Then system noise matrix for the Kalman filter can be determined taking into account σP2 value. And the elements of this matrix can be precised in order to achieve better performance of the filter. For example, elements of the system noise matrix can be adjusted to minimize standard deviation of state vector values. Usually it’s preferable to increase values of the noise matrix elements in order to take into account other unmodelled noise of the system.The defined system model (5) is linear and can be used in the linear Kalman algorithm (LKF).


## 6.2. Measurement Model

The pitch and roll angles calculated using the accelerometer data do not diverge with time because they are not calculated via integration, but rely on the earth’s gravity measured on each axis. Also, the low cost accelerometers have better characteristics (noise level, and stability) comparing with the low cost gyroscopes. The pitch and roll [5] may be determined using
(6)θ=arctan(-ax(ay)2+(az)2),ϕ=arctan2(-ay,az),
where ax,ay,az   are accelerometer signal and arctan2 is the four-quadrant arctangent function.Transforming the pitch, yaw, and roll angles to quaternion, we get the measurement vectorz for updating a step of the Kalman filter. The value of yaw angle for the Kalman filter update step is calculated based on magnetometer data.The measurement equation for the LKF has the following form:(7)z^=H·q+u,
where H  is the measurement matrix, uis vector of the zero mean Gaussian measurement noises and q=[q1q2q3q4]T   is the state vector.The defined measurement model is linear and can be directly used in the linear Kalman algorithm.At any time of the LKF algorithm processing attitude angles can be calculated using [5]
(8)ϕ=arctan2(2(q2q3-q1q4),(q42-q12-q22+q32)),θ=-arcsin(2(q1q3+q2q4)),ψ=arctan2(2(q1q2-q3q4),(q42+q12-q22-q32)),
where q=[q1q2q3q4]  is the quaternion.


## 7. Experimental Results

Experiments have been carried out with the MTi-G manufactured by Xsens Technologies. MTi-G is an integrated GPS and Inertial Measurement Unit (IMU) with the navigation and attitude and heading reference system (AHRS) processor. The MTi-G is based on the MEMS inertial sensors and the GPS receiver and also includes a 3D magnetometer and a static pressure sensor. In this work accelerometer, the gyroscope and magnetometer signals from the MTi-G will be processed by the algorithms described in the previous sections. The sensor data postprocessing algorithms were implemented using the MATLAB software.


### 7.1. Pitch and Roll Estimation for Stationary Object

To test the proposed attitude calculation method, the attitude result is compared with the attitude output of the MTi-G. The attitude output from the MTi-G and the proposed method with the calibrated data from the MTi-G use the same data; thus the attitude result comparison means only the comparison of differences in the attitude calculation algorithm. The GPS signal for the MTi-G was unavailable during the tests. Experiments for attitude estimation were conducted through simulating the certain value of pitch and roll angles of the MTi-G using a tilt table. The accelerometer and gyroscope signals were denoised using the wavelet filtering prior to its processing with the LKF.In order to demonstrate the effect of the signal denoising using the wavelet filtering for attitude angle estimation (e.g., for the pitch), the inertial sensor signals were processed with and without their initial denoising. The result of such experiment is shown in Figure6 for the case when the MTi-G was perfectly levelled (with ±0.1° precision) relative to the local horizontal. The standard deviation of pitch estimation using the LKF and without the wavelet filtering of accelerometer signals was σ1 = 0.0746°, but with denoising (prior to the data processing by the LKF) decreases till σ2 = 0.0105°.Figure 6
Pitch estimation.As the pitch and roll estimation for a stationary object is based on the sensed accelerometer signals, it is worth mentioning that any sensor error such as bias drift, for example, due to the temperature variations will result in the estimation mistake of attitude angles. It’s impossible to differentiate the accelerometer bias due to the misalignment or sensor measurement error. In order to minimize the negative effect from random (stochastic) part of the accelerometer bias, it is recommended to switch on the low cost IMU some time before (5–15 min depending on the IMU technology) the real navigation. The internal characteristics of the low-cost accelerometer will stabilize during this time.During the first test the tilt table was aligned in order to obtain the pitchθ = 0° and roll ϕ = 0° with a precision ±0.1°. The results of the tilt angle estimation are shown in Figures 7 and 8. The mean value and standard deviation of the estimated pitch and roll are given in Table 1.Table 1
The statistical characteristics of the estimated pitch and roll.
Statistical characteristics, degree (°)
Pitch estimation by
Roll estimation by
MTi-G
Proposed algorithm
MTi-G
Proposed algorithm
Mean value
−0.4699
−0.3142
0.3433
0.4896
Standard deviation
0.1270
0.0168
0.1949
0.0150Figure 7
Pitch estimation, when the IMU is aligned with the local horizontal.Figure 8
Roll estimation, when the IMU is aligned with the local horizontal.Then the tilt table was adjusted in order to obtain the rollϕ = 39.5° with a precision ±0.5°, but pitch was kept the same (θ = 0°). The roll estimation for this test is shown in  Figure 9.Figure 9
Roll estimation, when the IMU misaligned byϕ =39.5°.Then the tilt table was adjusted in order to obtain the pitchθ = 39.5° with a precision ±0.5°; the roll value was zero (ϕ = 0°). The pitch estimation is shown in Figure 10. The statistical characteristics of the pitch and roll for the last two tests are provided in Table 2.Table 2
The statistical characteristics of the estimated pitch and roll.
Statistical characteristics, degree (°)
Pitch estimation by
Roll estimation by
MTi-G
Proposed algorithm
MTi-G
Proposed algorithm
Mean value
39.7758
39.4934
39.3042
39.6591
Standard deviation
0.1336
0.0307
0.3483
0.0318Figure 10
Pitch estimation, when the IMU misaligned byθ = 39.5°.


### 7.2. Heading Estimation for Stationary Object

During this test the tilt table was aligned in order to make the pitch and roll equal to zero with a precision ±0.1°. The heading estimation for this test is shown in Figure11. As it was not possible to obtain a true value of the heading with the necessary precision by external means, it can be assumed that the true heading value is approximately an average of two mean values, obtained by the proposed method (see Section 5) and the MTi-G output. In such a case the true heading value is ψ≈118.76°. The statistical characteristics of the estimated heading are given in Table 3.Table 3
The statistical characteristics of the estimated heading.
Statistical characteristics,degree (°)
Heading estimation by
MTi-G
Proposed algorithm
Mean value
119.0114
118.5133
Standard deviation
0.8005
0.4083Figure 11
Heading estimation using the magnetometers’ signals.


### 7.3. Minimisation of the Standard Deviation of the Pitch/Roll Estimation

The functional curves of the standard deviation of the pitch/roll estimation depending on the system noise level are shown in Figures12 and 13.Figure 12
Impact of the system noise valueσ for the standard deviation of the roll estimation (LOD: Level of Decomposition and KF: Kalman Filter).Figure 13
Impact of the system noise valueσ for the standard deviation of the pitch estimation (LOD: Level of Decomposition and KF: Kalman Filter).The standard deviation of the pitch/roll estimation has a greater minimal value, when the KF algorithm is used without signal preprocessing by a wavelet algorithm. And there is only one optimal value of the system noise deviationσ that minimizes the standard deviation of the pitch/roll estimation, when only KF algorithm is used for data processing.When wavelet algorithm is used for sensor data preprocessing, the standard deviation of the roll/pitch estimation decreases insignificantly, whenσ>0.03.The standard deviation of the pitch/roll estimation is high, when the system noise value is small (σ<0.01) in the KF algorithm.The functional curve type remains the same for different values of the measurement noise level, which is defined in the measurement noise matrixR.It is possible to decrease the standard deviation of the pitch/roll estimation for a stationary object even more. For this purpose, the state transition matrixΦ in the KF algorithm should be replaced by the corresponding identity matrix (Φ=I). The system noise level should be decreased for at least 1000–10000 times comparing to the value defined according to the MEMS gyroscope specification. These changes in the algorithm are possible as the MEMS gyroscope in a stationary mode has no informative output signal. And it is assumed that such a model is perfectly suitable for the system description and hence requires very small level of system noise for setting in the KF algorithm. The results of the data processing by KF with a modified state transition matrix (modified KF) are presented in Table 4. For comparison, in the same table the results of the data processing by KF without modification of the state transition matrix are presented as well. The sensor data preprocessing by a wavelet algorithm (LOD = 5) was applied in both cases. The standard deviation of the pitch/roll estimation decreases twofold, when using the modified KF.Table 4
The statistical characteristics of the estimated pitch and roll (R = 0.01 · I).
Statistical characteristics, degree (°)
Pitch estimation by
Roll estimation by
KF
Modified KF
KF
ModifiedKF
Mean value
0.2648
0.2646
0.4512
0.4510
Standard deviation
0.0096
0.0040
0.0128
0.0055


### 7.4. Attitude Estimation for a Vehicle

In most cases, it is sufficient to have accelerometer data for pitch and roll estimation, when a vehicle is in stationary mode. When the vehicle is moving, it is not possible to obtain a reliable solution for the vehicle pitch and roll attitude angles using only accelerometer signals. It is related to the fact that the accelerometer signal contains the information not only about the object misalignment but also additional signal components due to vehicle acceleration. Thus, the information from the gyroscope signal should be used for the attitude estimation of a moving vehicle. Taking this into account, it is necessary to adjust the algorithm (described in Section6) in such a way that accelerometer measurements would be nearly ignored, when the vehicle is accelerating. This can be implemented by setting the Kalman gain matrix values to zero in the algorithm, when the vehicle has velocity change more than certain value during 1 second. This value of velocity change was determined empirically. This value was set to 0.15 m/s for the considered algorithm here.The following additional modification of the algorithm was implemented taking in account results from Section7.3—to replace state transition matrix Φ by the corresponding identity matrix (Φ=I), when the vehicle has velocity change less than 0.15 m/s during 1 second.The experiment was conducted on the straight good quality asphalt road. The IMU was fixed rigidly on a board (Figure14) inside the vehicle. The IMU is placed on the board in order for that the IMU x-axis would coincide with the vehicle longitudinal axis. This can be achieved by a simple geometrical calculation and defining the corresponding axes orientation. (Then the y-axis takes correct orientation automatically). The z-axis of the b-frame was aligned with the gravity vector orientation. This was implemented by the verification of the tilt angles of the board. The tilt angles of the board were verified by an inclinometer in order to guarantee the minimal difference of the z-axes orientation for the b and vehicle coordinate frame. This board was fixed inside the car.Figure 14
Relative alignment of IMU (orange unit) inside vehicle.The vehicle coordinate system defines the longitudinal axis of the vehicle asx, the lateral axis to be y, and the vertical axis z-points downwards so that it is aligned with the gravity (Figure 15).Figure 15
V-frame definition.In the beginning of the test, the vehicle was in stationary mode. Then the vehicle accelerates till certain velocity, after that the velocity of the vehicle remains nearly the same for 1-2 minutes, and after that the vehicle slowed down, and the vehicle was again in the stationary mode. The trajectory of the vehicle moving is shown schematically in Figure16.Figure 16
The trajectory of the vehicle.The results of the vehicle attitude estimation are shown in Figures17, 18, and 19. The vehicle was stationary for the first 60 seconds and the last 10 seconds of the experiment. As expected, the estimation of the pitch and roll based on accelerometer data (when vehicle is stationary) has less fluctuations comparing with the attitude estimation, when the vehicle is moving.Figure 17
Pitch estimation.Figure 18
Roll estimation.Figure 19
Yaw estimation.The standard deviation of the pitch/roll estimation (when the car is stationary) is bigger comparing to the results shown in Section7.1. One of the reasons for this is the additional disturbances of the accelerometer signal caused by the closing car door, engine switching, and passenger moving inside the car.The estimation of the pitch angle (when the car is moving) has a bit more of fluctuations when comparing to the roll estimation as thex-accelerometer (measures acceleration of the vehicle) signal influences the pitch estimation according to (6).The roll value was bigger, when the vehicle was stationary since the vehicle was on the verge (Figure16), where the road had greater inclination. The yaw of the vehicle had significant change in the beginning and in the end of the movement (Figure 19). This is due to the fact that the car made a maneuver, moving from the verge to the traffic line. The initial estimate of the yaw was made using magnetometer data.


## 7.1. Pitch and Roll Estimation for Stationary Object

To test the proposed attitude calculation method, the attitude result is compared with the attitude output of the MTi-G. The attitude output from the MTi-G and the proposed method with the calibrated data from the MTi-G use the same data; thus the attitude result comparison means only the comparison of differences in the attitude calculation algorithm. The GPS signal for the MTi-G was unavailable during the tests. Experiments for attitude estimation were conducted through simulating the certain value of pitch and roll angles of the MTi-G using a tilt table. The accelerometer and gyroscope signals were denoised using the wavelet filtering prior to its processing with the LKF.In order to demonstrate the effect of the signal denoising using the wavelet filtering for attitude angle estimation (e.g., for the pitch), the inertial sensor signals were processed with and without their initial denoising. The result of such experiment is shown in Figure6 for the case when the MTi-G was perfectly levelled (with ±0.1° precision) relative to the local horizontal. The standard deviation of pitch estimation using the LKF and without the wavelet filtering of accelerometer signals was σ1 = 0.0746°, but with denoising (prior to the data processing by the LKF) decreases till σ2 = 0.0105°.Figure 6
Pitch estimation.As the pitch and roll estimation for a stationary object is based on the sensed accelerometer signals, it is worth mentioning that any sensor error such as bias drift, for example, due to the temperature variations will result in the estimation mistake of attitude angles. It’s impossible to differentiate the accelerometer bias due to the misalignment or sensor measurement error. In order to minimize the negative effect from random (stochastic) part of the accelerometer bias, it is recommended to switch on the low cost IMU some time before (5–15 min depending on the IMU technology) the real navigation. The internal characteristics of the low-cost accelerometer will stabilize during this time.During the first test the tilt table was aligned in order to obtain the pitchθ = 0° and roll ϕ = 0° with a precision ±0.1°. The results of the tilt angle estimation are shown in Figures 7 and 8. The mean value and standard deviation of the estimated pitch and roll are given in Table 1.Table 1
The statistical characteristics of the estimated pitch and roll.
Statistical characteristics, degree (°)
Pitch estimation by
Roll estimation by
MTi-G
Proposed algorithm
MTi-G
Proposed algorithm
Mean value
−0.4699
−0.3142
0.3433
0.4896
Standard deviation
0.1270
0.0168
0.1949
0.0150Figure 7
Pitch estimation, when the IMU is aligned with the local horizontal.Figure 8
Roll estimation, when the IMU is aligned with the local horizontal.Then the tilt table was adjusted in order to obtain the rollϕ = 39.5° with a precision ±0.5°, but pitch was kept the same (θ = 0°). The roll estimation for this test is shown in  Figure 9.Figure 9
Roll estimation, when the IMU misaligned byϕ =39.5°.Then the tilt table was adjusted in order to obtain the pitchθ = 39.5° with a precision ±0.5°; the roll value was zero (ϕ = 0°). The pitch estimation is shown in Figure 10. The statistical characteristics of the pitch and roll for the last two tests are provided in Table 2.Table 2
The statistical characteristics of the estimated pitch and roll.
Statistical characteristics, degree (°)
Pitch estimation by
Roll estimation by
MTi-G
Proposed algorithm
MTi-G
Proposed algorithm
Mean value
39.7758
39.4934
39.3042
39.6591
Standard deviation
0.1336
0.0307
0.3483
0.0318Figure 10
Pitch estimation, when the IMU misaligned byθ = 39.5°.


## 7.2. Heading Estimation for Stationary Object

During this test the tilt table was aligned in order to make the pitch and roll equal to zero with a precision ±0.1°. The heading estimation for this test is shown in Figure11. As it was not possible to obtain a true value of the heading with the necessary precision by external means, it can be assumed that the true heading value is approximately an average of two mean values, obtained by the proposed method (see Section 5) and the MTi-G output. In such a case the true heading value is ψ≈118.76°. The statistical characteristics of the estimated heading are given in Table 3.Table 3
The statistical characteristics of the estimated heading.
Statistical characteristics,degree (°)
Heading estimation by
MTi-G
Proposed algorithm
Mean value
119.0114
118.5133
Standard deviation
0.8005
0.4083Figure 11
Heading estimation using the magnetometers’ signals.


## 7.3. Minimisation of the Standard Deviation of the Pitch/Roll Estimation

The functional curves of the standard deviation of the pitch/roll estimation depending on the system noise level are shown in Figures12 and 13.Figure 12
Impact of the system noise valueσ for the standard deviation of the roll estimation (LOD: Level of Decomposition and KF: Kalman Filter).Figure 13
Impact of the system noise valueσ for the standard deviation of the pitch estimation (LOD: Level of Decomposition and KF: Kalman Filter).The standard deviation of the pitch/roll estimation has a greater minimal value, when the KF algorithm is used without signal preprocessing by a wavelet algorithm. And there is only one optimal value of the system noise deviationσ that minimizes the standard deviation of the pitch/roll estimation, when only KF algorithm is used for data processing.When wavelet algorithm is used for sensor data preprocessing, the standard deviation of the roll/pitch estimation decreases insignificantly, whenσ>0.03.The standard deviation of the pitch/roll estimation is high, when the system noise value is small (σ<0.01) in the KF algorithm.The functional curve type remains the same for different values of the measurement noise level, which is defined in the measurement noise matrixR.It is possible to decrease the standard deviation of the pitch/roll estimation for a stationary object even more. For this purpose, the state transition matrixΦ in the KF algorithm should be replaced by the corresponding identity matrix (Φ=I). The system noise level should be decreased for at least 1000–10000 times comparing to the value defined according to the MEMS gyroscope specification. These changes in the algorithm are possible as the MEMS gyroscope in a stationary mode has no informative output signal. And it is assumed that such a model is perfectly suitable for the system description and hence requires very small level of system noise for setting in the KF algorithm. The results of the data processing by KF with a modified state transition matrix (modified KF) are presented in Table 4. For comparison, in the same table the results of the data processing by KF without modification of the state transition matrix are presented as well. The sensor data preprocessing by a wavelet algorithm (LOD = 5) was applied in both cases. The standard deviation of the pitch/roll estimation decreases twofold, when using the modified KF.Table 4
The statistical characteristics of the estimated pitch and roll (R = 0.01 · I).
Statistical characteristics, degree (°)
Pitch estimation by
Roll estimation by
KF
Modified KF
KF
ModifiedKF
Mean value
0.2648
0.2646
0.4512
0.4510
Standard deviation
0.0096
0.0040
0.0128
0.0055


## 7.4. Attitude Estimation for a Vehicle

In most cases, it is sufficient to have accelerometer data for pitch and roll estimation, when a vehicle is in stationary mode. When the vehicle is moving, it is not possible to obtain a reliable solution for the vehicle pitch and roll attitude angles using only accelerometer signals. It is related to the fact that the accelerometer signal contains the information not only about the object misalignment but also additional signal components due to vehicle acceleration. Thus, the information from the gyroscope signal should be used for the attitude estimation of a moving vehicle. Taking this into account, it is necessary to adjust the algorithm (described in Section6) in such a way that accelerometer measurements would be nearly ignored, when the vehicle is accelerating. This can be implemented by setting the Kalman gain matrix values to zero in the algorithm, when the vehicle has velocity change more than certain value during 1 second. This value of velocity change was determined empirically. This value was set to 0.15 m/s for the considered algorithm here.The following additional modification of the algorithm was implemented taking in account results from Section7.3—to replace state transition matrix Φ by the corresponding identity matrix (Φ=I), when the vehicle has velocity change less than 0.15 m/s during 1 second.The experiment was conducted on the straight good quality asphalt road. The IMU was fixed rigidly on a board (Figure14) inside the vehicle. The IMU is placed on the board in order for that the IMU x-axis would coincide with the vehicle longitudinal axis. This can be achieved by a simple geometrical calculation and defining the corresponding axes orientation. (Then the y-axis takes correct orientation automatically). The z-axis of the b-frame was aligned with the gravity vector orientation. This was implemented by the verification of the tilt angles of the board. The tilt angles of the board were verified by an inclinometer in order to guarantee the minimal difference of the z-axes orientation for the b and vehicle coordinate frame. This board was fixed inside the car.Figure 14
Relative alignment of IMU (orange unit) inside vehicle.The vehicle coordinate system defines the longitudinal axis of the vehicle asx, the lateral axis to be y, and the vertical axis z-points downwards so that it is aligned with the gravity (Figure 15).Figure 15
V-frame definition.In the beginning of the test, the vehicle was in stationary mode. Then the vehicle accelerates till certain velocity, after that the velocity of the vehicle remains nearly the same for 1-2 minutes, and after that the vehicle slowed down, and the vehicle was again in the stationary mode. The trajectory of the vehicle moving is shown schematically in Figure16.Figure 16
The trajectory of the vehicle.The results of the vehicle attitude estimation are shown in Figures17, 18, and 19. The vehicle was stationary for the first 60 seconds and the last 10 seconds of the experiment. As expected, the estimation of the pitch and roll based on accelerometer data (when vehicle is stationary) has less fluctuations comparing with the attitude estimation, when the vehicle is moving.Figure 17
Pitch estimation.Figure 18
Roll estimation.Figure 19
Yaw estimation.The standard deviation of the pitch/roll estimation (when the car is stationary) is bigger comparing to the results shown in Section7.1. One of the reasons for this is the additional disturbances of the accelerometer signal caused by the closing car door, engine switching, and passenger moving inside the car.The estimation of the pitch angle (when the car is moving) has a bit more of fluctuations when comparing to the roll estimation as thex-accelerometer (measures acceleration of the vehicle) signal influences the pitch estimation according to (6).The roll value was bigger, when the vehicle was stationary since the vehicle was on the verge (Figure16), where the road had greater inclination. The yaw of the vehicle had significant change in the beginning and in the end of the movement (Figure 19). This is due to the fact that the car made a maneuver, moving from the verge to the traffic line. The initial estimate of the yaw was made using magnetometer data.


## 8. Conclusion

The MEMS IMU is capable of estimating the initial attitude angles (pitch and roll) in the stationary mode without correction from an external sensor such as the GPS. The attitude estimation precision (±0.5°) is sufficient for a vehicle navigation application. The convergence rate of the proposed algorithm is very fast: less than 1 second is necessary to obtain the estimation values of pitch and roll. The results of the comparison show that the attitude (pitch and roll) estimations by the proposed algorithm are less noisy comparing with the MTi-G output. Moreover, the practice showed that it is necessary to wait for about 1-2 minutes until the values of pitch and roll from the MTi-G output stabilize. The heading was estimated using the magnetometer data. The heading estimation was noisier and less stabile comparing with the pitch and roll estimation, even taking into account that the wavelet denoising of the signal was used.The estimation of the vehicle attitude is quite noisy, because the inertial sensors have additional, not enough reduced measurement errors (mainly sensor biases). It’s advisable to use specific methods such as stochastic modelling for reducing measurement errors of the inertial sensors or use an aiding sensor such as the GPS for the estimation of the measurement errors of the inertial sensors through fusion with the inertial sensors data. The particle filter [13] or extended Kalman filter [14] can be used as the data fusion algorithms.



---

*Source: 731530-2012-11-12.xml*