Path generation method, device, equipment and storage medium for multi-axis linkage machining

By establishing an accurate machine tool kinematic model and workpiece obstacle avoidance mathematical model, combining deep learning and adaptive pseudo-spectrum method to optimize multi-axis linkage machining paths, the problem of insufficient path generation efficiency and quality in traditional methods is solved, and multi-objective optimization and efficient calculation are achieved.

CN119126670BActive Publication Date: 2025-02-28SHENZHEN YINGDE ALLOY PRECISION CASTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411614474.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-28
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

The traditional multi-axis linkage machining path generation method is difficult to meet the needs of complex workpiece processing, and faces the difficulty of processing high-dimensional state space and continuous action space, as well as the problem of sensor data time synchronization.

Method used

By establishing accurate machine tool kinematic model and workpiece obstacle avoidance mathematical model, a machining path dual-delay depth deterministic strategy gradient model is constructed, multi-sensor data is obtained and time deviation calibration is performed, path optimization is combined with Hp adaptive pseudo-spectrum method, and task division and parallel optimization are carried out by constructing directed acyclic graphs.

Benefits of technology

Multi-objective optimization of machining time, cutting force fluctuations and tool wear is achieved, processing efficiency and processing quality are improved, and the calculation efficiency of complex workpiece processing is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of multi-axis linkage processing, and discloses a path generation method, device, equipment and storage medium for multi-axis linkage processing, the method comprising: modeling a multi-axis machine tool and a workpiece to obtain a machine tool kinematic model and a workpiece obstacle avoidance scenario mathematical model; constructing a state space and an action space to obtain a dual-delay deep deterministic policy gradient model for a processing path; performing time deviation calibration to obtain a time-synchronized sensor data set; performing path generation to obtain an initial processing path; optimizing the initial processing path to obtain an optimized processing path; constructing a directed acyclic graph, and performing task division and parallel optimization to obtain a multi-axis linkage processing path, thereby realizing multi-objective optimization of processing time, cutting force fluctuation and tool wear, and improving processing efficiency and processing quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of multi-axis linkage machining, and in particular to a path generation method, device, equipment and storage medium for multi-axis linkage machining. Background Art

[0002] The traditional multi-axis linkage machining path generation method mainly relies on manual experience and simple algorithms, which is difficult to meet the needs of complex workpiece machining.

[0003] In recent years, the application of deep learning and reinforcement learning technologies in the manufacturing field has provided new ideas for solving this problem. However, there are still many challenges in applying these advanced artificial intelligence technologies to multi-axis linkage machining path generation. Multi-axis linkage machining involves high-dimensional state space and continuous action space, resulting in slow training speed and low sampling efficiency. Secondly, the time synchronization problem of multi-sensor data affects the accuracy of path planning. How to improve computing efficiency while ensuring machining quality and achieve efficient machining of complex workpieces is still a problem that needs to be solved urgently. Summary of the invention

[0004] The present application provides a path generation method, device, equipment and storage medium for multi-axis linkage machining, thereby achieving multi-objective optimization of machining time, cutting force fluctuation and tool wear, and improving machining efficiency and machining quality.

[0005] The first aspect of the present application provides a path generation method for multi-axis linkage machining, the path generation method for multi-axis linkage machining comprising:

[0006] Model the multi-axis machine tool and the workpiece to obtain the machine tool kinematic model and the workpiece obstacle avoidance scenario mathematical model;

[0007] Based on the kinematic model of the machine tool and the mathematical model of the workpiece obstacle avoidance scenario, a state space and an action space are constructed to obtain a double-delay deep deterministic policy gradient model of the machining path;

[0008] Acquire multi-sensor data sets of multi-axis linkage machining process, and perform time deviation calibration to obtain time-synchronized sensor data sets;

[0009] Inputting the time-synchronized sensor data set into the processing path double-delay deep deterministic policy gradient model to generate a path to obtain an initial processing path;

[0010] Optimizing the initial processing path based on the Hp adaptive pseudo-spectral method to obtain an optimized processing path;

[0011] A directed acyclic graph is constructed based on the optimized machining path, and task division and parallel optimization are performed to obtain a multi-axis linkage machining path.

[0012] A second aspect of the present application provides a path generation device for multi-axis linkage machining, the path generation device for multi-axis linkage machining comprising:

[0013] Modeling module, used to model the multi-axis machine tool and the workpiece, and obtain the machine tool kinematic model and the workpiece obstacle avoidance scenario mathematical model;

[0014] A construction module, used to construct a state space and an action space based on the machine tool kinematic model and the workpiece obstacle avoidance scenario mathematical model to obtain a double-delay deep deterministic policy gradient model of a machining path;

[0015] The calibration module is used to obtain the multi-sensor data set of the multi-axis linkage machining process and perform time deviation calibration to obtain the time-synchronized sensor data set;

[0016] A generation module, used for inputting the time-synchronous sensing data set into the processing path double-delay deep deterministic policy gradient model to generate a path, so as to obtain an initial processing path;

[0017] An optimization module, used for optimizing the initial processing path based on the Hp adaptive pseudo-spectral method to obtain an optimized processing path;

[0018] The partitioning module is used to construct a directed acyclic graph based on the optimized machining path, and perform task partitioning and parallel optimization to obtain a multi-axis linkage machining path.

[0019] The third aspect of the present application provides an electronic device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the electronic device executes the above-mentioned path generation method for multi-axis linkage machining.

[0020] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned path generation method for multi-axis linkage machining.

[0021] Compared with the prior art, the present application has the following beneficial effects: by establishing an accurate kinematic model of the machine tool and a mathematical model of the workpiece obstacle avoidance scenario, the accuracy of path planning and the obstacle avoidance capability are improved, and the risk of collision during processing is reduced. The dual-delay deep deterministic policy gradient model is adopted to effectively solve the processing problems of high-dimensional state space and continuous action space, and improve the efficiency and quality of path generation. The introduction of multi-sensor data fusion and time deviation calibration technology solves the problem of sensor data asynchrony and enhances the real-time and robustness of path planning. The HP adaptive pseudo-spectral method is applied to optimize the initial path, and multi-objective optimization of processing time, cutting force fluctuation and tool wear is realized, thereby improving processing efficiency and processing quality. By constructing a directed acyclic graph and performing task division and parallel optimization, computing resources are fully utilized, and the computing efficiency of complex workpiece processing is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0023] The structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with this technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantive technical significance. Any structural modification, change in proportion or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical contents disclosed by the present invention.

[0024] Figure 1 It is a schematic flow chart of a path generation method for multi-axis linkage machining provided by an embodiment of the present invention;

[0025] Figure 2 is a schematic block diagram of the structure of a path generation device for multi-axis linkage machining provided by an embodiment of the present invention;

[0026] Figure 3 It is a schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0028] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0029] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0030] It should be further understood that the term "and / or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations. Figure 1 In the embodiment of the present application, an embodiment of the path generation method for multi-axis linkage machining includes:

[0031] Step 100: Modeling the multi-axis machine tool and the workpiece to obtain a kinematic model of the machine tool and a mathematical model of the obstacle avoidance scenario of the workpiece;

[0032] It is understandable that the execution subject of the present application may be a path generation device for multi-axis linkage machining, or a terminal or a server, which is not specifically limited here. The present application embodiment is described by taking a server as the execution subject as an example.

[0033] Specifically, the structural characteristics of the multi-axis machine tool are analyzed, and the motion parameters and constraints of each axis of the machine tool are extracted, including the rotation range of the rotary axis, the movement range of the linear axis, the coupling relationship between the axes, etc. The machine tool structural parameter set is obtained through analysis. Based on the machine tool structural parameter set, the motion relationship of each axis of the machine tool is mathematically modeled to form a complete machine tool kinematic equation group, which describes the relative motion between the axes of the machine tool and their conversion relationship in different coordinate systems. At the same time, the dynamic response characteristics of the machine tool are modeled. In the multi-axis machining process, the feed speed, spindle speed and tool posture of the machine tool will have an important impact on the machining quality. In order to accurately describe these dynamic characteristics, the dynamic response of the feed speed, spindle speed and tool posture is described in the form of transfer function, and the dynamic response model of the machine tool is established. These transfer functions can reflect the dynamic changes of various parameters of the machine tool under different operating conditions. The machine tool kinematic equation group and the machine tool dynamic response model are integrated to form a complete machine tool kinematic model. The three-dimensional scanning technology is used to collect the geometric features of the workpiece and obtain the point cloud data of the workpiece. Point cloud data contains a large amount of geometric information on the workpiece surface, including surface curvature, edges and feature points. Feature extraction and surface reconstruction are performed on point cloud data to obtain the geometric model of the workpiece. The workpiece geometric model is a mathematical description of the shape and structure of the workpiece, and is the core basis for path planning and obstacle avoidance analysis. Based on the workpiece geometric model, the workpiece surface is meshed, and the corresponding normal vector and curvature information are assigned to each mesh unit. Through the meshing process, the surface feature description of the workpiece is obtained, including the geometric information of each mesh unit, such as its position, normal vector direction and local curvature, to ensure that the tool can contact the workpiece surface with the correct posture during the processing, thereby ensuring the processing quality. At the same time, combined with the specific processing task requirements, the workpiece is divided into processing areas and the processing sequence is planned to obtain the processing area model. Based on the workpiece surface feature description and the processing area model, the space occupancy grid in the workpiece coordinate system is constructed to obtain the spatial representation of the workpiece. The space occupancy grid is used to describe the position and shape of the workpiece in three-dimensional space, and the entire processing space is divided into a number of voxel units, which effectively represent the geometric shape of the workpiece and its occupancy in space. Based on the spatial representation of the workpiece, a potential collision risk map is generated to obtain a collision risk model. In multi-axis machining, the movement of each axis of the machine tool will produce complex trajectories, and these trajectories will collide with the workpiece or other parts. It is necessary to predict the potential collision risks in advance to avoid unexpected situations during the machining process. The collision risk model helps to determine the potential risk areas in the machining path, so as to avoid these areas during path planning. The surface feature description of the workpiece, the machining area model and the collision risk model are integrated to obtain the mathematical model of the obstacle avoidance scenario of the workpiece.

