## 1 Introduction  
With the development of modern science and technology, miniaturization of intelligent equipment has become a trend, which puts forward more stringent requirements for the processing technology of the equipment. In order to ensure the reliability of equipment processing, protective measures need to be taken. Precision dispensing technology effectively solves this problem and is widely used in many fields such as bottom filling, precision coating, chip encapsulation, component fixation, and so on [1; 2; 3]. Traditional precision dispensing depends on manual work under a microscope [4], which has the disadvantages of low production efficiency, high work intensity, and inevitable human error. With the continuous development of automation and robot technology, a series of dispensing robots have been developed to improve dispensing efficiency. All the dispensing robots developed by the Nordson Corporation (USA), the Datron Corporation (Germany), and the Soonchunhyang University (Korea) [5; 6] have realized automatic high-speed precision dispensing, but the price has been expensive and they have been costly to maintain. Therefore, development of a high-precision and low-cost dispensing robot has potential application prospects. The location technology of the dispensing robot is the key to ensure measurement accuracy. Generally, height information of the actuator relative to the workpiece is accurately fed back to a robot through the photoelectric detection system, in order to carry out the operation [7, 8]. A laser triangulation displacement sensor (LTDS) is a kind of ranging sensor which combines high directivity and brightness of laser with the principle of triangular measurement. It has the advantages of wide application, large measuring range, high precision, and fast response [9, 10, 11, 12], and can be applied for precisely measuring the height information of a dispensing robot. Considering the working environment of a dispensing robot, the technical difficulties to be overcome when using LTDS to detect dispensing height information are as follows:  
1. The problem of the adaptability of different objects, i.e., the different textures and colors of an object on the dispensing substrate affect the measurement, and the sensor must have good adaptability to different objects;
2. The problem of dynamic response speed, i.e., dispensing is a high-speed dynamic process, because the height of the workpiece on the dispensing substrate is not uniform, the sensor should have fast dynamic response speed during the measurement process. Concerning the adaptability of different measured objects, for several years, researchers have studied the accuracy optimization methods of LTDS and have obtained a number of achievements. [PERSON] [13] introduced a dynamic symmetric projection and hyperbolic fitting compensation algorithm to solve robust alignment problems for different material objects, but the installation and measurement steps of this method were relatively complex. In contrast, it was relatively convenient to control the intensity of the laser imaging spot using an algorithm. [PERSON] [14] improved the adaptability of the sensor to different colors by controlling the beam intensity of the laser diode so that the power received on the photoelectric device was constant when the object color changed. Similarly, [PERSON] [15] proposed the ABLE algorithm to adapt to the problem of light intensity inconsistency caused by different object colors. [PERSON] [16] established a mathematical model for the relationship between the imaging point position and the surface characteristic parameters of the measured object and modified the imaging point position according to the surface parameters to adapt to different measured objects. In addition, [PERSON] [17] analyzed the measurement error caused by different surface colors based on the Phong reflector model and established a color error function library to compensate for the error caused by the color change of the measured object.