A Dual-Linear Kalman Filter for Real-Time Orientation Determination System Using Low-Cost MEMS Sensors

To provide a long-time reliable orientation, sensor fusion technologies are widely used to integrate available inertial sensors for the low-cost orientation estimation. In this paper, a novel dual-linear Kalman filter was designed for a multi-sensor system integrating MEMS gyros, an accelerometer, and a magnetometer. The proposed filter precludes the impacts of magnetic disturbances on the pitch and roll which the heading is subjected to. The filter can achieve robust orientation estimation for different statistical models of the sensors. The root mean square errors (RMSE) of the estimated attitude angles are reduced by 30.6% under magnetic disturbances. Owing to the reduction of system complexity achieved by smaller matrix operations, the mean total time consumption is reduced by 23.8%. Meanwhile, the separated filter offers greater flexibility for the system configuration, as it is possible to switch on or off the second stage filter to include or exclude the magnetometer compensation for the heading. Online experiments were performed on the homemade miniature orientation determination system (MODS) with the turntable. The average RMSE of estimated orientation are less than 0.4° and 1° during the static and low-dynamic tests, respectively. More realistic tests on two-wheel self-balancing vehicle driving and indoor pedestrian walking were carried out to evaluate the performance of the designed MODS when high accelerations and angular rates were introduced. Test results demonstrate that the MODS is applicable for the orientation estimation under various dynamic conditions. This paper provides a feasible alternative for low-cost orientation determination.


Introduction
Accurate orientation is essential for the locating and tracking of moving objects relative to a given frame in various kinds of applications, such as unmanned aerial vehicle (UAV) navigation [1], autonomous underwater vehicle (AUV) [2], self-driving cars [3], intelligent robots [4], wearable devices [5], and human position tracking [6][7][8] etc., in military and industrial areas. Inertial sensors, such as the gyros and accelerometer make it possible to determine the orientation of moving object by measuring kinetic physical quantities (acceleration and angular rate, etc.) without any external additional information and other restrictions [9]. Gimbaled gyros, fiber optic gyros, and laser gyros have been successfully used to provide the high-precision movement information for the aircraft and missile systems in military and aviation industries. Given an initial assumption of the orientation, gyros In this paper, we focused on the requirements of a complete system for the low-cost orientation determination. A novel dual-linear Kalman filter was designed for the multi-sensor system. The kinematic models were based on the propagation equations of the local gravity and geomagnetic field in the body frame. The outputs of accelerometer and magnetometer were defined as the measured quantities in the two independent observation models. Benefited from the specific design, only the gyro and accelerometer are enough to run the first stage filter for the attitude estimation and a magnetometer could be integrated optionally if the heading is needed. Considering the different statistical models for sensor errors, the proposed filter can achieve optimal orientation estimation if the sensor statistical error is assumed to be white noise. The proposed strategy precludes the impacts of geomagnetic distortions on the pitch and roll which the heading is subjected to. The RMSE of attitude angles are reduced by 30.6% under magnetic disturbances. Meanwhile, owing to the reduction of system complexity, total time consumption of the proposed method is reduced by 23.8% than that of a standard one, which means that a higher frequency can be implemented for the update of orientation. Furthermore, the separated filter design offers greater flexibility and robustness to magnetic anomalies for the system configuration, as it is possible to switch on or off the second filter to include or exclude the magnetometer compensation for the heading. Online experiments were performed on the homemade real-time miniature orientation determination system (MODS). Furthermore, we carried out more realistic tests on the two-wheel self-balancing vehicle driving and indoor pedestrian walking to evaluate the performance of the designed multi-sensor system when high linear accelerations and angular rates were introduced. The test results demonstrated that the accuracy and stability of MODS were well guaranteed. This paper provides a feasible alternative for low-cost orientation determination.
The kinematic modeling is introduced for the multi-sensor system in Section 2. The dual-linear filter is proposed in Section 3. Noise characteristics are analyzed for the sensor models in Section 4. Hardware design is described for the MODS in Section 5. Real-time experiments performed on the homemade MODS are presented and discussed in Section 6. Finally, the forecasts are put forward for further study in Section 7.

