Research on Filtering Algorithm of MEMS Gyroscope Based on Information Fusion

As an important inertial sensor, the gyroscope is mainly used to measure angular velocity in inertial space. However, due to the influence of semiconductor thermal noise and electromagnetic interference, the output of the gyroscope has a certain random noise and drift, which affects the accuracy of the detected angular velocity signal, thus interfering with the accuracy of the stability of the whole system. In order to reduce the noise and compensate for the drift of the MEMS (Micro Electromechanical System) gyroscope during usage, this paper proposes a Kalman filtering method based on information fusion, which uses the MEMS gyroscope and line accelerometer signals to implement the filtering function under the Kalman algorithm. The experimental results show that compared with the commonly used filtering methods, this method allows significant reduction of the noise of the gyroscope signal and accurate estimation of the drift of the gyroscope signal, and thus improves the control performance of the system and the stability accuracy.


Introduction
A photoelectric stability platform is a device that can effectively isolate the carrier disturbance and keep the visual axis stable. As an important inertial sensor of photoelectric stability platform, the gyroscope is mainly used for the angular velocity of the sensitive inertia space of each axis. The measured angular velocity is fed back to the servo control system to form a speed closed loop, thereby isolating the external disturbance and ensuring the stability of the platform. The MEMS gyroscope is widely used in photoelectric stabilization systems due to its small size and low cost. However, due to the influence of devices and environmental interference, the output of the MEMS gyroscope has a certain noise and drift, which reduces the accuracy of the signal and affects the stability of the system.
At present, there are many methods for processing gyroscope signal noise, which can be roughly divided into two categories: one is the based on the model compensation method, that is, modeling the random noise of the gyroscope and offsetting it in accordance with the model, e.g., the Kalman filter method [1][2][3], statistical filtering, etc.; the other is the direct filtering method, which directly filters the output signal of the gyroscope, e.g., low-pass filtering, Wavelet filtering [4][5][6][7], adaptive filtering [8], and so on.
In the literature [9], based on the time series model of gyroscope zero drift data, the author uses the Kalman algorithm to process the drift data. The simulation results show that the method can effectively filter the static gyroscope signal, but the dynamic signal filtering effect is poor. Another paper [10] proposes an analytical method to estimate the measurement noise variance in Kalman filter and apply it to the Kalman filter in real time; experiments show that this method could carry out a more accurate result in estimating the measurement noise variance and improve the accuracy of Kalman Sensors 2019, 19, 3552 3 of 20 Then the Allan method at the relevant time t is defined as The Allan variance curve can be obtained by taking different correlation times t and calculating the corresponding Allan variance σ 2 A (t). The square root σ A (t) of the Allan variance is called the Allan standard deviation and the curve of σ A (t) ∼ t in the double logarithmic coordinate system is called the Allan standard deviation double logarithmic curve [15].
The random drift error of MEMS gyroscope mainly includes five noise sources such as quantization noise, rate ramp noise, angular rate random walk noise, angular random walk noise, and zero offset instability noise [16]. Since these noise sources are reflected in different correlation time regions, the Allan variance method can analyze different noises of the gyroscope. The Allan variance of the quantization noise is σ 2 Q (t) = 3Q 2 /t 2 . The Allan variance of the angular random walk noise is σ 2 N (t) = N 2 /t. The Allan variance noise of the zero-bias instability is σ 2 B (t) = 2B 2 ln2/π. The Allan variance of the angular rate random walk noise is σ 2 K (t) = K 2 t/3. The Allan variance of the rate ramp noise is σ 2 R (t) = R 2 t 2 /2. Among them, Q, N, B, K, and R are various error coefficients. If the MEMS gyroscope contains these five noise sources and is statistically independent. Then the Allan variance can be decomposed into the sum of the Allan variances of the noise sources.
Using the least squares method, ϕ i can be obtained and various error coefficients are obtained. The relationship between each error coefficient and ϕ i is , K = 60 3ϕ 1 , R = 3600 2ϕ 2 In this paper, the static data of MEMS gyroscope is collected at the sampling frequency of 1 KHz. The analysis results are shown in Figure 1. The Allan variance curve can be obtained by taking different correlation times t and calculating the corresponding Allan variance (t). The square root (t) of the Allan variance is called the Allan standard deviation and the curve of (t)~ in the double logarithmic coordinate system is called the Allan standard deviation double logarithmic curve [15]. The random drift error of MEMS gyroscope mainly includes five noise sources such as quantization noise, rate ramp noise, angular rate random walk noise, angular random walk noise, and zero offset instability noise [16]. Since these noise sources are reflected in different correlation time regions, the Allan variance method can analyze different noises of the gyroscope. The Allan variance of the quantization noise is (t) = 3 / . The Allan variance of the angular random walk noise is (t) = / . The Allan variance noise of the zero-bias instability is (t) = 2 2/ . The Allan variance of the angular rate random walk noise is (t) = /3. The Allan variance of the rate ramp noise is (t) = /2. Among them, , N, B, K, and R are various error coefficients.
If the MEMS gyroscope contains these five noise sources and is statistically independent. Then the Allan variance can be decomposed into the sum of the Allan variances of the noise sources.
Using the least squares method, can be obtained and various error coefficients are obtained. The relationship between each error coefficient and is = 3600√3 , = 60 , = 2 2 , = 60 3 , = 3600 2 In this paper, the static data of MEMS gyroscope is collected at the sampling frequency of 1 KHz. The analysis results are shown in Figure 1. As can be seen from the above figure, the noise composition of the MEMS gyroscope is mainly composed of quantization noise and angular random walk noise. Therefore, the filtering of MEMS gyroscope noise is mainly to filter the two noise sources.  As can be seen from the above figure, the noise composition of the MEMS gyroscope is mainly composed of quantization noise and angular random walk noise. Therefore, the filtering of MEMS gyroscope noise is mainly to filter the two noise sources.

