The invention discloses an anti-
fogging endoscope lens
temperature control method and
system, and relates to the technical field of
temperature control, and the method comprises the steps: arranging a temperature and
humidity sensor on an
endoscope, collecting temperature and
humidity data, carrying out the
noise suppression, and calculating the temperature and
humidity of an
endoscope lens according to the temperature and humidity data; performing stable clamping on the humidity, calculating a normal pressure correction coefficient, calculating saturation
water vapor pressure of an endoscope lens so as to obtain actual
water vapor pressure, performing inverse solution through the normal pressure correction coefficient so as to obtain an instantaneous
dew point, and smoothly outputting a final
dew point by using a first-order index; calculating an instant
dew point margin according to the lens temperature and the final
dew point, calculating a negative margin correction item, predicting a future margin, calculating a logistic
risk index, and finally comprehensively obtaining a lens adaptive margin; and calculating the
total error of PID control, outputting a control command by adopting a
PID control algorithm, and executing the control command. According to the invention, the
fogging probability and the definition fluctuation are obviously reduced, and the temperature overshoot and fluctuation are reduced.