Adaptive adjustment method of galvanometer scanning speed

By dynamically adjusting the scanning speed and angle of the galvanometer scanning system, the problem of the contradiction between accuracy and efficiency in the dynamic environment of the galvanometer scanning system is solved, and a more efficient and accurate laser scanning effect is achieved.

CN119758744AActive Publication Date: 2025-04-04SHENZHEN ZHIDING AUTOMATION TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The galvanometer scanning system has a contradiction between accuracy and efficiency caused by distance changes in dynamic working environments. The existing technology is difficult to meet the requirements of real-time and accuracy, and the accuracy of laser scanning is not high.

Method used

By obtaining target distance data, the optimal scanning speed is determined using the preset distance-speed correspondence table and the interpolation algorithm, the scanning speed and angle are dynamically adjusted in combination with the trajectory prediction model and the deviation compensation algorithm, and the scanning accuracy and efficiency are optimized in real time.

Benefits of technology

It realizes real-time adjustment of scanning speed and angle in dynamic distance scenarios, improves the accuracy and efficiency of laser scanning, and ensures the optimal working state of the system under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119758744A_ABST
    Figure CN119758744A_ABST
Patent Text Reader

Abstract

The present invention discloses a method for adaptively adjusting the scanning speed of a galvanometer, the method comprising obtaining target distance data, determining the optimal scanning speed by combining an interpolation algorithm with a preset distance-speed table; calculating the estimated value of the trajectory deviation by using a trajectory prediction model based on the scanning speed and distance data; triggering a deviation compensation algorithm to generate a correction signal if the estimated threshold is exceeded, adjusting the scanning angle to obtain the deviation value, and dynamically generating a second scanning speed by a speed optimization model; transmitting the optimized speed and the correction signal to the galvanometer system for real-time adjustment according to a protocol; continuously collecting distance data at a target sampling frequency, extracting a stable change trend through filtering, and updating the cache and restarting the adjustment cycle if the change trend exceeds the change threshold; synchronously analyzing the real-time trajectory deviation, speed accuracy and error data in each cycle, iteratively optimizing the prediction model and adjusting the model parameters, and improving the dynamic response accuracy of the system. The method has the following effects: it can effectively improve the accuracy and efficiency of laser scanning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of automatic control, and in particular to a method for adaptively adjusting the scanning speed of a galvanometer. Background Art

[0002] At present, the galvanometer scanning system faces the contradiction between accuracy and efficiency caused by distance changes in dynamic working environments. When the distance between the measurement target and the galvanometer changes in real time, the scanning speed needs to be reduced in long-distance scenes to ensure the marking accuracy, but efficiency is sacrificed; although the speed can be increased in close-range scenes, the quality may be affected by trajectory deviation or insufficient accuracy.

[0003] In one prior art, existing galvanometer control technology usually adopts a fixed speed strategy or a static adjustment method based on preset distance parameters. For example, by calibrating the optimal speed curve at a specific distance, or relying on offline parameter configuration to achieve limited matching of speed and angle. Some systems will introduce distance sensor feedback, but the adjustment logic is mostly linear mapping or simple segmented control, and the generation of correction signals is mostly based on empirical formulas.

[0004] The existing technology has the problem of difficulty in meeting the real-time and accuracy requirements in dynamic distance scenarios, and the accuracy of laser scanning is not high. Summary of the invention

[0005] The present invention provides a method for adaptively adjusting the scanning speed of a galvanometer mirror to solve the problem that the real-time and accuracy requirements in dynamic distance scenarios cannot be met and the accuracy of laser scanning is not high.