[0034] Step 200: construct a state space and an action space based on a machine tool kinematic model and a workpiece obstacle avoidance scenario mathematical model to obtain a double-delay deep deterministic policy gradient model for a machining path;

[0035] Specifically, the tool position, posture, speed and acceleration parameters in the machine tool kinematic model are encoded to obtain the state vector of the machine tool; at the same time, the workpiece surface features, processing area and collision risk information in the workpiece obstacle avoidance scenario mathematical model are encoded to obtain the state vector of the workpiece. By splicing the machine tool state vector and the workpiece state vector, a complete state space representation is obtained. The motion instructions, feed speed and spindle speed of each axis of the machine tool are encoded to obtain the action space representation, which describes how the machine tool moves in each processing step, including specific axial instructions and rotation speed. Based on the state space representation and action space representation, a neural network structure is constructed, including three key parts: state encoder, action generator and value evaluator. The function of the state encoder is to map high-dimensional state information to low-dimensional feature space, effectively reducing the computational complexity, so that the model can still process efficiently when facing complex state space. The action generator generates continuous action instructions based on the encoded state to ensure that the machine tool can be smoothly and accurately controlled during the processing process. The value evaluator is used to evaluate the value of the state-action pair, that is, to judge whether the current processing strategy can achieve high efficiency and safety, thereby guiding the reinforcement learning model to adjust and optimize the strategy. In order to enhance the exploration ability of the model, random noise from Gaussian distribution is added to the action output by the action generator during the action generation process to obtain exploratory actions. The noise addition mechanism prompts the model to explore different processing paths, avoid falling into local optimal solutions, and find better solutions. At the same time, a dynamic adjustment mechanism is designed to adjust the noise variance according to the progress of training, which means that in the early learning stage of the model, larger noise is conducive to extensive exploration, while in the later stage when the model tends to converge, the noise variance is gradually reduced to ensure the stability and accuracy of path generation. In order to better train the neural network, an experience replay buffer is constructed to store state transition samples. Samples include state, action, reward and next state. By replaying historical experience, the time correlation of samples is effectively reduced, and the stability and learning efficiency of the model are improved. At the same time, a priority sampling mechanism is introduced to assign importance weights to each sample according to the time difference error, so as to ensure that samples with higher criticality can be sampled and learned more frequently, thereby improving the performance of the model in critical situations. In the process of path generation, a hierarchical reinforcement learning strategy is designed to decompose the overall processing task into multiple subtasks, and correspondingly construct multiple sub-strategy networks. Through hierarchical processing, each subtask is optimized for specific processing requirements, thereby improving the efficiency and quality of the overall processing process. Each sub-strategy network has its corresponding reward function, and the design of the reward function comprehensively considers processing accuracy, efficiency, and obstacle avoidance performance. For example, when the processing path can effectively avoid the risk of collision with the workpiece, a higher reward will be given; and when the processing accuracy and efficiency are improved, rewards will also be obtained.Through a refined evaluation mechanism, the generated paths are scored, thereby guiding the model to continuously adjust its strategy and find the optimal path that balances processing accuracy, efficiency, and obstacle avoidance performance. Based on the above steps, the constructed neural network is trained using a dual-delay deep deterministic policy gradient algorithm. In the dual-delay deep deterministic policy gradient algorithm, dual policy networks and dual value networks are used to update policy parameters and value evaluation parameters respectively. The dual network structure effectively reduces the deviation in training and improves the stability and reliability of policy updates. During the training process, the policy network is used to generate action instructions for the processing path, while the value network evaluates the effectiveness of these actions. By continuously adjusting the parameters of the policy network and the value network, a dual-delay deep deterministic policy gradient model that can generate efficient and safe processing paths is obtained.

[0036] Step 300, obtaining a multi-sensor data set of a multi-axis linkage machining process, and performing time deviation calibration to obtain a time-synchronized sensor data set;

[0037] It should be noted that data is collected from multiple sensors in the multi-axis linkage machining process, including visual sensors and force feedback sensors. After the image sequence collected by the visual sensor is processed, the surface feature points of the workpiece and the position information of the tool are extracted. This information is encoded to form a visual feature data stream. At the same time, the cutting force data collected by the force feedback sensor is filtered to remove noise, and then normalized to ensure the standardization and consistency of the data to obtain a force feedback data stream. Based on the visual feature data stream and the force feedback data stream, a data stream time model is constructed. The data stream time model includes the sampling period, data transmission delay and processing time of each sensor. For example, the sampling period of the visual sensor is usually long, while the sampling frequency of the force feedback sensor is high, so there is a lack of synchronization between the data streams. The difference in data transmission delay and data processing time will also cause time deviation between data from different sensors. Constructing a data stream time model can provide a basis for subsequent time synchronization correction. The sliding time window method is used to process the visual feature data stream and the force feedback data stream, and the continuous data stream is divided into several overlapping data segments. In each data segment within the sliding window, the local consistency of the data is guaranteed, so that synchronization correction is convenient. In each data segment, based on the existing workpiece geometry model, a consistency constraint relationship between the movement of visual feature points and the change of cutting force is established. During the machining process, the surface feature points of the workpiece will move with the change of the tool position, and the cutting force will also change accordingly. This change relationship is described by the geometric model and the machining dynamics model. This constraint relationship is used to associate the visual data and force data, so as to find the time deviation between them. Based on the consistency constraint relationship, the time deviation objective function is constructed to quantify the degree of time inconsistency between the visual data and the force data. By optimizing the objective function, the local optimal time deviation in each data segment is obtained. In each data segment, the time deviation value that best conforms to the consistency relationship between the movement information of the visual feature points and the change of the cutting force data is found. This process is completed by a nonlinear optimization method, and finally the local optimal time deviation of each data segment is obtained. The local time deviation information of all data segments is integrated. The recursive estimation method is used to effectively combine the historical deviation information with the current measurement results, and gradually approach the true global time deviation estimate. Recursive estimation is a dynamic update method that can update the global time deviation after each new data segment is processed, thereby reducing the deviation in continuous iterations and gradually improving the accuracy of time synchronization. According to the global time deviation estimate, the timestamps of the visual feature data stream and the force feedback data stream are corrected. By adjusting the timestamp of each data sample to eliminate the time deviation caused by different sensor sampling cycles and transmission delays, all sensor data are on the same time basis to form a time-synchronized sensor data set.

[0038] Step 400: Input the time-synchronous sensing data set into the processing path double-delay deep deterministic policy gradient model to generate a path to obtain an initial processing path;

[0039] Specifically, the visual feature data and force feedback data in the time-synchronous sensing data set are fused and integrated into a multidimensional state matrix containing tool position, posture, workpiece surface features and cutting force information. The multidimensional state matrix is ​​input into the state encoder of the dual-delay deep deterministic policy gradient model of the machining path to extract state features. The state encoder is composed of a multi-layer convolutional neural network. The multi-dimensional state matrix is ​​processed by the convolutional neural network to extract spatial features and compress them into a low-dimensional state feature vector. The compressed state feature vector is input into the action generator of the dual-delay deep deterministic policy gradient model of the machining path for action calculation. The action generator is composed of a multi-layer fully connected neural network. The motion instructions, feed speed and spindle speed of each axis are output through the network to form an initial action vector. The initial action vector describes the control parameters of the machine tool in the current state. In order to avoid the model falling into the local optimal solution, an exploration mechanism is introduced to enhance the model's exploration ability for different states. Gaussian noise perturbation is applied to the initial action vector, where the mean of the noise is 0 and the variance is dynamically adjusted according to the exploration rate in the training stage. In the early stage of training, a larger noise variance helps the model to explore the environment extensively, while in the later stage of training, as the exploration rate decreases, the noise variance also decreases to improve the accuracy and stability of path generation. In this way, an exploratory action vector is obtained, which helps to find the optimal path. The exploratory action vector is spliced ​​with the current state feature vector and input into the dual Q network of the double-delayed deep deterministic policy gradient model for evaluation to reduce the deviation in the Q value estimation. The dual Q network calculates two Q values ​​and selects the smaller value as the final Q value estimate. Through the dual network architecture, the policy update error caused by overestimation is effectively reduced to ensure that the policy can converge stably to the optimal direction. Based on the smaller Q value calculated by the dual Q network, combined with the preset reward function, the reward value of the current action is calculated. The reward function comprehensively considers the accuracy, efficiency and obstacle avoidance performance of the processing. For example, when the processing path can effectively avoid the risk of collision, ensure the processing accuracy of the workpiece and maintain an efficient feed speed, a higher reward value will be obtained. By calculating the rewards under different processing states, the model is guided to continuously optimize the processing path. The quadruple consisting of the current state feature vector, the exploratory action vector, the reward value, and the next state feature vector is stored in the priority experience replay buffer. The role of the experience replay buffer is to store the experience of the model in different states so that it can be replayed in subsequent training, breaking the time correlation of the data and improving the generalization ability of the model. When storing samples, each sample is assigned a priority based on the time difference error. The sample with a larger time difference error has a higher importance. A batch of samples with higher priority are sampled from the priority experience replay buffer, and these samples are used to update the policy network and the target Q network respectively.The dual-delay technology in the dual-delay deep deterministic policy gradient model means that the update frequency of the policy network is higher than that of the target Q network, thereby ensuring that the policy network can fully learn the current environment, while the target Q network is relatively stable to prevent the model from overfitting. Under the dual network architecture, the dual-delay deep deterministic policy gradient model continuously updates the policy network and value network parameters so that the action sequence output by the policy network gradually converges. When the action sequence output by the policy network reaches convergence or the training reaches the preset maximum number of iterations, the converged action sequence is decoded into the motion trajectory of the tool in the workpiece coordinate system to obtain the initial processing path.

