Influence of high and low temperature environment on photoelectric encoder and the method of sensor error compensation are studied. The environment partition of the photoelectric encoder is judged by temperature
and the different compensation methods are switched to achieve economic and efficient error compensation. The linear least square method is used to compensate the model in the normal temperature zone
and the least square support vector machine( LS-SVM) compensation model is used to deal with the better nonlinear fitting. Through the experimental device test
it is known that in the high temperature and low temperature area
measurement error of the photoelectric encoder is nonlinear
while in the normal temperature zone
measurement error of the photoelectric encoder is linear. The error compensation method of photoelectric encoder in the extreme environment has a good compensation effect on the measurement error in the normal temperature zone or the high temperature and low temperature area.