System Modeling
The orientation system is usually applied to determine Euler angles which are regarded as the essential parameters for the navigation and motion control. So-called Euler angles are defined as the rotation angles from the given inertial frame (usually called the navigation frame, denoted by n) to the body frame (fixed to the moving object and denoted by b), including yaw ψ, pitch θ, and roll φ. The body frame xyz is attached to the orientation system. The x-axis is aligned with its forward direction, the z-axis points to the bottom of the system and the y-axis rounds up the right-handed orthogonal coordinate frame. In this paper, the navigation frame n is attached to the local level north frame, namely the North, East, Down (NED) frame, as shown in Figure 1. kinematic models were based on the propagation equations of the local gravity and geomagnetic field in the body frame. The outputs of accelerometer and magnetometer were defined as the measured quantities in the two independent observation models. Benefited from the specific design, only the gyro and accelerometer are enough to run the first stage filter for the attitude estimation and a magnetometer could be integrated optionally if the heading is needed. Considering the different statistical models for sensor errors, the proposed filter can achieve optimal orientation estimation if the sensor statistical error is assumed to be white noise. The proposed strategy precludes the impacts of geomagnetic distortions on the pitch and roll which the heading is subjected to. The RMSE of attitude angles are reduced by 30.6% under magnetic disturbances. Meanwhile, owing to the reduction of system complexity, total time consumption of the proposed method is reduced by 23.8% than that of a standard one, which means that a higher frequency can be implemented for the update of orientation. Furthermore, the separated filter design offers greater flexibility and robustness to magnetic anomalies for the system configuration, as it is possible to switch on or off the second filter to include or exclude the magnetometer compensation for the heading. Online experiments were performed on the homemade real-time miniature orientation determination system (MODS). Furthermore, we carried out more realistic tests on the two-wheel self-balancing vehicle driving and indoor pedestrian walking to evaluate the performance of the designed multi-sensor system when high linear accelerations and angular rates were introduced. The test results demonstrated that the accuracy and stability of MODS were well guaranteed. This paper provides a feasible alternative for low-cost orientation determination. The kinematic modeling is introduced for the multi-sensor system in Section 2. The dual-linear filter is proposed in Section 3. Noise characteristics are analyzed for the sensor models in Section 4. Hardware design is described for the MODS in Section 5. Real-time experiments performed on the homemade MODS are presented and discussed in Section 6. Finally, the forecasts are put forward for further study in Section 7.

System Modeling
The orientation system is usually applied to determine Euler angles which are regarded as the essential parameters for the navigation and motion control. So-called Euler angles are defined as the rotation angles from the given inertial frame (usually called the navigation frame, denoted by n) to the body frame (fixed to the moving object and denoted by b), including yaw  , pitch  , and roll  . The body frame xyz is attached to the orientation system. The x -axis is aligned with its forward direction, the z -axis points to the bottom of the system and the y -axis rounds up the right-handed orthogonal coordinate frame. In this paper, the navigation frame n is attached to the local level north frame, namely the North, East, Down (NED) frame, as shown in Figure 1. Here, we designate a column vector u  , whose components are generally functions of the time t . The transformation between the vector u  in the frame b and the frame n is as: Here, we designate a column vector Ñ u , whose components are generally functions of the time t. The transformation between the vector Ñ u in the frame b and the frame n is as: where C n b pφ, θ, ψq represents the direction cosine matrix (DCM) used to transform the measured quantities from the frame b into the frame n. Henceforward, the parameter t will be omitted for the convenience of readers. C n b can be carried out through three different separate rotations about the three axes. C z ψ , C y θ , and C x φ represent the rotation ψ angle about the z-axis, θ angle about the y-axis, and φ angle about the x-axis, respectively, which are defined as: Then: The propagation equation of C n b accords with the following equation in [23]: where Ω b nb is the skew symmetric matrix of ω " " p q r ı T , which is the angular rate of the moving object in the frame b. Differentiating Equation (1) with respect to the time: Then, the propagation equation of Ñ u in the body frame can be derived as: The vectors of the gravity and the geomagnetic field will both yield to Equation (6): represent the vectors of the gravity and the geomagnetic field in the frame b, respectively.

