Polygon gantry ram optimization design method based on structural topology optimization

CN123013321APending Publication Date: 2026-10-30HEFEI MAXUN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611150534.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本发明的目的是提供一种基于结构拓扑优化的多边形龙门滑枕优化设计方法,以解决现有技术中常规拓扑优化方法难以兼顾多工况结构性能与可制造性、优化结果需大量人工重构且重构后性能偏离优化结果、以及强化学习结合拓扑优化时计算成本高且缺乏动作约束的问题

Benefits of technology

[0024]本发明通过建立由多边形外边界限定的参数化设计域,并将导轨连接区、主轴安装区、驱动连接区和密封面设为不可设计区,将其余区域设为可设计区,使得优化过程仅在可设计区内调整材料分布,不可设计区始终保留材料,从而保证了滑枕安装接口和密封面的结构完整性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123013321A_ABST
    Figure CN123013321A_ABST
Patent Text Reader

Abstract

The application discloses a polygon gantry ram optimization design method based on structural topology optimization, and relates to the technical field of intelligent optimization.The method comprises the following steps: obtaining parameters and establishing a parameterized design domain containing an undesignable area; generating a plurality of analysis working conditions according to a plurality of discrete positions, performing finite element discretization on the design domain, and constructing a structure diagram; constructing a reinforcement learning environment with the structure diagram and unit data, and constructing a hierarchical reinforcement learning agent; generating an action mask according to constraints to shield combinations that do not meet manufacturing or structural constraints, and the agent outputs a topology action in the remaining combinations; updating a density field by executing the topology action, obtaining a structural response through a solver or a proxy model, and calculating a reward value, and iteratively updating the agent until convergence. Through the pre-constraint of the action mask, the reward driving of the worst working condition, and the finite element checking, the application realizes the unified optimization of the light weight, high stiffness and manufacturability of the ram under multiple working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent optimization technology, and in particular to an optimization design method for polygonal gantry slide blocks based on structural topology optimization. Background Technology

[0002] With the increasing demands for machining precision in machine tools, the ram of a gantry milling machine bears the spindle assembly and feeds linearly along the crossbeam or saddle. Its mass, static stiffness, dynamic characteristics, and thermal stability directly affect the positioning accuracy of the tool center point and the quality of the machined surface. Polygonal cross-section rams can utilize multiple outer wall surfaces to arrange guideways, accessories, or reinforcing structures, but there is strong coupling between its outer contour vertices, different side walls, mounting interfaces, and internal stiffeners, resulting in a large number of design variables.

[0003] In existing technologies, the optimization design of gantry rams suffers from the following problems: conventional optimization methods fail to distinguish key areas such as the guide rail connection area, spindle mounting area, drive connection area, and sealing surface from adjustable material areas, leading to the erroneous deletion of material in these areas during the optimization process; existing optimizations typically only target a single stroke position or rated working condition, ignoring the differences in the stress state and stiffness characteristics of the ram at different extension positions, making it difficult for the optimization results to cover the entire stroke of the ram; conventional topology optimization methods based on density methods or progressive structural optimization only target structural performance, failing to embed manufacturing constraints such as casting wall thickness, rib continuity, tool accessibility, and symmetry into the optimization process, requiring extensive manual reconstruction after optimization, and the reconstructed performance deviates from the optimization results; if the finite element solver is called after each action in reinforcement learning, the computational cost is too high; if only a surrogate model is relied upon without verification, the prediction bias accumulates during iteration, causing the results to deviate from the true optimum; the converged density field lacks a deterministic reconstruction path to the manufacturable entity model, and the performance deviation after reconstruction cannot be fed back to the iteration process.

[0004] Therefore, this invention proposes an optimization design method for polygonal gantry slide blocks based on structural topology optimization. Summary of the Invention

[0005] The purpose of this invention is to provide a polygonal gantry ram optimization design method based on structural topology optimization, in order to solve the problems of conventional topology optimization methods in the prior art that are difficult to balance the structural performance and manufacturability under multiple working conditions, require a large amount of manual reconstruction of optimization results and the performance deviates from the optimization results after reconstruction, and have high computational cost and lack of action constraints when combining reinforcement learning with topology optimization.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] A method for optimizing the design of polygonal gantry rams based on structural topology optimization includes:

[0008] S1. Obtain the outer contour of the polygonal gantry slide, guide rail pair connection, spindle box or spindle assembly installation, drive connection, stroke, material, and manufacturing parameters, and establish a parametric design domain defined by the outer boundary of the polygon; in the parametric design domain, set the guide rail connection area, spindle installation area, drive connection area, and preset sealing surface as non-designable areas, and set the remaining areas where material can be removed as designable areas;

[0009] S2. Based on the multiple discrete positions of the slide block in the stroke direction and the cutting force, gravity, inertial force, guide rail constraint and thermal load corresponding to each discrete position, multiple analysis conditions are generated. The parameterized design domain is discretized by finite element method to obtain the finite element mesh. The structure diagram is constructed according to the adjacency relationship between each finite element element. A full-condition finite element solution is performed for the initial density field to obtain the initial characteristics of the nodes and the global response.