[0040] Step 500, optimizing the initial processing path based on the Hp adaptive pseudo-spectral method to obtain an optimized processing path;

[0041] Specifically, the initial machining path is uniformly sampled and N key control points are selected. These control points contain important information such as the position, posture, speed and acceleration of the tool during the machining process. Through the sampling process, a discretized path point set S={s1,s2,...,sN} is obtained, where si represents the state of the i-th control point. Based on the discretized path point set, a comprehensive optimization objective function J(S) is constructed in the form of J(S)=w1T+w2F+w3W, where T represents the machining time, F is the fluctuation measure of the cutting force, W is the tool wear index, and w1, w2, and w3 are the corresponding weight coefficients. The setting of the coefficient determines how the optimization process balances the machining time, cutting force stability and tool wear. The optimization objective function comprehensively considers multiple performance indicators in multi-axis machining to ensure that the final machining path reaches the optimal state in terms of efficiency, quality and equipment maintenance. At the same time, the kinematic constraints of the machine tool, the geometric feature constraints of the workpiece, and the machining accuracy requirements are mathematically described, which are represented by g(S)≤0, h(S)=0, and p(S)≤ε, respectively, to form a constraint set C={g(S),h(S),p(S)}, where ε is the preset machining accuracy threshold. The mathematical expression of the constraints ensures that the machining path generated during the optimization process can meet the requirements of the machine tool's motion range, the workpiece's geometric characteristics, and machining accuracy, so as to avoid collisions or errors caused by unreasonable paths. Based on the optimization objective function J(S) and the constraint set C, the problem is described as a continuous-time optimal control problem P, that is, minimizing the objective function J(S) while satisfying the constraints. In order to solve the optimal control problem, the Hp adaptive pseudo-spectral method is applied to divide the time interval [t0, tf] into K subintervals [tk, tk+1], where k=0,1,...,K-1. In each subinterval, nk+1 Legendre-Gauss-Lobatto (LGL) collocation points are used. These collocation points help discretize the state and control variables, which is convenient for subsequent numerical solutions. In each subinterval [tk, tk+1], the state variable x(t) and the control variable u(t) are expanded into the form of nk-order Legendre polynomial series, that is, x(t)≈Σ(i=0tonk)xiLi(τ) and u(t)≈Σ(i=0tonk)uiLi(τ), where Li(τ) is the Legendre basis function, τ is the normalized time coordinate, and xi and ui represent the coefficients of the state variable and the control variable on the i-th basis function, respectively. Through polynomial expansion, the changes of state and control variables are expressed by a set of coefficients, so that the complex continuous-time optimal control problem is transformed into a simpler discrete optimization problem. Substitute the expanded state and control variables into the system's dynamic equations and constraints, and discretize the original continuous optimization problem through the LGL quadrature formula to obtain a nonlinear programming problem (NLP).The nonlinear programming problem is solved by a standard optimization algorithm to obtain the optimal value of each state and control variable at each discrete point. In order to improve the accuracy of the solution, a grid refinement indicator function R(k)=||ek||∞ / (tk+1-tk) is constructed, where ek represents the error estimation vector in subinterval k, ||·||∞ represents the infinite norm, and tk+1-tk represents the length of subinterval k. By calculating the errors of each subinterval, if it is found that the error of a subinterval exceeds the preset grid refinement threshold δ, the subinterval is divided into two equal parts, and the number of LGL points in the interval is increased to improve the solution accuracy of the area. If the error is within the threshold, the current grid is kept unchanged. By adaptively refining the grid, it is ensured that the solution accuracy of the area with large errors is improved in the case of limited computing resources, thereby improving the overall optimization effect. After the grid is refined, the sequential quadratic programming (SQP) method is used to solve the discretized nonlinear programming problem and update the values ​​of the state variables and control variables. The SQP method is an effective algorithm suitable for solving nonlinear optimization problems with constraints. It gradually approaches the optimal solution by solving the quadratic programming approximation problem one by one. In order to ensure the convergence of the solution and the quality of the path, the steps of grid refinement and SQP solution are repeated until the convergence condition is met, that is, the change in the objective function value of two adjacent iterations is less than the preset convergence threshold η, or the maximum number of iterations Imax is reached. After obtaining the final optimized discrete control points, the discrete control points are reconstructed into a continuous processing path by the cubic spline interpolation method to obtain the optimized processing path. The cubic spline interpolation ensures that the generated path has good smoothness and continuity, so that the machine tool can smoothly follow the path for processing during the actual processing. Through the optimization method based on the Hp adaptive pseudo-spectral method, the final processing path achieves a comprehensive optimization effect in terms of processing time, cutting force stability, tool wear and other aspects, thereby effectively improving the efficiency and quality of multi-axis linkage processing.

[0042] Step 600: construct a directed acyclic graph based on the optimized machining path, and perform task division and parallel optimization to obtain a multi-axis linkage machining path.

[0043] Specifically, the optimized processing path is analyzed to identify key processing feature points and processing operation sequences, which represent important steps and operations in the processing process. Based on this information, a processing task node set is extracted, where each node represents an independent processing operation or task unit. Based on the processing task node set, the dependency relationship between each node is analyzed. There is a sequential and interdependent relationship between processing tasks. Some tasks can only be performed after other tasks are completed. These dependencies are described by constructing directed edges. According to the task nodes and the dependencies between them, a directed edge set is formed to construct an initial directed acyclic graph. A directed acyclic graph is a graph structure used to represent the sequential relationship of processing tasks, in which nodes represent tasks and edges represent dependencies between tasks. This structure ensures that there will be no loops in the execution order of tasks, thereby ensuring the logic and operability of the processing process. In order to optimize the execution order of tasks, a topological sorting algorithm is applied to the initial directed acyclic graph to obtain the topological sequence of processing tasks. Topological sorting is an algorithm used to determine the execution order of nodes in a directed acyclic graph, which can output a task execution order so that each task is executed after its dependent tasks. Based on the processing task sequence obtained by topological sorting, the processing tasks are hierarchically divided and the hierarchical structure of the tasks is constructed. The hierarchical structure divides the processing tasks into several layers, where the tasks in each layer can be executed in parallel after the tasks in the previous layer are completed. Based on the task hierarchy, the computational complexity analysis is performed on the task nodes in each task layer to determine the computing resources required for each task. The analysis results of the computational complexity are expressed in the form of a task complexity vector, which contains information such as the amount of resources and processing time required for each task during calculation. Based on the task complexity vector and the number of available computing resources, the load balancing algorithm is applied to allocate resources to the tasks in each layer to obtain a task allocation matrix. The goal of the load balancing algorithm is to allocate computing resources as evenly as possible to avoid overloading of some tasks or idle computing resources, and to improve the efficiency of the entire processing path generation process. After completing the resource allocation, the tasks in each layer are calculated in parallel. In each task node, based on the input data and processing parameters, the corresponding processing algorithm is called to generate a local processing path. The local machining path is the local optimal path relative to a specific task node. When generating the local machining path, factors such as the current machining features, the status of the tool, and the geometric features of the workpiece are considered to ensure the safety, accuracy, and efficiency of the path. In the parallel calculation process, the path generation of multiple task nodes is carried out simultaneously, thereby shortening the overall path planning time. The local paths are combined and optimized according to the topological sequence. During the combination process, attention is paid to the continuity and smoothness of the path intersection to ensure that the overall machining path can smoothly transition between nodes.Through the path smoothing algorithm and interpolation algorithm, cubic spline interpolation or other smoothing techniques are used to prevent discontinuity or sharp turns at the connection between local paths, avoiding impact or errors caused by path discontinuity during processing. By combining and optimizing the optimized local processing paths as a whole, a complete multi-axis linkage processing path is obtained.

[0044] In the embodiment of the present application, by establishing an accurate kinematic model of the machine tool and a mathematical model of the workpiece obstacle avoidance scenario, the accuracy and obstacle avoidance capability of path planning are improved, and the risk of collision during processing is reduced. The dual-delay deep deterministic policy gradient model is adopted to effectively solve the processing problems of high-dimensional state space and continuous action space, and improve the efficiency and quality of path generation. The introduction of multi-sensor data fusion and time deviation calibration technology solves the problem of sensor data asynchrony and enhances the real-time and robustness of path planning. The HP adaptive pseudo-spectral method is applied to optimize the initial path, and multi-objective optimization of processing time, cutting force fluctuation and tool wear is achieved, thereby improving processing efficiency and processing quality. By constructing a directed acyclic graph and performing task division and parallel optimization, computing resources are fully utilized, and the computing efficiency of complex workpiece processing is significantly improved.

[0045] In a specific embodiment, the process of executing step 100 may specifically include the following steps:

[0046] Analyze the structural characteristics of multi-axis machine tools, extract the motion parameters and constraints of each axis of the machine tool, obtain the machine tool structure parameter set, and based on the machine tool structure parameter set, mathematically model the motion relationship of each axis of the machine tool to obtain the machine tool kinematic equations;

[0047] The dynamic response of the machine tool's feed speed, spindle speed and tool posture is described in the form of transfer function to obtain the machine tool dynamic response model, and the machine tool kinematic equations and the machine tool dynamic response model are integrated to obtain the machine tool kinematic model;

[0048] The 3D scanning technology is used to collect the geometric features of the workpiece, obtain the point cloud data of the workpiece, and perform feature extraction and surface reconstruction on the acquired point cloud data to obtain the workpiece geometric model;

[0049] Based on the workpiece geometry model, the workpiece surface grid is divided, and normal vectors and curvature information are assigned to each grid unit to obtain the workpiece surface feature description. Combined with the processing task requirements, the workpiece is divided into processing areas and the processing sequence is planned to obtain the processing area model;

[0050] Based on the workpiece surface feature description and the processing area model, the space occupancy grid in the workpiece coordinate system is constructed to obtain the workpiece space representation;