[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a method for adaptively adjusting the scanning speed of a galvanometer, comprising: Get target distance data; Determine the best scanning speed within the scanning distance range by using an interpolation algorithm according to the target distance data through a preset distance-speed correspondence table; Based on the scanning speed and the target distance data, combined with preset scanning speed accuracy and error parameters, an estimated value of the trajectory deviation is calculated using a trajectory prediction model; If the estimated value exceeds a preset estimated threshold, a correction signal is generated according to a deviation compensation algorithm, and a trajectory deviation value is determined by adjusting the scanning angle; Calculating a dynamically adjusted second scanning speed using a speed optimization model according to the trajectory deviation value and the estimated value; Sending the second scanning speed and the correction signal to the galvanometer control system according to a transmission protocol to trigger real-time adjustment; During the operation of the system, the target distance data is continuously collected at a target sampling frequency, and a stable distance change trend is extracted through a filtering algorithm; If the distance change trend exceeds a preset change threshold, the cache data is updated and a new round of adjustment cycle is started; In each cycle, the trajectory deviation value, scanning speed accuracy and error parameters are analyzed synchronously and correlated, and the prediction model and speed regulation model are iteratively optimized to improve the dynamic regulation performance.

[0007] In an optional implementation, determining the optimal scanning speed within the scanning distance range by using an interpolation algorithm through a preset distance-speed correspondence table according to the target distance data includes: Initializing the parameters of the interpolation algorithm and setting the initial scanning speed to the first scanning speed characteristic; Iterate according to the interpolation algorithm parameters, obtain a second scanning speed characteristic after the iteration is completed, and record the current iteration number; Determine whether the second scanning speed characteristic meets a preset condition and is better than the first scanning speed characteristic, if so, update the second scanning speed characteristic to the first scanning speed characteristic; if not, discard the second scanning speed characteristic; Continue to iterate based on the adjusted interpolation parameter, and when the number of iterations is greater than or equal to the preset number of iterations, output the current first scanning speed feature as the optimal scanning speed.

[0008] In an optional implementation, the calculating of the estimated value of the trajectory deviation using a trajectory prediction model based on the scanning speed and the target distance data in combination with a preset scanning speed accuracy and an error parameter includes: inputting the scanning speed and the target distance data into a trajectory prediction model; Calculating an estimated value of trajectory deviation according to the trajectory prediction model; The training process of the trajectory prediction model: Obtain historical trajectory data, including three-dimensional spatial coordinate sequence, timestamp information and associated scanning speed-accuracy parameter group; Performing spatiotemporal feature extraction and error compensation processing on the historical trajectory data, constructing a spatiotemporal feature tensor including speed accuracy weights, and generating a standardized trajectory sequence through a dynamic time warping algorithm; The standardized trajectory sequence and the scanning error parameter matrix are coupled as input data, an initial trajectory prediction model is constructed based on a temporal convolutional network, and the initial trajectory prediction model is trained in two stages according to the spatiotemporal feature tensor and the actual trajectory coordinates to obtain the trajectory prediction model.

[0009] In an optional implementation, if the estimated value exceeds a preset estimated threshold, a correction signal is generated according to a deviation compensation algorithm, and a trajectory deviation value is determined by adjusting a scanning angle, including: If the estimated value exceeds a preset estimation threshold, generating a deviation compensation correction signal; Adjust the scanning angle according to the correction signal to obtain a new scanning angle value; Calculating a compensation value of the trajectory deviation according to the scanning angle value; Secondarily adjusting the scanning angle according to the compensation value to obtain a final scanning angle value; Determining a correction value of the trajectory deviation according to the final scanning angle value; The scanning angle is finally adjusted according to the correction value, thereby determining the trajectory deviation value.

[0010] In an optional implementation, the calculating the dynamically adjusted second scanning speed using a speed optimization model according to the trajectory deviation value and the estimated value includes: Inputting the trajectory deviation value into a speed optimization model to determine a dynamic speed adjustment amount; Inputting the dynamic speed adjustment amount into a speed control system to generate a target scanning speed value; The target scanning speed value is processed by using a speed smoothing algorithm to obtain a final scanning speed adjustment value; Applying the final scanning speed adjustment value to the scanning device to complete the dynamic speed adjustment, collecting the adjusted scanning trajectory data in real time, and calculating the actual trajectory accuracy value using the trajectory accuracy algorithm; If the actual trajectory accuracy value meets the preset accuracy threshold, maintaining the current second scanning speed; If the actual trajectory accuracy value does not meet the preset accuracy threshold, recalculate the trajectory deviation value; The training process of the speed optimization model: Acquire historical trajectory data of the motion control system, including actual trajectory coordinate sequence, theoretical trajectory coordinate sequence, scanning speed parameter set and time-position synchronization information of sensor feedback; Calculating the real-time deviation between the actual trajectory and the theoretical trajectory according to the historical trajectory data, and extracting the scanning speed time series characteristics to generate deviation-speed data; Performing time domain alignment and Z-score normalization on the deviation-velocity data through a sliding window to generate a dynamic coupling feature matrix; The dynamic coupling feature matrix is ​​used as input, an initial speed optimization model is constructed based on a gradient boosting decision tree algorithm, and the initial speed optimization model is trained according to a trajectory deviation attenuation coefficient and a speed optimization objective function to obtain a speed optimization model.

[0011] In an optional implementation, sending the second scanning speed and the correction signal to a galvanometer control system according to a transmission protocol to trigger real-time adjustment includes: Obtain real-time position feedback data and distance data transmission protocol of the galvanometer control system; Calculate correction amount parameters according to the real-time position feedback data and in combination with the correction signal generation algorithm; encapsulating the second scanning speed and the correction signal parameter according to the distance data transmission protocol to generate a transmission data packet; The galvanometer control system receives the transmission data packet, and parses and extracts the second scanning speed and the correction signal parameter; According to the second scanning speed and the correction signal parameters, the instructions of the galvanometer control system are updated to achieve real-time adjustment operations.

[0012] In an optional implementation, during the operation of the system, continuously collecting the target distance data at a target sampling frequency, and extracting a stable distance change trend through a filtering algorithm, includes: According to the target distance data, a filtering algorithm is used to remove noise interference to obtain denoised distance data; According to the denoised distance data, a steady-state detection algorithm is executed to generate a steady-state determination result: If the steady state determination result is not up to standard, the filtering algorithm parameters are adjusted and the target distance data is reprocessed; If the stable state judgment result is up to standard, the data change characteristics are extracted to generate a stable distance change trend.

[0013] In an optional implementation, if the distance change trend exceeds a preset change threshold, updating the cache data and starting a new round of adjustment cycle includes: According to the distance change trend, extract the change trend to generate a trend line; According to the trend line, a target distance change rate parameter is calculated and a threshold comparison operation is performed; If the target distance change rate exceeds a preset change threshold, the galvanometer control parameters are adjusted to write new target distance data into a buffer; According to the new target distance data, the dynamic adjustment parameters of the second scanning speed are determined, and the trigger ring starts a new round of adjustment cycle.

[0014] In an optional embodiment, the synchronously associating and analyzing the trajectory deviation value, the scanning speed accuracy and the error parameter in each cycle, iteratively optimizing the prediction model and the speed regulation model, and improving the dynamic regulation performance include: Obtain real-time trajectory deviation value, scanning speed accuracy and error parameters; Performing data preprocessing according to the real-time trajectory deviation value, the scanning speed accuracy and the error parameter to generate a fusion feature data set; Based on the fused feature data set, a multiple regression analysis method is used to establish a deviation-precision correlation model to obtain a trajectory deviation prediction model; According to the trajectory deviation prediction model, a speed error prediction algorithm is constructed to generate a scanning speed error prediction value; If the error prediction value exceeds the preset error threshold, the trajectory prediction model optimization is started to obtain the optimized trajectory prediction value; Reconstructing speed optimization model parameters according to the optimized trajectory prediction value to generate a speed optimization parameter set; According to the speed optimization parameter set, a dynamic adjustment algorithm is executed to determine an optimal scanning speed solution; According to the optimal scanning speed solution, a system parameter update operation is performed to improve dynamic adjustment performance.

[0015] In a second aspect, the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the above-mentioned methods for adaptively adjusting the scanning speed of a galvanometer when executing the computer program.

[0016] In a third aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for adaptively adjusting the galvanometer scanning speed.

[0017] Compared with the prior art, the present invention has the following beneficial effects: The present invention acquires target distance data in real time and dynamically adjusts the scanning speed and angle using a trajectory prediction model and a deviation compensation algorithm, thereby being able to respond to distance changes in real time and avoiding the contradiction between accuracy and efficiency caused by static adjustment.

[0018] The present invention uses a trajectory prediction model to calculate the estimated value of the trajectory deviation, and combines it with a deviation compensation algorithm to generate a correction signal, which can accurately adjust the scanning angle and speed, thereby effectively reducing the trajectory deviation, improving the scanning accuracy, and being able to control the trajectory deviation to a greater extent.

[0019] The present invention processes the collected distance data through a filtering algorithm to extract a stable distance change trend to avoid misjudgment caused by data fluctuations. When the distance change trend exceeds a preset threshold, the system will start a new round of adjustment cycle to ensure the stability and reliability of the system.

[0020] The present invention synchronously analyzes the trajectory deviation value, scanning speed accuracy and error parameters in each round of adjustment cycle, and gradually improves the adjustment performance of the system through iterative optimization model. This adaptive optimization mechanism can dynamically adjust parameters according to actual working conditions to ensure that the system is always in the best working state.

[0021] In summary, the present invention comprehensively solves the contradiction between accuracy and efficiency faced by existing galvanometer scanning systems in dynamic working environments through comprehensive technical means such as dynamic adjustment, precise control, stability optimization and adaptive iteration. The present invention can not only respond to changes in target distance in real time and accurately adjust the scanning speed and angle, but also effectively improve the stability and reliability of the system through filtering algorithms and threshold judgments. At the same time, the iterative optimization mechanism further enhances the adaptive ability of the system, ensuring that it is always in the best working state under complex working conditions, thereby significantly improving the accuracy and efficiency of laser scanning, and providing a more efficient and reliable solution for the application of galvanometer scanning technology in dynamic environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic flow chart of a method for adaptively adjusting the scanning speed of a galvanometer mirror provided in the first embodiment of the present invention. DETAILED DESCRIPTION

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

[0024] Reference Figure 1 The first embodiment of the present invention provides a method for adaptively adjusting the scanning speed of a galvanometer, comprising the following steps: S11, obtaining target distance data; S12, determining the best scanning speed within the scanning distance range by using an interpolation algorithm through a preset distance-speed correspondence table according to the target distance data; S13, based on the scanning speed and the target distance data, combined with preset scanning speed accuracy and error parameters, using a trajectory prediction model to calculate an estimated value of the trajectory deviation; S14, if the estimated value exceeds a preset estimated threshold, generating a correction signal according to a deviation compensation algorithm, and determining a trajectory deviation value by adjusting a scanning angle; S15, calculating a second scanning speed after dynamic adjustment using a speed optimization model according to the trajectory deviation value and the estimated value; S16, sending the second scanning speed and the correction signal to the galvanometer control system according to the transmission protocol to trigger real-time adjustment; S17, during the operation of the system, continuously collecting the target distance data at a target sampling frequency, and extracting a stable distance change trend through a filtering algorithm; S18, if the distance change trend exceeds a preset change threshold, updating the cache data and starting a new round of adjustment cycle; S19, in each cycle, synchronously correlates and analyzes the trajectory deviation value, scanning speed accuracy and error parameters, iteratively optimizes the prediction model and speed regulation model, and improves the dynamic regulation performance.

[0025] In step S11, target distance data is acquired.

[0026] It should be noted that target distance data refers to the straight-line distance value between the target object and a reference point, such as a sensor, camera, or the origin of a specific coordinate system. There are many ways to obtain target distance data, such as using a laser rangefinder to emit laser light and receive reflected light, and calculate the distance based on the propagation time and speed of light; or using radar ranging to emit radio waves and receive reflected waves, and determine the distance based on the propagation time and speed of the waves; or using camera ranging to combine the camera's internal parameters and the pixel size of the target in the image, and use geometric relationships to calculate the target distance.

[0027] In step S12, an optimal scanning speed within the scanning distance range is determined by using an interpolation algorithm according to the target distance data through a preset distance-speed correspondence table.

[0028] Initializing the parameters of the interpolation algorithm and setting the initial scanning speed to the first scanning speed characteristic; Iterate according to the interpolation algorithm parameters, obtain a second scanning speed characteristic after the iteration is completed, and record the current iteration number; Determine whether the second scanning speed characteristic meets a preset condition and is better than the first scanning speed characteristic, if so, update the second scanning speed characteristic to the first scanning speed characteristic; if not, discard the second scanning speed characteristic; Continue to iterate based on the adjusted interpolation parameter, and when the number of iterations is greater than or equal to the preset number of iterations, output the current first scanning speed feature as the optimal scanning speed.

[0029] It should be noted that the interpolation algorithm is a mathematical method used to estimate the value of unknown points between known data points. It achieves the prediction of unknown points by constructing a function or model so that the function completely matches the actual value at the known data points. The significance of the interpolation algorithm lies in its ability to fill in data gaps, smooth data curves, and provide more complete information for fields such as data analysis, image processing, and engineering design. For example, in image processing, it is used to fill in pixel gaps when enlarging an image. It helps us obtain richer information from limited data and improves the availability and accuracy of data.

[0030] According to the above description, the process of obtaining the optimal scanning speed is an iterative optimization method based on the interpolation algorithm. First, according to the target distance data and the preset distance-speed correspondence table, the parameters of the interpolation algorithm are initialized, and the initial scanning speed is set as the first scanning speed feature; then, the initialized interpolation parameters are used for iterative calculation to obtain a new scanning speed feature (the second scanning speed feature), and the current number of iterations is recorded; next, it is determined whether the second scanning speed feature meets the preset conditions and is better than the first scanning speed feature. If so, the second scanning speed feature is updated to the first scanning speed feature; if not, the second scanning speed feature is discarded; repeat the above iterative process, and continue to calculate based on the adjusted interpolation parameters each time until the number of iterations reaches or exceeds the preset number of iterations; finally, the current first scanning speed feature is output as the optimal scanning speed. This method can dynamically adjust the scanning speed according to the target distance by continuously optimizing the interpolation parameters and scanning speed features to achieve the best scanning effect.

[0031] In step S13, based on the scanning speed and the target distance data, combined with preset scanning speed accuracy and error parameters, an estimated value of the trajectory deviation is calculated using a trajectory prediction model.

[0032] inputting the scanning speed and the target distance data into a trajectory prediction model; Calculating an estimated value of trajectory deviation according to the trajectory prediction model; The training process of the trajectory prediction model: Obtain historical trajectory data, including three-dimensional spatial coordinate sequence, timestamp information and associated scanning speed-accuracy parameter group; Performing spatiotemporal feature extraction and error compensation processing on the historical trajectory data, constructing a spatiotemporal feature tensor including speed accuracy weights, and generating a standardized trajectory sequence through a dynamic time warping algorithm; The standardized trajectory sequence and the scanning error parameter matrix are coupled as input data, an initial trajectory prediction model is constructed based on a temporal convolutional network, and the initial trajectory prediction model is trained in two stages according to the spatiotemporal feature tensor and the actual trajectory coordinates to obtain the trajectory prediction model.

[0033] It should be noted that the estimated value of trajectory deviation is the predicted value of future trajectory deviation. It is calculated based on the current trajectory information and the known error pattern, and is of great significance in trajectory prediction, navigation system and motion control. By estimating trajectory deviation, system parameters can be adjusted in advance or corrective measures can be taken, thereby improving the accuracy of trajectory tracking and the robustness of the system.

[0034] The estimated value of trajectory deviation calculated according to the trajectory prediction model can be achieved through the following steps: Generate a predicted trajectory using the trajectory prediction model, then compare the predicted trajectory with the true trajectory or reference trajectory, and calculate the deviation between the two. Common deviation calculation methods include absolute trajectory error and relative trajectory error. Absolute trajectory error evaluates the overall deviation by calculating the Euclidean distance between the predicted trajectory and the true trajectory at each time point; while relative trajectory error measures the deviation by comparing the relative motion between the predicted trajectory and the true trajectory at adjacent time points. In addition, indicators such as minimum average displacement error or minimum end point displacement error can be used to evaluate trajectory deviation. Through these methods, an estimated value of trajectory deviation can be obtained, which provides a basis for the optimization and adjustment of the trajectory prediction model.

[0035] Two-stage training is a training strategy that optimizes model performance in steps, and is used to improve the accuracy and robustness of the model. In the construction of the trajectory prediction model, the significance of two-stage training is to gradually improve the model's understanding and prediction capabilities of trajectory data by optimizing the spatiotemporal feature tensor and the actual trajectory coordinates in stages. In the specific implementation, the first stage focuses on learning the spatiotemporal features of the trajectory data, extracting the dynamic features of the trajectory through the temporal convolutional network, and preliminarily building a trajectory prediction model; the second stage further fine-tunes the actual trajectory coordinates to optimize the model's prediction accuracy and ensure that the model can fit the real trajectory more accurately. This staged training method can effectively avoid the problem of overfitting caused by data complexity in the early stages of model training, and at the same time improve the generalization ability and prediction performance of the model through fine-tuning in subsequent stages.

[0036] In step S14, if the estimated value exceeds a preset estimated threshold, a correction signal is generated according to a deviation compensation algorithm, and a trajectory deviation value is determined by adjusting the scanning angle.

[0037] If the estimated value exceeds a preset estimation threshold, generating a deviation compensation correction signal; Adjust the scanning angle according to the correction signal to obtain a new scanning angle value; Calculating a compensation value of the trajectory deviation according to the scanning angle value; Secondarily adjusting the scanning angle according to the compensation value to obtain a final scanning angle value; Determining a correction value of the trajectory deviation according to the final scanning angle value; The scanning angle is finally adjusted according to the correction value, thereby determining the trajectory deviation value.

[0038] It should be noted that if the estimated value of the trajectory deviation exceeds the preset estimation threshold, a deviation compensation correction signal can be generated in the following manner: monitor the estimated value of the trajectory deviation in real time and compare it with the preset estimation threshold. When the estimated value exceeds the estimation threshold, the deviation compensation mechanism is triggered. At this time, the corresponding compensation amount is calculated according to the size and direction of the deviation and converted into a correction signal. For example, a threshold filter combined with a compensation model can be used. When the deviation exceeds the estimation threshold, it is considered that there is a significant trajectory deviation, and a correction signal is generated through a near-linear compensation model.

[0039] Adjusting the scanning angle according to the correction signal to obtain a new scanning angle value can be achieved in the following way: converting the correction signal into a specific adjustment instruction, specifically an angle increment or offset. Then, the new scanning angle value is calculated in combination with the current scanning angle and the correction signal. For example, in a drone or robot trajectory tracking system, the correction signal can be generated by a closed-loop control algorithm, such as PID control or backstepping control, to adjust the yaw angle or other related angles. In a specific implementation, the correction signal can be directly applied to the control system of the scanning device, and the scanning angle can be adjusted by a motor or servo mechanism to ensure that the scanning direction is consistent with the target trajectory.

[0040] The calculation of the compensation value of the trajectory deviation based on the scanning angle value can be achieved by the following method: using the relationship between the scanning angle value and the actual trajectory coordinates to establish a mathematical model or error mapping relationship. For example, in a laser rotary scanning system, the influence of the scanning angle error on the trajectory can be analyzed, and an error vector circle model can be established to describe the trajectory deviation. Then, the corresponding deviation vector is calculated based on the scanning angle value, and a compensation vector circle is introduced, whose modulus and phase are complementary to the error vector circle. By adjusting the parameters of the compensation vector circle, the scanning trajectory is consistent with the target trajectory, thereby obtaining the compensation value of the trajectory deviation. This method can effectively compensate for the trajectory deviation caused by the scanning angle error and improve the scanning accuracy and trajectory tracking performance.

[0041] Secondary adjustment of the scanning angle according to the compensation value to obtain the final scanning angle value can be achieved in the following manner: applying the calculated trajectory deviation compensation value to the current scanning angle, the compensation value is expressed as an angle increment or offset, which is used to correct the deviation between the scanning angle and the target trajectory; then adding or subtracting the compensation value from the current scanning angle through a closed-loop control strategy, such as PID control or backstepping control, to obtain a new scanning angle value. For example, in the trajectory tracking of a drone or robot, the scanning angle can be corrected by adjusting the yaw angle or other related angles. Finally, the adjusted scanning angle is monitored in real time through a feedback mechanism to ensure that it meets the trajectory tracking requirements.

[0042] Determining the correction value of the trajectory deviation based on the final scanning angle value can be achieved through the following steps: comparing the final scanning angle value with the actual trajectory coordinates, calculating the deviation between the two; and then using a mathematical model or compensation algorithm to convert the deviation into a correction value. For example, a Kalman filter can be used to smooth the trajectory data, and the corrected trajectory can be obtained through the state estimation of the filter; in addition, the relationship between the scanning angle value and the trajectory deviation can be modeled through the NURBS curve fitting method, and the correction value can be optimized by adjusting the control vertices and weights.

[0043] The implementation process of finally adjusting the scanning angle and determining the trajectory deviation value according to the correction value is as follows: the calculated correction value is applied to the current scanning angle, and the scanning angle is adjusted through a closed-loop control algorithm, such as PID control, to ensure that the scanning direction is aligned with the target trajectory; then the trajectory data is re-collected using the adjusted scanning angle, and compared with the target trajectory to calculate the new trajectory deviation value. This process can be achieved by establishing a mapping relationship between the trajectory deviation and the scanning angle, for example, by calculating the deviation through an error model or a geometric relationship. Finally, through iterative adjustment and feedback mechanism, the scanning angle is continuously optimized until the trajectory deviation value meets the preset accuracy requirements, thereby achieving effective correction and control of the trajectory deviation.

[0044] In step S15, a speed optimization model is used to calculate a dynamically adjusted second scanning speed according to the trajectory deviation value and the estimated value.

[0045] Inputting the trajectory deviation value into a speed optimization model to determine a dynamic speed adjustment amount; Inputting the dynamic speed adjustment amount into a speed control system to generate a target scanning speed value; The target scanning speed value is processed by using a speed smoothing algorithm to obtain a final scanning speed adjustment value; Applying the final scanning speed adjustment value to the scanning device to complete the dynamic speed adjustment, collecting the adjusted scanning trajectory data in real time, and calculating the actual trajectory accuracy value using the trajectory accuracy algorithm; If the actual trajectory accuracy value meets the preset accuracy threshold, maintaining the current second scanning speed; If the actual trajectory accuracy value does not meet the preset accuracy threshold, recalculate the trajectory deviation value; The training process of the speed optimization model: Acquire historical trajectory data of the motion control system, including actual trajectory coordinate sequence, theoretical trajectory coordinate sequence, scanning speed parameter set and time-position synchronization information of sensor feedback; Calculating the real-time deviation between the actual trajectory and the theoretical trajectory according to the historical trajectory data, and extracting the scanning speed time series characteristics to generate deviation-speed data; Performing time domain alignment and Z-score normalization on the deviation-velocity data through a sliding window to generate a dynamic coupling feature matrix; The dynamic coupling feature matrix is ​​used as input, an initial speed optimization model is constructed based on a gradient boosting decision tree algorithm, and the initial speed optimization model is trained according to a trajectory deviation attenuation coefficient and a speed optimization objective function to obtain a speed optimization model.

[0046] It should be noted that the trajectory deviation value is input into the speed optimization model, and determining the dynamic speed adjustment amount can be achieved by the following method: the trajectory deviation value is taken as input, and calculated by a speed optimization model, such as a model based on machine learning or a physical model. The model outputs a corresponding dynamic speed adjustment amount according to the deviation size and direction, which is used to adjust the speed of the scanning device to reduce the trajectory deviation value.

[0047] The dynamic speed adjustment amount is input into the speed control system, and the target scanning speed value can be generated by the following method: the dynamic speed adjustment amount is input into the speed control system, and the target scanning speed value is calculated by the control algorithm in combination with the current speed and the adjustment amount, so as to ensure that the scanning device can run at the optimized speed. The speed control system is an automated device used to accurately control the operating speed of mechanical or electronic equipment. It adjusts the rotation speed or movement speed of the equipment through feedback mechanisms and control algorithms, such as PID control. Its core function is to receive the input speed command and the feedback signal of the actual speed, calculate the control signal by comparing the difference between the two, and then drive the actuator to adjust the speed to ensure that the actual speed of the equipment is consistent with the target speed. It can improve the operating efficiency, stability and accuracy of the system, while reducing energy consumption and wear.

[0048] The target scanning speed value is processed by a speed smoothing algorithm to obtain the final scanning speed adjustment value, which can be achieved by the following method: In order to avoid the impact of sudden speed changes on the equipment, a speed smoothing algorithm, such as weighted moving average, is used to smooth the target scanning speed value to obtain the final scanning speed adjustment value to ensure smooth speed changes.

[0049] Applying the final scanning speed adjustment value to the scanning device to complete dynamic speed adjustment, collecting the adjusted scanning trajectory data in real time, and using the trajectory accuracy algorithm to calculate the actual trajectory accuracy value can be achieved by the following method: applying the final scanning speed adjustment value to the scanning device, adjusting its operating speed in real time, and collecting the adjusted scanning trajectory data; then using the trajectory accuracy algorithm, such as the root mean square error or maximum deviation, to calculate the actual trajectory accuracy value and evaluate the accuracy of the trajectory.

[0050] In step S16, the second scanning speed and the correction signal are sent to the galvanometer control system according to the transmission protocol to trigger real-time adjustment.

[0051] Obtain real-time position feedback data and distance data transmission protocol of the galvanometer control system; Calculate correction amount parameters according to the real-time position feedback data and in combination with the correction signal generation algorithm; encapsulating the second scanning speed and the correction signal parameter according to the distance data transmission protocol to generate a transmission data packet; The galvanometer control system receives the transmission data packet, and parses and extracts the second scanning speed and the correction signal parameter; According to the second scanning speed and the correction signal parameters, the instructions of the galvanometer control system are updated to achieve real-time adjustment operations.

[0052] It should be noted that the correction signal refers to the correction and modification of the signal output by the sensor, instrument or system to improve the accuracy and stability of the signal and reduce the measurement error. Its significance is to compensate for the deviation or error in the system, thereby improving the performance and accuracy of the system. For example, in an automatic control system, the correction signal can help the system reach the set value quickly and accurately, reducing overshoot and oscillation.

[0053] The distance data transmission protocol refers to a communication protocol used to transmit distance-related information. It defines the format, transmission method, and communication rules of the data to ensure that the distance data can be accurately and efficiently transmitted between devices. Common distance data transmission protocols include serial communication protocols such as RS232 and RS485. For example, RS232 is a single-ended signal transmission standard suitable for short-distance point-to-point communication with a standard transmission distance of 15 meters; while RS485 is a differential signal transmission standard that supports multi-point communication and is suitable for long-distance transmission. The theoretical maximum transmission distance can reach 1,200 meters. These protocols meet the distance data transmission requirements in different scenarios through different electrical characteristics and communication methods.

[0054] According to the real-time position feedback data, combined with the correction signal generation algorithm, the correction amount parameter can be calculated by the following method: real-time acquisition of the current real-time position feedback data of the galvanometer system, and comparison with the target position to obtain deviation information. Then, the correction signal generation algorithm, such as the PID control algorithm or the model-based algorithm, is used to calculate the correction amount parameter according to the deviation information.

[0055] According to the distance data transmission protocol, encapsulating the second scanning speed and the correction signal parameters, and generating a transmission data packet can be achieved by the following method: encapsulating the calculated second scanning speed and correction signal parameters according to a preset distance data transmission protocol. This protocol defines the format, encoding method and transmission rules of the data. For example, when the RS485 protocol is used, the data will be encapsulated into a differential signal format to ensure anti-interference ability and long-distance transmission capability during the transmission process. The encapsulated data is organized into a complete transmission data packet so that it can be sent through a communication link.

[0056] The galvanometer control system receives the transmission data packet and parses and extracts the second scanning speed and the correction signal parameters through the following method: the galvanometer control system receives the transmission data packet through the communication interface and parses the data packet according to the protocol rules; the parsing process includes verifying data integrity, decoding data format, and extracting the second scanning speed and correction signal parameters encapsulated in the data packet. This process ensures accurate reception and decoding of data, and provides necessary information for subsequent control operations.

[0057] According to the second scanning speed and the correction signal parameters, the instructions of the galvanometer control system are updated, and the real-time adjustment operation can be achieved by the following method: the galvanometer control system updates its internal control instructions according to the extracted second scanning speed and correction signal parameters. For example, the drive signal of the motor is adjusted to change the scanning speed of the galvanometer, or the motion trajectory of the galvanometer is adjusted by the feedback controller. These adjustment operations are performed in real time to ensure that the galvanometer can respond quickly according to the latest correction parameters, thereby achieving high-precision trajectory tracking and scanning tasks.

[0058] In step S17, during the operation of the system, the target distance data is continuously collected at a target sampling frequency, and a stable distance change trend is extracted through a filtering algorithm.

[0059] According to the target distance data, a filtering algorithm is used to remove noise interference to obtain denoised distance data; According to the denoised distance data, a steady-state detection algorithm is executed to generate a steady-state determination result: If the steady state determination result is not up to standard, the filtering algorithm parameters are adjusted and the target distance data is reprocessed; If the stable state judgment result is up to standard, the data change characteristics are extracted to generate a stable distance change trend.

[0060] It should be noted that filtering algorithm is a technology used for signal processing, which aims to remove noise or interference components in the signal through mathematical methods while retaining the useful information of the signal. It smoothes, enhances or separates the signal by designing specific filters, such as low-pass, high-pass, and band-pass filters. The significance of filtering algorithm is that it can improve the quality and reliability of the signal and reduce the impact of noise on system performance, thereby providing a more accurate basis for subsequent signal analysis, data processing or decision-making. For example, in sensor data processing, filtering algorithm can remove environmental noise and make the measurement result closer to the true value; in communication system, filtering algorithm can separate signal and interference and improve the transmission quality of signal.

[0061] The steady-state detection algorithm is an algorithm used to determine whether a system or data is in a stable state. It identifies the steady-state part of the data through statistical analysis, trend judgment or filtering of the data. Its significance is to help remove fluctuations or noise in the data and ensure the accuracy and stability of the analysis results, thereby providing reliable data support for equipment performance evaluation, system modeling, operation optimization and fault detection.

[0062] According to the target distance data, a filtering algorithm is used to remove noise interference, and the denoised distance data can be obtained by the following method: Select a suitable filtering algorithm, such as Kalman filtering, sliding average filtering or Gaussian weighted moving average filtering, to process the target distance data. For example, Kalman filtering dynamically estimates the true distance through prediction and update steps, combined with the system model and measurement data, thereby removing noise; sliding average filtering smoothes high-frequency noise by performing window averaging on the data. After selecting a suitable filtering algorithm according to specific needs, the target distance data is input into the filter, and the denoised distance data is output.

[0063] According to the denoised distance data, executing the steady-state detection algorithm and generating the steady-state determination result can be achieved by the following method: using the steady-state detection algorithm to analyze the denoised distance data. For example, by calculating the slope sum in the data window to determine whether the data is in a steady state, if the slope sum is less than a preset threshold, the data is considered to be in a steady state; if the slope sum is greater than or equal to the preset threshold, the data is considered not to be in a steady state.

[0064] If the steady-state judgment result is not up to standard, the filtering algorithm parameters are adjusted and the target distance data is reprocessed by the following method: re-adjusting the parameters of the filtering algorithm, such as adjusting the noise variance of the Kalman filter, the window size of the sliding average filter or the weight of the Gaussian filter. After adjusting the parameters, the target distance data is re-filtered until the steady-state detection result meets the standard.

[0065] In step S18, if the distance change trend exceeds a preset change threshold, the cache data is updated and a new round of adjustment cycle is started.

[0066] According to the distance change trend, extract the change trend to generate a trend line; According to the trend line, a target distance change rate parameter is calculated and a threshold comparison operation is performed; If the target distance change rate exceeds a preset change threshold, the galvanometer control parameters are adjusted to write new target distance data into a buffer; According to the new target distance data, the dynamic adjustment parameters of the second scanning speed are determined, and the trigger ring starts a new round of adjustment cycle.

[0067] It should be noted that, according to the distance change trend, extracting the change trend and generating a trend line can be achieved by the following method: collecting a time series of target distance data, and analyzing the change trend of the data by mathematical methods such as linear regression, moving average or polynomial fitting. For example, the distance data is linearly fitted using the least squares method to obtain a straight line as a trend line, and the slope and intercept of the straight line represent the rate and initial value of the distance change, respectively.

[0068] According to the trend line, the target distance change rate parameter is calculated, and the threshold comparison operation is performed: the target distance change rate parameter is extracted from the slope of the trend line. In a specific application scenario, if the slope of the trend line is 0.2 m / s, it means that the target distance changes by 0.2 m per second. Then, the change rate is compared with a preset threshold, such as 0.1 m / s, to determine whether it exceeds the allowable range.

[0069] If the target distance change rate exceeds the preset change threshold, the galvanometer control parameters are adjusted, and the new target distance data is written into the buffer. This can be achieved by the following method: re-adjusting the galvanometer control parameters to adapt to the new motion state. For example, increasing the scanning speed of the galvanometer or adjusting the scanning angle to maintain the scanning accuracy. After the adjustment is completed, the new target distance data is written into the buffer for subsequent operations.

[0070] According to the new target distance data, the dynamic adjustment parameters of the second scanning speed are determined, and the trigger loop starts a new round of adjustment cycle: according to the new target distance data in the buffer, the dynamic adjustment parameters of the second scanning speed are calculated. For example, the new scanning speed is determined by a speed-distance mapping table or a dynamic model. Then the adjustment loop is triggered to start a new round of adjustment cycle, and the new scanning speed and control parameters are applied to the galvanometer system, and the scanning operation is adjusted in real time to ensure that the system can adapt to the rapid changes in the target distance and maintain stable operation.

[0071] In step S19, the trajectory deviation value, scanning speed accuracy and error parameters are synchronously correlated and analyzed in each cycle, and the prediction model and speed regulation model are iteratively optimized to improve the dynamic regulation performance.

[0072] Obtain real-time trajectory deviation value, scanning speed accuracy and error parameters; Performing data preprocessing according to the real-time trajectory deviation value, the scanning speed accuracy and the error parameter to generate a fusion feature data set; Based on the fused feature data set, a multiple regression analysis method is used to establish a deviation-precision correlation model to obtain a trajectory deviation prediction model; According to the trajectory deviation prediction model, a speed error prediction algorithm is constructed to generate a scanning speed error prediction value; If the error prediction value exceeds the preset error threshold, the trajectory prediction model optimization is started to obtain the optimized trajectory prediction value; Reconstructing speed optimization model parameters according to the optimized trajectory prediction value to generate a speed optimization parameter set; According to the speed optimization parameter set, a dynamic adjustment algorithm is executed to determine an optimal scanning speed solution; According to the optimal scanning speed solution, a system parameter update operation is performed to improve dynamic adjustment performance.

[0073] It should be noted that multiple regression analysis is a statistical analysis method used to study the linear or nonlinear relationship between multiple independent variables (explanatory variables) and a dependent variable (response variable). By establishing a mathematical model, it can quantify the influence of each independent variable on the dependent variable and predict the value of the dependent variable. The significance of multiple regression analysis is that it can simultaneously consider the influence of multiple factors on the results, thereby more comprehensively explaining the variability in the data and improving the accuracy and reliability of the prediction.

[0074] According to the real-time trajectory deviation value, the scanning speed accuracy and the error parameter, data preprocessing is performed to generate a fused feature data set, which can be achieved by the following method: collecting the real-time trajectory deviation value, the scanning speed accuracy and the error parameter, cleaning these data: removing outliers and missing values, normalizing and extracting key features. For example, using a normalization method to convert the data into a form with a mean of 0 and a standard deviation of 1, and then combining these processed feature data into a fused feature data set.

[0075] According to the fused feature data set, a multiple regression analysis method is used to establish a deviation-precision association model to obtain a trajectory deviation prediction model: a multiple regression analysis method is used to establish a deviation-precision association model with the fused feature data set as input and the trajectory deviation as output. The model parameters are estimated by the least squares method to quantify the impact of each feature on the trajectory deviation.

[0076] According to the trajectory deviation prediction model, a speed error prediction algorithm is constructed, and the generation of a scanning speed error prediction value can be achieved by the following method: based on the trajectory deviation prediction model, new data such as real-time scanning speed and trajectory deviation is input, and the corresponding scanning speed error prediction value is calculated through the model.

[0077] If the error prediction value exceeds the preset error threshold, the trajectory prediction model optimization is started, and the optimized trajectory prediction value can be obtained by comparing the generated scanning speed error prediction value with the preset error threshold. If it exceeds the threshold, it means that the prediction accuracy of the current model is insufficient and the trajectory prediction model needs to be optimized. For example, the model can be optimized by adjusting the model's hyperparameters, such as the regularization coefficient or adding feature engineering steps, and the model can be retrained to obtain more accurate trajectory prediction values.

[0078] According to the optimized trajectory prediction value, the speed optimization model parameters are reconstructed and the speed optimization parameter set is generated by the following method: the weight or bias item of the speed model is adjusted according to the new prediction result to generate a set of new speed optimization parameters, which will be used in the subsequent dynamic adjustment algorithm.

[0079] According to the speed optimization parameter set, the dynamic adjustment algorithm operation is performed to determine the optimal scanning speed scheme. The following method can be used to achieve this: the speed optimization parameter set is input into the dynamic adjustment algorithm, such as the dynamic window algorithm. The algorithm will evaluate the performance of different speed schemes based on the current state and optimization parameters, and select the optimal scanning speed scheme. Finally, the scheme is applied to the scanning device to achieve dynamic adjustment and optimization.

[0080] The following describes the working process of the present invention using a common scenario as an example. Figure 1 Schematic diagram of the working scenario of the method.

[0081] In the industrial laser cutting scenario, the system first obtains the target distance data of each point on the surface of the workpiece to be cut, and uses the interpolation algorithm to determine the optimal scanning speed within the current scanning distance range according to the preset distance-speed correspondence table. Then, the trajectory prediction model is used to calculate the trajectory deviation estimate value in combination with the scanning speed accuracy and error parameters. Once the estimate value exceeds the preset threshold, the deviation compensation algorithm is started to generate a correction signal, and the actual trajectory deviation value is determined by adjusting the scanning angle of the galvanometer. Then, the speed optimization model is used to calculate the second scanning speed after dynamic adjustment according to the deviation value and the estimate value, and the speed and correction signal are sent to the galvanometer control system according to a specific transmission protocol to trigger real-time adjustment. During the continuous operation of the system, the surface distance data of the workpiece is continuously collected at the set target sampling frequency, and the filtering algorithm is used to extract the stable distance change trend. If this trend exceeds the preset change threshold, the cache data is updated and a new round of adjustment cycle is started. In each cycle, the real-time trajectory deviation data, scanning speed accuracy data and error data are synchronously correlated and analyzed, and the prediction model and speed adjustment model are continuously optimized iteratively, thereby effectively improving the dynamic adjustment performance of workpiece contour tracking during laser cutting, ensuring that the cutting trajectory accurately fits the expected shape of the workpiece, and improving cutting quality and efficiency.

[0082] In summary, the present invention discloses a method for adaptively adjusting the scanning speed of a galvanometer, the method comprising acquiring target distance data; determining the optimal scanning speed within the scanning distance range by using an interpolation algorithm according to the target distance data through a preset distance-speed correspondence table; calculating an estimated value of the trajectory deviation by using a trajectory prediction model based on the scanning speed and the target distance data, combined with preset scanning speed accuracy and error parameters; if the estimated value exceeds a preset estimation threshold, generating a correction signal according to a deviation compensation algorithm, and determining the trajectory deviation value by adjusting the scanning angle; calculating a second scanning speed after dynamic adjustment by using a speed optimization model according to the trajectory deviation value and the estimated value; sending the second scanning speed and the correction signal to a galvanometer control system according to a transmission protocol to trigger real-time adjustment; during system operation, continuously collecting the target distance data at a target sampling frequency, and extracting a stable distance change trend by using a filtering algorithm; if the distance change trend exceeds a preset change threshold, updating the cached data and starting a new round of adjustment cycle; synchronously correlating and analyzing the trajectory deviation value, the scanning speed accuracy and the error parameter in each cycle, iteratively optimizing the prediction model and the speed adjustment model, and improving the dynamic adjustment performance. In summary, this method has the following effects: it can effectively improve the accuracy and efficiency of laser scanning.

[0083] It should be noted that the embodiment of the present invention is used to execute all the process steps of the galvanometer scanning speed adaptive adjustment method of the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be repeated.

[0084] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a data processing terminal program. When the processor executes the computer program, the steps in the above-mentioned embodiments of the galvanometer scanning speed adaptive adjustment method are implemented, such as Figure 1 Step S11 is shown.

[0085] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0086] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0087] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0088] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0089] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0090] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0091] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for adaptively adjusting the scanning speed of a galvanometer, characterized in that: include: Get target distance data; Determine the best scanning speed within the scanning distance range by using an interpolation algorithm according to the target distance data through a preset distance-speed correspondence table; Based on the scanning speed and the target distance data, combined with preset scanning speed accuracy and error parameters, an estimated value of the trajectory deviation is calculated using a trajectory prediction model; If the estimated value exceeds a preset estimated threshold, a correction signal is generated according to a deviation compensation algorithm, and a trajectory deviation value is determined by adjusting the scanning angle; Calculating a dynamically adjusted second scanning speed using a speed optimization model according to the trajectory deviation value and the estimated value; Sending the second scanning speed and the correction signal to the galvanometer control system according to a transmission protocol to trigger real-time adjustment; During the operation of the system, the target distance data is continuously collected at a target sampling frequency, and a stable distance change trend is extracted through a filtering algorithm; If the distance change trend exceeds a preset change threshold, the cache data is updated and a new round of adjustment cycle is started; In each cycle, the trajectory deviation value, scanning speed accuracy and error parameters are analyzed synchronously and correlated, and the prediction model and speed regulation model are iteratively optimized to improve the dynamic regulation performance.

