Sensor error compensation method and system based on function simulation and storage medium

By constructing multiple error compensation models based on quadratic polynomial and Gaussian process regression in laser ranging sensors, the problem of insufficient error compensation of laser ranging sensors under different length conditions is solved, and a more efficient error compensation effect is achieved.

CN119881851AActive Publication Date: 2025-04-25深圳市盛泰奇科技有限公司

Patent Information

Application Number
CN202510378876.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-04-25
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

The existing laser ranging sensor error compensation technology cannot effectively reduce ranging errors under different length conditions, especially at close range, due to problems such as laser spot distortion and receiver nonlinear response, traditional linear correction compensation fails.

Method used

By testing the distance error between the output distance and the real distance of the laser ranging sensor at different distances, the distance range applicable to the quadratic polynomial model is determined, and a quadratic polynomial error compensation model is constructed. For the distance range where quadratic polynomial models are not applicable, Gaussian process regression error compensation model is constructed using Gaussian process regression.

Benefits of technology

The accuracy and comprehensiveness of the error compensation of laser ranging sensors is improved, especially at close range, which can reduce ranging errors more effectively and improve measurement accuracy and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119881851A_ABST
    Figure CN119881851A_ABST
Patent Text Reader

Abstract

The invention discloses a sensor error compensation method and system based on function simulation and a storage medium, and relates to the technical field of laser distance measuring sensor error compensation, and the method comprises the following steps: testing the distance error between the output distance and the real distance of a laser distance measuring sensor at different distances; compensating different distances by adopting different error compensation models based on the distance error; verifying whether the error compensation model is valid; the method is used for solving the problem that the error of a laser ranging result cannot be effectively reduced within a certain length range due to the fact that an error compensation method under different length conditions is not reasonable enough in an existing laser ranging sensor error compensation technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of error compensation for laser ranging sensors, and in particular to a sensor error compensation method, system and storage medium based on function simulation. Background Art

[0002] Laser ranging sensor error compensation technology refers to a technology that actively identifies and corrects the deviation between the output value of the laser ranging sensor and the actual distance through mathematical modeling, algorithm design or hardware adjustment. Its core goal is to eliminate or reduce the systematic errors caused by the sensor's own characteristics, environmental interference or measurement conditions, thereby improving the accuracy, stability and reliability of the measurement.

[0003] Existing laser ranging sensor error compensation technologies usually use traditional linear correction compensation, or use other methods to compensate for the full-length ranging results. However, when the laser ranging sensor is at a close distance, due to problems such as laser spot distortion and receiver nonlinear response, the traditional linear correction compensation fails. In addition, the error distribution of its ranging is different under different length conditions, and the ranging result cannot be corrected to the correct length through a unified compensation model. For example, in the patent application with publication number CN108226942A, a "ranging method and electronic laser ranging module for determining the distance to a target object" is disclosed. This solution is to compensate the error of the laser ranging result through a single error compensation method. Under different length conditions, the error distribution of laser ranging has different rules. Using a single model cannot effectively reduce the ranging error in the whole scene. The existing laser ranging sensor error compensation technology also has the problem that the error compensation method under different length conditions is not reasonable enough, resulting in the problem that the error of the laser ranging result cannot be effectively reduced within a certain length range. Summary of the invention

[0004] The present invention aims to solve one of the technical problems in the prior art to at least a certain extent, by testing the distance error between the output distance and the true distance of a laser ranging sensor at different distances, then determining the distance range applicable to the quadratic polynomial model and constructing a quadratic polynomial error compensation model, then using Gaussian process regression to regress the distance range that is not applicable to the quadratic polynomial model, constructing a Gaussian process regression error compensation model, and finally verifying whether the error compensation model is effective, so as to solve the problem that the error compensation method of the existing laser ranging sensor error compensation technology is not reasonable under different length conditions, resulting in the error of the laser ranging result cannot be effectively reduced within a certain length range.

[0005] To achieve the above objectives, in a first aspect, the present application provides a sensor error compensation method based on function simulation, comprising the following steps: Test the distance error between the output distance and the actual distance of the laser distance measuring sensor at different distances; Based on the distance error, different error compensation models are used to compensate for different distances; Verify whether the error compensation model is effective.

[0006] Further, testing the distance error between the output distance and the actual distance of the laser distance measuring sensor at different distances includes the following sub-steps: A high-precision guide rail platform is provided to control the distance between the laser ranging sensor and the baffle; Set the starting distance and the ending distance, and set the interval step length, control the distance between the laser distance sensor and the baffle to be equal to the starting distance, obtain the output data of the laser distance sensor, name it as the output distance, and name the distance between the laser distance sensor and the baffle as the real distance; Increase the actual distance by the interval step and record the output distance again, repeat the increase until the actual distance equals the end distance, record the output distance and stop increasing; The actual distances are marked as DT in ascending order. n , and mark the corresponding output distance as DR n , where n is a positive integer and n is the serial number of DT and DR; Calculate DT n -DR n , and name the calculated result as distance error, marked as DE n .

