Method, device and storage medium for controlling the movement of a laser machining trajectory
Patent Information
- Application Number
- CN202611478876.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本申请的主要目的在于提供一种激光加工的轨迹运动控制方法、设备及存储介质,旨在解决激光加工在复杂轨迹加工时,指令的加载速度跟不上执行速度,导致运动轴被迫减速停止,影响实际产品的激光加工效果的技术问题
本申请通过获取多段轨迹指令以及各轨迹段对应的运动参数,基于相邻轨迹段之间的曲率变化率和加速度约束逆向计算各轨迹段的段末速度生成速度规划,使每一轨迹段的段末速度都根据后续轨迹的几何变化预先确定而非被迫归零,消除轨迹段连接处的停顿,从而避免轨迹断裂,提高产品的加工效果。此外,进一步检测指令缓冲区的剩余容量,并根据剩余容量动态调整速度规划得到目标速度规划,在缓冲区容量下降时主动降低执行速度,使指令消耗速度与指令加载速度重新匹配,从而避免缓冲区被清空后运动轴被迫停止又等待填充后重新加速的过程,消除加工过程的急停急启和机械冲击。
Smart Images

Figure CN123010618A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machining trajectory control technology, and in particular to a method, device and storage medium for trajectory motion control in laser processing. Background Technology
[0002] Laser processing equipment typically employs a motion controller to drive servo motors for multi-axis linkage. This motion controller includes an instruction buffer to temporarily store trajectory description and parameter instructions issued by a host computer. During processing, the motion controller reads instructions from the instruction buffer at fixed intervals, performs interpolation calculations, and outputs the results to the servo driver. This instruction buffer usually uses a fixed-capacity first-in-first-out queue; when the number of remaining instructions falls below a preset threshold, it requests the host computer to load the next batch of instructions.
[0003] However, when the number of continuous trajectory segments is enormous, such as complex contours like gear teeth, blade profiles, or artistic engravings, the processing trajectory needs to be decomposed into tens of thousands of micro-segments. In this case, laser processing is limited by insufficient communication bandwidth or excessive load on the host computer. The loading speed of instructions cannot keep up with the execution speed, the buffer is gradually emptied, resulting in data starvation. The motion axis is forced to decelerate and stop, waiting for the buffer to be refilled before accelerating again. This causes trajectory breakage, decreased processing efficiency, and mechanical shocks from sudden stops and starts, affecting the actual laser processing effect of the product.
[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 laser processing trajectory motion control method, device, and storage medium, aiming to solve the technical problem that when laser processing involves complex trajectories, the loading speed of the command cannot keep up with the execution speed, causing the motion axis to be forced to decelerate and stop, thus affecting the laser processing effect of the actual product.
[0006] To achieve the above objectives, this application provides a trajectory motion control method for laser processing, the method comprising the following steps: Obtain multiple trajectory commands and the motion parameters corresponding to each trajectory segment in the multiple trajectory commands; Based on the rate of curvature change and acceleration constraints between adjacent trajectory segments in the motion parameters, the end velocity of each trajectory segment is calculated in reverse to generate a velocity plan. The remaining capacity of the instruction buffer is detected, and the speed plan is adjusted according to the remaining capacity to obtain the target speed plan; Based on the target velocity planning, interpolation motion is performed on the multi-segment trajectory commands.
[0007] In one embodiment, the step of inversely calculating the end-of-segment velocity of each trajectory segment based on the rate of curvature change and acceleration constraints between adjacent trajectory segments in the motion parameters, and generating velocity planning, includes: The trajectory type of each trajectory segment is parsed from the multiple trajectory instructions; The curvature of each trajectory segment is calculated according to the trajectory type. The curvature of the straight trajectory segment is zero, the curvature of the circular arc trajectory segment is the reciprocal of the radius of the circular arc, and the curvature of the spline trajectory segment is the curvature value obtained by numerical differentiation of the spline trajectory segment. Calculate the rate of change of curvature between adjacent trajectory segments, where the rate of change of curvature is the absolute value of the curvature difference between two adjacent trajectory segments.
[0008] In one embodiment, after the step of calculating the rate of change of curvature between adjacent trajectory segments, wherein the rate of change of curvature is the absolute value of the curvature difference between two adjacent trajectory segments, the method further includes: Set the velocity at the end of the last trajectory segment to zero, and traverse each trajectory segment backward from the segment preceding the last trajectory segment. For each trajectory segment, the acceleration term is obtained by dividing the product of twice the acceleration constraint and the path length of the trajectory segment in the motion parameters by the sum of the products of the curvature weighting coefficient and the rate of curvature change. The square root of the sum of the square of the initial velocity of the next trajectory segment and the acceleration term is used as the recursive velocity of that trajectory segment. The smaller value between the recursive velocity and the maximum permissible velocity of the trajectory segment in the motion parameters is taken as the end velocity of the trajectory segment; The acceleration change rate is calculated based on the change in velocity at the end of adjacent trajectory segments. When the acceleration change rate exceeds a preset acceleration change rate threshold, the end velocity is reduced so that the acceleration change rate does not exceed the acceleration change rate threshold.
[0009] In one embodiment, the step of detecting the remaining capacity of the instruction buffer and adjusting the speed plan based on the remaining capacity to obtain the target speed plan includes: The remaining capacity is compared with preset high water level thresholds and low water level thresholds; When the remaining capacity is higher than the high water level threshold, request the host computer to batch load subsequent trajectory instructions; When the remaining capacity is lower than the low water level threshold, the speed in the speed plan is reduced according to the ratio of the remaining capacity to the low water level threshold to obtain the target speed plan.
[0010] In one embodiment, after the step of reducing the speed in the speed planning according to the ratio of the remaining capacity to the low water level threshold when the remaining capacity is lower than the low water level threshold, to obtain the target speed planning, the method further includes: The capacity of the instruction buffer is dynamically adjusted based on the ratio of the current execution speed to the maximum execution speed. An emergency slot is reserved in the instruction buffer to store trajectory instructions with a priority higher than the preset priority; When performing the interpolation motion, the trajectory instructions in the emergency slot are read first.
[0011] In one embodiment, the step of performing interpolation motion on the multi-segment trajectory command based on the target velocity planning includes: For the connection point of two adjacent trajectory segments, select the end point of the previous trajectory segment, the beginning point of the next trajectory segment, and the two tangential extension points obtained by extending along the tangential direction as the control points of the transition curve. A spline transition curve is fitted based on the control points, and the spline transition curve maintains second-order continuity at the connection points; Within the transition interval corresponding to the spline transition curve, interpolation is performed according to the velocity curve with a limited rate of change of acceleration.
[0012] In one embodiment, after the step of interpolating according to a velocity curve with a limited rate of change of acceleration within the transition interval corresponding to the spline transition curve, the method further includes: The on and off positions of the laser are determined based on the arc length parameter of the spline transition curve. When interpolation is performed to the open position, the laser is triggered to turn on; When interpolation is performed to the closed position, the laser is triggered to shut down.
[0013] In one embodiment, after the step of performing interpolation motion on the multi-segment trajectory command based on the target velocity planning, the method further includes: The system detects the power supply voltage and triggers a power outage when the power supply voltage drops to a preset voltage threshold. In response to the power outage, the current motion state and the speed plan are saved to non-volatile memory, and the data saved to the non-volatile memory is verified. After power is restored, the current motion state and the speed plan are read from the non-volatile memory; The positions of each motion axis are restored based on the current motion state, and the trajectory segments are traced back a preset number of segments to reconstruct the speed plan; The interpolation motion is then performed from the restored positions of the motion axes.
[0014] In addition, to achieve the above objectives, this application also provides a trajectory motion control device for laser processing, 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 trajectory motion control method for laser processing as described above.
[0015] In addition, to achieve the above objectives, this application also provides 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 laser processing trajectory motion control method as described above.
[0016] One or more technical solutions proposed in this application have at least the following technical effects: This application obtains multiple trajectory commands and the corresponding motion parameters of each trajectory segment. Based on the rate of curvature change and acceleration constraints between adjacent trajectory segments, it inversely calculates the end velocity of each trajectory segment to generate a speed plan. This ensures that the end velocity of each trajectory segment is predetermined based on the geometric changes of the subsequent trajectory, rather than being forced to zero, eliminating pauses at the connection points of trajectory segments, thereby avoiding trajectory breakage and improving the processing effect of the product. Furthermore, it further detects the remaining capacity of the command buffer and dynamically adjusts the speed plan based on the remaining capacity to obtain the target speed plan. When the buffer capacity decreases, it actively reduces the execution speed, rematching the command consumption speed with the command loading speed. This avoids the process where the motion axis is forced to stop after the buffer is emptied and then waits to be refilled before accelerating again, eliminating sudden stops and starts and mechanical shocks in the processing process. Attached Figure Description
[0017] 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.
[0018] 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.
[0019] Figure 1 This is a flowchart illustrating the first embodiment of the trajectory motion control method for laser processing according to this application. Figure 2 This is a flowchart illustrating the second embodiment of the trajectory motion control method for laser processing according to this application. Figure 3 This is a flowchart illustrating the third embodiment of the trajectory motion control method for laser processing according to this application. Figure 4 This is a schematic diagram of the structure of a laser processing trajectory motion control device in the hardware operating environment involved in the embodiments of this application.
[0020] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0022] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0023] The main solution of this application embodiment is: to obtain multiple trajectory commands and motion parameters corresponding to each trajectory segment in the multiple trajectory commands; to calculate the end velocity of each trajectory segment in reverse based on the rate of curvature change and acceleration constraints between adjacent trajectory segments in the motion parameters; to generate a velocity plan; to detect the remaining capacity of the command buffer; to adjust the velocity plan according to the remaining capacity; to obtain the target velocity plan; and to perform interpolation motion on the multiple trajectory commands based on the target velocity plan.
[0024] In related technologies, when the number of continuous trajectory segments in laser processing is enormous, such as complex contours like gear teeth, blade profiles, or artistic engravings, the processing trajectory is decomposed into tens of thousands of micro-segments. In such cases, laser processing is limited by insufficient communication bandwidth or excessive load on the host computer. The loading speed of instructions cannot keep up with the execution speed, the buffer is gradually emptied, leading to data starvation. The motion axis is forced to decelerate and stop, only to accelerate again after the buffer is refilled. This results in trajectory breakage, decreased processing efficiency, and mechanical shocks from sudden stops and starts, ultimately affecting the laser processing effect on the actual product.
[0025] This application obtains multiple trajectory commands and the corresponding motion parameters of each trajectory segment. Based on the rate of curvature change and acceleration constraints between adjacent trajectory segments, it inversely calculates the end velocity of each trajectory segment to generate a speed plan. This ensures that the end velocity of each trajectory segment is predetermined based on the geometric changes of the subsequent trajectory, rather than being forced to zero, eliminating pauses at the connection points of trajectory segments, thereby avoiding trajectory breakage and improving the processing effect of the product. Furthermore, it further detects the remaining capacity of the command buffer and dynamically adjusts the speed plan based on the remaining capacity to obtain the target speed plan. When the buffer capacity decreases, it actively reduces the execution speed, rematching the command consumption speed with the command loading speed. This avoids the process where the motion axis is forced to stop after the buffer is emptied and then waits to be refilled before accelerating again, eliminating sudden stops and starts and mechanical shocks in the processing process.
[0026] Furthermore, this application performs interpolation motion on multiple trajectory commands based on target speed planning, enabling the laser processing head to move along a continuous and stable trajectory. This transforms the passive stopping and waiting due to insufficient buffer capacity into active deceleration and continuation, maintaining trajectory continuity and smooth movement even in complex contour processing scenarios with a large number of continuous trajectory segments, thereby improving the efficiency of laser processing and the processing effect of the actual product.
[0027] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0028] It should be noted that the executing entity in this embodiment can be a laser processing device, or a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, a trajectory motion control device for laser processing, etc. This embodiment does not specifically limit it. The following uses a laser processing device as an example to describe this embodiment and the following embodiments.
[0029] Based on this, embodiments of this application provide a trajectory motion control method for laser processing, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the trajectory motion control method for laser processing according to this application.
[0030] In this embodiment, the trajectory motion control method for laser processing includes steps S10 to S40: Step S10: Obtain multi-segment trajectory instructions and the motion parameters corresponding to each trajectory segment in the multi-segment trajectory instructions; In this embodiment, the laser processing equipment acquires multiple trajectory commands and the corresponding motion parameters for each trajectory segment. The trajectory command describes the movement path of the laser processing head. The trajectory command employs geometric path description technology, defining the geometric shape of the processing trajectory through trajectory type and geometric parameters. Trajectory types include straight-line trajectories, circular arc trajectories, and spline trajectories. Geometric parameters include the starting and ending coordinates of the straight-line trajectory segment, the center coordinates, radius, and start and end angles of the circular arc trajectory segment, and the control points of the spline trajectory segment.
[0031] Specifically, the laser processing equipment receives a trajectory command stream from a host computer, parsed from a processing file. The host computer parses the processing file generated by the design software into trajectory commands, with the processing file containing the geometric contour to be processed. The laser processing equipment performs syntax analysis and type recognition on the received trajectory command stream, distinguishing between straight-line trajectory commands, circular arc trajectory commands, and spline trajectory commands, and assigns a unique trajectory segment identifier to each trajectory segment. The trajectory segment identifier is used for subsequent independent positioning of each trajectory segment. The laser processing equipment simultaneously extracts the motion parameters corresponding to each trajectory segment. The motion parameters are transmitted along with the trajectory commands. The laser processing equipment establishes a correspondence between trajectory segment identifiers and motion parameters, forming a one-to-one mapping between trajectory segments and motion constraints. This one-to-one mapping ensures that subsequent velocity planning can accurately obtain the motion constraints of each trajectory segment. The laser processing equipment encapsulates the classified trajectory commands and motion parameters into a unified command data structure. The command data structure includes a command sequence number, command type, priority, data body, and check code. This unified encapsulation allows subsequent curvature calculation and velocity planning to consistently read the geometric information and motion constraints of each trajectory segment.
[0032] As an optional implementation, the trajectory commands include straight-line trajectory commands, circular arc trajectory commands, and spline trajectory commands, and the motion parameters include the maximum permissible speed and the maximum permissible acceleration. After acquiring the trajectory commands, the laser processing equipment analyzes the trajectory type of each trajectory segment. The analysis of the trajectory type provides the geometric basis for subsequent curvature calculation, and the curvature calculation method differs for different trajectory types.
[0033] As an alternative implementation, trajectory commands and motion parameters are carried using a unified command encapsulation format. This format includes a command sequence number, command type, priority, data body length, command data body, and checksum. Trajectory commands exist in the form of straight-line trajectory commands, circular arc trajectory commands, and spline trajectory commands, while motion parameters exist in the form of parameter commands. Parameter commands and trajectory commands are interleaved. The laser processing equipment reads the commands sequentially according to their sequence numbers and applies the motion parameters to their corresponding trajectory segments. The checksum is used to verify the integrity of the command data, and the priority is used to mark urgent commands, allowing the laser processing equipment to distinguish between ordinary trajectory commands and commands requiring priority processing.
[0034] Step S20: Based on the rate of curvature change and acceleration constraints between adjacent trajectory segments in the motion parameters, calculate the end velocity of each trajectory segment in reverse to generate velocity planning; In this embodiment, the laser processing equipment inversely calculates the end-of-segment velocity of each trajectory segment based on the rate of curvature change and acceleration constraints between adjacent trajectory segments, generating a velocity plan. The rate of curvature change is the absolute value of the curvature difference between two adjacent trajectory segments. This rate of curvature change employs curvature difference technology, quantifying the severity of the geometric change in the trajectory by calculating the absolute difference in curvature between adjacent trajectory segments. A larger rate of curvature change indicates a more abrupt geometric transition between adjacent trajectory segments. Acceleration constraints are used to prevent shocks caused by sudden velocity changes. The end-of-segment velocity is the velocity of each trajectory segment at its end position. This end-of-segment velocity is calculated using inverse velocity planning technology, recursively calculating from the last trajectory segment forward to avoid pauses caused by the velocity at the end of each trajectory segment returning to zero. The velocity plan is a velocity sequence allocated to each trajectory segment. This velocity planning employs look-ahead planning technology, pre-analyzing the geometric characteristics of subsequent trajectory segments and allocating velocities as a whole before execution.
[0035] Specifically, the laser processing equipment analyzes the trajectory type of each trajectory segment and calculates the curvature of each segment based on the trajectory type. The curvature of a straight trajectory segment is zero, the curvature of a circular arc trajectory segment is the reciprocal of the radius of the arc, and the curvature of a spline trajectory segment is the curvature value obtained by numerical differentiation of the spline trajectory segment. The laser processing equipment calculates the rate of change of curvature between adjacent trajectory segments. The rate of change of curvature is the absolute value of the difference in curvature between two adjacent trajectory segments, and it characterizes the degree of abrupt change in the geometric direction of the trajectory at the connection point. The laser processing equipment sets the terminal velocity of the last trajectory segment to zero and traverses each trajectory segment backward from the segment preceding the last one. For each trajectory segment, it calculates an acceleration term based on acceleration constraints and path length, and calculates a recursive velocity based on the starting velocity of the next trajectory segment and the acceleration term. The smaller value between the recursive velocity and the maximum allowable velocity is taken as the terminal velocity of that trajectory segment. This reverse traversal ensures that the terminal velocity of the preceding trajectory segment is constrained by the velocity of the following trajectory segment. The laser processing equipment calculates the rate of acceleration change based on the change in velocity at the end of adjacent trajectory segments. When the rate of acceleration change exceeds a preset threshold, the end velocity is reduced to ensure that the rate of acceleration change does not exceed the preset threshold, thus preventing excessively drastic velocity changes. The laser processing equipment aggregates the end velocities of each trajectory segment into a velocity plan, which provides a velocity sequence for subsequent interpolation motions.
[0036] As an optional implementation, the laser processing equipment parses the trajectory type of each trajectory segment from the trajectory command. Trajectory types include straight-line trajectories, circular arc trajectories, and spline trajectories. The laser processing equipment calculates the curvature of each trajectory segment based on its trajectory type. The curvature of a straight-line trajectory segment is zero; the curvature of a circular arc trajectory segment is the reciprocal of the radius of the arc; and the curvature of a spline trajectory segment is the curvature value obtained by numerically differentiating the spline trajectory segment. The laser processing equipment calculates the rate of change of curvature between adjacent trajectory segments. This rate of change of curvature is the absolute value of the difference in curvature between two adjacent trajectory segments. The curvature calculation provides geometric feature input for the inverse velocity recursion; the larger the rate of change of curvature, the lower the velocity restriction at the end of the segment corresponding to the connection point.
[0037] As an alternative implementation, the laser processing equipment sets the terminal velocity of the final trajectory segment to zero and traverses each trajectory segment backward, starting from the segment preceding the final one. For each trajectory segment, the laser processing equipment calculates an acceleration term by dividing the product of twice the acceleration constraint and the path length of the trajectory segment by the sum of the products of the curvature weighting coefficient and the rate of change of curvature. This acceleration term represents the velocity increment that the trajectory segment can obtain under the acceleration constraint. The laser processing equipment calculates the square root of the sum of the acceleration terms and the square of the initial velocity of the next trajectory segment as the recursive velocity of that trajectory segment. This recursive velocity ensures that the terminal velocity of the current trajectory segment is kinematically connected to the initial velocity of the next trajectory segment. The laser processing equipment takes the smaller value between the recursive velocity and the maximum permissible velocity of the trajectory segment as the terminal velocity of that trajectory segment. The laser processing equipment calculates the rate of change of acceleration based on the change in terminal velocity between adjacent trajectory segments. When the rate of change of acceleration exceeds a preset threshold, the terminal velocity is reduced to ensure that the rate of change of acceleration does not exceed the preset threshold. The reverse recursion ensures that the velocity at the end of each trajectory segment simultaneously satisfies both the rate of curvature change constraint and the acceleration constraint, thus avoiding sudden velocity changes.
[0038] Step S30: Detect the remaining capacity of the instruction buffer and adjust the speed plan according to the remaining capacity to obtain the target speed plan; In this embodiment, the laser processing equipment detects the remaining capacity of the instruction buffer and dynamically adjusts the speed plan based on the remaining capacity to obtain the target speed plan. The instruction buffer is a storage area in the laser processing equipment used to temporarily store trajectory instructions to be executed. The instruction buffer adopts a circular buffer technology, maintaining the cyclical use of the storage area through write pointers and read pointers. The storage capacity is fixed; trajectory instructions are written by the write pointer and read and executed by the read pointer. The remaining capacity is the size of the available storage space in the instruction buffer that has not yet been written to, reflecting the instruction buffer's ability to continue accepting trajectory instructions. The target speed plan is the speed plan adjusted by the remaining capacity. The target speed plan employs a speed planning and buffer state coordination technology, feeding back the buffer capacity status to the speed plan. When the buffer capacity is insufficient, the speed is reduced to avoid instruction interruption.
[0039] Specifically, after generating the speed plan, the laser processing equipment monitors the remaining capacity of the instruction buffer in real time and compares it with preset high-level and low-level thresholds. When the remaining capacity is higher than the high-level threshold, the laser processing equipment requests a batch loading of subsequent trajectory instructions from the host computer to maintain a sufficient supply of instructions in the instruction buffer. When the remaining capacity is lower than the low-level threshold, the laser processing equipment reduces the speed in the speed plan according to the ratio of the remaining capacity to the low-level threshold to obtain the target speed plan. By reducing the execution speed, the rate of instruction consumption is reduced, buying time for the buffer to replenish instructions. When the remaining capacity is between the high-level and low-level thresholds, the laser processing equipment keeps the speed plan unchanged and directly uses it as the target speed plan. The laser processing equipment outputs the target speed plan to the interpolation execution stage.
[0040] As an optional implementation, the laser processing equipment compares the remaining capacity with preset high and low water level thresholds. When the remaining capacity is higher than the high water level threshold, it requests batch loading of subsequent trajectory instructions from the host computer. When the remaining capacity is lower than the low water level threshold, it reduces the speed in the speed planning according to the ratio of the remaining capacity to the low water level threshold, thus obtaining the target speed plan. The high and low water level thresholds divide the buffer capacity state into multiple intervals, with different intervals corresponding to different loading and speed adjustment strategies, ensuring that the buffer capacity is always kept within a reasonable range.
[0041] Optionally, the laser processing equipment also manages the motion process through a state machine. The state machine is an internal mechanism within the laser processing equipment used to manage state transitions during motion. Employing finite state machine technology, the state machine divides the motion process into standby, running, paused, and stopped states. The laser processing equipment transitions between these states based on start, pause, resume, and emergency stop commands. Specifically, after power-on initialization, the laser processing equipment enters a standby state. Upon receiving a start command and with sufficient commands in the command buffer, it enters a running state. Upon receiving a pause command, it enters a paused state, freezing the motion while retaining the commands in the command buffer. Upon receiving a resume command, it returns from the paused state to the running state. Upon receiving an emergency stop command or when processing is complete, it enters a stopped state and clears the command buffer. The state machine enables the laser processing equipment to respond to various control commands in an orderly manner, avoiding malfunctions caused by state confusion. As an optional implementation, the laser processing equipment executes a safe stopping sequence before entering the stopped state. The laser processing equipment sequentially reduces its speed, shuts down the laser, and saves its current state, ensuring a safe stop. State machine management enables the laser processing process to maintain a defined state and safe motion behavior during start-up, pause, resumption, and emergency stop operations, thereby improving the system's controllability and safety.
[0042] As an alternative implementation, the laser processing equipment dynamically adjusts the capacity of the instruction buffer based on the ratio of the current execution speed to the maximum execution speed. When the execution speed is low, the capacity of the instruction buffer is increased to accommodate more trajectory instructions; when the execution speed is high, the capacity of the instruction buffer is decreased. The laser processing equipment reserves emergency slots in the instruction buffer. These emergency slots are used to store trajectory instructions with a higher priority than a preset priority. During interpolation motion, trajectory instructions in the emergency slots are read first. The emergency slots ensure that emergency commands such as emergency stops can be executed promptly.
[0043] Optionally, the laser processing equipment can also dynamically adjust the laser power based on the speed of the laser pulse during laser processing, achieving coupled control of laser power and speed. Laser power-speed coupling is a control method in laser processing that adjusts the laser output power in real time according to the movement speed. This coupling control employs power-speed matching technology to maintain stable laser energy per unit path length, avoiding energy density fluctuations caused by speed changes. Specifically, the laser processing equipment adjusts the reference laser power according to the ratio of the current laser processing speed to the reference speed, based on the material absorption characteristic index. At higher operating speeds, the laser power is increased to maintain energy input per unit length; at lower speeds, the laser power is decreased to avoid excessive energy concentration. The material absorption characteristic index is determined by the laser absorption characteristics of the material to be processed, and different materials have different absorption characteristic indices. Coupled control of laser power and speed ensures stable energy input even when the laser processing speed changes, avoiding processing defects caused by energy density fluctuations and improving the consistency of processing quality.
[0044] For example, the instruction buffer capacity is 1000 instructions, the high-water mark threshold is 70%, and the low-water mark threshold is 30%. When the remaining capacity is 800 instructions (80%), the laser processing equipment loads subsequent trajectory instructions in batches with maximum bandwidth. When the remaining capacity is 250 instructions (25%), the laser processing equipment reduces the speed in the speed planning by a ratio of 250 to 300 to obtain the target speed planning.
[0045] Step S40: Based on the target velocity planning, perform interpolation motion on the multi-segment trajectory commands.
[0046] In this embodiment, the laser processing equipment performs interpolation motion on multiple trajectory commands based on the target velocity planning. Interpolation motion is the process by which the laser processing equipment inserts intermediate points between adjacent trajectory points of the trajectory commands and generates position commands for each motion axis according to the target velocity planning. The interpolation motion uses interpolation calculation technology to discretize the target trajectory with a fixed interpolation period. Within each interpolation period, the target position and target velocity of each motion axis are calculated, driving the laser processing actuator to move continuously. Interpolation motion transforms discrete trajectory commands into continuous motion control commands.
[0047] Specifically, the laser processing equipment selects the end point of the previous trajectory segment, the beginning point of the next trajectory segment, and two tangential extension points obtained along the tangential direction as control points for the transition curve of two adjacent trajectory segments. Based on these control points, a spline transition curve is fitted. The spline transition curve maintains second-order continuity at the connection points. This second-order continuity ensures continuity in position, tangential direction, and curvature, eliminating velocity jumps. Within the transition interval corresponding to the spline transition curve, the laser processing equipment performs interpolation according to a velocity curve with a limited rate of acceleration. This limited rate of acceleration ensures smooth velocity changes and avoids impacts. The laser processing equipment determines the laser's on and off positions based on the arc length parameter of the spline transition curve. The laser is triggered to turn on when interpolation reaches the on position and to turn off when interpolation reaches the off position, ensuring precise synchronization between the laser's on / off timing and the interpolation motion. During the interpolation process, the laser processing equipment monitors the power supply voltage. When the power supply voltage drops to a preset voltage threshold, a power-off interrupt is triggered, and the current motion state and velocity plan are saved to non-volatile memory.
[0048] As an optional implementation, the laser processing equipment selects the end point of the previous trajectory segment, the beginning point of the next trajectory segment, and two tangential extension points obtained along the tangential direction as control points for the connection point of two adjacent trajectory segments. A spline transition curve is fitted based on these control points. The spline transition curve maintains second-order continuity at the connection point. Interpolation is performed within the transition interval corresponding to the spline transition curve according to a velocity curve with a limited rate of change of acceleration. Second-order continuity ensures continuity in position, tangential direction, and curvature, eliminating velocity jumps and vibration patterns.
[0049] As an alternative implementation, the laser processing equipment determines the laser's on and off positions based on the arc length parameter of the spline transition curve. The laser is triggered to turn on when interpolation reaches the on position and to turn off when interpolation reaches the off position. Arc length parameterization establishes a mapping relationship between the spline transition curve's arc length and the parameter, ensuring precise synchronization between the laser's on / off timing and the interpolation movement.
[0050] As another optional implementation, the laser processing equipment detects the power supply voltage during interpolation. When the power supply voltage drops to a preset voltage threshold, a power outage is triggered. The current motion state and speed plan are saved to non-volatile memory. The data saved to the non-volatile memory is verified. After power is restored, the current motion state and speed plan are read from the non-volatile memory. The positions of each motion axis are restored according to the current motion state, and the speed plan is reconstructed by tracing back a preset number of trajectory segments. The interpolation motion is then resumed from the restored positions of each motion axis. Power outage protection enables the interrupted processing to be accurately resumed after power is restored.
[0051] For example, the laser processing equipment selects four control points at the connection points of adjacent straight and circular trajectory segments, fits a spline transition curve, and takes the transition length as 0.2 times the minimum length of the adjacent trajectory segments. The transition curve maintains second-order continuity at the connection points. The laser processing equipment determines the laser's on and off positions based on the arc length parameter of the spline transition curve, and the synchronization deviation between the laser's switching timing and the interpolation motion is less than 1 microsecond. When the power supply voltage drops to 80% of the rated voltage, the laser processing equipment triggers a power-off interruption, saves the current motion state and speed plan to non-volatile memory, and restores the deviation to 0.003 mm after power is restored.
[0052] This application obtains multiple trajectory commands and the corresponding motion parameters of each trajectory segment. Based on the rate of curvature change and acceleration constraints between adjacent trajectory segments, it inversely calculates the end velocity of each trajectory segment to generate a speed plan. This ensures that the end velocity of each trajectory segment is predetermined based on the geometric changes of the subsequent trajectory, rather than being forced to zero, eliminating pauses at the connection points of trajectory segments, thereby avoiding trajectory breakage and improving the processing effect of the product. Furthermore, it further detects the remaining capacity of the command buffer and dynamically adjusts the speed plan based on the remaining capacity to obtain the target speed plan. When the buffer capacity decreases, it actively reduces the execution speed, rematching the command consumption speed with the command loading speed. This avoids the process where the motion axis is forced to stop after the buffer is emptied and then waits to be refilled before accelerating again, eliminating sudden stops and starts and mechanical shocks in the processing process.
[0053] Based on the same inventive concept, this application also provides a second embodiment, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the trajectory motion control method for laser processing according to this application.
[0054] In this embodiment, the trajectory motion control method for laser processing further includes steps S21 to S25: Step S21: Set the end velocity of the last trajectory segment to zero, and start from the segment before the last trajectory segment to traverse each trajectory segment forward. Step S22: For each trajectory segment, the acceleration term is obtained by dividing the product of twice the acceleration constraint and the path length of the trajectory segment in the motion parameters by the sum of the products of the curvature weight coefficient and the rate of change of curvature. Step S23: Calculate the square root of the sum of the square of the initial velocity of the next trajectory segment and the acceleration term, and use it as the recursive velocity of that trajectory segment. Step S24: Take the smaller value between the recursive velocity and the maximum permissible velocity of the trajectory segment in the motion parameters, and use it as the end velocity of the trajectory segment; Step S25: Calculate the acceleration change rate based on the change in velocity at the end of adjacent trajectory segments. When the acceleration change rate exceeds a preset acceleration change rate threshold, reduce the end velocity of the segment so that the acceleration change rate does not exceed the acceleration change rate threshold.
[0055] In this embodiment, after calculating the rate of curvature change, the laser processing equipment recursively calculates the end-of-segment velocity of each trajectory segment through a reverse traversal. The end-of-segment velocity is the velocity at the end of the trajectory segment, determined using reverse velocity planning technology, recursively calculating from the last trajectory segment forward. Reverse traversal processes each trajectory segment sequentially from the last to the previous segment, ensuring that the end-of-segment velocity of each segment is constrained by the velocities of subsequent segments, thus guaranteeing velocity continuity between adjacent segments. The acceleration term characterizes the velocity increment a trajectory segment can achieve under acceleration constraints, determined by acceleration constraints, path length, and the rate of curvature change. The recursive velocity is the candidate end-of-segment velocity obtained by recursively calculating the starting velocity of the next trajectory segment and the acceleration term. The rate of acceleration change is the rate of change of acceleration over time corresponding to the change in end-of-segment velocity between adjacent trajectory segments, used to constrain the smoothness of velocity changes.
[0056] Specifically, the laser processing equipment sets the terminal velocity of the final trajectory segment to zero. The endpoint of this final trajectory segment is the laser processing endpoint, where the laser processing motion stops. The equipment iterates through each trajectory segment sequentially, starting from the segment preceding the final one. For each trajectory segment, the equipment calculates an acceleration term by dividing the product of twice the acceleration constraint and the path length of the segment by the sum of the products of the curvature weighting coefficient and the rate of curvature change. The numerator of the acceleration term represents the potential velocity increment jointly determined by the acceleration constraint and the path length. The curvature change rate term in the denominator reduces the acceleration term for trajectory segments with larger curvature change rates, thus limiting velocity at points of dramatic geometric change. The equipment then calculates the square root of the sum of the square of the initial velocity of the next trajectory segment and the acceleration term, using this as the recursive velocity for that segment. This recursive velocity satisfies the kinematic velocity square relationship, ensuring that the terminal velocity of the current trajectory segment is kinematically connected to the initial velocity of the next segment. The laser processing equipment takes the smaller value between the recursive velocity and the maximum permissible velocity of the trajectory segment as the segment's end velocity, thus achieving a balance between geometric constraints and the velocity limit. The laser processing equipment calculates the rate of acceleration change based on the change in end velocity between adjacent trajectory segments. When the rate of acceleration change exceeds a preset threshold, it reduces the end velocity to ensure the rate of acceleration change does not exceed the preset threshold, thereby further suppressing the impact of velocity changes.
[0057] This embodiment calculates the end velocity of each trajectory segment by reverse traversal and acceleration term recursion, so that the end velocity of each trajectory segment is simultaneously constrained by the rate of curvature change, acceleration, and maximum allowable velocity. Furthermore, the velocity change is further smoothed by the acceleration rate of change threshold, ensuring the continuous connection of velocities between adjacent trajectory segments. From the perspective of velocity planning, this provides a smooth velocity sequence for the aforementioned interpolation motion, thereby improving the continuity and surface quality of laser processing.
[0058] Since the system described in Embodiment 2 of this application is a system used to implement the method of Embodiment 1 of this application, those skilled in the art can understand the specific structure and variations of the system based on the method described in Embodiment 1 of this application, and will not be repeated here. All systems used in the methods of the embodiments of this application fall within the scope of protection of this application.
[0059] Based on the same inventive concept, this application also provides a third embodiment, referring to... Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the trajectory motion control method for laser processing according to this application.
[0060] In this embodiment, the trajectory motion control method for laser processing further includes steps S51 to S55: Step S51: Detect the power supply voltage and trigger a power outage interruption when the power supply voltage drops to a preset voltage threshold; Step S52: In response to a power outage, save the current motion state and speed plan to non-volatile memory, and verify the data saved to non-volatile memory; Step S53: After power-on, read the current motion state and speed plan from the non-volatile memory; Step S54: Restore the position of each motion axis according to the current motion state, and backtrack the trajectory segment of the preset number of segments to reconstruct the speed plan; Step S55: Continue the interpolation motion from the recovered positions of each motion axis.
[0061] In this embodiment, after the laser processing equipment performs interpolation motion, breakpoint recovery is achieved through power-off protection. The power supply voltage is the voltage that powers the laser processing equipment and the motion mechanism; a drop in the power supply voltage indicates a risk of power interruption. A power-off interruption is a non-maskable interrupt triggered when the power supply voltage drops to a preset voltage threshold; it is used to initiate breakpoint saving within a very short time. Non-volatile memory is a storage medium that does not lose data after a power outage; it is used to save breakpoint data. Verification is a process that verifies the integrity of the saved data, ensuring the reliability of the recovered data. Backtracking is a process that rereads several trajectory segments backward after power is restored to reconstruct the speed plan.
[0062] Specifically, the laser processing equipment detects the power supply voltage and triggers a power outage interrupt when the voltage drops to a preset threshold. The power outage interruption starts before a complete power outage, allowing time for breakpoint saving. In response to the power outage, the laser processing equipment saves its current motion state and speed plan to non-volatile memory and verifies the data to ensure its integrity. Upon power-up, the laser processing equipment reads the current motion state and speed plan from the non-volatile memory. Based on the current motion state, the laser processing equipment restores the positions of each motion axis and reconstructs the speed plan by tracing back a preset number of trajectory segments. The laser processing equipment then resumes interpolation motion from the restored positions of each motion axis, achieving breakpoint continuation.
[0063] Optionally, the laser processing equipment also manages the synchronization relationship between laser process parameter commands and trajectory commands. Laser process parameter commands are used to set laser output process parameters, including laser power commands, laser frequency commands, laser duty cycle commands, auxiliary gas commands, and cooling commands. The laser processing equipment employs a dual-ring buffer structure to store trajectory commands and parameter commands separately. The trajectory buffer stores trajectory description commands, and the parameter buffer stores parameter commands. The laser processing equipment synchronizes the trajectory commands in the trajectory buffer with the parameter commands in the parameter buffer using timestamps. Specifically, the laser processing equipment reads the parameter commands with the corresponding timestamps simultaneously with the trajectory commands, ensuring that the laser process parameters take effect at the corresponding trajectory positions. The dual-ring buffer and timestamp synchronization ensure precise temporal correspondence between trajectory commands and laser process parameter commands, avoiding process defects caused by asynchronous parameter switching and trajectory execution, and improving the consistency of laser processing.
[0064] Optionally, the laser processing equipment also dynamically adjusts the size of the look-ahead window based on the remaining capacity of the instruction buffer. The look-ahead window represents the number of continuous trajectory segments for which the laser processing equipment performs overall speed planning before execution. The look-ahead window employs dynamic look-ahead technology, and its size is adjusted in real-time according to the remaining capacity of the buffer. Specifically, when the buffer has ample remaining capacity, the laser processing equipment uses a larger look-ahead window to perform overall speed planning on a larger number of continuous trajectory segments, thereby achieving better speed transitions. When the buffer has insufficient remaining capacity, a smaller look-ahead window is used to reduce the computational load of speed planning and the occupancy of the buffer. Dynamic look-ahead window adjustment matches the depth of look-ahead planning with the real-time status of the buffer. When the buffer is ample, it fully utilizes look-ahead information to optimize speed planning; when the buffer is tight, it ensures that speed planning can be completed in a timely manner, thus balancing the optimality and real-time performance of speed planning.
[0065] Optionally, the laser processing equipment also implements bidirectional collaborative feedback between buffer state and speed planning. Bidirectional collaborative feedback is a mechanism where buffer state information and speed planning information mutually transmit and jointly influence control decisions. It employs a composite control technology of feedforward and feedback. Speed planning transmits the theoretically optimal speed and look-ahead window requirements to buffer management, while buffer management transmits remaining capacity and loading rate to speed planning. Specifically, the laser processing equipment determines the timing of command interruption based on the remaining buffer capacity and loading rate. When buffer capacity decreases, it preemptively reduces the speed in the speed planning; when buffer capacity recovers, it smoothly increases the speed. Simultaneously, it adjusts the buffer loading strategy according to the look-ahead window requirements of the speed planning. The laser processing equipment also dynamically allocates buffer capacity based on the ratio of the current execution speed to the maximum execution speed and the proportion of curved segments to the total number of trajectory segments. It allocates a larger trajectory buffer for high-speed straight trajectories and a larger parameter buffer for complex curved trajectories. Bidirectional collaborative feedback enables buffer management and speed planning to be optimized as a whole, avoiding command interruptions or speed abrupt changes caused by the disconnect between buffer capacity and speed planning, thus improving the overall operational stability of the system.
[0066] Optionally, the laser processing equipment also performs prefetching and pre-decoding of the trajectory instructions to be executed. Instruction prefetching is the action of the laser processing equipment reading subsequent trajectory instructions from the instruction buffer before executing the current trajectory instruction. Instruction pre-decoding is the action of the laser processing equipment decoding the trajectory instructions in advance after prefetching. Instruction prefetching and pre-decoding employ instruction pipeline technology, completing instruction reading and decoding before execution. Specifically, while executing the current trajectory instruction, the laser processing equipment prefetches and pre-decodes several subsequent trajectory instruction segments, temporarily storing the decoded geometric and motion parameters in a pre-decoding buffer. When subsequent trajectory instructions are executed, the already decoded parameters are directly used for interpolation calculation. Instruction prefetching and pre-decoding remove the overhead of instruction reading and decoding from the execution path in advance, reducing waiting time during execution and ensuring the real-time and continuous nature of the interpolation motion.
[0067] Optionally, the laser processing equipment further enhances the reliability of power outage protection through energy storage capacitors and dual-mirror storage. Energy storage capacitors are energy storage elements that provide temporary power to the laser processing equipment during power outages. Employing energy storage maintenance technology, the stored energy in the capacitors sustains the laser processing equipment in completing breakpoint preservation after a voltage drop. When the laser processing equipment detects a voltage drop, it uses the energy provided by the energy storage capacitors to write the current motion state and speed plan into non-volatile memory. Dual-mirror storage is a storage method that simultaneously writes breakpoint data to both the main storage area and the backup storage area. The laser processing equipment verifies the written data and writes the data to both the main and backup storage areas to form a dual mirror. Specifically, after power is restored, the laser processing equipment reads the breakpoint data from the main storage area and verifies it. If verification fails, it reads the breakpoint data from the backup storage area, thus ensuring the reliability of the breakpoint data. Energy storage capacitors and dual-mirror storage enable breakpoint preservation to be completed in a very short time during a power outage, and the breakpoint data has redundant backups, improving the reliability and recovery accuracy of breakpoint protection.
[0068] Optionally, the laser processing equipment also employs high-order smooth velocity profiles for acceleration and deceleration. High-order smooth acceleration and deceleration is a speed control method that uses a smooth curve, higher than the trapezoidal velocity profile, for velocity changes. It utilizes velocity profile technology with a limited rate of change of acceleration, constraining not only the magnitude of acceleration but also its rate of change during speed changes. Specifically, the laser processing equipment uses an S-shaped velocity profile or a high-order polynomial velocity profile in its speed planning, ensuring a smooth transition of speed within acceleration and deceleration phases along a curve with a limited rate of change of acceleration, avoiding abrupt acceleration changes at the start and end points of the trapezoidal velocity profile. High-order smooth acceleration and deceleration eliminates the impact and vibration caused by abrupt acceleration changes on the mechanical structure, reduces vibration marks during processing, and improves the surface quality and mechanical stability of laser processing.
[0069] This embodiment detects the power supply voltage to trigger a power outage, saves the current motion state and speed plan to a non-volatile memory and verifies it, so that laser processing can save complete breakpoint information during a sudden power outage and accurately recover after power is restored, thereby improving the reliability of laser processing and material utilization.
[0070] This application provides a trajectory motion control device for laser processing, the device comprising: 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the trajectory motion control method for laser processing as described in Embodiment 1 above.
[0071] The following is for reference. Figure 4The diagram illustrates a structural schematic of a trajectory motion control device suitable for implementing the embodiments of this application for laser processing. The trajectory motion control device for laser processing in the embodiments of this application may include, but is not limited to, mobile terminals such as laptops and tablets (Tablet Personal Computers) and fixed terminals such as desktop computers. Figure 4 The laser processing trajectory motion control device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0072] like Figure 4 As shown, the laser processing trajectory motion control device may include a processing unit 1001 (e.g., a core processor, graphics processor, 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 laser processing trajectory motion control device. The processing unit 1001, the read-only memory 1002, and the RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the laser processing trajectory motion control device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a laser processing trajectory motion control device with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0073] 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 read-only memory 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.
[0074] The laser processing trajectory motion control device provided in this application, employing the laser processing trajectory motion control method in the above embodiments, can solve the technical problem that in complex trajectory processing, the command loading speed cannot keep up with the execution speed, causing the motion axis to be forced to decelerate and stop, thus affecting the laser processing effect of the actual product. Compared with the prior art, the beneficial effects of the laser processing trajectory motion control device provided in this application are the same as those of the laser processing trajectory motion control method provided in the above embodiments, and other technical features of this laser processing trajectory motion control device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0075] 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.
[0076] 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 scope of the technology 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.
[0077] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the laser processing trajectory motion control method in the above embodiments.
[0078] 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 systems, 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 fibers, 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 used by or in conjunction with an instruction execution system, system, or device. 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, radio frequency (RF), etc., or any suitable combination thereof.
[0079] The aforementioned computer-readable storage medium may be included in the trajectory motion control device for laser processing; or it may exist independently and not assembled into the trajectory motion control device for laser processing.
[0080] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the trajectory motion control device for laser processing, the trajectory motion control device for laser processing: acquires multiple trajectory instructions and motion parameters corresponding to each trajectory segment in the multiple trajectory instructions; calculates the end velocity of each trajectory segment in reverse based on the rate of curvature change and acceleration constraints between adjacent trajectory segments in the motion parameters; generates a velocity plan; detects the remaining capacity of the instruction buffer and adjusts the velocity plan according to the remaining capacity to obtain a target velocity plan; and performs interpolation motion on the multiple trajectory instructions based on the target velocity plan.
[0081] 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++, as well as 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).
[0082] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation that may be implemented in systems, 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 a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0083] 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.
[0084] 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 above-described laser processing trajectory motion control method. This solves the technical problem that in complex trajectory processing, the loading speed of the instructions cannot keep up with the execution speed, causing the motion axis to be forced to decelerate and stop, thus affecting the laser processing effect of the actual product. 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 laser processing trajectory motion control method provided in the above embodiments, and will not be repeated here.
[0085] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for trajectory motion control in laser processing, characterized in that, The method includes the following steps: Obtain multiple trajectory commands and the motion parameters corresponding to each trajectory segment in the multiple trajectory commands; Based on the rate of curvature change and acceleration constraints between adjacent trajectory segments in the motion parameters, the end velocity of each trajectory segment is calculated in reverse to generate a velocity plan. The remaining capacity of the detection instruction buffer is compared with preset high water level thresholds and low water level thresholds; When the remaining capacity is higher than the high water level threshold, request the host computer to batch load subsequent trajectory instructions; When the remaining capacity is lower than the low water level threshold, the speed in the speed plan is reduced according to the ratio of the remaining capacity to the low water level threshold to obtain the target speed plan; Based on the target velocity planning, interpolation motion is performed on the multi-segment trajectory commands.
2. The trajectory motion control method for laser processing as described in claim 1, characterized in that, The step of inversely calculating the end velocity of each trajectory segment based on the rate of curvature change and acceleration constraints between adjacent trajectory segments in the motion parameters, and generating velocity planning, includes: The trajectory type of each trajectory segment is parsed from the multiple trajectory instructions; The curvature of each trajectory segment is calculated according to the trajectory type. The curvature of the straight trajectory segment is zero, the curvature of the circular arc trajectory segment is the reciprocal of the radius of the circular arc, and the curvature of the spline trajectory segment is the curvature value obtained by numerical differentiation of the spline trajectory segment. Calculate the rate of change of curvature between adjacent trajectory segments, where the rate of change of curvature is the absolute value of the difference in curvature between two adjacent trajectory segments.
3. The trajectory motion control method for laser processing as described in claim 2, characterized in that, After the step of calculating the rate of change of curvature between adjacent trajectory segments, wherein the rate of change of curvature is the absolute value of the curvature difference between two adjacent trajectory segments, the method further includes: Set the velocity at the end of the last trajectory segment to zero, and traverse each trajectory segment backward from the segment preceding the last trajectory segment. For each trajectory segment, the acceleration term is obtained by dividing the product of twice the acceleration constraint and the path length of the trajectory segment in the motion parameters by the sum of the products of the curvature weighting coefficient and the rate of curvature change. The square root of the sum of the square of the initial velocity of the next trajectory segment and the acceleration term is used as the recursive velocity of that trajectory segment. The smaller value between the recursive velocity and the maximum permissible velocity of the trajectory segment in the motion parameters is taken as the end velocity of the trajectory segment; The acceleration change rate is calculated based on the change in velocity at the end of adjacent trajectory segments. When the acceleration change rate exceeds a preset acceleration change rate threshold, the end velocity is reduced so that the acceleration change rate does not exceed the acceleration change rate threshold.
4. The trajectory motion control method for laser processing as described in claim 1, characterized in that, After the step of reducing the speed in the speed planning according to the ratio of the remaining capacity to the low water level threshold when the remaining capacity is lower than the low water level threshold, to obtain the target speed planning, the method further includes: The capacity of the instruction buffer is dynamically adjusted based on the ratio of the current execution speed to the maximum execution speed. An emergency slot is reserved in the instruction buffer to store trajectory instructions with a priority higher than the preset priority; When performing the interpolation motion, the trajectory instructions in the emergency slot are read first.
5. The trajectory motion control method for laser processing as described in claim 1, characterized in that, The step of performing interpolation motion on the multi-segment trajectory command based on the target velocity planning includes: For the connection point of two adjacent trajectory segments, select the end point of the previous trajectory segment, the beginning point of the next trajectory segment, and the two tangential extension points obtained by extending along the tangential direction as the control points of the transition curve. A spline transition curve is fitted based on the control points, and the spline transition curve maintains second-order continuity at the connection points; Within the transition interval corresponding to the spline transition curve, interpolation is performed according to the velocity curve with a limited rate of change of acceleration.
6. The trajectory motion control method for laser processing as described in claim 5, characterized in that, After the step of interpolating according to a velocity curve with a limited rate of change of acceleration within the transition interval corresponding to the spline transition curve, the method further includes: The on and off positions of the laser are determined based on the arc length parameter of the spline transition curve. When interpolation is performed to the open position, the laser is triggered to turn on; When interpolation is performed to the closed position, the laser is triggered to shut down.
7. The trajectory motion control method for laser processing as described in claim 1, characterized in that, After the step of performing interpolation motion on the multi-segment trajectory commands based on the target velocity planning, the method further includes: The system detects the power supply voltage and triggers a power outage when the power supply voltage drops to a preset voltage threshold. In response to the power outage, the current motion state and the speed plan are saved to non-volatile memory, and the data saved to the non-volatile memory is verified. After power is restored, the current motion state and the speed plan are read from the non-volatile memory; The positions of each motion axis are restored based on the current motion state, and the trajectory segments are traced back a preset number of segments to reconstruct the speed plan; The interpolation motion is then performed from the restored positions of the motion axes.
8. A trajectory motion control device for laser processing, characterized in that, The device includes: 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 trajectory motion control method for laser processing as described in any one of claims 1 to 7.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the trajectory motion control method for laser processing as described in any one of claims 1 to 7.