[0010] S3. Construct a reinforcement learning environment using the structure diagram and data from each finite element element; construct a hierarchical reinforcement learning agent to sequentially determine the target region, topology operation type, and material density adjustment amount.

[0011] S4. Generate an action mask based on at least four of the following constraints: minimum wall thickness, minimum rib width, load path connectivity, polygonal outer wall continuity, rib plate continuity, machining tool accessibility, and symmetry. Use the action mask to shield target regions that do not meet manufacturing or structural constraints from topological operation combinations. Then, the hierarchical reinforcement learning agent outputs topological actions in the unmasked combinations.

[0012] S5. Execute topology actions to update the material density field within the designable region, obtain the updated structural response through a finite element solver or a surrogate model trained with finite element samples; calculate the reward value based on the worst-case value in the structural response and the topology change in adjacent iterations, and use the reward value to update the hierarchical reinforcement learning agent until the preset convergence condition is met.

[0013] Preferably, in step S1, the outer boundary of the polygon is determined by multiple cross-sectional control rings arranged along the axial direction of the slide block, and each cross-sectional control ring is composed of no less than six ordered vertices; the outer wall of the slide block is formed by the lofting surface between the corresponding vertices; the manufacturing parameters include at least the casting draft direction, draft angle range, minimum fillet radius, closed cavity restriction, tool diameter and tool entry direction.

[0014] Preferably, in step S2, the multiple analysis conditions include static cutting conditions at the upper stroke position of the slide, static cutting conditions at the middle stroke position of the slide, static cutting conditions at the lower stroke position of the slide, rapid feed braking conditions, and temperature gradient conditions; after normalizing the tool center point displacement and structural compliance under each analysis condition, the worst structural compliance and the maximum tool center point displacement are formed by the maximum value or the smoothed maximum value.

[0015] Preferably, in step S3, the structural diagram uses finite element units or super-units formed by the aggregation of adjacent finite element units as nodes, and shared surfaces, shared edges, or adjacency relationships within a preset distance range as edges. Node features include principal stress direction, strain energy density, local thickness, load path identifier, and manufacturing direction identifier. Edge features include center distance between adjacent nodes, material density difference, and stress direction angle. The hierarchical reinforcement learning agent uses a graph neural network to encode the structural diagram.

[0016] The structural diagram and the data in each finite element include: material density, stress, strain energy, topological sensitivity, distance to the outer boundary of the polygon, distance to the undesignable region, and the global response of each analysis condition as the state.

[0017] Preferably, in step S4, the load path connectivity constraint is determined by establishing a set of key nodes between undesignable areas and determining whether the material node sub-graph remains connected; when the material cutting action causes the material node sub-graph between any guide rail connection area and the spindle mounting area to break, form a connection neck less than the minimum rib width, or make the local outer wall thickness less than the minimum wall thickness, the corresponding material cutting action is written into the action mask.

[0018] Preferably, in step S5, the structural response includes: mass, structural compliance of each analysis condition, tool center point displacement, first-order natural frequency, and constraint violation; the most unfavorable condition value in the structural response includes: the worst structural compliance and the maximum tool center point displacement in each analysis condition.

[0019] The present invention also includes: when the prediction uncertainty of the surrogate model reaches the verification threshold, the candidate topology enters the preset high reward interval or reaches the preset verification period, calling the finite element solver to verify the candidate topology, and using the verification results to correct the surrogate model and reward value;

[0020] After the convergence condition is met, the material density field is sequentially subjected to threshold binarization, isolated connected domain processing, polygon boundary fitting, and stiffener geometric reconstruction. The reconstructed ram model is then subjected to full-condition finite element verification, and the output is a polygonal gantry ram optimization design model that satisfies the upper limit of mass, the lower limit of stiffness, the lower limit of natural frequency, and manufacturing constraints.

[0021] Preferably, the surrogate model includes a graph neural network surrogate model for predicting the structural response under multiple operating conditions and an integrated uncertainty estimation unit for outputting the prediction variance; when the prediction variance is greater than the verification threshold, the positive reward is stopped from being issued according to the surrogate model, the current candidate topology is submitted to the finite element solver, and the structural response obtained by the finite element verification, together with the current state and topology action, is written into the priority experience replay pool.

[0022] Preferably, the polygon boundary fitting and stiffener geometry reconstruction includes: extracting the skeleton and isodense boundaries of the binarized material domain; converting the skeleton branches intersecting the outer wall of the polygon into stiffeners with preset thickness and fillet radius; merging isolated material domains into the nearest main load path that meets the threshold of the angle between the principal stress directions, or deleting the isolated material domains if connectivity is still not met after merging; re-meshing the reconstructed model, and reverting to the material density field before reconstruction to continue iteration if the full-condition verification fails.

[0023] Compared with the prior art, the beneficial technical effects of the present invention are as follows:

[0024] This invention establishes a parametric design domain defined by the outer boundary of a polygon, and sets the guide rail connection area, spindle mounting area, drive connection area, and sealing surface as undesignable areas, while setting the remaining areas as designable areas. This ensures that the optimization process only adjusts the material distribution within the designable areas, while the undesignable areas always retain the material, thereby guaranteeing the structural integrity of the ram mounting interface and sealing surface.