[0007] Furthermore, using different error compensation models to compensate for different distances based on the distance error includes the following sub-steps: Determine the distance range in which the quadratic polynomial model is applicable and construct a quadratic polynomial error compensation model; Gaussian process regression is used to regress the distance range that is not suitable for the quadratic polynomial model, and a Gaussian process regression error compensation model is constructed.

[0008] Furthermore, determining the distance range applicable to the quadratic polynomial model and constructing the quadratic polynomial error compensation model includes the following sub-steps: With n as the X-axis, DE n Establish a plane rectangular coordinate system for the Y axis and name it as the quadratic polynomial error regression graph; Set the isolation number, marked as m, where m is a positive integer and is initially set to 2. Mark the range [1,m] as i; Will DE i Enter the quadratic polynomial error regression graph according to n, where DE i That is, DE for n=i n ; Performing quadratic polynomial regression on the quadratic polynomial error regression graph, naming the function obtained by regression as the quadratic polynomial error regression function, and obtaining the standard deviation of the quadratic polynomial error regression function; Add 1 to m and analyze the quadratic polynomial error regression function and standard deviation again, repeating until m=max(n), where max() is the maximum value operator; The standard deviations are sorted and numbered in ascending order of m, using the symbol S j Indicates, where j is a positive integer and j is the serial number of S. When j=1, corresponding to m=2, the value range of j is 1≤j≤max(n)-1; Based on the calculated different standard deviations, the distance range in which the quadratic polynomial model is applicable is analyzed and a quadratic polynomial error compensation model is constructed.

[0009] Furthermore, based on the calculated different standard deviations, analyzing the distance range applicable to the quadratic polynomial model and constructing the quadratic polynomial error compensation model includes the following sub-steps: Starting with j=2, calculate |S j -S j-1 |, mark the result as H j , then add j+1 and recalculate H j , repeat until j=max(j); Set the value q, which is initially 3, and start with j≤q to obtain H j The value range of is marked as the fluctuation range, and the difference between the maximum and minimum values ​​in the fluctuation range is obtained, which is marked as the fluctuation value and represented by the symbol G1. j The number of fluctuations is marked as the fluctuation number and represented by the symbol G2. G2 / G1 is calculated and the result is marked as the fluctuation density and represented by the symbol F. q express; Increase q by one and recalculate F q , until q=max(j)-1, find F q The maximum value in is marked as the maximum fluctuation density. The value of q of the maximum fluctuation density is obtained and marked as Q. At this time, S Q The corresponding standard deviation is the optimal standard deviation of the quadratic polynomial error compensation model, where S Q S corresponding to j=Q j , Q+1 is used to obtain the best value of m, which is marked as the optimal isolation number and represented by the symbol M; Get DT M and marked as the maximum applicable value, where DT M DT for n=M n, the distance range that is less than or equal to the maximum applicable value is marked as the applicable range, and the quadratic polynomial error regression function calculated when i is [1,M] is marked as the quadratic polynomial error compensation model.

[0010] Furthermore, Gaussian process regression is used to regress the distance range that is not applicable to the quadratic polynomial model, and the construction of the Gaussian process regression error compensation model includes the following sub-steps: The distance range that is greater than the applicable range and less than or equal to the end distance is named Gaussian range; Construct a Gaussian process regression error compensation model and use Matern5 / 2 to check the DT within the Gaussian range. n and DR n Perform model training.

[0011] Furthermore, verifying whether the error compensation model is effective includes the following sub-steps: Randomly collect the test distances of the first test quantity between the starting distance and the ending distance, and record the actual test distances corresponding to the test distances; Find the distance interval to which the test distance belongs. If the test distance is within the applicable range, use the quadratic polynomial error compensation model to compensate for the test distance error. Otherwise, use the Gaussian process regression error compensation model to compensate for the test distance error. If the quadratic polynomial error compensation model is used to compensate the test distance error, DE n Substituting the test distance into the quadratic polynomial error compensation model, adding the test distance to the output of the quadratic polynomial error compensation model to obtain the predicted compensation distance; If the Gaussian process regression error compensation model is used to compensate the test distance error, then DR n Substitute the test distance into the Gaussian process regression error compensation model, obtain the output result of the Gaussian process regression error compensation model, and obtain the predicted compensation distance; The traditional linear correction compensation technology is used to compensate the error of the test distance, and the compensation result is marked as the traditional compensation distance; The effectiveness of the error compensation model is verified based on the traditional compensation distance, predicted compensation distance and actual test distance.