[0051] A potential collision risk map is generated based on the spatial representation of the workpiece to obtain a collision risk model. The workpiece surface feature description, processing area model and collision risk model are integrated to obtain a mathematical model of the workpiece obstacle avoidance scenario.

[0052] Specifically, the structural characteristics of the multi-axis machine tool are analyzed, the motion parameters and constraints of each axis are extracted, and the structural parameter set of the machine tool is obtained. Multi-axis machine tools are usually composed of multiple motion axes, which are divided into linear axes and rotational axes. The motion of each axis has certain constraints, such as moving range, rotation angle, speed limit, etc. The extraction of these parameters forms a complete machine tool structural parameter set to describe the motion characteristics of each axis. Based on these parameters, the motion relationship of each axis is mathematically modeled to obtain the machine tool kinematic equations. Assume that the machine tool contains three linear axes and two rotation axes , its kinematic equation is expressed as:

[0053] ;

[0054] in, Represents the position and posture of the machine tool end effector, is a function that describes the linkage relationship between the axes. is the coordinate position of the linear axis, is the angle of the rotating axis. By establishing a set of kinematic equations, the relative motion between the axes of the machine tool under different states is determined, providing an accurate mathematical description for path planning. The dynamic response characteristics of the machine tool are modeled to describe the dynamic response of the feed rate, spindle speed and tool posture during the machining process. These dynamic characteristics have an important influence on the machining accuracy and surface quality, and the dynamic behavior of the machine tool is described by the transfer function. Assume that the feed rate is , the spindle speed is , the tool posture is , its dynamic response model is expressed by the following transfer function:

[0055] ;

[0056] in, is the transfer function, is the Laplace transform of the output (such as tool position or feed rate), is the Laplace transform of the input (such as spindle speed or feed command), is the system gain, is the time constant, is the Laplace operator. By describing the different input-output relationships, a complete dynamic response model of the machine tool is obtained, and it is integrated with the kinematic equations to obtain the kinematic model of the machine tool. The integrated kinematic model of the machine tool simultaneously describes the geometric motion characteristics and dynamic response of the machine tool, ensuring that the movement of the machine tool meets the set accuracy and dynamic performance requirements during the processing. Three-dimensional scanning technology is used to collect the geometric features of the workpiece and obtain the point cloud data of the workpiece. Three-dimensional scanning technology obtains the geometric information of the workpiece surface with high precision. The point cloud data consists of discrete points on the surface of the workpiece and contains the shape and size information of the workpiece. Feature extraction and surface reconstruction are performed on the acquired point cloud data to obtain the geometric model of the workpiece. Assume that the point cloud data is ,in is a point on the workpiece surface, and its coordinates are . Through the surface reconstruction algorithm, the discrete points are connected into a continuous surface to form a complete workpiece geometric model. Based on the workpiece geometric model, the workpiece surface is meshed, and normal vectors and curvature information are assigned to each mesh unit to obtain the surface feature description of the workpiece. The meshing process divides the workpiece surface into multiple small triangular or quadrilateral units. The normal vector of each unit describes its orientation in space, while the curvature information describes the degree of curvature of the surface at that location. For example, for the mesh unit , whose normal vector is expressed as , the curvature is expressed as . Based on these surface features and combined with the specific requirements of the machining task, the workpiece is divided into machining areas and the machining sequence is planned to obtain a machining area model. The machining area model determines the machining sequence and specific requirements of each area, such as machining accuracy and tool feeding method. Based on the surface feature description of the workpiece and the machining area model, a space occupancy grid is constructed in the coordinate system of the workpiece to obtain a spatial representation of the workpiece. The space occupancy grid divides the three-dimensional space where the workpiece is located into a number of voxel units (Voxels), which describe the position and shape of the workpiece in space. Through spatial representation, collisions between the tool and the workpiece can be effectively avoided during the path planning process. In order to ensure the safety of the machining path, a potential collision risk map is generated based on the spatial representation of the workpiece to obtain a collision risk model. The collision risk model is established by calculating the area where the tool may collide with the workpiece during machining. Assume the position of the tool is , the workpiece space is expressed as , then the collision risk function is expressed as:

[0057] ;

[0058] in, is the collision risk function, when the tool position When entering the workpiece space, the collision risk is 1, otherwise it is 0. Through collision risk analysis, the mutual interference between the tool and the workpiece during the processing process can be effectively avoided. The workpiece surface feature description, processing area model and collision risk model are integrated to obtain the workpiece obstacle avoidance scenario mathematical model. This model can fully describe the geometric features of the workpiece, the division of the processing area and the potential collision risk.

[0059] In a specific embodiment, the process of executing step 200 may specifically include the following steps:

[0060] The tool position, posture, velocity and acceleration parameters in the machine tool kinematic model are encoded to obtain the machine tool state vector, and the workpiece surface features, processing area and collision risk information in the workpiece obstacle avoidance scenario mathematical model are encoded to obtain the workpiece state vector. The machine tool state vector and the workpiece state vector are spliced ​​to obtain a complete state space representation;

[0061] Encode the motion instructions, feed speed and spindle speed of each axis of the machine tool to obtain the action space representation;

[0062] Based on the state space representation and action space representation, a neural network structure is constructed, including a state encoder, an action generator and a value evaluator, wherein the state encoder maps high-dimensional state information to a low-dimensional feature space, the action generator generates continuous action instructions according to the encoded state, and the value evaluator evaluates the value of the state-action pair;

[0063] Add random noise from Gaussian distribution to the action output by the action generator to obtain exploratory actions, and design a dynamic adjustment mechanism to adjust the noise variance according to the training process;

[0064] Construct an experience replay buffer to store state transition samples, and introduce a priority sampling mechanism to assign importance weights to each sample based on the time difference error;

[0065] Design a hierarchical reinforcement learning strategy to decompose the overall processing task into multiple subtasks, build multiple sub-strategy networks accordingly, and design a reward function to comprehensively consider processing accuracy, efficiency, and obstacle avoidance performance, and evaluate and score the generated paths;

[0066] Based on the double-delay deep deterministic policy gradient algorithm, the constructed neural network is trained, including updating the policy network and value network parameters, and a double-delay deep deterministic policy gradient model of the processing path is obtained.

[0067] Specifically, the tool position, posture, velocity and acceleration parameters in the machine tool kinematic model are encoded to obtain the state vector of the machine tool. Assume that the tool position is , the posture is , the speed is , the acceleration is , then the machine tool state vector is expressed as:

[0068] ;

[0069] State Vector It describes the spatial position, posture, speed and acceleration of the tool at the current moment. The workpiece surface features, processing area and collision risk information in the mathematical model of the workpiece obstacle avoidance scenario are also encoded. Assume that the workpiece surface features are ,in is the component of the surface normal vector, and the processing area is marked as , the collision risk information is , then the workpiece state vector is expressed as:

[0070] ;

[0071] The machine tool state vector and the workpiece state vector are concatenated to obtain the complete state space representation s, namely:

[0072] ;

[0073] The state space representation includes the comprehensive state of the current machine tool and workpiece. The motion instructions, feed speed and spindle speed of each axis of the machine tool are encoded to obtain the representation of the action space. Assume that the motion instruction of the machine tool is , the feed speed is , the spindle speed is , then the action vector is expressed as:

[0074] ;

[0075] The action vector describes the operation instructions of the machine tool, including the movement of each axis and the key parameters of processing. , construct a neural network structure, which includes a state encoder, an action generator, and a value evaluator. The state encoder maps high-dimensional state information to a low-dimensional feature space. Since the state space contains many parameters, a multi-layer convolutional neural network (CNN) is used to extract features and compress them into a low-dimensional feature vector. , for subsequent processing. Assume that the state vector is transformed nonlinearly by the state encoder as ,in Represents the nonlinear mapping function of the state encoder. The compressed feature vector It is convenient to generate specific processing actions. The action generator generates continuous action instructions based on the feature vector after state encoding. Assume that the action generator is composed of a multi-layer fully connected neural network, which outputs action instructions according to the input feature vector. , expressed as:

[0076] ;

[0077] in It is a nonlinear mapping function of the action generator, which is used to generate specific motion instructions and processing parameters. In order to prevent the model from falling into the local optimal solution and enhance the exploration ability, a Gaussian distributed random noise is added to the action to obtain an exploratory action. The mean of the noise is 0, and the variance is dynamically adjusted according to the exploration rate in the training stage. The noise is larger in the early stage to enhance exploration, and gradually decreases in the later stage to improve accuracy. The exploratory action is expressed as:

[0078] ;

[0079] in The mean is 0 and the variance is Gaussian noise, Adjust according to the training process. In the reinforcement learning process, in order to store the historical state, action, reward and the next state transfer sample, an experience replay buffer is constructed. This buffer can effectively break the time correlation of samples and improve the stability of the training process. In order to improve the efficiency of sampling, a priority sampling mechanism is introduced. According to the time difference error, an importance weight is assigned to each sample. The sample with a larger time difference error has a higher priority and is more likely to be sampled. In order to improve the performance of the model, a hierarchical reinforcement learning strategy is designed to decompose the overall processing task into multiple subtasks, each of which is controlled by an independent sub-strategy network. Hierarchical reinforcement learning allows each subtask to focus on a specific processing operation, improving the pertinence and efficiency of the strategy. For example, one subtask is responsible for the planning of the rough processing path, and the other subtask is responsible for the generation of the fine processing path. A reward function is designed for each sub-strategy, taking into account the processing accuracy, efficiency and obstacle avoidance performance, to ensure that the generated path has high processing efficiency and avoids collision between the tool and the workpiece while meeting the accuracy requirements. The reward function is expressed as:

[0080] ;