[0025] This invention generates multiple analysis conditions based on multiple discrete positions of the ram in the stroke direction and the corresponding cutting force, gravity, inertial force, guide rail constraint, and thermal load at each discrete position. Then, it normalizes the tool center point displacement and structural compliance under each analysis condition and uses the maximum value or smoothed maximum value to form the worst structural compliance and the maximum tool center point displacement. This allows the optimization target to cover all conditions within the entire stroke range of the ram, avoiding the problem that the optimization results are only applicable to local stroke positions and cannot meet the performance requirements of other stroke positions.

[0026] This invention generates an action mask based on at least four of the following constraints: minimum wall thickness, minimum rib width, load path connectivity, polygonal outer wall continuity, rib continuity, tool accessibility, and symmetry. The action mask is used to shield target regions and topological operation combinations that do not meet manufacturing or structural constraints, allowing the agent to search only within a manufacturable and structurally reasonable action space. This avoids unmanufacturable intermediate solutions that are too thin, have insufficient rib width, broken load paths, discontinuous outer walls or ribs, are inaccessible to the tool, or disrupt symmetry during the optimization process.

[0027] This invention calls the finite element solver to verify the candidate topology when the prediction uncertainty of the surrogate model reaches the verification threshold, the candidate topology enters the preset high reward interval, or the preset verification period is reached. The verification results are then used to correct the surrogate model and reward value. This ensures that the high-precision finite element solution is triggered only when the uncertainty of the surrogate model is high, the candidate solution has high value, or a fixed period is reached. This reduces the number of calls to the high-precision solution while ensuring optimization accuracy, thus lowering the computational cost.

[0028] This invention performs threshold binarization, isolated connected domain processing, polygon boundary fitting, and stiffener geometry reconstruction on the material density field after the convergence condition is met. The reconstructed ram model is then subjected to full-condition finite element verification. If the verification fails, the model is rolled back to the material density field before reconstruction and iterated again. This ensures that the final output ram model is a solid structure that can be directly used for manufacturing. Furthermore, the performance deviation after reconstruction is fed back to the iteration process through the rollback mechanism, thus ensuring the performance consistency between the topology optimization results, the reconstructed solid model, and the verification results. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the overall process of an optimization design method for polygonal gantry rams based on structural topology optimization;

[0030] Figure 2 This is a schematic diagram of the polygonal ram design domain, undesignable region, and structural diagram mapping of a polygonal ram optimization design method based on structural topology optimization.

[0031] Figure 3 This is a schematic diagram of a reinforcement learning closed loop with action mask and multi-fidelity verification for a polygonal gantry ram optimization design method based on structural topology optimization. Detailed Implementation

[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] Example 1

[0034] Please refer to Figure 1 Design domain and multi-condition model construction. Please refer to... Figure 2 This process involves obtaining the outer contour, guide rail connection, spindle assembly installation, drive connection, stroke, material, and manufacturing parameters of the polygonal gantry slide. The 3D baseline model of the slide is then read, and the outer contour perpendicular to the slide axis is expressed as an ordered set of vertices. ,in This refers to the control loop number of the cross section. Not less than 6. Loft the corresponding vertices to form the polygonal outer wall. In the parametric design domain, mark the area around the bolt holes used to fix the guide rail pair, the spindle bearing housing and spindle box mounting area used to install the spindle assembly, the lead screw nut seat connection area used to install the drive assembly, and the preset sealing surface as undesignable areas; areas where internal cavities and ribs are allowed to form are marked as designable areas, and the initial material density is uniformly set to 1. Manufacturing parameters include at least the casting draft direction, draft angle range, minimum fillet radius, closed cavity limit, tool diameter, and tool entry direction.

[0035] The upper, middle, and lower stroke positions are selected based on the ram extension, and the main cutting force, feed direction force, gravity, and guideway constraints are combined for each position. A rapid feed braking condition is also established. A temperature difference condition between the upper and lower walls is established based on the thermal load on the ram, generating multiple analysis conditions. The cutting force is applied to the tool center point and transmitted to the ram through the spindle connection stiffness. The guideway constraints are expressed using spring elements or contact stiffness. All conditions use the same design variable mapping to ensure that changes in the material density of a certain element are synchronously reflected in all conditions. After normalizing the tool center point displacement and structural compliance under each analysis condition, the worst structural compliance and the maximum tool center point displacement are formed using the maximum value or smoothed maximum value.

[0036] Each finite element element (FElement) is treated as a graph node. To reduce the motion dimension, adjacent FElement Elements are aggregated into superelements based on spatial proximity and principal stress directions. The structure graph is constructed using shared surfaces, shared edges, or adjacency relationships within a preset distance range as edges. Node features include material density, equivalent stress, strain energy density, compliance sensitivity, local thickness, signed distance to the outer wall and undesignable region, load path identifier, and manufacturing direction identifier; node features also include principal stress directions, strain energy density, local thickness, load path identifier, and manufacturing direction identifier. Edge features include the center distance between adjacent nodes, material density difference, and stress direction angle. The global state includes the current mass ratio, compliance for each working condition, tool center point displacement, natural frequency, number of iterations, and remaining mass budget. The structure graph and the data in each FElement element include: material density, stress, strain energy, topological sensitivity, distance to the outer boundary of the polygon, distance to the undesignable region, and the global response for each analysis working condition.