2. The method for adaptively adjusting the scanning speed of a galvanometer mirror according to claim 1, characterized in that: The method of determining the optimal scanning speed within the scanning distance range by using an interpolation algorithm through a preset distance-speed correspondence table according to the target distance data includes: Initializing the parameters of the interpolation algorithm and setting the initial scanning speed to the first scanning speed characteristic; Iterate according to the interpolation algorithm parameters, obtain a second scanning speed characteristic after the iteration is completed, and record the current iteration number; Determine whether the second scanning speed characteristic meets a preset condition and is better than the first scanning speed characteristic, if so, update the second scanning speed characteristic to the first scanning speed characteristic; if not, discard the second scanning speed characteristic; Continue to iterate based on the adjusted interpolation parameter, and when the number of iterations is greater than or equal to the preset number of iterations, output the current first scanning speed feature as the optimal scanning speed.

3. The method for adaptively adjusting the scanning speed of a galvanometer mirror according to claim 1, characterized in that: The method of calculating the estimated value of the trajectory deviation using a trajectory prediction model based on the scanning speed and the target distance data in combination with a preset scanning speed accuracy and an error parameter includes: inputting the scanning speed and the target distance data into a trajectory prediction model; Calculating an estimated value of trajectory deviation according to the trajectory prediction model; The training process of the trajectory prediction model: Obtain historical trajectory data, including three-dimensional spatial coordinate sequence, timestamp information and associated scanning speed-accuracy parameter group; Performing spatiotemporal feature extraction and error compensation processing on the historical trajectory data, constructing a spatiotemporal feature tensor including speed accuracy weights, and generating a standardized trajectory sequence through a dynamic time warping algorithm; The standardized trajectory sequence and the scanning error parameter matrix are coupled as input data, an initial trajectory prediction model is constructed based on a temporal convolutional network, and the initial trajectory prediction model is trained in two stages according to the spatiotemporal feature tensor and the actual trajectory coordinates to obtain the trajectory prediction model.

