The invention, which belongs to the field of error compensation of a numerically-controlled
machine tool, provides a modeling and compensation method of a radial thermal
drift error of a spindle of ahorizontal numerically-controlled
machine tool. Two thermal drift errors along the radial direction of a spindle of a umerically-controlled
machine tool and corresponding key point temperatures are tested; on the basis of a thermal tilt
deformation mechanism of the spindle, a thermal inclination angle of the spindle is obtained and the correlation between the thermal inclination angle and the
temperature difference between the left side and the right side of a spindle box is analyzed; according to the positive or negative situation of the thermal drift errors of the tested two points and stretching or contraction situations of the left side and right side of the spindle box, a
thermal deformation situation of the spindle is classified and thermal
drift error models under various
thermal deformation attitudes are established; the influence on the
model prediction result by the
structural dimension of the
machine tool is analyzed; and during real-time compensation, the
thermal deformation attitude of the spindle is automatically determined based on the temperatures of the key points and the spindle is compensated by selecting a corresponding thermal
drift error model automatically. Therefore, the determination of the thermal deformation attitude of the spindle of the numerically-controlled
machine tool is realized during the
processing process; and on the basis of the thermal
deformation mechanism, the radial thermal drift error of the spindle is predicted.