[0037] Please refer to Figure 3The state of the reinforcement learning environment is constructed using the structure diagram and data from each finite element unit. A hierarchical reinforcement learning agent is constructed to sequentially determine the target region, topology operation type, and material density adjustment amount. The hierarchical reinforcement learning agent includes a graph encoder, a region policy head, an operation policy head, an amplitude policy head, and a value network. The hierarchical reinforcement learning agent uses a graph neural network to encode the structure diagram: the graph encoder outputs node embeddings and global embeddings; the region policy head first selects the target region from the unmasked supercells; the operation policy head outputs material reduction, material recovery, or material retention; and the amplitude policy head outputs discrete density step size or continuous density adjustment amount. During training, proximal policy optimization, soft actor-commentator, or other policy update algorithms capable of handling masked action spaces can be used.

[0038] Generate an action mask based on at least four of the following constraints: minimum wall thickness, minimum rib width, load path connectivity, polygonal outer wall continuity, rib plate continuity, machining tool accessibility, and symmetry.

[0039] For candidate material reduction actions, the action constraint module first performs a fast geometric judgment, and then verifies various constraints in sequence:

[0040] The minimum wall thickness constraint is detected by distance transformation. The distance field from each unit in the designable area to the boundary of the non-designable area and the outer wall of the polygon is calculated. When the predicted thickness after the reduction of any unit is less than the preset minimum wall thickness threshold, the action is determined to be a violation and written into the action mask.

[0041] The minimum stiffener width constraint is determined by thickness detection and connected component analysis. The central axis of material distribution in the designable area is extracted and the width of each section is calculated. When the width of any section is less than the preset minimum stiffener width threshold, the action is judged as a violation and written into the action mask.

[0042] The accessibility constraint of the machining tool is detected by tool sweep body or directional ray method. The tool sweep body is generated along the tool entry direction and intersected with the designable area. If the closed area after candidate reduction cannot accommodate the tool entry or there is a dead corner that the tool cannot reach, the action is judged as a violation action and written into the action mask.

[0043] The continuity constraint of the polygon outer wall is determined by detecting whether there are fractures or isolated regions on the outer wall surface caused by material reduction. If a candidate reduction action causes the connection between any two adjacent units on the outer wall surface to be cut off or to generate isolated wall fragments, the action is determined to be a violation action and written into the action mask.

[0044] The continuity constraint of the stiffener is determined by detecting the connectivity of the internal stiffener skeleton. If a candidate cutting action causes the main path of the stiffener to be broken or forms a free end that is only connected at one end and the length of the free end exceeds a preset threshold, the action is determined to be a violation action and written into the action mask.

[0045] Symmetry constraints are determined by symmetry node pairing detection. Symmetry node pairs are established with the geometric center of the ram section as the reference. If a candidate cutting action causes only one side of the material in any symmetry node pair to be cut while the other side is retained and the deviation exceeds the preset tolerance, the action is judged as a violation action and written into the action mask.

[0046] Subsequently, the critical paths between the guide rail connection area, spindle mounting area, and drive connection area are determined on the material node subgraph: load path connectivity constraints are determined by establishing a set of critical nodes between undesignable areas and judging whether the material node subgraph remains connected. Specifically, a critical cut point detection algorithm is used to identify cut points in the material node subgraph. If deleting a node results in a cut point and the material node subgraph between the guide rail connection area and the spindle mounting area is broken after deleting the node, i.e., there is no alternative path, then the action is determined to be a violation and written into the action mask.

[0047] If the material reduction action creates a connecting neck that is smaller than the minimum rib width, it is determined using the minimum rib width constraint detection method described above; if it causes the local outer wall thickness to be smaller than the minimum wall thickness, it is determined using the minimum wall thickness constraint detection method described above, and the action mask is also written into it. For the material restoration action, if the added material is not connected to the main body or crosses a clearly reserved cavity and assembly space, it is also masked.

[0048] An action mask can be represented as a binary vector of the same length as the action probability vector. After the policy network outputs an unnormalized score, it will... Actions with a score of 0 are assigned negative infinity, and normalized sampling is performed on the remaining actions. The hierarchical reinforcement learning agent outputs topological actions from the unmasked combinations. Thus, constrained actions do not enter the finite element solution and experience replay, avoiding the agent wasting training steps through ineffective actions that are heavily penalized but still frequently occur.

[0049] After each action is executed, the compliance, tool center point displacement, and first-order natural frequency for each working condition are predicted by a graph neural network surrogate model. The surrogate model is jointly trained by Latin hypercube sampling near the initial design, conventional topology iteration samples, and subsequent reinforcement learning candidate samples, and pre-training is completed before the reinforcement learning environment is built. Multiple independently initialized surrogate models constitute an ensemble predictor, whose output mean is used as the predicted response and output variance is used as the uncertainty. That is, the surrogate model includes a graph neural network surrogate model for predicting the structural response under multiple working conditions and an ensemble uncertainty estimation unit for outputting the predicted variance.