Influence of MEMS Gyroscope Error on Stable Platform System
The influence of the error of the MEMS gyroscope on the stable platform control system can be expressed by the mean square error of the system output under the influence of the noise and drift of the gyroscope. The system control model is shown in Figure 2.
(ω) = | ( ω)| ϕ (ω) (6) According to Equation (6), the system mean square error caused by the gyroscope error is It can be seen from Equation (7) that the influence of the gyroscope error on the output of the system is determined by the power spectral density of the gyroscope error and its transfer function in the control system. When the transfer function of the control system is fixed, the larger the noise and drift of the gyroscope, the larger the mean square error of the system output due to it.
In addition, in the platform stability control loop, due to the presence of gyro noise, the controller parameters are often not further optimized, which limits the improvement of system control performance. The existence of constant drift of the gyroscope will cause the system to have a smaller amplitude control output even when the platform is stable, which causes the platform to rotate slowly, affecting its stability accuracy, and more serious may cause the system to not work properly.
Therefore, in order to reduce the influence of MEMS gyroscope error on the system and improve the control performance of the system, it is necessary to process the noise and constant drift of the gyroscope.

Design and Simulation of the Filter Algorithm
There are many filtering methods for gyroscopes, such as low-pass filter, Kalman filter, forward linear filter, and wavelet filter. Considering the feasibility and real-time requirements, the Kalman filter algorithm and forward linear prediction filter algorithm will be highlighted below. We compare the filtering effects of the two algorithms to find the best filter algorithm. In Figure 2, C(s) is the controller of the stable loop, G(s) is the transfer function of the system model, H(s) is the transfer function of the sensor, r(t) is the speed command entered by the system, v(t) is the speed of the system output, and n(t) is the error of the gyroscope.
According to the Figure 2, the transfer function of the gyroscope error input to the system output is From the linear system theory, the output power spectral density of a linear system is equal to the product of the input power spectral density and the system power transfer function [17]. According to the system shown in Figure 2, if the power spectral density of the gyro error is φ r (ω). The transfer function of the gyroscope noise input to the system output is G c (s). The power spectral density of the system output caused by the gyro noise input is According to Equation (6), the system mean square error caused by the gyroscope error is It can be seen from Equation (7) that the influence of the gyroscope error on the output of the system is determined by the power spectral density of the gyroscope error and its transfer function in the control system. When the transfer function of the control system is fixed, the larger the noise and drift of the gyroscope, the larger the mean square error of the system output due to it.
In addition, in the platform stability control loop, due to the presence of gyro noise, the controller parameters are often not further optimized, which limits the improvement of system control performance. The existence of constant drift of the gyroscope will cause the system to have a smaller amplitude control output even when the platform is stable, which causes the platform to rotate slowly, affecting its stability accuracy, and more serious may cause the system to not work properly.
Therefore, in order to reduce the influence of MEMS gyroscope error on the system and improve the control performance of the system, it is necessary to process the noise and constant drift of the gyroscope.

Design and Simulation of the Filter Algorithm
There are many filtering methods for gyroscopes, such as low-pass filter, Kalman filter, forward linear filter, and wavelet filter. Considering the feasibility and real-time requirements, the Kalman filter algorithm and forward linear prediction filter algorithm will be highlighted below. We compare the filtering effects of the two algorithms to find the best filter algorithm.