[0012] Furthermore, based on the traditional compensation distance, the predicted compensation distance and the actual distance tested, the effectiveness of the error compensation model is verified, including the following sub-steps: Calculate the absolute value of the difference between the predicted compensation distance and the actual test distance, marked as the error after compensation; Calculate the absolute value of the difference between the traditional compensation distance and the actual test distance, and mark it as the traditional compensation error; The average value of the compensated error is calculated and named as the compensated average error, and the average value of the traditional compensated error is calculated and named as the traditional compensated average error; The average error after compensation is marked as W1, and the average error of traditional compensation is marked as W2. W1 is compared with W2. If W1 is less than W2, a compensation valid signal is output, otherwise a compensation invalid signal is output; Calculate W1 / W2 and name the result as the performance improvement percentage.

[0013] In a second aspect, the present application provides a sensor error compensation system based on function simulation, including an error testing module, an error compensation module and a validity verification module; the error testing module and the validity verification module are respectively data-connected to the error compensation module; The error testing module is used to test the distance error between the output distance and the actual distance of the laser distance measuring sensor at different distances; The error compensation module is used to compensate for different distances using different error compensation models based on the distance error; The validity verification module is used to verify whether the error compensation model is valid.

[0014] In a third aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are performed.

[0015] The beneficial effects of the present invention are as follows: the present invention tests the distance error between the output distance and the real distance of the laser ranging sensor at different distances, then determines the distance range applicable to the quadratic polynomial model and constructs a quadratic polynomial error compensation model, and then uses Gaussian process regression to regress the distance range that is not applicable to the quadratic polynomial model, and constructs a Gaussian process regression error compensation model. The advantage is that, through multiple tests, it is found that the error of laser ranging at close distances first presents a quadratic polynomial distribution, and then presents complex fluctuations, which is difficult to compensate by conventional methods. It is particularly important to find the boundary between the two distributions. Only by correctly finding the boundary between them can different distance ranges be correctly distinguished, thereby configuring different error compensation models for different distance ranges, thereby improving the accuracy and comprehensiveness of error compensation of the laser ranging sensor. After configuring the error compensation model, the present invention verifies whether the error compensation model is effective. The advantage is that by comparing the error compensation at close range with the traditional linear error correction compensation model, the effectiveness of the error compensation model is verified, and the performance improvement of the error compensation is calculated at the same time. This can more intuitively demonstrate the effectiveness of the error compensation model and improve the accuracy and effectiveness of the error compensation of the laser ranging sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a functional block diagram of the system of the present invention; Figure 2 is a quadratic polynomial error regression graph of the present invention; Figure 3 is a flow chart of the steps of the method of the present invention; Figure 4 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] Example 1, please refer to Figure 1 As shown, the present application provides a sensor error compensation system based on function simulation, including an error testing module, an error compensation module and a validity verification module; the error testing module and the validity verification module are respectively data-connected with the error compensation module; The error test module is used to test the distance error between the output distance and the actual distance of the laser distance measuring sensor at different distances; The error test module is configured with an error test strategy, which includes: A high-precision guide rail platform is provided to control the distance between the laser ranging sensor and the baffle; Set the starting distance and the ending distance, and set the interval step length, control the distance between the laser distance sensor and the baffle to be equal to the starting distance, obtain the output data of the laser distance sensor, name it as the output distance, and name the distance between the laser distance sensor and the baffle as the real distance; Increase the actual distance by the interval step and record the output distance again, repeat the increase until the actual distance equals the end distance, record the output distance and stop increasing; The actual distances are marked as DT in ascending order. n , and mark the corresponding output distance as DR n , where n is a positive integer and n is the serial number of DT and DR; Calculate DT n -DR n , and name the calculated result as distance error, marked as DE n ; In practical applications, the existing high-precision guide rail platform is used to control the distance between the laser ranging sensor and the baffle. In multiple tests, it is found that when the distance is less than one meter, due to problems such as laser spot distortion and nonlinear response of the receiver, the sensor output value and the actual distance show a significant nonlinear relationship. The traditional linear calibration method cannot effectively compensate for it, and a high-order nonlinear model needs to be used. Therefore, the end distance is set to 1m, the start distance is set to 0.1m, the interval step is set to 0.01m, and a total of 90 sampling points are obtained. DT n and DR n , where 1≤n≤90, and 90 copies of DE are obtained at the same time n ; Due to the excessive amount of data, the specific data is not displayed in this embodiment.

