Galvanometer correction system, correction method and galvanometer graph processing method
By integrating a galvanometer correction system with automatic orientation matching and distortion compensation modules, the problems of fragmented galvanometer correction processes and non-persistent parameters in existing technologies are solved, achieving efficient and accurate galvanometer scanning, which is suitable for industrial scenarios such as laser marking and precision cutting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-03
- Publication Date
- 2026-04-10
AI Technical Summary
Existing galvanometer calibration schemes suffer from problems such as fragmented calibration processes, imperfect coordinate transformation mechanisms, inability to persistently store parameters, reliance on fixed templates, and manual orientation calibration. These issues result in low accuracy and efficiency of galvanometer scanning systems in industrial production, making it difficult to meet the demands of high-precision machining.
A galvanometer calibration system is provided, including an automatic orientation matching module, a bolster distortion coefficient calculation module, a parameter storage and management module, a real-time coordinate compensation module, and a synchronous control module. It realizes integrated closed-loop calibration of orientation calibration and distortion compensation. The system uses a non-volatile storage unit to save parameters and calculates the distortion coefficient by measuring eight preset orientations and feature edges, thus realizing an automated and persistent calibration process.
It significantly shortens calibration time, improves calibration efficiency and accuracy, reduces human error, ensures consistency across different devices and batches, supports rapid adaptation to different scanning widths, is suitable for industrial batch applications, and enhances the level of intelligent production.
Smart Images