[0081] in, is the reward value, For machining accuracy score, For processing efficiency score, For collision risk, is the corresponding weight coefficient. Through the design of reward function, the model is guided to find the optimal processing path during the training process. The constructed neural network is trained based on the double-delayed deep deterministic policy gradient (TD3) algorithm. The TD3 algorithm adopts a dual policy network and a dual value network structure. By updating the policy network and the self-labeled Q network respectively, the estimation deviation in the training process is reduced to ensure the stability and convergence of the policy. During the training process, the actions generated by the policy network are evaluated, and the value network calculates the value of the action-state pair to guide the update of the policy. The value network outputs two Q values ​​and selects the smaller value to optimize the policy, thereby reducing the erroneous update caused by overestimation. Through continuous iteration, the parameters of the policy network and the value network are updated, and finally a convergent processing path generation model is obtained.

[0082] In a specific embodiment, the process of executing step 300 may specifically include the following steps:

[0083] The image sequence collected by the visual sensor in the multi-axis linkage machining process is processed to extract the surface feature points of the workpiece and the tool position information to obtain the visual feature data stream, and the cutting force data collected by the force feedback sensor is filtered and normalized to obtain the force feedback data stream;

[0084] Based on the visual feature data stream and force feedback data stream, a data stream time model is constructed, including the sampling period, data transmission delay and processing time of each sensor;

[0085] A sliding time window is applied to the visual feature data stream and the force feedback data stream to segment the continuous data stream into several overlapping data segments. In each data segment, a consistent constraint relationship between the movement of the visual feature points and the change of the cutting force is established based on the workpiece geometry model.

[0086] Using the established consistency constraint relationship, a time deviation objective function is constructed, which represents the degree of time inconsistency between visual data and force data. The constructed time deviation objective function is optimized and solved to obtain the local optimal time deviation in each data segment.

[0087] Based on the local optimal time deviation of all data segments, a recursive estimation method is adopted to comprehensively consider the historical deviation information and the current measurement results to obtain the global time deviation estimate. According to the global time deviation estimate, the visual feature data stream and the force feedback data stream are timestamp corrected to obtain the time-synchronized sensing dataset.

[0088] Specifically, the image sequence collected by the visual sensor during the machining process is processed to extract the feature points on the workpiece surface and the position information of the tool to obtain a visual feature data stream. The visual sensor obtains real-time images of the workpiece and the tool through a camera. These images are processed by a feature extraction algorithm to identify the key feature points on the workpiece surface and the position and posture of the tool. The feature point set forms a visual feature data stream, which is used to describe the relative position relationship between the workpiece and the tool. At the same time, the force feedback sensor collects the cutting force data of the tool during the cutting process in real time. These data contain a lot of noise, and the cutting force data is filtered. The force data is denoised by a low-pass filter to remove high-frequency noise. The filtered cutting force data is normalized to obtain a force feedback data stream. Based on the extracted visual feature data stream and the processed force feedback data stream, a data stream time model is constructed. The time model includes the sampling period of each sensor, the data transmission delay, and the data processing time. Assume that the sampling period of the visual sensor is , the sampling period of the force feedback sensor is , the transmission delay of visual data is , the transmission delay of force feedback data is , then by analyzing the operating frequency and delay of each sensor, a unified time model is constructed to time align each data stream. On this basis, in order to realize the analysis and synchronization of data at different time scales, a sliding time window is applied to the visual feature data stream and the force feedback data stream to divide the continuous data stream into several overlapping data segments. Assume that the length of the sliding window is , the step length is , then each sliding window covers arrive The visual and force feedback data are divided into multiple overlapping data segments based on the data range. In each data segment, the consistency constraint relationship between the movement of the visual feature point and the cutting force change is established based on the geometric model of the workpiece. Assume that the position change of the feature point is The change of cutting force is , then the consistency constraint is expressed as:

[0089] ;

[0090] in, For the The displacement of feature points, is the corresponding cutting force change, is the proportionality coefficient, is the noise or error term. By establishing a constraint relationship, the coupling relationship between the visual feature points and the cutting force in the machining process is described. Based on the consistency constraint relationship, the time deviation objective function is constructed. The time deviation objective function is used to represent the degree of time inconsistency between the visual data and the force data. Assume that the time deviation between the visual data and the force data in a certain time period is , then the time deviation objective function is expressed as:

[0091] ;

[0092] in, is the time deviation objective function, is the number of feature points in the data segment, For time deviation The displacement of the feature points after the objective function The optimization solution is performed to obtain the local optimal time deviation in each data segment. In order to improve the accuracy of data synchronization, based on the local optimal time deviation of all data segments, a recursive estimation method is used to comprehensively consider the historical deviation information and the current measurement results to obtain the estimated value of the global time deviation. Suppose the estimated value of the time deviation at the previous moment is , the current measured time deviation is , then the global time deviation estimate is obtained by weighted averaging:

[0093] ;

[0094] in, is the weight coefficient of historical information, usually between [0,1], to weigh the impact of historical deviation and current measurement. Through recursive estimation, the global optimal time deviation is gradually approached to ensure that multi-sensor data are aligned as much as possible in time. According to the calculated global time deviation estimate, the timestamps of the visual feature data stream and the force feedback data stream are corrected so that the time bases of the two data streams are consistent, and a time-synchronized sensor data set is obtained.

[0095] In a specific embodiment, the process of executing step 400 may specifically include the following steps:

[0096] Data fusion is performed on the visual feature data and force feedback data in the time-synchronous sensing data set to construct a multidimensional state matrix containing tool position, posture, workpiece surface features and cutting force information;

[0097] The multi-dimensional state matrix is ​​input into the state encoder of the double-delay deep deterministic policy gradient model of the processing path, and the spatial features are extracted through a multi-layer convolutional neural network to obtain a compressed state feature vector;

[0098] Based on the state feature vector, the action generator of the dual-delay deep deterministic policy gradient model of the machining path is calculated, and the motion instructions, feed speed and spindle speed of each axis are output through a multi-layer fully connected network to form an initial action vector;

[0099] Gaussian noise perturbation is applied to the initial action vector, the noise mean is 0, and the variance is dynamically adjusted according to the exploration rate in the training phase to obtain an exploratory action vector;

[0100] The exploratory action vector is concatenated with the current state feature vector, and input into the dual Q network of the double-delay deep deterministic policy gradient model of the processing path to calculate two Q values;

[0101] Based on the smaller value of the two Q values, combined with the preset reward function, the reward value of the current action is calculated. The reward function comprehensively considers processing accuracy, efficiency and obstacle avoidance performance;

[0102] The four-tuple consisting of the current state feature vector, the exploratory action vector, the reward value and the next state feature vector is stored in the priority experience replay buffer, and the sample priority is updated according to the time difference error;

[0103] A batch of high-priority samples are sampled from the priority experience replay buffer, and the double-delay technology is used to update the strategy network and the target Q network respectively. The update frequency of the target Q network is lower than that of the strategy network. Until the action sequence output by the strategy network converges or reaches the preset maximum number of iterations, the converged action sequence is decoded into the motion trajectory of the tool in the workpiece coordinate system to obtain the initial processing path.

[0104] Specifically, the visual feature data and force feedback data in the time-synchronous sensing data set are fused to obtain a multi-dimensional state matrix. Assume that the position and posture of the tool are and , the surface features of the workpiece include the normal vector And the three directional components of cutting force , then the fused multidimensional state matrix is ​​expressed as:

[0105] ;

[0106] Multidimensional state matrix Contains all the key information of the current machining state, including the relative position of the tool and the workpiece, the tool posture, the surface features of the workpiece, and the cutting force generated during the machining process. The multi-dimensional state matrix is ​​input into the state encoder in the dual-delay deep deterministic policy gradient (TD3) model of the machining path, and the spatial features in the high-dimensional state are extracted through a multi-layer convolutional neural network (CNN). The state encoder maps the input high-dimensional state matrix to a low-dimensional feature vector, thereby reducing the computational complexity and retaining the most important feature information. Assume that the state encoder passes through multiple layers of convolution and converts the input state matrix Mapped to a compressed state feature vector , expressed by the following formula:

[0107] ;

[0108] in, is the compressed state feature vector, Represents the nonlinear mapping function of the state encoder. Through the operation of the convolution layer, the network automatically learns the important features in the multidimensional state matrix, such as the influence of the tool position and posture on the machining process, the influence of the workpiece surface curvature on the cutting force, etc. Based on the state feature vector , and input it into the action generator of the machining path TD3 model for calculation. The action generator consists of a multi-layer fully connected network, which generates corresponding control actions according to the current state characteristics, including the motion instructions of each axis, feed speed, and spindle speed. Assume that the output of the action generator is the initial action vector , then it is expressed as:

[0109] ;

[0110] in, , They are the motion instructions for each axis, is the feed speed, is the spindle speed, Represents the nonlinear mapping function of the action generator. In order to enhance the model's ability to explore different states and prevent it from falling into a local optimal solution, the initial action vector Apply random noise from a Gaussian distribution to obtain exploratory motion vectors The mean of the noise is 0, and the variance is dynamically adjusted according to the exploration rate during the training phase, expressed as:

[0111] ;

[0112] in, It means the mean is 0 and the variance is Gaussian noise, Represents the standard deviation of the noise, which is larger in the early stage of training to enhance the exploration ability and gradually decreases as the training progresses to improve the accuracy. With the current state feature vector The input is then concatenated and fed into the dual Q network of the TD3 model for evaluation. The dual Q network structure of the TD3 model effectively reduces the deviation in Q value estimation. Assuming that the two Q networks output Q values ​​respectively and , select the smaller Q value as the evaluation value to prevent strategy errors caused by overestimation. That is:

[0113] ;

[0114] Based on the smaller Q value obtained , combined with the preset reward function, calculate the reward value of the current action. The reward function comprehensively considers the processing accuracy, efficiency and obstacle avoidance performance. Suppose the reward function is , expressed as:

[0115] ;

