Concrete 3D printing path optimization method and system based on double-strategy cooperation

By optimizing the path planning for 3D concrete printing using a dual-strategy collaborative deep reinforcement learning method, the problems of path discontinuity, frequent starts and stops, and long empty strokes were solved, achieving path continuity and stability, and improving printing quality and efficiency.

CN120911261AActive Publication Date: 2025-11-07XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511003386.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-11-07
Estimated Expiration
2045-07-21

AI Technical Summary

Technical Problem

Existing methods for planning paths in 3D concrete printing suffer from problems such as discontinuous paths, frequent starts and stops, long idle strokes, and sharp path turns, which affect printing efficiency and molding quality.

Method used

We employ a deep reinforcement learning approach based on dual-strategy collaboration. By constructing graph-structured data and adjacency matrices, we dynamically update path planning and optimize path generation by combining turning angles and start-stop penalty mechanisms to generate G-code control instructions.

Benefits of technology

It achieves path continuity and stability, reduces start-stop frequency and idle stroke length, improves printing quality and efficiency, and ensures forming accuracy and structural consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120911261A_ABST
    Figure CN120911261A_ABST
Patent Text Reader

Abstract

The invention provides a concrete three-dimensional printing path optimization method and system based on deep reinforcement learning. A printing path is based on a graph structure constructed by a slice model, node communication states are dynamically managed through an adjacent matrix, a path construction stage is judged in combination with node expandability, and a continuous path expansion strategy and a jump transition strategy are applied respectively. Modeling and selection are carried out on actions in different behavior stages by adopting a dual-depth Q network architecture, a reward function is designed in combination with a path corner, nozzle start and stop and a jump distance, and path generation is guided to have optimized performance in the aspects of space coverage, continuity and motion smoothness. And after path planning is completed, converting into a standard G code instruction to realize automatic execution of the nozzle control and material deposition process. The system is composed of a graph modeling module, a path strategy optimization module and an instruction generation module, is suitable for a concrete three-dimensional printing path planning task under a complex structure, and can be expanded to be applied to other additive manufacturing scenes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of intelligent construction and additive manufacturing, and particularly relates to a concrete three-dimensional printing path planning method and system based on deep reinforcement learning. BACKGROUND

[0002] At the current stage, the country is striving to build a modern building industry system and promote the coordinated development of intelligent construction and new building industrialization. Through the promotion of deep integration of digital technology and application of green and low-carbon technology, the building industry is gradually realizing the transformation of production mode and energy efficiency upgrading, comprehensively enhancing the core competitiveness of the industry, and promoting the progress towards higher quality and higher efficiency.

[0003] As a representative technology of the "third industrial revolution", three-dimensional printing (3D printing) has been widely used in industrial design, aerospace, construction engineering and other fields. 3D printing is based on a three-dimensional digital model and produces a structural entity through layer-by-layer stacking. It has the advantages of high manufacturing precision, high automation and high material utilization, and is a typical representative of additive manufacturing technology. The development of concrete three-dimensional printing technology has continuously broken through the limitations of traditional site pouring and mold forming. Through computer-controlled printing devices, specially designed concrete materials are deposited layer by layer to form complex, non-standard building components. This technology not only improves the degree of freedom and personalization of component manufacturing, but also significantly reduces labor costs and shortens construction periods. It has become one of the important directions of intelligent construction.

[0004] However, in practical applications, the planning strategy of the printing path is directly related to the forming quality of the component, the construction efficiency, the material utilization rate and the equipment stability. The common printing path planning methods at present are mainly based on geometric contour offset, graph search (such as A*, Dijkstra) or heuristic algorithm, and mainly focus on path coverage and motion feasibility. The patent with publication number CN120190885A provides a concrete 3D printing path optimization method and system based on reinforcement learning, which combines the solving process of the optimal Q value in the Q-learning algorithm and the construction requirements of the concrete 3D printing path planning. When facing complex and variable constraint concrete three-dimensional printing scenes, there are many technical defects: first, the printing path turning causes the nozzle movement direction to suddenly change, resulting in speed fluctuation and uneven material accumulation; second, there is a lack of collaborative optimization mechanism for nozzle start-stop actions and idle stroke trajectories, resulting in incoherent connection between path segments, which easily causes printing interruption, abnormal material accumulation and other problems, seriously affecting the printing efficiency; finally, the path planning result and the G-code control instruction are not integrated and data-driven closed-loop generated, resulting in low instruction generation efficiency and poor control accuracy. Therefore, it is urgent to develop an intelligent path planning method with high path continuity, low start-stop frequency and short idle stroke distance, and an intelligent path optimization system capable of automatically generating G-code control instructions, to improve the forming quality, energy efficiency and execution consistency of the concrete three-dimensional printing process, and promote the wide application of additive construction technology in the field of architecture. SUMMARY