[0019] The error compensation module is used to compensate for different distances using different error compensation models based on the distance error; the error compensation module includes a boundary determination unit and a Gaussian process regression unit; The boundary determination unit is used to determine the distance range applicable to the quadratic polynomial model and to construct a quadratic polynomial error compensation model; The boundary determination unit is configured with a boundary determination strategy, which includes: See also Figure 2 As shown, with n as the X-axis, DE n Establish a plane rectangular coordinate system for the Y axis and name it as the quadratic polynomial error regression graph; Set the isolation number, marked as m, where m is a positive integer and is initially set to 2. Mark the range [1,m] as i; Will DE i Enter the quadratic polynomial error regression graph according to n, where DE i That is, DE for n=i n ; Performing quadratic polynomial regression on the quadratic polynomial error regression graph, naming the function obtained by regression as the quadratic polynomial error regression function, and obtaining the standard deviation of the quadratic polynomial error regression function; Add 1 to m and analyze the quadratic polynomial error regression function and standard deviation again, repeating until m=max(n), where max() is the maximum value operator; The standard deviations are sorted and numbered in ascending order of m, using the symbol S j Indicates, where j is a positive integer and j is the serial number of S. When j=1, corresponding to m=2, the value range of j is 1≤j≤max(n)-1; In practical applications, for example, when m=31, i is [1,31], DE 1 to DE 31 Enter the quadratic polynomial error regression graph and get Figure 2, at this time Figure 2 Perform quadratic polynomial regression to obtain a quadratic polynomial error regression function with a standard deviation of 0.006. Analyze each value of m and obtain 89 standard deviations. The results of the analysis under the conditions of m ranging from 2 to 90 are sorted and numbered to obtain S j , 1≤j≤89; Based on the different calculated standard deviations, the distance range applicable to the quadratic polynomial model is analyzed and a quadratic polynomial error compensation model is constructed; Starting with j=2, calculate |S j -S j-1 |, mark the result as H j , then add j+1 and recalculate H j , repeat until j=max(j); Set the value q, q is initially 3, start with j≤q, and get H j The value range of is marked as the fluctuation range, and the difference between the maximum and minimum values ​​in the fluctuation range is obtained, which is marked as the fluctuation value and represented by the symbol G1. j The number of fluctuations is marked as the fluctuation number and represented by the symbol G2. G2 / G1 is calculated and the result is marked as the fluctuation density and represented by the symbol F. q express; In practical applications, for example, S 30 is 0.0058, S 31 is 0.006. When j=31, H 31 is 0.0002, for H j , 2≤j≤89, a total of 88 data, starting with q=3 is to ensure that there are at least two H j To form a range interval, within the distance interval where the error conforms to the quadratic polynomial regression, the standard deviation of the regression function fluctuates less, and the density displayed within a certain interval must be the largest. Beyond the applicable range, the standard deviation will change significantly, which will reduce the fluctuation density. Therefore, when the fluctuation density is the largest, the boundary between the two different error compensation models can be found; for example, when q=51, the fluctuation range is [0.00003, 0.00032], the fluctuation G1= 0.00029 is calculated, the fluctuation number G2=50, and the fluctuation density F is calculated. 51 =50 / 0.00029=172414, the calculation result is rounded to an integer; Increase q by one and recalculate F q , until q=max(j)-1, find F q The maximum value in is marked as the maximum fluctuation density. The value of q of the maximum fluctuation density is obtained and marked as Q. At this time, SQ The corresponding standard deviation is the optimal standard deviation of the quadratic polynomial error compensation model, where S Q S corresponding to j=Q j , Q+1 is used to obtain the best value of m, which is marked as the optimal isolation number and represented by the symbol M; Get DT M and marked as the maximum applicable value, where DT M DT for n=M n , mark the distance range that is less than or equal to the maximum applicable value as the applicable range, and mark the quadratic polynomial error regression function calculated when i is [1,M] as the quadratic polynomial error compensation model; In practical applications, we calculate each value of q until q=88 and find F q The maximum value in the equation is 51, and the corresponding Q is 51. 51 That is the best standard deviation, j=Q=51, m is 1 greater than j, the best isolation number M is 52, and further DT is obtained 52 is the maximum applicable value, DT 52 is 0.62, and the quadratic polynomial error regression function calculated when i is [1,52] is marked as the quadratic polynomial error compensation model; The Gaussian process regression unit is used to regress the distance range that is not applicable to the quadratic polynomial model using Gaussian process regression, and to construct a Gaussian process regression error compensation model; The Gaussian process regression unit is configured with a Gaussian process regression strategy, which includes: The distance range that is greater than the applicable range and less than or equal to the end distance is named Gaussian range; Construct a Gaussian process regression error compensation model and use Matern5 / 2 to check the DT within the Gaussian range. n and DR n Conduct model training; In practical applications, Gaussian process regression is an existing regression method. Gaussian process regression can convert discrete point distribution into function distribution. In the range of (0.62, 1], the error distribution between the distance output by the laser ranging sensor and the actual value presents a complex distribution, which is difficult to integrate through conventional function regression. Therefore, Gaussian process regression is used. Gaussian process regression can capture complex nonlinear relationships and provide uncertainty estimation. The Matern5 / 2 kernel used in Gaussian process regression is suitable for smooth but non-infinitely differentiable functions. The Gaussian process regression used in this embodiment is exactly the same as the existing Gaussian process regression model. Therefore, it will not be described in detail in this embodiment. This embodiment aims to find the boundary between two different error compensation models, thereby providing a clear and accurate scope of application for the two different error compensation models. When the error exceeds one meter, the traditional linear compensation method is still used to complete the error correction.