Dual-Linear Kalman Filter Design
As discussed in the introduction, the orientation angles obtained from the accelerometer and magnetometer provide long-term accuracy with high noise while the gyro-derived orientation angles suffer from drifts and cumulative errors. Neither of them will achieve accurate and stable orientation when only one method is used alone. Therefore, a dual-linear Kalman filter is designed to integrate , we define two state vectors which are the gravity and geomagnetic field in the body frame b in this paper, respectively: Similarly, the accelerometer and magnetometer outputs are defined as the two observation vectors corresponding to the state vectors: The unified discrete-time dynamic equation of the system state can be expressed as follows: where Ñ w n and Ñ v n are the process and measurement noises vectors, respectively. The system transfer matrix Φ is given as: where t s is the sampling interval. After estimating of the state vectors, the pitch, roll, and heading are obtained by the following arc-tangent formulas: The next task is to compute the Kalman gain which is defined as: where R n is the covariance matrix of measurement noise (R a for the accelerometer and R m for the magnetometer). As the inverse of the 3ˆ3 order matrix HPń H T`R n is formulized, time consumption will be drastically reduced. When the orientation system is in stable states, it is easy to achieve the optimal R n . However, inertial sensor measurements may be unreliable and even useless in dynamic states. An adaptive mechanism is designed for the covariance matrixes of sensors noise in the filtering processes according to [20,24]. In the absence of magnetic disturbances, the locus of magnetometer output lies on the surface of a sphere. However, deviations of the magnetometer measurements are very large if magnetic disturbances exists. There are abundant literatures regarding the magnetometer calibration [25][26][27]. The method proposed in [28] was executed for the magnetometer calibration. The strategy will be performed for R m as follows: The schematic of the proposed dual-linear filter algorithm is shown in Figure 2. The state vectors are divided into two independent linear filters and updated separately.

Noise Characteristics
The covariances of the process noise and measurement noise are regarded as the primary design parameters to achieve the minimum variance of estimation errors. In this paper, the process noise is mainly derived from the angular rates measured by the gyros. We can assume that there is a small perturbation where   p q r  ω is the mean of ω. The state equation can be rewritten as: The second term on the right side of the Equation (16) is regarded as the process noise w  . For a discrete-time system, the covariance matrix of the process noise w  is obtained: where where 2 p  , 2 q  and 2 r  are the variances of p , q , and r .
The performance of the proposed filter is strongly linked with the quality of stochastic models used to describe the different sensors' noise. In this paper, the sensors' noise is assumed to be a white noise according to pertinent literatures. A generalized method of wavelet moments (GMWM) proposed by Guerrier et al. [12] was used to analyze the impacts of different sensor error models on the filter. A numerical simulation was implemented to evaluate three different models: (1) a white

Noise Characteristics
The covariances of the process noise and measurement noise are regarded as the primary design parameters to achieve the minimum variance of estimation errors. In this paper, the process noise is mainly derived from the angular rates measured by the gyros. We can assume that there is a small δp δq δr ı to ω: ω " ω`δω (15) where ω " " p q r ı is the mean of ω. The state equation can be rewritten as: The second term on the right side of the Equation (16) is regarded as the process noise Ñ w. For a discrete-time system, the covariance matrix of the process noise Ñ w is obtained: where σ 2 p , σ 2 q and σ 2 r are the variances of p, q, and r. The performance of the proposed filter is strongly linked with the quality of stochastic models used to describe the different sensors' noise. In this paper, the sensors' noise is assumed to be a white noise according to pertinent literatures. A generalized method of wavelet moments (GMWM) proposed by Guerrier et al. [12] was used to analyze the impacts of different sensor error models on the filter. A numerical simulation was implemented to evaluate three different models: (1) a white noise, (2) a Gauss-Markov (GM) process, and (3) a sum of three GM processes. Firstly, we created a theoretical trajectory as shown in Figure 3. The attitude angle is expressed as follows: θ " π 2 sinp0.2tq (19) where t is the simulation time at a sampling instant.
Sensors 2016, 16, 264 7 of 17 noise, (2) a Gauss-Markov (GM) process, and (3) a sum of three GM processes. Firstly, we created a theoretical trajectory as shown in Figure 3. The attitude angle is expressed as follows: where t is the simulation time at a sampling instant. The "perfect" inertial observations (angular rates and accelerations) were obtained by inverse strapdown. Then, we corrupted these perfect observations by three types of errors generated from the three different sensor models. Finally, the proposed filter was executed with the three kind of corrupted observations. Figure 4 shows the time-varying pitch estimation error based on three different sensor models. Figure 5 shows performance comparisons of the absolute pitch estimation error. As shown in the plots, the proposed filter can achieve robust orientation estimation for different sensors errors models. It can be seen that the proposed filter provides the optimal estimation when the sensors' noise is assumed as a white noise. Meanwhile, the results of the Gauss-Markov model are very close to the white noise model.  The "perfect" inertial observations (angular rates and accelerations) were obtained by inverse strapdown. Then, we corrupted these perfect observations by three types of errors generated from the three different sensor models. Finally, the proposed filter was executed with the three kind of corrupted observations. Figure 4 shows the time-varying pitch estimation error based on three different sensor models. Figure 5 shows performance comparisons of the absolute pitch estimation error. As shown in the plots, the proposed filter can achieve robust orientation estimation for different sensors errors models. It can be seen that the proposed filter provides the optimal estimation when the sensors' noise is assumed as a white noise. Meanwhile, the results of the Gauss-Markov model are very close to the white noise model. noise, (2) a Gauss-Markov (GM) process, and (3) a sum of three GM processes. Firstly, we created a theoretical trajectory as shown in Figure 3. The attitude angle is expressed as follows: where t is the simulation time at a sampling instant. The "perfect" inertial observations (angular rates and accelerations) were obtained by inverse strapdown. Then, we corrupted these perfect observations by three types of errors generated from the three different sensor models. Finally, the proposed filter was executed with the three kind of corrupted observations. Figure 4 shows the time-varying pitch estimation error based on three different sensor models. Figure 5 shows performance comparisons of the absolute pitch estimation error. As shown in the plots, the proposed filter can achieve robust orientation estimation for different sensors errors models. It can be seen that the proposed filter provides the optimal estimation when the sensors' noise is assumed as a white noise. Meanwhile, the results of the Gauss-Markov model are very close to the white noise model.  noise, (2) a Gauss-Markov (GM) process, and (3) a sum of three GM processes. Firstly, we created a theoretical trajectory as shown in Figure 3. The attitude angle is expressed as follows: where t is the simulation time at a sampling instant. The "perfect" inertial observations (angular rates and accelerations) were obtained by inverse strapdown. Then, we corrupted these perfect observations by three types of errors generated from the three different sensor models. Finally, the proposed filter was executed with the three kind of corrupted observations. Figure 4 shows the time-varying pitch estimation error based on three different sensor models. Figure 5 shows performance comparisons of the absolute pitch estimation error. As shown in the plots, the proposed filter can achieve robust orientation estimation for different sensors errors models. It can be seen that the proposed filter provides the optimal estimation when the sensors' noise is assumed as a white noise. Meanwhile, the results of the Gauss-Markov model are very close to the white noise model.

