A low-drift laser scanning control method and system based on dynamic error compensation
By constructing a spatiotemporal joint error correction model and a real-time compensation algorithm, the problem of insufficient error prediction accuracy in existing technologies is solved, realizing low drift and high precision scanning of the laser scanning control system, and ensuring the stability and accuracy of the scanning process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PRECISION SCAN INC
- Filing Date
- 2026-01-20
- Publication Date
- 2026-05-05
AI Technical Summary
Existing low-drift laser scanning control methods and systems based on dynamic error compensation do not fully integrate multi-dimensional error characteristics such as time, space, and environment, resulting in insufficient error prediction accuracy, unstable correction effect, difficulty in dynamically adapting to environmental and state changes during the scanning process, and inability to effectively guarantee the requirements for low-drift and high-precision scanning throughout the entire process.
A laser scanning control system was built to collect multiple sets of scanned route data. A spatiotemporal joint error correction model was constructed, and real-time compensation and closed-loop optimization were achieved through real-time status and environmental data compensation, dynamically adapting to error changes during the scanning process.
It achieves accurate prediction and multi-dimensional correction of errors, ensuring the stability and accuracy of the scanning process, effectively suppressing scanning drift, ensuring low-drift and high-precision scanning results, and optimizing subsequent scanning performance.
Smart Images