4. The method for adaptively adjusting the scanning speed of a galvanometer mirror according to claim 3, characterized in that: If the estimated value exceeds a preset estimated threshold, a correction signal is generated according to a deviation compensation algorithm, and a trajectory deviation value is determined by adjusting a scanning angle, including: If the estimated value exceeds a preset estimation threshold, generating a deviation compensation correction signal; Adjust the scanning angle according to the correction signal to obtain a new scanning angle value; Calculating a compensation value of the trajectory deviation according to the scanning angle value; Secondarily adjusting the scanning angle according to the compensation value to obtain a final scanning angle value; Determining a correction value of the trajectory deviation according to the final scanning angle value; The scanning angle is finally adjusted according to the correction value, thereby determining the trajectory deviation value.

5. The method for adaptively adjusting the scanning speed of a galvanometer mirror according to claim 1, characterized in that: The method of calculating the second scanning speed after dynamic adjustment by using a speed optimization model according to the trajectory deviation value and the estimated value includes: Inputting the trajectory deviation value into a speed optimization model to determine a dynamic speed adjustment amount; Inputting the dynamic speed adjustment amount into a speed control system to generate a target scanning speed value; The target scanning speed value is processed by using a speed smoothing algorithm to obtain a final scanning speed adjustment value; Applying the final scanning speed adjustment value to the scanning device to complete the dynamic speed adjustment, collecting the adjusted scanning trajectory data in real time, and calculating the actual trajectory accuracy value using the trajectory accuracy algorithm; If the actual trajectory accuracy value meets the preset accuracy threshold, maintaining the current second scanning speed; If the actual trajectory accuracy value does not meet the preset accuracy threshold, recalculate the trajectory deviation value; The training process of the speed optimization model: Acquire historical trajectory data of the motion control system, including actual trajectory coordinate sequence, theoretical trajectory coordinate sequence, scanning speed parameter set and time-position synchronization information of sensor feedback; Calculating the real-time deviation between the actual trajectory and the theoretical trajectory according to the historical trajectory data, and extracting the scanning speed time series characteristics to generate deviation-speed data; Performing time domain alignment and Z-score normalization on the deviation-velocity data through a sliding window to generate a dynamic coupling feature matrix; The dynamic coupling feature matrix is ​​used as input, an initial speed optimization model is constructed based on a gradient boosting decision tree algorithm, and the initial speed optimization model is trained according to a trajectory deviation attenuation coefficient and a speed optimization objective function to obtain a speed optimization model.