Figure CN121820872A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of laser processing and precision motion control technology, specifically relating to a galvanometer correction system, correction method, and galvanometer pattern processing method. Background Technology
[0002] As a core motion control unit in laser marking, PCB laser cutting, and precision inspection, the scanning accuracy of the galvanometer scanning system directly determines the contour consistency and dimensional accuracy of the processed graphics. In practical applications, the galvanometer needs to achieve micron-level positioning within a scanning area of tens to hundreds of millimeters. However, due to the combined effects of galvanometer motor deflection nonlinearity, optical system distortion, and mechanical assembly errors, the scanned graphics often exhibit directional deviation and barrel distortion problems. Especially under large scanning areas, the distortion error in the edge region accumulates exponentially, resulting in obvious concavity or convexity at the edges of the graphics, which severely restricts the application of high-precision machining scenarios.
[0003] However, existing galvanometer correction schemes still have the following drawbacks: 1. Fragmented and inefficient calibration process: In existing technologies, orientation calibration and distortion compensation are independent manual operations. Technicians must first process the test pattern and manually observe the orientation deviation, repeatedly adjusting the galvanometer drive parameters to achieve orientation alignment; then, a separate distortion compensation process is performed, calculating the distortion coefficient by measuring the length of the feature edges. The entire process relies on the operator's visual judgment and experience, with a single full-process calibration taking more than 30 minutes, and the calibration results from different technicians can deviate by more than 5μm, making it difficult to guarantee the consistency and repeatability of calibration results in industrial production.
[0004] 2. Imperfect coordinate transformation mechanism and large edge errors: Traditional galvanometer drive systems typically use only linear mapping formulas to directly convert physical coordinates into digital drive signals during coordinate transformation, without dynamically compensating for cylinder distortion in real time. This results in positioning errors of tens of micrometers in the edge areas of the display due to the superposition of optical distortion and mechanical nonlinearity, which cannot meet the micrometer-level precision requirements of laser precision cutting, PCB circuit etching, and other applications.
[0005] 3. Calibration parameters cannot be persistently stored, resulting in poor production continuity: Existing calibration parameters are mostly temporarily stored in the system RAM cache. These parameters are automatically lost after equipment restarts, power outages, or changes in processing width, requiring a complete re-calibration process. Statistics show that downtime due to parameter loss on a single machine can exceed 4 hours per month. Although some solutions attempt to store parameters in local files, they lack a mapping mechanism between processing width and parameters. Switching between widths requires manual retrieval and loading of parameters, which is cumbersome and prone to parameter matching errors, failing to meet the demands of rapid production changeovers for multiple product types and small batches.
[0006] 4. Reliance on fixed templates and poor adaptability: Existing distortion correction techniques mostly rely on standard templates of specific sizes, calculating a single distortion coefficient by measuring the deviation between the template edge line length and the theoretical value. When the processing area changes, the distortion coefficient of the original template becomes completely invalid, requiring the creation of a new template of the corresponding size and the repetition of the measurement process. This not only increases the correction cost and time, but also, under large scanning areas, the nonlinear distortion in the edge region cannot be fully compensated by a single coefficient, resulting in an edge positioning error exceeding 10μm.
[0007] 5. Orientation calibration relies on manual labor, resulting in low accuracy and efficiency: Current orientation calibration methods mostly employ manual visual comparison. Technicians need to drive a galvanometer to process a standard rectangular test pattern, then compare the processed result with eight pre-selected directions one by one, manually matching the closest deflection direction and adjusting the driving parameters. This method is greatly affected by lighting, observation angle, and personnel experience. A single orientation calibration requires processing the test pattern 3-5 times, taking more than 15 minutes, which is difficult to meet the high-efficiency requirements of industrial production.
[0008] In summary, traditional galvanometer calibration schemes have significant shortcomings in calibration procedures, compensation mechanisms, parameter management, and orientation calibration, making it difficult to balance accuracy, efficiency, and stability. There is an urgent need for an integrated, automated, and persistent calibration system and method to improve the reliability, accuracy, and efficiency of galvanometer scanning systems in industrial production.
[0009] It should be noted that the above description of the technical background is only for the purpose of providing a clear and complete explanation of the technical solutions of the present invention and facilitating understanding by those skilled in the art. It should not be assumed that the above technical solutions are known to those skilled in the art simply because they have been described in the background section of this invention. Summary of the Invention
[0010] To overcome the shortcomings of the prior art, the present invention aims to provide a galvanometer correction system, a correction method, and a galvanometer pattern processing method.
[0011] To achieve the above and other related objectives, the present invention provides a galvanometer correction system, comprising: The automatic orientation matching module is used to automatically match the processed test pattern with multiple preset orientations to determine the actual scanning orientation of the galvanometer and generate orientation coefficients. The pillow barrel distortion coefficient calculation module is used to measure the lengths of multiple characteristic sides of a standard rectangular test pattern and calculate the pillow barrel distortion coefficient based on the measurement results. The parameter storage and management module is used to associate the orientation coefficient with the pillow barrel distortion coefficient with the sheet size and store it persistently, supporting automatic loading; The coordinate real-time compensation and transformation module is used to receive the original coordinates, call the stored coefficients for real-time compensation, and convert them into galvanometer drive signals; The synchronization control module is used to control the synchronized operation of the laser and the galvanometer. The automatic parameter verification module is used to automatically verify the correction accuracy after the parameters are loaded.
[0012] This solution achieves integrated closed-loop correction of orientation calibration and distortion compensation, improving correction efficiency and accuracy, and avoiding manual intervention and parameter loss.
[0013] Furthermore, the automatic direction matching module presets eight pre-selected directions, which are distributed at angular intervals of 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°. This solution covers the common deflection deviation range of galvanometers, improving the comprehensiveness and accuracy of direction matching.
[0014] Furthermore, the feature edges measured by the pillow-barrel distortion coefficient calculation module include: L1 and L3, corresponding to the actual lengths of two opposite sides of the rectangle; L2 and L4, corresponding to the actual lengths of the other two opposite sides of the rectangle; L5, corresponding to the actual length from the midpoint of L2 to the midpoint of L4; and L6, corresponding to the actual length from the midpoint of L1 to the midpoint of L3. This scheme comprehensively quantifies the pillow-shaped, barrel-shaped, and nonlinear distortions through six feature edges, improving compensation accuracy.
[0015] Furthermore, the parameter storage and management module employs non-volatile storage units and establishes a key-value mapping table between sheet size and correction parameters. This solution achieves persistent parameter storage and automatic sheet-related retrieval, improving production continuity and operational convenience.
[0016] Furthermore, the real-time coordinate compensation and transformation module executes the following transformation formula: ; ; Where X1 and Y1 are the compensated coordinates, L is the side length of the scanning area, DA_MAX=65535, and DA_ZERO=32768.
[0017] In this scheme, real-time nonlinear compensation and linear mapping of coordinates are achieved, which greatly reduces the positioning error of the edge of the application area.
[0018] The present invention also provides a galvanometer calibration method, comprising the following steps: Step 1: Input the target image for calibration, process the test image and automatically match the galvanometer direction to generate the direction coefficient; Step 2: Process the standard rectangular test pattern, measure the actual length of the feature sides L1 to L6, and calculate the pillow barrel distortion coefficient; Step 3: Associate the orientation coefficient and distortion coefficient with the current paper size and save it to a non-volatile memory unit; Step 4: In actual processing, the stored coefficients are called up to compensate the original coordinates in real time and converted into drive signals to control the galvanometer scanning.
[0019] This solution provides a fully automated, high-precision, and persistent calibration process, which significantly shortens calibration time and improves system stability.
[0020] Furthermore, the automatic matching of the galvanometer direction includes: Extract the contour and direction features of the processed graphic; Calculate the similarity with eight pre-selected directions; The direction with the highest similarity is selected as the actual scanning direction, and the direction coefficient is calculated.
[0021] This solution achieves automated and high-precision orientation calibration, eliminating human error.
[0022] Furthermore, the calculation of the pillow-shaped distortion coefficient includes: calculating the pillow-shaped distortion component based on L1 and L3; calculating the barrel-shaped distortion component based on L2 and L4; calculating the nonlinear distortion component based on L5 and L6; and synthesizing the comprehensive distortion coefficient. This scheme achieves refined quantification and compensation of distortion, especially improving the accuracy of edge regions.
[0023] Furthermore, the real-time compensation coordinate step employs a nonlinear compensation function, the function of which is: ; ; in, , The direction compensation amount is generated based on the direction coefficient. , This is the distortion compensation amount generated based on the distortion coefficient of the pillow barrel; The distortion compensation amount , It is a nonlinear function of coordinates (X, Y), and its coefficients are determined by the distortion coefficient of the pillow barrel.
[0024] This scheme separates and superimposes orientation compensation and nonlinear distortion compensation, making the compensation model clearer and easier to implement and adjust. The nonlinear compensation part can accurately correct the distortion characteristics of different regions, especially significantly improving the positioning accuracy in the edge region of large-format paper, while maintaining the universality and scalability of the algorithm structure.
[0025] This invention also provides a method for processing galvanometer patterns, based on the above-mentioned galvanometer correction method, comprising the following steps: Input a digital file of the target graphic and parse it to obtain the original coordinate sequence (X, Y); The pre-stored correction parameters are called to perform real-time nonlinear compensation on the original coordinates to obtain the corrected coordinates (X1, Y1); The corrected coordinates (X1, Y1) are converted into the digital drive signals DA_X, DA_X required by the galvanometer drive board using the drive conversion formula; The digital drive signal is sent to the galvanometer drive board to drive the galvanometer motor to generate the corresponding deflection angles α and β. The laser switch is synchronously controlled so that the laser spot emits light when the galvanometer moves to the target position, thereby forming a preset pattern on the workpiece surface.
[0026] This solution achieves closed-loop control of the entire process from digital graphics to high-precision laser scanning; through real-time coordinate compensation and synchronous laser control, it ensures the accuracy of graphic output, and is especially suitable for industrial scenarios with strict requirements for graphic fidelity, such as laser marking and precision cutting.
[0027] Due to the application of the above technical solution, the beneficial effects of this invention compared with the prior art are as follows: 1. This invention integrates orientation calibration and distortion compensation into a single closed-loop process, avoiding repetitive processing and manual intervention in step-by-step operations, thus greatly shortening the calibration time.
[0028] 2. This invention replaces manual visual comparison with an automatic matching mechanism of eight pre-selected directions, eliminating human error and improving the direction calibration accuracy to the μm level, while ensuring consistent calibration results across different devices and batches.
[0029] 3. This invention adopts a nonlinear compensation model that separates orientation and distortion to achieve high-precision real-time coordinate correction and realizes real-time dynamic compensation from the original coordinates to the driving signal, thereby improving the positioning accuracy of any position within the area and reducing the error in the edge region to within 5μm.
[0030] 4. This invention uses a non-volatile storage unit to save calibration parameters and establishes a frame-parameter mapping mechanism. When the equipment restarts or switches frames, the corresponding parameters can be automatically loaded, reducing downtime and saving calibration time.
[0031] 5. This invention calculates the distortion coefficient by measuring standardized feature edges L1 to L6, without relying on fixed-size templates, and supports rapid adaptation to different scanning areas from 50mm to 500mm, significantly improving the system's flexibility and versatility.
[0032] 6. This invention integrates orientation matching, distortion calculation, parameter storage, coordinate compensation and synchronous control into one, realizing full-process automation of "input graphics - automatic correction - parameter saving - processing application", reducing the technical dependence on operators and making it suitable for industrial batch applications.
[0033] 7. This invention eliminates the need for manual intervention throughout the entire process, from graphic import and automatic coordinate correction to drive signal generation and synchronous laser scanning, thereby improving the level of intelligent production and consistency.
[0034] 8. This invention is compatible with mainstream 16-bit DA driver boards (DA_MAX=65535, DA_ZERO=32768 are standard values), supports seamless upgrades of existing galvanometer hardware systems, without the need to replace the core driver hardware, thus reducing modification costs. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the original correction pattern of the present invention; Figure 2 This is a schematic diagram of the eight preset directions of the present invention; Figure 3 This is a schematic diagram of the L1 to L6 of the present invention labeled on a graphic. Figure 4 This is a schematic diagram of the correction method of the present invention; Figure 5 This is a schematic diagram of the galvanometer pattern processing execution flow of the present invention; Figure 6 This is a schematic diagram illustrating the coordinate definition of the galvanometer scanning plane in this invention; Detailed Implementation The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification.
[0036] It should be noted that in the description of this invention, the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product is in use. These terms are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance. The terms "horizontal," "vertical," and "suspended," etc., do not indicate that the component must be absolutely horizontal or suspended, but rather that it can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0037] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0038] In the description of this application, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is usually based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this application and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this application; the directional terms "inner" and "outer" refer to the inner and outer contours relative to the outline of each component itself.
[0039] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer and more explicit definition of the scope of protection of the present invention.
[0040] Example 1: This embodiment provides a galvanometer calibration system, which includes the following modules: Automatic direction matching module: This module presets eight directions (0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°) and extracts the processing test pattern using image processing algorithms. Figure 1 The contour feature points of ) and the preset direction ( Figure 2 The system performs similarity matching to automatically determine the actual scanning direction of the galvanometer and outputs the direction coefficient K_dir. The direction coefficient is used to adjust the sign or scale of the X and Y axes during coordinate transformation to ensure that the scanning direction is consistent with the set direction.
[0041] Pillow-barrel distortion coefficient calculation module: This module is used to accurately quantify the geometric distortion of the galvanometer system after orientation calibration. Its workflow and core algorithm are as follows: Measurement Object and Definition: The module-driven galvanometer processes a standard rectangular test shape with a theoretical side length of L_theory. Subsequently, the six key feature sides of the rectangle (e.g., ...) are obtained through an integrated high-precision vision measurement system or length measuring device. Figure 3 The actual length (as shown) is defined as L1_act to L6_act. Where: L1_act and L3_act: are the actual lengths of a pair of opposite sides of the rectangle along the X-axis.
[0042] L2_act and L4_act: These are the actual lengths of a pair of opposite sides of the rectangle along the Y-axis.
[0043] L5_act: The length of the line connecting the midpoint of edge L2_act to the midpoint of edge L4_act. This line segment is parallel to the X-axis and passes through the center of the scanning area, used to measure the actual size of the Y-axis centerline.
[0044] L6_act: The length of the line segment connecting the midpoint of side L1_act to the midpoint of side L3_act. This line segment is parallel to the Y-axis and passes through the center of the scanning area, and is used to measure the actual size of the X-axis centerline.
[0045] L5_act and L6_act intersect perpendicularly at the center of the rectangle, forming a "cross" measurement reference. This design allows for independent and decoupled evaluation of distortions in the X and Y directions.
[0046] Coefficient Calculation Process: Based on the six feature measurements (L1_act to L6_act) and their theoretical values (L_theory), the module calculates a set of multidimensional pillow barrel distortion coefficients K_dist using a pre-defined mathematical model. This model aims to describe the mapping relationship from ideal coordinates to actual scanning positions, and its calculation process typically includes: Edge distortion component calculation: The deviations of L1_act and L3_act from the theoretical values are used to mainly quantify the pincushion or barrel distortion trend in the X direction; the deviations of L2_act and L4_act are used to mainly quantify the distortion trend in the Y direction.
[0047] Central nonlinear component calculation: The distortion performance in the central region of the scan area is evaluated using the measurements of L5_act and L6_act. Since L5 and L6 avoid the edges, their length deviations better reflect the nonlinear distortion characteristics of the system and are used to calculate higher-order compensation coefficients.
[0048] Coefficient synthesis: The final output K_dist is a set of coefficients (e.g., {K_pincushion_x, K_barrel_y, K_nonlinear_xy, ...}), which will be used as parameters and embedded into the nonlinear compensation function of the coordinate real-time compensation transformation module.
[0049] This module transforms complex spatial geometric distortions into a set of storable and retrievable mathematical model parameters through a standardized and repeatable measurement process. It not only replaces the traditional method that relies on fixed templates and manual measurements, but also provides a crucial data foundation for building a high-precision nonlinear compensation model that can simultaneously correct distortions in both edge and central regions by introducing centerline measurements (L5, L6).
[0050] Parameter storage and management module: SPI Flash is used as the non-volatile storage medium, and the storage structure is a mapping table of "size_L—orientation coefficient K_dir—distortion coefficient K_distortion". When the system powers on or the user switches sizes, the mapping table is automatically queried and the corresponding parameters are loaded into RAM for real-time retrieval.
[0051] Real-time coordinate compensation and transformation module: This module receives the raw coordinates (X, Y) from the CAD / CAM system and performs compensation calculations according to the following formula: ; ; Where K_dir_x and K_dir_y are the direction coefficient components, and K_pincushion and K_barrel are the bolster barrel distortion coefficients. The compensated coordinates X1 and Y1 are then converted into DA drive signals using a linear mapping formula.
[0052] Synchronization control module: This module uses FPGA or high-speed MCU to achieve strict synchronization between the laser TTL signal and the galvanometer drive signal, ensuring that the laser is emitted exactly when the galvanometer moves to the target position, thus avoiding pattern trailing or breakage.
[0053] Automatic parameter verification module: After the calibration parameters are loaded, the system automatically processes a verification rectangle with a side length of L / 2, measures the length of each side and the length of the diagonal. If the deviation from the theoretical value exceeds the preset threshold (such as 3μm), the user is prompted to recalibrate to ensure the validity of the parameters.
[0054] Example 2: like Figure 4 As shown, this embodiment provides a galvanometer calibration method, which includes the following steps: Step 1: Start calibration, input the standard calibration target graphic (such as a square with a side length of 100mm).
[0055] Step 2: Drive the galvanometer to process the pattern, and use a CCD camera to capture the processed image and extract the contour direction angle.
[0056] Step 3: Match the extracted direction angle with eight preset directions, select the closest direction as the current direction of the galvanometer, and the system automatically calculates and temporarily stores the direction coefficient K_dir.
[0057] Step 4: Drive the galvanometer again to process a standard rectangular shape of the same size, and use a high-precision length measuring instrument or vision measurement system to measure the actual length of L1 to L6.
[0058] Step 5: Calculate the pillow barrel distortion coefficient K_distortion based on the measured values of L1 to L6. The specific calculation formula is as described in Example 1.
[0059] Step 6: Associate and store the current paper size L=100mm, orientation coefficient K_dir, and distortion coefficient K_distortion into the SPI Flash.
[0060] Step 7: Calibration complete, the system can enter the ready state.
[0061] The graphic processing execution flow is as follows: Figure 5 As shown: After calibration, the system enters the actual graphic processing stage, and its execution flow is as follows: 1. Graphic Input and Parsing: The system receives the digital file of the target graphic (such as DXF or PLT format) and parses out the original coordinate sequence (X, Y) of each point on the graphic outline, such as... Figure 6 As shown.
[0062] 2. Real-time coordinate compensation: For each original coordinate (X, Y), the system calls the direction coefficient and bolster distortion coefficient stored in memory, and calculates the corrected coordinate (X1, Y1) through the nonlinear compensation function.
[0063] 3. Drive signal conversion: Substitute the corrected coordinates (X1, Y1) into the drive conversion formula: ; ; The corresponding 16-bit digital drive signals DA_X and DA_Y are obtained.
[0064] 4. Galvanometer drive and laser synchronization: Digital drive signals are sent to the galvanometer drive board to drive the galvanometer motor to generate corresponding deflection angles α and β; at the same time, the synchronization control module precisely controls the switching timing of the laser according to the motion trajectory to ensure that the laser is emitted only when the spot is accurately positioned.
[0065] 5. Laser spot scanning and forming: The laser spot moves across the working surface as the galvanometer deflects, ultimately forming a high-precision machined pattern that matches the input pattern.
[0066] In actual processing, such as Figure 5 As shown, the system executes the following process: Analyze the original coordinate sequence of the target graphic; The stored K_dir and K_distortion are used to perform real-time compensation for each coordinate point; The compensated coordinates are output to the galvanometer driver board using the DA transformation formula. Synchronous control of the laser switch to complete the pattern processing.
[0067] Automatic orientation matching principle: Image processing technology is used to extract the principal axis orientation of the machining graphic's contour. By comparing it with a preset orientation library using template matching or feature point comparison, the actual deflection direction of the galvanometer is quickly determined. During the matching process, least squares or correlation coefficient methods are used to evaluate similarity, ensuring matching accuracy. After successful matching, the system automatically generates an orientation correction coefficient, which will linearly adjust the X and Y axes during coordinate transformation to eliminate orientation deviation.
[0068] The principle of pillow-shaped and barrel-shaped distortion quantization: Based on the geometric characteristics of a standard rectangular shape, by measuring the actual lengths of the six characteristic sides L1 to L6, the system can calculate the quantization coefficients of pillow-shaped distortion, barrel-shaped distortion, and nonlinear distortion. L1 and L3 reflect distortion in the X direction, L2 and L4 reflect distortion in the Y direction, and L5 and L6 reflect the nonlinear torsional characteristics of the system. By establishing a functional relationship between the distortion coefficients and coordinate positions, the system can dynamically compensate for each point during coordinate transformations, especially providing enhanced correction to the edge areas of the display.
[0069] The principle of real-time coordinate compensation: During the correction or processing, the system inputs the original coordinates (X, Y) into the compensation function, which integrates the direction coefficient and the distortion coefficient, and outputs the corrected coordinates (X1, Y1).
[0070] Real-time coordinate compensation adopts a superposition model of "direction compensation + distortion compensation": ; ; in: , It is a linear or affine transformation based on the direction coefficient, used to correct systematic orientation deviations caused by galvanometer mounting or driving; , The nonlinear compensation amount based on the pincushion-barrel distortion coefficient is a function of coordinates (X, Y) and is used to correct pincushion, barrel and nonlinear distortions caused by optical and mechanical systems; All compensation coefficients are derived from the direction coefficient and pillow distortion coefficient calculated in the correction process and stored in the parameter table for real-time retrieval.
[0071] This split compensation structure not only makes the algorithm modular, easy to debug and update, but also enables high-precision fitting of nonlinear distortions in large-format edge regions, thereby comprehensively improving the positioning accuracy and adaptability of the system.
[0072] The compensated coordinates are then converted into galvanometer drive signals through linear mapping to ensure that the galvanometer motor deflects precisely along the corrected path.
[0073] Parameter persistence and automatic recall principle: All correction coefficients are stored in non-volatile memory in the form of "size-parameter" key-value pairs. Upon system startup, the parameter table in memory is automatically read and loaded into main memory. When the user switches processing sizes, the system automatically retrieves and loads the corresponding parameters based on the input size, without manual intervention. Simultaneously, the system periodically verifies the parameters to ensure their long-term stability.
[0074] Synchronization control principle: By generating precise timing signals through hardware timers or FPGAs, the laser is controlled to emit light immediately after the galvanometer moves into position and to turn off before the galvanometer moves, ensuring that the laser energy is accurately projected onto the target position and avoiding image distortion caused by synchronization errors.
[0075] The working principle of the graphic processing execution process: The graphics processing flow of this system is a hard real-time closed loop of "data parsing - coordinate correction - signal conversion - motion synchronization". First, the graphics parsing module discretizes the vector graphics into a high-density sequence of coordinate points. Then, each coordinate point passes through a real-time compensation module, simultaneously completing orientation correction and nonlinear distortion correction. The corrected coordinates are converted into a standard digital interface signal for the galvanometer driver board through linear mapping. This drive signal outputs an analog voltage through a digital-to-analog converter (DAC) module, precisely controlling the angular displacement of the galvanometer motor. Throughout the process, the motion controller (such as an FPGA) strictly coordinates the timing of the galvanometer position and the laser trigger signal, achieving precise synchronization of "position arrival - light emission - position movement - light extinguishing", thus ensuring clear graphic edges and accurate dimensions even under high-speed scanning.
[0076] The above embodiments are only for illustrating the technical concept and features of the present invention. Their purpose is to enable those skilled in the art to understand the content of the present invention and implement it. They should not be used to limit the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A galvanometer correction system, characterized in that, include: The automatic orientation matching module is used to automatically match the processed test pattern with multiple preset orientations to determine the actual scanning orientation of the galvanometer and generate orientation coefficients. The pillow barrel distortion coefficient calculation module is used to measure the lengths of multiple characteristic sides of a standard rectangular test pattern and calculate the pillow barrel distortion coefficient based on the measurement results. The parameter storage and management module is used to associate the orientation coefficient with the pillow barrel distortion coefficient with the sheet size and store it persistently, supporting automatic loading; The coordinate real-time compensation and transformation module is used to receive the original coordinates, call the stored coefficients for real-time compensation, and convert them into galvanometer drive signals; The synchronization control module is used to control the synchronized operation of the laser and the galvanometer. The automatic parameter verification module is used to automatically verify the correction accuracy after the parameters are loaded.
2. The galvanometer correction system according to claim 1, characterized in that: The automatic direction matching module presets eight pre-selected directions, which are distributed at angular intervals of 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°.
3. The galvanometer correction system according to claim 1, characterized in that: The feature edges measured by the pillow barrel distortion coefficient calculation module include: L1 and L3 correspond to the actual lengths of two opposite sides of the rectangle; L2 and L4 correspond to the actual lengths of the other two opposite sides of the rectangle; L5 corresponds to the actual length from the midpoint of L2 to the midpoint of L4; L6 corresponds to the actual length from the midpoint of L1 to the midpoint of L3.
4. The galvanometer correction system according to claim 1, characterized in that: The parameter storage and management module uses non-volatile storage units and establishes a key-value mapping table between the sheet size and the correction parameters.
5. The galvanometer correction system according to claim 1, characterized in that: The real-time coordinate compensation and transformation module executes the following transformation formula: ; ; Where X1 and Y1 are the compensated coordinates, L is the side length of the scanning area, DA_MAX=65535, and DA_ZERO=32768.
6. A galvanometer calibration method, characterized in that, Includes the following steps: Step 1: Input the target image for calibration, process the test image and automatically match the galvanometer direction to generate the direction coefficient; Step 2: Process the standard rectangular test pattern, measure the actual length of the feature sides L1 to L6, and calculate the pillow barrel distortion coefficient; Step 3: Associate the orientation coefficient and distortion coefficient with the current paper size and save it to a non-volatile memory unit; Step 4: In actual processing, the stored coefficients are called up to compensate the original coordinates in real time and converted into drive signals to control the galvanometer scanning.
7. The galvanometer correction method according to claim 6, characterized in that: The automatically matched galvanometer direction includes: Extract the contour and direction features of the processed graphic; Calculate the similarity with eight pre-selected directions; The direction with the highest similarity is selected as the actual scanning direction, and the direction coefficient is calculated.
8. The galvanometer correction method according to claim 6, characterized in that: The calculation of the pillow barrel distortion coefficient includes: Calculate pincushion distortion components based on L1 and L3; Calculate the barrel distortion components based on L2 and L4; Calculate the nonlinear distortion components based on L5 and L6; The composite distortion coefficient is obtained by synthesis.
9. The galvanometer correction method according to claim 6, characterized in that: The real-time coordinate compensation step employs a nonlinear compensation function, the form of which is: ; ; in, , The direction compensation amount is generated based on the direction coefficient. , This is the distortion compensation amount generated based on the distortion coefficient of the pillow barrel; The distortion compensation amount , It is a nonlinear function of coordinates (X, Y), and its coefficients are determined by the distortion coefficient of the pillow barrel.
10. A method for processing galvanometer patterns based on the correction method according to any one of claims 6 to 9, characterized in that, Includes the following steps: Input a digital file of the target graphic and parse it to obtain the original coordinate sequence (X, Y); The pre-stored correction parameters are called to perform real-time nonlinear compensation on the original coordinates to obtain the corrected coordinates (X1, Y1); The corrected coordinates (X1, Y1) are converted into the digital drive signals DA_X, DA_X required by the galvanometer drive board using the drive conversion formula; The digital drive signal is sent to the galvanometer drive board to drive the galvanometer motor to generate the corresponding deflection angles α and β. The laser switch is synchronously controlled so that the laser spot emits light when the galvanometer moves to the target position, thereby forming a preset pattern on the workpiece surface.