With the rapid development of modern manufacturing technology, people have higher and higher requirements for the quality of mechanical products, and the precision of machine tools for processing mechanical products has gradually increased. Therefore, the development of static pressure guides is particularly important for precision processing industries. The load on the guide rail has an important effect on the thickness of the oil film, and the stability of the oil film thickness directly determines the accuracy of processing. In order to obtain the best control method for the thickness of the oil film, the dimensions of the hydrostatic guide rails and the three-dimensional model of the guide rails were designed and calculated in this paper, and the fuel supply method of the guide rails was determined. The simulation model of the oil film was established and imported from the AMESim software into the FLUENT software to obtain the pressure, velocity, and temperature distribution maps of the oil film. And the pressure distribution data was processed after summarizing. Combined with the relevant mathematical models, the mathematical model of the oil film thickness was finally obtained. Then the Simulink software was used to analyze and the PID control was introduced for comparative analysis. The DOB anti-interference control theory was introduced, and the anti-interference control algorithm was improved. The anti-interference algorithm adapted to the oil film thickness control complete the programming of the modules of the interference controller. The anti-interference control section was created in the Simulink software, and the system of the DOB module was finally completed after packaging. In order to verify the method in t his paper, a static pressure rail test bench was set up, and relevant detection tests were completed. The results of the above studies showed that the control performance was greatly improved after introducing the anti-interference algorithm adapted to the oil film control system.