[0020] The validity verification module is used to verify whether the error compensation model is effective; the validity verification module includes a compensation verification unit and a compensation comparison unit; The compensation verification unit is configured with a compensation verification strategy, which includes: Randomly collect the test distances of the first test quantity between the starting distance and the ending distance, and record the actual test distances corresponding to the test distances; Find the distance interval to which the test distance belongs. If the test distance is within the applicable range, use the quadratic polynomial error compensation model to compensate for the test distance error. Otherwise, use the Gaussian process regression error compensation model to compensate for the test distance error. If the quadratic polynomial error compensation model is used to compensate the test distance error, DE n Substituting the test distance into the quadratic polynomial error compensation model, adding the test distance to the output of the quadratic polynomial error compensation model to obtain the predicted compensation distance; If the Gaussian process regression error compensation model is used to compensate the test distance error, then DR n Substitute the test distance into the Gaussian process regression error compensation model, obtain the output result of the Gaussian process regression error compensation model, and obtain the predicted compensation distance; The traditional linear correction compensation technology is used to compensate the error of the test distance, and the compensation result is marked as the traditional compensation distance; In practical applications, there is no restriction on the setting of the first test quantity. In this embodiment, the first test quantity is set to 10, and 10 different actual test distances are randomly selected from the range of 0.1m to 1m. The actual test distance is set by a high-precision guide rail platform, and then the measurement result of the laser ranging sensor is read to obtain the test distance. For example, when the actual test distance is 0.322m, the test distance is 0.3278, and the test distance is within the applicable range. The quadratic polynomial error compensation model is used to compensate for the error of the test distance. 0.3278 is substituted into the quadratic polynomial error compensation model. The compensation result of the quadratic polynomial error compensation model is -0.0054. The test distance 0.3278 is added to -0.0054 to obtain a predicted compensation distance of 0.3224. When the traditional linear correction compensation technology is used to compensate for the test distance 0.3278, the compensated traditional compensation distance is 0.3096. The compensation comparison unit is used to verify the effectiveness of the error compensation model based on the traditional compensation distance, the predicted compensation distance and the actual distance tested; The compensation comparison unit is configured with a compensation comparison strategy, which includes: Calculate the absolute value of the difference between the predicted compensation distance and the actual test distance, marked as the error after compensation; Calculate the absolute value of the difference between the traditional compensation distance and the actual test distance, and mark it as the traditional compensation error; The average value of the compensated error is calculated and named as the compensated average error, and the average value of the traditional compensated error is calculated and named as the traditional compensated average error; The average error after compensation is marked as W1, and the average error of traditional compensation is marked as W2. W1 is compared with W2. If W1 is less than W2, a compensation valid signal is output, otherwise a compensation invalid signal is output; Calculate 1-W1 / W2 and name the result as the performance improvement percentage; In practical applications, the calculated error after compensation is 0.0004m, while the average error of traditional compensation is 0.0124m. Further calculation shows that the average error W1 after compensation is 0.0006m, while the average error W2 of traditional compensation is 0.0152m. By comparison, it is found that W1 is much smaller than W2, and the compensation effective signal is output. The performance improvement percentage is calculated by W1 / W2, which is 96.77%. The calculation result is displayed in percentage form and retains two decimal places.