Design of Kalman Filtering Algorithm Based on Information Fusion
Kalman filter is a filtering method based on the minimum mean square error criterion. It obtains an estimate of the state value through an iterative calculation. And it is the best estimate for linear systems with Gaussian white noise. Due to the high accuracy and good real-time performance of Kalman filter, it has been widely used in signal processing.
The equation of state for the discrete time process of the Kalman filter is expressed as The measurement equation is expressed as In Equation (9), x k is the system state quantity at time k, u k−1 is the system control quantity at time k − 1, A is the state transition matrix, B is the control matrix, C is the measurement matrix, and D and F are the noise matrix. ω k is the system process noise, v k is the system measurement noise, and ω k and v k are mutually independent, normally distributed white noise.
Q and R are the covariance matrices of system noise and measurement noise, respectively. The steps of the Kalman filter algorithm are as follows. State one-step prediction: One-step prediction of covariance matrix: Calculate the filter gain: State estimation: Covariance matrix estimation: According to the motion relationship, when the angular velocity value v k and the angular acceleration value a k of the system at time k are known, the angle and angular velocity of the system at time k + 1 can be obtained as follows According to the Formulae (17) and (18), it is possible to construct a state equation for Kalman filtering using information such as angle, angular velocity, and angular acceleration. This avoids the use of ARMA models or state equations of the original system that are difficult to obtain for Kalman filtering.
Since both the gyroscope and the accelerometer have noise and drift, in order to improve the algorithm's effect on sensor noise reduction and estimation of sensor drift, the state of the Kalman filter is augmented as X = x v ∆v a ∆a T . Where x is the angle information, v is the angular velocity information, ∆v is the angular velocity drift of the sensor, a is the angular acceleration information, and ∆a is the angular acceleration drift of the sensor. Therefore, the system equations and observation equations after the amplification state are where where T is the sampling time.
The angle information can be solved by the gravity component to which the linear accelerometer is sensitive. The angular velocity information is measured by a gyroscope. The angular acceleration information is measured by a linear accelerometer. It can be shown in Figure 3. information, and∆ is the angular acceleration drift of the sensor. Therefore, the system equations and observation equations after the amplification state are The angle information can be solved by the gravity component to which the linear accelerometer is sensitive. The angular velocity information is measured by a gyroscope. The angular acceleration information is measured by a linear accelerometer. It can be shown in Figure 3.
In Figure 3, two linear accelerometers are placed symmetrically about the axis of rotation. G is the acceleration of gravity; 1 and 2 are the output values of the two linear accelerometers, respectively; d is the distance of the line accelerometer from the axis of rotation; is the angle at which the platform rotates; and is the angular acceleration of the platform rotation. According to the relationship, you can get The above formula is combined Thus the angle and angular acceleration of the platform can be obtained. It can be deduced from the above that the improved Kalman filter algorithm can not only filter the gyroscope signal and estimate its constant value drift, but also filter the acceleration signal and estimate the constant value drift of the accelerometer. The processing of the acceleration signal is to better achieve the algorithm's filtering of the gyroscope signal and the estimation of the gyroscope drift.

Proof of Stability of Kalman Filter Algorithm Based on Information Fusion
The stability problem of the Kalman filter is related to its application in practical engineering. Therefore, the stability of the filter should be verified after the filter is designed. The filter stability problem requires studying the influence of the initial value of the parameters on the filter stability. In Figure 3, two linear accelerometers are placed symmetrically about the axis of rotation. G is the acceleration of gravity; a 1 and a 2 are the output values of the two linear accelerometers, respectively; d is the distance of the line accelerometer from the axis of rotation; θ is the angle at which the platform rotates; and α is the angular acceleration of the platform rotation. According to the relationship, you can get The above formula is combined Thus the angle and angular acceleration of the platform can be obtained. It can be deduced from the above that the improved Kalman filter algorithm can not only filter the gyroscope signal and estimate its constant value drift, but also filter the acceleration signal and estimate the constant value drift of the accelerometer. The processing of the acceleration signal is to better achieve the algorithm's filtering of the gyroscope signal and the estimation of the gyroscope drift.

Proof of Stability of Kalman Filter Algorithm Based on Information Fusion
The stability problem of the Kalman filter is related to its application in practical engineering. Therefore, the stability of the filter should be verified after the filter is designed. The filter stability problem requires studying the influence of the initial value of the parameters on the filter stability. That is, as the filtering time increases, the estimated value of the state and the error variance matrix are not affected by the selected initial value [18]. To prove the stability of the filter, the following theorem is used: Filter stability theorem: If the system is fully controllable and fully observable, the Kalman filter is uniformly progressively stable [19,20].
Among them, the observability and controllability criteria of linear systems are as follows.
(1) Linear system controllability criteria: For linear constant discrete system The necessary and sufficient condition for complete controllability is that the rank of the matrix B AB · · · A n−1 B is n.
(2) Linear System Observability Criterion: For linear constant discrete system The necessary and sufficient condition for complete observability is that the rank of the matrix C CA · · · CA n−1 T is n. Where n is the dimension of the state vector. According to Equation (17), As can be seen from the above equation, the Kalman filtering algorithm proposed in this paper is completely controllable and fully observable. According to the filter stability theorem, the algorithm is stable.