[0116] in, For machining accuracy score, For processing efficiency score, is the risk assessment value of obstacle avoidance performance, is the corresponding weight coefficient. Reward value It is used to guide the model to optimize its strategy during the training process to find the best balance between processing accuracy, efficiency and obstacle avoidance. , exploratory action vector , Reward Value and the next state feature vector The four tuples are formed and stored in the priority experience replay buffer. In order to make the training more efficient, the samples in the buffer are updated according to the time difference error (TD error). The samples with larger TD error have higher importance weight so that they can be sampled more frequently for model update. During the training process, a batch of samples with higher priority are sampled from the priority experience replay buffer, and these samples are used to update the policy network and the target Q network respectively. The dual delay technology of TD3 means that the update frequency of the target Q network is lower than that of the policy network, so that the policy network can adapt to environmental changes more frequently, while the target Q network maintains a certain stability to avoid overfitting caused by frequent updates. Through continuous sampling, training and updating, the action sequence output by the policy network gradually converges or reaches the preset maximum number of iterations. When the action sequence of the policy network converges, the converged action sequence is decoded into the motion trajectory of the tool in the workpiece coordinate system to obtain the initial processing path.

[0117] In a specific embodiment, the process of executing step 500 may specifically include the following steps:

[0118] Step 1: Uniformly sample the initial processing path and select N key control points. Each control point contains position, posture, velocity and acceleration information to obtain a discretized path point set S = {s1, s2, ..., sN}, where si represents the state of the i-th control point;

[0119] Step 2: Based on the discretized path point set S, construct the comprehensive optimization objective function J(S)=w1T+w2F+w3*W, where T is the processing time, F is the cutting force fluctuation measure, W is the tool wear index, and w1, w2, and w3 are the corresponding weight coefficients;

[0120] Step 3: Convert the machine tool kinematic constraint g(S)≤0, the workpiece geometric feature constraint h(S)=0, and the machining accuracy requirement p(S)≤ε into mathematical expressions to obtain the constraint condition set C={g(S),h(S),p(S)}, where ε is the preset machining accuracy threshold;

[0121] Step 4: Based on the optimization objective function J(S) and the constraint set C, establish the continuous-time optimal control problem P:minJ(S),stC;

[0122] Step 5: Apply the Hp adaptive pseudo-spectral method to the continuous-time optimal control problem P, divide the time interval [t0, tf] into K subintervals [tk, tk+1], k=0,1,...,K-1, and use nk+1 LGL collocation points in each subinterval, where t0 is the initial time and tf is the end time;

[0123] Step 6: In each subinterval [tk, tk+1], expand the state variable x(t) and the control variable u(t) into a Legendre polynomial series of order nk:

[0124] x(t)≈Σ(i=0tonk)xi*Li(τ);

[0125] u(t)≈Σ(i=0tonk)ui*Li(τ);

[0126] Where Li(τ) is the Legendre basis function, τ is the normalized time coordinate, xi and ui are the coefficients of the state variable and control variable on the i-th basis function respectively;

[0127] Step 7: Substitute the expanded state and control variables into the system dynamics equations and constraints, discretize the continuous problem through the LGL quadrature formula, and obtain the nonlinear programming problem NLP;

[0128] Step 8: Construct the grid refinement indicator function R(k)=||ek||∞ / (tk+1-tk), where ek is the error estimation vector in subinterval k, ||·||∞ represents the infinite norm, and tk+1-tk is the length of subinterval k;

[0129] Step 9: If max(R(k))>δ, where δ is the preset grid refinement threshold, the subinterval with the largest R(k) is divided into two equal parts, and the number of LGL points in the interval is increased; if max(R(k))≤δ, the current grid is kept unchanged;

[0130] Step 10: Use the sequential quadratic programming method to solve the discretized nonlinear programming problem NLP and update the state variables and control variables;

[0131] Step 11: Repeat steps 8-10 until the convergence condition ||J(i+1)-J(i)||<η is met or the maximum number of iterations Imax is reached, where J(i) represents the objective function value of the i-th iteration, η is the convergence threshold, and Imax is the preset maximum number of iterations;

[0132] Step 12: The discrete control points finally optimized are reconstructed into a continuous processing path through cubic spline interpolation to obtain the optimized processing path.

[0133] Specifically, the initial processing path is uniformly sampled to select Each of these control points contains information about the tool's position, posture, speed, and acceleration, forming a discretized path point set. ,in Indicates The state of the control points contains the current parameters of the tool. Based on the discretized path point set Constructing a comprehensive optimization objective function , which is of the form:

[0134] ;

[0135] in, Indicates the processing time, is the fluctuation measure of cutting force, Indicates the wear index of the tool. is the corresponding weight coefficient, which determines the relative importance of each indicator in the optimization target. The minimization of can improve production efficiency, the control of cutting force fluctuations ensures the stability of the machining process and the surface quality of the workpiece, and the reduction of tool wear can extend the service life of the tool. By constructing a comprehensive optimization objective function, a balance point is found between various machining performances, so that the machining path reaches the optimal state. In order to ensure that the machining path generated during the optimization process meets the physical limitations of the machine tool and the geometric characteristics of the workpiece, the machine tool kinematic constraints, workpiece geometric feature constraints and machining accuracy requirements are converted into mathematical expressions. Assume that the machine tool kinematic constraints are , the workpiece geometric feature constraints are , the machining accuracy requirement is ,in is the preset machining accuracy threshold. Multiple constraints form a constraint set The role of the constraint is to ensure that the machine tool does not exceed its range of motion when performing the processing task, while ensuring that the processing accuracy meets the requirements of the workpiece design and avoiding the generation of paths incompatible with the workpiece geometry in path planning. Based on the optimization objective function and constraint set , the optimization problem is described as a continuous-time optimal control problem , that is, satisfying the constraints Minimize the objective function under the premise of The optimal control problem is solved by pseudo-spectral method, in which Hp adaptive pseudo-spectral method is used to improve the solution accuracy and computational efficiency. Divide into Sub-interval , In each subinterval, use The discretization is done by using Legendre-Gauss-Lobatto (LGL) collocation points, which help to solve the state and control variables with high accuracy in each subinterval. Internal state variables and control variables Expanded to Legendre polynomial series of order:

[0136] ;

[0137] in, is the Legendre basis function, is the normalized time coordinate, and Represent the state variables and control variables in The coefficients on the basis functions. Through polynomial expansion, a linear combination of a finite number of basis functions is used to approximate the changes in state and control, effectively converting complex continuous-time problems into discrete forms. The expanded state and control variables are substituted into the system dynamics equations and constraints, and the continuous problem is discretized using the LGL quadrature formula to obtain a nonlinear programming problem (NLP). The discretized nonlinear programming problem is solved using a commonly used optimization algorithm to determine the optimal values ​​of the state and control variables at each discrete point. In order to improve the accuracy of the solution, a grid refinement indicator function is constructed. , which is defined as:

[0138] ;

[0139] in, For subinterval The error estimate vector within, represents the infinite norm of the error vector, For subinterval By calculating the error of each subinterval, if the error of a subinterval is found Exceeding the preset mesh refinement threshold , then the subinterval is divided into two equal parts, and the LGL points in the interval are increased to improve the solution accuracy in the interval. If the error is within the threshold, the current grid is kept unchanged. Through adaptive mesh refinement, the accuracy of areas with large errors is improved with limited computing resources, so as to obtain a better solution in the global scope. The sequential quadratic programming method is used to solve the discretized nonlinear programming problem to update the state variables and control variables. The SQP method is an effective algorithm suitable for solving constrained nonlinear optimization problems. It approaches the optimal solution of the original problem by successively solving the approximate problem of quadratic programming. During the solution process, the SQP algorithm iterates continuously to gradually narrow the gap in the objective function value. After each iteration, according to the grid refinement indicator function The result is to refine the grid again and solve it using the SQP method. This process is repeated until the convergence condition is met, that is, the change in the objective function value between two consecutive iterations is less than the preset convergence threshold. , or the maximum number of iterations is reached until:

[0140] ;

[0141] in, For the The objective function value of the iteration is is the convergence threshold, which is used to determine whether the optimization process has converged to a satisfactory accuracy. After the optimization is completed, the discrete control points obtained contain the position, posture, velocity and acceleration of the tool under each key state. In order to generate a continuous machining path, cubic spline interpolation is performed on the discrete control points. Cubic spline interpolation is a commonly used smooth interpolation method that ensures that the generated path transitions smoothly between each control point while maintaining a high geometric continuity. Through cubic spline interpolation, the discrete control points are reconstructed into a continuous machining path to obtain the optimized machining path.

[0142] In a specific embodiment, the process of executing step 600 may specifically include the following steps:

[0143] Analyze the optimized processing path, identify key processing feature points and processing operation sequences, and obtain a set of processing task nodes;

[0144] Based on the processing task node set, the dependency relationship between nodes is analyzed, a directed edge set is constructed, and an initial directed acyclic graph is obtained;

[0145] Apply the topological sorting algorithm to the initial directed acyclic graph to obtain the topological sequence of the processing tasks, and based on the topological sequence, divide the processing tasks into levels to construct a task hierarchy.

[0146] Perform computational complexity analysis on the task nodes in each task layer to obtain the task complexity vector. Based on the task complexity vector and the number of available computing resources, apply the load balancing algorithm to allocate resources for each layer of tasks to obtain the task allocation matrix.

[0147] Perform parallel computing on the assigned tasks. For each task node, based on the input data and processing parameters, call the corresponding processing algorithm to generate a local processing path.

[0148] All local machining paths are combined and optimized according to the topological sequence, and the continuity and smoothness of the path intersections are processed to obtain the multi-axis linkage machining path.