[0050] The topology action is executed to update the material density field within the designable region, and the updated structural response is obtained through a finite element solver or a surrogate model trained with finite element samples. The structural response includes: mass, structural compliance for each analysis case, tool center point displacement, first-order natural frequency, and constraint violation amount; the most unfavorable condition values ​​in the structural response include: the worst structural compliance and the maximum tool center point displacement among all analysis cases. A reward value is calculated based on the most unfavorable condition values ​​in the structural response and the topology changes in adjacent iterations. The reward function simultaneously considers the current mass ratio, worst-case compliance, maximum tool center point displacement, lower limit of natural frequency, and constraint penalty. To prevent the agent from gaining oscillatory gains by frequently adding and deleting material in the same region, a penalty for topology changes in adjacent iterations is also added. If the current candidate topology violates the hard connectivity constraint or the undesignable region preservation constraint, the current iteration is terminated directly with a termination penalty. The hierarchical reinforcement learning agent is updated using the reward value until a preset convergence condition is met. Each round begins with a density field that satisfies the undesignable region and initial connectivity, and ends when the quality reaches the target range, the reward changes less than the threshold in N consecutive checks, and all hard constraints are satisfied.

[0051] The reward value is calculated based on the worst-case values ​​in the structural response and the topology changes in adjacent iterations. The reward function adopts a dimensionless multi-objective weighted summation form, and each term is normalized to ensure comparability of different physical quantities.

[0052] The reward function is determined according to the following formula:

[0053]

[0054] in, For the current quality, For the initial mass, The mass ratio reflects the degree of lightweighting; The worst structural compliance in each analysis condition. The flexibility reference value is the structural flexibility of the initial design under the worst-case condition. Normalized compliance ratio;

[0055] This represents the maximum displacement of the tool center point. The displacement reference value is the displacement of the tool center point under the worst-case condition in the initial design. This is the normalized displacement ratio;

[0056] It is the first-order natural frequency. This is the lower limit of the inherent frequency. As a penalty for insufficient frequency, only Below Effective immediately;

[0057] , , , These are non-negative weighting coefficients, corresponding to the weights of the mass, compliance, displacement, and frequency targets, respectively.

[0058] As a penalty for violating hard constraints, a positive constant is taken when the candidate topology violates the load path connectivity or undesignable region preservation constraint, through the formula. This value is deducted as a penalty;

[0059] To penalize manufacturing constraints, a positive constant is used when a candidate topology violates manufacturing constraints such as minimum wall thickness, minimum rib width, and tool accessibility. This is achieved through the formula... This value is deducted as a penalty;

[0060] The penalty for topological changes in adjacent iterations is obtained by calculating the sum of the absolute changes in the density values ​​of each cell between adjacent iterations. It is used to suppress the agent from gaining oscillating benefits by frequently adding or removing material in the same region. Its expression is:

[0061]

[0062] Alternatively, the L2 norm form can be used:

[0063]

[0064] in, For the first The unit in the first Density value at the next iteration The total number of finite element elements within the designable zone. This represents the topology change penalty weighting coefficient.

[0065] The rules for determining the weight coefficients are as follows: First, set the weight of each item to 1, calculate the value of each item based on the initial design, observe the magnitude contribution of each item, then adjust the weights so that the contribution magnitude of each objective item in the initial state is basically the same, and then fine-tune according to the optimization focus.

[0066] and The value of should be significantly greater than the product of the positive term weight and the corresponding indicator change to ensure that the agent prioritizes meeting the constraints. As an example, when the weighted sum of positive terms is in the range of 0.1 to 10, the termination penalty for violating hard constraints can be set to 100, and the penalty for violating constraints can be set to 50. weight Setting it to 0.1 ensures that the density field change penalty remains on a comparable order of magnitude to the positive term. The above values ​​can be adjusted according to the specific problem scale and do not constitute a limitation of the present invention.

[0067] When the prediction uncertainty of the surrogate model reaches the verification threshold, the candidate topology enters the preset high-reward range, or the preset verification period is reached, the finite element solver is invoked to verify the candidate topology, and the surrogate model and reward value are corrected using the verification results. When the prediction variance is greater than the verification threshold, the issuance of positive rewards based on the surrogate model is stopped, the current candidate topology is submitted to the finite element solver, and the structural response obtained from the finite element verification, along with the current state and topology actions, is written into the priority experience replay pool. If the difference between the finite element results and the surrogate prediction exceeds the tolerance, the system narrows the usable domain of the surrogate model, allowing only conservative step-size actions or direct invocation of the finite element solver outside this usable domain.

[0068] During the training phase, environmental parameters can be randomized across multiple sets of ram outer contours, load amplitudes, and material parameters, enabling strategy learning to grasp the general relationships between boundaries, load paths, performance feedback, and material adjustment actions. When deploying for a target model, some parameters of the graphical encoder are frozen, and the strategy head and value network of the target ram finite element sample are fine-tuned.

[0069] To ensure traceability, the system saves a state summary, action mask, policy probability, agent prediction, uncertainty, finite element verification results, reward decomposition, and model version for each action. If the pass rate on independent verification conditions decreases or new connectivity failures occur after a policy update, the release of new policies is stopped and the system reverts to the previous version.

