In consideration of the effect of noise in an optical tweezer on its measuring accuracy,an effective compensation method for the random drift error of the optical tweezer was proposed.Firstly,the time series analysis and Kalman filter methods were introduced.Then the random drift error of the tweezer was modeled by time series analysis method and the Kalman filter was proposed to decrease this drift error.The testing error from an optical tweezer test setup was compensated.The compensating result shows that the error variance is reduced from 188.90nm2 to 8.41nm2.The data analysis with the Allan variance method demonstrates that the minimum error is reduced from 0.7nm to 0.1nm for an averaging time of 1s.The experiment shows that the method mentioned above can effectively compensate the random drift error of the optical tweezer.It can be used in aligning thedouble optical tweezers and can improve the accuracy of initial alignment for a capturing light and a detecting light in the double optical tweezer and can enhance the equipment performance.