Control method and system for improving pointing precision of galvanometer
By performing spectral analysis and electric field optimization on the disturbance data and charge density distribution of the galvanometer system, and adjusting the voltage parameters in real time, the problem of insufficient galvanometer pointing accuracy was solved, and the stability and precision of beam pointing were achieved, meeting the needs of modern intelligent manufacturing.
Patent Information
- Application Number
- CN202511494306.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-01-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies lack the ability to perceive and dynamically compensate for the pointing accuracy of galvanometers in real time, resulting in the accumulation of beam pointing deviations in dynamic environments, which cannot meet the accuracy and stability requirements of modern intelligent manufacturing.
By acquiring disturbance data and charge density distribution data on the galvanometer surface, signal extraction and spectrum analysis are performed to calculate the charge density deviation vector. The voltage amplitude and phase are adjusted to adjust the charge density distribution, optimize the electric field distribution in real time, and perform path compensation calculations to achieve closed-loop control to stabilize the beam pointing.
It improves the pointing accuracy of the galvanometer, reduces the accumulation of beam deviation, enhances the robustness and precision of the system, optimizes the utilization of computing resources, and ensures the accuracy and real-time performance of the processing.
Smart Images

Figure CN121348560A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical equipment control technology, and in particular to a control method and system for improving the pointing accuracy of galvanometers. Background Technology
[0002] Currently, galvanometer systems are core execution components in laser processing, precision measurement, and optical communication, and their pointing accuracy directly determines the processing quality and operational efficiency of industrial control systems. In typical industrial control system applications, galvanometers achieve precision machining by controlling beam deflection. However, in actual industrial environments, external disturbances such as temperature fluctuations and mechanical vibrations directly affect the charge distribution stability of the galvanometer, leading to beam pointing deviations. This deviation is particularly significant in high-speed, high-precision machining scenarios; for example, in laser cutting or micro-machining, even micrometer-level deviations can result in product defects. Existing technical solutions mostly rely on fixed control parameters or delayed mechanical adjustments, making it difficult to achieve millisecond-level real-time responses and failing to meet the dual requirements of precision and stability in modern intelligent manufacturing.
[0003] In a current technology, methods to improve the pointing accuracy of a galvanometer typically involve controlling the galvanometer electrodes using fixed voltage parameters preset by an industrial controller, combined with periodic calibration of the mechanical structure to maintain accuracy. While this approach may be effective in static environments, it has significant limitations in dynamic industrial environments: when temperature or vibration disturbances occur, the system cannot sense environmental changes in real time and dynamically adjust control parameters. For example, in laser processing equipment connected to an IoT control system, if the ambient temperature fluctuates by 0.5 degrees Celsius or the equipment vibrates between 10Hz and 100Hz, the fixed-parameter control method results in a lag in charge distribution response. Charge density adjustment requires hundreds of milliseconds or even longer, failing to keep up with the frequency changes of the disturbance. This delay leads to non-uniformity in the electric field distribution, ultimately causing an accumulation of beam deflection angle deviations. Calculations show that during continuous processing, this deviation can be amplified to an unacceptable range through integral effects, causing the processing trajectory to deviate from the design path beyond the allowable threshold. Therefore, the most significant shortcoming of the current technology is the lack of real-time sensing and dynamic compensation capabilities for environmental disturbances, and the inability of the charge density adjustment response speed to meet the needs of industrial applications. This severely limits the reliability of the galvanometer in high-precision industrial control systems.
[0004] In summary, the existing technology lacks the ability to perceive and dynamically compensate for environmental disturbances in real time, resulting in insufficient pointing accuracy of the galvanometer. Summary of the Invention
[0005] This invention provides a control method, device, electronic device, and storage medium for improving the pointing accuracy of galvanometers, thereby solving the problem of insufficient pointing accuracy of galvanometers in the prior art.
[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a control method for improving the pointing accuracy of a galvanometer, comprising: Acquire disturbance data and galvanometer surface charge density distribution data, perform signal extraction and spectrum analysis, calculate charge density deviation vector, and obtain disturbance frequency spectrum and charge deviation characteristics; Based on the disturbance frequency spectrum and charge deviation characteristics, the electric field intensity gradient is calculated. Based on the deviation of the electric field intensity gradient, the voltage amplitude and phase are adjusted to adjust the charge density distribution and obtain the real-time charge density distribution. The uniformity of the real-time charge density distribution is analyzed, and the voltage sequence is corrected based on the analysis results to obtain the corrected electric field distribution. Based on the corrected electric field distribution, the beam deflection angle parameter is calculated and fused with the preset historical beam deflection dataset. Based on the fusion result, path compensation is calculated to obtain the dynamic beam path compensation vector. The dynamic beam path compensation vector is converted into a voltage control signal and sent to obtain the actual position data of the beam, analyze the position deviation, and update the dynamic beam path compensation vector to obtain a stable beam pointing sequence. The real-time beam trajectory during the processing is acquired, and the integral value of the deviation between the real-time beam trajectory and the beam pointing sequence is calculated to obtain the trajectory deviation integral value. If the trajectory deviation integral value exceeds the preset integral deviation threshold, the disturbance data is reprocessed through backtracking analysis to adjust the charge density and obtain an enhanced charge density control scheme.
[0007] Secondly, the present invention provides a control system for improving the pointing accuracy of a galvanometer, comprising: The data acquisition module is used to acquire disturbance data and galvanometer surface charge density distribution data, perform signal extraction and spectrum analysis, calculate charge density deviation vector, and obtain disturbance frequency spectrum and charge deviation characteristics. The simulation calculation module is used to calculate the electric field intensity gradient based on the perturbation frequency spectrum and charge deviation characteristics, and adjust the voltage amplitude and phase according to the deviation of the electric field intensity gradient to adjust the charge density distribution and obtain the real-time charge density distribution. The electric field correction module is used to analyze the uniformity of the real-time charge density distribution, and correct the voltage sequence based on the analysis results to obtain the corrected electric field distribution. The path compensation module is used to calculate the beam deflection angle parameters based on the corrected electric field distribution, and fuse them with a preset historical beam deflection dataset. Based on the fusion result, path compensation calculation is performed to obtain a dynamic beam path compensation vector. The data feedback module is used to convert the dynamic beam path compensation vector into a voltage control signal and send it, obtain the actual position data of the beam feedback, analyze the position deviation, update the dynamic beam path compensation vector, and obtain a stable beam pointing sequence. The deviation analysis module acquires the real-time beam trajectory during the processing, calculates the integral value of the deviation between the real-time beam trajectory and the beam pointing sequence, and obtains the trajectory deviation integral value. The result output module is used to reprocess the disturbance data through backtracking analysis and adjust the charge density if the trajectory deviation integral value exceeds a preset integral deviation threshold, thereby obtaining an enhanced charge density control scheme.
[0008] Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the control method for improving the pointing accuracy of the galvanometer as described in any one of the above.
[0009] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the control method for improving the pointing accuracy of the galvanometer as described above.
[0010] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention obtains disturbance data and galvanometer surface charge density distribution data, performs signal extraction and spectrum analysis, calculates charge density deviation vector, and obtains disturbance frequency spectrum and charge deviation characteristics. Through the signal extraction and spectrum analysis process, key frequency components and deviation characteristics in the data can be effectively separated and identified, avoiding noise interference in the original data, thereby improving the accuracy and computational efficiency of data processing, providing clean and characteristic input for subsequent steps, and reducing unnecessary computational redundancy.
[0011] (2) Based on the disturbance frequency spectrum and charge deviation characteristics, the present invention calculates the electric field intensity gradient, adjusts the voltage amplitude and phase according to the deviation of the electric field intensity gradient, and adjusts the charge density distribution to obtain the real-time charge density distribution. By calculating the electric field intensity gradient and dynamically adjusting the voltage parameters based on its deviation, the charge density distribution can be optimized in real time to ensure that the electric field is more uniform and stable. This real-time feedback mechanism improves the accuracy and response speed of electric field adjustment, while avoiding over-calculation and improving the overall calculation efficiency.
[0012] (3) The present invention analyzes the uniformity of the real-time charge density distribution, and corrects the voltage sequence based on the analysis results to obtain the corrected electric field distribution. By analyzing the uniformity of charge density and specifically correcting the voltage sequence, local non-uniformity can be effectively eliminated, and the stability and consistency of the electric field distribution can be enhanced. This provides a more reliable basis for beam control, improves the accuracy and reliability of subsequent calculations, and reduces the accumulation of errors caused by electric field distortion.
[0013] (4) Based on the corrected electric field distribution, the present invention calculates the beam deflection angle parameters and fuses them with the preset historical beam deflection dataset. Based on the fusion result, path compensation is calculated to obtain the dynamic beam path compensation vector. By fusing historical data and performing path compensation calculation, the system can learn from past experience to compensate for known deviations, thereby improving the accuracy and adaptability of beam deflection angle prediction. This data-driven method optimizes the calculation process, enhances the system's ability to handle dynamic conditions, and improves the calculation efficiency and path planning accuracy.
[0014] (5) The present invention converts the dynamic beam path compensation vector into a voltage control signal and sends it, obtains the actual position data of the beam feedback, analyzes the position deviation, and updates the dynamic beam path compensation vector to obtain a stable beam pointing sequence; by obtaining the actual position data and updating the dynamic beam compensation vector through the feedback mechanism, closed-loop control is realized, which can continuously correct the beam pointing deviation and ensure pointing stability and real-time performance. This improves the robustness and accuracy of the system, reduces the cumulative error, and optimizes the utilization of computing resources.
[0015] (6) The present invention obtains the real-time beam trajectory during the processing, calculates the integral value of the deviation between the real-time beam trajectory and the beam pointing sequence, and obtains the trajectory deviation integral value. By calculating the deviation integral value, the system can quantify the overall trajectory deviation trend and identify systematic errors, thereby providing a basis for monitoring and adjustment. This helps to prevent the accumulation of deviations, improve the accuracy and calculation efficiency of the processing process, and ensure that the system responds to changes in conditions in a timely manner. Attached Figure Description
[0016] Figure 1 This is a schematic flowchart of a control method for improving the pointing accuracy of a galvanometer, provided in the first embodiment of the present invention. Figure 2 This is a schematic diagram of a control device for improving the pointing accuracy of a galvanometer, provided in the second embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Reference Figure 1 The first embodiment of the present invention provides a control for improving the pointing accuracy of a galvanometer, comprising the following steps: S11: Acquire disturbance data and galvanometer surface charge density distribution data, perform signal extraction and spectrum analysis, calculate charge density deviation vector, and obtain disturbance frequency spectrum and charge deviation characteristics; S12, Calculate the electric field intensity gradient based on the disturbance frequency spectrum and charge deviation characteristics, adjust the voltage amplitude and phase based on the deviation of the electric field intensity gradient, adjust the charge density distribution, and obtain the real-time charge density distribution; S13, Analyze the uniformity of the real-time charge density distribution, and based on the analysis results, correct the voltage sequence to obtain the corrected electric field distribution; S14. Calculate the beam deflection angle parameters based on the corrected electric field distribution, and fuse them with the preset historical beam deflection dataset. Based on the fusion result, perform path compensation calculation to obtain the dynamic beam path compensation vector. S15, the dynamic beam path compensation vector is converted into a voltage control signal and sent, the actual position data of the beam is obtained, the position deviation is analyzed, and the dynamic beam path compensation vector is updated to obtain a stable beam pointing sequence. S16, acquire the real-time beam trajectory during the processing, calculate the integral value of the deviation between the real-time beam trajectory and the beam pointing sequence, and obtain the trajectory deviation integral value. S17. If the trajectory deviation integral value exceeds the preset integral deviation threshold, the disturbance data is reprocessed through backtracking analysis to adjust the charge density and obtain an enhanced charge density control scheme.
[0019] In step S11, it is necessary to acquire perturbation data and galvanometer surface charge density distribution data, perform signal extraction and spectrum analysis, calculate the charge density deviation vector, and obtain the perturbation frequency spectrum and charge deviation characteristics, including: The disturbance data and the surface charge density distribution data of the galvanometer are acquired, and the disturbance data is filtered to obtain a standardized temperature signal and a vibration signal. Based on the standardized temperature signal and vibration signal, Fourier transform is used to perform time series analysis, calculate frequency components, and obtain the disturbance frequency spectrum; Based on the perturbation frequency spectrum, frequency analysis is performed, and combined with the charge density distribution data on the galvanometer surface, the charge density deviation vector is calculated to obtain the charge deviation characteristics.
[0020] It should be noted that the disturbance data and the initial distribution of charge density on the galvanometer surface are collected by a sensor array. The sensor array is typically deployed around the galvanometer and can capture environmental parameters such as temperature and vibration in real time. For example, the sensors collect ambient temperature fluctuations ranging from 20°C to 30°C and vibration frequencies ranging from 10Hz to 100Hz. After acquiring the disturbance data and the charge density distribution data on the galvanometer surface, the disturbance data is filtered to obtain standardized temperature and vibration signals. This step is achieved through signal filtering technology, specifically including three main stages: The signal preprocessing stage first normalizes the original disturbance data using a linear transformation method to convert the original data of different dimensions to a unified numerical range. Specifically, this is done by calculating the difference between each data point and the minimum value of the dataset, and then dividing by the range of the dataset. The difference between the maximum and minimum values is used to unify the data scale and eliminate dimensional differences. Then, baseline correction is performed to remove the DC component and trend term. In the filtering stage, the recursive difference equation of the Butterworth filter is used for time-domain filtering. A smooth amplitude-frequency response is achieved through multi-stage filter cascading. In the post-processing stage, the filtered signal is calibrated for amplitude and noise residue is detected. Specifically, the Butterworth filter is used to process the signal, and the cutoff frequency is set to filter out high-frequency noise and retain the main trend. At the same time, a bandpass filter is used to process the vibration signal, retaining the effective frequency range to eliminate irrelevant interference, thereby generating a smooth and reliable standardized signal.
[0021] Based on standardized temperature and vibration signals, Fourier transform is used for time series analysis to calculate frequency components and obtain the perturbation frequency spectrum. This step is performed using the Fast Fourier Transform algorithm, and the specific implementation process includes three main stages: signal preprocessing, spectrum calculation, and frequency feature extraction. In the signal preprocessing stage, the standardized signal is first windowed to reduce spectral leakage using the Hanning window function. The signal is weighted, with the window function length consistent with the signal length. Windowing effectively suppresses spectral sidelobe leakage and improves frequency resolution. In the spectrum calculation stage, the time-domain signal is converted to a frequency-domain representation using a Fast Fourier Transform (FFT) algorithm. The algorithm employs a divide-and-conquer strategy to decompose the N-point sequence into multiple smaller-point Discrete Fourier Transforms (DFTs), and achieves efficient computation through butterfly operations to obtain the signal's amplitude and phase spectra. In the frequency feature extraction stage, peak detection is performed on the calculated spectrum to identify significant frequency components. Combined with spectral smoothing techniques, the true frequency components are distinguished from noise, and the time-domain signal is converted to a frequency-domain signal. Major frequency components such as low-temperature frequencies and vibration peak frequencies are identified, thereby quantifying the spectral characteristics of environmental disturbances and obtaining the disturbance frequency spectrum.
[0022] Based on the perturbation frequency spectrum, frequency analysis is performed. Combined with the charge density distribution data on the galvanometer surface, the charge density deviation vector is calculated to obtain the charge deviation characteristics. This step is achieved through a spatial mapping method, specifically including three main processes: spectrum-space conversion, deviation quantization, and feature extraction. In the spectrum-space conversion process, the correspondence between frequency components and spatial locations is first established. A frequency-space interpolation algorithm maps discrete frequency domain information to a continuous spatial grid on the galvanometer surface. The specific implementation process of this algorithm is as follows: Based on bilinear or spline interpolation methods, a spatial grid is reconstructed for non-uniform frequency sampling points. Using the amplitude and phase information of neighboring frequency points, a weighted function is used to calculate the estimated charge density value at each spatial grid point, thus achieving a continuous mapping from the frequency domain to the spatial domain. In the deviation quantization process, a weighted Euclidean distance calculation method is used, with weights set based on the amplitude of the frequency components. The specific formula is as follows: ,in Let i be the amplitude of the i-th frequency component. The sum of the amplitudes of all frequency components is used; a larger amplitude indicates a more significant impact of the frequency disturbance on the charge distribution, and therefore a higher weight is assigned. Then, the charge density deviation value for each spatial grid point is calculated using the formula: ,in For actual charge density, The target charge density is derived from the measured standard charge density under steady-state conditions. During feature extraction, principal component analysis (PCA) is used to extract key feature patterns from the deviation vector, identifying spatial distribution patterns related to specific frequency perturbations. Frequency components are correlated with charge density data, spatial deviation values are calculated, and vectors are generated, revealing the influence pattern of specific frequency perturbations on charge distribution. Charge deviation features are quantitative indicators obtained by integrating frequency analysis and charge density data. Their feature extraction process includes: first, normalizing the deviation vector to eliminate dimensional differences; then, obtaining the main feature vectors through eigenvalue decomposition, selecting the top few feature components with the largest contribution as charge deviation features. These feature components reflect the intensity and spatial distribution pattern of the influence of different frequency perturbations on charge distribution, representing the charge inhomogeneity caused by the main perturbation source, and are used to guide the adjustment of charge density parameters. Finally, the Poisson equation is solved. Calculate the potential distribution, and then perform gradient calculations. Obtaining spatial electric field distribution data provides a basis for optimizing galvanometer design, such as adjusting structural or control parameters to improve stability.
[0023] In step S12, the electric field intensity gradient needs to be calculated based on the perturbation frequency spectrum and charge deviation characteristics. The voltage amplitude and phase are adjusted according to the deviation of the electric field intensity gradient to adjust the charge density distribution and obtain the real-time charge density distribution, including: Based on the perturbation frequency spectrum and the charge density distribution data on the surface of the galvanometer, the spatial electric field is simulated using finite element analysis to calculate the change in electric field distribution and obtain the spatial electric field distribution data. Based on the spatial electric field distribution data, the charge density spatial adjustment matrix is calculated, and the spatial electric field distribution data is spatially mapped with the charge density distribution data on the galvanometer surface. The electric field intensity gradient is obtained through gradient calculation. If the data deviation of the electric field intensity gradient exceeds a preset gradient threshold, the voltage sequence data is adjusted by a proportional-integral-differential algorithm to obtain optimized voltage sequence data; wherein, the voltage sequence data includes the voltage amplitude and phase of the galvanometer electrode; Based on the optimized voltage sequence data, a voltage sequence is applied to the galvanometer electrode, and the charge density distribution is cyclically adjusted through real-time feedback control to obtain the real-time charge density distribution.
[0024] It should be noted that, based on the perturbation frequency spectrum and the charge density distribution data on the galvanometer surface, the step of simulating the spatial electric field using finite element analysis to calculate the electric field distribution change and obtain the spatial electric field distribution data is achieved by constructing a three-dimensional finite element model of the galvanometer system. The specific implementation process includes four stages: model construction, mesh generation, boundary condition setting, and numerical solution. In the model construction stage, a three-dimensional solid model containing the galvanometer geometry and material properties is first established, and material parameters such as the dielectric constant are defined. and charge density In the mesh generation stage, tetrahedral elements are used to create an unstructured mesh for the galvanometer and its surrounding space. The mesh density is dynamically adjusted based on the electric field gradient. Local refinement algorithms ensure denser meshes in high-gradient regions, such as automatically refining the mesh based on a gradient threshold. In the boundary condition setting stage, charge density distribution data is used as Neumann boundary conditions and loaded onto the corresponding nodes. The specific formula is as follows: ,in For electric potential, It is the normal vector. For charge density, The dielectric constant is used; in the numerical solution stage, the Poisson equation is solved. The potential distribution at each node is calculated, and the conjugate gradient method is used to iteratively solve the large-scale sparse matrix system. ,in Here is the stiffness matrix. The electric potential vector, For the load vector, set the convergence tolerance as 10. -6 Ensure accuracy, then perform gradient calculations. The spatial electric field distribution data were obtained, among which The electric field intensity vector is used to generate a spatial distribution dataset containing the electric field amplitude and direction, providing accurate input for subsequent electric field control. The entire process ensures the accuracy and reliability of the calculation results through rigorous numerical methods and physical models, making it suitable for high-precision galvanometer control scenarios.
[0025] Based on the spatial electric field distribution data, a spatial adjustment matrix for charge density is calculated. The spatial electric field distribution data is then spatially mapped to the charge density distribution data on the galvanometer surface. The electric field intensity gradient is obtained through gradient calculation. This step, based on the spatial electric field distribution data, first calculates the spatial adjustment matrix for charge density. This matrix is essentially a Jacobian matrix characterizing the influence of charge density changes at various points in space on the electric field distribution. Its elements are defined as... , representing the partial derivative of the small change in charge density at the j-th grid point with respect to the electric field intensity at the i-th grid point. In practical numerical solutions, this matrix is constructed based on the regularized inverse problem method of the Poisson equation: taking the electric field distribution data as input, and using the discretized Poisson equation... and electric field relationship Establish system relationships ,in The transfer matrix is discretized using the Green's function or the boundary element method; then, an optimization problem is constructed based on the least squares framework: ,in The regularization parameter, used to handle underdeterminism and suppress solution instability, can be determined using the L-curve method or cross-validation. The charge density adjustment matrix is ultimately obtained by solving the optimization problem. Subsequently, three processes are performed: spatial registration, matrix construction, and gradient calculation. In spatial registration, the electric field distribution data and charge density data are first unified to the same spatial coordinate system through coordinate transformation. In matrix construction, the differential relationship between electric field strength and charge density is established using the Jacobian matrix, with matrix elements representing the partial derivatives of the electric field with respect to the charge at each spatial point. In gradient calculation, the electric field strength gradient at each grid point is calculated using the central difference method. A second-order central difference scheme is used for internal grid points, while a first-order forward or backward difference scheme is used for boundary points.
[0026] If the data deviation of the electric field intensity gradient exceeds a preset gradient threshold, the voltage sequence data is adjusted using a proportional-integral-derivative (PID) algorithm to obtain optimized voltage sequence data. This step employs a closed-loop control strategy, specifically including three stages: deviation detection, parameter adjustment, and sequence generation. In the deviation detection stage, the difference between the measured electric field intensity gradient value and the target value is compared in real time. When the deviation exceeds the gradient threshold, the adjustment mechanism is triggered. In the parameter adjustment stage, the PID algorithm calculates the adjustment amount based on the weighted sum of the current deviation, the integral of the deviation, and the derivative of the deviation. The proportional coefficient is determined based on the response characteristics, the integral coefficient is used to eliminate steady-state error, and the derivative coefficient is used to suppress overshoot. In the sequence generation stage, the adjustment amount is... The voltage amplitude and phase are converted into adjustment commands to generate new voltage sequence data. The gradient threshold setting process is based on multi-dimensional system characteristic analysis, specifically including three main stages: theoretical calculation, statistical analysis, and experimental calibration. In the theoretical calculation stage, a mathematical model is established based on the electromagnetic characteristics of the galvanometer system, and the theoretical allowable range of the electric field gradient is calculated through finite element simulation. In the statistical analysis stage, historical operating data is collected, and the statistical characteristics of the gradient value are determined using the normal distribution analysis method. Based on the 3λ rule, the threshold is set to the range of the mean plus or minus three standard deviations. In the experimental calibration stage, the rationality of the threshold setting is verified through actual testing, and the threshold size is dynamically adjusted according to the response characteristics of the galvanometer system.
[0027] Based on the optimized voltage sequence data, a voltage sequence is applied to the galvanometer electrode. The charge density distribution is then cyclically adjusted using real-time feedback control to obtain the real-time charge density distribution. This step involves converting the voltage sequence data into an analog signal using a digital-to-analog converter (DAC) and applying it to the galvanometer electrode. The specific implementation process includes three steps: signal conversion, charge monitoring, and closed-loop adjustment. In the signal conversion step, a high-resolution DAC (e.g., 16-bit or 24-bit) is used to convert the digital voltage sequence into a high-precision analog voltage signal. In the charge monitoring step, a high-sensitivity charge sensor monitors the surface charge density change in real time at a millisecond-level sampling frequency. In the closed-loop adjustment step, the monitored data is compared with a target value, which is either a preset ideal charge density distribution or a desired charge density determined by a theoretical model. The output voltage is dynamically adjusted by a PID controller. The proportional, integral, and derivative coefficients of the PID controller are tuned according to the response characteristics of the galvanometer system using the Ziegler-Nichols method or trial and error, forming a complete negative feedback control loop. The real-time charge density distribution is the dynamic distribution data of the charge density on the galvanometer surface obtained through the real-time feedback control loop. The acquisition process is based on the distributed measurement of a high-precision charge sensor array. The sensors are arranged in a spatial grid on the galvanometer surface. After signal conditioning and digital processing, the measurement data is used to generate a complete charge density distribution map through a spatial interpolation algorithm. This data is used to evaluate the uniformity of charge distribution in real time, provide feedback information for electric field adjustment, and serve as input parameters for the beam control algorithm to ensure pointing accuracy.
[0028] In step S13, it is necessary to analyze the uniformity of the real-time charge density distribution. Based on the analysis results, the voltage sequence is corrected to obtain the corrected electric field distribution, including: Based on the real-time charge density distribution, the spatial electric field is simulated and the electric field distribution characteristics are calculated to obtain the first electric field distribution model data. If the uniformity deviation of the first electric field distribution model data exceeds the preset uniformity threshold, the voltage sequence is recalculated to obtain the corrected voltage sequence data. Based on the corrected voltage sequence data, a voltage sequence is applied to the galvanometer electrode in a real-time feedback control cycle to obtain the corrected electric field distribution.
[0029] It should be noted that the step of simulating the spatial electric field and calculating the electric field distribution characteristics based on the real-time charge density distribution to obtain the first electric field distribution model data adopts the finite element numerical calculation method. The specific implementation process includes four main stages: In the model discretization stage, tetrahedral elements are used to divide the galvanometer working space into three-dimensional meshes. The mesh generation algorithm dynamically adjusts the mesh density according to the charge density gradient distribution, automatically refining the mesh in regions where the charge density change rate is greater than a set threshold, and using a sparser mesh in regions with gentle changes, achieving a balance between computational accuracy and efficiency. In the physical modeling stage, the governing equations are established based on the Poisson equation of the electrostatic field. The real-time collected charge density distribution data is loaded as source terms onto the corresponding mesh nodes, and the boundary conditions of the galvanometer surface are set. In the numerical solution stage, the preprocessed conjugate gradient method is used to iteratively solve the large sparse matrix system. The preprocessing technique uses incomplete Cholesky decomposition to improve the matrix condition number, and the residual tolerance is set to 1e-6 as the convergence criterion. The potential distribution of each node is calculated. The post-processing stage derives the complete electric field distribution from the electric potential field obtained from the numerical solution through a systematic data processing workflow. This involves three consecutive computational steps: First, the electric potential gradient of each grid cell is calculated using the central difference method. For internal grid points, a second-order central difference scheme is used, while boundary points use a first-order forward or backward difference scheme. Then, the discrete gradient data is converted into a continuous field distribution through shape function interpolation, with interpolation calculations performed within the cells based on finite element shape functions. Finally, the interpolation results are smoothed and error corrected to eliminate discontinuities caused by numerical calculations, ultimately yielding the first electric field distribution model data containing the electric field vectors at each point in space. The core of this post-processing stage is to achieve a precise conversion from discrete numerical solutions to a continuous physical field. Basic gradient data is obtained through difference calculations, and shape function interpolation maintains the continuity and differential properties of the field distribution. Post-processing optimization ensures the physical rationality and numerical stability of the data, providing accurate and reliable electric field distribution information for subsequent control algorithms.
[0030] If the uniformity deviation of the first electric field distribution model data exceeds a preset uniformity threshold, the voltage sequence is recalculated to obtain the corrected voltage sequence data. This step is implemented using an optimization algorithm, and the specific implementation process includes four key steps: First, an electric field uniformity index is defined as the objective function. This index quantifies the distribution uniformity by taking the square root of the average of the sum of squares of the deviations between the electric field intensity values at each point in space and the average value, ensuring that the smaller the index value, the higher the uniformity. Second, a sensitivity matrix between the objective function and the voltage parameters is constructed. By applying a small perturbation to each voltage parameter and calculating the change in the objective function, the partial derivative is approximated, forming a matrix describing the influence of parameter changes. For example, in a galvanometer system with 8 electrodes, the voltage of each electrode is applied sequentially... For each disturbance, calculate the change ΔF of the uniformity index, then the i-th column of the sensitivity matrix is... The matrix describes the degree and direction of influence of each voltage parameter on the uniformity of the electric field. Then, a gradient descent algorithm is used for iterative optimization. The search direction is determined based on the sensitivity matrix, and the step size is adjusted adaptively. The learning rate is dynamically increased or decreased according to changes in the objective function to ensure convergence stability. Finally, convergence conditions are set. Optimization stops when the objective function value drops below a threshold or the number of iterations reaches a preset upper limit. An early stopping mechanism is introduced to prevent invalid iterations. The optimized voltage sequence data is then output. The uniformity threshold is set based on multi-dimensional system characteristic analysis and is determined through three steps: In the theoretical calculation stage, the maximum allowable electric field non-uniformity is inferred from the beam deflection accuracy based on the optical performance requirements of the galvanometer system; in the statistical analysis stage, historical operating data is collected, the standard deviation and extreme value distribution characteristics of the electric field distribution are calculated, and the threshold range is determined using the normal distribution assumption; in the experimental calibration stage, the effectiveness of the threshold is verified through actual testing, and the threshold parameters are adjusted under different operating conditions to ensure robustness.
[0031] Based on the corrected voltage sequence data, the step of applying a voltage sequence to the galvanometer electrodes through real-time feedback control to obtain the corrected electric field distribution adopts a closed-loop control architecture. The specific implementation process includes three stages: a signal conversion stage converts the digital voltage sequence into an analog drive signal using a high-precision digital-to-analog converter; an execution stage applies the analog signal to the galvanometer electrode array to generate the corresponding electric field distribution; and a detection stage collects actual electric field data in real time using distributed electric field sensors and feeds the measured values back to the controller for a new round of adjustment. The corrected electric field distribution is the improved spatial distribution state of the electric field obtained through the above optimization and control processes. Its acquisition process is based on real-time collected charge density data and finite element methods. The electric field distribution is calculated to meet a preset uniformity requirement through iterative optimization of voltage parameters. This preset uniformity requirement is based on a multi-dimensional systematic process. First, the maximum allowable non-uniformity of the electric field is inferred from the beam pointing accuracy index through theoretical calculation. Second, historical operating data is collected in the statistical analysis stage to calculate the standard deviation and extreme value characteristics of the electric field distribution, and the threshold range is determined by probability distribution fitting. Finally, the experimental calibration stage tests the system performance under different operating conditions and dynamically adjusts the threshold parameters to ensure environmental adaptability. This data has higher spatial consistency and stability, is used to accurately calculate the beam deflection angle, provides key input for subsequent dynamic path compensation, and serves as an important basis for system performance evaluation.
[0032] In step S14, the beam deflection angle parameters need to be calculated based on the corrected electric field distribution and fused with a preset historical beam deflection dataset. Based on the fusion result, path compensation calculation is performed to obtain a dynamic beam path compensation vector, including: Based on the corrected electric field distribution, the physical relationship between the electric field distribution and the beam deflection is analyzed to obtain the beam deflection angle parameter; Based on the beam deflection angle parameters, a three-dimensional spatial calculation is performed to obtain the first beam deflection angle dataset; Based on the first beam deflection angle dataset, a preset historical beam deflection dataset is fused to obtain a fused angle parameter dataset; Path compensation is calculated on the fused angle parameter dataset to obtain a dynamic path compensation vector.
[0033] It should be noted that the specific process of analyzing the physical relationship between the electric field distribution and beam deflection based on the corrected electric field distribution to obtain the beam deflection angle parameter is as follows: First, the galvanometer system is simulated with high precision using finite element analysis software (COMSOL). By scanning the electric field distribution under different driving voltages and calculating the corresponding beam deflection angle, a dataset of "electric field-deflection angle" mapping relationship is established. Then, a two-dimensional lookup table (LUT) is constructed with the mean electric field intensity and the mean gradient as input indices and the deflection angle as the output value. During actual operation, the mean electric field intensity and the mean gradient are calculated based on the real-time acquired electric field distribution data. The beam deflection angle parameter is quickly obtained by querying the lookup table through bilinear interpolation. This method transforms the complex field-light coupling relationship into an efficient table lookup operation, significantly reducing computational complexity and latency, while ensuring the accuracy and stability required for engineering applications.
[0034] The step of performing three-dimensional spatial calculations based on the beam deflection angle parameters to obtain the first beam deflection angle dataset employs a spatial geometric transformation method. The specific implementation process includes four main stages: First, establishing a three-dimensional right-handed coordinate system with the galvanometer optical center as the origin, clarifying the directions and spatial scale relationships of each coordinate axis; second, achieving precise transformation between coordinate systems through a rotation matrix, calculating the rotation matrix elements based on the deflection angle parameters to complete the spatial mapping from the local coordinate system to the global coordinate system; and third, using the quaternion method to handle the three-dimensional rotation problem, constructing a unit quaternion to represent the rotation attitude, with the quaternion form being... ,in For the real part, The rotation parameters are represented by an imaginary part. Quaternion multiplication is used to combine rotation operations, avoiding gimbal lock and ensuring numerical stability of the rotation calculations. Finally, the Rodrigues formula is used to convert the rotation parameters into a spatial vector, as shown in the formula. Where v is the original vector, k is the unit vector of the rotation axis, and θ is the rotation angle, the actual deflection direction of the beam is obtained through vector operations, and finally a multidimensional dataset containing spatial position coordinates and deflection angle information is generated, providing complete beam kinematic information for subsequent data processing.
[0035] Based on the first beam deflection angle dataset, the step of fusing a preset historical beam deflection dataset to obtain the fused angle parameter dataset employs a Kalman filter algorithm. The specific implementation process includes four core steps: First, establishing a state-space model, defining the state vector containing beam deflection angle and angular velocity components, and using a linear dynamic model for the state equations. ,in Here is the state transition matrix. For process noise; observation equation ,in For the observation matrix, To measure noise; next, a prediction step is performed, calculating the prior state estimate and prior covariance estimate using the state transition equation; then, an update step is performed, calculating the Kalman gain. Where R is the measurement noise covariance matrix; finally, the posterior state estimate is obtained through weighted fusion. Post-hoc covariance update The current measurement data is fused with historical data over time. Through a prediction-update loop, a state-space model is used to describe the dynamic characteristics. The covariance matrix is used to quantify the uncertainty, and a weighted average method is employed to optimize the angle parameter estimates. The weights are set based on the Kalman gain matrix. The gain matrix is automatically calculated, and the weight allocation is determined by balancing prediction uncertainty and measurement uncertainty. The specific calculation formula is as follows: ,in R represents the covariance matrix of the prior estimate (reflecting prediction uncertainty), and R represents the measurement noise covariance matrix (reflecting measurement uncertainty). Higher weights are automatically assigned to more certain information sources (prediction or measurement), ultimately generating a fused angle parameter dataset containing fused angle values, confidence levels, and timestamps, providing accurate input for subsequent path compensation. The preset historical beam deflection dataset is set based on a multi-source data acquisition and dynamic management process. First, a high-precision photoelectric sensor array records historical beam deflection angle data at a sampling frequency of no less than 100Hz. Wavelet transform filtering technology is used to remove high-frequency noise and outliers, retaining the main trend signals. Then, data normalization processing is performed, converting data from different time scales and operating conditions to a unified reference coordinate system to eliminate dimensional differences. Next, a time-series database storage structure is established, using a sliding window mechanism to retain historical data from the most recent N operations (e.g., 1000 operations). A dynamic index model is established based on environmental parameters such as temperature and vibration frequency to ensure that the retrieved dataset is highly relevant to the current operating conditions.
[0036] The step of calculating path compensation on the fused angle parameter dataset to obtain the dynamic path compensation vector employs an inverse kinematics algorithm. The specific implementation process includes four key stages: First, establishing the mapping relationship between deflection angle and spatial position based on the Jacobian matrix, and describing the sensitivity of angle changes to position by calculating the partial derivative matrix; second, using a pseudo-inverse matrix to solve for the redundant system. For multi-degree-of-freedom systems that may have infinitely many solutions, the Moore-Penrose pseudo-inverse is used to obtain the optimal solution in the least-squares sense. Specifically, the pseudo-inverse of the Jacobian matrix is calculated through singular value decomposition, as shown in the formula: ,in It is the pseudo-inverse of the singular value matrix. The configuration can be done as follows: Set a singular value truncation threshold ε, set singular values less than ε to zero, and then invert the values to form the singular value. The algorithm dynamically adjusts ε based on the condition number of the matrix. By retaining the principal singular values and reconstructing the matrix after taking their reciprocals, it ensures that the solution with the minimum error is obtained in the least squares sense. Then, a gradient projection method is used to handle the constrained optimization problem. First, the gradient direction of the objective function is calculated, and then this gradient is projected onto the feasible region space that satisfies all constraints. Iterative adjustments ensure that the solution always satisfies the angle range and kinematic constraints, while maintaining the optimality of the optimization direction. Finally, the compensation vector is gradually optimized using Newton's method iteratively. In each iteration, the Hessian matrix and gradient vector of the objective function are calculated. The search direction is determined by solving a system of linear equations, and the step size is determined by line search. The convergence condition is set to a maximum of 100 iterations to ensure that the algorithm converges to the optimal solution within a finite number of steps, ultimately obtaining the optimal dynamic path compensation vector. The entire algorithm ensures the accuracy and real-time performance of path compensation through multi-level numerical optimization, providing high-precision input for beam control.
[0037] In step S15, the dynamic beam path compensation vector needs to be converted into a voltage control signal and sent, the actual position data of the beam is obtained, the position deviation is analyzed, and the dynamic beam path compensation vector is updated to obtain a stable beam pointing sequence. This includes: converting the dynamic beam path compensation vector into a voltage adjustment signal and sending it to the galvanometer, adjusting the initial deflection angle of the beam according to the preset expected path dataset, and obtaining the first beam position dataset. Based on the first beam position dataset, the positional deviation between the actual path and the expected path is calculated to obtain the first deviation dataset. If the first deviation dataset is lower than the preset matching degree threshold, the dynamic beam path compensation vector is updated to obtain the first compensation vector dataset; Based on the first compensation vector dataset, a new control signal is generated, the galvanometer angle is adjusted, and a stable beam pointing sequence is obtained.
[0038] It should be noted that the step of converting the dynamic beam path compensation vector into a voltage adjustment signal and sending it to the galvanometer, adjusting the initial deflection angle of the beam according to the preset expected path dataset to obtain the first beam position dataset, employs digital-to-analog conversion technology. The specific implementation process includes three key stages: signal quantization, conversion execution, and timing control. In the signal quantization stage, the digital dynamic beam path compensation vector is first normalized according to the galvanometer voltage range. A linear mapping algorithm is then used to convert the digital quantity into the corresponding voltage value. Specifically, the range of the digital input quantity (e.g., 0-65535 for 16-bit digital quantity) and the target voltage output range (e.g., -10V to +10V) are first determined, and then the formula is used to... Perform a linear transformation, where and These represent the minimum and maximum values of the voltage output range. and The minimum and maximum values of the digital input range are used to calculate precise analog voltage values. In the conversion execution stage, a high-bit digital-to-analog converter (typically 16-bit or higher resolution) is used to perform digital-to-analog conversion. The converter generates precise analog voltage signals based on the input digital codes. The conversion process includes two sub-steps: sample-and-hold and quantization encoding, ensuring the accuracy and stability of the voltage output. In the timing control stage, pulse width modulation (PWM) technology is used to control the signal output timing. The duration of the voltage signal is precisely controlled by adjusting the pulse duty cycle, while a clock synchronization mechanism ensures that the voltage outputs of multiple galvanometer electrodes maintain phase consistency. The expected path dataset is set based on a multi-source information fusion method. First, an ideal beam path model, including target position coordinates and motion trajectory parameters, is generated through theoretical calculations. Then, actual characteristic data is obtained through experimental calibration, and the actual deflection angle of the galvanometer under different voltages is recorded using high-precision measuring equipment. Finally, a data fitting algorithm is used to optimize the path parameters, establish a voltage-position mapping table, and dynamically compensate and adjust according to real-time factors such as ambient temperature and workload. The corresponding driving voltage is generated based on the target coordinates in the expected path dataset, and PWM technology is used to control the signal output timing.
[0039] Based on the first beam position dataset, the step of calculating the positional deviation between the actual path and the expected path to obtain the first deviation dataset employs a spatial coordinate transformation method. The specific implementation process includes four key stages: First, coordinate systematization is performed, using a rigid body transformation matrix to precisely register the actual measurement coordinate system with the theoretical coordinate system, ensuring the consistency of the spatial reference. Next, data preprocessing is performed, using a sliding window filtering technique to smooth the original position data. The window size is set to 5-10 data points to balance real-time performance and smoothing effect. Within the window, a moving average algorithm is used to calculate the mean, replacing the original value. Simultaneously, median filtering is used to eliminate impulse noise, effectively eliminating measurement noise and abnormal interference. Then, deviation calculation and analysis are performed, using the Euclidean distance algorithm to calculate the straight-line distance between the actual position and the target position point by point. Simultaneously, the deviation components along the X, Y, and Z axes are calculated, and timestamp information is recorded. Finally, trend feature extraction is performed, using the least squares method to fit the overall trend of trajectory deviation and constructing a linear regression model. Where x is the time series and y is the deviation value, the optimal parameters a and b are solved by minimizing the sum of squared residuals, thereby identifying systematic errors (the trend term characterized by parameter a) and random error characteristics (residual terms), generating a multi-dimensional first deviation dataset containing spatial position deviation, axial component, time series and trend characteristics, providing a comprehensive deviation information basis for subsequent compensation control. These processing steps ultimately serve the generation of enhanced charge density control schemes, providing data support for charge density parameter optimization through accurate deviation analysis and trend prediction.
[0040] If the first deviation dataset is lower than the preset matching degree threshold, the step of updating the compensation vector to obtain the first compensation vector dataset adopts an adaptive gain adjustment algorithm. The specific implementation process includes real-time monitoring of the changing trend of the deviation data, evaluating the dynamic response by calculating the first and second derivatives of the deviation, and dynamically adjusting the gain parameter according to the magnitude of the change rate. When the deviation changes drastically, the gain is increased to improve the response speed, and the gain is decreased when the change is gradual to avoid overshoot. At the same time, the gradient descent method is used to optimize the compensation vector. The gradient direction of the objective function with respect to the vector is calculated iteratively, the parameters are updated along the negative gradient, and an adaptive learning rate mechanism is set to dynamically adjust the step size to ensure convergence stability. The matching degree threshold is set based on the theoretically calculated maximum allowable deviation range, combined with the beam accuracy requirements to derive the theoretical value, calculate the standard deviation and distribution characteristics through statistical analysis of historical data, determine the boundary based on the three sigma principle, and then fine-tune through experimental calibration to balance the false alarm and false alarm rates. Finally, the first compensation vector dataset is generated through closed-loop optimization for precise control of the galvanometer angle.
[0041] Based on the first compensation vector dataset, a new control signal is generated to adjust the galvanometer angle and obtain a stable beam pointing sequence. This step employs a closed-loop control architecture, specifically involving five core steps: First, a high-precision digital-to-analog converter converts the digital compensation vector into an analog drive signal, using pulse width modulation (PWM) to precisely control the voltage amplitude and phase. Second, the control signal is applied to the galvanometer electrodes via a drive circuit to generate a corresponding deflection magnetic field. Then, distributed position sensors collect real-time beam position data, and coordinate transformation is used to convert the measured values to a unified coordinate system. Next, the real-time position data is compared with the expected path, the position deviation is calculated using the Euclidean distance algorithm, and filtering techniques are used to eliminate measurement noise. Finally, control parameters are dynamically adjusted based on the deviation data, and an adaptive algorithm is used to optimize the compensation vector in real-time. This process includes real-time monitoring of the deviation data's trends. The dynamic response characteristics are evaluated by calculating the first and second derivatives of the deviation. The gain parameter is dynamically adjusted according to the rate of change. When the deviation changes drastically, the gain is increased to improve the response speed, and when the change is gradual, the gain is decreased to avoid overshoot. Finally, the gradient descent method is used to optimize the compensation vector. The gradient direction of the objective function with respect to the vector is calculated iteratively, and the parameters are updated along the negative gradient. An adaptive learning rate mechanism is set to dynamically adjust the step size to ensure convergence stability. The stable beam pointing sequence is a highly stable and accurate beam deflection command sequence obtained through iterative optimization. Its acquisition process is based on real-time position feedback and adaptive control algorithm. Continuous monitoring and adjustment ensure that the beam trajectory is consistent with the expected path. This sequence contains timestamp and spatial coordinate information and is used to drive the galvanometer to perform precise beam deflection operations, providing a reliable optical path control basis for laser processing, and also serving as an important indicator for performance evaluation.
[0042] In step S16, it is necessary to acquire the real-time beam trajectory during the processing, calculate the integral value of the deviation between the real-time beam trajectory and the beam pointing sequence, and obtain the trajectory deviation integral value, including: The stable beam pointing sequence is integrated into real-time laser processing, and the real-time beam trajectory dataset is extracted. The real-time beam trajectory dataset is converted into a unified spatial coordinate system to obtain the first trajectory dataset; Based on the first trajectory dataset and the preset path dataset, the positional deviation between the actual trajectory and the preset path is calculated to obtain the second deviation dataset; If the deviation value of the second deviation dataset is greater than the preset matching degree threshold, the control signal parameters are adjusted to obtain the first correction signal dataset; Based on the first correction signal dataset, the galvanometer angle is adjusted by the driving circuit, and the updated beam trajectory dataset is obtained. The deviation from the expected path is calculated to obtain the trajectory deviation integral value.
[0043] It should be noted that the specific implementation process of integrating the stable beam pointing sequence into real-time laser processing and extracting the real-time beam trajectory dataset includes three key steps: First, a high-speed data channel between the control system and laser processing is established using the industrial Ethernet protocol to ensure that the command transmission delay is less than 1 millisecond; second, multiple sensor data, including the position information of the photodetector array and the angle feedback of the encoder, are acquired in real time through a high-speed data acquisition card at a sampling frequency of more than 1000 times per second, and a 16-bit or higher ADC converter is used to ensure data acquisition accuracy; finally, a precision clock synchronization mechanism is used to unify the data timestamps, and the IEEE 1588 precise time protocol or hardware trigger signal is used to ensure the time consistency of the data from each sensor, with the deviation controlled at the microsecond level. A high-speed data acquisition card is used to acquire beam position information at a sampling frequency of milliseconds, and the data timing consistency is ensured through timestamp synchronization.
[0044] The step of converting the real-time beam trajectory dataset into a unified spatial coordinate system to obtain the first trajectory dataset employs a coordinate transformation method. The specific implementation process includes three core steps: In the rigid body transformation matrix construction step, feature points with known coordinates are first arranged in the measurement space, and the rotation matrix and translation vector are calculated using the SVD decomposition method. The rotation matrix is obtained through the singular value decomposition of the covariance matrix of the feature point set, and the translation vector is calculated through the centroid coordinate difference, forming a complete rigid body transformation matrix. In the parameter optimization step, the least squares method is used to optimize the transformation parameters. By constructing a residual sum of squares objective function, the partial derivatives of the objective function with respect to the transformation parameters are calculated, and the optimal solution is obtained by solving the normal equation system. Iterative reweighted least squares is used to handle the influence of outliers. In the coordinate transformation execution step, the rigid body transformation matrix is applied to each data point, and coordinate transformation is achieved through matrix multiplication. Simultaneously, an error compensation algorithm is used to eliminate errors, ultimately generating an accurate first trajectory dataset.
[0045] It should be noted that the step of calculating the positional deviation between the actual trajectory and the preset path based on the first trajectory dataset and the preset path dataset to obtain the second deviation dataset uses the Euclidean distance algorithm to calculate the positional deviation point by point. Specifically, it calculates the Euclidean distance between the actual coordinates and the target coordinates of each sampling point, using the following formula: Here, Δx, Δy, and Δz represent the differences between the coordinate axes, generating a preliminary positional deviation sequence. Simultaneously, the trajectory tangent angle deviation is calculated through differential operations, and the first derivative of the trajectory points is calculated using the central difference method to obtain the rate of change of the tangent angle. Then, the angle deviation value is calculated using the arctangent function to reflect the degree of beam direction deviation. A sliding window filter is used to eliminate measurement noise. A moving average filter technique is used, with a window size of 10 data points. The average or median of the data is calculated within the window to smooth random noise and retain trend information. The preset path dataset is obtained through multi-source data fusion. First, the ideal beam path is calculated based on a theoretical optical model, generating a target point coordinate sequence. Then, through experimental calibration, the actual motion trajectory is recorded using high-precision measuring equipment (such as a laser interferometer), and the path parameters are optimized using a data fitting algorithm. Finally, historical operating data is integrated to establish a dynamic update mechanism, adjusting the path dataset according to environmental conditions and working status to generate a multidimensional dataset containing positional and angular deviations, i.e., the second deviation dataset.
[0046] It should be noted that if the deviation value of the second deviation dataset is greater than the preset matching threshold, the step of adjusting the control signal parameters to obtain the first correction signal dataset adopts an adaptive gain adjustment algorithm. The specific implementation process includes four core steps: First, the magnitude and trend of the deviation data are monitored in real time. The dynamic response characteristics are evaluated by calculating the first and second derivatives of the deviation. The proportional coefficient (P) is adjusted according to the absolute value of the deviation, the integral coefficient (I) is adjusted according to the integral value of the deviation, and the derivative coefficient (D) is adjusted according to the rate of change of the deviation. Second, the gradient descent method is used to optimize the control parameters. The objective function is constructed with the sum of squared deviations as the objective function. The gradient of the objective function with respect to the PID parameters is calculated. The parameter values are adjusted by iterative update rules, and the learning rate is used to control the step size to avoid oscillation. Then, the convergence condition is set. The optimization stops when the objective function value is lower than the threshold or the number of iterations reaches the upper limit. Finally, the optimized PID parameter combination is generated and applied to the control signal generation. The proportional, integral, and derivative coefficients of the PID controller are dynamically adjusted according to the magnitude and trend of the deviation. The control parameters are optimized by the gradient descent method, and the first correction signal dataset is finally output.
[0047] Based on the first correction signal dataset, the galvanometer angle is adjusted by the driving circuit, and an updated beam trajectory dataset is obtained. The deviation from the expected path is calculated to obtain the trajectory deviation integral value. This step uses a numerical integration method, and the specific implementation process includes four core steps: In the data preprocessing stage, the deviation values in the time series are sampled at equal intervals and outliers are removed to ensure that the data quality meets the integration requirements; in the integration algorithm selection stage, a composite trapezoidal integral method is used to improve the calculation accuracy. The time interval is divided into several sub-intervals, and the trapezoidal formula is applied to calculate the approximate integral value in each sub-interval; in the dynamic weight adjustment stage, an exponential decay forgetting factor is introduced to reduce the contribution of historical data through weighting coefficients, focusing more on recent deviation changes; in the real-time calculation stage, the trajectory deviation integral value is obtained by accumulating the weighted deviation value and the product of the time interval. By accumulating the deviation values over time, the trapezoidal integral method is used to improve calculation accuracy. A forgetting factor is introduced to reduce the weighting influence of historical data, ultimately generating an updated beam trajectory dataset. This dataset contains multi-dimensional information such as timestamps, spatial coordinates, deviation integral values, and quality control indicators, providing data support for performance evaluation and subsequent optimization. The trajectory deviation integral value is the accumulated deviation obtained by numerically integrating the trajectory deviations over time. It reflects the degree to which the beam trajectory deviates from the expected path within a specific time period. Its acquisition process is based on real-time acquired position data and a numerical integration algorithm, calculated by accumulating the product of the deviation values at each sampling moment and the time interval. This value is used to evaluate the overall performance of beam control. When it exceeds a preset threshold, backtracking analysis is triggered, providing a quantitative basis for optimizing control parameters.
[0048] In step S17, if the trajectory deviation integral value exceeds a preset integral deviation threshold, the disturbance data is reprocessed through backtracking analysis to adjust the charge density and obtain an enhanced charge density control scheme, including: If the trajectory deviation integral value exceeds the preset integral threshold, the disturbance data is backtracked to obtain the first disturbance dataset; Based on the first disturbance dataset, the charge density distribution parameters are adjusted to obtain the first control scheme dataset; Based on the dataset of the first control scheme, the control signal parameters are adjusted and the galvanometer angle is driven to obtain an enhanced charge density control scheme.
[0049] It should be noted that if the trajectory deviation integral value exceeds the preset integration threshold, the step of performing backtracking analysis on the disturbance data to obtain the first disturbance dataset adopts a time series analysis method. The specific implementation process includes four core steps: First, disturbance data within a historical time period is extracted using the sliding window technique. The window size is set to 100-200 data points to cover typical disturbance cycles, and the sliding step size is 10-20 points to ensure data continuity. Overlapping sampling is used to reduce boundary effects. Second, the main disturbance frequency components are identified using Fast Fourier Transform (FFT). The data within the window is then subjected to FFT calculation to generate a spectrum. A peak detection algorithm is used to identify amplitudes exceeding a preset amplitude threshold (such as 3 times the average amplitude). The significant frequencies (times) of the disturbance are determined based on noise levels, historical disturbance amplitude statistical characteristics, or acceptable signal-to-noise ratio limits, and their frequency values and amplitudes are recorded. Then, the influence weight of each disturbance source on the deviation is determined through correlation analysis, and the Pearson correlation coefficient between each frequency component and the integral value of the trajectory deviation is calculated. Weight values are assigned according to the magnitude of the correlation coefficient. Finally, all analysis results are integrated to generate a multidimensional dataset containing disturbance type (such as temperature, vibration), amplitude, frequency components, and time-domain characteristics (such as duration, occurrence timestamp). The influence weight of each disturbance source on the deviation is determined through correlation analysis, and a multidimensional dataset containing disturbance type, amplitude, frequency, and time-domain characteristics is generated, namely the first disturbance dataset.
[0050] The step of adjusting the charge density distribution parameters based on the first perturbation dataset to obtain the first control scheme dataset employs a particle filtering algorithm. The specific implementation process includes four core steps: First, a state-space model is established, defining a state equation to describe the evolution of charge density over time, and an observation equation to correlate perturbation data with changes in charge density. Second, a Monte Carlo method is used to generate a particle swarm. A large number of particles (typically 1000-5000) are randomly selected from the prior distribution through importance sampling. To simplify calculations, an adaptive particle number adjustment strategy can be adopted, dynamically increasing or decreasing the number of particles based on real-time performance. For example, reducing to 1000 particles to reduce load when the perturbation is small, or increasing to 5000 particles to improve accuracy when uncertainty is high. Simultaneously, hierarchical sampling or quasi-Monte Carlo methods are used to improve sampling efficiency. Then, a resampling algorithm is used to optimize particle weights. The likelihood of each particle is calculated based on the matching degree between observed and predicted data, using a Gaussian likelihood function to calculate the weight value. The weight threshold is determined through historical data statistics (usually set to the average weight). (20%-30%), using a system resampling method, firstly, a weighted cumulative distribution function is constructed. Particles with weights below the threshold are eliminated through uniform random sampling, and high-weight particles are replicated according to their weight ratio. Finally, the optimal parameter combination is calculated based on the weighted particle set, using a weighted mean estimation method. The weights are set based on the importance weights in the particle filtering algorithm. Specifically, the matching degree between each particle and the observed data is calculated using the Gaussian likelihood function to generate initial weight values. Then, the weights are normalized so that the sum of all weights is 1. The weight threshold is determined by analyzing the statistical characteristics of the weight distribution in historical operating data. Typically, 20%-30% of the weight mean is taken as the elimination threshold. The normalized weights are screened and optimized. Iterative optimization is performed using the expectation-maximization algorithm. The weight distribution is recalculated in each iteration until the parameters converge (change less than 0.1%). A first control scheme dataset containing optimized charge density distribution parameters is generated. This dataset contains optimal parameter values, confidence intervals, and performance indicators, providing precise parameter guidance for charge density control.
[0051] Based on the dataset of the first control scheme, the control signal parameters are adjusted and the galvanometer angle is driven to obtain an enhanced charge density control scheme. This step employs a model predictive control method, which includes three core steps: First, a predictive model is established. A dynamic relationship model between charge density and control voltage is constructed using a system identification method. This method uses experimental or operational data and employs the least squares method to estimate the system matrix, input matrix, and output matrix in the state-space model, thereby establishing the evolution law described by the state-space equation. Second, rolling optimization is implemented. In each control cycle, the finite-time optimal control problem is solved. The optimal voltage sequence is calculated using a quadratic programming algorithm, and only the first control variable is executed. Finally, feedback correction is performed. The actual output is compared with the predicted value, and an error compensation mechanism is used to correct the predictive model. Simultaneously, an adaptive algorithm is used to optimize the control effect. By monitoring performance indicators in real time, the controller parameters are automatically adjusted, and the weight matrix is optimized online using the gradient descent method. Convergence is guaranteed based on Lyapunov stability theory, ultimately generating an enhanced charge density control scheme. The charge density control scheme is a comprehensive control strategy obtained through multi-source data fusion and optimization algorithms. It includes the charge distribution target, the set of control parameters, and the execution rules. Its acquisition process is based on historical data analysis and real-time optimization calculations. By establishing a mapping relationship between charge density and control parameters, an iterative algorithm is used to solve for the optimal solution. This scheme is used to guide the real-time adjustment of the galvanometer electric field. By adjusting the electrode voltage sequence to change the charge distribution, the electric field uniformity is optimized, the beam pointing accuracy is improved, and a basis for performance evaluation is provided.
[0052] Reference Figure 2 The second embodiment of the present invention provides a control system for improving the pointing accuracy of a galvanometer, comprising: The data acquisition module is used to acquire disturbance data and galvanometer surface charge density distribution data, perform signal extraction and spectrum analysis, calculate charge density deviation vector, and obtain disturbance frequency spectrum and charge deviation characteristics. The simulation calculation module is used to calculate the electric field intensity gradient based on the perturbation frequency spectrum and charge deviation characteristics, and adjust the voltage amplitude and phase according to the deviation of the electric field intensity gradient to adjust the charge density distribution and obtain the real-time charge density distribution. The electric field correction module is used to analyze the uniformity of the real-time charge density distribution, and correct the voltage sequence based on the analysis results to obtain the corrected electric field distribution. The path compensation module is used to calculate the beam deflection angle parameters based on the corrected electric field distribution, and fuse them with a preset historical beam deflection dataset. Based on the fusion result, path compensation calculation is performed to obtain a dynamic beam path compensation vector. The data feedback module is used to convert the dynamic beam path compensation vector into a voltage control signal and send it, obtain the actual position data of the beam feedback, analyze the position deviation, update the dynamic beam path compensation vector, and obtain a stable beam pointing sequence. The deviation analysis module acquires the real-time beam trajectory during the processing, calculates the integral value of the deviation between the real-time beam trajectory and the beam pointing sequence, and obtains the trajectory deviation integral value. The result output module is used to reprocess the disturbance data through backtracking analysis and adjust the charge density if the trajectory deviation integral value exceeds a preset integral deviation threshold, thereby obtaining an enhanced charge density control scheme.
[0053] It should be noted that the control device for improving the pointing accuracy of a galvanometer provided in this embodiment of the invention is used to execute all the process steps of the control method for improving the pointing accuracy of a galvanometer in the above embodiment. The working principle and beneficial effect of the two are one-to-one, so they will not be described again.
[0054] This invention also 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 parameter adjustment program. When the processor executes the computer program, it implements the steps in the various control method embodiments for improving the pointing accuracy of the galvanometer described above, for example... Figure 1 The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as the data feedback module.
[0055] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0056] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0057] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0058] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0059] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed 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 electrical carrier signals and telecommunication signals.
[0060] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0061] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A control method for improving a galvanometer pointing accuracy, characterized by, The method comprises the following steps: acquiring disturbance data and mirror surface charge density distribution data, performing signal extraction and frequency spectrum analysis, calculating charge density deviation vector, obtaining disturbance frequency spectrum and charge deviation characteristics; According to the disturbance frequency spectrum and the charge deviation characteristics, the electric field intensity gradient is calculated, the voltage amplitude and phase are adjusted according to the deviation of the electric field intensity gradient, the charge density distribution is adjusted, and the real-time charge density distribution is obtained; Analyze the uniformity of the real-time charge density distribution, and correct the voltage sequence according to the analysis result to obtain the corrected electric field distribution; According to the modified electric field distribution, the light beam deflection angle parameter is calculated, and the preset historical light deflection data set is fused, and according to the fusion result, the path compensation calculation is carried out to obtain the dynamic light beam path compensation vector; The dynamic light beam path compensation vector is converted into voltage control signal and sent, the feedback light beam actual position data is acquired, the position deviation is analyzed, and the dynamic light beam path compensation vector is updated to obtain a stable light beam pointing sequence; Obtain the real-time light beam trajectory in the processing process, calculate the deviation integral value of the real-time light beam trajectory and the light beam pointing sequence, and obtain the trajectory deviation integral value; If the trajectory deviation integral value exceeds the preset integral deviation threshold, the disturbance data is reprocessed through backtracking analysis, the charge density is adjusted, and an enhanced charge density regulation scheme is obtained.
2. The control method for improving the pointing accuracy of a galvanometer according to claim 1, characterized in that, The method comprises the following steps: acquiring disturbance data and mirror surface charge density distribution data, performing signal extraction and frequency spectrum analysis, calculating charge density deviation vector, obtaining disturbance frequency spectrum and charge deviation characteristics; The disturbance data and the mirror surface charge density distribution data are filtered to obtain standardized temperature signals and vibration signals; According to the standardized temperature signals and vibration signals, time series analysis is performed by Fourier transform to calculate frequency components and obtain disturbance frequency spectrum; 3. The control method for improving the pointing accuracy of a galvanometer according to claim 1, characterized in that, According to the disturbance frequency spectrum, frequency analysis is performed, and the charge density deviation vector is calculated based on the mirror surface charge density distribution data to obtain the charge deviation characteristics. The method comprises the following steps: According to the disturbance frequency spectrum and the mirror surface charge density distribution data, the spatial electric field is simulated by finite element analysis, the electric field distribution change is calculated, and the spatial electric field distribution data is obtained; According to the spatial electric field distribution data, the charge density spatial adjustment matrix is calculated, and the spatial electric field distribution data and the mirror surface charge density distribution data are spatially mapped to obtain the electric field intensity gradient by gradient calculation; If the data deviation of the electric field intensity gradient exceeds the preset gradient threshold, the voltage sequence data is adjusted by proportional integral differential algorithm to obtain optimized voltage sequence data; wherein the voltage sequence data includes the voltage amplitude and phase of the mirror electrode; According to the optimized voltage sequence data, voltage sequence is applied to the mirror electrode, and the charge density distribution is adjusted through real-time feedback control cycle to obtain real-time charge density distribution.
4. The control method for improving the pointing accuracy of a galvanometer according to claim 1, characterized in that, The analysis of the real-time charge density distribution, according to the analysis result, the voltage sequence is corrected, and the corrected electric field distribution is obtained, including: According to the real-time charge density distribution, the spatial electric field is simulated and the electric field distribution characteristics are calculated to obtain the first electric field distribution model data; If the uniformity deviation of the first electric field distribution model data exceeds the preset uniformity threshold, the voltage sequence is recalculated to obtain the corrected voltage sequence data; According to the corrected voltage sequence data, the voltage sequence is applied to the galvanometer electrode through a real-time feedback control loop to obtain the corrected electric field distribution.
5. The control method for improving the pointing accuracy of a galvanometer according to claim 1, characterized in that, According to the corrected electric field distribution, the light beam deflection angle parameter is calculated, and is fused with the preset historical light deflection data set, according to the fusion result, the path compensation calculation is carried out, and the dynamic light beam path compensation vector is obtained, including: According to the corrected electric field distribution, the physical relationship between the electric field distribution and the light beam deflection is analyzed to obtain the light beam deflection angle parameter; According to the light beam deflection angle parameter, three-dimensional space calculation is carried out to obtain the first light beam deflection angle data set; According to the first light beam deflection angle data set, the preset historical light deflection data set is fused to obtain the fused angle parameter data set; The path compensation calculation is carried out on the fused angle parameter data set to obtain the dynamic path compensation vector.
6. The control method for improving the pointing accuracy of a galvanometer according to claim 1, characterized by, The dynamic light beam path compensation vector is converted into a voltage control signal and sent, the feedback light beam actual position data is obtained, the position deviation is analyzed, and the dynamic light beam path compensation vector is updated to obtain a stable light beam pointing sequence, including: The dynamic light beam path compensation vector is converted into a voltage adjustment signal and sent to the galvanometer, and the light beam initial deflection angle is adjusted according to the preset expected path data set to obtain the first light beam position data set; According to the first light beam position data set, the position deviation between the actual path and the expected path is calculated to obtain the first deviation data set; If the first deviation data set is lower than the preset matching threshold, the dynamic light beam path compensation vector is updated to obtain the first compensation vector data set; According to the first compensation vector data set, a new control signal is generated to adjust the galvanometer angle to obtain a stable light beam pointing sequence.
7. The control method for improving the pointing accuracy of a galvanometer according to claim 1, characterized in that, The real-time light beam trajectory in the processing process is obtained, and the deviation integral value of the real-time light beam trajectory and the light beam pointing sequence is calculated to obtain the trajectory deviation integral value, including: The stable light beam pointing sequence is integrated into the real-time laser processing, and the real-time light beam trajectory data set is extracted; The real-time light beam trajectory data set is converted into a unified spatial coordinate system to obtain the first trajectory data set; According to the first trajectory data set and the preset path data set, the position deviation between the actual trajectory and the preset path is calculated to obtain the second deviation data set; If the deviation value of the second deviation data set is greater than the preset matching threshold, the control signal parameter is adjusted to obtain the first correction signal data set; According to the first correction signal data set, the galvanometer angle is adjusted through the driving circuit, and the updated light beam trajectory data set is obtained, and the deviation between the expected path is calculated to obtain the trajectory deviation integral value.
8. The control method for improving the pointing accuracy of a galvanometer according to claim 1, characterized in that, If the trajectory deviation integral value exceeds the preset integral deviation threshold value, the disturbance data is reprocessed through backtracking analysis, the charge density is adjusted, and an enhanced charge density regulation scheme is obtained, including: If the trajectory deviation integral value exceeds the preset integral threshold value, the disturbance data is backtracked and analyzed to obtain a first disturbance data set; According to the first disturbance data set, the charge density distribution parameters are adjusted to obtain a first regulation scheme data set; According to the first regulation scheme data set, the control signal parameters are adjusted and the galvanometer angle is driven to obtain an enhanced charge density regulation scheme.
9. A control system for improving the pointing accuracy of a galvanometer, characterized in that, Including: The data acquisition module is used for acquiring disturbance data and galvanometer surface charge density distribution data, performing signal extraction and frequency spectrum analysis, calculating a charge density deviation vector, obtaining a disturbance frequency spectrum and a charge deviation characteristic; The simulation calculation module is used for calculating the electric field intensity gradient according to the disturbance frequency spectrum and the charge deviation characteristic, adjusting the voltage amplitude and phase according to the deviation of the electric field intensity gradient, adjusting the charge density distribution, and obtaining the real-time charge density distribution; The electric field correction module is used for analyzing the uniformity of the real-time charge density distribution, correcting the voltage sequence according to the analysis result, and obtaining the corrected electric field distribution; The path compensation module is used for calculating the light beam deflection angle parameters according to the corrected electric field distribution, and fusing with the preset historical light beam deflection data set, and calculating the path compensation according to the fusion result to obtain a dynamic light beam path compensation vector; The data feedback module is used for converting the dynamic light beam path compensation vector into a voltage control signal and sending, acquiring the feedback light beam actual position data, analyzing the position deviation, and updating the dynamic light beam path compensation vector to obtain a stable light beam pointing sequence; The deviation analysis module obtains the real-time light beam trajectory in the processing process, calculates the deviation integral value of the real-time light beam trajectory and the light beam pointing sequence, and obtains the trajectory deviation integral value; The result output module is used for reprocessing the disturbance data through backtracking analysis if the trajectory deviation integral value exceeds the preset integral deviation threshold value, adjusting the charge density, and obtaining an enhanced charge density regulation scheme.