[0070] After the convergence condition is met, the material density field is thresholded and binarized sequentially: threshold binarization is performed on the converged density field; isolated connected domain processing is performed: isolated regions that are not connected to any undesignable region and whose volume is less than the threshold are deleted, and regions that bear loads but form thin connecting necks are extended to the minimum stiffener width along the principal stress direction; polygon boundary fitting and stiffener geometry reconstruction are performed: the skeleton and isodense boundary of the binarized material domain are extracted, the main branches of the skeleton are fitted as the mid-surface of the stiffener, that is, the skeleton branches that intersect with the outer wall of the polygon are converted into stiffeners with a preset thickness and fillet radius, and the stiffener thickness is determined according to the local strain energy and manufacturing lower limit. A fillet transition is set at the intersection of the material domain and the outer wall of the polygon, and the outer wall itself remains continuous; isolated material domains are merged into the main load path that is closest to the main load path that meets the threshold of the angle between the principal stress directions, or the isolated material domains are deleted if the connectivity is still not met after merging.

[0071] A full-condition finite element verification is performed on the reconstructed ram model: the reconstructed entity is re-meshed into finite element meshes, and all training conditions and at least one verification condition not involved in the training are executed. If any of the reconstructed mass, compliance, tool center point displacement, or natural frequency does not meet the upper limit of mass, lower limit of stiffness, lower limit of natural frequency, and manufacturing constraints, the reconstruction error is mapped to the original density field. The priority of material recovery is increased at the relevant boundary nodes, and the iteration is reverted to the material density field before reconstruction, instead of directly modifying and terminating the optimization. The final output includes a 3D solid model, a condition response report, topology action trajectory, and verification results; that is, a polygonal gantry ram optimization design model that meets the upper limit of mass, lower limit of stiffness, lower limit of natural frequency, and manufacturing constraints.

[0072] In a non-limiting parameter configuration example, the polygonal cross-section can have eight vertices, the material density step size can be selected between 0.02 and 0.10, the minimum wall thickness and minimum rib width are input according to the casting or welding process, and the finite element verification cycle can be set to several reinforcement learning steps. The above values ​​are determined by the specific machine tool size, material, and manufacturing capability, and do not constitute a fixed scope of the present invention.

[0073] Example 2

[0074] This embodiment uses a ram of a certain type of gantry machining center as an example, providing a set of specific numerical configurations to further illustrate the implementation of the present invention. The ram has a stroke of 1500 mm, an octagonal polygonal cross-section, a circumscribed circle diameter of 600 mm, and is made of HT300 gray cast iron with an elastic modulus of 130 GPa, a Poisson's ratio of 0.25, and a density of 7300 kg / m³. The sealing surfaces of each joint are located at the joint surface between the ram and the spindle box, and at the joint surface between the ram and the drive component, and the material is kept non-removable during the optimization process.

[0075] Six section control loops are set along the ram axis, each consisting of eight ordered vertices. The parametric design domain is discretized using finite element methods, generating 1.5 million hexahedral elements. Adjacent finite element elements are aggregated into 50,000 superelements based on spatial proximity and a stress principal direction angle of less than 30 degrees.

[0076] The load conditions include three static cutting conditions: the upper stroke position, the middle stroke position, and the lower stroke position of the ram, with extensions of 0 mm, 750 mm, and 1500 mm respectively. The cutting forces are set as follows: main cutting force 12000 N, feed resistance 4800 N, and back force 3600 N. The rapid feed braking acceleration is set to 19.6 m / s². The temperature gradient condition is set to a temperature difference of 15 degrees Celsius between the upper and lower walls of the ram. These conditions serve as training conditions. In addition, a static cutting condition at the middle stroke position of the ram is set as a verification condition not included in the training.

[0077] The hierarchical reinforcement learning agent employs a proximal policy optimization algorithm with a learning rate of 3 x 10^-4, a discount factor of 0.99, and a GAE parameter of 0.95. The material density adjustment step size is 0.05, and the density value of each unit is limited to the range of 0.1 to 1.0. Manufacturing constraints are set as follows: minimum wall thickness of 25 mm, minimum rib width of 20 mm, symmetry constraints, load path connectivity constraints, and tool accessibility constraints. Specifically, the symmetry constraint requires that the material distribution of the octagonal cross-section be symmetrical about the geometric center; the load path connectivity constraint requires the establishment of a set of key nodes between undesignable regions, with the material node subgraph remaining connected; and the tool accessibility constraint sets the tool diameter to 20 mm. The action mask operates under these constraints, masking all candidate actions that do not satisfy the manufacturing or structural constraints.