Hardware Design
In order to verify and implement the proposed filter in practice, we developed a homemade prototype which is a real-time miniature multi-sensor system, as shown in Figure 6. The multi-sensor system is comprised of three single-axis MEMS gyros (full-scale range of˘450˝/s), a tri-axis accelerometer (full-scale range of˘5 g) produced by Analog Devices, and a tri-axis magnetometer (full-scale range of˘0.8 Gauss) produced by Honeywell. Considering the electromagnetic interference, the magnetometer was welded on the back of the PCB. The sensor data fusion processes are handled by the microprocessor of the STM32F4 series for its excellent performance on dealing with large numbers of floating point arithmetic. The raw sensors data and orientation angles are collected from the miniature orientation determination system (MODS) when it is connected to the upper computer via USB or Zigbee.

Hardware Design
In order to verify and implement the proposed filter in practice, we developed a homemade prototype which is a real-time miniature multi-sensor system, as shown in Figure 6. The multi-sensor system is comprised of three single-axis MEMS gyros (full-scale range of ±450°/s), a tri-axis accelerometer (full-scale range of ±5 g) produced by Analog Devices, and a tri-axis magnetometer (full-scale range of ±0.8 Gauss) produced by Honeywell. Considering the electromagnetic interference, the magnetometer was welded on the back of the PCB. The sensor data fusion processes are handled by the microprocessor of the STM32F4 series for its excellent performance on dealing with large numbers of floating point arithmetic. The raw sensors data and orientation angles are collected from the miniature orientation determination system (MODS) when it is connected to the upper computer via USB or Zigbee.

Noise Variances Determination
Firstly, we removed the mean of the original gyro signal produced in static tests at a frequency of 100 Hz (448,915 measurements). The time-varying errors are available and are presented in the time domain in Figure 7 (upper panel), together with the Haar wavelet variance (WV) and the corresponding GMWM for this process with 95% confidence intervals (lower panel). Similar results are achieved by the GMWM for a white noise process and a GM process, which validate the previous results in Section 4 again. The WV computed from the gyro signal give an indication for the underlying stochastic processes. The GMWM estimates of the parameters and their corresponding 95% confidence intervals using the WV covariances are summarized in Table 1. The suitability of the estimated models can be judged graphically by a matching of the empirical WV and the parametric WV using the estimates in Table 1.

Noise Variances Determination
Firstly, we removed the mean of the original gyro signal produced in static tests at a frequency of 100 Hz (448,915 measurements). The time-varying errors are available and are presented in the time domain in Figure 7 (upper panel), together with the Haar wavelet variance (WV) and the corresponding GMWM for this process with 95% confidence intervals (lower panel). Similar results are achieved by the GMWM for a white noise process and a GM process, which validate the previous results in Section 4 again. The WV computed from the gyro signal give an indication for the underlying stochastic processes. The GMWM estimates of the parameters and their corresponding 95% confidence intervals using the WV covariances are summarized in Table 1. The suitability of the estimated models can be judged graphically by a matching of the empirical WV and the parametric WV using the estimates in Table 1.