6. The method for adaptively adjusting the scanning speed of a galvanometer mirror according to claim 1, characterized in that: The step of sending the second scanning speed and the correction signal to the galvanometer control system according to a transmission protocol to trigger real-time adjustment includes: Obtain real-time position feedback data and distance data transmission protocol of the galvanometer control system; Calculate correction amount parameters according to the real-time position feedback data and in combination with the correction signal generation algorithm; encapsulating the second scanning speed and the correction signal parameter according to the distance data transmission protocol to generate a transmission data packet; The galvanometer control system receives the transmission data packet, and parses and extracts the second scanning speed and the correction signal parameter; According to the second scanning speed and the correction signal parameters, the instructions of the galvanometer control system are updated to achieve real-time adjustment operations.

7. The method for adaptively adjusting the scanning speed of a galvanometer mirror according to claim 1, characterized in that: During the operation of the system, the target distance data is continuously collected at a target sampling frequency, and a stable distance change trend is extracted through a filtering algorithm, including: According to the target distance data, a filtering algorithm is used to remove noise interference to obtain denoised distance data; According to the denoised distance data, a steady-state detection algorithm is executed to generate a steady-state determination result: If the steady state determination result is not up to standard, the filtering algorithm parameters are adjusted and the target distance data is reprocessed; If the stable state judgment result is up to standard, the data change characteristics are extracted to generate a stable distance change trend.