[0005] In order to solve the problems of path discontinuity, frequent start-stop, long idle stroke and sharp path turning angle in the existing concrete three-dimensional printing path planning process, and fully utilize the technical advantages of concrete 3D printing in intelligent construction, the present application provides a concrete 3D printing path optimization method based on double-strategy cooperation, which can balance the path smoothness, start-stop frequency control and idle stroke optimization, and is suitable for automatic printing and efficient construction of building components.

[0006] In order to achieve the above purpose, in the first aspect, the present application provides a concrete 3D printing path optimization method based on double-strategy cooperation, comprising the following steps:

[0007] The loaded geometric model is represented as a graph structure composed of nodes and edges, each node represents a specific position in three-dimensional space on the printing surface, and the edge represents the movement path of the printing head between the nodes, obtaining the graph structure data for path optimization;

[0008] The graph structure data is taken as the input of the DQN model, and the two stages of path continuous expansion and path start-stop transition are designed for optimization respectively, the optimal path segment is output and the path splicing is completed, and the optimal path is obtained;

[0009] Based on the optimal path, the path nodes are traversed point by point and the corresponding device control statements are generated, and finally the complete G-code instructions are output.

[0010] Furthermore, when the loaded geometric model is represented as a graphical structure composed of nodes and edges, in the initial state, all nodes and edges are designed to be available. After a node is printed, the printed node is marked as a traversed point and the edges connected to it are removed.

[0011] Furthermore, the graph structure data is stored and managed using an adjacency matrix, which represents the connection relationships between nodes and is dynamically updated during the printing process.

[0012] Furthermore, using the graph structure data as input to the DQN model, optimizations are designed for the two stages of continuous path expansion and path start / stop transition, including: when the printed path corresponding to the graph structure data is in a connected state, the action space consists of the direct adjacent nodes of the current node; when the agent's current position is node n... t When, the optional action is all actions related to node n t There exists a set of validly connected and unvisited adjacent nodes; exclude the node n visited in the previous step. t-1 The corresponding reverse edge; when there are no unvisited adjacent nodes at the current node, the path segment is considered terminated, and the agent enters the start / stop path action phase.

[0013] Furthermore, when using the graph structure data as input to the DQN model, and designing and optimizing the two stages of continuous path expansion and path start-stop transition, if the current node still has untraversed adjacent edges, the system maintains the local action mode, and the action space is limited to the set of directly adjacent nodes of that node; when it is detected that the current node has no expandable edges, the system automatically switches to the start-stop path action space and constructs a global candidate set containing all nodes with untraversed edges.

[0014] Furthermore, in the path expansion phase, a local action space is constructed with the current node as the center, and all unvisited neighboring nodes in the adjacency matrix are selected as candidate actions; the main Q network evaluates the value of the combination of the current state and each candidate action, outputs the corresponding Q value, and selects the target node corresponding to the maximum Q value as the path expansion direction; an angle smoothness reward function is introduced in the path expansion phase.

[0015] When there are no expandable adjacent edges at the current node, switch to the path transition phase. The current action space is the set of all untraversed nodes in the structure graph data. In the path transition phase, the longer the empty journey distance, the higher the penalty value, and the closer the starting direction of the transition connection is to the previous path direction, the higher the reward.

[0016] In the path planning process, the turning angle is introduced as a parameter of the reward function design, when moving from the current node to the next node, the path deflection angle is calculated according to the angle change of the broken line composed of three nodes in succession, and negative reward is applied to the case of exceeding the threshold of sharp turning angle, and positive reward is applied to the case of continuous turning angle;

[0017] When jumping from a continuous path segment to the starting point of a new path, a negative reward is applied, and the amplitude of the negative reward is weighted according to the Euclidean distance of start-stop movement, and a linear penalty function is set;

[0018] The direction continuity evaluation result of the path segment after the path jump transition is reserved, and the angle reward is given a decay weight β to form the following composite reward function:

[0019] R up =β·R corner +R dis

[0020] Wherein, β is the angle reward assignment weight, R corner is the turning reward, R dis is the start-stop reward.

[0021] Further, when the path is spliced, the structural consistency constraint is set, only one connection of the repeated node at the path junction is reserved, and the closed path segment less than the set value is discarded according to the contribution degree, after splicing, the path is verified for continuity through the edge coverage, structural connectivity and execution consistency index.

[0022] Secondly, the present application provides a concrete 3D printing path optimization system based on double-strategy cooperation, comprising an initialization module, a path optimization module and an instruction generation module.

[0023] The initialization module is used to represent the loaded geometric model as a graph structure composed of nodes and edges, each node represents a specific position in three-dimensional space on the printing surface, and the edge represents the movement path of the printing head between nodes, to obtain the graph structure data for path optimization.