Time Consumption Emulation
A time consumption test was designed to validate the effects of proposed filter for reducing the system complexity and computing time by smaller matrix operations. We collected 31,120 row data from an existing orientation system [29] at 100 Hz which were used to run our filter in MATLAB ten times, repeatedly. Table 2 shows the comparisons of time-varying pitch errors estimated by our filter (Method A) and the proposed filter in [18] (Method B). The proposed filter precludes the impacts of geomagnetic distortions on the pitch and roll which the heading is subjected to. As shown in Table 2, the average RMS errors of proposed filter are reduced by 30.6% compared with Method B under strong magnetic disturbances. Meanwhile, mean computation times are reduced by 23.8%, which means that higher frequency can be implemented for the orientation updates.

Time Consumption Emulation
A time consumption test was designed to validate the effects of proposed filter for reducing the system complexity and computing time by smaller matrix operations. We collected 31,120 row data from an existing orientation system [29] at 100 Hz which were used to run our filter in MATLAB ten times, repeatedly. Table 2 shows the comparisons of time-varying pitch errors estimated by our filter (Method A) and the proposed filter in [18] (Method B). The proposed filter precludes the impacts of geomagnetic distortions on the pitch and roll which the heading is subjected to. As shown in Table 2, the average RMS errors of proposed filter are reduced by 30.6% compared with Method B under strong magnetic disturbances. Meanwhile, mean computation times are reduced by 23.8%, which means that higher frequency can be implemented for the orientation updates.

.3. MODS Evaluation
Three kinds of experiments were carried out to verify the performance of the designed MODS. Firstly, the static and dynamic tests for MODS were implemented on a tri-axis turntable that allows precise and repeatable tests. Then, the MODS was mounted on a homemade two-wheel self-balancing vehicle for driving control. Finally, the MODS was tied on the shoes of pedestrian for the indoor walking and stair-climbing experiments to validate the robustness on the attitude estimation when high linear accelerations and angular rates were introduced.

Tri-Axis Turntable Experiments for the MODS
As shown in Figure 8, the MODS was fixed on the static turntable relative to the ground during the static tests. In the majority of existing published literatures, orientation systems were usually kept at the zero input point so as to evaluate the static performance. In our paper, different static input points were tested in our static experiments. The attitude angles were tested from´80˝to 80˝and the heading was from 0˝to 90˝. The turntable was turned by 10˝every time and would be held for a few seconds. During the dynamic test, the MODS was mounted on the running turntable which was controlled to execute the pre-set motions.

Mean Time Consumption Mean Attitude Error
Method A 8.72 s 0.25° Method B 11.45 s 0.36°

MODS Evaluation
Three kinds of experiments were carried out to verify the performance of the designed MODS. Firstly, the static and dynamic tests for MODS were implemented on a tri-axis turntable that allows precise and repeatable tests. Then, the MODS was mounted on a homemade two-wheel self-balancing vehicle for driving control. Finally, the MODS was tied on the shoes of pedestrian for the indoor walking and stair-climbing experiments to validate the robustness on the attitude estimation when high linear accelerations and angular rates were introduced.