[0021] Example 2, please refer to Figure 3 As shown, the present application provides a sensor error compensation method based on function simulation, comprising the following steps: Step S1, testing the distance error between the output distance and the actual distance of the laser distance measuring sensor at different distances; Step S1 includes the following sub-steps: Step S101, setting a high-precision guide rail platform for controlling the distance between the laser ranging sensor and the baffle; Step S102, setting the starting distance and the ending distance, and setting the interval step length, controlling the distance between the laser ranging sensor and the baffle to be equal to the starting distance, obtaining the output data of the laser ranging sensor, and naming it as the output distance, and naming the distance between the laser ranging sensor and the baffle as the real distance; Step S103, increasing the actual distance by the interval step and recording the output distance again, repeating the increase until the actual distance is equal to the end distance, recording the output distance and then stopping the increase; Step S104: mark the real distances in ascending order as DT n , and mark the corresponding output distance as DR n , where n is a positive integer and n is the serial number of DT and DR; Step S105, calculate DT n -DR n , and name the calculated result as distance error, marked as DE n ; Step S2, using different error compensation models to compensate for different distances based on the distance error; Step S2 includes the following sub-steps: Step S201, determining the distance range applicable to the quadratic polynomial model and constructing a quadratic polynomial error compensation model; Step S201 includes the following sub-steps: Step S201.1, take n as the X axis, DE n Establish a plane rectangular coordinate system for the Y axis and name it as the quadratic polynomial error regression graph; Step S201.2, set the isolation number, marked as m, where m is a positive integer, and m is initially set to 2, and mark the range [1, m] as i; Step S201.3, DE i Enter the quadratic polynomial error regression graph according to n, where DE i That is, DE for n=i n ; Step S201.4, performing a quadratic polynomial regression on the quadratic polynomial error regression graph, naming the function obtained by regression as a quadratic polynomial error regression function, and obtaining the standard deviation of the quadratic polynomial error regression function; Step S201.5, increase m by 1 and analyze the quadratic polynomial error regression function and standard deviation again, repeating the process until m=max(n), where max() is the maximum value operator; Step S201.6, sort and number the standard deviations in order from small to large m, using the symbol Sj Indicates, where j is a positive integer and j is the serial number of S. When j=1, corresponding to m=2, the value range of j is 1≤j≤max(n)-1; Step S201.7, based on the calculated different standard deviations, analyzing the distance range applicable to the quadratic polynomial model and constructing a quadratic polynomial error compensation model; Step S201.7 includes the following sub-steps: Step S201.7.a, starting with j=2, calculate |S j -S j-1 |, mark the result as H j , then add j+1 and recalculate H j , repeat until j=max(j); Step S201.7.b, set the value q, q is initially 3, start with j≤q, and obtain H j The value range of is marked as the fluctuation range, and the difference between the maximum and minimum values ​​in the fluctuation range is obtained, which is marked as the fluctuation value and represented by the symbol G1. j The number of fluctuations is marked as the fluctuation number and represented by the symbol G2. G2 / G1 is calculated and the result is marked as the fluctuation density and represented by the symbol F. q express; Step S201.7.c, increase q by one and recalculate F q , until q=max(j)-1, find F q The maximum value in is marked as the maximum fluctuation density. The value of q of the maximum fluctuation density is obtained and marked as Q. At this time, S Q The corresponding standard deviation is the optimal standard deviation of the quadratic polynomial error compensation model, where S Q S corresponding to j=Q j , Q+1 is used to obtain the best value of m, which is marked as the optimal isolation number and represented by the symbol M; Step S201.7.d, obtain DT M and marked as the maximum applicable value, where DT M DT for n=M n , mark the distance range that is less than or equal to the maximum applicable value as the applicable range, and mark the quadratic polynomial error regression function calculated when i is [1,M] as the quadratic polynomial error compensation model; Step S202, using Gaussian process regression to regress the distance range that is not applicable to the quadratic polynomial model, and constructing a Gaussian process regression error compensation model; Step S202 includes the following sub-steps: Step S202.1, naming the distance range that is greater than the applicable range and less than or equal to the termination distance as the Gaussian range; Step S202.2, construct a Gaussian process regression error compensation model, and use Matern5 / 2 to check the DT within the Gaussian range. n and DR n Conduct model training; Step S3, verifying whether the error compensation model is effective; Step S3 includes the following sub-steps: Step S301, randomly collecting a first test quantity of test distances between the starting distance and the ending distance, and recording the actual test distances corresponding to the test distances; Step S302, searching the distance interval to which the test distance belongs, if the test distance is within the applicable range, using a quadratic polynomial error compensation model to perform error compensation on the test distance, otherwise using a Gaussian process regression error compensation model to perform error compensation on the test distance; Step S303: If the quadratic polynomial error compensation model is used to compensate the error of the test distance, DE n Substituting the test distance into the quadratic polynomial error compensation model, adding the test distance to the output of the quadratic polynomial error compensation model to obtain the predicted compensation distance; Step S304: If the Gaussian process regression error compensation model is used to compensate the test distance error, DR n Substitute the test distance into the Gaussian process regression error compensation model, obtain the output result of the Gaussian process regression error compensation model, and obtain the predicted compensation distance; Step S305, using a conventional linear correction compensation technique to perform error compensation on the test distance, and marking the compensation result as a conventional compensation distance; Step S306, verifying the effectiveness of the error compensation model based on the traditional compensation distance, the predicted compensation distance and the actual test distance; Step S306 includes the following sub-steps: Step S306.1, calculating the absolute value of the difference between the predicted compensation distance and the actual test distance, marked as the post-compensation error; Step S306.2, calculating the absolute value of the difference between the conventional compensation distance and the actual test distance, and marking it as conventional compensation error; Step S306.3, calculating the average value of the compensated error, named as the compensated average error, and calculating the average value of the traditional compensated error, named as the traditional compensated average error; Step S306.4, mark the average error after compensation as W1, mark the average error of traditional compensation as W2, compare W1 with W2, if W1 is less than W2, output a compensation valid signal, otherwise output a compensation invalid signal; Step S306.5, calculate W1 / W2, and name the calculation result as the performance improvement percentage.

