Triangular displacement ranging method based on background suppression
Through the design of optical lens parameters, power value compensation and Adaboost algorithm residual compensation, the problem of insufficient accuracy of the traditional triangular displacement ranging method is solved, and high-precision and stable triangular displacement ranging are achieved.
Patent Information
- Application Number
- CN202410871544.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-11-15
AI Technical Summary
During the measurement process, the traditional triangular displacement ranging method is affected by factors such as the reflectivity change of the target color, the fluctuation of the laser emission power and the inability to measure the incident angle, which makes the distance measurement accuracy difficult to ensure, and linear function fitting exists in the prior art. Structural and optical errors cannot meet the needs of high-precision application scenarios.
The triangular displacement ranging method based on background suppression is adopted, and the optical lens parameters are designed through annealing algorithm to perform power value compensation, and the Adaboost algorithm is used to compensate the distance measurement results to achieve automatic optimization and accurate compensation.
The measurement accuracy and stability are improved, and the optical lens is avoided due to factors such as color and reflective properties. It achieves a displacement accuracy of 0.1mm, reduces design errors and noise interference, and ensures the accuracy and sensitivity of the measurement process.
Smart Images

Figure CN118965944A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of triangular displacement ranging methods, and in particular to a triangular displacement ranging method based on background suppression. Background Art
[0002] Traditional laser displacement algorithms are affected by many factors during the measurement process, such as changes in the reflectivity of the target color, fluctuations in the laser emission power, and the inability to measure the incident angle. These factors make it difficult to ensure the ranging accuracy using the triangular displacement ranging method.
[0003] In the prior art, it is proposed to use a linear function to fit the results of triangular displacement calculation. However, due to errors in structure, optics, etc., the linearity of the function is poor and cannot meet the needs of high-precision application scenarios. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a triangulated displacement ranging method based on background suppression, and the triangulated displacement ranging method based on background suppression comprises the following steps:
[0005] Step 1: Designing the parameters of the optical lens using an annealing algorithm to obtain the design parameters of the optical lens;
[0006] Step 2: Based on the design parameters of the optical lens, the power value of the optical lens is compensated by a preset power value;
[0007] Step 3: Use the compensated optical lens to measure the distance through the triangular displacement ranging method to obtain the distance measurement result;
[0008] Step 4: Use the Adaboost algorithm to perform residual compensation on the ranging result to obtain the compensated ranging result.
[0009] The triangulated displacement ranging method based on background suppression provided by the present invention may also have the following characteristics: the design parameters of the optical lens include the radius of curvature, thickness and refractive index.
[0010] The triangulated displacement ranging method based on background suppression provided by the present invention may also have the following characteristics: in step 1, the annealing algorithm includes the following steps:
[0011] (1) Taking the minimization of focal length, transmission efficiency, and wavefront distortion as the objective function; taking the lens material, geometric dimensions, and manufacturing process cost as the constraints; and taking the radius of curvature, thickness, and refractive index of the optical lens as the initialization parameters;
[0012] (2) The model is randomly generated, so that the initial annealing temperature is T0, the cooling coefficient is a0, and the number of iterations at each temperature is L;
[0013] (3) Set the temperature T equal to the next value T in the cooling schedule. i (T = T0 in the first iteration);
[0014] (4) In the current solution x i A new solution x is randomly generated near j , the new solution must satisfy the constraints, and then calculate the objective function value f(x j )(In the first iteration x i =x j );
[0015] (5) If f(x j ) <f(x i ), then accept the new solution x j , otherwise, calculate ΔF=f(x j )-f(x i ), and calculate the acceptance probability, then randomly generate a random number that follows a uniform distribution on the interval [0,1]. If , then accept the new solution r;
[0016] (6) At temperature T i Steps (4) and (5) are repeated L times;
[0017] (7) Determine whether the exit condition is met. If so, exit the iteration; otherwise, return to step (3) and continue the iteration.
[0018] In the triangulated displacement ranging method based on background suppression provided by the present invention, it can also have the following characteristics: in step two, based on the preset upper and lower power limits, the power value is compensated using the error between the uncompensated power value and the upper and lower limits to obtain the compensated power value.
[0019] The triangulated displacement ranging method based on background suppression provided by the present invention may also have the following feature: when compensating the power value, the parameters involved include proportional gain, integral gain and differential gain.
[0020] The triangular displacement ranging method based on background suppression provided by the present invention may also have the following characteristics: in step 3, the calculation formula of the triangular displacement ranging method is:
[0021]
[0022] In the above formula, y is the moving distance of the measured surface, x is the moving distance of the light spot on the photosensitive surface, the intersection of the laser beam and the imaging optical axis is A, the angle between A and the imaging lens is α, and the position of the light spot on the photosensitive surface through the imaging lens at point A is A. ` , imaging lens and A `The angle between the connecting line and the photosensitive surface is β, the object distance of point A is a0, and the phase distance is b0.
[0023] The triangulated displacement ranging method based on background suppression provided by the present invention may also have the following characteristics: in step four, the step of using the Adaboost algorithm to perform residual compensation includes data collection, classifier selection, algorithm training and model combination.
[0024] The beneficial effects of the present invention are:
[0025] In the triangular displacement ranging method based on background suppression of the present invention, the optical lens is firstly designed with an annealing algorithm, and then the designed optical lens is compensated for power value, and then the designed optical lens is used as an imaging lens for triangular displacement ranging, and after ranging, the Adaboost algorithm is used to perform residual compensation on the value after ranging to obtain the compensated displacement value. Based on the ranging method, when designing the parameters of the optical lens, it is no longer necessary to rely on design experience and historical test data, and the optical parameters are automatically optimized through simulated annealing, which reduces the blindness of the design, reduces the error of obtaining the optical parameters based on the experimental combined with the empirical method, and shortens the design cycle of the optical lens.
[0026] In addition, in this method, the power value is supplemented for the parameters of the optical lens to avoid the problem that the optical lens affects the measurement accuracy of the receiving chip due to factors such as color, reflective performance, and surface conditions (such as roughness and inclination), ensuring accuracy and stability during the measurement process. Avoid the occurrence of light saturation and effectively suppress the interference of background noise. On the contrary, when the reflectivity of the target is low, the sensor increases the laser power to ensure that enough light can be reflected back to the sensor by the target for reception. This can enhance the strength of the received signal and improve the sensitivity and measurement accuracy of the sensor.
[0027] Moreover, when calculating the displacement value, the Adaboost algorithm is used to perform residual compensation on the value after ranging. Through the calculation compensation of the compensation model, the displacement accuracy of the entire ranging method can be achieved to 0.1mm, realizing accurate compensation for the measurement error. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a diagram of a distance measurement structure device used in the triangular displacement distance measurement method in this embodiment;
[0029] Figure 2 is a flow chart of a triangulated displacement ranging method based on background suppression in this embodiment;
[0030] Figure 3 It is a flow chart of establishing the compensation model integrated by the Adaboost algorithm in this embodiment. DETAILED DESCRIPTION
[0031] In order to make the technical problems, technical solutions and beneficial effects solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0032] In this embodiment, if Figure 1 As shown in FIG. 1 , the structure of the triangulated displacement ranging method based on background suppression includes a laser emitter, an imaging lens, and a reference plane. The intersection of the laser beam and the imaging optical axis is A, the center point of the imaging lens is O, and the angle α between A and O is also called the working angle. The plane where the measured target is located at this time is also called the reference plane. Point A ` is the spot position of point A on the photosensitive surface through the imaging lens. At this time, OA ` The angle between the light spot and the photosensitive surface is β, which is called the receiving angle. Then, when the measured surface moves to point B, the moving distance is y. After the movement, the light spot is reflected on the measured surface, and point B is imaged at point b on the photosensitive element. ` , relative to A ` , the moving distance is x, and at the reference plane, the object distance of point A is a0 and the phase distance is b0.
[0033] Based on the above distance measuring device, the distance measuring calculation formula of the triangular displacement is:
[0034]
[0035] like Figure 2 As shown, the triangulated displacement ranging method based on background suppression includes the following steps:
[0036] Step 1: Designing the parameters of the optical lens using an annealing algorithm to obtain the design parameters of the optical lens;
[0037] The specific annealing algorithm parameter calculation steps include the following steps:
[0038] (1) Taking the minimization of focal length, transmission efficiency, and wavefront distortion as the objective function; taking the lens material, geometric dimensions, and manufacturing process cost as the constraints; and taking the radius of curvature, thickness, and refractive index of the optical lens as the initialization parameters;
[0039] (2) The model is randomly generated, so that the initial annealing temperature is T0, the cooling coefficient is a0, and the number of iterations at each temperature is L;
[0040] (3) Set the temperature T equal to the next value T in the cooling schedule. i (T = T0 in the first iteration);
[0041] (4) In the current solution xi A new solution x is randomly generated near j , the new solution must satisfy the constraints, and then calculate the objective function value f(x j )(In the first iteration x i =x j );
[0042] (5) If f(x j ) <f(x i ), then accept the new solution x j , otherwise, calculate ΔF=f(x j )-f(x i ), and calculate the acceptance probability, then randomly generate a random number that follows a uniform distribution on the interval [0,1]. If , then accept the new solution r;
[0043] (6) At temperature T i Steps (4) and (5) are repeated L times;
[0044] (7) Determine whether the exit condition is met. If so, exit the iteration; otherwise, return to step (3) and continue the iteration.
[0045] The magnetostrictive displacement sensor is calibrated statically by using a grating with a grating pitch of 0.01 mm and a measuring range of 10 mm, and 1000 sets of data (1.01, 1.02, 1.03, etc.) are obtained to form a data set;
[0046] Step 2: Based on the design parameters of the optical lens obtained in step 1, the power value of the optical lens is compensated by a preset power value;
[0047] The specific power value compensation is:
[0048] The power value fed back by the receiving chip is judged in the software program and the upper and lower limits of the pre-set light control. The system can adjust the power of the laser transmitter according to the PID controller to keep the power value received by the receiving chip within the pre-set range. The specific compensation is that the compensation method defines the error (Error). Among them, the error is the difference between the expected received power value and the power value fed back by the receiving chip. The proportional term (P) is the current value of the error multiplied by the proportional gain; the integral term is the cumulative value of the error multiplied by the integral gain, and then the above terms are used to correct the error due to system deviation (such as offset).
[0049] The specific correction is: use the three parameters of proportional gain (Kp) with a coefficient of 1.0, integral gain (Ki) with a coefficient of 0.1, and differential gain (Kd) with a coefficient of 0.01 to compensate and correct the power value.
[0050] Step 3: Use the compensated optical lens as the imaging lens in the distance measuring device, such as Figure 1 As shown, the distance is measured by the triangular displacement distance measurement method to obtain the distance measurement result;
[0051] Step 4: Use the Adaboost algorithm to perform residual compensation on the distance measurement result to obtain a compensated distance measurement result.
[0052] In addition, in the above step 4, if Figure 3 As shown, the residual compensation using the Adaboost algorithm specifically includes the following steps:
[0053] Step 1: Data collection: Use the triangular displacement algorithm to continuously move the sensor on the slide rail to collect the position of the laser spot on the receiving chip at different distances and the corresponding actual distance value. These data are divided into 8:2 ratios and used as training sets to build the model;
[0054] Step 2: Weak classifier selection: In Adaboost, weak classifiers are usually simple classifiers, such as decision trees or linear regressors. Considering the nonlinear relationship of laser displacement itself, the basic operator selected by this method is the decision tree to fit the relationship between the sensor measurement value and the actual distance;
[0055] Step 3: Algorithm training: Use the Adaboost algorithm to train the selected data. The algorithm iteratively trains the weak classifier for 100 rounds. And adjust the weight of the sample according to the performance of the classifier on the training set to obtain better overall classification performance;
[0056] Step 4: Model combination: After training is completed, Adaboost combines all weak classifiers into a strong classifier and saves the weight file as serialized data for prediction of new data.
[0057] Step 5: Model Evaluation: Finally, the weight file is deployed in the embedded platform by using the model conversion tool pythontoc.
[0058] Based on the above model, in the actual use of the laser displacement sensor, by continuously moving the measured object, the position of the laser spot on the receiving chip is input into the model as an independent variable, and the actual distance is finally calculated. The displacement accuracy of the entire system can be achieved to 0.1mm.
[0059] In addition, in the above-mentioned ranging method, the preset power value can be adaptively set or adjusted according to the actual ranging needs.
[0060] According to the triangular displacement ranging method based on background suppression in the above embodiment, the optical lens is first designed with an annealing algorithm, and then the designed optical lens is compensated for power value, and then the designed optical lens is used as an imaging lens for triangular displacement ranging. After ranging, the Adaboost algorithm is used to perform residual compensation on the measured value to obtain the compensated displacement value. Based on this ranging method, when designing optical lens parameters, it is no longer necessary to rely on design experience and historical test data. The optical parameters are automatically optimized through simulated annealing, which reduces the blindness of the design, reduces the error of obtaining optical parameters based on experiments combined with empirical methods, and shortens the design cycle of the optical lens.
[0061] In addition, in this method, the power value is supplemented for the parameters of the optical lens to avoid the problem that the optical lens affects the measurement accuracy of the receiving chip due to factors such as color, reflective performance, and surface conditions (such as roughness and inclination), ensuring accuracy and stability during the measurement process. Avoid the occurrence of light saturation and effectively suppress the interference of background noise. On the contrary, when the reflectivity of the target is low, the sensor increases the laser power to ensure that enough light can be reflected back to the sensor by the target for reception. This can enhance the strength of the received signal and improve the sensitivity and measurement accuracy of the sensor.
[0062] Moreover, when calculating the displacement value, the Adaboost algorithm is used to perform residual compensation on the value after ranging. Through the calculation compensation of the compensation model, the displacement accuracy of the entire ranging method can be achieved to 0.1mm, realizing accurate compensation for the measurement error.
[0063] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and the equivalent technology, the present application is also intended to include these modifications and variations.
Claims
1. A triangulated displacement ranging method based on background suppression, characterized in that: The following steps are involved: Step 1: Designing the parameters of the optical lens using an annealing algorithm to obtain the design parameters of the optical lens; Step 2: Based on the design parameters of the optical lens, the power value of the optical lens is compensated by a preset power value; Step 3: Use the compensated optical lens to measure the distance through the triangular displacement ranging method to obtain the distance measurement result; Step 4: Use the Adaboost algorithm to perform residual compensation on the distance measurement result to obtain a compensated distance measurement result.
2. The triangulated displacement ranging method based on background suppression according to claim 1, characterized in that: The design parameters of the optical lens include curvature radius, thickness and refractive index.
3. The triangulated displacement ranging method based on background suppression according to claim 1, characterized in that: In step 1, the annealing algorithm includes the following steps: (1) Taking the minimization of focal length, transmission efficiency, and wavefront distortion as the objective function; taking the lens material, geometric dimensions, and manufacturing process cost as the constraints; and taking the radius of curvature, thickness, and refractive index of the optical lens as the initialization parameters; (2) The model is randomly generated, so that the initial annealing temperature is T0, the cooling coefficient is a0, and the number of iterations at each temperature is L; (3) Set the temperature T equal to the next value T in the cooling schedule. i (T = T0 in the first iteration); (4) In the current solution x i A new solution x is randomly generated near j , the new solution must satisfy the constraints, and then calculate the objective function value f(x j )(In the first iteration x i =x j ); (5) If f(x j ) <f(x i ), then accept the new solution x j , otherwise, calculate ΔF=f(x j (-f(x i ), and calculate the acceptance probability, then randomly generate a random number that follows a uniform distribution on the interval [0,1]. If , then accept the new solution r; (6) At temperature T i Steps (4) and (5) are repeated L times; (7) Determine whether the exit condition is met. If so, exit the iteration; otherwise, return to step (3) and continue the iteration.
4. The triangulated displacement ranging method based on background suppression according to claim 1, characterized in that: In step 2, based on the preset upper power limit and lower power limit, the power value is compensated by using the error between the uncompensated power value and the upper and lower limits to obtain a compensated power value.
5. The triangulated displacement ranging method based on background suppression according to claim 4 is characterized in that: When compensating the power value, the parameters involved include proportional gain, integral gain and differential gain.
6. The triangulated displacement ranging method based on background suppression according to claim 1, characterized in that: In step three, the calculation formula of the triangular displacement ranging method is: In the above formula, y is the moving distance of the measured surface, x is the moving distance of the light spot on the photosensitive surface, the intersection of the laser beam and the imaging optical axis is A, the angle between A and the imaging lens is α, and the position of the light spot on the photosensitive surface through the imaging lens at point A is A. ` , imaging lens and A ` The angle between the connecting line and the photosensitive surface is β, the object distance of point A is a0, and the phase distance is b0.
7. The triangulated displacement ranging method based on background suppression according to claim 1, characterized in that: In step 4, the steps of using the Adaboost algorithm to perform residual compensation include data collection, classifier selection, algorithm training, and model combination.