Tri-Axis Turntable Experiments for the MODS
As shown in Figure 8, the MODS was fixed on the static turntable relative to the ground during the static tests. In the majority of existing published literatures, orientation systems were usually kept at the zero input point so as to evaluate the static performance. In our paper, different static input points were tested in our static experiments. The attitude angles were tested from −80° to 80° and the heading was from 0° to 90°. The turntable was turned by 10° every time and would be held for a few seconds. During the dynamic test, the MODS was mounted on the running turntable which was controlled to execute the pre-set motions. As shown in Figure 9, the static test results are very smooth and steady. The dynamic test results are plotted in Figure 10. The proposed filter achieves an excellent performance on orientation estimation, which is free from the drifts of gyros and transient disturbances on the compass successfully.
Overall, the results of MODS are quite consistent with the reference, virtually without any time lag whatsoever in the tests. We can see clearly that gyro-derived orientation angles deviate from the reference due to the inherent biases of the gyros. On the other hand, the orientation angles estimated by the accelerometer and magnetometer tend to follow the reference well in the quasi-static state, but large errors and poor reliability appear in the transient high dynamic state. Table 3 indicates that the root mean square (RMS) errors of the pitch and roll angles are less than 0.1°, and approximately 0.4° for the heading angle in static tests. Meanwhile, the RMS errors are below 0.5° for the pitch and roll angles, and less than 1° for the heading angle in dynamic tests. As shown in Figure 9, the static test results are very smooth and steady. The dynamic test results are plotted in Figure 10. The proposed filter achieves an excellent performance on orientation estimation, which is free from the drifts of gyros and transient disturbances on the compass successfully.       Overall, the results of MODS are quite consistent with the reference, virtually without any time lag whatsoever in the tests. We can see clearly that gyro-derived orientation angles deviate from the reference due to the inherent biases of the gyros. On the other hand, the orientation angles estimated by the accelerometer and magnetometer tend to follow the reference well in the quasi-static state, but large errors and poor reliability appear in the transient high dynamic state. Table 3 indicates that the root mean square (RMS) errors of the pitch and roll angles are less than 0.1˝, and approximately 0.4f or the heading angle in static tests. Meanwhile, the RMS errors are below 0.5˝for the pitch and roll angles, and less than 1˝for the heading angle in dynamic tests. For the purpose to validate the performance of the designed MODS in practical applications, we mounted it on a homemade two-wheel self-balancing vehicle, as shown in Figure 11a. The pitch angle θ is one of the most important parameters for driving the self-balancing vehicle. The servo motors will adjust the driving torque T d on the wheels to keep the dynamic balance of the vehicle body according to the variation of the pitch angles, as shown in Figure 11b. At the beginning, the two-wheel vehicle was kept static for a few seconds. Then, the two-wheel vehicle was controlled to drive along the preplanned route until commanded to slow down and stop. Figure 12 shows the time-varying pitch and roll angles during the whole test. For the purpose to validate the performance of the designed MODS in practical applications, we mounted it on a homemade two-wheel self-balancing vehicle, as shown in Figure 11a. The pitch angle  is one of the most important parameters for driving the self-balancing vehicle. The servo motors will adjust the driving torque d T on the wheels to keep the dynamic balance of the vehicle body according to the variation of the pitch angles, as shown in Figure 11b. At the beginning, the two-wheel vehicle was kept static for a few seconds. Then, the two-wheel vehicle was controlled to drive along the preplanned route until commanded to slow down and stop. Figure 12 shows the timevarying pitch and roll angles during the whole test. The pitch angle changes rapidly at the time of 11 s and 23 s corresponding to the starting and stopping of the two-wheel vehicle, respectively. The variations of pitch angles are relatively stable during the vehicle running. Meanwhile, the roll angle changes stably within 1° during the whole test.

Indoor Pedestrian Walking and Stair-Climbing Experiments
For the further validation of the accuracy and stability of the MODS in more realistic motions, indoor pedestrian walking and stair-climbing tests were carried out in our college building, as shown in Figure 13. The MODS was tied on the shoes of the pedestrian. During the waking tests, the pedestrian was required to walk straight along the preplanned route on the floor. The floor tiles can For the purpose to validate the performance of the designed MODS in practical applications, we mounted it on a homemade two-wheel self-balancing vehicle, as shown in Figure 11a. The pitch angle  is one of the most important parameters for driving the self-balancing vehicle. The servo motors will adjust the driving torque d T on the wheels to keep the dynamic balance of the vehicle body according to the variation of the pitch angles, as shown in Figure 11b. At the beginning, the two-wheel vehicle was kept static for a few seconds. Then, the two-wheel vehicle was controlled to drive along the preplanned route until commanded to slow down and stop. Figure 12 shows the timevarying pitch and roll angles during the whole test. The pitch angle changes rapidly at the time of 11 s and 23 s corresponding to the starting and stopping of the two-wheel vehicle, respectively. The variations of pitch angles are relatively stable during the vehicle running. Meanwhile, the roll angle changes stably within 1° during the whole test.

Indoor Pedestrian Walking and Stair-Climbing Experiments
For the further validation of the accuracy and stability of the MODS in more realistic motions, indoor pedestrian walking and stair-climbing tests were carried out in our college building, as shown in Figure 13. The MODS was tied on the shoes of the pedestrian. During the waking tests, the pedestrian was required to walk straight along the preplanned route on the floor. The floor tiles can The pitch angle changes rapidly at the time of 11 s and 23 s corresponding to the starting and stopping of the two-wheel vehicle, respectively. The variations of pitch angles are relatively stable during the vehicle running. Meanwhile, the roll angle changes stably within 1˝during the whole test.