[0022] Example 3, please refer to Figure 4 As shown, Figure 4 The structural schematic diagram of an electronic device is illustrated, and the electronic device may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the sensor error compensation method based on function simulation are executed to achieve the following functions: testing the distance error between the output distance and the actual distance of the laser ranging sensor at different distances; using different error compensation models to compensate for different distances based on the distance error; and verifying whether the error compensation model is effective.

[0023] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0024] Embodiment 4, the present application also provides a computer-readable storage medium, the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the sensor error compensation method based on function simulation are executed to achieve the following functions: test the distance error between the output distance and the actual distance of the laser ranging sensor at different distances; compensate for different distances using different error compensation models based on the distance error; and verify whether the error compensation model is effective.

[0025] Through the description of the above implementation methods, the embodiments of the present invention can be provided as methods, systems or computer program products. Based on such an understanding, the above technical solutions can be essentially or partly contributed to the prior art in the form of software products, which can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and include several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0026] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.

[0027] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A sensor error compensation method based on function simulation, characterized in that: The steps include: Test the distance error between the output distance and the actual distance of the laser distance measuring sensor at different distances; Based on the distance error, different error compensation models are used to compensate for different distances; Verify whether the error compensation model is effective.

2. The sensor error compensation method based on function simulation according to claim 1, characterized in that: Testing the distance error between the output distance and the actual distance of the laser distance measuring sensor at different distances includes the following sub-steps: A high-precision guide rail platform is provided to control the distance between the laser ranging sensor and the baffle; Set the starting distance and the ending distance, and set the interval step length, control the distance between the laser distance sensor and the baffle to be equal to the starting distance, obtain the output data of the laser distance sensor, name it as the output distance, and name the distance between the laser distance sensor and the baffle as the real distance; Increase the actual distance by the interval step and record the output distance again, repeat the increase until the actual distance equals the end distance, record the output distance and stop increasing; The actual distances are marked as DT in ascending order. n , and mark the corresponding output distance as DR n , where n is a positive integer and n is the serial number of DT and DR; Calculate DT n -DR n , and name the calculated result as distance error, marked as DE n .

3. The sensor error compensation method based on function simulation according to claim 2, characterized in that: Using different error compensation models to compensate for different distances based on distance error includes the following sub-steps: Determine the distance range in which the quadratic polynomial model is applicable and construct a quadratic polynomial error compensation model; Gaussian process regression is used to regress the distance range that is not suitable for the quadratic polynomial model, and a Gaussian process regression error compensation model is constructed.

4. The sensor error compensation method based on function simulation according to claim 3 is characterized in that: Determining the distance range for which the quadratic polynomial model is applicable and constructing the quadratic polynomial error compensation model includes the following sub-steps: With n as the X-axis, DE n Establish a plane rectangular coordinate system for the Y axis and name it as the quadratic polynomial error regression graph; Set the isolation number, marked as m, where m is a positive integer and is initially set to 2. Mark the range [1,m] as i; Will DE i Enter the quadratic polynomial error regression graph according to n, where DE i That is, DE for n=i n ; Performing quadratic polynomial regression on the quadratic polynomial error regression graph, naming the function obtained by regression as the quadratic polynomial error regression function, and obtaining the standard deviation of the quadratic polynomial error regression function; Add 1 to m and analyze the quadratic polynomial error regression function and standard deviation again, repeating until m=max(n), where max() is the maximum value operator; The standard deviations are sorted and numbered in ascending order of m, using the symbol S j Indicates, where j is a positive integer and j is the serial number of S. When j=1, corresponding to m=2, the value range of j is 1≤j≤max(n)-1; Based on the calculated different standard deviations, the distance range in which the quadratic polynomial model is applicable is analyzed and a quadratic polynomial error compensation model is constructed.

