The application discloses a temperature compensation method based on thermal imaging of a
machine tool ram, and relates to the technical field of
machine tool thermal error compensation; the method comprises the following steps: installing a
temperature measurement thermal imager and establishing a thermal
distribution model, calculating
thermal deformation amounts in three directions, obtaining a deformation correction error sequence, constructing a compensation error prediction model, determining an error compensation opportunity, and executing a progressive
compensation strategy; two-dimensional temperature distribution data is obtained by the thermal imager, high-precision temperature distribution fields are generated by combining three-dimensional mapping technology, the theoretical deformation amounts in each direction are quantified based on an
integral method, and dynamic analysis of multidimensional
thermal deformation amounts is realized; meanwhile, an error correction amount is predicted in advance based on a
time sequence prediction model of an LSTM network, combined with working condition parameters such as an
environmental temperature and a spindle speed,
active compensation is realized, a multi-condition triggering mechanism and a priority are set at the same time, and compensation at a suitable opportunity is ensured; a progressive
compensation strategy avoids overcompensation or undercompensation, and a threshold alarm mechanism is combined to improve the robustness of the
system.