[0149] Specifically, the optimized machining path is analyzed to identify key machining feature points and machining operation sequences. Key feature points represent locations that require special attention during the machining process, such as corners of contours, areas with large curvature changes, and areas where collisions may occur. By analyzing these feature points, a set of machining task nodes is obtained, where each node represents an independent machining operation step, such as tool feed, steering, and finishing of certain features. Based on the identified set of machining task nodes, the dependencies between nodes are analyzed. Some machining operations must be performed after other operations are completed. For example, before finishing a certain surface feature, the rough machining of the area must be completed first. In order to describe this dependency, a set of directed edges is constructed to represent the sequential dependency between nodes, and an initial directed acyclic graph is obtained. Let the node set be , the directed edge set is ,in Representation Node and nodes There is a dependency relationship between tasks, that is, Must be on task Then execute. The initial directed acyclic graph constructed in this way effectively describes the order of processing tasks. In order to determine the execution order of processing tasks, a topological sorting algorithm is applied to the initial directed acyclic graph to obtain the topological sequence of processing tasks. Topological sorting is a linear sorting of the nodes of a directed acyclic graph, so that for each directed edge ,node All in the node The obtained topological sequence provides an execution order for the processing tasks, ensuring that all dependencies can be satisfied. On this basis, the processing tasks are hierarchically divided according to the topological sequence to construct a hierarchical structure of the tasks. Let the task sequence after topological sorting be The task hierarchy divides these tasks into several levels, and the tasks in each level are executed in parallel, thereby maximizing the processing efficiency. After completing the hierarchical division of tasks, the computational complexity analysis is performed on the task nodes in each task layer. The computational complexity analysis measures the computing resources required for each task, such as computing time and memory consumption. Let the task complexity vector in the task layer be ,in Indicates Based on the task complexity vector and the current available computing resources, a load balancing algorithm is applied to allocate resources to each layer of tasks to ensure that computing resources can be effectively used. Assume that the available computing resources are , the task allocation matrix is , then the goal of load balancing is to evenly distribute the task complexity vector to the available resources so that:

[0150] ;

[0151] in, Indicates allocation to resources The goal is to minimize the maximum load of each resource, so as to achieve balanced resource allocation. After completing resource allocation, parallel calculation is performed on the task nodes in each layer. For each task node, based on the input data and processing parameters, the corresponding processing algorithm is called to generate a local processing path. The input data is , the processing parameters are , the local processing path is , then it is expressed as:

[0152] ;

[0153] in, Represents the algorithm function for generating machining paths. The geometric features of the workpiece, the tool posture, and the machining objectives, such as rough machining or fine machining, need to be considered in the generation process of each local path to ensure that the generated path meets the machining requirements. After the local machining paths of all task nodes are generated, these local paths are combined and optimized according to the topological sequence. Since the local paths are generated in different task nodes, they are discontinuous or have rough transitions where they are connected to each other. The continuity and smoothness of the intersection of the paths are processed. Assume that at the task node and There are path intersections between them, and the local paths are and , then through the smoothing function They are processed in transition so that the continuity of position, velocity and even acceleration is satisfied at the intersection point:

[0154] ;

[0155] Through smoothing, the entire machining path is ensured to remain smooth at the junction of each local path, avoiding tool impact or reduced machining quality during machining due to path discontinuity. By combining and optimizing all local machining paths as a whole, the final machining path of multi-axis linkage is obtained. This path is continuous and smooth in space, and strikes a balance between machining time, tool wear and machining accuracy.

[0156] The above describes the path generation method for multi-axis linkage machining in the embodiment of the present application. The following describes the path generation device 10 for multi-axis linkage machining in the embodiment of the present application. Figure 2 In the embodiment of the present application, an embodiment of a path generation device 10 for multi-axis linkage machining includes:

[0157] A modeling module 11 is used to model the multi-axis machine tool and the workpiece to obtain a kinematic model of the machine tool and a mathematical model of the obstacle avoidance scenario of the workpiece;

[0158] A construction module 12 is used to construct a state space and an action space based on a machine tool kinematic model and a workpiece obstacle avoidance scenario mathematical model to obtain a double-delay deep deterministic policy gradient model of a machining path;

[0159] The calibration module 13 is used to obtain a multi-sensor data set of a multi-axis linkage machining process and perform time deviation calibration to obtain a time-synchronized sensor data set;

[0160] A generation module 14 is used to input the time-synchronous sensor data set into the processing path double-delay deep deterministic policy gradient model to generate a path and obtain an initial processing path;

[0161] An optimization module 15 is used to optimize the initial processing path based on the Hp adaptive pseudo-spectral method to obtain an optimized processing path;

[0162] The division module 16 is used to construct a directed acyclic graph based on the optimized processing path, and perform task division and parallel optimization to obtain a multi-axis linkage processing path.

[0163] Through the collaborative cooperation of the above components, by establishing an accurate machine tool kinematic model and a mathematical model of the workpiece obstacle avoidance scenario, the accuracy of path planning and obstacle avoidance capabilities are improved, and the risk of collision during processing is reduced. The dual-delay deep deterministic policy gradient model is adopted to effectively solve the processing problems of high-dimensional state space and continuous action space, and improve the efficiency and quality of path generation. The introduction of multi-sensor data fusion and time deviation calibration technology solves the problem of sensor data asynchrony and enhances the real-time and robustness of path planning. The HP adaptive pseudo-spectral method is applied to optimize the initial path, and multi-objective optimization of processing time, cutting force fluctuation and tool wear is achieved, which improves processing efficiency and processing quality. By constructing a directed acyclic graph and performing task division and parallel optimization, computing resources are fully utilized, and the computing efficiency of complex workpiece processing is significantly improved.

[0164] See also Figure 3 , Figure 3 This is a schematic block diagram of the structure of an electronic device 300 provided in an embodiment of the present application. The electronic device 300 includes a processor 301 and a memory 302. The processor 301 and the memory 302 are connected via a device bus 203, wherein the memory 302 may include a non-volatile storage medium and an internal memory.

[0165] The non-volatile storage medium can store a computer program. The computer program includes program instructions, and when the program instructions are executed by the processor 301, the processor 301 can execute any of the above-mentioned multi-axis linkage machining path generation methods.

[0166] The processor 301 is used to provide computing and control capabilities to support the operation of the entire electronic device 300 .

[0167] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 301, the processor 301 can execute any of the above-mentioned path generation methods for multi-axis linkage machining.

[0168] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the electronic device 300 involved in the present application scheme. The specific electronic device 300 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0169] It should be understood that the processor 301 may be a central processing unit (CPU), and the processor 301 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0170] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the electronic device 300 described above can refer to the corresponding process of the path generation method of the aforementioned multi-axis linkage processing, and will not be repeated here.

[0171] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by one or more processors, the one or more processors implement the path generation method for multi-axis linkage machining provided in the embodiment of the present application.

[0172] The computer-readable storage medium may be an internal storage unit of the electronic device 300 in the aforementioned embodiment, such as a hard disk or memory of the electronic device 300. The computer-readable storage medium may also be an external storage device of the electronic device 300, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped with the electronic device 300.

[0173] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0174] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0175] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A path generation method for multi-axis linkage machining, characterized in that: The method comprises: Model the multi-axis machine tool and the workpiece to obtain the machine tool kinematic model and the workpiece obstacle avoidance scenario mathematical model; Based on the kinematic model of the machine tool and the mathematical model of the workpiece obstacle avoidance scenario, a state space and an action space are constructed to obtain a double-delay deep deterministic policy gradient model of the machining path; Acquire multi-sensor data sets of multi-axis linkage machining process, and perform time deviation calibration to obtain time-synchronized sensor data sets; Inputting the time-synchronized sensor data set into the processing path double-delay deep deterministic policy gradient model to generate a path to obtain an initial processing path; Optimizing the initial processing path based on the Hp adaptive pseudo-spectral method to obtain an optimized processing path; A directed acyclic graph is constructed based on the optimized machining path, and task division and parallel optimization are performed to obtain a multi-axis linkage machining path.

2. The path generation method for multi-axis linkage machining according to claim 1, characterized in that: The multi-axis machine tool and the workpiece are modeled to obtain a machine tool kinematic model and a workpiece obstacle avoidance scenario mathematical model, including: Analyze the structural characteristics of the multi-axis machine tool, extract the motion parameters and constraints of each axis of the machine tool, obtain the machine tool structural parameter set, and based on the machine tool structural parameter set, mathematically model the motion relationship of each axis of the machine tool to obtain the machine tool kinematic equations; Describing the dynamic response of the machine tool's feed speed, spindle speed, and tool posture in the form of a transfer function to obtain a machine tool dynamic response model, and integrating the machine tool kinematic equations and the machine tool dynamic response model to obtain a machine tool kinematic model; The 3D scanning technology is used to collect the geometric features of the workpiece, obtain the point cloud data of the workpiece, and perform feature extraction and surface reconstruction on the acquired point cloud data to obtain the workpiece geometric model; Based on the workpiece geometric model, the workpiece surface grid is divided, and normal vectors and curvature information are assigned to each grid unit to obtain a description of the workpiece surface features, and the workpiece is divided into processing areas and a processing sequence is planned in combination with the processing task requirements to obtain a processing area model; Based on the workpiece surface feature description and the processing area model, a space occupancy grid in a workpiece coordinate system is constructed to obtain a workpiece space representation; A potential collision risk map is generated based on the workpiece spatial representation to obtain a collision risk model, and the workpiece surface feature description, the processing area model and the collision risk model are integrated to obtain a workpiece obstacle avoidance scenario mathematical model.

