In order to improve the accuracy of MEMS gyro angular velocity, Allan analysis and Kalman filter algorithm are used to analyze and compensate the random error of MEMS gyroscope. First, Allan variance is used to analyze the gyro output data, and least squares algorithm is used to fit Allan variance. A quantitative evaluation of the random noise is obtained. Then, AR model is applied to set up a mathematical model of gyro output data, and AIC criterion is used to determine the order of the AR model, establishing a discrete time expression of gyro drift data. After that, the Kalman filter is designed based on gyro random error model established by AR model, and Kalman filtering algorithm is used for filtering processing of gyro output data. The random error of gyro can be compensated. Finally, the compensation effect of Kalman algorithm for the gyro random error is analyzed through Allan variance. Experimental results indicate that after compensation of Kalman filter the angular random walk is reduced by 97.24% from 0.148 7 degrees/root h to 0. 004 1 degrees/root h, the bias instability is reduced by 97. 21% from 1. 940 8 degrees/h to 0. 0542 degrees/h, and rate random walk is reduced by 87. 61% from 2. 6985 degrees/h(3/2) to 0. 3343 degrees/h(3/2). Kalman filter can be well applied to filtering process of MEMS gyroscope, and it can effectively reduce the gyro random error.