Forward Linear Prediction Filter Algorithm
The principle of the forward linear predictive filter algorithm is to multiply the previous gyroscope signal by the corresponding weight to predict the gyroscope signal at the current time. The algorithm begins with an initial value and then calculates the difference between the current gyroscope actual value and the predicted value. The weight vector is adjusted according to the minimum mean square error algorithm to converge to a stable weight [21].
T is the vector of the gyro signals from the first K moments; a i is the weight and K is the order of the filter.
The difference between the current gyroscope actual value and the current gyroscope predicted value and the cost function are According to the theory of minimum mean square error, J(n) should take the minimum value if the best weight is to be obtained. Therefore, the weight adjustment equation is In the actual calculation, in order to reduce the amount of calculation, the above equation is simplified as In the equation, µ is the step factor, which is generally a smaller value greater than zero [22].

Simulation Analysis of Filter Algorithm
For the filtering algorithm designed above, the closed-loop control system shown in Figure 4 is built for simulation analysis. Where r(t) is the angular velocity command signal, G(s) is the transfer function of the platform system, and C(s) is the controller of the system speed closed loop. The angular velocity noise signal vn(t) added by the system is a white noise signal with a variance of 1 (deg/s) 2 and an average of 0.5 deg/s. The added acceleration noise signal an(t) is a white noise signal with a variance of 5 deg/s 2 2 and an average value of 1 deg/s 2 2 .

Simulation Analysis of Filter Algorithm
For the filtering algorithm designed above, the closed-loop control system shown in Figure 4 is built for simulation analysis. Where r(t) is the angular velocity command signal, G(s) is the transfer function of the platform system, and C(s) is the controller of the system speed closed loop. The angular velocity noise signal vn(t) added by the system is a white noise signal with a variance of 1 (deg/s) and an average of 0.5 deg/s. The added acceleration noise signal an(t) is a white noise signal with a variance of 5 (deg/s ) and an average value of 1 (deg/s ) .             It can be seen from Figure 5-9 that the Kalman filter algorithm and the forward linear filter algorithm have the effect of reducing the gyroscope noise level when the gyroscope noise level is constant. Among them, the Kalman filter algorithm reduces the variance of the noise from 1 (deg/s) to 0.0056 (deg/s) . The forward linear filtering algorithm reduces the variance of the noise from 1 (deg/s) to 0.0119 (deg/s) . It can be seen that the Kalman filter effect is better than the forward linear filter effect. Moreover, the Kalman filter algorithm can estimate the constant drift of the gyroscope more accurately. In addition, the Kalman filter algorithm can simultaneously filter the angular acceleration signal and estimate the constant drift of the accelerometer.
The power spectrum is estimated for the angular velocity signals before and after filtering. The result is shown in Figure 10. It can be seen from Figures 5-9 that the Kalman filter algorithm and the forward linear filter algorithm have the effect of reducing the gyroscope noise level when the gyroscope noise level is constant. Among them, the Kalman filter algorithm reduces the variance of the noise from 1 (deg/s) 2 to 0.0056 (deg/s) 2 . The forward linear filtering algorithm reduces the variance of the noise from 1 (deg/s) 2 to 0.0119 (deg/s) 2 . It can be seen that the Kalman filter effect is better than the forward linear filter effect. Moreover, the Kalman filter algorithm can estimate the constant drift of the gyroscope more accurately. In addition, the Kalman filter algorithm can simultaneously filter the angular acceleration signal and estimate the constant drift of the accelerometer.
The power spectrum is estimated for the angular velocity signals before and after filtering. The result is shown in Figure 10.
As showed from the Figure 10, from the perspective of the frequency domain, the noise after forward linear filtering is 15 dB lower than the power spectrum of the original noise. The noise after the Kalman filtering is reduced by up to 25 dB compared to the power spectrum of the original noise. Therefore, the Kalman filter algorithm can better reduce the gyroscope noise. from 1 (deg/s) to 0.0119 (deg/s) . It can be seen that the Kalman filter effect is better than the forward linear filter effect. Moreover, the Kalman filter algorithm can estimate the constant drift of the gyroscope more accurately. In addition, the Kalman filter algorithm can simultaneously filter the angular acceleration signal and estimate the constant drift of the accelerometer.
The power spectrum is estimated for the angular velocity signals before and after filtering. The result is shown in Figure 10. As showed from the Figure 10, from the perspective of the frequency domain, the noise after forward linear filtering is 15 dB lower than the power spectrum of the original noise. The noise after the Kalman filtering is reduced by up to 25 dB compared to the power spectrum of the original noise. Therefore, the Kalman filter algorithm can better reduce the gyroscope noise.   It can be seen from Figure 11-12 that both the Kalman filter algorithm and the forward linear filter algorithm can reduce the noise level in the case of dynamic commands. Among them, the Kalman filter algorithm reduces the variance of noise from 1 (deg/s) to 0.02 (deg/s) . The forward linear filtering algorithm reduces the variance of the noise from 1 (deg/s) to 0.093 (deg/s) . Therefore, the filtering effect of the improved Kalman algorithm is significantly better than that of   It can be seen from Figure 11-12 that both the Kalman filter algorithm and the forward linear filter algorithm can reduce the noise level in the case of dynamic commands. Among them, the Kalman filter algorithm reduces the variance of noise from 1 (deg/s) to 0.02 (deg/s) . The forward linear filtering algorithm reduces the variance of the noise from 1 (deg/s) to 0.093 (deg/s) . Therefore, the filtering effect of the improved Kalman algorithm is significantly better than that of the forward linear algorithm. Moreover, the convergence process of the Kalman filter algorithm in It can be seen from Figures 11 and 12 that both the Kalman filter algorithm and the forward linear filter algorithm can reduce the noise level in the case of dynamic commands. Among them, the Kalman filter algorithm reduces the variance of noise from 1 (deg/s) 2 to 0.02 (deg/s) 2 . The forward linear filtering algorithm reduces the variance of the noise from 1 (deg/s) 2 to 0.093 (deg/s) 2 . Therefore, the filtering effect of the improved Kalman algorithm is significantly better than that of the forward linear algorithm. Moreover, the convergence process of the Kalman filter algorithm in the simulation is also faster.