3. The path generation method for multi-axis linkage machining according to claim 1, characterized in that: The state space and action space are constructed based on the machine tool kinematic model and the workpiece obstacle avoidance scenario mathematical model to obtain a double-delay deep deterministic policy gradient model of the machining path, including: The tool position, posture, velocity and acceleration parameters in the machine tool kinematic model are encoded to obtain a machine tool state vector, and the workpiece surface features, processing area and collision risk information in the workpiece obstacle avoidance scenario mathematical model are encoded to obtain a workpiece state vector, and the machine tool state vector and the workpiece state vector are spliced ​​to obtain a complete state space representation; Encode the motion instructions, feed speed and spindle speed of each axis of the machine tool to obtain the action space representation; Based on the state space representation and the action space representation, a neural network structure is constructed, including a state encoder, an action generator and a value evaluator, wherein the state encoder maps high-dimensional state information to a low-dimensional feature space, the action generator generates continuous action instructions according to the encoded state, and the value evaluator evaluates the value of the state-action pair; Adding random noise from a Gaussian distribution to the action output by the action generator to obtain an exploratory action, and designing a dynamic adjustment mechanism to adjust the noise variance according to the training process; Construct an experience replay buffer to store state transition samples, and introduce a priority sampling mechanism to assign importance weights to each sample based on the time difference error; Design a hierarchical reinforcement learning strategy to decompose the overall processing task into multiple subtasks, build multiple sub-strategy networks accordingly, and design a reward function to comprehensively consider processing accuracy, efficiency, and obstacle avoidance performance, and evaluate and score the generated paths; Based on the double-delay deep deterministic policy gradient algorithm, the constructed neural network is trained, including updating the policy network and value network parameters, and a double-delay deep deterministic policy gradient model of the processing path is obtained.

4. The path generation method for multi-axis linkage machining according to claim 1, characterized in that: The method of acquiring a multi-sensor data set of a multi-axis linkage machining process and performing time deviation calibration to obtain a time-synchronized sensor data set includes: The image sequence collected by the visual sensor in the multi-axis linkage machining process is processed to extract the surface feature points of the workpiece and the tool position information to obtain the visual feature data stream, and the cutting force data collected by the force feedback sensor is filtered and normalized to obtain the force feedback data stream; Based on the visual feature data stream and the force feedback data stream, construct a data stream time model, including a sampling period of each sensor, a data transmission delay, and a processing time; Applying a sliding time window to the visual feature data stream and the force feedback data stream to segment the continuous data stream into a plurality of overlapping data segments, and establishing a consistency constraint relationship between the movement of the visual feature points and the change of the cutting force based on the workpiece geometric model in each data segment; Using the established consistency constraint relationship, a time deviation objective function is constructed, wherein the time deviation objective function represents the degree of time inconsistency between the visual feature data stream and the force feedback data stream, and the constructed time deviation objective function is optimized and solved to obtain a local optimal time deviation in each data segment; Based on the local optimal time deviation of all data segments, a recursive estimation method is adopted to comprehensively consider the historical deviation information and the current measurement results to obtain a global time deviation estimate. According to the global time deviation estimate, the visual feature data stream and the force feedback data stream are timestamp corrected to obtain a time-synchronized sensing data set.

5. The path generation method for multi-axis linkage machining according to claim 4, characterized in that: The step of inputting the time-synchronous sensing data set into the processing path double-delay deep deterministic policy gradient model to generate a path to obtain an initial processing path includes: Performing data fusion on the visual feature data and the force feedback data in the time-synchronous sensing data set to construct a multi-dimensional state matrix including tool position, posture, workpiece surface features and cutting force information; Inputting the multidimensional state matrix into the state encoder of the double-delayed deep deterministic policy gradient model of the processing path, extracting spatial features through a multi-layer convolutional neural network, and obtaining a compressed state feature vector; Based on the state feature vector, the action generator of the dual-delay deep deterministic policy gradient model of the machining path is calculated, and the motion instructions, feed speed and spindle speed of each axis are output through a multi-layer fully connected network to form an initial action vector; Applying Gaussian noise perturbation to the initial motion vector, where the mean of the noise is 0 and the variance is dynamically adjusted according to the exploration rate in the training phase, to obtain an exploratory motion vector; The exploratory action vector is concatenated with the current state feature vector, and input into the dual Q network of the dual-delay deep deterministic policy gradient model of the processing path to calculate two Q values; Based on the smaller value of the two Q values, combined with a preset reward function, a reward value of the current action is calculated, where the reward function comprehensively considers processing accuracy, efficiency, and obstacle avoidance performance; The four-tuple consisting of the current state feature vector, the exploratory action vector, the reward value and the next state feature vector is stored in the priority experience replay buffer, and the sample priority is updated according to the time difference error; A batch of high priority samples are sampled from the priority experience replay buffer, and the policy network and the target Q network are updated respectively using the double delay technology, wherein the update frequency of the target Q network is lower than that of the policy network, until the action sequence output by the policy network converges or reaches a preset maximum number of iterations, and the converged action sequence is decoded into the motion trajectory of the tool in the workpiece coordinate system to obtain the initial processing path.

6. The path generation method for multi-axis linkage machining according to claim 1, characterized in that: The optimizing process of the initial processing path based on the Hp adaptive pseudo-spectral method to obtain the optimized processing path includes: Step 1: uniformly sample the initial processing path, select N key control points, each of which contains position, posture, velocity and acceleration information, and obtain a discretized path point set S={s1,s2,...,sN}, where si represents the state of the i-th control point; Step 2: Based on the discretized path point set S, construct a comprehensive optimization objective function J(S)=w1T+w2F+w3*W, where T is the processing time, F is the cutting force fluctuation measure, W is the tool wear index, and w1, w2, and w3 are corresponding weight coefficients; Step 3: Convert the machine tool kinematic constraint g(S)≤0, the workpiece geometric feature constraint h(S)=0, and the machining accuracy requirement p(S)≤ε into mathematical expressions to obtain the constraint condition set C={g(S),h(S),p(S)}, where ε is the preset machining accuracy threshold; Step 4: Based on the optimization objective function J(S) and the constraint set C, establish a continuous-time optimal control problem P:minJ(S),stC; Step 5: Apply the Hp adaptive pseudo-spectral method to the continuous-time optimal control problem P, divide the time interval [t0, tf] into K subintervals [tk, tk+1], k=0, 1, ..., K-1, and use nk+1 LGL points in each subinterval, where t0 is the initial time and tf is the end time; Step 6: In each subinterval [tk, tk+1], expand the state variable x(t) and the control variable u(t) into a Legendre polynomial series of order nk: x(t)≈Σ(i=0 to nk)xi*Li(τ); u(t)≈Σ(i=0 to nk)ui*Li(τ); Where Li(τ) is the Legendre basis function, τ is the normalized time coordinate, xi and ui are the coefficients of the state variable and control variable on the i-th basis function respectively; Step 7: Substitute the expanded state and control variables into the system dynamics equations and constraints, discretize the continuous problem through the LGL quadrature formula, and obtain the nonlinear programming problem NLP; Step 8: Construct the grid refinement indicator function R(k)=||ek||∞ / (tk+1-tk), where ek is the error estimation vector in subinterval k, ||·||∞ represents the infinite norm, and tk+1-tk is the length of subinterval k; Step 9: If max(R(k))>δ, where δ is the preset grid refinement threshold, the subinterval with the largest R(k) is divided into two equal parts, and the number of LGL points in the interval is increased; if max(R(k))≤δ, the current grid is kept unchanged; Step 10: Use the sequential quadratic programming method to solve the discretized nonlinear programming problem NLP and update the state variables and control variables; Step 11: Repeat steps 8-10 until the convergence condition ||J(i+1)-J(i)||<η is met or the maximum number of iterations Imax is reached, where J(i) represents the objective function value of the i-th iteration, η is the convergence threshold, and Imax is the preset maximum number of iterations; Step 12: The discrete control points finally optimized are reconstructed into a continuous processing path through cubic spline interpolation to obtain the optimized processing path.

7. The path generation method for multi-axis linkage machining according to claim 1, characterized in that: The step of constructing a directed acyclic graph based on the optimized machining path, performing task division and parallel optimization, and obtaining a multi-axis linkage machining path includes: Analyzing the optimized processing path, identifying key processing feature points and processing operation sequences, and obtaining a processing task node set; Based on the processing task node set, the dependency relationship between nodes is analyzed, a directed edge set is constructed, and an initial directed acyclic graph is obtained; Applying a topological sorting algorithm to the initial directed acyclic graph to obtain a topological sequence of processing tasks, and based on the topological sequence, hierarchically dividing the processing tasks to construct a task hierarchy structure; Performing computational complexity analysis on the task nodes in each task layer to obtain a task complexity vector, and applying a load balancing algorithm to allocate resources to each layer of tasks based on the task complexity vector and the amount of available computing resources to obtain a task allocation matrix; Perform parallel computing on the assigned tasks. For each task node, based on the input data and processing parameters, call the corresponding processing algorithm to generate a local processing path. All local machining paths are combined and optimized according to the topological sequence, and the continuity and smoothness of the path intersections are processed to obtain a multi-axis linkage machining path.

8. A path generation device for multi-axis linkage machining, characterized in that: A path generation method for executing multi-axis linkage machining according to any one of claims 1 to 7, the device comprising: Modeling module, used to model the multi-axis machine tool and the workpiece, and obtain the machine tool kinematic model and the workpiece obstacle avoidance scenario mathematical model; A construction module, used to construct a state space and an action space based on the machine tool kinematic model and the workpiece obstacle avoidance scenario mathematical model to obtain a double-delay deep deterministic policy gradient model of a machining path; The calibration module is used to obtain the multi-sensor data set of the multi-axis linkage machining process and perform time deviation calibration to obtain the time-synchronized sensor data set; A generation module, used for inputting the time-synchronous sensing data set into the processing path double-delay deep deterministic policy gradient model to generate a path, so as to obtain an initial processing path; An optimization module, used for optimizing the initial processing path based on the Hp adaptive pseudo-spectral method to obtain an optimized processing path; The partitioning module is used to construct a directed acyclic graph based on the optimized machining path, and perform task partitioning and parallel optimization to obtain a multi-axis linkage machining path.

9. An electronic device, characterized in that: The electronic device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the electronic device executes the path generation method for multi-axis linkage machining as described in any one of claims 1-7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by the processor, the path generation method for multi-axis linkage machining as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Milling parameter optimization method based on deep reinforcement learning

    CN114200889A

  • Planning method for machining path of numerical control machine tool

    CN118605381A