[0024] The path optimization module is used to input the graph structure data as the input of the DQN model, to design optimization for two stages of path continuous expansion and path start-stop transition respectively, to output the optimal path segment and complete path splicing, and to obtain the optimal path.

[0025] The instruction generation module generates corresponding device control statements based on the optimal path by traversing the path nodes point by point, and finally outputs complete G-code instructions.

[0026] In a third aspect, the present application simultaneously provides a computer device comprising a processor and a memory, the memory being used to store a computer executable program, the processor reading part or all of the computer executable program from the memory and executing, the processor executing part or all of the computer executable program being capable of realizing the above-mentioned method for optimizing a concrete 3D printing path based on dual-strategy cooperation.

[0027] A computer readable storage medium can also be provided, the computer readable storage medium storing a computer program, the computer program being executed by a processor to realize the above-mentioned method for optimizing a concrete 3D printing path based on dual-strategy cooperation.

[0028] Compared with the prior art, the present application has at least the following beneficial effects: by constructing a deep reinforcement learning path optimization method based on dual strategies, dynamic identification and switching can be performed in the path construction stage in a concrete three-dimensional printing task, a continuous path expansion model and a path jump strategy model are respectively called, fine control of the path generation process is realized, the printing path interruption frequency is effectively reduced, and the path continuity and stability are improved. By constructing a dual deep Q network model to train the path expansion strategy and the jump connection strategy, the algorithm has stronger generalization ability and structural adaptability, and can be used for multiple types of printing tasks and complex structure scenarios. The state vector of the model is the dynamic change of the node matrix, when a node is printed, the printed node is marked as an explored point and the edge connected thereto is removed. By dynamically updating the structure graph during printing, repeated access of the printing head to the printed position can be avoided, and collision between the printing head and the printed part can be effectively prevented. The model can generate motion instructions according to the path points, wherein the G0 instruction is responsible for the rapid movement of the printing head, that is, the idle stroke, and the G1 instruction controls the extrusion movement of the printing head between the path points and accurately sets the extrusion amount and movement rate. By accurately controlling the base rate and layer height of each node, it can be ensured that each layer of concrete is deposited uniformly and continuously, avoiding excessive or insufficient extrusion of materials, thereby ensuring the quality and structural stability of the finished product.

[0029] Further, the present application introduces a corner penalty mechanism to constrain the corner angle between consecutive nodes in the printing path, which can guide the path to be linear and smooth, reduce the problems of head deceleration, abnormal extrusion and material accumulation caused by sharp turns, and improve the forming precision and structural consistency of the printed product. At the same time, by setting the path jump distance penalty and start-stop penalty terms, the length of the idle stroke path of the printing head can be effectively controlled, the non-printing actions and start-stop times can be reduced, and the invalid motion and energy consumption in the printing process can be reduced. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1 is a whole flow framework diagram of the concrete three-dimensional printing path optimization method based on deep reinforcement learning.

[0031] Figure 2 A concrete three-dimensional printing path simulation interface demonstration diagram;

[0032] Figure 3 A representation method diagram of a turning angle;

[0033] Figure 4 A slice structure diagram of a concrete 3D printing model.

[0034] Figure 5 A path planning result diagram of a Q-learning method under a regular square structure;

[0035] Figure 6 A path planning result diagram of a DQN method under a regular square structure;

[0036] Figure 7 A path planning result diagram of a DQN method under a large-scale square array structure;

[0037] Figure 8 A best printing path result obtained based on an ant colony algorithm.

[0038] Figure 9 A best printing path result obtained by a 3D printing path planning method based on a Q-learning complex thin-walled structure object. DETAILED DESCRIPTION

[0039] In view of the solidification characteristics, interlayer bonding strength and equipment movement constraints of the concrete material in the 3D printing process, multiple key indicators that need to be optimized in the path planning are analyzed in depth, and on this basis, a reinforcement learning strategy model is constructed by fusing multiple target constraints, which effectively prevents the problems of material accumulation and structural defects caused by path repetition or backtracking. In the path construction, the graph structure representation method is introduced, the printing task is abstracted into a graph model composed of "nodes-edges", and the uniqueness and directionality of the path coverage are ensured through the dynamically updated adjacency matrix; in order to reduce the device start-stop frequency and the air travel cost, the path jump identification and head lifting penalty mechanism are set, which guides the strategy to select the shortest jump connection when the path is interrupted; in order to improve the forming precision, the reward function based on angle smoothness is designed, which explicitly constrains the number of turning angles and the turning angle amplitude, and reduces the deposition uneven phenomenon caused by sharp turning behavior.

[0040] On the basis of the above index modeling, the application proposes a double-stage reinforcement learning path optimization strategy, which processes the continuous path segment construction and path jump connection tasks through a double deep Q network (Double DQN) model respectively, so as to ensure that the printing path has good continuity and global accessibility while being fully traversed.