Comparison and Analysis of Experimental Results
The experimental test system consists of a computer, a dSpace semiphysical simulation system, and a stable platform. The schematic diagram of the experimental system is shown in Figure 13. The DA interface outputs control commands, which drive the platform motor through the drive. The AD interface receives the accelerometer signal and the gyroscope signal, which is used for filtering and constructing feedback for stable control. The stable platform device is shown in Figure 14. It is a two-axis and two-frame structure which is equipped with sensors such as a MEMS gyroscope and linear accelerometers. The MEMS gyroscope is used to measure platform angular velocity information. Linear accelerometers are used to measure platform acceleration information. Linear accelerometers use symmetrical placement to eliminate the effects of gravitational acceleration.   After that the equipment is installed and debugged, in order to achieve stable control of the stable platform system, the gyroscope signal must be introduced into the feedback channel to form a feedback closed-loop system. Then set different command signals according to different experiments and send them to the driver and motor through dSpace. The gyroscope and line accelerometer are used to acquire the motion signals of the stable platform to observe the corresponding experimental results.

Static Filtering Experiment
Set the angular velocity command signal to zero. The gyroscope signal of the pitch axis of the platform, the acceleration signal, and the filtered signal of the Kalman filter algorithm and the forward linear filter algorithm are collected. The signals are as shown in Figure 15   After that the equipment is installed and debugged, in order to achieve stable control of the stable platform system, the gyroscope signal must be introduced into the feedback channel to form a feedback closed-loop system. Then set different command signals according to different experiments and send them to the driver and motor through dSpace. The gyroscope and line accelerometer are used to acquire the motion signals of the stable platform to observe the corresponding experimental results.

Static Filtering Experiment
Set the angular velocity command signal to zero. The gyroscope signal of the pitch axis of the platform, the acceleration signal, and the filtered signal of the Kalman filter algorithm and the forward linear filter algorithm are collected. The signals are as shown in Figures 15-19.  Sensors 2019, 19, x FOR PEER REVIEW 13 of 21           In addition, the Kalman filter algorithm can also filter the angular acceleration signal, which reduces the variance of the acceleration noise from 176 (deg/s ) to 36 (deg/s ) . At the same time, it can estimate the constant value drift of the accelerometer. The average error between the estimated value and the actual value is 0.1 deg/s . Therefore, from the perspective of time domain signals, the filtering effect of the Kalman algorithm is better than that of the forward linear algorithm.
The power spectrum is estimated for the angular velocity signals before and after filtering. The result is shown in Figure 20.  In addition, the Kalman filter algorithm can also filter the angular acceleration signal, which reduces the variance of the acceleration noise from 176 (deg/s ) to 36 (deg/s ) . At the same time, it can estimate the constant value drift of the accelerometer. The average error between the estimated value and the actual value is 0.1 deg/s . Therefore, from the perspective of time domain signals, the filtering effect of the Kalman algorithm is better than that of the forward linear algorithm.
The power spectrum is estimated for the angular velocity signals before and after filtering. The result is shown in Figure 20. Therefore, from the perspective of time domain signals, the filtering effect of the Kalman algorithm is better than that of the forward linear algorithm.
The power spectrum is estimated for the angular velocity signals before and after filtering. The result is shown in Figure 20. It can be seen from Figure 20 that in the frequency domain, both filtering algorithms can reduce the power of signal noise, and as the frequency increases, the reduction amplitude is also larger. The noise filtered by the forward linear algorithm is up to 20 dB lower than the power spectrum of the original noise. The filtered noise of the Kalman algorithm is up to 30 dB lower than the power spectrum of the original noise. Therefore, the Kalman filter algorithm has better noise reduction capability from the frequency domain.