8. The method for adaptively adjusting the scanning speed of a galvanometer mirror according to claim 7, characterized in that: If the distance change trend exceeds a preset change threshold, the cache data is updated and a new round of adjustment cycle is started, including: According to the distance change trend, extract the change trend to generate a trend line; According to the trend line, a target distance change rate parameter is calculated and a threshold comparison operation is performed; If the target distance change rate exceeds a preset change threshold, the galvanometer control parameters are adjusted to write new target distance data into a buffer; According to the new target distance data, the dynamic adjustment parameters of the second scanning speed are determined, and the trigger ring starts a new round of adjustment cycle.

9. The method for adaptively adjusting the scanning speed of a galvanometer mirror according to claim 1, characterized in that: The synchronous correlation analysis of the trajectory deviation value, the scanning speed accuracy and the error parameter in each cycle, iterative optimization of the prediction model and the speed regulation model, and improvement of the dynamic regulation performance include: Obtain real-time trajectory deviation value, scanning speed accuracy and error parameters; Performing data preprocessing according to the real-time trajectory deviation value, the scanning speed accuracy and the error parameter to generate a fusion feature data set; Based on the fused feature data set, a multiple regression analysis method is used to establish a deviation-precision correlation model to obtain a trajectory deviation prediction model; According to the trajectory deviation prediction model, a speed error prediction algorithm is constructed to generate a scanning speed error prediction value; If the error prediction value exceeds the preset error threshold, the trajectory prediction model optimization is started to obtain the optimized trajectory prediction value; Reconstructing speed optimization model parameters according to the optimized trajectory prediction value to generate a speed optimization parameter set; According to the speed optimization parameter set, a dynamic adjustment algorithm is executed to determine an optimal scanning speed solution; According to the optimal scanning speed solution, a system parameter update operation is performed to improve dynamic adjustment performance.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for adaptively adjusting the scanning speed of a galvanometer mirror according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Geometric distortion correcting method for laser marking system

    CN104318047A

  • Laser scanning galvanometer model prediction control method and system

    CN115509135A

  • Processing system and method for self-adaptively adjusting shaking of galvanometer in real time based on movement speed

    CN119216826A

  • Underground pipe detection method based on trajectory reconstruction and storage medium

    CN119469741A

  • Methods and systems of fast optimization and compensation for volumetric positioning errors of rotary axes of five-axis CNC machine tools

    US20230400830A1

Cited By

  • Laser processing method and device and storage medium

    CN120244205A

  • Laser galvanometer intelligent control system and method based on big data

    CN120406100A

  • A laser galvanometer intelligent control system and method based on big data

    CN120406100B

  • Laser frequency dynamic compensation and optimization system based on reinforcement learning

    CN120406144A

  • Automatic wheel flaw detection and wheel set parallelism correction method and system

    CN120445103A