[0041] The application discloses a path optimization method applied to three-dimensional printing of concrete, which is based on a deep reinforcement learning framework and aims to realize dynamic generation and adaptive adjustment of a printing path. By constructing a graph structure state model for a printing task and performing multi-strategy learning based on a double deep Q network, intelligent decision-making for node selection can be realized at different path stages, so as to improve the continuity of the nozzle movement trajectory and the quality and efficiency of additive manufacturing. The implementation process of the application includes model input and slicing processing, path state initialization, strategy network training and path construction, and conversion and output of printing instructions, which are specifically described in Figure 1 After the system completes model import, firstly, the system performs layer slicing on the model, extracts the contour boundaries and key node information of each layer, and constructs graph structure data for path optimization, namely state space and action space; then, according to the strategy requirements of different stages, the related information is input into the DQN model, and the double models are used to realize the cooperation of double strategies; next, the optimal path segment is output and path splicing is completed; finally, G code instructions are generated to control the printing nozzle.

[0042] First step: graphical representation of path planning

[0043] Firstly, the loaded geometric model is represented as a graph structure composed of nodes and edges, wherein each node represents a specific position in the three-dimensional space on the printing surface, that is, a point at which concrete will be extruded, and the edge represents a feasible movement path of the printing head between the nodes, which constitutes a complete printing path network. In the initial stage, the graph structure is modeled as an undirected graph, as shown in Figure 3 , which allows the printing head to move freely between nodes; in order to avoid collision between the printing head and the printed part, the structure graph is dynamically updated during the printing process. Specifically, all nodes and edges are in an available state at the initial stage, when a node is printed, the printed node is marked as a traversed point and the edge connected to the node is removed. This design can effectively prevent the printing head from repeatedly accessing the printed position, and ensure the efficiency and integrity of the printing path. In addition, by dynamically updating the structure graph, a reasonable and efficient path can be dynamically adjusted and planned according to the changes of the printing state in real time.

[0044] The printing structure graph, or graph data, is stored and managed using an adjacency matrix. This adjacency matrix represents the connections between nodes and is dynamically updated during the printing process. Initially, the graph structure generated from the input data includes the coordinates of each node and the connection paths between them. The adjacency matrix is ​​a two-dimensional matrix A. Assuming there are N nodes in the printing path, the size of the adjacency matrix is ​​N×N. The value of the matrix element A[i][j] is defined as A[i][j] = 1 when there is a connection between node i and node j, and A[i][j] = 0 when there is no connection between node i and node j. During printing, the adjacency matrix is ​​dynamically adjusted according to the current printing status. When a node is printed, it is marked as inactive, and the edges connected to it are removed. This dynamic update mechanism effectively avoids redundant path planning, ensuring that the print head does not revisit already printed portions. Furthermore, by updating the connection matrix in real time, it can adapt to the constantly changing printing environment and always plan a reasonable, efficient, and collision-free printing path, further improving printing efficiency and product quality.

[0045]

[0046] In this matrix, the element A[i][j] indicates whether there is an edge between node i and node j, where 1 indicates that there is an edge and 0 indicates that there is no edge and no path.

[0047] Step 2: Design of a dual-strategy collaborative reinforcement learning path planning method

[0048] 1. Design and switching of motion space

[0049] Continuous path action space: When the printed path is connected, the action space consists of the direct adjacent nodes of the current node. Specifically, when the agent's current position is node n... t When, the optional action is all actions related to node n t There exists a set of validly connected, unvisited adjacent nodes. To prevent path backtracking, exclude node n visited in the previous step. t-1 The corresponding reverse edge. This action space design effectively reduces decision complexity and improves strategy learning efficiency by limiting the action range to local adjacent nodes; at the same time, it avoids path oscillations and sharp turns, promoting the smoothness and continuity of the printed trajectory, thereby enhancing the printability of the path and the stability of the construction process.

[0050] Start-stop path action space: when there is no unvisited adjacent node in the current node, the path segment is considered to be terminated, and the agent enters the start-stop path action phase. At this time, the action space is composed of all nodes in the graph structure data that still contain unvisited edges, and the agent can select a target node from it to start a new path segment. This action space covers all global nodes, supporting the bridging connection of paths across connected regions. Considering that start-stop actions involve lifting the nozzle, moving with empty travel, and falling down again, which increases the printing cost, the start-stop frequency and jump distance are constrained in the strategy design to balance the path coverage integrity and printing efficiency.

[0051] During path planning, if there are still unvisited adjacent edges in the current node, the system remains in the local action mode, and the action space is limited to the direct adjacent node set of the node; when it is detected that there is no expandable edge in the current node, the system automatically switches to the start-stop path action space, and a global candidate set containing all nodes with unvisited edges is constructed. Through this dynamic adjustment mechanism, the system can realize phased adaptive update of the action space according to the path expansion state, thereby realizing the coordinated cooperation of local path extension and global region coverage, and effectively improving the coherence of overall path construction and the stability of strategy execution.