5. The sensor error compensation method based on function simulation according to claim 4 is characterized in that: Based on the different calculated standard deviations, analyzing the distance range applicable to the quadratic polynomial model and constructing a quadratic polynomial error compensation model includes the following sub-steps: Starting with j=2, calculate |S j -S j-1 |, mark the result as H j , then add j+1 and recalculate H j , repeat until j=max(j); Set the value q, which is initially 3, and start with j≤q to obtain H j The value range of is marked as the fluctuation range, and the difference between the maximum and minimum values ​​in the fluctuation range is obtained, which is marked as the fluctuation value and represented by the symbol G1. j The number of fluctuations is marked as the fluctuation number and represented by the symbol G2. G2 / G1 is calculated and the result is marked as the fluctuation density and represented by the symbol F. q express; Increase q by one and recalculate F q , until q=max(j)-1, find F q The maximum value in is marked as the maximum fluctuation density. The value of q of the maximum fluctuation density is obtained and marked as Q. At this time, S Q The corresponding standard deviation is the optimal standard deviation of the quadratic polynomial error compensation model, where S Q S corresponding to j=Q j , Q+1 is used to obtain the best value of m, which is marked as the optimal isolation number and represented by the symbol M; Get DT M and marked as the maximum applicable value, where DT M DT for n=M n , the distance range that is less than or equal to the maximum applicable value is marked as the applicable range, and the quadratic polynomial error regression function calculated when i is [1,M] is marked as the quadratic polynomial error compensation model.

6. The sensor error compensation method based on function simulation according to claim 5, characterized in that: Gaussian process regression is used to regress the distance range that is not suitable for the quadratic polynomial model. The construction of the Gaussian process regression error compensation model includes the following sub-steps: The distance range that is greater than the applicable range and less than or equal to the end distance is named Gaussian range; Construct a Gaussian process regression error compensation model and use Matern5 / 2 to check the DT within the Gaussian range. n and DR n Perform model training.

7. The sensor error compensation method based on function simulation according to claim 6, characterized in that: Verifying whether the error compensation model is effective includes the following sub-steps: Randomly collect the test distances of the first test quantity between the starting distance and the ending distance, and record the actual test distances corresponding to the test distances; Find the distance interval to which the test distance belongs. If the test distance is within the applicable range, use the quadratic polynomial error compensation model to compensate for the test distance error. Otherwise, use the Gaussian process regression error compensation model to compensate for the test distance error. If the quadratic polynomial error compensation model is used to compensate the test distance error, DE n Substituting the test distance into the quadratic polynomial error compensation model, adding the test distance to the output of the quadratic polynomial error compensation model to obtain the predicted compensation distance; If the Gaussian process regression error compensation model is used to compensate the test distance error, then DR n Substitute the test distance into the Gaussian process regression error compensation model, obtain the output result of the Gaussian process regression error compensation model, and obtain the predicted compensation distance; The traditional linear correction compensation technology is used to compensate the error of the test distance, and the compensation result is marked as the traditional compensation distance; The effectiveness of the error compensation model is verified based on the traditional compensation distance, predicted compensation distance and actual test distance.

8. The sensor error compensation method based on function simulation according to claim 7, characterized in that: Based on the traditional compensation distance, the predicted compensation distance, and the actual distance tested, the effectiveness of the error compensation model is verified, including the following sub-steps: Calculate the absolute value of the difference between the predicted compensation distance and the actual test distance, marked as the error after compensation; Calculate the absolute value of the difference between the traditional compensation distance and the actual test distance, and mark it as the traditional compensation error; The average value of the compensated error is calculated and named as the compensated average error, and the average value of the traditional compensated error is calculated and named as the traditional compensated average error; The average error after compensation is marked as W1, and the average error of traditional compensation is marked as W2. W1 is compared with W2. If W1 is less than W2, a compensation valid signal is output, otherwise a compensation invalid signal is output; Calculate 1-W1 / W2 and name the result as the performance improvement percentage.

9. A sensor error compensation system based on function simulation, used to implement the sensor error compensation method based on function simulation according to any one of claims 1 to 8, characterized in that: It includes an error testing module, an error compensation module and a validity verification module; the error testing module and the validity verification module are respectively data-connected with the error compensation module; The error testing module is used to test the distance error between the output distance and the actual distance of the laser distance measuring sensor at different distances; The error compensation module is used to compensate for different distances using different error compensation models based on the distance error; The validity verification module is used to verify whether the error compensation model is valid.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are executed.

Citation Information

Patent Citations

  • Camera calibration error compensation method based on multi-dimensional characteristics

    CN103218820A

  • Indoor range finding positioning method based on improved traceless Kalman filtering

    CN106707235A

  • Laser distance measuring module with INL error compensation

    CN108226942A

  • Distance correction method for TOF camera based on Gaussian process regression

    CN109035345A

  • Correction of sensor data alignment and environment mapping

    CN114787581A

Cited By

  • Machine learning adaptive compensation method and system in machining process of turning and milling equipment

    CN121115665A