[0078] The graph neural network surrogate model employs a 3-layer graph convolutional network with 128 hidden layers, integrating five independently initialized models to form an ensemble predictor. A validation threshold is set based on the prediction results of the worst-case structural compliance. The predicted values ​​of the worst-case compliance from each base model form a set, and the variance of this set is calculated as an uncertainty index. Finite element validation is triggered when the variance of the worst-case compliance predictions from the five independent base models for the same candidate topology exceeds 0.15. This 0.15 threshold is set on a dimensionless scale after the base model predictions are normalized to the initial design worst-case compliance value; that is, each base model prediction is first normalized by dividing by the initial design worst-case compliance value before calculating the variance. As an example, when the initial worst-case compliance is 0.087 mm / Newton, the high-reward interval is taken as the top 10% historically, and the validation cycle is set to trigger a finite element validation every 30 reinforcement learning steps. When the variance of the surrogate model prediction exceeds 0.15, stop issuing positive rewards based on the surrogate model and submit the current candidate topology to the finite element solver for accurate verification.

[0079] The convergence condition was set at a reward value change of less than 0.01 over 50 consecutive iterations, with all hard constraints satisfied. Convergence was achieved after 2000 reinforcement learning iterations. The optimized ram's total mass decreased from the initial 2850 kg to 2380 kg, a weight reduction of 16.5%. The worst-case structural compliance decreased from the initial 0.087 mm / N to 0.068 mm / N, a compliance reduction of 21.8%. The maximum tool center point displacement decreased from the initial 0.073 mm to 0.058 mm, a reduction of 20.5%. The first natural frequency increased from the initial 72 Hz to 86 Hz, an increase of 19.4%. All the above indicators meet the design requirements of a maximum mass of 2450 kg, a minimum stiffness of 0.070 mm / N, and a minimum natural frequency of 80 Hz.

[0080] The convergence density field was thresholded and binarized with a threshold of 0.5, and isolated connected domains with a volume less than 10,000 cubic millimeters were removed. The material domain skeleton was extracted, and the main branches of the skeleton were fitted to the mid-surface of a stiffener plate with a thickness of 18 to 25 millimeters, and an 8-millimeter fillet was added at the intersection with the outer wall. The reconstructed entity was re-meshed into a finite element mesh, generating 1.2 million elements, and a verification calculation was performed. The verification conditions included the aforementioned four training conditions and one verification condition not involved in the training. The verification condition was the middle stroke position of the ram, with an extension of 750 millimeters. The verification results are as follows: Under the four training conditions, the mass was 2405 kg, the worst-case compliance was 0.069 mm / Newton, the maximum tool center point displacement was 0.059 mm, and the first natural frequency was 85 Hz, all within the design specifications. Under the verification conditions, the worst-case compliance was 0.071 mm / Newton, the maximum tool center displacement was 0.061 mm, and the first-order natural frequency was 84 Hz, all within the design specifications. The verification conditions passed the review, indicating that the optimization results have good generalization performance within the training condition range. The final output is a 3D solid model of the octagonal cross-section slide block and a complete condition response report.

[0081] In summary, this invention, by designating the guide rail connection area, spindle mounting area, drive connection area, and sealing surface as undesignable areas, ensures that the optimization process only adjusts material distribution within the designable areas, thus guaranteeing the structural integrity of the ram mounting interface and sealing surface. By generating analytical working conditions corresponding to multiple discrete positions throughout the ram's full stroke, and constructing a reward based on the most unfavorable working condition value among these conditions, the optimization objective covers the entire ram stroke. Furthermore, by generating action masks based on at least four of the constraints—minimum wall thickness, minimum rib width, load path connectivity, polygonal outer wall continuity, rib plate continuity, tool accessibility, and symmetry—manufacturing and structural constraints are brought forward to the agent action selection stage. This avoids the generation of unmanufacturable intermediate solutions; by triggering the finite element solver to check and correct the reward value when the uncertainty of the surrogate model prediction reaches the verification threshold, the candidate topology enters the high reward interval, or the verification cycle is reached, the computational cost is reduced while ensuring optimization accuracy; by performing threshold binarization, isolated connected domain processing, polygon boundary fitting, and stiffener geometry reconstruction on the convergence density field, the reconstructed model is checked under all working conditions and backed to the density field before reconstruction for further iteration when it is unqualified, ensuring the performance consistency between the topology optimization results, the reconstructed entity model, and the verification results, and finally achieving unified optimization of lightweight, high stiffness, and manufacturability of the ram under multiple working conditions.

[0082] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for optimizing the design of polygonal gantry rams based on structural topology optimization, characterized in that, Includes the following steps: S1. Obtain the outer contour of the polygonal gantry slide, guide rail pair connection, spindle box or spindle assembly installation, drive connection, stroke, material, and manufacturing parameters, and establish a parametric design domain defined by the outer boundary of the polygon; in the parametric design domain, set the guide rail connection area, spindle installation area, drive connection area, and preset sealing surface as non-designable areas, and set the remaining areas where material can be removed as designable areas; S2. Based on the multiple discrete positions of the slide block in the stroke direction and the cutting force, gravity, inertial force, guide rail constraint and thermal load corresponding to each discrete position, multiple analysis conditions are generated. The parameterized design domain is discretized by finite element method to obtain the finite element mesh. The structure diagram is constructed according to the adjacency relationship between each finite element element. A full-condition finite element solution is performed for the initial density field to obtain the initial characteristics of the nodes and the global response. S3. Construct a reinforcement learning environment using the structure diagram and data from each finite element element; construct a hierarchical reinforcement learning agent to sequentially determine the target region, topology operation type, and material density adjustment amount. S4. Generate an action mask based on load path connectivity constraints, polygon outer wall continuity constraints, machining tool reachability constraints, and symmetry constraints. Generate an action mask based on at least one of minimum wall thickness, minimum rib width, and rib plate continuity constraints. Use the action mask to shield target regions that do not meet manufacturing or structural constraints from topological operation combinations. The hierarchical reinforcement learning agent outputs topological actions in the unmasked combinations. S5. Execute topology actions to update the material density field within the designable region, obtain the updated structural response through a finite element solver or a surrogate model trained with finite element samples; calculate the reward value based on the worst-case value in the structural response and the topology change in adjacent iterations, and use the reward value to update the hierarchical reinforcement learning agent until the preset convergence condition is met.