[0052] 2. Reward function design

[0053] Turning reward: to improve the geometric smoothness and construction stability of the path, the turning angle is introduced as an important parameter in the design of the reward function during path planning. When the agent moves from the current node to the next node, the system calculates the path deflection angle according to the angle change of the polyline formed by the consecutive three nodes. If the current position of the print head is node v1, v0 is the previously visited node, and v2 is the node to be reached after the action is executed, then θ is the angle between vectors and , and the turning angle of the print nozzle is R corner = π - θ, where π is the circular constant.

[0054] If the angle changes sharply, i.e. there is a significant sharp turn in the path, i.e. exceeds the turning angle threshold, then a certain negative reward is applied to suppress the generation of non-smooth trajectories; if the angle is continuous and the deflection amplitude is small, a positive reward is given to guide the strategy to generate a smooth and continuous printing trajectory. This mechanism helps to reduce the problems of print head oscillation and uneven material accumulation caused by frequent turning in the path, especially for three-dimensional concrete printing scenarios that require high trajectory continuity. At the same time, this design can work with other reward items to achieve comprehensive optimization of path printability, material utilization, and equipment motion stability.

[0055] Start-stop reward: In the path planning process, frequent start-stop behavior not only reduces printing efficiency and causes resource waste, but also affects the forming quality due to uneven material adhesion at the start-stop position. Therefore, a reward mechanism for start-stop conversion between path segments needs to be set. When the agent jumps from a continuous path segment to the starting point of a new path, i.e., performs a non-continuous path connection operation, the system identifies this behavior as a start-stop action and applies a negative reward accordingly. The magnitude of this negative feedback is weighted according to the Euclidean distance of the start-stop movement to quantify its impact on system efficiency.

[0056] Specifically, first calculate the Euclidean distance d between the path transition starting point and the target node, and set a linear penalty function:

[0057]

[0058] R dis = -a · d

[0059] where a is the distance penalty coefficient, used to control the proportion of idle travel in the overall path cost.

[0060] This reward design aims to guide the strategy to reduce the frequency of start-stop actions as much as possible, shorten the travel length of non-printing segments, and thus reduce the idle movement cost of the print head and the energy consumption overhead in the printing process. This mechanism works with the dynamic switching strategy of the action space to effectively balance between path integrity and device execution efficiency, improving the overall construction performance of three-dimensional printing tasks.

[0061] Comprehensive reward strategy: To ensure that the path after start-stop connection is still printable, the direction continuity evaluation result of the path segment after path jump transition is retained, and a decay weight β is given to the angle reward to form the following compound reward function:

[0062] R up = β · R corner + R dis

[0063] where β is the angle reward weight, R corner is the turn reward, and R dis is the start-stop reward.

[0064] The present application dynamically switches the reward function during the path construction phase to achieve the weighted fusion of angle reward and start-stop penalty. When the path is in a continuously expandable state, the angle reward is preferred to suppress sharp turning behavior and improve trajectory smoothness; when the path is interrupted and needs to jump, the start-stop penalty is introduced to reduce the cost of frequent start-stop. Through this mechanism, the strategy remains consistent with the printing process goal throughout the path construction process, improving optimization effectiveness and training stability.

[0065] 3. Construction of double-strategy model

[0066] To realize the adaptive modeling of the structural connectivity difference problem in the process of three-dimensional printing path construction of concrete, the application proposes a double-strategy path planning method based on a double-DQN model, optimizes the strategies for the two stages of path continuous expansion and path start-stop transition respectively, and completes the integrated design of the decision framework, so as to realize the continuity and globality of path generation.

[0067] In the state modeling aspect, a fixed-length sparse vector is used to represent the access state of each node, and the accessed nodes are marked as 1 and the unaccessed nodes are marked as 0. The vector is converted into a feature representation by an embedding module and input into the DQN backbone network structure to ensure uniform input dimension and shared feature space.

[0068] In the path expansion stage, a local action space is constructed around the current node, and all unvisited adjacent nodes in the adjacency matrix are selected as candidate actions; the main Q network evaluates the value of the combination of the current state and each candidate action, outputs the corresponding Q value, selects the target node corresponding to the maximum Q value as the path expansion direction, and realizes the optimal advancement of the path in the local range. To improve the printing feasibility and construction continuity of the path, an angle smoothness reward function is introduced in this stage, which analyzes the included angle formed by the three consecutive nodes, effectively suppresses the sudden turning and oscillation behavior of the path, and guides the model to generate a linear and smooth printing trajectory. When there is no expandable adjacent edge in the current node, the system will automatically switch to the transition strategy model, that is, enter the path transition stage, and the current action space is the set of all unvisited nodes in the graph. Through comprehensive consideration of the air travel distance and the rationality of the connection direction, a composite start-stop reward mechanism is used for decision guidance. The longer the air travel distance, the higher the penalty value, and the closer the starting direction of the transition connection to the previous path direction, the higher the reward. Through this mechanism, high-quality splicing between path segments can be realized, effectively reducing the energy consumption loss and structural weakening problems caused by air travel.