Indoor Pedestrian Walking and Stair-Climbing Experiments
For the further validation of the accuracy and stability of the MODS in more realistic motions, indoor pedestrian walking and stair-climbing tests were carried out in our college building, as shown in Figure 13. The MODS was tied on the shoes of the pedestrian. During the waking tests, the pedestrian was required to walk straight along the preplanned route on the floor. The floor tiles can be regarded as the natural tags to repeat the walking tests. Raw sensor data and orientation angles were collected from the MODS. As shown in Figure 14, norms of the walking accelerations are much higher than the gravity, even close to the maximum scale range of accelerometer (5 g). Similarly, norms of walking angular rates are close to the maximum scale range of gyros (450˝/s). Therefore, high linear accelerations and angular rates are introduced into the proposed filter to verify the robustness of the attitude estimation. The walking cycles are shown clearly by identifiable peak points which can be applied to indoor pedestrian navigation and human health monitoring.
Sensors 2016, 16,264 13 of 17 be regarded as the natural tags to repeat the walking tests. Raw sensor data and orientation angles were collected from the MODS. As shown in Figure 14, norms of the walking accelerations are much higher than the gravity, even close to the maximum scale range of accelerometer (5 g). Similarly, norms of walking angular rates are close to the maximum scale range of gyros (450°/s). Therefore, high linear accelerations and angular rates are introduced into the proposed filter to verify the robustness of the attitude estimation. The walking cycles are shown clearly by identifiable peak points which can be applied to indoor pedestrian navigation and human health monitoring. Figure 15 shows the real-time attitude angles of the MODS during walking tests. Similar to the variations of accelerations and angular rates in Figure 14, attitude angles change periodically with the pedestrian waking cycles. The MODS can provide stable enough attitude estimation for the pedestrian walking. be regarded as the natural tags to repeat the walking tests. Raw sensor data and orientation angles were collected from the MODS. As shown in Figure 14, norms of the walking accelerations are much higher than the gravity, even close to the maximum scale range of accelerometer (5 g). Similarly, norms of walking angular rates are close to the maximum scale range of gyros (450°/s). Therefore, high linear accelerations and angular rates are introduced into the proposed filter to verify the robustness of the attitude estimation. The walking cycles are shown clearly by identifiable peak points which can be applied to indoor pedestrian navigation and human health monitoring. Figure 15 shows the real-time attitude angles of the MODS during walking tests. Similar to the variations of accelerations and angular rates in Figure 14, attitude angles change periodically with the pedestrian waking cycles. The MODS can provide stable enough attitude estimation for the pedestrian walking.  be regarded as the natural tags to repeat the walking tests. Raw sensor data and orientation angles were collected from the MODS. As shown in Figure 14, norms of the walking accelerations are much higher than the gravity, even close to the maximum scale range of accelerometer (5 g). Similarly, norms of walking angular rates are close to the maximum scale range of gyros (450°/s). Therefore, high linear accelerations and angular rates are introduced into the proposed filter to verify the robustness of the attitude estimation. The walking cycles are shown clearly by identifiable peak points which can be applied to indoor pedestrian navigation and human health monitoring. Figure 15 shows the real-time attitude angles of the MODS during walking tests. Similar to the variations of accelerations and angular rates in Figure 14, attitude angles change periodically with the pedestrian waking cycles. The MODS can provide stable enough attitude estimation for the pedestrian walking. During the stair-climbing tests, the pedestrian was required to climb three floors including six half floors climbing and six corners walking which are corresponding to the red segments and the blue segments of the time-varying curves of the accelerations and angular rates in Figure 16. We can find out that the variation ranges of the climbing accelerations are much larger than that of the walking accelerations, but the variation ranges of the angular rates show an inverse tendency. Therefore, the proposed filter will rely more on the gyro outputs during the pedestrian walking, while the accelerometer outputs are considered more in the quasi-static attitude updates.  Figure 17 shows the real-time attitude angles estimated by the MODS during the pedestrian stair-climbing tests. The pitch and roll angles of the walking have a larger variation range than that of climbing stairs. The results are very consistent with the realistic motions because the pedestrian's During the stair-climbing tests, the pedestrian was required to climb three floors including six half floors climbing and six corners walking which are corresponding to the red segments and the blue segments of the time-varying curves of the accelerations and angular rates in Figure 16. We can find out that the variation ranges of the climbing accelerations are much larger than that of the walking accelerations, but the variation ranges of the angular rates show an inverse tendency. Therefore, the proposed filter will rely more on the gyro outputs during the pedestrian walking, while the accelerometer outputs are considered more in the quasi-static attitude updates. During the stair-climbing tests, the pedestrian was required to climb three floors including six half floors climbing and six corners walking which are corresponding to the red segments and the blue segments of the time-varying curves of the accelerations and angular rates in Figure 16. We can find out that the variation ranges of the climbing accelerations are much larger than that of the walking accelerations, but the variation ranges of the angular rates show an inverse tendency. Therefore, the proposed filter will rely more on the gyro outputs during the pedestrian walking, while the accelerometer outputs are considered more in the quasi-static attitude updates.   Figure 17 shows the real-time attitude angles estimated by the MODS during the pedestrian stair-climbing tests. The pitch and roll angles of the walking have a larger variation range than that of climbing stairs. The results are very consistent with the realistic motions because the pedestrian's  Figure 17 shows the real-time attitude angles estimated by the MODS during the pedestrian stair-climbing tests. The pitch and roll angles of the walking have a larger variation range than that of climbing stairs. The results are very consistent with the realistic motions because the pedestrian's feet can stretch completely when walking while they will be blocked by the steps when climbing stairs. Figure 18 is the close-ups relevant to the pitch and roll angles in Figure 17, which shows an excellent convergence and dynamic performance. feet can stretch completely when walking while they will be blocked by the steps when climbing stairs. Figure 18 is the close-ups relevant to the pitch and roll angles in Figure 17, which shows an excellent convergence and dynamic performance.