Figure CN121541579B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser scanning control technology, specifically to a low-drift laser scanning control method and system based on dynamic error compensation. Background Technology
[0002] Laser scanning technology is widely used in high-end fields such as precision manufacturing, laser measurement, and microelectronics processing. Its scanning accuracy directly determines product quality and testing reliability. As industry requirements for accuracy continue to increase, errors caused by factors such as temperature drift and vibration interference during the scanning process are becoming increasingly prominent. Low drift control and dynamic error compensation have become core requirements for improving laser scanning performance. Developing an efficient and stable low-drift laser scanning control system has significant engineering application value and practical significance.
[0003] Existing low-drift laser scanning control methods and systems based on dynamic error compensation do not fully integrate multi-dimensional error characteristics such as time, space, and environment, resulting in insufficient error prediction accuracy. Furthermore, route correction lacks accurate error prediction support and verification, leading to unstable correction effects. In addition, the coordination between real-time compensation and closed-loop optimization is poor, making it difficult to dynamically adapt to environmental and state changes during the scanning process. Consequently, it cannot effectively guarantee the requirements for low-drift and high-precision scanning throughout the entire process. Therefore, it is necessary to provide a low-drift laser scanning control method and system based on dynamic error compensation to solve the aforementioned problems. Summary of the Invention
[0004] To address the aforementioned technical problems, this paper provides a low-drift laser scanning control method and system based on dynamic error compensation. This solution solves the problems of existing low-drift laser scanning control methods and systems based on dynamic error compensation mentioned in the background, which fail to fully integrate multi-dimensional error characteristics such as time, space, and environment, resulting in insufficient error prediction accuracy. Furthermore, the path correction lacks accurate error prediction support and verification, leading to unstable correction effects. In addition, the real-time compensation and closed-loop optimization have poor coordination, making it difficult to dynamically adapt to environmental and state changes during the scanning process, and thus failing to effectively guarantee the requirements for low-drift and high-precision scanning throughout the entire process.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] A low-drift laser scanning control method based on dynamic error compensation includes:
[0007] S1. Build a laser scanning control system and complete initialization and static calibration, and establish the system's basic control model and error benchmark;
[0008] S2. Collect multiple sets of multi-source data of the scanned routes and store them in a structured manner to form a database of scanned routes;
[0009] S3. Obtain the spatial boundary, accuracy requirements and environmental parameters of the area to be scanned, and filter out key scanned routes from the scanned route database;
[0010] S4. Preprocess and extract error features from key scanned route data, and construct a spatiotemporal joint error correction model;
[0011] S5. Generate an initial pre-planned route for the area to be scanned, and perform multi-dimensional dynamic correction of the initial pre-planned route based on the spatiotemporal joint error correction model;
[0012] S6. Execute the corrected scanning route, synchronously collect real-time status data and environmental data during the scanning process, and combine the dynamic error compensation algorithm to achieve real-time compensation and closed-loop optimization to complete low-drift laser scanning.
[0013] In an optional embodiment, step S1 specifically includes:
[0014] S101. Obtain the accuracy requirements and scanning range of the laser scanning task, and determine the hardware parameters of the laser emitting module, dual-axis scanning galvanometer, grating ruler position sensor, temperature-vibration composite sensor, and main control unit;
[0015] S102. Based on the aforementioned hardware parameters, construct a laser scanning control system comprising a laser emission link, a scanning execution link, a feedback detection link, and a main control link;
[0016] S103. Determine the system's preset communication protocol standard, further obtain the communication interface parameters of each module, and complete the communication initialization between the main control unit and each hardware module;
[0017] S104. Based on the scanning task requirements, obtain the basic parameters of the target scanning range, scanning frequency, and spot diameter, and send them to the main control unit to complete the scanning parameter initialization.
[0018] S105. Using a standard crosshair target, control the scanning galvanometer to drive the laser beam to complete a static scan of N calibration points on the target, obtain the driving voltage U_i of each calibration point and the actual displacement S_Driver detected by the grating ruler, and further determine the mapping relationship between the galvanometer driving voltage and the displacement S_Driver=k_Sensi·U_i+b, where k_Sensi is the sensitivity coefficient and b is the zero bias voltage;
[0019] S106. Establish a basic control model based on the mapping relationship between the galvanometer driving voltage and displacement. Through the basic control model, obtain the theoretical displacement S_Theory of each calibration point, determine the inherent error ΔS=|S_Theory-S_Driver| of each point, and after eliminating abnormal error values through the 3σ criterion, obtain the mean μ and variance σ of the inherent error and establish a system inherent error benchmark table.
[0020] S107. Using the initial ambient temperature T collected by the temperature sensor, control the scanning system to complete multiple sets of static scans within the range of T±5℃, obtain displacement deviation data at different temperatures, and further obtain the temperature drift coefficient k_Temperature=ΔS / ΔT, where ΔT is the temperature change of the scanning environment, and establish a basic model of temperature drift.
[0021] S108. Using the ambient background vibration acceleration a collected by the vibration sensor, combined with the mechanical resonant frequency f of the scanning galvanometer, obtain the vibration interference threshold a_Threshold=0.1×(2πf)²×D, where D is the diameter of the laser scanning spot, and complete the static calibration and error benchmark establishment.
[0022] In an optional embodiment, step S2 specifically includes:
[0023] S201. Based on the basic control model, obtain the pre-planned path point coordinate sequence and scanning speed curve for each scanned route, and store them as control layer data in a temporary cache;
[0024] S202. Based on the real-time feedback during the scanning process, obtain the real-time angle of the scanning galvanometer, the real-time position data of the motor encoder, and the adjustment amount of the piezoelectric ceramic, and use them as execution layer data to synchronize with the control layer data using timestamps to obtain the initial synchronization data set;
[0025] S203. Acquire the real-time position measurement data of the grating ruler, the scan area image data acquired by the camera, and the laser power monitoring data, and bind them as detection layer data with the initial synchronization data set;
[0026] S204. Acquire real-time temperature, vibration acceleration, and humidity during the scanning process, and supplement them as environmental data to the initial synchronization data set;
[0027] S205. Based on the initial synchronized data set, the control layer data, execution layer data, detection layer data, and environmental data of a single scanned route are integrated into a structured data unit using the unique path ID generated by the system. The data unit format includes path ID, scan timestamp, pre-planned path, actual execution path, scan parameters, environmental parameters, and image data path.
[0028] S206. Establish a database of scanned routes, store all structured data units in the database in order of scanning time, and establish spatial indexes and environmental parameter indexes to support fast querying by path ID, scanned area, and environmental parameters.
[0029] In an optional embodiment, step S3 specifically includes:
[0030] S301. Obtain the design drawing of the area to be scanned, determine the spatial boundary coordinates of the area to be scanned, and further obtain the center coordinates and side length of the minimum bounding rectangle of the spatial boundary coordinates of the area to be scanned;
[0031] S302. Based on the spatial index of the scanned route database, query the scanned routes whose distance from the actual execution path to the boundary of the area to be scanned is less than or equal to the minimum boundary threshold, and form a set of candidate adjacent routes;
[0032] S303. Obtain valid adjacent routes from the candidate adjacent route set whose deviation between the actual executed path and the pre-planned path is less than or equal to twice the minimum boundary threshold;
[0033] S304. Determine the key area labels from the design drawings of the area to be scanned, query the scanned route database containing the scanned routes with the labels, further determine the fitting error within the key area, and filter the key area routes with fitting errors greater than or equal to the minimum boundary threshold.
[0034] The formula for calculating the fitting error within the key region is as follows:
[0035]
[0036] In the formula, This represents the total number of waypoints within the critical area. , For the first The actual scan coordinates of each path point , For the first Fitted coordinates of each path point;
[0037] S305. Obtain the current ambient temperature and vibration acceleration of the area to be scanned, query the scanned route database for environmental parameters that meet the preset constraint boundaries, and further divide them into at least 3 environmental categories. Select one route with the most representative error in each category to form a set of environmental difference routes.
[0038] S306. Based on the timestamps of the scanned routes, the routes in the database are divided into three groups according to the scanning time: morning, afternoon, and evening. At least two valid routes are selected from each group to form a set of time difference routes.
[0039] S307. Integrate effective adjacent routes, key area routes, environmental difference routes, and time difference routes, and after further removing duplicate routes, retain at least 3 routes as key scanned candidate routes;
[0040] S308. Based on the image data from multiple sources of scanned routes, perform defect detection on the scanned images corresponding to the key scanned candidate routes, eliminate invalid routes with missed scans, duplicate scans, or spot distortion, and finally determine the key scanned routes.
[0041] In an optional embodiment, step S4 specifically includes:
[0042] S401. Based on the key scanned routes, obtain the pre-planned path and the actual execution path for each route, and determine the error vector for each path point;
[0043] S402. Use the 3σ criterion to remove outliers from the error vector of each path point to obtain the cleaned error dataset;
[0044] S403. Smooth the cleaned error dataset to obtain trend error data;
[0045] S404. Obtain the timestamp and scan length of the key scanned route, extract the spatiotemporal drift trend features, and obtain the drift trend model ΔP_Drift=k_Time·t+k_Length·L+b, where ΔP_Drift is the drift trend error compensation amount, k_Time is the time drift coefficient, k_Length is the length drift coefficient, t is the timestamp of the key scanned route, L is the scan length of the key scanned route, and b is the drift constant term;
[0046] S405. Obtain the spatial boundary of the area to be scanned, map the error data of the key scanned routes to a unified global coordinate system, generate an error distribution heatmap of the scanned area, extract the spatial error distribution features, and obtain the spatial error function ΔP(x,y).
[0047] S406. Obtain environmental and error data corresponding to the key scanned routes, and further extract environmental-error correlation features to obtain an environmental error model;
[0048] The environmental error model is as follows:
[0049] ΔP_Environment=k_Temperature·(T_t-T_0)+k_Vibration·(a_t-a_0);
[0050] In the formula, ΔP_Environment is the environmental error compensation amount, k_Temperature is the temperature drift coefficient, k_Vibration is the vibration error coefficient, T_0 and a_0 are the initial environmental temperature and initial vibration acceleration, T_t is the real-time environmental temperature at time t, and a_t is the real-time vibration acceleration at time t.
[0051] S407. Based on the velocity and acceleration in the scanning parameters, extract the parameter-error correlation features to obtain the parameter error model;
[0052] The expression formula for the parameter error model is as follows:
[0053] ΔP_Parameter=k_Speed·v_Scan_t+k_Acceleration·a_Scan_t;
[0054] In the formula, ΔP_Parameter is the parameter error compensation amount, k_Speed is the velocity error coefficient, k_Acceleration is the acceleration error coefficient, v_Scan_t is the real-time scanning speed in the scanning parameters, and a_Scan_t is the real-time scanning acceleration in the scanning parameters;
[0055] S408. Based on the spatiotemporal drift trend characteristics, spatial error distribution characteristics, environment-error correlation characteristics, and parameter-error correlation characteristics, a spatiotemporal joint error correction model is constructed. The model inputs are the coordinates of the path points to be scanned, the scanning time, the scanning length, the environmental parameters, and the scanning parameters. The output is the total error prediction value.
[0056] The spatiotemporal joint error correction model is expressed as follows:
[0057] ΔP_United=ΔP_Drift+ΔP(x,y)+ΔP_Environment+ΔP_Parameter;
[0058] In the formula, ΔP_United is the predicted error value.
[0059] In an optional embodiment, step S5 specifically includes:
[0060] S501. Based on the spatial boundary and accuracy requirements of the area to be scanned, obtain the scanning path spacing and generate an initial pre-planned path point sequence using the raster scanning mode;
[0061] S502. Based on the efficiency requirements of the scanning task, obtain the maximum allowable scanning speed, generate an initial scanning speed curve, and ensure that the acceleration is less than or equal to the preset acceleration threshold;
[0062] S503. Based on the spatiotemporal joint error correction model, input the initial pre-planned path point coordinates, initial scan parameters, and current environmental parameters into the spatiotemporal joint error correction model to obtain the error prediction value ΔP_United for each path point;
[0063] S504. Based on the error prediction value ΔP_United, reverse the initial pre-planned path points to obtain the corrected path point coordinates;
[0064] The formula for calculating the corrected path point coordinates is as follows:
[0065] P_Revised(x,y)=P_Before(x,y)-ΔP_United;
[0066] In the formula, P_Revised(x,y) represents the corrected path point coordinates, and P_Before(x,y) represents the initial pre-planned path point coordinates;
[0067] S505. Smooth the corrected path point sequence to ensure the continuity of the first derivative of the path and avoid mechanical shock;
[0068] S506. Based on the parameter-error correlation feature, determine whether the prediction error is greater than the accuracy requirement. If so, adjust the scanning speed of the corresponding path segment v_Adjusted=v__Before×(ε / ΔP_United);
[0069] S507. Based on the environmental error model, obtain the initial compensation parameters under the current environment, including the temperature drift coefficient k_Temperature and the vibration error coefficient k_Vibration, and store them as the initial values for real-time compensation in the correction parameter set.
[0070] S508. Based on the corrected path point sequence, scanning speed curve and initial compensation parameters, select at least 3 verification points in the edge region of the area to be scanned for local trial scanning to obtain the actual error of the trial scanning;
[0071] If the actual error of the trial scan is less than or equal to the accuracy requirement, the corrected route will be used as the final pre-planned route.
[0072] If the actual error of the trial scan is greater than the accuracy requirement, the coefficients of the spatiotemporal joint error correction model are updated, and the correction process is repeated until the accuracy requirement is met.
[0073] In an optional embodiment, step S6 specifically includes:
[0074] S601. Send the final pre-planned route data to the main control unit and control the scanning galvanometer to start scanning according to the corrected path points and speed curve;
[0075] S602. Based on the grating ruler position sensor and temperature-vibration composite sensor, real-time position data, real-time temperature, and real-time vibration acceleration are simultaneously acquired during the scanning process;
[0076] S603. Based on the initial compensation parameters and the real-time collected environmental data, obtain the real-time environmental compensation amount;
[0077] The formula for calculating the real-time environmental compensation amount is as follows:
[0078] ΔP_Environment_t=k_Temperature_true·(T_t-T_0)+k_Vibration_true·(a_t-a_0);
[0079] In the formula, ΔP_Environment_t is the real-time environmental compensation amount, k_Temperature_true is the updated temperature drift coefficient, and k_Vibration_true is the updated vibration error coefficient;
[0080] S604. Determine the real-time position error based on real-time position data and the corrected pre-planned path points;
[0081] The formula for calculating the real-time position error is as follows:
[0082] ΔP(t) = P(t) - P_END;
[0083] In the formula, ΔP(t) is the real-time position error, and P(t) is the real-time position data;
[0084] S605. Filter the real-time position error to eliminate sensor noise and obtain the filtered error;
[0085] S606. Determine the total compensation amount based on the filtered error and the real-time environmental compensation amount;
[0086] The formula for calculating the total compensation amount is as follows:
[0087] ΔP(t)_Total=K_p·ΔP(t)_F+K_j·∫ΔP(τ)dτ+K_d·dΔP(t)_F / dt+ΔP_Environment_t;
[0088] In the formula, K_p is the proportional coefficient, K_j is the integral coefficient, K_d is the differential coefficient, ΔP(t)_F is the filtered error, ∫ΔP(τ)dτ is the integral term of the filtered error, and dΔP(t)_F / dt is the differential term of the filtered error.
[0089] S607. Convert the total compensation amount into the driving voltage correction amount of the scanning galvanometer, send it to the galvanometer driving module to complete real-time compensation, and obtain the real-time position data after compensation;
[0090] The formula for calculating the driving voltage correction is as follows:
[0091] ΔU = ΔP(t)_Total / k_Sensi;
[0092] S608. Based on the compensated real-time position data, determine the residual error ΔP(t)_Remains=P(t)_U-P_END;
[0093] If the residual error is greater than the accuracy requirement, the PID control parameters are dynamically adjusted to make the residual error converge quickly.
[0094] S609. After the scanning task is completed, record the full execution data, compensation parameters and error data of the corrected route, and add them to the scanned route database;
[0095] S610. By using the error data from this scan in the scanned route database, update the coefficients of the spatiotemporal joint error correction model, optimize the correction accuracy of subsequent scans, and complete the closed-loop optimization.
[0096] Furthermore, a low-drift laser scanning control system based on dynamic error compensation is proposed to achieve the control method described above, including:
[0097] The system initialization and calibration module is used to build the laser scanning control system and complete the initialization and static calibration, and establish the system's basic control model and error benchmark.
[0098] The data acquisition and storage module is used to acquire multiple sets of multi-source data of the scanned routes and store them in a structured manner to form a scanned route database.
[0099] The error modeling module is used to obtain the spatial boundary, accuracy requirements and environmental parameters of the area to be scanned, select key scanned routes from the scanned route database, preprocess the key scanned route data and extract error features, and construct a spatiotemporal joint error correction model.
[0100] The route planning and correction module is used to generate an initial pre-planned route for the area to be scanned, and to perform multi-dimensional dynamic correction of the initial pre-planned route based on a spatiotemporal joint error correction model.
[0101] The real-time compensation and closed-loop optimization module is used to execute the corrected scanning route, synchronously collect real-time status data and environmental data during the scanning process, and combine dynamic error compensation algorithm to realize real-time compensation and closed-loop optimization to complete low-drift laser scanning.
[0102] In an optional embodiment, the error modeling module includes:
[0103] The critical route filtering unit is used to obtain the spatial boundary, accuracy requirements and environmental parameters of the area to be scanned, and to filter out the critical scanned routes from the scanned route database.
[0104] A data preprocessing unit is used to preprocess key scanned route data;
[0105] An error feature extraction unit is used to extract error features from the preprocessed key scanned route data.
[0106] An error model construction unit is used to construct a spatiotemporal joint error correction model based on the extracted error features.
[0107] In an optional embodiment, the route planning and correction module includes:
[0108] An initial route generation unit is used to generate an initial pre-planned route for the area to be scanned.
[0109] An error prediction unit is used to predict the error for each path point of the initial pre-planned route in the area to be scanned based on a spatiotemporal joint error correction model.
[0110] A dynamic correction unit is used to perform multi-dimensional dynamic correction of the initial pre-planned route based on the error prediction results.
[0111] The correction and verification unit is used to verify the accuracy of the dynamically corrected pre-planned route to ensure that the accuracy requirements of the scanning task are met.
[0112] Compared with the prior art, the beneficial effects of the present invention are:
[0113] This proposal presents a low-drift laser scanning control method based on dynamic error compensation. By screening key scanned routes, preprocessing their data, and extracting multi-dimensional error features such as spatiotemporal drift, spatial distribution, environmental correlation, and parameter correlation, a spatiotemporal joint error correction model is constructed. This achieves accurate error prediction and provides reliable data support and model basis for subsequent pre-planned route correction.
[0114] This solution proposes a low-drift laser scanning control method based on dynamic error compensation. By generating an initial pre-planned route, it predicts the error of each path point based on a spatiotemporal joint error correction model, and combines the prediction results to correct the path point coordinates, optimize the scanning speed and acceleration, and verify the accuracy through local trial scanning. This achieves multi-dimensional and precise optimization of the pre-planned route, ensuring the stability and accuracy of the route execution.
[0115] This solution proposes a low-drift laser scanning control method based on dynamic error compensation. By executing a corrected route and simultaneously collecting real-time status and environmental data, it combines Kalman filtering and PID control algorithms to achieve real-time environmental compensation and total error cancellation. After scanning, the database and model coefficients are updated, realizing dynamic error compensation and closed-loop optimization throughout the scanning process. This effectively suppresses scanning drift, ensuring low-drift and high-precision scanning results, while continuously optimizing subsequent scanning performance. Attached Figure Description
[0116] Figure 1 This is a flowchart of a low-drift laser scanning control method based on dynamic error compensation proposed in this invention;
[0117] Figure 2 This is a flowchart illustrating the determination of the key scanned route in this invention;
[0118] Figure 3 This is a flowchart illustrating the construction of the spatiotemporal joint error correction model in this invention.
[0119] Figure 4 This is a system framework diagram of a low-drift laser scanning control system based on dynamic error compensation proposed in this invention. Detailed Implementation
[0120] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0121] Reference Figure 1 - Figure 4 As shown, a low-drift laser scanning control method based on dynamic error compensation includes:
[0122] S1. Build a laser scanning control system and complete initialization and static calibration, and establish the system's basic control model and error benchmark;
[0123] S2. Collect multiple sets of multi-source data of the scanned routes and store them in a structured manner to form a database of scanned routes;
[0124] S3. Obtain the spatial boundary, accuracy requirements and environmental parameters of the area to be scanned, and filter out key scanned routes from the scanned route database;
[0125] S4. Preprocess and extract error features from key scanned route data, and construct a spatiotemporal joint error correction model;
[0126] S5. Generate an initial pre-planned route for the area to be scanned, and perform multi-dimensional dynamic correction of the initial pre-planned route based on the spatiotemporal joint error correction model;
[0127] S6. Execute the corrected scanning route, synchronously collect real-time status data and environmental data during the scanning process, and combine the dynamic error compensation algorithm to achieve real-time compensation and closed-loop optimization to complete low-drift laser scanning.
[0128] Furthermore, step S1 specifically includes:
[0129] S101. Obtain the accuracy requirements and scanning range of the laser scanning task, and determine the hardware parameters of the laser emitting module, dual-axis scanning galvanometer, grating ruler position sensor, temperature-vibration composite sensor, and main control unit;
[0130] S102. Based on hardware parameters, build a laser scanning control system that includes a laser emission link, a scanning execution link, a feedback detection link, and a main control link;
[0131] S103. Determine the system's preset communication protocol standard, further obtain the communication interface parameters of each module, and complete the communication initialization between the main control unit and each hardware module;
[0132] S104. Based on the scanning task requirements, obtain the basic parameters of the target scanning range, scanning frequency, and spot diameter, and send them to the main control unit to complete the scanning parameter initialization.
[0133] S105. Using a standard crosshair target, control the scanning galvanometer to drive the laser beam to complete a static scan of N calibration points on the target, obtain the driving voltage U_i of each calibration point and the actual displacement S_Driver detected by the grating ruler, and further determine the mapping relationship between the galvanometer driving voltage and the displacement S_Driver=k_Sensi·U_i+b, where k_Sensi is the sensitivity coefficient and b is the zero bias voltage;
[0134] Specifically, the value of the N calibration points is N=25, and the crosshair target adopts a 5×5 grid distribution to cover the entire range of the target, ensuring the full-domain accuracy of the mapping relationship between driving voltage and displacement.
[0135] Understandably, step S105 involves fixing a standard crosshair target on the scanning stage, ensuring the target plane is perpendicular to the laser beam and the target center is aligned with the origin of the global coordinate system of the scanning system, and calibrating the target plane's levelness using a level (error ≤ 0.01 mm / m). Then, based on the effective scanning range of the crosshair target (usually consistent with the maximum scanning range of the scanning task), 25 calibration points are evenly divided using a 5×5 grid distribution pattern, covering the full range of the target's X and Y axes and diagonal areas, ensuring no blind spots in the point distribution. Next, based on the theoretical coordinates of each calibration point (based on the global coordinate system) and the initially preset galvanometer drive parameters, the corresponding drive voltage U_i is calculated and issued (the voltage range matches the galvanometer's operating voltage, typically 0-10V), controlling the X and Y axis deflection angles of the dual-axis scanning galvanometer. Once the galvanometer drives the laser beam to the target calibration point, the system controls the scanning galvanometer to maintain its current angle for 50 ms (ensuring stable beam placement and avoiding dynamic jitter affecting the measurement), completing the static scan of that point. The grating ruler position sensor monitors the actual landing point of the laser beam on the target in real time, converting the physical displacement into an electrical signal. After analog-to-digital conversion, the actual displacement data S_Driver (accuracy up to 0.1μm) is obtained. Finally, the driving voltage U_i of each calibration point is associated with the corresponding actual displacement S_Driver according to the point number, forming a "voltage-displacement" paired dataset, which is stored in a temporary buffer to provide raw data for subsequent mapping relationship modeling. It is important to note that the driving voltage U_i of each point is distributed with equal-interval gradients to ensure coverage of the entire driving range of the galvanometer and avoid local data loss; the static dwell time needs to be adjusted according to the galvanometer response speed (minimum not less than 30ms) to prevent displacement data from being collected before the beam stabilizes. The grating ruler acquisition frequency must be ≥16kHz, and 10 sets of displacement data are collected at each point. The average value is taken as the final S_Driver for that point to reduce measurement noise.
[0136] S106. Establish a basic control model based on the mapping relationship between the galvanometer driving voltage and displacement. Using the basic control model, obtain the theoretical displacement S_Theory of each calibration point, determine the inherent error ΔS=|S_Theory-S_Driver| of each point, and after eliminating abnormal error values through the 3σ criterion, obtain the mean μ and variance σ of the inherent error (mean μ1=3.2μm and variance σ1=0.5μm of the inherent error) and establish a system inherent error benchmark table.
[0137] Specifically, the basic control model is a voltage-displacement control mapping model constructed by the linear mapping relationship between the galvanometer driving voltage and the actual displacement. Its core essence is to accurately predict the displacement of the laser beam driven by the galvanometer through the known driving voltage, or to deduce the required driving voltage based on the target displacement. Its core expression is S_Driver=k_Sensi·U_i+b, and the output S_Driver is the actual displacement of the galvanometer.
[0138] S107. Using the initial ambient temperature T collected by the temperature sensor, control the scanning system to complete multiple sets of static scans within the range of T±5℃, obtain displacement deviation data at different temperatures, and further obtain the temperature drift coefficient k_Temperature=ΔS / ΔT, where ΔT is the temperature change of the scanning environment, and establish a basic model of temperature drift.
[0139] Specifically, the temperature drift coefficient is a proportionality coefficient that describes the change of system displacement deviation with temperature. It is used to quantify the degree of influence of temperature change on laser scanning displacement and is the core parameter for establishing the basic temperature drift model.
[0140] S108. Using the ambient background vibration acceleration a collected by the vibration sensor, combined with the mechanical resonant frequency f of the scanning galvanometer, obtain the vibration interference threshold a_Threshold=0.1×(2πf)²×D, where D is the diameter of the laser scanning spot, and complete the static calibration and error benchmark establishment.
[0141] Specifically, the vibration interference threshold is a critical acceleration value used to determine whether environmental vibration will significantly affect the accuracy of laser scanning. When the environmental vibration acceleration exceeds this threshold, a vibration error compensation mechanism must be activated. A safety factor of 0.1, determined based on the accuracy requirements of the laser scanning system and the mechanical characteristics of the galvanometer, is used to reduce the weight of vibration interference on the scanning displacement, ensuring the rationality and safety of the threshold setting. The laser scanning spot diameter (in μm) is used; the larger the spot diameter, the more significant the impact of vibration on the spot's landing point. Therefore, it is used as a key parameter in threshold calculation, linking vibration interference to the mapping relationship between scanning accuracy.
[0142] Furthermore, step S2 specifically includes:
[0143] S201. Based on the basic control model, obtain the pre-planned path point coordinate sequence and scanning speed curve for each scanned route, and store them as control layer data in a temporary cache;
[0144] S202. Based on the real-time feedback during the scanning process, obtain the real-time angle of the scanning galvanometer, the real-time position data of the motor encoder, and the adjustment amount of the piezoelectric ceramic, and use them as execution layer data to synchronize with the control layer data using timestamps to obtain the initial synchronization data set;
[0145] S203. Acquire the real-time position measurement data of the grating ruler, the scan area image data acquired by the camera, and the laser power monitoring data, and bind them as detection layer data with the initial synchronization data set;
[0146] S204. Acquire real-time temperature, vibration acceleration, and humidity during the scanning process, and supplement them as environmental data to the initial synchronization data set;
[0147] S205. Based on the initial synchronized data set, the control layer data, execution layer data, detection layer data, and environmental data of a single scanned route are integrated into a structured data unit using the unique path ID generated by the system. The data unit format includes path ID, scan timestamp, pre-planned path, actual execution path, scan parameters, environmental parameters, and image data path.
[0148] S206. Establish a database of scanned routes, store all structured data units in the database in order of scanning time, and establish spatial indexes and environmental parameter indexes to support fast querying by path ID, scanned area, and environmental parameters.
[0149] Furthermore, step S3 specifically includes:
[0150] S301. Obtain the design drawing of the area to be scanned, determine the spatial boundary coordinates of the area to be scanned, and further obtain the center coordinates and side length of the minimum bounding rectangle of the spatial boundary coordinates of the area to be scanned;
[0151] S302. Based on the spatial index of the scanned route database, query the scanned routes whose distance from the actual execution path to the boundary of the area to be scanned is less than or equal to the minimum boundary threshold, and form a set of candidate adjacent routes;
[0152] S303. Obtain valid adjacent routes from the candidate adjacent route set whose deviation between the actual executed path and the pre-planned path is less than or equal to twice the minimum boundary threshold;
[0153] S304. Determine the key area labels from the design drawings of the area to be scanned, query the scanned route database containing the scanned routes with the labels, further determine the fitting error within the key area, and filter the key area routes with fitting errors greater than or equal to the minimum boundary threshold.
[0154] The formula for calculating the fitting error within the key region is as follows:
[0155]
[0156] In the formula, This represents the total number of waypoints within the critical area. , For the first The actual scan coordinates of each path point , For the first Fitted coordinates of each path point;
[0157] S305. Obtain the current ambient temperature and vibration acceleration of the area to be scanned, query the scanned route database for environmental parameters that meet the preset constraint boundary (|TT|≥2℃ or |aa|≥0.01g), further divide them into at least 3 environmental categories, and select the route with the most representative error in each category to form a set of environmental difference routes;
[0158] S306. Based on the timestamps of the scanned routes, the routes in the database are divided into three groups according to the scanning time: morning, afternoon, and evening. At least two valid routes are selected from each group to form a set of time difference routes.
[0159] S307. Integrate effective adjacent routes, key area routes, environmental difference routes, and time difference routes, and after further removing duplicate routes, retain at least 3 routes as key scanned candidate routes;
[0160] S308. Based on the image data from multiple sources of scanned routes, perform defect detection on the scanned images corresponding to the key scanned candidate routes, eliminate invalid routes with missed scans, duplicate scans, or spot distortion, and finally determine the key scanned routes.
[0161] Specifically, the key area labels in step S304 include, but are not limited to, complex contour areas and splicing seam areas, with a minimum boundary threshold of d_Threshold=0.5L, where L is the minimum side length of the smallest bounding rectangle. Based on the functional attributes and accuracy requirements of the area to be scanned, the preset label types include "complex contour areas" (such as curve segments with a radius of curvature ≤5mm, sharp corner areas with an angle ≤30°), "splicing seam areas" (such as butt joints in multi-part assembly, layer connection boundaries), "high-precision requirement areas" (such as functional areas with dimensional tolerances ≤±0.01mm), and "edge transition areas" (such as transition sections extending outward from the area boundary within 5mm). The labels are automatically generated by recognizing the geometric features and tolerance requirements marked on the design drawings, or manually added by the user. It is important to note that during database queries, based on the tag index of the scanned route database, scanned routes containing tags consistent with the key area of the area to be scanned are accurately matched. At the same time, routes whose scanning time is more than 90 days ago or whose environmental parameters differ too much from the current time (temperature difference ≥10℃ or vibration acceleration difference ≥0.1g) are filtered out, forming a set of candidate routes for key areas. When calculating the fitting error, it is necessary to extract all path point data within the key area for each candidate route in the key area, including the pre-planned fitting coordinates (x_i', y_i') and the actual scanning coordinates (x_i, y_i), ensuring that the number of path points n≥50 (if insufficient, it is supplemented to 50 through linear interpolation to ensure fitting accuracy). The pre-planned fitting coordinates are obtained from the curve fitting results of the initial pre-planned path in the key area, and the actual scanning coordinates are extracted from the real-time position data collected by the grating ruler after timestamp alignment. The minimum boundary threshold d_Threshold=0.5×ε (ε is the preset accuracy requirement of the area to be scanned). For example, when the accuracy requirement of the area to be scanned is ε=1μm, d_Threshold=0.5μm, ensuring that the error of the selected route is representative and can reflect the error characteristics of the key area. During the screening process, the fitting error ε_fit of each candidate route in the key area needs to be calculated. If ε_fit ≥ d_Threshold, the route is retained as a key area route. If there are fewer than two routes that meet the conditions among the candidate routes, the minimum boundary threshold is lowered to 0.3×ε, and the route is re-screened to ensure that at least two key area routes are obtained, providing sufficient data support for subsequent error modeling.
[0162] Furthermore, step S4 specifically includes:
[0163] S401. Based on the key scanned routes, obtain the pre-planned path and the actual execution path for each route, and determine the error vector for each path point;
[0164] S402. Use the 3σ criterion to remove outliers from the error vector of each path point to obtain the cleaned error dataset;
[0165] S403. Smooth the cleaned error dataset to obtain trend error data;
[0166] Specifically, the smoothing process employs a combined strategy of moving weighted averaging and Savitzky-Golay filtering. First, moving weighted averaging initially suppresses high-frequency noise, then Savitzky-Golay filtering preserves the trend characteristics of the error data (avoiding over-smoothing that could distort the trend). The window size in the moving weighted averaging parameters is set to 5 (covering the current data point and two adjacent data points before and after it), and the weight allocation follows the principle of "highest weight at the middle point, decreasing towards both sides," with a specific weight vector of [0.1, 0.2, 0.4, 0.2, 0.1] to ensure the core data points dominate the smoothing result. The Savitzky-Golay filter window length is set to 7 (an odd number to ensure window symmetry), and the polynomial fitting order is set to 2. This effectively filters out residual high-frequency noise while accurately fitting the linear or low-order nonlinear trends of the error data, avoiding the introduction of spurious features by higher-order fitting. Before smoothing, the continuity of the cleaned error dataset is verified. If data is missing (no more than 3 consecutive points), linear interpolation is used to fill in the gaps. If more than 3 consecutive points are missing, the data segment is discarded (marked as invalid and not included in trend extraction). After smoothing, the rate of change of the difference between adjacent data points (ΔΔP / Δt, where Δt is the data acquisition time interval) is calculated. Continuous data segments with a rate of change ≤ 0.01 μm / ms are selected and merged into trend error data. Regions with abrupt changes in the rate of change (≥ 0.1 μm / ms) are identified as transient interference, and the smoothed data is retained but marked as non-trend segments for further differentiation during subsequent error feature extraction.
[0167] S404. Obtain the timestamp and scan length of the key scanned route, extract the spatiotemporal drift trend features, and obtain the drift trend model ΔP_Drift=k_Time·t+k_Length·L+b, where ΔP_Drift is the drift trend error compensation amount, k_Time is the time drift coefficient, k_Length is the length drift coefficient, t is the timestamp of the key scanned route, L is the scan length of the key scanned route, and b is the drift constant term;
[0168] S405. Obtain the spatial boundary of the area to be scanned, map the error data of the key scanned routes to a unified global coordinate system, generate an error distribution heatmap of the scanned area, extract the spatial error distribution features, and obtain the spatial error function ΔP(x,y).
[0169] S406. Obtain environmental and error data corresponding to the key scanned routes, and further extract environmental-error correlation features to obtain an environmental error model;
[0170] The environmental error model is as follows:
[0171] ΔP_Environment=k_Temperature·(T_t-T_0)+k_Vibration·(a_t-a_0);
[0172] In the formula, ΔP_Environment is the environmental error compensation amount, k_Temperature is the temperature drift coefficient, k_Vibration is the vibration error coefficient, T_0 and a_0 are the initial environmental temperature and initial vibration acceleration, T_t is the real-time environmental temperature at time t, and a_t is the real-time vibration acceleration at time t.
[0173] S407. Based on the velocity and acceleration in the scanning parameters, extract the parameter-error correlation features to obtain the parameter error model;
[0174] The expression formula for the parameter error model is as follows:
[0175] ΔP_Parameter=k_Speed·v_Scan_t+k_Acceleration·a_Scan_t;
[0176] In the formula, ΔP_Parameter is the parameter error compensation amount, k_Speed is the velocity error coefficient, k_Acceleration is the acceleration error coefficient, v_Scan_t is the real-time scanning speed in the scanning parameters, and a_Scan_t is the real-time scanning acceleration in the scanning parameters;
[0177] S408. Based on the spatiotemporal drift trend characteristics, spatial error distribution characteristics, environment-error correlation characteristics, and parameter-error correlation characteristics, a spatiotemporal joint error correction model is constructed. The model inputs are the coordinates of the path points to be scanned, the scanning time, the scanning length, the environmental parameters, and the scanning parameters. The output is the total error prediction value.
[0178] The formula for the spatiotemporal joint error correction model is as follows:
[0179] ΔP_United=ΔP_Drift+ΔP(x,y)+ΔP_Environment+ΔP_Parameter;
[0180] In the formula, ΔP_United is the predicted error value.
[0181] Specifically, the temperature drift coefficient is the change in scanning displacement deviation for every 1°C change in temperature, typically expressed in μm / °C, quantifying the impact of temperature changes on scanning accuracy. The time drift coefficient is the increase in scanning drift error for every 1 unit increase in scanning time (e.g., 1 second), typically expressed in μm / s, quantifying the trend of error accumulation with scanning duration. The length drift coefficient is the increase in scanning drift error for every 1 unit increase in scanning length (e.g., 1 mm), typically expressed in μm / mm, quantifying the trend of error accumulation with scanning path length. The vibration error coefficient is the change in scanning displacement deviation for every 1 unit change in environmental vibration acceleration (e.g., 1 m / s² or 1 g), typically expressed in μm / (m / s²), quantifying the impact of vibration interference on scanning accuracy. The speed error coefficient is the change in scanning error for every 1 unit change in scanning speed (e.g., 1 m / s), typically expressed in μm / (m / s), quantifying the correlation between scanning speed and error. The acceleration error coefficient is the change in scanning error for every unit change in scanning acceleration (e.g., 1 m / s²), typically expressed in μm / (m / s²), quantifying the correlation between scanning acceleration and error. The above-mentioned drift coefficients are obtained through multiple sets of sample data acquisition and linear regression fitting. Taking the temperature drift coefficient as an example, in step S107, during the static calibration stage, multiple sets of static scans are performed within the initial ambient temperature range of T ± 5℃, collecting displacement deviation data ΔS (the difference between actual and theoretical displacement) at different temperatures. Then, the temperature drift coefficient k_Temperature = ΔS / ΔT, where ΔT is the temperature change between two scans (e.g., T1-T0), and ΔS is the displacement deviation change at the corresponding temperature (e.g., S1-S0). Taking time drift coefficient and length drift coefficient as examples, in the S404 error feature extraction stage, the timestamp t (scanning duration), scan length L (total path length) of the key scanned route and the corresponding trend error data ΔP_Drift are obtained. With t and L as independent variables and ΔP_Drift as dependent variable, a linear regression model ΔP_Drift=k_Time・t+k_Length・L+b is constructed. k_Time and k_Length (b is the drift constant term) are obtained by fitting with the least squares method.
[0182] Furthermore, step S5 specifically includes:
[0183] S501. Based on the spatial boundary and accuracy requirements of the area to be scanned, obtain the scanning path spacing and generate an initial pre-planned path point sequence using the raster scanning mode;
[0184] Specifically, the preset accuracy requirements for the scanning task are thresholds for determining whether residual errors are acceptable, such as ε=0.1μm, ε=1μm, etc., determined by the accuracy requirements of the specific scanning task. When analyzing the spatial boundary, the spatial boundary coordinates (x_min, y_min) and (x_max, y_max) of the design drawing of the area to be scanned are first read to determine the minimum bounding rectangle range of the area. At the same time, redundant discrete points on the boundary are removed (the boundary is simplified using the Douglas-Peucker algorithm, with a simplification threshold ≤0.01mm) to ensure accurate boundary contours. When calculating the scanning path spacing, the path spacing d=k×ε is first determined, where ε is the preset accuracy requirement of the area to be scanned, and k is the adaptation coefficient (range 1.0~1.5). The specific value is adjusted according to the scanning task type—for precision inspection tasks, k=1.0 (d=ε) is used to ensure full scanning coverage without omissions; for high-efficiency processing tasks, k=1.5 (d=1.5ε) is used to improve scanning efficiency while meeting accuracy requirements. For example, when the accuracy requirement is ε=1μm, the path spacing for detection is d=1μm, and for processing, it is d=1.5μm. The default grating scanning mode is "horizontal grating scanning" (paths are distributed parallel along the X-axis). If the area to be scanned is elongated (length-to-width ratio ≥3:1), it automatically switches to "vertical grating scanning" to reduce the number of times the scanning galvanometer direction is switched. The starting edge of the scanning direction is selected from the boundary closest to the current scanning origin to reduce the initial positioning error. The path point sequence generation rule is as follows: First, parallel paths are generated along the scanning direction at path spacing d. The x-coordinate of the starting point of each path starts from x_min and the x-coordinate of the ending point is x_max (horizontal scan), or the y-coordinate starts from y_min and the y-coordinate of the ending point is y_max (vertical scan). At the same time, the path point spacing Δs=max(0.5d, 1μm) on each path ensures that the path point density meets the accuracy requirements and that the connection between adjacent path points is smooth. The turning of adjacent paths adopts a "Z" shape (avoiding 90° right-angle turns), and the path points of the turning transition section are generated by circular interpolation (circular radius r=5Δs) to reduce the mechanical impact on the scanning galvanometer. After generating the path point sequence, it is checked whether the coordinates of each path point are within the boundary of the area to be scanned. If there are path points that exceed the boundary, they are automatically clipped to the boundary (keeping the boundary intersection coordinates). At the same time, the total path length and the estimated scanning time are calculated. If the estimated time exceeds the task timeliness requirements, the k value can be increased by 0.2 (maximum not exceeding 1.8) while keeping d≥ε, and the path point sequence can be regenerated.
[0185] S502. Based on the efficiency requirements of the scanning task, obtain the maximum allowable scanning speed, generate an initial scanning speed curve, and ensure that the acceleration is less than or equal to the preset acceleration threshold;
[0186] S503. Based on the spatiotemporal joint error correction model, input the initial pre-planned path point coordinates, initial scan parameters, and current environmental parameters into the spatiotemporal joint error correction model to obtain the error prediction value ΔP_United for each path point;
[0187] S504. Based on the error prediction value ΔP_United, reverse the initial pre-planned path points to obtain the corrected path point coordinates;
[0188] The formula for calculating the coordinates of the corrected path points is as follows:
[0189] P_Revised(x,y)=P_Before(x,y)-ΔP_United;
[0190] In the formula, P_Revised(x,y) represents the corrected path point coordinates, and P_Before(x,y) represents the initial pre-planned path point coordinates;
[0191] S505. Smooth the corrected path point sequence to ensure the continuity of the first derivative of the path and avoid mechanical shock;
[0192] S506. Based on the parameter-error correlation characteristics, determine whether the prediction error is greater than the accuracy requirement. If so, adjust the scanning speed of the corresponding path segment v_Adjusted=v__Before×(ε / ΔP_United), and at the same time use the S-shaped acceleration and deceleration curve to optimize the acceleration so that the jerk≤100m / s³.
[0193] Specifically, the acceleration is optimized using an S-shaped acceleration / deceleration curve, ensuring that the jerk ≤ 100 m / s³. The purpose of the S-shaped acceleration / deceleration curve is to avoid sudden acceleration changes (as opposed to traditional linear acceleration / deceleration) and reduce inertial errors caused by mechanical shock. Limiting the jerk (the rate of change of acceleration) to within 100 m / s³ further ensures a smooth speed adjustment process, avoids introducing new scanning errors due to sudden acceleration changes, and ensures that the adjusted path execution is smoother and the error is more controllable.
[0194] S507. Based on the environmental error model, obtain the initial compensation parameters under the current environment, including the temperature drift coefficient k_Temperature and the vibration error coefficient k_Vibration, and store them as the initial values for real-time compensation in the correction parameter set.
[0195] S508. Based on the corrected path point sequence, scanning speed curve and initial compensation parameters, select at least 3 verification points in the edge region of the area to be scanned for local trial scanning to obtain the actual error of the trial scanning;
[0196] If the actual error of the trial scan is less than or equal to the accuracy requirement, the corrected route will be used as the final pre-planned route.
[0197] If the actual error of the trial scan is greater than the accuracy requirement, the coefficients of the spatiotemporal joint error correction model are updated, and the correction process is repeated until the accuracy requirement is met.
[0198] Specifically, when updating the coefficients of the spatiotemporal joint error correction model, the time drift coefficient and length drift coefficient are updated first. However, this is not the only update; other coefficients within the model, such as the temperature drift coefficient and vibration error coefficient, need to be updated simultaneously based on the source of the trial scan error. The main source of trial scan error is the cumulative effect of spatiotemporal drift (in terms of time: although the trial scan is short, the "time drift coefficient" of the spatiotemporal joint model reflects a long-term trend; in terms of space: the cumulative scan length in the edge region easily amplifies the error of the "length drift coefficient"), therefore, these two coefficients are updated first. The update conditions for other coefficients (temperature / vibration / velocity / acceleration error coefficients) are as follows: the temperature drift coefficient, vibration error coefficient, velocity error coefficient, and acceleration error coefficient are all components of the spatiotemporal joint error correction model. Whether to update them depends on the following: the trial scan error analysis shows that the error is mainly caused by the error sources corresponding to these coefficients. For example, the temperature drift coefficient and vibration error coefficient are only refitted using the least squares method (based on the environmental data and error data of the test scan) when there is a significant difference between the real-time environmental data and the initial environmental parameters during the test scan (e.g., a temperature change ≥2℃ during the test scan), and calculations show that "the predicted value of the environmental error model deviates too much from the actual environmental error" (based on the environmental data and error data of the test scan). The velocity error coefficient and acceleration error coefficient are only updated synchronously when the scan speed has been adjusted before the test scan according to "v_Adjusted=v__Before×(ε / ΔP_United)", but the test scan error still exceeds the limit, and analysis shows that "the prediction deviation of the parameter error model is the main reason" (based on the actual velocity, acceleration data, and error data of the test scan). Similarly, the velocity error coefficient and acceleration error coefficient also need to be updated synchronously only under specific conditions. The core judgment criterion is whether the source of the test scan error is related to the parameter errors corresponding to these two coefficients. For example, if "speed adjustment" has been performed before the test scan;
[0199] After adjusting the speed and performing a local trial scan, the actual error of the trial scan still did not meet the accuracy requirements. Through error source analysis, it was confirmed that the substandard trial scan error mainly came from the prediction deviation of the parameter error model (i.e., the correlation between speed, acceleration and error did not accurately match the actual situation).
[0200] Furthermore, step S6 specifically includes:
[0201] S601. Send the final pre-planned route data to the main control unit and control the scanning galvanometer to start scanning according to the corrected path points and speed curve;
[0202] S602. Based on the grating ruler position sensor and temperature-vibration composite sensor, real-time position data, real-time temperature, and real-time vibration acceleration are simultaneously acquired during the scanning process;
[0203] S603. Based on the initial compensation parameters and the real-time collected environmental data, obtain the real-time environmental compensation amount;
[0204] The formula for calculating the real-time environmental compensation is as follows:
[0205] ΔP_Environment_t=k_Temperature_true·(T_t-T_0)+k_Vibration_true·(a_t-a_0);
[0206] In the formula, ΔP_Environment_t is the real-time environmental compensation amount, k_Temperature_true is the updated temperature drift coefficient, and k_Vibration_true is the updated vibration error coefficient;
[0207] S604. Determine the real-time position error based on real-time position data and the corrected pre-planned path points;
[0208] The formula for calculating the real-time position error is as follows:
[0209] ΔP(t) = P(t) - P_END;
[0210] In the formula, ΔP(t) is the real-time position error, and P(t) is the real-time position data;
[0211] S605. Filter the real-time position error to eliminate sensor noise and obtain the filtered error;
[0212] Specifically, the filtered error is based on the Kalman filter algorithm, which filters the real-time position error to eliminate sensor noise and obtain the filtered error. The state equation of the Kalman filter is X=A·X+B·u+w, and the observation equation is Z=H·X+v, where X is the error state vector, A is the state transition matrix, B is the control input matrix, u is the control input vector, w is the process noise vector, Z is the observation error vector, H is the observation matrix, and v is the observation noise vector.
[0213] Understandably, the error state vector is the core variable that Kalman filtering needs to track and estimate. In combination with the requirements of laser scanning accuracy control, it is specifically defined as X=[ΔP(t),ΔṖ(t)]ᵀ (column vector), where ΔṖ(t) is the rate of change of real-time position error (ΔṖ(t)=dΔP(t) / dt), which reflects the trend of error change over time and is used to improve the filtering's ability to track dynamic changes in error. The state transition matrix (2×2 matrix) describes how the "error state at the previous moment" is transmitted to the "error state at the current moment". Based on the continuous characteristics of laser scanning error, its value is: A=[[1,Δt],[0,1]] where Δt is the sampling period of the Kalman filter (matching the sensor sampling frequency; the sampling frequency in the canvas is 16kHz, so Δt=1 / 16000s≈62.5μs); the matrix means "current error = previous moment error + previous moment error change rate × sampling period, current error change rate ≈ previous moment error change rate" (ignoring sudden changes in the error change rate in a short time). The control input matrix (2×1 matrix) associates the "external control input" with the error state. The external control input is the "real-time environmental compensation amount", so B takes the value B=[[Δt],[0]] (representing the environment). The compensation amount indirectly affects the error state by influencing the error change rate. The control input vector (scalar), i.e., the "real-time environmental compensation amount" in step S6, is a preset compensation value used to offset the error caused by environmental changes. The process noise vector (2×1 column vector, w=[w1,w2]ᵀ) represents the "system interference" that cannot be accurately modeled during the filtering process. Its sources include: mechanical micro-vibration of the laser scanning galvanometer, circuit noise, prediction deviation of the environmental compensation amount, etc. It is usually assumed that w follows a Gaussian distribution with a mean of 0 and a covariance matrix of Q. Q needs to be calibrated according to experimental data (e.g., Q=[[1e-8,0],[0,1e-10]], with a unit matching error on the order of μm², (μm / s)²). The observation vector (scalar, simplified due to the single observation target) is essentially "real-time observation data containing sensor noise", corresponding to the real-time position error ΔP in step S6. t- real(t), i.e., Z = ΔP t- real(t) = P t- act(t)-P t- plan1 (P) t- act(t) is the actual scanning position acquired by the grating ruler, P t- Plan 1 is the corrected pre-planned position. Z is the "raw input data" for filtering, which includes the actual error plus sensor noise (such as measurement noise from the grating ruler and circuit interference noise), and is also the basis for subsequent comparison and correction with the "state prediction value".
[0214] The observation matrix (a 1×2 matrix, since the state vector X is 2-dimensional and the observation vector Z is a scalar) serves to "establish a mapping relationship between the error state vector X and the observation vector Z," and its value is H=[1,0] based on the scenario. State vector X=[ΔP t- real(t),ΔṖ t (t)]ᵀ(ΔP t- real(t) is the real-time position error, ΔṖ t (t) is the rate of change of error, and the observation vector Z only corresponds to the "real-time position error" in X. Therefore, the role of H is to "extract the position error term from the state vector and ignore the rate of change of error term", that is, H・X=1×ΔP t- real(t) + 0 × ΔṖ t (t)=ΔP t- real(t) exactly matches the physical meaning of Z. The error state vector (2×1 column vector) is completely consistent with X in the state equation, specifically X=[ΔP t- real(t),ΔṖ t (t)]ᵀ:The first element ΔP t- real(t): Real-time position error in step S6 (the core observation object); the second element ΔṖ t (t): Rate of change of real-time position error (dΔP) t- The `real(t) / dt` vector is used to improve the filtering's ability to track dynamic changes in error. The observation noise vector (scalar) represents "unavoidable random noise during observation," originating from: inherent measurement noise of the grating ruler (determined by sensor accuracy, such as quantization errors caused by grating ruler resolution); measurement deviations caused by environmental interference (such as the slight impact of vibration on grating ruler signal acquisition); and noise in circuit signal transmission (such as errors in analog-to-digital conversion). In engineering, it is usually assumed that `v` follows a Gaussian distribution with a mean of 0 and a covariance of R, where R is the observation noise covariance (which needs to be calibrated through static experiments, such as collecting multiple sets of grating ruler data while the scanning system is stationary, and calculating the variance of the measured values as the initial value of R).
[0215] S606. Determine the total compensation amount based on the filtered error and the real-time environmental compensation amount;
[0216] The formula for calculating the total compensation amount is as follows:
[0217] ΔP(t)_Total=K_p·ΔP(t)_F+K_j·∫ΔP(τ)dτ+K_d·dΔP(t)_F / dt+ΔP_Environment_t;
[0218] In the formula, K_p is the proportional coefficient, K_j is the integral coefficient, K_d is the differential coefficient, ΔP(t)_F is the filtered error, ∫ΔP(τ)dτ is the integral term of the filtered error, and dΔP(t)_F / dt is the differential term of the filtered error.
[0219] Specifically, ΔP(t)_Total is the total compensation amount, which is the final error correction amount that needs to be sent to the scanning galvanometer drive module. It is used to comprehensively offset the "filtered position error" and the "error caused by environmental changes." Its core function is to calibrate the actual scanning position to the corrected pre-planned path, and it is the core output parameter for real-time compensation. The proportional coefficient is the core coefficient in PID control that responds to the "current error." It reflects the adjustment strength of the "current filtered error." The larger the value, the faster the correction speed of the current error (but too large a value will cause system oscillation). K_p∈[0.1,10]. The filtered error, that is, the error obtained after Kalman filtering, is the accurate position error after eliminating the noise of the grating ruler sensor. It comes from the real-time position error after Kalman filtering and reflects the true deviation between the current scanning position and the pre-planned position (excluding noise interference). The integral coefficient is the core coefficient in PID control for eliminating steady-state error (a persistent, small error). By accumulating the filtered error over a period of time, it compensates for fixed deviations in the system that cannot be eliminated by the proportional term (such as constant displacement deviations caused by mechanical friction). Its value must balance steady-state error elimination capability with system stability (K_j∈[0.01,1]). The core function of the integral term of the filtered error is to accumulate all filtered errors from the start of the scan to the current moment, quantifying the "long-term accumulated error" and providing the target for the integral coefficient K_j. The derivative coefficient is the core coefficient in PID control for "predicting the trend of error changes." It is used to suppress system overshoot (avoiding excessive compensation that causes position fluctuations). By calculating the rate of change of the filtered error, the compensation intensity is adjusted in advance. The larger the value, the more sensitive the response to error changes (e.g., K_d∈[0.05,5]). The core function of the differential term of the filtered error is to calculate the "rate of change of the filtered error at the current moment", reflecting the speed and direction of the error's increase or decrease (e.g., if the derivative is positive, the error is increasing; if the derivative is negative, the error is decreasing), providing a basis for prediction of the differential coefficient K_d.
[0220] S607. Convert the total compensation amount into the driving voltage correction amount of the scanning galvanometer, send it to the galvanometer driving module to complete real-time compensation, and obtain the real-time position data after compensation;
[0221] The formula for calculating the driving voltage correction is as follows:
[0222] ΔU = ΔP(t)_Total / k_Sensi;
[0223] S608. Based on the compensated real-time position data, determine the residual error ΔP(t)_Remains=P(t)_U-P_END, where P(t)_U is the compensated real-time actual position data, that is, the actual position reached by the scanning galvanometer after receiving the drive voltage correction amount ΔU, which is collected in real time by the grating ruler position sensor (sampling frequency 16kHz), and is the actual feedback data of the compensation effect. P_END is the corrected pre-planned path point coordinates, that is, the path point coordinates in the final pre-planned route determined in step S5, which is the target position that the scanning needs to reach accurately, and serves as the benchmark for calculating the residual error.
[0224] If the residual error is greater than the accuracy requirement, the PID control parameters are dynamically adjusted to make the residual error converge quickly.
[0225] If the residual error is less than or equal to the accuracy requirement, then the compensation is effective.
[0226] Specifically, residual error refers to the scanning position deviation that still exists "after real-time compensation." It is a core indicator for evaluating the compensation effect and is used to determine whether the current PID control parameters can meet the accuracy requirements. The specific calculation of residual error first requires extracting the target path point coordinates P from the corrected pre-planned route for each sampling time t. t- Plan 1, then determine the residual error vector at that moment: ΔP(t) = (x ant- comp(t)-x t- plan1,y ant- comp(t)-y t- plan1), where x and y are the X and Y coordinates respectively, x ant -comp(t) represents the real-time X-axis coordinate of the compensated actual position, i.e., the X-axis data of the actual position reached after the scanning galvanometer receives the drive voltage correction ΔU. This data is collected in real-time by the grating ruler position sensor at a sampling frequency of 16kHz and is the actual feedback data of the compensation effect. ant -comp(t) represents the compensated real-time position's Y-axis coordinate, and is related to the x-axis coordinate. ant -comp(t) synchronously acquires Y-axis data corresponding to the actual arrival position, which together constitute the complete real-time position after compensation. Finally, the magnitude of the error vector is taken as the final residual error (quantization deviation): ΔP(t) = √[(x ant- comp(t)-x t- plan1)²+(y ant- comp(t)-y t- plan1)²).
[0227] Understandably, the principle of dynamically adjusting PID control parameters is based on the "magnitude" and "trend" of the residual error, employing an "incremental parameter adjustment strategy" (to avoid sudden parameter changes causing galvanometer jitter). The core is to quickly reduce the residual error by adjusting the proportional coefficient, integral coefficient, and derivative coefficient. For example, adjusting the proportional coefficient K_p: if ΔP(t) is large (e.g., ΔP(t) ≥ 2ε, where ε is the accuracy requirement), appropriately increase K_p. p (Enhance the speed of proportional adjustment, for example, K_p_new=K_p_old×1.2); If ΔP(t) is close to ε but fluctuates greatly, slightly decrease K_p (to avoid overshoot, for example, K_p_new=K_p_old×0.9). Adjust the integral coefficient Kᵢ: If the residual error persists (e.g., ΔP(t)>ε for 5 consecutive sampling periods), it indicates a steady-state error. Increase K_j (to enhance the integral accumulation effect and eliminate steady-state error, for example, K_j_new=K_j_old×1.1); If error oscillation occurs, decrease K_j (to suppress integral saturation, for example, K_j_new=K_j_old×0.8). However, it should be noted that the adjusted PID parameters must be within the preset safety range (e.g., K_p∈[0.1,10], K_j∈[0.01,1], K_d∈[0.05,5]) to prevent the parameters from being too large and causing system instability.
[0228] S609. After the scanning task is completed, record the full execution data, compensation parameters and error data of the corrected route, and add them to the scanned route database;
[0229] S610. By using the error data from this scan in the scanned route database, update the coefficients of the spatiotemporal joint error correction model, optimize the correction accuracy of subsequent scans, and complete the closed-loop optimization.
[0230] It is understandable that the initial (first) scan position error mean is based on the S106 inherent error benchmark, μ1=3.2μm, variance σ1=0.5μm; then the model coefficient update effect after the Nth scan (taking N=10 as an example), μ 10 =0.8μm (variance σ) 10 =0.1μm), the mean error is reduced by 75% compared to the initial value, and the mean error tends to stabilize as the number of scans increases. After ≥8 scans, μ≤1.0μm, which meets the requirements of high-precision scanning.
[0231] Furthermore, a low-drift laser scanning control system based on dynamic error compensation is proposed to achieve the control method described above, including:
[0232] The system initialization and calibration module is used to build the laser scanning control system and complete the initialization and static calibration, and establish the system's basic control model and error benchmark.
[0233] The data acquisition and storage module is used to collect multi-source data from multiple scanned routes and store them in a structured manner to form a scanned route database.
[0234] The error modeling module is used to obtain the spatial boundary, accuracy requirements and environmental parameters of the area to be scanned, select key scanned routes from the scanned route database, preprocess the key scanned route data and extract error features, and construct a spatiotemporal joint error correction model.
[0235] The route planning and correction module is used to generate an initial pre-planned route for the area to be scanned, and to perform multi-dimensional dynamic correction of the initial pre-planned route based on a spatiotemporal joint error correction model.
[0236] The real-time compensation and closed-loop optimization module is used to execute the corrected scanning route, synchronously collect real-time status data and environmental data during the scanning process, and combine dynamic error compensation algorithm to realize real-time compensation and closed-loop optimization to complete low-drift laser scanning.
[0237] Furthermore, the error modeling module includes:
[0238] The critical route filtering unit is used to obtain the spatial boundary, accuracy requirements and environmental parameters of the area to be scanned, and to filter out the critical scanned routes from the scanned route database.
[0239] The data preprocessing unit is used to preprocess the key scanned route data;
[0240] The error feature extraction unit is used to extract error features from the preprocessed key scanned route data.
[0241] The error model construction unit is used to construct a spatiotemporal joint error correction model based on the extracted error features.
[0242] Furthermore, the route planning and correction module includes:
[0243] The initial route generation unit is used to generate an initial pre-planned route for the area to be scanned.
[0244] The error prediction unit is used to predict the error for each path point of the initial pre-planned route in the area to be scanned, based on the spatiotemporal joint error correction model.
[0245] The dynamic correction unit is used to perform multi-dimensional dynamic correction of the initial pre-planned route based on the error prediction results.
[0246] The correction and verification unit is used to verify the accuracy of the dynamically corrected pre-planned route to ensure that the accuracy requirements of the scanning task are met.
[0247] The advantages of this invention are as follows: It constructs a full-process optimization system of "multi-dimensional error modeling - precise route correction - real-time closed-loop compensation," effectively solving the pain points of insufficient error prediction, unstable correction, and poor adaptability in existing technologies. First, the system features a rigorous modular design, with the five major modules and key modules working synergistically. Through multi-source data structured storage and key route screening, it provides high-quality data support for error modeling. Furthermore, the spatiotemporal joint error correction model integrates multi-dimensional features such as spatiotemporal drift, spatial distribution, environmental correlation, and parameter correlation, significantly improving the accuracy of error prediction. Second, the route correction stage introduces a local trial scan verification mechanism, combined with reverse correction and velocity acceleration optimization, to ensure that the pre-planned route meets accuracy requirements and avoids scanning deviations caused by blind execution. Finally, real-time compensation and closed-loop optimization work in deep synergy. Through Kalman filtering for noise reduction, PID dynamic adjustment, and environmental compensation, it effectively suppresses the effects of temperature drift and vibration interference. Data retrieval and model coefficient updates after scanning enable continuous optimization of subsequent scanning accuracy, ensuring low-drift, high-precision scanning results and adapting to the stringent requirements of high-end fields such as precision manufacturing.
[0248] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A low-drift laser scanning control method based on dynamic error compensation, characterized in that, include: S1. Build a laser scanning control system and complete initialization and static calibration, and establish the system's basic control model and error benchmark; S2. Collect multiple sets of multi-source data of scanned routes and store them in a structured manner to form a scanned route database; S3. Obtain the spatial boundary, accuracy requirements and environmental parameters of the area to be scanned, and filter out key scanned routes from the scanned route database; S4. Preprocess and extract error features from key scanned route data, and construct a spatiotemporal joint error correction model; S5. Generate an initial pre-planned route for the area to be scanned, and perform multi-dimensional dynamic correction of the initial pre-planned route based on the spatiotemporal joint error correction model; S6. Execute the corrected scanning route, synchronously collect real-time status data and environmental data during the scanning process, and combine the dynamic error compensation algorithm to achieve real-time compensation and closed-loop optimization to complete low-drift laser scanning; Specifically, step S3 includes: S301. Obtain the design drawing of the area to be scanned, determine the spatial boundary coordinates of the area to be scanned, and further obtain the center coordinates and side length of the minimum bounding rectangle of the spatial boundary coordinates of the area to be scanned; S302. Based on the spatial index of the scanned route database, query the scanned routes whose distance from the actual execution path to the boundary of the area to be scanned is less than or equal to the minimum boundary threshold, and form a set of candidate adjacent routes; S303. Obtain valid adjacent routes from the candidate adjacent route set whose deviation between the actual executed path and the pre-planned path is less than or equal to twice the minimum boundary threshold; S304. Determine the key area labels from the design drawings of the area to be scanned, query the scanned route database containing the scanned routes with the labels, further determine the fitting error within the key area, and filter the key area routes with fitting errors greater than or equal to the minimum boundary threshold. The formula for calculating the fitting error within the key region is as follows: In the formula, This represents the total number of waypoints within the critical area. , For the first The actual scan coordinates of each path point , For the first Fitted coordinates of each path point; S305. Obtain the current ambient temperature and vibration acceleration of the area to be scanned, query the scanned route database for environmental parameters that meet the preset constraint boundaries, and further divide them into at least 3 environmental categories. Select one route with the most representative error for each category to form a set of environmental difference routes. S306. Based on the timestamps of the scanned routes, the routes in the database are divided into three groups according to the scanning time: morning, afternoon, and evening. At least two valid routes are selected from each group to form a set of time difference routes. S307. Integrate effective adjacent routes, key area routes, environmental difference routes, and time difference routes, and after further removing duplicate routes, retain at least 3 routes as key scanned candidate routes; S308. Based on the image data from multiple sources of scanned routes, perform defect detection on the scanned images corresponding to the key scanned candidate routes, eliminate invalid routes with missed scans, duplicate scans, or spot distortion, and finally determine the key scanned routes.
2. The low-drift laser scanning control method based on dynamic error compensation according to claim 1, characterized in that, Step S1 specifically includes: S101. Obtain the accuracy requirements and scanning range of the laser scanning task, and determine the hardware parameters of the laser emitting module, dual-axis scanning galvanometer, grating ruler position sensor, temperature-vibration composite sensor, and main control unit; S102. Based on the aforementioned hardware parameters, construct a laser scanning control system comprising a laser emission link, a scanning execution link, a feedback detection link, and a main control link; S103. Determine the system's preset communication protocol standard, further obtain the communication interface parameters of each module, and complete the communication initialization between the main control unit and each hardware module; S104. Based on the scanning task requirements, obtain the basic parameters of the target scanning range, scanning frequency, and spot diameter, and send them to the main control unit to complete the scanning parameter initialization. S105. Using a standard crosshair target, control the scanning galvanometer to drive the laser beam to complete a static scan of N calibration points on the target, obtain the driving voltage U_i of each calibration point and the actual displacement S_Driver detected by the grating ruler, and further determine the mapping relationship between the galvanometer driving voltage and the displacement S_Driver=k_Sensi·U_i+b, where k_Sensi is the sensitivity coefficient and b is the zero bias voltage; S106. Establish a basic control model based on the mapping relationship between the galvanometer driving voltage and displacement. Through the basic control model, obtain the theoretical displacement S_Theory of each calibration point, determine the inherent error ΔS=|S_Theory-S_Driver| of each point, and after eliminating abnormal error values through the 3σ criterion, obtain the mean μ and variance σ of the inherent error and establish a system inherent error benchmark table. S107. Using the initial ambient temperature T collected by the temperature sensor, control the scanning system to complete multiple sets of static scans within the range of T±5℃, obtain displacement deviation data at different temperatures, and further obtain the temperature drift coefficient k_Temperature=ΔS / ΔT, where ΔT is the temperature change of the scanning environment, and establish a basic model of temperature drift. S108. Using the ambient background vibration acceleration a collected by the vibration sensor, combined with the mechanical resonant frequency f of the scanning galvanometer, obtain the vibration interference threshold a_Threshold=0.1×(2πf)²×D, where D is the diameter of the laser scanning spot, and complete the static calibration and error benchmark establishment.
3. The low-drift laser scanning control method based on dynamic error compensation according to claim 1, characterized in that, Step S2 specifically includes: S201. Based on the basic control model, obtain the pre-planned path point coordinate sequence and scanning speed curve for each scanned route, and store them as control layer data in a temporary cache; S202. Based on the real-time feedback during the scanning process, obtain the real-time angle of the scanning galvanometer, the real-time position data of the motor encoder, and the adjustment amount of the piezoelectric ceramic, and use them as execution layer data to synchronize with the control layer data using timestamps to obtain the initial synchronization data set; S203. Acquire the real-time position measurement data of the grating ruler, the scan area image data acquired by the camera, and the laser power monitoring data, and bind them as detection layer data with the initial synchronization data set; S204. Acquire real-time temperature, vibration acceleration, and humidity during the scanning process, and supplement them as environmental data to the initial synchronization data set; S205. Based on the initial synchronized data set, the control layer data, execution layer data, detection layer data, and environmental data of a single scanned route are integrated into a structured data unit using the unique path ID generated by the system. The data unit format includes path ID, scan timestamp, pre-planned path, actual execution path, scan parameters, environmental parameters, and image data path. S206. Establish a database of scanned routes, store all structured data units in the database in chronological order of scanning time, and establish spatial indexes and environmental parameter indexes to support fast queries by path ID, scanned area, and environmental parameters.
4. The low-drift laser scanning control method based on dynamic error compensation according to claim 1, characterized in that, Step S4 specifically includes: S401. Based on the key scanned routes, obtain the pre-planned path and the actual execution path for each route, and determine the error vector for each path point; S402. Use the 3σ criterion to remove outliers from the error vector of each path point to obtain the cleaned error dataset; S403. Smooth the cleaned error dataset to obtain trend error data; S404. Obtain the timestamp and scan length of the key scanned route, extract the spatiotemporal drift trend features, and obtain the drift trend model ΔP_Drift=k_Time·t+k_Length·L+b, where ΔP_Drift is the drift trend error compensation amount, k_Time is the time drift coefficient, k_Length is the length drift coefficient, t is the timestamp of the key scanned route, L is the scan length of the key scanned route, and b is the drift constant term; S405. Obtain the spatial boundary of the area to be scanned, map the error data of the key scanned routes to a unified global coordinate system, generate an error distribution heatmap of the scanned area, extract the spatial error distribution features, and obtain the spatial error function ΔP(x,y). S406. Obtain environmental and error data corresponding to the key scanned routes, and further extract environmental-error correlation features to obtain an environmental error model; The environmental error model is as follows: ΔP_Environment=k_Temperature·(T_t-T_0)+k_Vibration·(a_t-a_0); In the formula, ΔP_Environment is the environmental error compensation amount, k_Temperature is the temperature drift coefficient, k_Vibration is the vibration error coefficient, T_0 and a_0 are the initial environmental temperature and initial vibration acceleration, T_t is the real-time environmental temperature at time t, and a_t is the real-time vibration acceleration at time t. S407. Based on the velocity and acceleration in the scanning parameters, extract the parameter-error correlation features to obtain the parameter error model; The expression formula for the parameter error model is as follows: ΔP_Parameter=k_Speed·v_Scan_t+k_Acceleration·a_Scan_t; In the formula, ΔP_Parameter is the parameter error compensation amount, k_Speed is the velocity error coefficient, k_Acceleration is the acceleration error coefficient, v_Scan_t is the real-time scanning speed in the scanning parameters, and a_Scan_t is the real-time scanning acceleration in the scanning parameters; S408. Based on the spatiotemporal drift trend characteristics, spatial error distribution characteristics, environment-error correlation characteristics, and parameter-error correlation characteristics, a spatiotemporal joint error correction model is constructed. The model inputs are the coordinates of the path points to be scanned, the scanning time, the scanning length, the environmental parameters, and the scanning parameters. The output is the total error prediction value. The spatiotemporal joint error correction model is expressed as follows: ΔP_United=ΔP_Drift+ΔP(x,y)+ΔP_Environment+ΔP_Parameter; In the formula, ΔP_United is the predicted error value.
5. The low-drift laser scanning control method based on dynamic error compensation according to claim 1, characterized in that, Step S5 specifically includes: S501. Based on the spatial boundary and accuracy requirements of the area to be scanned, obtain the scanning path spacing and generate an initial pre-planned path point sequence using the raster scanning mode; S502. Based on the efficiency requirements of the scanning task, obtain the maximum allowable scanning speed, generate an initial scanning speed curve, and ensure that the acceleration is less than or equal to the preset acceleration threshold; S503. Based on the spatiotemporal joint error correction model, input the initial pre-planned path point coordinates, initial scan parameters, and current environmental parameters into the spatiotemporal joint error correction model to obtain the error prediction value ΔP_United for each path point; S504. Based on the error prediction value ΔP_United, the initial pre-planned path points are reversed to obtain the coordinates of the corrected path points; The formula for calculating the corrected path point coordinates is as follows: P_Revised(x,y)=P_Before(x,y)-ΔP_United; In the formula, P_Revised(x,y) represents the corrected path point coordinates, and P_Before(x,y) represents the initial pre-planned path point coordinates; S505. Smooth the corrected path point sequence to ensure the continuity of the first derivative of the path and avoid mechanical shock; S506. Based on the parameter-error correlation feature, determine whether the prediction error is greater than the accuracy requirement. If so, adjust the scanning speed of the corresponding path segment v_Adjusted=v__Before×(ε / ΔP_United), where ε is the accuracy requirement threshold. S507. Based on the environmental error model, obtain the initial compensation parameters under the current environment, including the temperature drift coefficient k_Temperature and the vibration error coefficient k_Vibration, and store them as the initial values for real-time compensation in the correction parameter set. S508. Based on the corrected path point sequence, scanning speed curve and initial compensation parameters, select at least 3 verification points in the edge region of the area to be scanned for local trial scanning to obtain the actual error of the trial scanning; If the actual error of the trial scan is less than or equal to the accuracy requirement, the corrected route will be used as the final pre-planned route. If the actual error of the trial scan is greater than the accuracy requirement, the coefficients of the spatiotemporal joint error correction model are updated, and the correction process is repeated until the accuracy requirement is met.
6. The low-drift laser scanning control method based on dynamic error compensation according to claim 1, characterized in that, Step S6 specifically includes: S601. Send the final pre-planned route data to the main control unit and control the scanning galvanometer to start scanning according to the corrected path points and speed curve; S602. Based on the grating ruler position sensor and temperature-vibration composite sensor, real-time position data, real-time temperature, and real-time vibration acceleration are simultaneously acquired during the scanning process; S603. Based on the initial compensation parameters and the real-time collected environmental data, obtain the real-time environmental compensation amount; The formula for calculating the real-time environmental compensation amount is as follows: ΔP_Environment_t=k_Temperature_true·(T_t-T_0)+k_Vibration_true·(a_t-a_0); In the formula, ΔP_Environment_t is the real-time environmental compensation amount, k_Temperature_true is the updated temperature drift coefficient, and k_Vibration_true is the updated vibration error coefficient; S604. Determine the real-time position error based on real-time position data and the corrected pre-planned path points; The formula for calculating the real-time position error is as follows: ΔP(t) = P(t) - P_END; In the formula, ΔP(t) is the real-time position error, P(t) is the real-time position data, and P_END is the corrected coordinates of the pre-planned path point; S605. Filter the real-time position error to eliminate sensor noise and obtain the filtered error; S606. Determine the total compensation amount based on the filtered error and the real-time environmental compensation amount; The formula for calculating the total compensation amount is as follows: ΔP(t)_Total=K_p·ΔP(t)_F+K_j·∫ΔP(τ)dτ+K_d·dΔP(t)_F / dt+ΔP_Environment_t; In the formula, K_p is the proportional coefficient, K_j is the integral coefficient, K_d is the differential coefficient, ΔP(t)_F is the filtered error, ∫ΔP(τ)dτ is the integral term of the filtered error, and dΔP(t)_F / dt is the differential term of the filtered error. S607. Convert the total compensation amount into the driving voltage correction amount of the scanning galvanometer, send it to the galvanometer driving module to complete real-time compensation, and obtain the real-time position data after compensation; The formula for calculating the driving voltage correction is as follows: ΔU = ΔP(t)_Total / k_Sensi; In the formula, k_Sensi is the sensitivity coefficient; S608. Based on the compensated real-time position data, determine the residual error ΔP(t)_Remains=P(t)_U-P_END; In the formula, P(t)_U is the compensated real-time actual location data; If the residual error is greater than the accuracy requirement, the PID control parameters are dynamically adjusted to make the residual error converge quickly. S609. After the scanning task is completed, record the full execution data, compensation parameters and error data of the corrected route, and add them to the scanned route database; S610. By using the error data from this scan in the scanned route database, update the coefficients of the spatiotemporal joint error correction model, optimize the correction accuracy of subsequent scans, and complete the closed-loop optimization.
7. A low-drift laser scanning control system based on dynamic error compensation, used to implement the control method as described in any one of claims 1-6, characterized in that, include: The system initialization and calibration module is used to build the laser scanning control system and complete the initialization and static calibration, and establish the system's basic control model and error benchmark. The data acquisition and storage module is used to acquire multiple sets of multi-source data of the scanned routes and store them in a structured manner to form a scanned route database. The error modeling module is used to obtain the spatial boundary, accuracy requirements and environmental parameters of the area to be scanned, select key scanned routes from the scanned route database, preprocess the key scanned route data and extract error features, and construct a spatiotemporal joint error correction model. The error modeling module includes: The critical route filtering unit is used to obtain the spatial boundary, accuracy requirements and environmental parameters of the area to be scanned, and to filter out the critical scanned routes from the scanned route database. The route planning and correction module is used to generate an initial pre-planned route for the area to be scanned, and to perform multi-dimensional dynamic correction of the initial pre-planned route based on a spatiotemporal joint error correction model. The real-time compensation and closed-loop optimization module is used to execute the corrected scanning route, synchronously collect real-time status data and environmental data during the scanning process, and combine dynamic error compensation algorithm to realize real-time compensation and closed-loop optimization to complete low-drift laser scanning.
8. A low-drift laser scanning control system based on dynamic error compensation according to claim 7, characterized in that, The error modeling module includes: A data preprocessing unit is used to preprocess key scanned route data; An error feature extraction unit is used to extract error features from the preprocessed key scanned route data. An error model construction unit is used to construct a spatiotemporal joint error correction model based on the extracted error features.
9. A low-drift laser scanning control system based on dynamic error compensation according to claim 7, characterized in that, The route planning and correction module includes: An initial route generation unit is used to generate an initial pre-planned route for the area to be scanned. An error prediction unit is used to predict the error for each path point of the initial pre-planned route in the area to be scanned based on a spatiotemporal joint error correction model. A dynamic correction unit is used to perform multi-dimensional dynamic correction of the initial pre-planned route based on the error prediction results. The correction and verification unit is used to verify the accuracy of the dynamically corrected pre-planned route to ensure that the accuracy requirements of the scanning task are met.
Citation Information
Patent Citations
Online automatic measurement and compensation method for digital manufacturing
CN119828591A