[0069] In the path construction process, the reinforcement learning strategy is trained and updated according to the double-DQN model, the main network is used to perform action selection, and the target network is used to perform action evaluation, so as to alleviate the overestimation problem caused by the maximization operation in traditional Q learning. The Q value update process conforms to the following iteration rules:

[0070]

[0071]

[0072] Among them, Q eval is the current main network for action selection, Q target is the target network, which periodically copies parameters from Q eval , θ is the parameter of the main network, and θ -is the parameter of the target network, and γ∈[0, 1) is the discount factor, which is used to balance the immediate and long-term rewards, y t is the TD target

[0073] In order to realize the cooperation of the above-mentioned two-stage strategy, a dynamic model switching mechanism based on path state discrimination is designed. When the path can be expanded, the continuous expansion strategy is executed; when the path cannot be expanded, the start-stop transition strategy is automatically switched. The two strategy models are consistent in network structure, parameter interface and training data set, facilitating unified training and parameter migration sharing, and finally realizing the comprehensive optimization of path direction continuity and structure coverage integrity.

[0074] 4, path splicing

[0075] In the path planning process, the printing path is divided into several path segments, each of which is composed of a continuous edge sequence and corresponding start and end nodes, and the geometric feature information of the path segment is recorded for subsequent processing. After the path generation is completed, the path segments are spliced in turn according to the generation order, the redundant nodes between the path segments are merged to eliminate redundancy, and for the disconnected path segments, the skip instructions generated by the strategy model are inserted to realize the idle stroke movement of the nozzle, ensuring the physical continuity of the path. In order to improve the rationality of the path structure, the invention sets a structure consistency constraint, only retains one connection for the repeated nodes at the path junction, and discards the too short closed path segment according to the contribution degree, so as to reduce the frequent start-stop in the printing process and ensure the stability and uniformity of material accumulation in the printing process. After splicing is completed, the path is verified for continuity through multi-dimensional indexes such as edge coverage, structure connectivity and execution consistency, so as to ensure that the path covers all printing edges, maintains overall connectivity and the action instruction meets the execution requirements of the printing equipment. Finally, the generated composite path takes into account local optimization and global coverage, meets the needs of path continuity, stability and printing efficiency in the concrete 3D printing process, and realizes efficient connection of path planning and printing execution.

[0076] Third step: G code generation

[0077] After the path planning is completed and the trajectory is reconstructed, in order to realize the closed-loop control from path data to equipment execution, the generated node sequence needs to be converted into control instructions that can be recognized and executed by the concrete three-dimensional printer. Therefore, the invention designs an instruction generation module based on the G-code standard semantics, realizes automatic differentiation of printing path and idle stroke, structured generation of control command and accurate expression of printing control semantics. The module takes the planned path as input, traverses the path nodes point by point and generates corresponding device control statements, and finally outputs a complete G-code file.

[0078] After completing the path planning of each layer, the generated path information is further converted into a standard G-code instruction set for driving the 3D printing device to perform specific printing operations. G-code is a widely used control language in the industry, and its generation process needs to accurately reflect the spatial distribution of path points and the printing state to ensure the accuracy of the print head movement and the consistency of the extrusion control. The corresponding motion instructions are generated according to the path nodes. Among them, G0 instruction is used to control the rapid positioning movement of the print head in the non-printing state, usually used for starting point or jump transition, aiming to shorten the idle travel time and improve the printing efficiency; while G1 instruction is used for material extrusion in the actual printing process, which not only includes the movement trajectory of the print head between path segments, but also accurately sets the extrusion amount and movement speed to ensure the uniform deposition of concrete materials and the continuity of the path. In the multi-layer printing process, the z-axis coordinate of each layer is automatically updated to ensure that the print head accurately reaches the working height of the current printing layer, achieving smooth transition between layers. At the same time, the extrusion rate is dynamically calculated according to the path segment length and the set extrusion coefficient, further ensuring the stability of material accumulation. In the idle travel stage, G0 instruction is preferentially called to avoid unnecessary material consumption and equipment wear and tear. The printing height, path order, extrusion control parameters, and other information of each layer are encoded into the corresponding G-code file to ensure the high consistency and repeatability of the overall printing process. The generated G-code can be directly input into the 3D printer control system to realize the continuous and stable concrete deposition process of the print head according to the predetermined path, thereby effectively ensuring the forming quality and structural integrity of the printed structure.