Dynamic Filtering Experiment
Set the angular velocity command to a sinusoidal signal with an amplitude of 2 deg/s and a frequency of 1 Hz. The gyroscope signal of the platform's pitch axis and the filtered signal are shown in Figure 21.  It can be seen from Figure 20 that in the frequency domain, both filtering algorithms can reduce the power of signal noise, and as the frequency increases, the reduction amplitude is also larger. The noise filtered by the forward linear algorithm is up to 20 dB lower than the power spectrum of the original noise. The filtered noise of the Kalman algorithm is up to 30 dB lower than the power spectrum of the original noise. Therefore, the Kalman filter algorithm has better noise reduction capability from the frequency domain.

Dynamic Filtering Experiment
Set the angular velocity command to a sinusoidal signal with an amplitude of 2 deg/s and a frequency of 1 Hz. The gyroscope signal of the platform's pitch axis and the filtered signal are shown in Figure 21. It can be seen from Figure 20 that in the frequency domain, both filtering algorithms can reduce the power of signal noise, and as the frequency increases, the reduction amplitude is also larger. The noise filtered by the forward linear algorithm is up to 20 dB lower than the power spectrum of the original noise. The filtered noise of the Kalman algorithm is up to 30 dB lower than the power spectrum of the original noise. Therefore, the Kalman filter algorithm has better noise reduction capability from the frequency domain.

Dynamic Filtering Experiment
Set the angular velocity command to a sinusoidal signal with an amplitude of 2 deg/s and a frequency of 1 Hz. The gyroscope signal of the platform's pitch axis and the filtered signal are shown in Figure 21. As can be seen from Figure 21, both the Kalman filter algorithm and the forward linear filter algorithm can reduce the noise level in the case of dynamic commands. Among them, the Kalman filter algorithm reduces the variance of noise from 0.56 (deg/s ) to 0.11 (deg/s ) . The forward linear filter algorithm reduces the variance of the noise from 0.56 (deg/s ) to 0.31 (deg/s ) . Therefore, the improved Kalman filter algorithm can better reduce the noise of the gyroscope. As can be seen from Figure 21, both the Kalman filter algorithm and the forward linear filter algorithm can reduce the noise level in the case of dynamic commands. Among them, the Kalman filter algorithm reduces the variance of noise from 0.56 deg/s 2 2 to 0.11 deg/s 2 2 . The forward linear filter algorithm reduces the variance of the noise from 0.56 deg/s 2 2 to 0.31 deg/s 2 2 . Therefore, the improved Kalman filter algorithm can better reduce the noise of the gyroscope. The movements in the above experiments are more conventional movements. In order to fully test the performance of the filter, the platform is artificially rotated randomly without the command signal control; the signal of the gyroscope and the filtered signal are shown in Figure 22. The movements in the above experiments are more conventional movements. In order to fully test the performance of the filter, the platform is artificially rotated randomly without the command signal control; the signal of the gyroscope and the filtered signal are shown in Figure 22. It can be seen from Figure 22 that in the case of random motion of the platform, the two filtering algorithms still have better filtering effects. It is also apparent from the two filter curves in the figure that the Kalman filter algorithm is superior to the forward linear filter algorithm.
To explore the response speed of the filtering algorithm to the signal in the case of random motion of the platform, the Kalman filter algorithm, the forward linear algorithm, and the commonly used low-pass filtering algorithm are compared. The low-pass filtering algorithm uses a second-order low-pass filter with a bandwidth of 20 Hz. The comparison results are shown in Figure 23. As can be seen from Figure 23, the filtering effect of the low-pass filter with a bandwidth of 20 Hz is similar to that of the Kalman filter. However, the response speed of the Kalman filter algorithm and the forward linear filter algorithm is 0.01s faster than the low-pass filter with a bandwidth of 20Hz. Therefore, the Kalman filter algorithm and the forward linear filter algorithm have better response speeds to signals than the low-pass filters under the same filtering effect. It can be seen from Figure 22 that in the case of random motion of the platform, the two filtering algorithms still have better filtering effects. It is also apparent from the two filter curves in the figure that the Kalman filter algorithm is superior to the forward linear filter algorithm.
To explore the response speed of the filtering algorithm to the signal in the case of random motion of the platform, the Kalman filter algorithm, the forward linear algorithm, and the commonly used low-pass filtering algorithm are compared. The low-pass filtering algorithm uses a second-order low-pass filter with a bandwidth of 20 Hz. The comparison results are shown in Figure 23. The movements in the above experiments are more conventional movements. In order to fully test the performance of the filter, the platform is artificially rotated randomly without the command signal control; the signal of the gyroscope and the filtered signal are shown in Figure 22. It can be seen from Figure 22 that in the case of random motion of the platform, the two filtering algorithms still have better filtering effects. It is also apparent from the two filter curves in the figure that the Kalman filter algorithm is superior to the forward linear filter algorithm.
To explore the response speed of the filtering algorithm to the signal in the case of random motion of the platform, the Kalman filter algorithm, the forward linear algorithm, and the commonly used low-pass filtering algorithm are compared. The low-pass filtering algorithm uses a second-order low-pass filter with a bandwidth of 20 Hz. The comparison results are shown in Figure 23. As can be seen from Figure 23, the filtering effect of the low-pass filter with a bandwidth of 20 Hz is similar to that of the Kalman filter. However, the response speed of the Kalman filter algorithm and the forward linear filter algorithm is 0.01s faster than the low-pass filter with a bandwidth of 20Hz. Therefore, the Kalman filter algorithm and the forward linear filter algorithm have better response speeds to signals than the low-pass filters under the same filtering effect. As can be seen from Figure 23, the filtering effect of the low-pass filter with a bandwidth of 20 Hz is similar to that of the Kalman filter. However, the response speed of the Kalman filter algorithm and the forward linear filter algorithm is 0.01s faster than the low-pass filter with a bandwidth of 20Hz. Therefore, the Kalman filter algorithm and the forward linear filter algorithm have better response speeds to signals than the low-pass filters under the same filtering effect.