Conclusions
In this paper, a novel dual-linear Kalman filter was designed for the orientation determination system using low-cost MEMS-based sensors. The propagation equations of the local gravity and geomagnetic field in frame b are used to establish the dynamic models. The accelerometer and magnetometer outputs are defined as the two measured quantities in the same, but independent, observation models. The proposed strategies precludes the impacts of magnetic disturbances on the pitch and roll angles which the heading is subjected to. The RMSE of estimated attitude angles are reduced by 30.6% compared with a standard filter under magnetic disturbances. The proposed filter can achieve optimal orientation estimation if the sensor statistical error is assumed to be white noise.
Owing to the reduction of system complexity, time consumption is reduced by 23.8% compared with a standard filter, which means that higher frequency can be implemented for the orientation updates. feet can stretch completely when walking while they will be blocked by the steps when climbing stairs. Figure 18 is the close-ups relevant to the pitch and roll angles in Figure 17, which shows an excellent convergence and dynamic performance.

Conclusions
In this paper, a novel dual-linear Kalman filter was designed for the orientation determination system using low-cost MEMS-based sensors. The propagation equations of the local gravity and geomagnetic field in frame b are used to establish the dynamic models. The accelerometer and magnetometer outputs are defined as the two measured quantities in the same, but independent, observation models. The proposed strategies precludes the impacts of magnetic disturbances on the pitch and roll angles which the heading is subjected to. The RMSE of estimated attitude angles are reduced by 30.6% compared with a standard filter under magnetic disturbances. The proposed filter can achieve optimal orientation estimation if the sensor statistical error is assumed to be white noise.
Owing to the reduction of system complexity, time consumption is reduced by 23.8% compared with a standard filter, which means that higher frequency can be implemented for the orientation updates.

Conclusions
In this paper, a novel dual-linear Kalman filter was designed for the orientation determination system using low-cost MEMS-based sensors. The propagation equations of the local gravity and geomagnetic field in frame b are used to establish the dynamic models. The accelerometer and magnetometer outputs are defined as the two measured quantities in the same, but independent, observation models. The proposed strategies precludes the impacts of magnetic disturbances on the pitch and roll angles which the heading is subjected to. The RMSE of estimated attitude angles are reduced by 30.6% compared with a standard filter under magnetic disturbances. The proposed filter can achieve optimal orientation estimation if the sensor statistical error is assumed to be white noise.
Owing to the reduction of system complexity, time consumption is reduced by 23.8% compared with a standard filter, which means that higher frequency can be implemented for the orientation updates. The proposed separated method offers greater flexibility for the system design. Online experiments performed on a real-time homemade MODS demonstrate that the proposed sensor fusion algorithm can maintain an accurate and stable estimation for the orientation. The average RMSE are less than 0.4˝and 1˝in the static and low-dynamic turntable tests, respectively. More realistic tests were carried out on the two-wheel self-balancing vehicle driving and indoor pedestrian walking to evaluate the performance of the MODS. The results demonstrate that the accuracy and stability of the MODS are guaranteed even with high linear accelerations and angular rates, which shows remarkable robustness over the applicable operating range. Therefore, the proposed approach provides a feasible alternative for the low-cost real-time orientation determination system. Further research will focus on the calibration of MEMS devices to improve the performance of orientation determination systems. Meanwhile, some additional sensors and modules, such as the barometer and GPS, can be optionally integrated into the existing MODS. In this case, a complete orientation and position determination system would be achieved.