[0079] In the process of concrete three-dimensional printing, the number of path turning angles and the number of start-stop times have a significant impact on the overall forming quality and printing efficiency. Sharp turns usually require the print head to slow down to maintain consistent extrusion. If the path oscillates or the angle changes too much, it is easy to cause material accumulation, deviation, or layer separation defects. In addition, each start-stop of the print head is accompanied by control delay and material restart process. Excessive start-stop behavior not only increases the overall path time, but also may cause the interruption of structural continuity, affecting the mechanical stability of the component.

[0080] In order to comprehensively evaluate the applicability and superiority of the path optimization method described in the present application in actual printing tasks, simulation experiments were carried out on a typical structure slice model as shown in Figure 4 The results obtained by using the 3D printing path optimization algorithm based on double-strategy cooperation described in the present application are shown in Figure 7The two different color paths correspond to two consecutive printing tasks, and the start-stop jump between the two paths is marked by a dashed line. As can be seen from the experimental results, the final printing path based on the algorithm contains 78 turns and 2 start-stops, with good path continuity and structural uniformity. In comparison, when the ant colony algorithm is used to plan the path, there are 81 turns and 4 start-stops, as shown in Figure 8 and the path planning strategy based on Q-learning produces 69 turns and 5 start-stops, as shown in Figure 9 By testing and comparing several path planning methods in a unified graph structure environment and statistically analyzing key indicators such as the number of turns and start-stops, it can be seen that the method described in the present application can maintain good path continuity and work efficiency, reduce the number of turns, effectively suppress the start-stop of the nozzle, reduce the idle stroke, save energy, and improve the efficiency and quality of printing.

[0081] As shown in Figure 5 and Figure 6 the method described in the present application also shows good path planning performance, showing strong model adaptability and strategy stability. The printing model is a printing area composed of an array of equidistant square cells. Tests have found that the path generated by the method described in the present application can effectively reduce the jump behavior and redundant travel of the path segment on the basis of maintaining full coverage of the nodes, significantly reducing the length of the idle stroke and the density of structural turning points in the path.

[0082] In summary, the method described in the present application performs best in controlling the frequency of nozzle start-stop, has strong path continuity, and can effectively reduce structural breakpoints and printing interruptions; it also has obvious advantages in path smoothness, with the number of path corners kept at a reasonable level, effectively avoiding fluctuations in the quality of the formed product caused by path oscillation. Thus it can be verified that the 3D printing path optimization method based on double-strategy collaborative reinforcement learning has good adaptability, stability and engineering promotion value in actual concrete printing tasks.

[0083] In Example 2, the present application can provide a concrete 3D printing path optimization system based on double-strategy collaboration, which includes an initialization module, a path optimization module and an instruction generation module.

[0084] The initialization module is used to represent the loaded geometric model as a graph structure composed of nodes and edges, each node representing a specific position in three-dimensional space on the printing surface, and the edge representing the movement path of the printing head between the nodes, obtaining the graph structure data for path optimization.

[0085] The path optimization module is used to take the graph structure data as input to the DQN model, design and optimize the two stages of continuous path expansion and path start-stop transition, output the optimal path segment and complete path splicing to obtain the optimal path.

[0086] The instruction generation module traverses the path nodes one by one based on the optimal path and generates the corresponding device control statements, and finally outputs the complete G-code instructions.

[0087] On the other hand, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the concrete 3D printing path optimization method based on dual-strategy collaboration described in the present invention.

[0088] The present invention can also provide a computer device, including a processor and a memory, wherein the memory is used to store a computer executable program, the processor reads the computer executable program from the memory and executes it, and the processor can implement the concrete 3D printing path optimization method based on dual-strategy collaboration described in the present invention when executing the computer executable program.

[0089] The computer device may be a laptop, a desktop computer, or a workstation.

[0090] The processor can be a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or an off-the-shelf programmable gate array (FPGA).

[0091] The memory described in this invention can be an internal storage unit of a laptop, desktop computer, or workstation, such as memory or hard disk; or it can be an external storage unit, such as a portable hard disk or flash memory card.

[0092] The computer-readable storage medium can include a computer storage medium and a communication medium. The computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. The computer-readable storage medium can include read-only memory (ROM), random access memory (RAM), solid state disk (SSD), optical disk, etc. Among them, the random access memory can include resistance random access memory (ReRAM) and dynamic random access memory (DRAM).

[0093] The above is only to illustrate the technical idea of the present application, and cannot limit the protection scope of the present application. Any modification made according to the technical idea of the present application on the basis of the technical scheme falls within the protection scope of the claims of the present application.

Claims