Influence of Signal Filtering on System Control Performance
In order to test the improvement of the system control performance by the filtering algorithm, the following experiments were performed on the system using the Kalman filter algorithm and the system without the filter algorithm.
For the system with a filter, the classical controller parameters for speed closed loop are K P = 0.15 and K i = 1.5. This controller is also applied to the unfiltered system. For the above two systems, the zero-angle speed command signal is given; the experimental results are shown in Figures 24-26

Influence of Signal Filtering on System Control Performance
In order to test the improvement of the system control performance by the filtering algorithm, the following experiments were performed on the system using the Kalman filter algorithm and the system without the filter algorithm.
For the system with a filter, the classical controller parameters for speed closed loop are K = 0.15 and K = 1.5. This controller is also applied to the unfiltered system. For the above two systems, the zero-angle speed command signal is given; the experimental results are shown in Figure 24-26.

Influence of Signal Filtering on System Control Performance
In order to test the improvement of the system control performance by the filtering algorithm, the following experiments were performed on the system using the Kalman filter algorithm and the system without the filter algorithm.
For the system with a filter, the classical controller parameters for speed closed loop are K = 0.15 and K = 1.5. This controller is also applied to the unfiltered system. For the above two systems, the zero-angle speed command signal is given; the experimental results are shown in Figure 24-26.   As shown in Figure 24-26, in the case of using the same controller, there is no significant difference in the angular velocity of the system with or without the filter. This is because the gyroscope is less sensitive to the motion of the platform than the linear accelerometer. Therefore, it can be seen from the line accelerometer signal that the acceleration output noise of the filtered system is significantly smaller than the acceleration output noise of the unfiltered system which can also be seen from the power spectrum of the angular acceleration signal. The power of the acceleration noise of the filtered system is less than the unfiltered power spectrum; the difference is at most 2.5 dB at 250 Hz. During the experiment, under the same controller and command signal, the unfiltered system will have slight jitter, which is the cause of the above phenomenon.
The above phenomenon indicates that the controller parameters applied to the unfiltered system are not suitable. Therefore, the controller parameters need to be re-adjusted for different systems. The more reasonable parameters are: the controller parameters of the filtered system are K = 0.15 and K = 1.5 , and the controller parameters of the unfiltered system are K = 0.05 and K = 1. For the above two systems, a square wave angular velocity command signal with a amplitude of 5 deg/s and a frequency of 1 Hz is given. The experimental results are shown in Figure  27. As can be seen from Figure 27, for the step signal, both systems can better track the command signal; the systems with filters have a faster step response speed than systems without filters. As shown in Figures 24-26, in the case of using the same controller, there is no significant difference in the angular velocity of the system with or without the filter. This is because the gyroscope is less sensitive to the motion of the platform than the linear accelerometer. Therefore, it can be seen from the line accelerometer signal that the acceleration output noise of the filtered system is significantly smaller than the acceleration output noise of the unfiltered system which can also be seen from the power spectrum of the angular acceleration signal. The power of the acceleration noise of the filtered system is less than the unfiltered power spectrum; the difference is at most 2.5 dB at 250 Hz. During the experiment, under the same controller and command signal, the unfiltered system will have slight jitter, which is the cause of the above phenomenon.
The above phenomenon indicates that the controller parameters applied to the unfiltered system are not suitable. Therefore, the controller parameters need to be re-adjusted for different systems. The more reasonable parameters are: the controller parameters of the filtered system are K P = 0.15 and K i = 1.5, and the controller parameters of the unfiltered system are K P = 0.05 and K i = 1. For the above two systems, a square wave angular velocity command signal with a amplitude of 5 deg/s and a frequency of 1 Hz is given. The experimental results are shown in Figure 27. As shown in Figure 24-26, in the case of using the same controller, there is no significant difference in the angular velocity of the system with or without the filter. This is because the gyroscope is less sensitive to the motion of the platform than the linear accelerometer. Therefore, it can be seen from the line accelerometer signal that the acceleration output noise of the filtered system is significantly smaller than the acceleration output noise of the unfiltered system which can also be seen from the power spectrum of the angular acceleration signal. The power of the acceleration noise of the filtered system is less than the unfiltered power spectrum; the difference is at most 2.5 dB at 250 Hz. During the experiment, under the same controller and command signal, the unfiltered system will have slight jitter, which is the cause of the above phenomenon.
The above phenomenon indicates that the controller parameters applied to the unfiltered system are not suitable. Therefore, the controller parameters need to be re-adjusted for different systems. The more reasonable parameters are: the controller parameters of the filtered system are K = 0.15 and K = 1.5 , and the controller parameters of the unfiltered system are K = 0.05 and K = 1. For the above two systems, a square wave angular velocity command signal with a amplitude of 5 deg/s and a frequency of 1 Hz is given. The experimental results are shown in Figure  27. As can be seen from Figure 27, for the step signal, both systems can better track the command signal; the systems with filters have a faster step response speed than systems without filters. As can be seen from Figure 27, for the step signal, both systems can better track the command signal; the systems with filters have a faster step response speed than systems without filters.
Since the stable platform is often affected by disturbances such as bumps, sway, and jitter of the carrier during work, it is necessary to improve the ability of the stable platform to suppress the disturbance. To compare the ability of the stable platform to suppress disturbances before and after filtering, set the zero angular speed command signal, and apply an angular velocity disturbance of ω = 2 sin(2πt) to the stable platform. The angular error of the platform obtained is shown in Figure 28. Since the stable platform is often affected by disturbances such as bumps, sway, and jitter of the carrier during work, it is necessary to improve the ability of the stable platform to suppress the disturbance. To compare the ability of the stable platform to suppress disturbances before and after filtering, set the zero angular speed command signal, and apply an angular velocity disturbance of ω = 2sin (2πt) to the stable platform. The angular error of the platform obtained is shown in Figure  28. As can be seen from Figure 28, in the case of external disturbance, the variance of the angular error of the system without filter is 0.004 deg and the variance of the angular error of the system with the filter is 0.002 deg . Therefore, the system with a filter has a stronger ability to suppress disturbances.
In summary, the controller parameters are optimized due to the filtering and compensation of the sensor signal by the Kalman filter algorithm. Thereby the control performance of the system and the system's ability to suppress disturbances are improved.

