A control method and device of a dual galvanometer system and a storage medium
By using a Kalman filter to predict motion trajectories and generate smooth transition paths in a dual-galvanometer system, the problem of static path planning being unable to dynamically avoid obstacles is solved, achieving efficient and precise galvanometer-coordinated control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN RUIDA TECH CO LTD
- Filing Date
- 2026-04-13
- Publication Date
- 2026-06-23
AI Technical Summary
Existing dual-galvanometer processing systems suffer from mechanical interference and processing defects in common areas, and static path planning cannot be dynamically adjusted, resulting in insufficient avoidance accuracy and efficiency.
By inputting the real-time motion state information of the first and second galvanometers into a Kalman filter, the future motion trajectory is predicted, the triggering conditions of the avoidance procedure are determined, a smooth transition path is generated, and the motion of the galvanometers is controlled by an interpolation algorithm to achieve dynamic avoidance.
While ensuring processing efficiency, it significantly improves avoidance accuracy, realizing a shift from passive response to active avoidance control mode, ensuring the continuity of high-priority galvanometer paths and impact-free avoidance of low-priority galvanometers.
Smart Images

Figure CN122033495B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of laser galvanometer processing technology, and in particular to a control method, equipment and storage medium for a dual galvanometer system. Background Technology
[0002] Laser galvanometer machining systems achieve high-speed scanning of laser beams by controlling the deflection angle of galvanometers, featuring fast response and high precision, and are widely used in laser marking, cutting, and micromachining. To improve processing efficiency, dual-galvanometer machining systems utilize two independent galvanometers working collaboratively to simultaneously process different areas of the workpiece, significantly shortening the overall processing time. However, when the processing areas of the two galvanometers overlap (i.e., a common area), the collaborative control of the system faces significant challenges. Within the common area, the physical movement ranges of the two galvanometers may overlap, posing a risk of mechanical interference to the galvanometer motors or lenses. Furthermore, improper path planning during simultaneous operation of both galvanometers can easily lead to overlapping or missed processing of the laser beam in the common area, affecting processing quality.
[0003] To address the control problem of the common area of two galvanometers, a common approach is to use a static path planning strategy. This involves pre-assigning machining tasks to each galvanometer based on fixed rules (such as element coordinate ranges or preset master-slave relationships) before machining. However, this method cannot dynamically adjust according to the real-time motion state of the galvanometers. When the machining graphics are complex and varied, or when sudden path overlaps occur in the common area, the results of static planning often fail to guarantee the accuracy and reliability of avoidance, and are prone to mechanical interference or machining defects due to failure to respond promptly to the actual motion state of the galvanometers.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this application is to provide a control method, device, and storage medium for a dual galvanometer system, aiming to solve the technical problem that static path planning in existing dual galvanometer processing cannot dynamically avoid interference from common areas.
[0006] To achieve the above objectives, this application proposes a control method for a dual-galvanometer system, the method comprising:
[0007] During laser processing, the real-time motion state information of the first and second galvanometers is input into a Kalman filter to obtain the predicted motion trajectories of the first and second galvanometers at future moments.
[0008] Determine whether the triggering conditions for the avoidance procedure are met based on the predicted motion trajectory;
[0009] If so, based on the priorities of the first and second galvanometers and the motion trajectory, an interpolation algorithm is used to generate a smooth transition path corresponding to the avoidance procedure, and during the execution of the avoidance procedure, the movement of the galvanometers is controlled based on the smooth transition path.
[0010] In one embodiment, before the step of inputting the real-time motion state information of the first and second galvanometers into the Kalman filter during laser processing, the method further includes:
[0011] The encoder acquires real-time position data of the first and second galvanometers at a preset sampling frequency.
[0012] Based on differential operations, motion velocity data and acceleration data are extracted from the real-time position data, and the focal position data and energy distribution data of the laser beam based on the current moment are acquired simultaneously.
[0013] Timestamps are added to the real-time location data, motion speed data, acceleration data, focal position data, and energy distribution data to generate time-aligned real-time motion state information.
[0014] In one embodiment, before the step of determining whether the triggering conditions of the avoidance procedure are met based on the predicted motion trajectory, the method further includes:
[0015] Obtain the mechanical structure parameters of the dual galvanometer processing system, including the deflection angle range, motion stroke range, and physical dimensions of the galvanometers;
[0016] Based on the mechanical structure parameters, a motion range model of the first galvanometer and the second galvanometer is constructed in three-dimensional space;
[0017] The motion range model is transformed from the galvanometer coordinate system to the workpiece coordinate system, and the common processing area of the first galvanometer and the second galvanometer is marked in the workpiece coordinate system.
[0018] The triggering conditions for the avoidance procedure are set based on the public processing area.
[0019] In one embodiment, the step of inputting the real-time motion state information of the first and second galvanometers into a Kalman filter to obtain the predicted motion trajectories of the first and second galvanometers at future moments includes:
[0020] Acquire sensor measurement data at each sampling time, wherein the sensor measurement data includes at least the real-time position of the galvanometer in the workpiece coordinate system;
[0021] Based on the state estimate obtained from the previous sampling time and the preset state transition matrix, the predicted state and prediction covariance at the current sampling time are calculated. The state estimate includes the position and velocity components of the galvanometer, and the state transition matrix is determined based on the kinematic model of the galvanometer and the sampling time interval.
[0022] The Kalman gain is calculated using the predicted covariance and the preset observation noise covariance matrix.
[0023] Based on the Kalman gain, the sensor measurement data at the current sampling time, and the predicted state, calculate the updated state estimate and the updated covariance at the current sampling time;
[0024] Starting from the updated state estimate, the state at multiple future sampling moments is predicted iteratively using the state transition matrix to generate the predicted motion trajectories of the first and second galvanometers at future moments.
[0025] In one embodiment, the step of determining whether the triggering conditions of the avoidance procedure are met based on the predicted motion trajectory includes:
[0026] Determine the common processing area of the first galvanometer and the second galvanometer, and perform a spatial intersection operation between the predicted motion trajectory and the boundary condition data of the common processing area;
[0027] Based on the result of the spatial intersection operation, the first estimated entry time of the first galvanometer and the common processing area, and the second estimated entry time of the second galvanometer and the common processing area are obtained.
[0028] The first and second estimated entry times are compared with preset time warning thresholds. Based on the comparison results, it is determined whether the first and second galvanometers are about to enter or have already entered the common processing area. Based on the determination results, it is determined whether the triggering conditions of the avoidance procedure are met.
[0029] In one embodiment, the step of generating a smooth transition path corresponding to the avoidance procedure using an interpolation algorithm based on the priorities of the first and second galvanometers and the motion trajectory includes:
[0030] Obtain the original planned path point sequences of the first galvanometer and the second galvanometer respectively;
[0031] Based on the original planned path point sequence and priority, conflicting path segments where the first galvanometer and the second galvanometer have spatial overlap or temporal conflict are identified;
[0032] The second-order kinematic constraint interpolation of the interpolation algorithm is used as the calculation parameter. The starting position, ending position, starting velocity, and ending velocity of the conflict path segment are used as the boundary conditions. The cubic spline curve or Bezier curve that satisfies the acceleration continuity is solved by the calculation parameter and the boundary conditions, which serves as the avoidance transition path for the low-priority galvanometer.
[0033] The avoidance transition path is spliced with the non-conflict path segment of the low-priority galvanometer to form the smooth transition path.
[0034] In one embodiment, after the step of controlling the galvanometer motion based on the smooth transition path during the execution of the avoidance procedure, the method further includes:
[0035] During the avoidance procedure, the actual motion trajectory data and predicted motion trajectory data of the first galvanometer and the second galvanometer are collected, and the trajectory tracking error sequence between the two is calculated.
[0036] When the statistical characteristics of the trajectory tracking error sequence exceed the preset error tolerance range, the Kalman filter parameter adaptive adjustment mechanism is triggered.
[0037] The motion trajectories of the first and second galvanometers at future moments are re-predicted using adaptively adjusted Kalman filter parameters until the laser processing is completed.
[0038] In one embodiment, the step of using adaptively adjusted Kalman filter parameters to re-predict the motion trajectories of the first and second galvanometers at future moments until the laser processing is completed includes:
[0039] Based on the mean and variance of the trajectory tracking error sequence, the process noise covariance matrix and the observation noise covariance matrix in the Kalman filter are dynamically updated.
[0040] The motion trajectories of the first and second galvanometers at future moments are re-predicted using the adaptively adjusted Kalman filter parameters.
[0041] In addition, to achieve the above objectives, this application also proposes a control device for a dual galvanometer system, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the control method for the dual galvanometer system as described above.
[0042] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the control method for the dual galvanometer system as described above.
[0043] One or more technical solutions proposed in this application have at least the following technical effects:
[0044] The technical solution of this application involves inputting the real-time motion state information of the first and second galvanometers into a Kalman filter during laser processing to obtain the predicted motion trajectories of the first and second galvanometers at future moments. Based on the predicted motion trajectories, it is determined whether the triggering conditions for an avoidance procedure are met. If so, based on the priorities of the first and second galvanometers and the motion trajectories, an interpolation algorithm is used to generate a smooth transition path corresponding to the avoidance procedure. During the execution of the avoidance procedure, the galvanometer movement is controlled based on the smooth transition path.
[0045] The technical solution of this application inputs the real-time motion state information of the first and second galvanometers into a Kalman filter during laser processing. Utilizing the Kalman filter's ability to suppress sensor noise and its state estimation characteristics, the motion trajectories of the two galvanometers are predicted at future moments, establishing a foundation for forward-looking conflict prediction. Based on this, the system determines whether the triggering conditions for the avoidance procedure are met according to the predicted motion trajectories. Spatial intersection calculations are combined with time-based early warning thresholds to achieve a shift from passive response to active avoidance control. When the triggering conditions are met, the system dynamically allocates processing priorities to the first and second galvanometers according to the processing task. Based on the priorities and predicted trajectories, an interpolation algorithm generates a smooth transition path that satisfies acceleration continuity. During the avoidance procedure execution, the galvanometer movement is controlled based on this smooth transition path, ensuring the continuity of the processing path for the high-priority galvanometer while allowing the low-priority galvanometer to complete avoidance in a shock-free manner. In addition, the system collects the tracking error between the actual motion trajectory and the predicted trajectory during the avoidance process, dynamically updates the process noise covariance matrix and observation noise covariance matrix of the Kalman filter based on the error statistical characteristics, and re-predicts the motion trajectory using the adaptively adjusted parameters, forming a closed-loop iterative optimization mechanism, so that the filter model always matches the actual dynamic characteristics of the galvanometer throughout the entire processing process.
[0046] Through the aforementioned technical means, this application significantly improves obstacle avoidance accuracy while ensuring processing efficiency, solving the technical problem that existing static planning cannot respond to dynamic obstacle avoidance requirements in real time. It achieves a technological leap in dual-mirror operation within public areas, from static planning to dynamic collaboration, from passive response to active avoidance, and from fixed parameters to adaptive closed-loop control. Thus, through dynamic prediction and collaborative control, it enables obstacle avoidance without downtime in public areas, improving processing efficiency and path smoothness while ensuring the accuracy of dual-mirror collaborative control. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0048] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a flowchart illustrating the first embodiment of the control method for the dual-galvanometer system of this application;
[0050] Figure 2 This is a detailed process diagram based on step S10 in the first embodiment;
[0051] Figure 3 This is a detailed process diagram based on step S20 in the first embodiment;
[0052] Figure 4 This is a detailed schematic diagram of step S30 in the first embodiment;
[0053] Figure 5 This is a flowchart illustrating the second embodiment of the control method for the dual-galvanometer system of this application;
[0054] Figure 6 This is a flowchart illustrating the third embodiment of the control method for the dual-mirror system of this application;
[0055] Figure 7 This is a flowchart illustrating the fourth embodiment of the control method for the dual-galvanometer system of this application;
[0056] Figure 8 This is a schematic diagram illustrating the detailed process of step S130 in the fourth embodiment;
[0057] Figure 9 This is a schematic diagram of the hardware operating environment involved in the control method of the dual galvanometer system in this application embodiment.
[0058] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0059] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0060] In related technologies, the control of dual galvanometer systems mainly follows the technical path of static path planning, but it has inherent defects and is difficult to meet the dual requirements of avoidance accuracy and processing efficiency.
[0061] This type of method employs an offline planning strategy, pre-assigning machining tasks to each galvanometer based on fixed rules, such as the coordinate range of primitives or a preset master-slave relationship. This method is applicable when the machining graphics are simple and the boundaries of common areas are clear, simplifying control logic and reducing system complexity. However, this method is essentially an open-loop control, unable to dynamically adjust based on the real-time motion state of the galvanometers. When the machining graphics are complex and variable, or when sudden path overlaps occur in common areas, the static planning results often fail to respond promptly to the actual motion state of the galvanometers, leading to difficulty in guaranteeing avoidance accuracy and easily causing mechanical interference or machining defects. Practical applications show that in high-speed machining or irregular workpiece machining scenarios, the galvanometer motion trajectory is highly time-varying, making it difficult for static planning to predict real-time conflicts, resulting in a high avoidance failure rate. Furthermore, this type of method lacks a real-time perception and forward-looking prediction mechanism for the galvanometer motion state, making it difficult to actively avoid conflicts before they occur, forcing the use of passive measures such as emergency stops or deceleration, further sacrificing machining efficiency and quality.
[0062] Comprehensive analysis reveals that the core dilemma faced by the aforementioned technical approaches lies in the fact that while static planning methods are simple to implement and have clear control logic, their offline and open-loop characteristics fundamentally contradict the inherent real-time and dynamic requirements of dual-mirror collaborative processing. This makes it impossible to achieve a balance between avoidance accuracy and processing efficiency in complex processing scenarios, and it is difficult to adapt to the development requirements of high-precision and high-efficiency laser processing.
[0063] Based on the aforementioned deficiencies in related technologies, this application proposes a control method for a dual-mirror system. This method addresses the core pain point of existing static planning's inability to respond to dynamic avoidance requirements in real time. Through the deep integration of real-time state perception, motion trajectory prediction, and dynamic collaborative control, it achieves a dual guarantee of accuracy and processing efficiency in avoidance within public areas. Specifically, during laser processing, the method first inputs the real-time motion state information of the first and second galvanometers into a Kalman filter. Utilizing the Kalman filter's ability to suppress sensor noise and its state estimation characteristics, the motion trajectories of the two galvanometers are predicted at future moments, constructing a forward-looking conflict prediction basis. Based on this, the method determines whether the avoidance procedure's triggering conditions are met according to the predicted motion trajectories. By combining spatial intersection calculations with time-based early warning thresholds, a shift from passive response to active avoidance control mode is achieved. When the triggering conditions are met, the system dynamically allocates the processing priorities of the first and second galvanometers according to the processing task. Based on the priorities and the predicted trajectory, it generates a smooth transition path that satisfies acceleration continuity through an interpolation algorithm. During the avoidance procedure, the system controls the galvanometer movement based on this smooth transition path, ensuring the continuity of the processing path for the high-priority galvanometer while allowing the low-priority galvanometer to complete the avoidance without impact. In addition, the system collects the tracking error between the actual motion trajectory and the predicted trajectory during the avoidance process. Based on the error statistical characteristics, it dynamically updates the process noise covariance matrix and observation noise covariance matrix of the Kalman filter, and uses the adaptively adjusted parameters to re-predict the motion trajectory, forming a closed-loop iterative optimization mechanism. This ensures that the filter model always matches the actual dynamic characteristics of the galvanometer throughout the entire processing process.
[0064] Through the above-mentioned technical means, this application significantly improves the avoidance accuracy while ensuring processing efficiency, solves the technical problem that existing static planning cannot respond to dynamic avoidance needs in real time, and realizes the technical leap of dual galvanometers in public areas from static planning to dynamic collaboration, from passive response to active avoidance, and from fixed parameters to adaptive closed loop.
[0065] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0066] Based on this, embodiments of this application provide a control method for a dual galvanometer system, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the control method for the dual galvanometer system of this application. In this embodiment, the control method for the dual galvanometer system includes steps S10 to S30:
[0067] Step S10: During the laser processing, the real-time motion state information of the first galvanometer and the second galvanometer is input into the Kalman filter to obtain the predicted motion trajectories of the first galvanometer and the second galvanometer at future moments.
[0068] During laser processing, the real-time motion state information of the first and second galvanometers is input into a Kalman filter to obtain the predicted motion trajectories of the first and second galvanometers at future moments. This forms the data foundation and prediction starting point for the entire obstacle avoidance control method. The core of this process lies in using the state estimation capability of the Kalman filter to accurately predict the motion state of the galvanometers in a real processing environment where sensor noise and system dynamic uncertainties coexist.
[0069] To achieve this, the real-time position data of the first and second galvanometers are first acquired by an encoder at a fixed sampling frequency. This sampling frequency is typically set in the kilohertz range to ensure the capture of high-speed motion details of the galvanometers. Based on the acquired real-time position data, the velocity and acceleration components at the current moment are extracted through differential calculations, while simultaneously acquiring the focal position and energy distribution data of the laser beam at the current moment. These multi-source data are then timestamped to form time-aligned real-time motion state information, which serves as the input to the Kalman filter.
[0070] The Kalman filter's prediction process employs a standard two-step recursive structure. First, based on the updated state estimate from the previous sampling time and a pre-defined state transition matrix, the predicted state and prediction covariance for the current sampling time are calculated. The state estimate must include at least the position and velocity components of the galvanometer in the workpiece coordinate system. The state transition matrix is determined based on the galvanometer's kinematic model and the sampling time interval. The kinematic model assumes uniform acceleration, and the state transition matrix is constructed accordingly as a linear transformation incorporating position and velocity.
[0071] After obtaining the predicted state, the Kalman gain is calculated by comparing the predicted covariance with a preset observation noise covariance matrix. This Kalman gain reflects the trust weight allocation between the predicted state and the current sensor measurement. Subsequently, based on the Kalman gain, the sensor measurement data at the current sampling time, and the predicted state, the updated state estimate and updated covariance at the current sampling time are calculated. This update process corrects the prediction results, ensuring that the state estimate maintains high accuracy even under noise interference.
[0072] Starting with the updated state estimate, the state is iteratively predicted at multiple future sampling times using the state transition matrix. The number of prediction steps is dynamically set based on the mirror's motion speed and the system's response delay, typically ranging from several milliseconds to tens of milliseconds. This iterative prediction ultimately generates the future motion trajectories of the first and second mirrors, expressed as a time series, containing the position coordinates, velocity vector, and acceleration information for each prediction time. Through this data processing logic, the Kalman filter not only suppresses the impact of sensor noise on prediction accuracy but also integrates the mirror's dynamic characteristics into the prediction model, ensuring that the predicted trajectory accurately reflects the mirror's inertial motion and providing reliable data support for subsequent avoidance condition assessments.
[0073] Step S20: Determine whether the triggering conditions of the avoidance procedure are met based on the predicted motion trajectory;
[0074] Determining whether the triggering conditions for the avoidance procedure are met based on the predicted trajectory is the decision-making link connecting trajectory prediction and avoidance execution. Its core lies in conducting joint analysis of the predicted trajectory and the boundary conditions of the common processing area in both spatial and temporal dimensions, thereby triggering the avoidance mechanism in advance before the actual occurrence of the conflict, realizing the transformation from a passive response to an active avoidance control mode.
[0075] First, the motion trajectories of the first and second galvanometers at future moments are obtained, predicted by a Kalman filter. These trajectories exist as a discrete time-point sequence, with each time point corresponding to the predicted position of the galvanometer in the workpiece coordinate system. Simultaneously, a mathematical model of the common machining area is pre-constructed. This model, based on the mechanical structural parameters of the two galvanometers and the coordinate system transformation results, defines the geometric boundary conditions of the common area in the workpiece coordinate system.
[0076] The core operation of the determination process is to perform spatial intersection calculations between the two predicted trajectories and the boundary conditions of the common area. For each predicted trajectory, it is sequentially determined whether each predicted position point on the trajectory is located inside or on the boundary of the common area, and the time point corresponding to the first entry into the boundary is recorded. This time point is the first or second predicted entry time of the galvanometer into the boundary of the common area. The above intersection calculation uses the ray casting method or a fast elimination algorithm based on the bounding box to ensure computational efficiency within the high-frequency control cycle.
[0077] After obtaining the first and second estimated entry times, they are compared with preset time warning thresholds. These time warning thresholds are determined based on the braking capability of the galvanometers, the path interpolation period, and the system communication delay, and are typically set in the range of milliseconds. If either estimated entry time is less than this threshold, the triggering condition for the avoidance procedure is considered met. The above judgment logic considers two typical scenarios: one is that one galvanometer is about to enter the common area while another galvanometer is already in it or about to enter simultaneously; the other is that the time difference between the estimated simultaneous entry of the two galvanometers into the common area is less than the safety interval.
[0078] The aforementioned determination process is continuously executed within each control cycle, forming a continuous monitoring of the galvanometer's motion state. Since the predicted trajectory already includes the galvanometer's inertial motion information, the above determination logic can reserve sufficient avoidance response time before the galvanometer actually enters the common area, thus avoiding the inherent lag problem of judgment based on the current position. By combining spatial position determination with a time threshold, this step achieves a quantitative assessment of conflict risk, providing clear and adjustable triggering conditions for initiating the avoidance procedure. This ensures that the entire avoidance control system possesses sufficient sensitivity while avoiding frequent false triggers due to prediction errors.
[0079] Step S30: If yes, based on the priorities of the first and second galvanometers and the motion trajectory, a smooth transition path corresponding to the avoidance procedure is generated by an interpolation algorithm, and the galvanometer motion is controlled based on the smooth transition path during the execution of the avoidance procedure.
[0080] After determining that the avoidance procedure triggering conditions are met, a smooth transition path corresponding to the avoidance procedure is generated using an interpolation algorithm based on the priorities of the first and second galvanometers and the predicted motion trajectory. During the execution of the avoidance procedure, the galvanometer motion is controlled based on this smooth transition path. The core execution link of this avoidance control is crucial in how to achieve active avoidance of the high-priority galvanometer by the low-priority galvanometer while ensuring path continuity and kinematic constraints, and simultaneously maintaining the stability of the machining process.
[0081] Priority allocation is completed before avoidance is triggered. By parsing the drawing data of the current processing task, the geometric position, processing sequence, and criticality level of the elements are obtained. Based on this attribute information, the urgency of the processing tasks of the first and second galvanometers at the current moment is evaluated. The galvanometer with higher urgency is assigned a high-priority galvanometer, and the other galvanometer is assigned a low-priority galvanometer. When the urgency of the processing tasks is similar, priority is allocated according to preset galvanometer master-slave configuration parameters, or according to the distance of the galvanometer from the boundary of the common area, with the farther galvanometer assigned a lower priority. This priority allocation mechanism ensures the continuity of critical processing paths, and the cost of path adjustment for avoidance is mainly borne by non-critical tasks.
[0082] When generating a smooth transition path, the original planned path point sequences of the first and second galvanometers within the common processing area are first obtained. These original path point sequences originate from the preset paths in the processing drawings and have not been adjusted for avoidance. Subsequently, based on the original planned paths and the assigned processing priorities, conflicting path segments where the two galvanometers have spatial overlap or temporal conflicts are identified. The identification of conflicting path segments is based on the predicted motion trajectory, combined with the boundary conditions of the common area and the priority levels, to determine the galvanometer objects that need to be avoided and their corresponding path intervals.
[0083] For the motion of low-priority galvanometers within conflict path segments, a cubic spline interpolation algorithm is used to generate an avoidance transition path. This interpolation algorithm uses second-order kinematic constraints as calculation parameters and the start and end positions, start and end velocities of the conflict path segment as boundary conditions to solve for a cubic spline curve that satisfies acceleration continuity. In the boundary conditions, the start and end positions are taken from the preceding and following endpoints of the conflict interval in the original path point sequence, respectively, while the start and end velocities are calculated based on the tangent direction of the original path at that point and the galvanometer's motion velocity. By combining these boundary conditions with the interpolation algorithm, the generated avoidance transition path not only smoothly deviates from the original path to avoid conflict locations within the common area but also seamlessly returns to the original path after the avoidance is completed, preventing the impact of path abrupt changes on processing quality.
[0084] By splicing the avoidance transition path with the non-collision path segment of the low-priority galvanometer, a complete smooth transition path is formed. During the avoidance procedure, galvanometer control commands are generated based on this smooth transition path, driving the low-priority galvanometer to move along this path. Simultaneously, the laser power or pulse frequency is dynamically adjusted to prevent energy accumulation and workpiece damage due to changes in galvanometer speed during the avoidance process. Through the above data processing logic and execution mechanism, precise control of galvanometer movement within the common area is achieved. This ensures both the continuity of the high-priority galvanometer's processing path and allows the low-priority galvanometer to complete the avoidance process continuously and without impact through the smooth transition path. This enhances system coordination capabilities while ensuring processing quality and equipment safety.
[0085] Furthermore, you can also view Figure 2 , Figure 2 This is a detailed process diagram based on step S10 in the first embodiment. Figure 2 The step of inputting the real-time motion state information of the first and second galvanometers into a Kalman filter to obtain the predicted motion trajectories of the first and second galvanometers at future moments includes S11-15:
[0086] Step S11: Obtain sensor measurement data at each sampling time, wherein the sensor measurement data includes at least the real-time position of the galvanometer in the workpiece coordinate system;
[0087] Step S12: Calculate the predicted state and predicted covariance at the current sampling time based on the state estimate obtained from the previous sampling time and the preset state transition matrix. The state estimate includes the position and velocity components of the galvanometer, and the state transition matrix is determined based on the kinematic model of the galvanometer and the sampling time interval.
[0088] Step S13: Calculate the Kalman gain using the predicted covariance and the preset observation noise covariance matrix;
[0089] Step S14: Based on the Kalman gain, the sensor measurement data at the current sampling time, and the predicted state, calculate the updated state estimate and the updated covariance at the current sampling time;
[0090] Step S15: Starting from the updated state estimate, the state transition matrix is used to iteratively predict the state at multiple future sampling times, generating the predicted motion trajectories of the first and second galvanometers at future times.
[0091] In the process of inputting the real-time motion state information of the first and second galvanometers into the Kalman filter to generate the predicted motion trajectory, a complete data processing link from raw data acquisition to multi-step prediction is realized through five closely linked processes.
[0092] First, sensor measurement data is acquired at each sampling moment. This sensor measurement data includes at least the real-time position information of the galvanometer in the workpiece coordinate system. To achieve this, high-precision encoders are installed in the dual-galvanometer machining system, directly coupled to the rotation axis of the galvanometer, to acquire the angular position data of the galvanometer at a preset sampling frequency. This sampling frequency is typically set in the range of 2kHz to 10kHz to ensure that the dynamic details of the galvanometer during high-speed scanning can be captured. The acquired angular data is mapped to the workpiece coordinate system through pre-calibrated coordinate transformation parameters to obtain the real-time position coordinates of the galvanometer on the workpiece plane. This measurement data serves as the observation input for the Kalman filter, with its timestamp strictly corresponding to the sampling moment, providing a time-aligned basis for subsequent state estimation values.
[0093] Based on the updated state estimate obtained from the previous sampling time and the preset state transition matrix, the predicted state and prediction covariance at the current sampling time are calculated. The state estimate includes the position and velocity components of the galvanometer. In the recursive structure of the Kalman filter, this state estimate embodies both the system's understanding of its current motion state and incorporates historical observation information and the system's dynamic model. The state transition matrix is determined based on the galvanometer's kinematic model and the sampling time interval. In this embodiment, the galvanometer's kinematic model adopts the assumption of uniformly accelerated motion, and the state transition matrix is accordingly constructed as a linear transformation containing position, velocity, and acceleration, with the acceleration component introduced as a control input. The above prediction step extrapolates the expected state of the system at the current time based on the posterior estimate from the previous time step. Simultaneously, the prediction covariance matrix reflects the impact of model uncertainty on prediction accuracy, providing a statistical basis for subsequent Kalman gain calculations.
[0094] The Kalman gain is calculated using the predicted covariance and a pre-defined observation noise covariance matrix. The observation noise covariance matrix, pre-calibrated based on the encoder's measurement accuracy and workpiece coordinate system transformation error, reflects the reliability of the sensor measurement data. The Kalman gain is calculated using a standard formula, essentially performing optimal weighted fusion between the predicted state and the observed data. When the observation noise covariance is small, the Kalman gain tends to assign higher weights to the sensor measurement data, causing the state estimate to converge to the observed value more quickly; conversely, when the system model is relatively reliable, the Kalman gain reduces the impact of the observed data on state correction. This weighting mechanism enables the Kalman filter to maintain the stability and accuracy of the state estimate in noisy environments.
[0095] Furthermore, based on the Kalman gain, the sensor measurement data at the current sampling time, and the predicted state, the updated state estimate and updated covariance at the current sampling time are calculated. The updated state estimate is obtained by multiplying the predicted state by the Kalman gain and adding the observation residuals, where the observation residuals are the difference between the sensor measurement data and the predicted observations. This update process corrects the prediction results, ensuring that the fused state estimate retains both the system model's constraints on motion laws and incorporates the actual position information measured by the sensors. The updated covariance matrix reflects the uncertainty of the state estimate after observation correction; its value is lower than the prediction covariance, demonstrating the suppression effect of observation information on uncertainty.
[0096] Starting with the updated state estimate, the state is iteratively predicted at multiple future sampling moments using the state transition matrix, generating the predicted motion trajectories of the first and second galvanometers at future moments. This iterative prediction process uses the updated state estimate at the current sampling moment as the initial condition, continuously applying the state transition matrix to recursively predict the state at each subsequent sampling moment. The number of prediction steps is dynamically set based on the galvanometer's motion velocity and the system's control cycle, typically covering a time window of 5 to 20 milliseconds. For each prediction moment, the galvanometer's position coordinates, velocity vector, and acceleration information are recorded, forming a predicted motion trajectory expressed in time series form. This trajectory not only includes the galvanometer's motion path in space but also implicitly contains kinematic constraints, enabling subsequent avoidance condition judgments to be made within the physically feasible motion range.
[0097] Furthermore, you can also view Figure 3 , Figure 3 This is a detailed process diagram based on step S20 in the first embodiment. Figure 3 The step of determining whether the triggering conditions of the avoidance procedure are met based on the predicted motion trajectory includes S21~S23:
[0098] Step S21: Determine the common processing area of the first galvanometer and the second galvanometer, and perform spatial intersection operation between the predicted motion trajectory and the boundary condition data of the common processing area;
[0099] Step S22: Based on the result of the spatial intersection operation, obtain the first estimated entry time of the first galvanometer and the common processing area, and the second estimated entry time of the second galvanometer and the common processing area;
[0100] Step S23: Compare the first estimated entry time and the second estimated entry time with the preset time warning threshold respectively. Based on the comparison result, determine whether the first galvanometer and the second galvanometer are about to enter or have already entered the common processing area. Based on the determination result, determine whether the triggering conditions of the avoidance procedure are met.
[0101] In the process of determining whether the avoidance procedure triggering conditions are met based on the predicted motion trajectory, the trajectory prediction results are fused with the public area boundary conditions in a spatiotemporal dimension through relevant processes to achieve a quantitative assessment of conflict risk.
[0102] First, the common processing area of the first and second galvanometers is determined. This determination is based on the mechanical structure parameters and coordinate system transformation results of the dual-galvanometer processing system. The deflection angle range, motion stroke range, and physical dimensions of the lenses are pre-acquired. Based on these parameters, a three-dimensional motion range model is constructed, and the motion ranges of the two galvanometers are mapped to the same workpiece coordinate system through a transformation from the galvanometer coordinate system to the workpiece coordinate system. The overlapping area of the two motion ranges is defined as the common processing area, and its boundary conditions are stored in mathematical expression form for subsequent spatial intersection calculations. Then, the predicted motion trajectory output by the Kalman filter is spatially intersected with the boundary condition data of the common processing area. This intersection calculation uses a discrete point detection method. For each predicted position point on each predicted trajectory, the system determines whether the point is inside or on the boundary of the common area and records the position point that first satisfies the conditions and its corresponding time index.
[0103] The first estimated entry time between the first galvanometer and the boundary of the common area, and the second estimated entry time between the second galvanometer and the boundary of the common area, are obtained based on the results of the spatial intersection operation. The acquisition of these estimated entry times depends on the recorded time index. Since the predicted trajectory exists as a discrete point sequence with equal time intervals, linear interpolation is used to correct the precise moment of the first entry into the boundary, eliminating time errors caused by discrete sampling. For rapidly moving galvanometers, this interpolation correction can improve the calculation accuracy of the estimated entry time to below the sampling interval, ensuring sufficient sensitivity for subsequent early warning judgments. The first and second estimated entry times are calculated independently and do not interfere with each other.
[0104] The first and second estimated entry times are compared with preset time warning thresholds. Based on the comparison results, it is determined whether the first and second galvanometers are about to enter or have already entered the common processing area, and whether the triggering conditions for the avoidance procedure are met. The time warning threshold is a configurable parameter of the system, and its value is determined based on the braking response time of the galvanometers, the path interpolation period, and the communication delay. In this embodiment, the threshold is set to 3 milliseconds, meaning that if the galvanometers are expected to enter the common area within 3 milliseconds, the triggering condition is met. The above comparison process uses an independent comparison method; if the estimated entry time of either galvanometer is less than the threshold, the avoidance procedure is triggered. In addition, a simultaneous entry determination logic is added. That is, when the difference between the first and second estimated entry times is less than 1 millisecond, even if the absolute values of both are greater than the threshold, the triggering condition is met to deal with possible sudden conflicts when the two galvanometers move towards each other at high speed. Through the above multi-dimensional comparison mechanism, the spatiotemporal information in the predicted trajectory is converted into a clear Boolean trigger signal, providing a reliable control trigger point for the subsequent avoidance procedure.
[0105] Furthermore, you can also view Figure 4 , Figure 4 This is a detailed process diagram based on step S30 in the first embodiment. Figure 4 The step of generating a smooth transition path corresponding to the avoidance procedure using an interpolation algorithm based on the priorities of the first and second galvanometers and the motion trajectory includes steps S31-34:
[0106] Step S31: Obtain the original planned path point sequences of the first galvanometer and the second galvanometer, respectively;
[0107] Step S32: Based on the original planned path point sequence and priority, identify conflicting path segments where the first galvanometer and the second galvanometer have spatial overlap or temporal conflict;
[0108] Step S33: The second-order kinematic constraint interpolation of the interpolation algorithm is used as the calculation parameter. The starting position, ending position, starting velocity, and ending velocity of the conflict path segment are used as the boundary conditions. The cubic spline curve or Bezier curve that satisfies the acceleration continuity is solved through the calculation parameters and the boundary conditions, which serves as the avoidance transition path for the low-priority galvanometer.
[0109] Step S34: The avoidance transition path is spliced with the non-conflict path segment of the low-priority galvanometer to form the smooth transition path.
[0110] During the generation of the smooth transition path corresponding to the avoidance procedure, the system realizes the local reconstruction of the low-priority galvanometer path through four related steps, and completes the avoidance operation in the common area while ensuring kinematic continuity.
[0111] First, the original planned path point sequences for the first and second galvanometers are obtained respectively. These sequences originate from the drawing data generated during the machining task analysis phase. The system parses the input drawing data, extracting the geometric information, machining sequence, and criticality indicators of each element, and generates the original planned path for each galvanometer based on a preset scanning path algorithm. The original path point sequences are stored as coordinate points in the workpiece coordinate system, with the spacing between adjacent path points dynamically adjusted according to machining accuracy requirements, typically at the micrometer level. This sequence reflects the ideal motion trajectory of each galvanometer without considering avoidance constraints and serves as the benchmark for subsequent conflict identification and path reconstruction.
[0112] Based on the original planned path point sequence and priorities, conflicting path segments where the first and second galvanometers spatially overlap or temporally conflict are identified. The identification of conflicting path segments is based on the acquired original path point sequence, combined with common area boundary conditions and assigned processing priorities. First, it is determined whether each original path point is located within a common area; path points consecutively located within the common area are marked as common segments. Subsequently, for the common segments of two galvanometers, the avoidance responsibility is determined according to priority; the common segment of the higher-priority galvanometer is retained as a priority passage segment, while the common segment of the lower-priority galvanometer is marked as a potential conflict segment. Furthermore, a temporal overlap determination is introduced; when the time windows in which two galvanometers are expected to be simultaneously located within the common area overlap, even if the spatial paths do not intersect, the corresponding path segment is marked as a conflicting path segment. The above identification process outputs the start position, end position, start velocity, and end velocity of the conflicting path segment, providing boundary conditions for subsequent avoidance path generation.
[0113] The second-order kinematic constraint interpolation algorithm is used as the calculation parameter, with the start position, end position, start velocity, and end velocity of the conflict path segment as the boundary conditions. A cubic spline curve satisfying acceleration continuity is solved using these parameters and boundary conditions, serving as the avoidance transition path for the low-priority galvanometer. The cubic spline curve is solved in a parametric form, representing the path as a cubic polynomial function with normalized arc length as the independent variable. The start and end positions are used as positional constraints, and the start and end velocities are used as first-order derivative constraints. An additional second-order derivative continuity condition is introduced to ensure acceleration continuity at the splicing point. These constraints together form a system of linear equations, and solving this system yields the coefficient vector of the cubic spline curve. This avoidance transition path spatially deviates from the original path, avoiding conflict locations within the common area. Simultaneously, its kinematic continuity ensures that the galvanometer does not experience sudden velocity changes or acceleration shocks while operating on the transition path.
[0114] The avoidance transition path is spliced with the non-conflict path segment of the low-priority galvanometer to form a smooth transition path. The splicing operation uses the start and end points of the conflict path segment as demarcation points, dividing the original planned path point sequence into three parts: the non-conflict path segment before the start point, the avoidance transition path segment, and the non-conflict path segment after the end point. Path points are resampled at these splicing points to ensure that the endpoints of the transition path are consistent with the endpoints of the original path in terms of position and velocity, thus achieving seamless connection. The final smooth transition path is stored as a discrete point sequence with added velocity planning information for subsequent galvanometer control module execution. Through the coordination of these four steps, a smooth transition path that satisfies both avoidance requirements and kinematic constraints is generated for the low-priority galvanometer without interrupting the processing of the high-priority galvanometer, realizing the coordinated control of the two galvanometers in the common area.
[0115] Furthermore, you can also view Figure 5 , Figure 5 This is a flowchart illustrating a second embodiment of the control method for the dual-mirror system of this application. In this embodiment, before the step of inputting the real-time motion state information of the first and second mirrors into the Kalman filter during laser processing, steps S40-60 are further included:
[0116] Step S40: The encoder acquires real-time position data of the first galvanometer and the second galvanometer at a preset sampling frequency;
[0117] Step S50: Based on differential operation, extract motion velocity data and acceleration data from the real-time position data, and simultaneously acquire laser beam focal position data and energy distribution data based on the current moment;
[0118] Step S60: Add timestamps to the real-time position data, motion speed data, acceleration data, focal position data, and energy distribution data to generate time-aligned real-time motion state information.
[0119] Before inputting the real-time motion state information of the first and second galvanometers into the Kalman filter, the system completes the acquisition, processing and fusion of the raw sensor data through three sub-steps, providing time-aligned and complete input data for subsequent predictive control.
[0120] The real-time position data of the first and second galvanometers are acquired by an encoder at a preset sampling frequency. The encoder is a high-resolution photoelectric encoder, installed at the ends of the rotating shafts of the first and second galvanometers and coaxially connected to the galvanometer motors. The encoder resolution is typically set to at least 16384 pulses per revolution to ensure position acquisition accuracy meets micron-level machining requirements. The sampling frequency is determined based on the maximum movement speed of the galvanometers and the system control cycle; in this embodiment, it is set to 5kHz, meaning that angular position data of the galvanometers is acquired every 200 microseconds. This angular position data is converted into two-dimensional coordinate values in the workpiece coordinate system through a pre-calibrated mapping relationship between the galvanometer angle and the workpiece coordinates, forming a real-time position data sequence. The encoder acquisition process is triggered by a hardware interrupt to ensure the accuracy and consistency of the sampling time.
[0121] Based on differential operations, velocity and acceleration data are extracted from real-time position data, and the focal position and energy distribution data of the laser beam at the current moment are simultaneously acquired. The differential operation employs the central difference method to improve the accuracy of derivative calculation. For velocity data at the current sampling moment, the system calculates the instantaneous velocity using position data from one sampling point before and after that moment; acceleration data is obtained by performing a second difference on the velocity data. These differential operations are performed within each sampling cycle, outputting velocity and acceleration components with the same frequency as the position data. Simultaneously, focal position and energy distribution data are acquired synchronously through laser sensors. Focal position data is acquired using capacitive displacement sensors or optical confocal sensors, reflecting the coordinates of the laser beam's focal point on the workpiece surface; energy distribution data is acquired through a photodetector, collecting real-time power density distribution information of the laser beam. These multi-source data are strictly synchronized with the galvanometer position data at the time of acquisition, providing complete processing status information for subsequent collaborative control.
[0122] Timestamps are added to real-time position data, velocity data, acceleration data, focal position data, and energy distribution data to generate time-aligned real-time motion state information. The timestamp generation is based on the system's high-precision timer, with a timing accuracy down to the microsecond level. For each set of acquired data, the timer count at that moment is appended as a timestamp to the data packet. Since data acquisition is completed under the same hardware trigger signal, the timestamps from each data source have a consistent time base. The system then packages and encapsulates the aforementioned time-stamped multidimensional data to form a unified data structure. This data structure uses the timestamp as the primary key, organizing fields such as position, velocity, acceleration, focal position, and energy distribution into the same record. This time-aligned real-time motion state information serves as the input to a Kalman filter, ensuring that the filter can accurately correlate the values of each physical quantity at the same moment during state estimation, avoiding estimation errors caused by data asynchrony. Through the connection of these three steps, the system constructs a complete data link from raw sensor signals to structured state information, providing a high-quality data foundation for subsequent predictive control.
[0123] You can also view Figure 6 , Figure 6 This is a flowchart illustrating a third embodiment of the control method for the dual-galvanometer system of this application. In this embodiment, before the step of determining whether the triggering conditions of the avoidance procedure are met based on the predicted motion trajectory, steps S70-100 are further included:
[0124] Step S70: Obtain the mechanical structure parameters of the dual galvanometer processing system, including the deflection angle range, motion stroke range, and physical dimensions of the galvanometers.
[0125] Step S80: Based on the mechanical structure parameters, construct motion range models of the first galvanometer and the second galvanometer in three-dimensional space;
[0126] Step S90: Perform coordinate system transformation on the motion range model, mapping it from the galvanometer coordinate system to the workpiece coordinate system, and mark the common processing area of the first galvanometer and the second galvanometer in the workpiece coordinate system;
[0127] Step S100: Set the triggering conditions for the avoidance procedure based on the public processing area.
[0128] Before determining whether the avoidance procedure triggering conditions are met based on the predicted motion trajectory, the system completes the modeling and calibration of the common processing area through four sub-steps, providing accurate boundary basis for the spatial determination of the triggering conditions.
[0129] In acquiring the mechanical structure parameters of the dual-galvanometer machining system, these parameters include the deflection angle range, motion stroke range, and physical dimensions of the galvanometers. The deflection angle range of the galvanometers is determined by the mechanical limits and driving capabilities of the galvanometer motor. Typically, the deflection angle ranges of the first and second galvanometers differ and need to be acquired separately. The motion stroke range is calculated based on the deflection angle range and the distance between the galvanometers and the workpiece, determining the boundary of the area that can be covered on the workpiece plane. The physical dimensions of the lenses include their external dimensions, installation position, and relative spacing. These parameters directly affect the physical interference boundary of the dual galvanometers in space. The system acquires these parameters by reading the equipment configuration file or executing an initialization calibration program and stores them numerically in the system parameter table.
[0130] Based on mechanical structural parameters, motion range models of the first and second galvanometers are constructed in three-dimensional space. The motion range models are constructed using a three-dimensional geometric modeling method, with the rotation center of the galvanometer as the origin, transforming the deflection angle range into the reachable area of the reflected light spot in the workpiece space. For each galvanometer, its motion range is described as a cone or quadrangular pyramid in three-dimensional space, with the apex of the cone located at the rotation center of the galvanometer. The opening angle of the cone is determined by the deflection angle range, and the depth of the cone is determined by the distance from the galvanometer to the workpiece. After the motion range models of the two galvanometers are established, they are placed in a unified workpiece coordinate system, forming two three-dimensional geometric entities. These entity models not only include the machining area of the galvanometer on the workpiece plane but also reflect the motion space of the galvanometer in the vertical direction, providing a complete geometric basis for subsequent interferometry detection.
[0131] The motion range model undergoes coordinate system transformation, mapping from the galvanometer coordinate system to the workpiece coordinate system. The common machining area of the first and second galvanometers is then calibrated in the workpiece coordinate system. The coordinate system transformation is achieved using a homogeneous transformation matrix, with transformation parameters including the translation and rotation of the galvanometer mounting position relative to the workpiece origin. These transformation parameters are calibrated using a laser calibrator or a standard workpiece to ensure transformation accuracy at the micrometer level. After the coordinate system transformation, the motion range models of the two galvanometers form a spatially overlapping region in the workpiece coordinate system; this overlapping region is defined as the common machining area. The boundary of this overlapping region is extracted, and its boundary conditions are stored as mathematical expressions for subsequent obstacle avoidance decisions. The boundary conditions include both the region contour in the two-dimensional plane and the height range in the vertical direction to accommodate the machining requirements of workpieces with different thicknesses.
[0132] The system sets trigger conditions for the avoidance procedure based on the shared processing area. Setting these trigger conditions involves the joint configuration of spatial and temporal thresholds. For the spatial threshold, a warning buffer zone is set outside the boundary of the shared processing area. The width of the buffer zone is dynamically adjusted based on the braking distance and movement speed of the galvanometer, typically set to 0.5 mm to 2 mm. When the predicted trajectory enters this buffer zone, it is considered to be about to enter the shared processing area. For the temporal threshold, a warning time window is set based on the galvanometer's response delay and path interpolation period; in this embodiment, it is set to 3 milliseconds. These spatial and temporal thresholds together constitute the trigger conditions for the avoidance procedure. That is, when the predicted trajectory enters the buffer zone and the expected time to enter the shared area is less than the time threshold, the trigger condition is deemed met. Through the connection of these four steps, the system completes the mapping from mechanical parameters to executable trigger conditions, providing accurate and adjustable boundary criteria for subsequent avoidance decisions.
[0133] Furthermore, you can also view Figure 7 , Figure 7 This is a flowchart illustrating the fourth embodiment of the control method for the dual galvanometer system of this application. In this embodiment, after the step of controlling the galvanometer motion based on the smooth transition path during the execution of the avoidance procedure, steps S110-140 are further included:
[0134] Step S110: During the execution of the avoidance procedure, the actual motion trajectory data and predicted motion trajectory data of the first galvanometer and the second galvanometer are collected, and the trajectory tracking error sequence between the two is calculated.
[0135] Step S120: When the statistical characteristics of the trajectory tracking error sequence exceed the preset error tolerance range, the parameter adaptive adjustment mechanism of the Kalman filter is triggered.
[0136] Step S130: Using adaptively adjusted Kalman filter parameters, the motion trajectories of the first and second galvanometers at future moments are re-predicted until the laser processing is completed.
[0137] After controlling the galvanometer motion based on a smooth transition path during the avoidance procedure, the Kalman filter parameters are adaptively adjusted through four steps to address the impact of changes in the system's dynamic characteristics during processing on prediction accuracy.
[0138] During the avoidance procedure, the actual and predicted motion trajectory data of the first and second galvanometers are acquired, and the trajectory tracking error sequence between them is calculated. The actual motion trajectory data is acquired in real time by an encoder, while the predicted motion trajectory data is provided by the predicted state output by a Kalman filter at corresponding times. The Euclidean distance deviation between the actual and predicted positions is calculated within each control cycle, forming an error sequence organized as a time series. The sampling frequency of this error sequence is consistent with the system control cycle, typically set at 5kHz. Continuous acquisition of the error sequence covers the entire avoidance procedure execution process, providing sufficient data samples for subsequent error analysis.
[0139] When the statistical characteristics of the trajectory tracking error sequence exceed the preset error tolerance range, the Kalman filter's parameter adaptive adjustment mechanism is triggered. The statistical characteristics include the mean and variance of the error sequence, and the error tolerance range is preset according to the processing accuracy requirements. A sliding window method is used to perform real-time statistical analysis of the error sequence; the window length is typically set to 100 sampling points, i.e., a 20-millisecond time window. When the mean error within the sliding window exceeds 5 micrometers or the variance exceeds 2 micrometers squared, it is determined that the current filter parameters are mismatched with the actual system dynamic characteristics, triggering the parameter adjustment mechanism. The threshold settings for the above statistical characteristics balance processing accuracy requirements and system stability, avoiding frequent false triggers caused by occasional noise.
[0140] The adaptively adjusted Kalman filter parameters are used to re-predict the motion trajectories of the first and second galvanometers at future times. The core of the adaptive parameter adjustment mechanism lies in the dynamic updating of the process noise covariance matrix and the observation noise covariance matrix. Based on the error sequence calculated above, the value of the process noise covariance matrix is re-estimated using maximum likelihood estimation or covariance matching methods; simultaneously, the observation noise covariance matrix is dynamically adjusted according to changes in encoder measurement accuracy and environmental noise levels. These adjustments are completed within the next control cycle after the trigger condition is met, and the adjusted filter parameters are immediately applied to subsequent state estimates and trajectory predictions. The re-predicted motion trajectory starts from the currently updated state estimate and iteratively predicts the state at multiple future sampling times, with the prediction step size consistent with that defined in step S15.
[0141] The adaptive adjustment and re-prediction steps described above are repeated until the laser processing is completed. This repeated execution forms a closed-loop feedback mechanism, allowing the Kalman filter parameters to be continuously optimized as the system's dynamic characteristics change during processing. In actual operation, steps S110 to S130 constitute an independent control loop, which runs continuously in sync with the system control cycle. After each parameter adjustment is triggered, the filter parameters are updated and used for subsequent predictions, and the new prediction results become the benchmark for the next error calculation. This loop continues until the laser processing task is completed. Through this closed-loop adaptive mechanism, the Kalman filter maintains accurate modeling of the galvanometer motion characteristics throughout the processing, avoiding a decrease in prediction accuracy due to system aging, temperature changes, or differences in processing materials, thus maintaining the consistency and reliability of avoidance control throughout the entire processing process.
[0142] You can also view Figure 8 , Figure 8 This is a detailed process diagram based on step S130 in the fourth embodiment. Figure 8 The step of using adaptively adjusted Kalman filter parameters to re-predict the motion trajectories of the first and second galvanometers at future moments until the laser processing ends includes S131~132:
[0143] Step S131: Dynamically update the process noise covariance matrix and observation noise covariance matrix in the Kalman filter based on the mean and variance of the trajectory tracking error sequence;
[0144] Step S132: Using the adaptively adjusted Kalman filter parameters, re-predict the motion trajectories of the first and second galvanometers at future moments.
[0145] In the process of re-predicting the motion trajectories of the first and second galvanometers at future moments using adaptively adjusted Kalman filter parameters, a closed-loop optimization from error statistics to parameter update to trajectory re-prediction is completed through two sub-steps to ensure that the filter model always matches the actual dynamic characteristics of the galvanometers.
[0146] Based on the mean and variance of the trajectory tracking error sequence, the process noise covariance matrix and observation noise covariance matrix in the Kalman filter are dynamically updated. The trajectory tracking error sequence originates from the deviation between the calculated actual motion trajectory data and the predicted motion trajectory data. This sequence is stored in time series form, reflecting the degree of matching between the current Kalman filter parameters and the actual motion characteristics of the galvanometer. A sliding window method is used to perform real-time statistical analysis on the error sequence. The window length is determined comprehensively based on the galvanometer's motion period and control delay; in this embodiment, it is set to 100 sampling points, corresponding to a 20-millisecond time window. Within each control cycle, the system calculates the mean and variance of the error sequence within that window, serving as the basis for parameter adjustment.
[0147] The process noise covariance matrix is updated using a covariance matching method. First, the actual covariance matrix of the predicted residual within the current window is calculated; this residual is the difference between the sensor measurement data and the predicted observation. Then, the actual covariance matrix is compared with the theoretical covariance matrix. If a significant difference exists, the process noise covariance matrix is adjusted to approximate the actual covariance. Specifically, a maximum likelihood estimation criterion is used to construct an optimization objective function with the process noise covariance matrix as the variable. The covariance matrix value that minimizes the objective function is then solved using gradient descent or Newton's method. This optimization process is completed within one control cycle after triggering adaptive adjustment, ensuring that parameter updates do not introduce significant delays.
[0148] The observation noise covariance matrix is updated based on the encoder's real-time measurement accuracy and the ambient noise level. During processing, the noise characteristics of the encoder output signal are continuously monitored. When factors such as vibration, temperature changes, or electromagnetic interference increase the measurement noise, the diagonal elements of the observation noise covariance matrix are increased accordingly. Conversely, when the processing environment stabilizes, the observation noise covariance matrix is gradually restored to its nominal value. The above-mentioned adjustment of observation noise uses an exponentially weighted moving average method, which ensures both the speed of noise estimation response to sudden interferences and avoids drastic parameter fluctuations caused by single noise spikes.
[0149] Adaptively adjusted Kalman filter parameters are used to re-predict the trajectories of the first and second galvanometers at future times. The starting point for re-prediction is the updated state estimate at the current sampling time, which incorporates the latest sensor measurements and the updated filter parameters. Using this state estimate as the initial condition, the state transition matrix is used to iteratively predict the state at multiple future sampling times. The state transition matrix is constructed based on the kinematic model of the galvanometers and the sampling time interval, and its specific form remains consistent with the above. The number of prediction steps is dynamically set according to the galvanometer's motion speed and the time requirements of the avoidance procedure, typically covering a time window of 5 to 20 milliseconds, which is sufficient to support the early judgment of avoidance conditions and the smooth transition of path planning.
[0150] During the iterative prediction process, the updated process noise covariance matrix is used to recursively calculate the prediction covariance, making the uncertainty estimate of the predicted state more consistent with the actual noise characteristics of the current system. For each prediction moment, the position coordinates, velocity vector, and acceleration information of the output galvanometer are generated, forming a predicted motion trajectory organized in time series. This predicted trajectory is not only used for triggering subsequent avoidance procedures but also serves as the benchmark for the next round of error calculation, constituting the feedback loop of the adaptive closed-loop control.
[0151] Through the coordinated execution of the above steps, online adaptive adjustment of Kalman filter parameters and continuous re-prediction of motion trajectories are achieved. This mechanism enables the filter to automatically adapt to changes in the dynamic characteristics of the galvanometers during manufacturing, including changes in response delay due to mechanical wear, gain changes caused by temperature drift, and load changes due to differences in processing materials. This maintains consistent prediction accuracy throughout the entire manufacturing cycle, providing a stable and reliable basis for state estimates for collaborative avoidance between the two galvanometers in common areas.
[0152] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the control method of the dual galvanometer system of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0153] This application provides a control device for a dual galvanometer system. The control device for the dual galvanometer system includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the control method of the dual galvanometer system in the first embodiment described above.
[0154] The following is for reference. Figure 9The diagram illustrates a structural schematic of a control device suitable for implementing the dual-mirror system of the embodiments of this application. The control device for the dual-mirror system in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 9 The control device for the dual galvanometer system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0155] like Figure 9 As shown, the control device of the dual galvanometer system may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the control device of the dual galvanometer system. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the control equipment of the dual galvanometer system to communicate wirelessly or wiredly with other devices to exchange data. Although control equipment with various dual galvanometer systems is shown in the figures, it should be understood that implementation or possession of all shown is not required. More or fewer may be implemented alternatively.
[0156] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0157] The control device for the dual galvanometer system provided in this application, employing the control method of the dual galvanometer system in the above embodiments, can solve the technical problem that static path planning in existing dual galvanometer processing cannot dynamically avoid interference in common areas. Compared with the prior art, the beneficial effects of the control device for the dual galvanometer system provided in this application are the same as those of the control method for the dual galvanometer system provided in the above embodiments, and other technical features in the control device for the dual galvanometer system are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0158] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0159] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0160] This application provides a storage medium, which is a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the control method of the dual galvanometer system in the above embodiments.
[0161] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be executed by instructions, used by devices, or used in conjunction with them. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0162] The aforementioned computer-readable storage medium may be included in the control device of the dual galvanometer system; or it may exist independently and not be assembled into the control device of the dual galvanometer system.
[0163] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the control device of the dual galvanometer system, the control device of the dual galvanometer system implements the technical content of the control method embodiment of the dual galvanometer system as shown above.
[0164] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0165] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using dedicated hardware-based implementations that perform the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.
[0166] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0167] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the control method of the above-described dual galvanometer system. This solves the technical problem in existing dual galvanometer processing where static path planning cannot dynamically avoid interference in common areas. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the control method of the dual galvanometer system provided in the above embodiments, and will not be elaborated upon here.
Claims
1. A control method for a dual-galvanometer system, characterized in that, The control method for the dual galvanometer system includes the following steps: During laser processing, the real-time motion state information of the first and second galvanometers is input into a Kalman filter to obtain the predicted motion trajectories of the first and second galvanometers at future moments. Obtain the mechanical structure parameters of the dual galvanometer processing system, including the deflection angle range, motion stroke range, and physical dimensions of the galvanometers; Based on the mechanical structure parameters, a motion range model of the first galvanometer and the second galvanometer is constructed in three-dimensional space; The motion range model is transformed from the galvanometer coordinate system to the workpiece coordinate system, and the common processing area of the first galvanometer and the second galvanometer is marked in the workpiece coordinate system. The triggering conditions for the avoidance procedure are set based on the aforementioned public processing area; Determine whether the triggering conditions of the avoidance procedure are met based on the predicted motion trajectory; If so, based on the priorities of the first and second galvanometers and the motion trajectory, an interpolation algorithm is used to generate a smooth transition path corresponding to the avoidance procedure, and during the execution of the avoidance procedure, the movement of the galvanometers is controlled based on the smooth transition path.
2. The control method for the dual galvanometer system as described in claim 1, characterized in that, Before the step of inputting the real-time motion state information of the first and second galvanometers into the Kalman filter during laser processing, the method further includes: The encoder acquires real-time position data of the first and second galvanometers at a preset sampling frequency. Based on differential operations, motion velocity data and acceleration data are extracted from the real-time position data, and the focal position data and energy distribution data of the laser beam based on the current moment are acquired simultaneously. Timestamps are added to the real-time location data, motion speed data, acceleration data, focal position data, and energy distribution data to generate time-aligned real-time motion state information.
3. The control method for the dual galvanometer system as described in claim 1, characterized in that, The step of inputting the real-time motion state information of the first and second galvanometers into a Kalman filter to obtain the predicted motion trajectories of the first and second galvanometers at future moments includes: Acquire sensor measurement data at each sampling time, wherein the sensor measurement data includes at least the real-time position of the galvanometer in the workpiece coordinate system; Based on the state estimate obtained from the previous sampling time and the preset state transition matrix, the predicted state and prediction covariance at the current sampling time are calculated. The state estimate includes the position and velocity components of the galvanometer, and the state transition matrix is determined based on the kinematic model of the galvanometer and the sampling time interval. The Kalman gain is calculated using the predicted covariance and the preset observation noise covariance matrix. Based on the Kalman gain, the sensor measurement data at the current sampling time, and the predicted state, calculate the updated state estimate and the updated covariance at the current sampling time; Starting from the updated state estimate, the state at multiple future sampling moments is predicted iteratively using the state transition matrix to generate the predicted motion trajectories of the first and second galvanometers at future moments.
4. The control method for the dual galvanometer system as described in claim 1, characterized in that, The step of determining whether the triggering conditions of the avoidance procedure are met based on the predicted motion trajectory includes: Determine the common processing area of the first galvanometer and the second galvanometer, and perform a spatial intersection operation between the predicted motion trajectory and the boundary condition data of the common processing area; Based on the result of the spatial intersection operation, the first estimated entry time of the first galvanometer and the common processing area, and the second estimated entry time of the second galvanometer and the common processing area are obtained. The first and second estimated entry times are compared with preset time warning thresholds. Based on the comparison results, it is determined whether the first and second galvanometers are about to enter or have already entered the common processing area. Based on the determination results, it is determined whether the triggering conditions of the avoidance procedure are met.
5. The control method for the dual galvanometer system as described in claim 1, characterized in that, The step of generating a smooth transition path corresponding to the avoidance procedure using an interpolation algorithm based on the priorities of the first and second galvanometers and the motion trajectory includes: Obtain the original planned path point sequences of the first galvanometer and the second galvanometer respectively; Based on the original planned path point sequence and priority, conflicting path segments where the first galvanometer and the second galvanometer have spatial overlap or temporal conflict are identified; The second-order kinematic constraint interpolation of the interpolation algorithm is used as the calculation parameter. The starting position, ending position, starting velocity, and ending velocity of the conflict path segment are used as the boundary conditions. The cubic spline curve or Bezier curve that satisfies the acceleration continuity is solved by the calculation parameter and the boundary conditions, which serves as the avoidance transition path for the low-priority galvanometer. The avoidance transition path is spliced with the non-conflict path segment of the low-priority galvanometer to form the smooth transition path.
6. The control method for the dual galvanometer system as described in claim 1, characterized in that, Following the step of controlling the galvanometer motion based on the smooth transition path during the avoidance procedure execution, the procedure further includes: During the avoidance procedure, the actual motion trajectory data and predicted motion trajectory data of the first galvanometer and the second galvanometer are collected, and the trajectory tracking error sequence between the two is calculated. When the statistical characteristics of the trajectory tracking error sequence exceed the preset error tolerance range, the Kalman filter parameter adaptive adjustment mechanism is triggered. The motion trajectories of the first and second galvanometers at future moments are re-predicted using adaptively adjusted Kalman filter parameters until the laser processing is completed.
7. The control method for the dual galvanometer system as described in claim 6, characterized in that, The step of using adaptively adjusted Kalman filter parameters to re-predict the motion trajectories of the first and second galvanometers at future moments until the laser processing is completed includes: Based on the mean and variance of the trajectory tracking error sequence, the process noise covariance matrix and the observation noise covariance matrix in the Kalman filter are dynamically updated. The motion trajectories of the first and second galvanometers at future moments are re-predicted using the adaptively adjusted Kalman filter parameters.
8. A control device for a dual galvanometer system, characterized in that, The control device of the dual galvanometer system stores a computer program, which, when executed by a processor, implements the control method of the dual galvanometer system according to any one of claims 1-7.
9. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the control method of the dual galvanometer system according to any one of claims 1-7.
Citation Information
Patent Citations
Intelligent avoiding and load balancing method for double-spindle machining of high-speed engraving and milling machine
CN121115669A