1. A method for optimizing a 3D printing path of concrete based on a double-strategy cooperation, characterized in that, The method comprises the following steps: The loaded geometric model is represented as a graph structure composed of nodes and edges, each node representing a specific position in three-dimensional space on the printing surface, and the edges representing the movement path of the print head between the nodes, obtaining graph structure data for path optimization; The graph structure data is input into the DQN model, and the two stages of continuous path expansion and path start-stop transition are optimized respectively, the optimal path segment is output, and the path is spliced to obtain the optimal path; Based on the optimal path, the path nodes are traversed point by point, and the corresponding device control statements are generated, and finally the complete G-code instructions are output.

2. The dual-strategy based collaborative concrete 3D printing path optimization method according to claim 1, characterized in that, The graph structure data is stored and managed by an adjacency matrix, which is used to represent the connection relationship between nodes and is dynamically updated during the printing process.

3. The dual-strategy based collaborative concrete 3D printing path optimization method according to claim 1, characterized in that, Using the graph structure data as input to the DQN model, optimizations are designed for the two stages of continuous path expansion and path start-stop transition, including: when the printed path corresponding to the graph structure data is in a connected state, the action space consists of the direct adjacent nodes of the current node; when the agent's current position is node n... t When, the optional action is all actions related to node n t There exists a set of validly connected and unvisited adjacent nodes; exclude the node n visited in the previous step. t-1 The corresponding reverse edge; when there are no unvisited adjacent nodes at the current node, the path segment is considered terminated, and the agent enters the start / stop path action phase.

4. The dual-strategy based collaborative concrete 3D printing path optimization method according to claim 3, characterized in that, When the graph structure data is input into the DQN model and the two stages of continuous path expansion and path start-stop transition are optimized respectively, if there are still untraversed adjacent edges in the current node, the system remains in local action mode, and the action space is limited to the direct adjacent node set of the node; when it is detected that there is no expandable edge in the current node, the system automatically switches to the start-stop path action space, and a global candidate set containing all nodes with untraversed edges is constructed.

5. The dual-strategy based collaborative concrete 3D printing path optimization method according to claim 4, characterized in that, In the path expansion stage, a local action space is constructed around the current node, and all adjacent nodes in the adjacency matrix that have not been visited are selected as candidate actions; the main Q network evaluates the value of the combination of the current state and each candidate action, outputs the corresponding Q value, and selects the target node corresponding to the maximum Q value as the path expansion direction; an angle smoothness reward function is introduced in the path expansion stage; When there is no expandable adjacent edge in the current node, switch to the path transition stage, and the current action space is the set of all nodes that have not been traversed in the graph structure data. In the path transition stage, the longer the idle stroke distance, the higher the penalty value, and the closer the starting direction of the transition connection to the previous path direction, the higher the reward.

6. The dual-strategy synergy-based concrete 3D printing path optimization method according to claim 1, characterized in that, In the path planning process, the turning angle is introduced as a parameter in the reward function design. When moving from the current node to the next node, the path deflection angle is calculated according to the angle change of the polyline formed by the continuous three nodes. A negative reward is applied for the case where the turning angle exceeds the threshold for sharp turns, and a positive reward is applied for the case where the turning angle is continuous. When jumping from a continuous path segment to the starting point of a new path, a negative reward is applied, and the magnitude of this negative reward is weighted based on the Euclidean distance of the start-stop movement, and a linear penalty function is set. The direction continuity evaluation result of the path segment after the path jump transition is retained, and the angle reward is given a decay weight β to form the following compound reward function: R up = β · R corner + R dis where β is an angle reward weighting, R corner is a turn reward, R dis is a start-stop reward.

7. The dual policy synergy based concrete 3D printing path optimization method according to claim 1, wherein, When splicing the path, set the structural consistency constraint, keep only one connection at the repeated node at the path junction, and discard the closed path segment less than the set value according to the contribution. After splicing, the coherence of the path is verified through the edge coverage, structural connectivity and execution consistency indicators. 8.A system for optimizing a 3D printing path of concrete based on dual-strategy synergy, characterized in that, The method comprises an initialization module, a path optimization module and an instruction generation module. The initialization module is configured to represent the loaded geometric model as a graph structure composed of nodes and edges, each node representing a specific position in three-dimensional space on the printing surface, and the edges representing the movement path of the printing head between the nodes, to obtain graph structure data for path optimization. The path optimization module is configured to input the graph structure data into a DQN model, design optimization for two stages of path continuous expansion and path start-stop transition respectively, output the optimal path segment and complete path splicing, and obtain the optimal path. The instruction generation module generates corresponding device control statements based on the optimal path by traversing the path nodes point by point, and finally outputs complete G-code instructions.

9. A computer device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method for optimizing the 3D printing path of concrete based on the double-strategy cooperation according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method for optimizing the 3D printing path of concrete based on the double-strategy cooperation according to any one of claims 1-7.

Citation Information

Patent Citations

  • Concrete 3D printing path optimization method and system based on reinforcement learning

    CN120190885A

  • 3D printing apparatus, 3D printing method, and machine learning device

    US20220331904A1