2. The polygonal gantry ram optimization design method based on structural topology optimization according to claim 1, characterized in that: In step S1, the outer boundary of the polygon is determined by multiple cross-sectional control rings arranged along the axial direction of the slide block, and each cross-sectional control ring is composed of no less than six ordered vertices; the outer wall of the slide block is formed by the lofting surface between the corresponding vertices; the manufacturing parameters include at least the casting draft direction, draft angle range, minimum fillet radius, closed cavity restriction, tool diameter and tool entry direction.

3. The polygonal gantry ram optimization design method based on structural topology optimization according to claim 1, characterized in that: In step S2, multiple analysis conditions include static cutting conditions at the upper stroke position of the slide, static cutting conditions at the middle stroke position of the slide, static cutting conditions at the lower stroke position of the slide, rapid feed braking conditions, and temperature gradient conditions. After normalizing the tool center point displacement and structural compliance under each analysis condition, the worst structural compliance and the maximum tool center point displacement are formed by the maximum value or the smoothed maximum value.

4. The polygonal gantry ram optimization design method based on structural topology optimization according to claim 1, characterized in that: In step S3, the structural diagram uses finite element units or super units formed by the aggregation of adjacent finite element units as nodes, and shared surfaces, shared edges or adjacency relationships within a preset distance range as edges. Node features include principal stress direction, strain energy density, local thickness, load path identifier and manufacturing direction identifier. Edge features include center distance between adjacent nodes, material density difference and stress direction angle. Hierarchical reinforcement learning agents utilize graph neural networks to encode structural graphs; The structural diagram and data in each finite element include: material density, stress, strain energy, topological sensitivity, distance to the outer boundary of the polygon, distance to the undesignable region, and global response for each analysis condition.

5. The polygonal gantry ram optimization design method based on structural topology optimization according to claim 1, characterized in that: In step S4, the load path connectivity constraint is determined by establishing a set of key nodes between undesignable areas and judging whether the material node sub-graph remains connected; when the material cutting action causes the material node sub-graph between any guide rail connection area and the spindle mounting area to break, form a connection neck with a width less than the minimum rib width, or make the local outer wall thickness less than the minimum wall thickness, the corresponding material cutting action is written into the action mask.

6. The polygonal gantry ram optimization design method based on structural topology optimization according to claim 1, characterized in that: In step S5, the structural response includes: mass, structural compliance of each analysis condition, tool center point displacement, first-order natural frequency, and constraint violation amount. The most unfavorable values ​​in the structural response include: the worst structural compliance and the maximum tool center point displacement in each analyzed condition.

7. The polygonal gantry ram optimization design method based on structural topology optimization according to claim 1, characterized in that: Also includes: When the prediction uncertainty of the surrogate model reaches the verification threshold, the candidate topology enters the preset high reward range, or the preset verification period is reached, the finite element solver is invoked to verify the candidate topology, and the verification results are used to correct the surrogate model and reward value. After the convergence condition is met, the material density field is sequentially subjected to threshold binarization, isolated connected domain processing, polygon boundary fitting, and stiffener geometric reconstruction. The reconstructed ram model is then subjected to full-condition finite element verification, and the output is a polygonal gantry ram optimization design model that satisfies the upper limit of mass, the lower limit of stiffness, the lower limit of natural frequency, and manufacturing constraints.

8. The polygonal gantry ram optimization design method based on structural topology optimization according to claim 7, characterized in that: The surrogate model includes a graph neural network surrogate model for predicting the structural response under multiple operating conditions and an integrated uncertainty estimation unit for outputting the predicted variance. When the predicted variance is greater than the verification threshold, the positive reward is stopped from being issued according to the surrogate model, the current candidate topology is submitted to the finite element solver, and the structural response obtained from the finite element verification, together with the current state and topology action, is written into the priority experience replay pool.

9. The polygonal gantry ram optimization design method based on structural topology optimization according to claim 7, characterized in that: The polygon boundary fitting and stiffener geometry reconstruction include: extracting the skeleton and isodense boundaries of the binarized material domain; converting skeleton branches intersecting the outer wall of the polygon into stiffeners with preset thickness and fillet radius; merging isolated material domains into the nearest main load path that meets the threshold of the angle between the principal stress directions, or deleting isolated material domains if connectivity is still not met after merging; re-meshing the reconstructed model, and reverting to the material density field before reconstruction to continue iteration if the full-condition verification fails.