Method for improving straightness measurement accuracy of long distance based on improved optimization algorithm
By combining an improved optimization algorithm with genetic algorithms and the Levenberg-Marquardt method, the measurement accuracy problem caused by the change in the effective radius of the light spot over long distances was solved, and high-precision straightness measurement was achieved.
Patent Information
- Application Number
- CN202310888961.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-19
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-07-19
AI Technical Summary
At long distances, the accuracy of straightness measurement based on the laser collimation principle is affected by the change in the effective radius of the laser spot. Existing algorithms such as intelligent piecewise fitting and linear interpolation are no longer applicable, resulting in reduced measurement accuracy.
An improved optimization algorithm combining genetic algorithm and Levenberg-Marquardt method is used to establish the relationship between spot radius and measurement distance by determining the laser beam trajectory equation, thereby improving measurement accuracy.
Achieving high-precision straightness measurement over long distances, the improved optimization algorithm quickly finds the initial point and iterates, improving measurement accuracy and efficiency.
Smart Images

Figure CN116992188B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of precision measurement technology, and in particular, it is a method for improving the accuracy of straightness measurement over long distances based on an improved optimization algorithm. Background Technology
[0002] Error measurement in CNC machine tools plays a crucial role in improving machining accuracy. Each axis of a CNC machine tool exhibits six degrees of freedom errors, including positioning error, two-dimensional straightness error, pitch angle, yaw angle, and roll angle errors, with straightness error accounting for a significant proportion of the total error. Laser collimation, with its simple structure and high measurement accuracy, is commonly used for straightness measurement in multi-degree-of-freedom measurement systems. In straightness measurement systems, most employ quadrant photoelectric detectors (QDs) as position sensors to measure changes in the laser spot position. These detectors offer high sensitivity, simple signal processing, and strong anti-interference capabilities. The accuracy of the QD's spot position measurement determines the accuracy of the machine tool's straightness error measurement.
[0003] When a QD (Quadrature Diode) is used for beam spot position measurement, the beam spot should simultaneously span all four quadrants. The beam spot position is calculated by obtaining the photocurrent in each quadrant. Therefore, it is highly sensitive to beam spot shape, light intensity distribution, and power. When the beam spot illuminates the QD, photocurrents are generated in each of the four quadrants. I 1. I 2. I 3. I 4. When the laser power and QD spectral responsivity remain constant, the sum of the four currents remains unchanged and is independent of the spot position. The QD cannot directly determine the centroid position of the spot from the current values; it relies on relative positions. s x , s y Indicates the location of the light spot: (1) The ratio of currents in each quadrant of QD is equal to the ratio of energies. When the light spot completely illuminates the effective region of QD and the influence of the dead zone of QD is ignored, integrating the energies of each quadrant and substituting them into equation (1) yields: (2) in, erf () represents the error function. It can be seen that the QD measurement sensitivity is related to the effective radius of the light spot. oh Related to, following oh Increased size leads to decreased sensitivity. Combining equation (2) and the calibrated... oh The position of the centroid of the light spot can be determined by measuring its relative position: (3) Expanding equation (3) using a Taylor series, we obtain equation (4), where O ( s xr ) is a higher-order small quantity.
[0004] (4) When a laser irradiates the surface of a quadrant detector (QD), the spot position can be calculated based on the photocurrent signal directly output by the QD. However, the calculated spot position value and the position of the spot centroid are not linearly related. When the spot position is far from the center of the QD, the position measurement accuracy decreases significantly. The intelligent segment-fitting algorithm proposed in the literature "Research of intelligent segment-fitting algorithm for increasing the measurement accuracy of quadrant detector in straightnessmeasuring system" (Zhang C, Duan F, Fu X, et al. Opt Laser Technol 2020;125:106062.) automatically determines the segmentation points by using the relationship between the calculated spot position value and the position of the spot centroid. Then, it performs low-order polynomial fitting on each segment interval, thereby improving the accuracy of spot position calibration. The paper “Robustroll angular error measurement system for precision machines” (Cai Y, Yang B, Fan KC. Appl Opt 2015;54:3122.) proposes to first determine the spot radius at the beginning and end positions within a 1-meter measurement range, and then extend it to determine the spot radius at any distance within the 1-meter range through linear interpolation.
[0005] When performing long-distance straightness measurements based on the laser collimation principle, the effective radius ω of the laser spot changes significantly with the measurement distance. Intelligent piecewise fitting algorithms and linear interpolation methods are no longer applicable when the effective radius of the laser spot changes significantly. Therefore, determining the trajectory equation of the laser beam during long-distance measurements is crucial for improving the accuracy of straightness measurements.
[0006] The Levenberg-Marquardt (LM) method, during optimization, combines the global characteristics of gradient descent with the local convergence of the Gauss-Newton method by adjusting the damping factor, making it a commonly used method for solving nonlinear least squares problems. However, the selection of initial values is extremely important. If the initial point estimate is far from the optimal value, the local linearity assumption does not hold, leading to inaccurate estimation corrections, significantly increasing the algorithm's time and space complexity, and reducing its ability to improve. Genetic algorithms, when solving optimization problems, possess excellent global search capabilities, quickly finding the optimal solution from the search space; they also have inherent parallelism, enabling distributed computation and accelerating the solution process. However, their local search capabilities are poor, and their efficiency decreases in the later stages of evolution, increasing time complexity. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of existing technologies and, by combining the advantages of genetic algorithms and the LM method, design an improved optimization algorithm to enhance the efficiency of solving the beam trajectory equation. In long-distance measurements based on the laser collimation principle, the improved optimization algorithm determines the trajectory equation of the laser beam cross-sectional radius as the measurement distance changes; subsequently, it obtains the relationship between the sensitivity of straightness measurement and the spot radius when the measurement distance changes; finally, it establishes a straightness measurement model for long-distance laser collimation measurement. This invention can be widely applied to various machine tool field measurement scenarios, achieving high-precision measurement of guideway straightness error over long distances.
[0008] The objective of this invention is achieved through the following technical solution: A method for improving the accuracy of straightness measurement over long distances based on an improved optimization algorithm is proposed. A new laser beam propagation trajectory model is established, expressed as equation (1), where... C x0 , oh x0 , z x0 It is a constant; (1) When calibrated C x0 , oh x0 , z x0 Subsequently, the laser spot radius at any distance during laser propagation can be quickly obtained, and the laser spot radius at at least three different measurement distances can be used for calibration. C x0 , oh x0 , z x0 Three parameters; The spot radius is solved using the least squares method, where the measured distance is expressed as...z x =[ z x1 , z x2 ,…, z xp ] T Substitute get oh x ( z x )=[ oh x ( z x1 ), oh ( z x2 ),…, oh ( z xp )] T The optimal solution for the calibrated spot radius corresponding to the measurement distance is obtained as follows: oh x * =[ oh x1 * , oh x2 * ,…, oh xp * ] T ,set up u =[ C x0 , oh x0 , z x0 ] T The objective function for solving the spot radius based on the least squares method is simplified to H ( u )=[ H 1( u ), H 2( u ),…, H p ( u )] T See equation (2); (2) in H ( u The expression represents the error between the optimal solution for the desired spot radius and the actual spot radius. The above expression is solved based on an improved optimization method, which combines a genetic algorithm with the LM method. H (u) inu k Jacobian matrix at the location Represented as Equation (3), the iteration direction is d k The identity matrix is I ,in u k Indicates the k-th iteration, u The value of ; (3) Specifically, the steps of the improved optimization algorithm are as follows: (1) Using the selection, crossover, and mutation of the genetic algorithm, the search process is dynamically changed from random values to find a feasible solution with a global minimum. (2) Use the LM method to find feasible solutions in the genetic algorithm and perform local search; set the initial parameters. α =1, growth factor β =100, Termination Condition e =0.000001; (3) By continuously adjusting the damping factor of the LM method, and through a finite number of iterations, the convergence is achieved, allowing the trust region subfunction to approach the objective function more quickly, thus obtaining the optimal solution. u* ; The optimal solution u* Substituting into equation (1), the propagation trajectory of the laser beam at any measurement distance is obtained; combined with the expression for measuring straightness error using QD, a model for straightness measurement at long distances is established; by solving for the laser beam radius at any distance, the accuracy of straightness measurement is improved.
[0009] Furthermore, the laser beam propagation trajectory equation is solved based on the improved optimization algorithm and expressed as Equation (4). Substituting the beam propagation trajectory equation into the expression for measuring straightness error using QD, the established model for long-distance straightness measurement is expressed as Equation (5). (4) (5).
[0010] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method for improving the accuracy of straightness measurement over long distances based on an improved optimization algorithm.
[0011] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for improving the accuracy of straightness measurement over long distances based on an improved optimization algorithm.
[0012] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: in long-distance measurement, it can specifically describe the trajectory equation of the laser beam, which makes it easy for the experimenter to complete the high-precision straightness measurement at any distance; at the same time, the technical solution described in the present invention combines the good global search capability of the genetic algorithm and the robustness of the LM algorithm, which enables the optimization algorithm to quickly find a better initial point and iterate quickly, thereby improving the optimization efficiency of the algorithm.
[0013] This invention enables straightness measurement over long distances by using an improved optimization algorithm to determine the trajectory equation of the laser beam cross-sectional radius as the measurement distance changes. This leads to the relationship between the sensitivity of straightness measurement and the spot radius as the measurement distance changes. Finally, a straightness measurement model for laser collimation measurement over long distances is established. By calibrating various parameters, the accuracy of straightness measurement is effectively improved. This invention can be widely applied to various machine tool field measurement scenarios, achieving high-precision measurement of guide rail straightness errors over long distances. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of straightness measurement based on the principle of laser collimation.
[0015] Figure 2 This is a flowchart illustrating the process of finding the optimal value based on an improved optimization algorithm.
[0016] Figure 3 The image shows a simulation of the laser beam propagation trajectory within a 5m measurement distance. The "X" symbol represents the optimal spot radius obtained through iterative optimization using an optimization algorithm, and the "△" symbol represents the error between the obtained beam radius and the true value.
[0017] Figure 4 The diagram shows the calibration results of straightness measurement at 1m and a comparison with the measurement data of laser interferometer. The "X" symbol represents the straightness at various distances measured using laser interferometer, "·" represents the straightness at various distances measured using QD based on the improved optimization algorithm, and "△" symbol represents the error between the two.
[0018] Figure 5a , Figure 5b and Figure 5c The graphs show the straightness error measurements obtained after substituting the calculated spot position values at 2.5m, 3.5m, and 4.5m into the straightness measurement model based on the improved optimization algorithm. The graphs also show the comparison between the straightness error measurements and the laser interferometer measurement data. The “X” symbol represents the straightness measured at each distance using the laser interferometer, the “○” symbol represents the straightness measured at each distance using the QD algorithm based on the improved optimization algorithm, and the “△” symbol represents the error between the two. Detailed Implementation
[0019] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.
[0020] This embodiment provides a method for improving the accuracy of straightness measurement over long distances based on an improved optimization algorithm, as detailed below: Straightness measurement based on laser collimation principle (see...) Figure 1 This embodiment uses horizontal straightness measurement as an example for illustration. In actual measurement, the laser used is not an ideal Gaussian beam, so formula (6) is no longer applicable. Therefore, it is necessary to re-establish an accurate trajectory equation of the laser beam to determine the laser beam cross-sectional spot radius. Even when the cross-sectional radius of the laser beam changes due to long-distance propagation, a high-precision straightness measurement model can still be established.
[0021] An ideal Gaussian beam at a distance of is z The beam cross-sectional radius at a certain point is expressed as equation (6). Research has shown that the actual laser beam trajectory used in measurements is still approximately hyperbolic. Therefore, a new laser beam propagation trajectory model is established as equation (7), where... C x0 , oh x0 , z x0 It is a constant.
[0022] (6) (7) When calibrated C x0 , oh x0 , z x0 Subsequently, the laser spot radius at any distance during laser propagation can be quickly obtained. The spot radius at three different measurement distances can then be calibrated. C x0 , oh x0 , z x0 Three parameters. To reduce the error between the beam trajectory equation and the actual propagating beam, three parameters are solved based on an improved optimization method.
[0023] This problem is a nonlinear least squares problem, expressed as equation (8), where the measured distance... z x =[ z x1 , z x2 ,…, z xp ]T Substitute oh x (z) is obtained oh x ( z x )=[ oh x ( z x1 ), oh ( z x2 ),…, oh ( z xp )] T The optimal solution for the calibrated spot radius corresponding to the measurement distance can be obtained as follows: oh xr * =[ oh xr1 * , oh xr2 * ,…, oh xrp * ] T ,set up u =[ C xr0 , oh xr0 , z xr0 ] T The function for solving the spot radius based on the least squares method is simplified to H ( u )=[ H 1( u ), H 2( u ),…, H p ( u )] T An improved optimization method is used to solve it.
[0024] (8) H (u) in u k The Jacobian matrix at point is expressed as equation (9), and the iteration direction is... d k The identity matrix is I .
[0025] (9) For details, see Figure 2 The steps of the improved optimization algorithm are as follows: (1) Using the selection, crossover, and mutation of the genetic algorithm, the search process is dynamically changed from random values to find a feasible solution near the global minimum. (2) The LM method is used to perform a local search in the vicinity of the feasible solution found by the genetic algorithm. Let the initial parameters be... α =1, growth factor β =100, Termination Condition e =0.000001; (3) Continuously adjust the damping factor of the LM method. When the ratio of the change in the subfunction of the trust region to the change in the objective function is close to 1 and the iteration step size meets the set termination condition, the current iteration value is considered valid and the optimal solution is obtained; when the iteration step size does not meet the set termination condition, the damping factor is adjusted. α=α / β Proceed to the next iteration; if the ratio of the change in the trust region subfunction to the change in the objective function is closer to 0, the value of this iteration is considered invalid, and the iteration continues in u. k Iteration, setting α=αβ After a finite number of iterations, the trust region subfunctions approximate the objective function more quickly, yielding the optimal solution. u* .
[0026] Substituting the optimal solution into equation (7), the laser beam trajectory at any measurement distance can be obtained. Combining with equation (4), a model for straightness measurement over long distances is established; by solving for the laser beam radius at any distance, the accuracy of straightness measurement is improved.
[0027] Specifically, in this embodiment, a calibration test is conducted at a measurement distance of 1m. The measurement range of the four-quadrant photodetector QD is selected as ±400μm, with measurements taken every 40μm, for a total of 21 points. This is used to determine the calibration coefficients of the fourth-order polynomial. B xri and the cross-sectional radius of the light spot at 1m oh 1m The original data are shown in Table 1. The calibration result curve and the comparison chart with the measurement data of the laser interferometer are shown in Table 1. Figure 3 The actual measurement model at 1m is expressed as equation (10): (10) Three measurement points were selected at distances of 2m, 3m, 4m, and 5m respectively to determine the cross-sectional radius of the light spot at these distances. oh lm This provides the optimal value for the beam propagation trajectory equation. oh * =( oh 1 * , oh 2 * ,…, ohp * ) T The calculated values of the spot position, the position of the spot centroid, and the spot cross-sectional radius obtained by the least squares method at each measurement distance are shown in Table 2.
[0028] Table 1 Table 2 Measuring distance z x =[1m,2m,3m,4m,5m] T The corresponding spot cross-sectional radius at the measurement distance oh xr * =(1958.3,1962.5,1978.5,2004.6,2041.9) T ×10 -6 m, let the initial parameters be... α=1 growth factors β=100 Initial values of each parameter u =(14.0911,1.6850×10 -3 ,0.0180) T m, termination condition ε=0.000001 Optimal solution u* =(13.1582, 1.9582 × 10 -3 ,1.1125) T m. The trajectory equation of the laser beam propagation is expressed as equation (11), and the simulation diagram of the laser beam propagation trajectory is shown in [reference needed]. Figure 4 At any measurement distance, the result of the actual model for straightness measurement using QD after calibration through the above process is expressed as equation (12): (11) (12) The calculated spot positions at 2.5m, 3.5m, and 4.5m were substituted into the calibrated QD actual measurement model to process the experimental data, obtaining the straightness error measurement values. These values were then compared with the standard values measured by the laser interferometer, yielding the measurement data at 2.5m, 3.5m, and 4.5m in Tables 3a, 3b, and 3c, respectively. The comparison figures are shown below. Figure 5a to Figure 5c As can be seen from the figure, the straightness measurement data obtained based on the LM method are stable, with a maximum error of only ±1.7μm within a measurement range of ±400μm.
[0029] Table 3a Table 3b Table 3c Preferably, embodiments of this application also provide a specific implementation of an electronic device capable of implementing all steps of the method for improving straightness measurement accuracy over long distances based on the improved optimization algorithm described in the above embodiments. The electronic device specifically includes the following: Processor, memory, communications interface, and bus; The processor, memory, and communication interface communicate with each other via a bus; the communication interface is used to realize information transmission between server-side devices, metering devices, and user-side devices.
[0030] The processor is used to call a computer program in memory. When the processor executes the computer program, it implements all the steps in the method for improving the accuracy of straightness measurement over long distances based on the improved optimization algorithm in the above embodiments.
[0031] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the method for improving the accuracy of straightness measurement over long distances based on the improved optimization algorithm in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the method for improving the accuracy of straightness measurement over long distances based on the improved optimization algorithm in the above embodiments.
[0032] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, hardware + program embodiments are relatively simple in description because they are fundamentally similar to method embodiments; relevant parts can be referred to the descriptions in the method embodiments.
[0033] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0034] While this application provides method operation steps as shown in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-inventive labor. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual device or client product execution, the method can be executed in the order shown in the embodiments or drawings or in parallel (e.g., in a parallel processor or multi-threaded processing environment).
[0035] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0036] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure one One or more processes and / or boxes Figure one The function specified in one or more boxes.
[0037] This invention is not limited to the embodiments described above. The above description of specific embodiments is intended to illustrate and explain the technical solutions of this invention. The specific embodiments described above are merely illustrative and not restrictive. Without departing from the spirit and scope of the claims, those skilled in the art can make many specific modifications based on the teachings of this invention, and these modifications all fall within the scope of protection of this invention.
Claims
1. A method for improving the accuracy of straightness measurement over long distances based on an improved optimization algorithm, characterized in that, The new laser beam propagation trajectory model is expressed as equation (1), where C x0 , ω x0 , z x0 It is a constant; (1) When calibrated C x0 , ω x0 , z x0 Subsequently, the laser spot radius at any distance during laser propagation can be quickly obtained, and the laser spot radius at at least three different measurement distances can be used for calibration. C x0 , ω x0 , z x0 Three parameters; The spot radius is solved using the least squares method, where the measured distance is expressed as... z x =[ z x1 , z x2 ,…, z xp ] T Substitute get ω x ( z x )=[ ω x ( z x1 ), ω ( z x2 ),…, ω ( z xp )] T The optimal solution for the calibrated spot radius corresponding to the measurement distance is obtained as follows: ω x * =[ ω x1 * , ω x2 * ,…, ω xp * ] T ,set up u =[ C x0 , ω x0 , z x0 ] T The objective function for solving the spot radius based on the least squares method is simplified to H ( u )=[ H 1( u ), H 2( u ),…, H p ( u )] T See equation (2); (2) in H ( u The expression represents the error between the optimal solution for the desired spot radius and the actual spot radius. The above expression is solved based on an improved optimization method, which combines a genetic algorithm with the LM method. H (u) in u k Jacobian matrix at the location Represented as Equation (3), the iteration direction is d k The identity matrix is I ,in u k Indicates the k-th iteration, u The value of ; (3) Specifically, the steps of the improved optimization algorithm are as follows: (1) Using the selection, crossover, and mutation of the genetic algorithm, the search process is dynamically changed from random values to find a feasible solution with a global minimum. (2) Use the LM method to find feasible solutions in the genetic algorithm and perform local search; set the initial parameters. α =1, growth factor β =100, Termination Condition ε =0.000001; (3) By continuously adjusting the damping factor of the LM method, and through a finite number of iterations, the convergence is achieved, allowing the trust region subfunction to approach the objective function more quickly, thus obtaining the optimal solution. u* ; The optimal solution u* Substituting into equation (1), the propagation trajectory of the laser beam at any measurement distance is obtained; combined with the expression for measuring straightness error using QD, a model for straightness measurement at long distances is established; by solving for the laser beam radius at any distance, the accuracy of straightness measurement is improved.
2. The method for improving the accuracy of straightness measurement over long distances based on an improved optimization algorithm according to claim 1, characterized in that, The laser beam propagation trajectory equation is solved based on the improved optimization algorithm and expressed as Equation (4). Substituting the beam propagation trajectory equation into the expression for measuring straightness error using QD, the model for long-distance straightness measurement is expressed as Equation (5). (4) (5)。 3. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method for improving the accuracy of straightness measurement over long distances based on an improved optimization algorithm as described in any one of claims 1 to 2.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method for improving the accuracy of straightness measurement over long distances based on an improved optimization algorithm as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Deep-long hole straightness detection device and method
CN109000592A
Fast calibration method for four-quadrant photodetector position measurement
CN110793435A