Conclusions
In this paper, based on the large noise and drift of MEMS gyroscopes in engineering applications, a Kalman filter algorithm based on information fusion is proposed. It is compared with the forward linear filter algorithm in simulation and experiment. By comparison, it shows the following.
1. Both filtering algorithms can reduce the noise level of the MEMS gyroscope. However, the filtering effect of the Kalman filter algorithm based on information fusion is better than that of the forward linear filter algorithm, and its noise reduction capability can reach up to 30dB. And it can estimate the constant drift of the MEMS gyroscope more accurately. The average error between the estimated and actual values is 0.02 deg/s. 2. The Kalman filter algorithm based on information fusion can simultaneously reduce the noise level of the accelerometer signal. It can also estimate the constant value drift of the accelerometer, and the average error between the estimated value and the actual value is 0.1 deg/s .
The processing of the gyroscope signal by the Kalman filtering algorithm based on information fusion not only improves the detection accuracy of the gyroscope, but also optimizes the parameters of the system controller. It also compensates for the drift of the gyroscope, which improves the system's slow rotation under stable control. The stability of the photoelectric stability As can be seen from Figure 28, in the case of external disturbance, the variance of the angular error of the system without filter is 0.004 deg 2 and the variance of the angular error of the system with the filter is 0.002 deg 2 . Therefore, the system with a filter has a stronger ability to suppress disturbances.
In summary, the controller parameters are optimized due to the filtering and compensation of the sensor signal by the Kalman filter algorithm. Thereby the control performance of the system and the system's ability to suppress disturbances are improved.

Conclusions
In this paper, based on the large noise and drift of MEMS gyroscopes in engineering applications, a Kalman filter algorithm based on information fusion is proposed. It is compared with the forward linear filter algorithm in simulation and experiment. By comparison, it shows the following.

1.
Both filtering algorithms can reduce the noise level of the MEMS gyroscope. However, the filtering effect of the Kalman filter algorithm based on information fusion is better than that of the forward linear filter algorithm, and its noise reduction capability can reach up to 30dB. And it can estimate the constant drift of the MEMS gyroscope more accurately. The average error between the estimated and actual values is 0.02 deg/s.

2.
The Kalman filter algorithm based on information fusion can simultaneously reduce the noise level of the accelerometer signal. It can also estimate the constant value drift of the accelerometer, and the average error between the estimated value and the actual value is 0.1 deg/s 2 .
The processing of the gyroscope signal by the Kalman filtering algorithm based on information fusion not only improves the detection accuracy of the gyroscope, but also optimizes the parameters of the system controller. It also compensates for the drift of the gyroscope, which improves the system's slow rotation under stable control. The stability of the photoelectric stability platform and the ability to suppress disturbances are improved as a whole, which has important practical significance in practical engineering applications.