Tool switching method for CNC tool magazine

Through three-dimensional laser scanning and intelligent decision-making technology, tool wear distribution is accurately quantified, dynamic monitoring and optimized switching of tool status is achieved, and the problems of waste and low efficiency of tool resources in traditional CNC machining are solved, and processing quality and efficiency are improved.

CN120439074AInactive Publication Date: 2025-08-08SHENZHEN YUELONG FIVE-AXIS PRECISION TECH CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510755351.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In traditional CNC machining, there are problems such as waste of tool resources, low processing efficiency, and unstable quality. This is mainly due to the lack of precise quantification of the unevenness of tool wear distribution and intelligent decision-making of coordinated relationships between tools, and the inability to actively adapt to changes in workpiece geometric characteristics.

Method used

The wear microheterogeneity index is obtained through three-dimensional laser scanning, and the workpiece geometric features are combined for correlation mapping, cutting boundary layer feature data is established, tool state evaluation and collaborative wear relationship calculation are performed, optimal switching timing decision sequence is generated, and automatic switching operations are performed through the robotic arm.

Benefits of technology

It realizes accurate quantification and dynamic monitoring of tool wear, improves the consistency of machining efficiency and quality, reduces tool switching time, and optimizes tool library resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120439074A_ABST
    Figure CN120439074A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of tool switching, and discloses a tool switching method of a CNC tool magazine. The method comprises the following steps: performing three-dimensional laser scanning on the surface of a cutter in a CNC machine tool to obtain a wear tiny heterogeneity index; performing association mapping on the geometric features of the workpiece and the tool wear mode to obtain feature data of a cutting boundary layer; executing cutter state evaluation calculation to obtain cutter health state indexes and inter-cutter collaborative wear relation data; switching evaluation function calculation is executed in the tool state space, and a first switching time sequence decision sequence is obtained; and the first switching time sequence decision sequence is input into a CNC tool magazine management system, and automatic tool switching operation is executed by controlling a tool replacement mechanical arm according to the calculated optimal intervention angle. The cutter switching time is greatly shortened, the machining efficiency is improved, and meanwhile the consistency and stability of the machining quality are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of tool switching, and in particular to a tool switching method for a CNC tool library. Background Art

[0002] The traditional CNC machining field has long been plagued by the technical limitation of "one shape, one fixture". That is, in order to process workpieces of different geometric shapes, corresponding dedicated fixtures are required. This not only significantly increases equipment investment and maintenance costs, but also seriously affects production efficiency and flexibility. At the same time, traditional tool management methods usually adopt fixed-cycle replacement or experience-based replacement methods. They are unable to accurately identify the complex relationship between tool wear distribution characteristics and workpiece geometry. This leads to serious waste of tool resources, short effective service life, and high replacement frequency, which reduces overall production efficiency. More critically, the traditional machining paradigm regards the workpiece as the main body and the tool as the matching object. The thinking mode ignores the possibility that the tool wear pattern can actively adapt to the geometric characteristics of the workpiece, which makes the optimization of process parameters reach a bottleneck.

[0003] Most existing tool condition monitoring technologies focus only on the overall degree of tool wear, lack the precise quantification of wear distribution unevenness, and are unable to capture the intrinsic connection between the subtle heterogeneity of the tool surface and machining accuracy. At the same time, CNC tool library management systems generally lack intelligent decision-making capabilities. Tool switching strategies are mainly based on simple usage time or processing quantity thresholds, and fail to establish a collaborative relationship between tools. This leads to low tool library resource utilization and difficulty in coping with machining quality fluctuations caused by changes in complex workpiece shapes. In addition, traditional machining methods fail to introduce boundary layer dynamics principles into the tool-workpiece interaction system, ignoring the dynamic changes in the cutting interface. This results in a lack of theoretical support for the timing and method of tool switching, making it impossible to maximize tool life while ensuring machining accuracy. Summary of the Invention

[0004] The main purpose of the present invention is to provide a tool switching method for a CNC tool library, which greatly shortens the tool switching time, improves the processing efficiency, and ensures the consistency and stability of the processing quality.

[0005] To achieve the above object, the present invention provides a tool switching method for a CNC tool library, comprising the following steps: Perform 3D laser scanning on the tool surface in CNC machine tools to obtain the wear micro-heterogeneity index; Correlation mapping is performed between workpiece geometric features and tool wear patterns based on the wear micro-heterogeneity index to obtain cutting boundary layer characteristic data; Performing tool status evaluation calculation based on the cutting boundary layer characteristic data to obtain tool health status index and inter-tool collaborative wear relationship data; Calculating a switching evaluation function in a tool state space according to the tool health index and the collaborative wear relationship data between the tools to obtain a first switching timing decision sequence; The first switching timing decision sequence is input into the CNC tool library management system, and the tool automatic switching operation is performed according to the calculated optimal intervention angle by controlling the tool changing robot arm.

[0006] In combination with the first aspect, in a first implementation of the first aspect of the present invention, performing three-dimensional laser scanning on the surface of a tool in a CNC machine tool to obtain a wear micro-heterogeneity index includes: Arranging a three-dimensional laser scanning sensor array in a matrix and setting a scanning frequency to obtain a tool surface detection system, and performing a Z-shaped scanning path division on the tool surface by the tool surface detection system to divide the tool surface in the CNC machine tool into a grid structure; Collecting a first position data matrix of each grid point in the grid structure in an initial state; After the tool completes a machining cycle and returns to a safe position, each grid point on the tool surface is scanned and collected again to obtain a second position data matrix; Performing difference calculation on the first position data matrix and the second position data matrix to obtain a surface wear distribution data matrix; The unevenness of the tool surface wear distribution is quantitatively calculated based on the surface wear distribution data matrix to obtain a wear micro-heterogeneity index, which is used to characterize the unevenness of the tool surface wear distribution.

[0007] In combination with the first aspect, in a second implementation of the first aspect of the present invention, the associating mapping of workpiece geometric features and tool wear patterns based on the wear micro-heterogeneity index to obtain cutting boundary layer feature data includes: Acquire workpiece surface point cloud data, and extract the number of edges, edge lengths, angles between edges, surface curvature, and material hardness distribution of the workpiece from the workpiece surface point cloud data to construct a workpiece geometric feature vector; Calculating the covariance relationship between the surface wear distribution data matrix and the workpiece geometric feature vector to obtain a wear covariance matrix; The workpiece geometric feature vector and the wear micro-heterogeneity index are input into a four-layer fully connected neural network to predict the influence of the workpiece geometric features on tool wear, and cutting boundary layer characteristic data describing the dynamic change law of the contact interface between the tool and the workpiece are obtained.

[0008] In combination with the first aspect, in a third implementation of the first aspect of the present invention, performing a tool state evaluation calculation based on the cutting boundary layer characteristic data to obtain a tool health state index and inter-tool collaborative wear relationship data includes: The wear distribution function, wear micro-heterogeneity index, remaining life, machining accuracy reliability and optimal intervention angle of each tool in the CNC tool library are combined and analyzed to obtain the tool state vector; Performing a health assessment calculation on each tool in the CNC tool library based on the tool state vector and the wear covariance matrix to obtain a tool health status index; Inputting the cutting boundary layer characteristic data into the wear gradient field dynamic equilibrium model for numerical solution to obtain wear evolution data; Based on the wear evolution data, a correlation analysis is performed on the wear patterns of different tools in the CNC tool library to obtain collaborative wear relationship data between the tools.

[0009] In combination with the first aspect, in a fourth implementation of the first aspect of the present invention, performing a correlation analysis on the wear patterns of different tools in the CNC tool library based on the wear evolution data to obtain collaborative wear relationship data between the tools includes: Extracting the wear gradient field distribution of each tool in the CNC tool library from the wear evolution data, and constructing a wear gradient vector based on the wear gradient field distribution; Integrating the spatial distribution of the wear gradient vector to construct a tool cooperative wear function, and using the tool cooperative wear function to calculate between any two tools in the CNC tool library to obtain a synergy index matrix; All tools in the CNC tool library are grouped and clustered based on the synergy index matrix to obtain a tool combination set, and the tool combination set is associated and mapped with the workpiece geometric features to obtain collaborative wear relationship data between tools.

[0010] In combination with the first aspect, in a fifth implementation of the first aspect of the present invention, performing a switching evaluation function calculation in a tool state space based on the tool health status index and the inter-tool collaborative wear relationship data to obtain a first switching timing decision sequence includes: Constructing the tool state space based on tool type parameters, workpiece geometry parameters, tool current wear distribution, wear microheterogeneity index and time parameters; Constructing a switching evaluation function including a machining quality prediction value, a current wear degree, a switching cost, and a slight heterogeneity index deviation based on the tool health index and the collaborative wear relationship data between the tools; Constructing a tool switching network for all tool nodes and switching edges in a CNC tool library according to the tool state space and the switching evaluation function, and solving the tool switching network to obtain an optimal switching tool combination; A first switching timing decision sequence is constructed according to the optimal switching tool combination and the preset switching condition triggering time point.

[0011] In combination with the first aspect, in a sixth implementation of the first aspect of the present invention, constructing a tool switching network for all tool nodes and switching edges in a CNC tool library according to the tool state space and the switching evaluation function, and solving the tool switching network to obtain an optimal switching tool combination includes: All tools in the CNC tool library are converted into nodes, each tool is represented as a node containing a tool state vector, and a tool node set is obtained; Calculating the switching cost between any two nodes of the tool node set based on the switching evaluation function to obtain a switching edge set representing the switching feasibility and cost; Combining the tool node set and the switching edge set to construct a tool switching network, wherein the weight values of the weighted edges in the tool switching network are calculated based on the switching evaluation function; Solving the shortest path for the tool switching network to obtain a shortest path result; The switching condition is judged based on the shortest path result, and the switching decision is triggered when the wear micro-heterogeneity index deviation exceeds a preset threshold, thereby obtaining the optimal switching tool combination.

[0012] In combination with the first aspect, in a seventh implementation of the first aspect of the present invention, inputting the first switching timing decision sequence into a CNC tool library management system and controlling a tool changing robot arm to perform an automatic tool switching operation according to a calculated optimal intervention angle includes: Digitally model the tool location information, tool status, and robotic arm motion range in the CNC tool library to obtain a digital twin model of the tool library that includes tool state vectors, tool location 3D coordinates, occupancy status, and accessibility information. Inputting the first switching timing decision sequence into the CNC tool library management system, and optimizing the tool position allocation in combination with the tool library digital twin model to obtain an optimized tool position layout solution; Calculate the optimal exit point of the current tool and the optimal entry point of the next tool and the optimized switching trajectory coefficient according to the tool position optimization layout plan and the current machining state, and obtain the tool switching trajectory parameters; Based on the tool switching trajectory parameters, the CNC machine tool is controlled to enter a safe state and the current tool is retracted to a safe position. Subsequently, a switching instruction including the target tool number and the tool magazine position is sent to the tool magazine management system, and the tool changing robot arm is controlled to perform the current tool recovery and target tool loading operations according to the optimized path; The optimal intervention angle of the target tool is calculated based on the relationship between the tool wear distribution and the stress distribution on the workpiece surface, and the target tool is controlled to enter the workpiece according to the optimal intervention angle and optimized path. At the same time, the next tool to be used is predictively prepared during the execution of the current machining task, reducing the subsequent switching waiting time.

[0013] In combination with the first aspect, in an eighth implementation of the first aspect of the present invention, the tool switching method of the CNC tool magazine further includes: Real-time collection of multi-dimensional evaluation indicator data sets including machining accuracy, surface roughness, tool life extension rate, energy efficiency, switching time, noise level, vibration amplitude and cost-effectiveness; Constructing a switching strategy evaluation function based on the multidimensional evaluation index data set, and performing a multi-objective optimization solution according to the switching strategy evaluation function and a preset constraint threshold to obtain a strategy optimization objective function; Based on the strategy optimization objective function, the tool switching problem is modeled as a tool switching decision model including a state space of workpiece state, tool state and machining stage and an action space of optional tool switching decisions; Using a deep Q network to perform strategy optimization training on the tool switching decision model to obtain an optimized tool switching strategy; Based on the optimized tool switching strategy, the workpiece shape and wear covariance matrix is updated and the balance evaluation index of all tool wear in the CNC tool library is calculated to generate a second switching timing decision sequence.

[0014] In summary, the technical solution provided by the present invention uses a tool surface wear distribution detection system established through three-dimensional laser scanning technology, which can accurately capture the subtle heterogeneous features of the tool surface, provide a high-precision data basis for tool health status assessment, and achieve accurate quantification of tool wear. Based on the correlation mapping mechanism between workpiece geometric features and tool wear patterns, the workpiece-tool wear covariance matrix and cutting boundary layer characteristic data are established, breaking through the limitations of the traditional "one shape, one fixture" system, so that a single universal fixture can adapt to the processing needs of workpieces of various shapes. A dual evaluation system of tool health status index and collaborative wear relationship data between tools is adopted to achieve comprehensive dynamic monitoring of the status of all tools in the CNC tool library, providing a multi-dimensional basis for optimal switching decisions and significantly extending the service life of the tool. By executing the switching evaluation function calculation in the five-dimensional tool state space, the optimal tool switching timing decision sequence is generated, the distributed balance of tool wear is achieved, and the tool wear pattern actively adapts to the workpiece geometric features, fundamentally eliminating the need for multiple special fixtures. The tool-changing robot automatically switches tools according to the calculated optimal intervention angle. Combined with a predictive tool preparation mechanism, this significantly reduces tool-changing time, improves machining efficiency, and ensures consistent and stable machining quality. A tool-changing strategy optimized through deep reinforcement learning, combined with a wear balance assessment index, achieves globally optimized allocation of tool library resources. This allows the system to continuously improve during operation, enhancing the overall intelligence and adaptability of the machining system. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 1 is a schematic diagram of the steps of a tool switching method for a CNC tool library in one embodiment of the present invention.

[0016] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0018] Reference Figure 1 , this embodiment provides a tool switching method for a CNC tool library, comprising the following steps: S1, three-dimensional laser scanning of the tool surface in the CNC machine tool to obtain the wear micro-heterogeneity index; Specifically, a tool surface inspection system was established, built around a 3D laser scanning sensor array. The sensor array is spatially arranged in a matrix configuration. By rationally placing the sensor array above the tool change waiting area or machining area of a CNC machine tool, each sensor can cover multiple directions and angles of the tool surface, enabling full-surface, no-blind-angle detection while maintaining microscopic resolution. Furthermore, the sensor array is configured with a suitable scanning frequency that balances temporal resolution and spatial reconstruction accuracy without affecting the machine cycle time. To achieve systematic data acquisition, the tool surface inspection system divides the scanning path into a zigzag grid, forming an evenly spaced sampling grid structure in space. This evenly divides the tool surface into multiple grid cells, each corresponding to a scanning measurement point. The 3D laser scanning system is activated when the tool is in its initial, unprocessed state. The spatial coordinate information for each grid point in the grid structure is collected, resulting in a first position data matrix. This matrix records the geometric data of each surface cell of the tool in its ideal state in the form of a 3D point cloud. After completing a complete machining task, when the tool returns to the safe retraction position, the system automatically triggers a second round of laser scanning, re-sampling each point in the same grid structure and generating a second position data matrix. Since the scanning path, sampling spacing and posture consistency have been controlled in the Z-shaped path planning stage, the two sets of data have a spatial mapping relationship, thereby supporting subsequent point-to-point difference analysis. Point-by-point difference calculations are performed on the first position data matrix and the second position data matrix, and the geometric displacement of each grid point in the three-dimensional spatial direction (x, y, z) is calculated respectively, and the results are combined to generate a surface wear distribution data matrix. This matrix reflects the spatial distribution characteristics of material removed from the tool surface under actual machining action, especially in the cutting edge, corner area or coating wear zone, which shows obvious non-uniformity. In order to quantify this heterogeneity, a multidimensional statistical model was established based on the wear distribution data matrix. The spatial gradient changes, local standard deviations, slope change trends and heteroscedasticity coefficients of the wear values were comprehensively analyzed. A spatial deviation function on a microscale was constructed. The distribution deviation between the local areas with severe wear and the overall smooth areas was integrated in the form of weighted integration, thereby obtaining the key indicator for characterizing the heterogeneity of wear distribution, namely the wear microheterogeneity index.

[0019] S2, based on the wear micro-heterogeneity index, the geometric characteristics of the workpiece and the tool wear pattern are correlated and mapped to obtain the cutting boundary layer characteristic data; Specifically, surface point cloud data is acquired during the early stages of workpiece machining. This data is then reconstructed in three dimensions using a high-precision laser scanning system after the workpiece is clamped in place. Surface fitting and edge extraction algorithms are then used to extract key workpiece geometric properties. During data processing, the point cloud reconstruction analyzes the topological structure of the workpiece boundary, extracting information about the number of edges, edge lengths, and angles between them. The average curvature and curvature gradient distribution of each surface region are calculated based on the rate of change of the local normal direction at high-density sampling points. Combined with known workpiece material types in the material database, a set of multidimensional and comprehensive workpiece geometric feature vectors is generated using a hardness-surface reflection model inversion or direct input of material hardness distribution values. The tool surface wear distribution matrix, obtained in the previous stage through 3D laser scanning, is then used. This matrix represents the spatial differences between multiple grid cells on the tool surface at two moments in time, reflecting the spatial location and intensity of wear. The covariance relationship between this wear distribution data and the aforementioned workpiece geometric feature vectors is calculated to capture the statistical dependencies between specific geometric forms or material distributions and specific wear patterns. Specifically, a joint distribution covariance matrix is constructed, where the rows represent workpiece geometric characteristic variables (such as edge length and curvature) and the columns represent the intensity characteristics of wear data on a spatial grid. This covariance matrix quantifies the influence of various workpiece geometric characteristics on the probability and intensity of wear in different areas of the tool surface. This allows the dominant role of machining-sensitive areas, such as tool corners, edge junctions, high curvature regions, or hardness drop zones, in the wear-inducing mechanism to be identified. To model and predict complex nonlinear influence relationships, the workpiece geometric characteristic vectors and the calculated wear microheterogeneity index are fed into a four-layer fully connected neural network architecture. This neural network uses a Reinforced Luminance (ReLU) activation function and incorporates normalization layers to suppress gradient dilation, enabling the model to perform nonlinear mapping on high-dimensional heterogeneous data. The network's goal is to learn the dynamic coupling between different geometric configurations and wear characteristics from historical samples, thereby predicting the dynamic evolution of the tool-workpiece contact interface under the current machining task conditions. The network output is the cutting boundary layer characteristic data that describes the local state of the contact interface. This data contains multiple key sub-items, such as the spatial distribution of the maximum shear stress area, the high heat flux concentration area, the starting point of unstable material peeling, and the friction coefficient sudden change zone, all of which play a decisive role in the local wear evolution of the tool.

[0020] S3, performing tool status evaluation calculation based on cutting boundary layer characteristic data to obtain tool health status index and inter-tool collaborative wear relationship data; Specifically, a state characterization system covering every tool in the CNC tool library is constructed. The core of this system is the establishment of a tool state vector containing multidimensional performance and wear information. This state vector integrates several key parameters, including a wear distribution function derived through laser scanning and surface modeling, which reflects the wear intensity differences and trends within spatial microregions; a wear microheterogeneity index derived from a wear variability quantification model, which characterizes the localized wear nonuniformity; an estimated remaining life value based on machining history, material cutting intensity, and tool load trend predictions, which quantifies the tool's subsequent machining capability; a machining accuracy reliability index calculated from a statistical model matching workpiece accuracy errors with process tolerances, which determines whether the tool can continue to operate within the current accuracy constraints; and an optimal intervention angle, calculated based on the robot arm posture planning model and the machine tool spindle-tool magazine kinematic coupling constraints. This parameter is used for posture optimization control in subsequent tool change path generation. These parameters are combined to form a multidimensional state vector. The tool state vector and the wear covariance matrix are input into the health assessment function module. Based on matrix multiplication and principal component feature extraction, this module evaluates the abnormal measurement of various performance indicators of the tool under the current machining load. It then constructs a normalized evaluation index system based on historical data statistics and fitting models, and outputs a normalized health status index, whose value lies in the range [0,1]. A value closer to 1 indicates excellent tool condition, while a value closer to 0 indicates risks of severe wear, boundary layer instability, and performance degradation. To understand the interaction trends of the wear evolution paths between different tools, a dynamic equilibrium model of the wear gradient field is initiated based on the cutting boundary layer characteristic data calculated by the neural network model. This model describes the wear gradient diffusion evolution process of the tool contact zone at different time points and spatial positions in partial differential form. By numerically solving the model, the wear evolution trajectory of each tool in a typical machining section is obtained, and these trajectories are cross-matched and correlated with the corresponding evolution trends of other tools. Based on the wear evolution data, the wear patterns between tools are matched and calculated through methods such as correlation coefficient matrix, dynamic time warping, and cosine similarity analysis. Tool combinations that show highly similar wear trends when processing different workpieces and undertaking different path tasks are identified, and the collaborative wear relationship data between tools is obtained. This indicates that these tools have similar or compensatory wear patterns when used in the same sequence or alternately, which is suitable for time-sharing multiplexing, hot standby or rotation scheduling, and can provide data support for tool change sequence optimization, wear load balancing strategy design and multi-tool collaborative cutting mode.

[0021] The wear gradient field distribution in the spatiotemporal domain is extracted from the wear evolution data for each tool. This gradient field, as a continuous spatial function, characterizes the variation of the wear rate in different regions of the tool surface within a specific timeframe. Its structure is a three-dimensional directional distribution, describing the main direction and intensity of wear at different spatial coordinates. To achieve a unified representation and subsequent comparative analysis, the gradient field for each tool is discretized, and a uniformly dimensional wear gradient vector is constructed based on its gradient value in the scanning grid. This vector preserves the main wear trend in spatial direction, local mutation behavior, and nonlinear characteristics of surface wear evolution. To measure the overall coupling between the wear behaviors of different tools, the wear gradient vectors are spatially integrated to construct a function system that reflects the overall wear response characteristics, namely the tool cooperative wear function. This function quantifies the spatial similarity of the wear patterns of two tools by comparing the directional overlap and variation of the wear gradients across the entire scanning area. The system repeats this calculation process for any two tools in the tool library, constructing a symmetric matrix containing the synergy indices of all tool pairs. Each element represents the degree of wear pattern matching between a pair of tools. Higher values indicate greater consistency in wear path, intensity, and direction, while lower values indicate independent or divergent wear behaviors. All tools in the CNC tool library are grouped and clustered based on the synergy matrix. The clustering algorithm, using methods such as spectral clustering, hierarchical clustering, or density clustering, aggregates and analyzes the synergy indices between each tool pair in the matrix to identify clusters of tools with similar wear evolution patterns. Each tool combination consists of a set of tools that exhibit synergistic wear behavior in actual machining. Each combination is mapped to the geometric features of the workpiece. This process extracts typical matching relationships by statistically analyzing which tool combinations have a high matching performance between different workpiece types and historical tasks. For example, workpieces with high boundary density, complex curvature transitions, or inhomogeneous material structures are more likely to correspond to highly synergistic tool combinations because such combinations exhibit similar wear characteristics and high response stability when responding to multiple boundary changes or thermal load disturbances. By establishing a mapping relationship between tool combination sets and workpiece geometric features, the collaborative wear relationship data between tools is obtained.

[0022] S4, performing a switching evaluation function calculation in the tool state space according to the tool health index and the collaborative wear relationship data between the tools to obtain a first switching timing decision sequence; Specifically, a tool state space is constructed. This state space is based on a multi-source fusion data structure and covers five core information categories: tool type parameters, workpiece geometric parameters, current tool wear distribution, wear micro-heterogeneity index, and time evolution parameters. Among them, tool type parameters include geometric and performance indicators such as tool structure, blade material, and tool length and diameter ratio. Workpiece geometric parameters are quantitatively expressed through the number of edges, corners, curvature distribution, and processing area layering information extracted from point cloud data. The current tool wear distribution is determined by laser scanning and historical residual analysis to determine the wear center of gravity and intensity changes in spatial position. The wear micro-heterogeneity index measures the local differences of the tool surface at the microscale, and the time parameter reflects the tool's usage cycle and cumulative processing time since the last maintenance. The above information jointly constructs a high-dimensional, multi-feature linked tool state space, in which each tool exists as a node represented by a unique state vector. Based on this, a multi-factor-driven switching evaluation function was constructed based on the current health index of each tool and its coordinated wear relationship with other tools. This function integrates four key evaluation dimensions: machining quality prediction, current wear level, switching cost, and minor heterogeneity index deviation. The machining quality prediction is calculated based on the degree of compatibility between the tool's current state and the workpiece machining requirements. The current wear level reflects whether the tool is in the critical wear zone. The switching cost comprehensively considers practical factors such as the robot's tool change path length, clamping adjustment time, and thermal transition risk. The minor heterogeneity index deviation measures whether the tool wear distribution has asymmetric imbalances. This evaluation function establishes a comprehensive cost model for state transitions between different tools, which is used for subsequent switching path planning. A tool switching network is constructed in the tool state space, with all tools as nodes and switching paths as edges. The weight of each edge in the network is the tool change cost calculated by the switching evaluation function. By executing a solution algorithm on this network, the optimal switching path that can be traversed from the current machining tool while ensuring machining continuity, quality stability, and minimal tool change costs is dynamically found. The nodes covered by this path constitute the optimal switching tool combination. To ensure the synchronization of the switching process with the actual machining task, a first switching timing decision sequence based on time points or machining cycles is constructed based on the life curve, health status evolution trend, and predictive intervention window of each tool in the optimal combination, combined with preset trigger conditions such as machining error thresholds, tool temperature over-limit thresholds, or micro-seismic abnormal behavior identification results. This sequence clearly defines the target tool number, intervention order, execution time, and auxiliary action requirements for each switching operation.

[0023] All active tools in the CNC tool library are converted into nodes, treating each tool as a node with dynamic properties. The node's current state vector serves as the node's content. This state vector incorporates multiple indicators, including tool type parameters, wear distribution, health index, predicted remaining life, machining accuracy adaptability, thermal performance degradation trend, intervention angle rationality, and wear microheterogeneity index, reflecting the tool's capability boundary and structural stability within the current machining cycle. All node-based tools together form a tool node set, providing the basic building blocks for constructing the subsequent graph structure. An established switching evaluation function is used to quantify the state transition cost between any two tools. This evaluation function simultaneously considers multiple dimensions of switching cost, such as the degree of tool state incompatibility, the path bending required for intervention posture adjustment, the kinematic intervention value of the tool-changing robot, the risk of thermal equilibrium disruption, factors affecting workpiece surface continuity, and the magnitude of the reduction in machining quality prediction. Through multi-parameter normalization and dynamic weighting, a numerical value representing the switching cost between the two tools is output. Based on this cost data, the system constructs a set of switching edges. Each edge connects two tools and has a specific weight, describing the energy consumption, risk, and overall machining performance loss of that path during the tool switching process. By merging the tool node set with the switching edge set, a weighted tool switching network is constructed. This network is a dynamically evolving graph structure, where each node represents a tool and each edge represents a possible tool change path. The edge weights are based entirely on the results of the switching evaluation function. To extract the optimal switching path from this network, a shortest path algorithm from graph theory is used to perform a path search. This algorithm traverses the network through possible switching combinations to find the lowest-cost path from the current tool state to the task termination. Each hop in this path represents a tool change operation, and the sequence of nodes traversed by the path constitutes the optimal tool switching combination for the current machining task. During the solution process, the algorithm dynamically considers the time-varying node state weights and the asymmetric edge weights to ensure that the solved path has machining continuity, safety, and economic efficiency. Based on the shortest path result, the current switching conditions are judged, especially the changing trend of the wear micro-heterogeneity index is monitored in real time, and its real-time value is compared with the preset threshold. When the deviation amplitude of the index exceeds the upper threshold, it means that the micro-wear on the tool surface has shown signs of uneven expansion or even chipping. At this time, the system immediately triggers the switching decision and executes the intervention scheduling of the next tool according to the path planning results, thereby obtaining the optimal switching tool combination.

[0024] S5, inputting the first switching timing decision sequence into the CNC tool library management system, and controlling the tool changing robot arm to perform the automatic tool switching operation according to the calculated optimal intervention angle.

[0025] Specifically, the tool location information, tool status, and range of motion of the robot arm in the CNC tool library are digitally modeled. A comprehensive digital twin model of the tool library is constructed through high-precision parameter mapping and dynamic data interfaces. This model includes each tool's current health status vector, remaining life, and wear characteristics, as well as the three-dimensional coordinates of its location, occupancy status, and accessibility information related to the change path. A real-time synchronization update mechanism is established with the CNC master control system, allowing the entire tool library state to be fully reconstructed in digital space. The first switching timing decision sequence is input into the CNC tool library management system. This sequence clearly lists the switching order, execution time point, tool number, and priority level. Through fusion calculations with the tool library digital twin model, the compatibility between the current tool location distribution and the upcoming switching behavior is analyzed. Taking into account the robot's motion interference area, the minimum safe distance between tools, the accessibility of the channels between tool locations, and the tool change sequence priority strategy, an optimal tool location allocation layout is generated to ensure that subsequent tool changes have minimal path overlap and interference risk. On the basis of obtaining the optimized layout plan, according to the status judgment of the current processing task and the relationship between the tool positions, the optimal exit point of the currently used tool and the optimal entry point of the tool to be used are calculated. The optimal switching trajectory coefficient set is generated by combining the multi-segment interpolation function and the constraint conditions through the trajectory reconstruction module, and the tool switching trajectory parameters are formed. The parameters include the three-dimensional space path trajectory, angular velocity and acceleration boundaries, as well as the joint angle range and posture change curve during the tool change process. The system then inputs the trajectory parameters into the CNC machine tool main control module, putting the machine tool into a safe state, including feed pause, spindle speed reduction, coolant flow adjustment and other measures, and controlling the current tool to return to a safe position with minimal disturbance. At the same time, the target tool number, current tool position and target tool position information are packaged to generate a switching control instruction and sent to the tool magazine management system. The system dispatches the robot arm to perform the tool change action according to the path parameters, including the recovery of the current tool and the precise loading of the target tool. After the robot arm completes tool loading, the surface wear distribution of the target tool and the stress distribution of the current workpiece processing area are mapped and analyzed. Based on the main direction of the local stress field, the rate of change of the thermal gradient and the trend of the workpiece curvature change, the optimal intervention angle of the target tool is derived. This angle ensures that when the tool first contacts the workpiece, it will not cause instantaneous impact and can quickly and stably cut into the predetermined processing trajectory. The target tool is then controlled to slowly access the workpiece surface according to the angle and the established path, and the processing task is started while ensuring trajectory continuity and cutting stability. At the same time, in order to reduce the waiting time in the subsequent switching process, the next possible tool is prepared synchronously in the middle and late stages of the current processing task. By preloading the tool status, path buffering and posture calculation, a predictive scheduling mechanism is realized, thereby establishing a full-process CNC tool switching execution system with dynamic response, closed-loop structure and continuous optimization.

[0026] A set of high-frequency, wide-dimensional real-time monitoring modules is deployed to continuously collect multiple key indicators generated during the machining process and construct a comprehensive data set. This data set includes multi-dimensional performance data such as machining accuracy, surface roughness, tool life extension, energy efficiency, switching time, noise level, vibration amplitude, and the unit cost-effectiveness of tool use. By binding these evaluation indicators to tool switching events in real time, the system instantly records the performance impact of each switching action after completion and accumulates it into a dynamically evolving performance indicator library through a time window sliding statistical method. Based on this multi-dimensional evaluation indicator data set, a comprehensive switching strategy evaluation function is constructed. This function normalizes each indicator and introduces a weighting system to reflect the importance distribution of each indicator in different machining task scenarios. At the same time, multiple preset engineering constraint thresholds are introduced, such as maximum energy consumption tolerance, the allowable worst-case machining roughness range, the shortest safe switching interval, and the maximum continuous tool use time, among other hard boundary conditions. Based on this, the system performs a multi-objective optimization solution, aiming to find a strategy combination that satisfies process and system constraints while achieving a global optimal performance across all feasible tool-switching paths. This solution outputs a strategy optimization objective function, performs sensitivity analysis on key variables, and extracts the parameter dimensions that dominate the optimization behavior of the switching strategy. This optimization objective function is used to construct a state-action model within a reinforcement learning framework. Specifically, the tool-switching problem is modeled as a joint state space encompassing the workpiece state, tool state, and machining phase, with the optional tool-switching operations serving as the action space for policy execution. The workpiece state includes the geometric characteristics of the current machining area, the distribution of surface stress concentration areas, and thermal conductivity characteristics. The tool state encompasses the wear level, health index, heterogeneity distribution, and cooperative wear relationships. The machining phase identifies the current task progress, expected machining completion time, and whether the precision-sensitive area is active. Through this state-action space construction, a tool-switching decision model is defined for deep reinforcement learning training. A deep Q-network is then used to train the policy for optimization. During training, the system uses multi-dimensional indicator evaluation values as a reward function and dynamically adjusts the policy output weights. The optimal policy path is learned through repeated iterations. Based on the optimized tool switching strategy, the system integrates and updates the current workpiece's geometric change trends with tool wear dynamics, revising the workpiece shape model in real time and recalculating the wear covariance matrix between the workpiece area and the tool surface. This information is then used to determine the usage balance, remaining life dispersion, and potential co-load risks of each tool in the CNC tool library, generating a wear balance assessment index that reflects resource utilization efficiency. If the assessment results indicate that certain tools are experiencing excessive load or premature lifespan exhaustion, the system automatically generates a second switching timing decision sequence based on the current strategy model.

[0027] In one example, a 3D laser scan of the tool surface in a CNC machine tool was performed to obtain wear micro-heterogeneity indices, including: A three-dimensional laser scanning sensor array is arranged in a matrix and the scanning frequency is set to obtain a tool surface detection system. The tool surface in the CNC machine tool is divided into a grid structure by performing a Z-shaped scanning path on the tool surface through the tool surface detection system. Collecting the first position data matrix of each grid point in the grid structure in the initial state; After the tool completes a machining cycle and returns to a safe position, each grid point on the tool surface is scanned and collected again to obtain a second position data matrix; Performing difference calculation on the first position data matrix and the second position data matrix to obtain a surface wear distribution data matrix; The unevenness of tool surface wear distribution is quantitatively calculated based on the surface wear distribution data matrix to obtain the wear micro-heterogeneity index, which is used to characterize the unevenness of tool surface wear distribution.

[0028] In this example, a tool surface inspection system with high spatial resolution and high response speed is constructed. The core of this system lies in the precise arrangement and parameter configuration of a 3D laser scanning sensor array. To capture the required level of detail on the tool surface, the sensor array adopts an equidistant matrix layout. The horizontal and vertical density is calculated based on the maximum length and diameter of the tool. This ensures appropriate overlap between the sensor fields of view, enabling high-precision stitching and blind spot correction during the scanning process. After the sensor matrix is configured, its operating frequency is set based on the machining cycle, with the scanning frequency controlled between tens to hundreds of hertz to ensure complete data acquisition within the machining cycle intervals while meeting subsequent requirements for timing and accuracy of the scanned data. After the hardware layout and parameter configuration are completed, the tool surface inspection system performs scanning via a Z-shaped path. This path scans back and forth along the X and Y axes. A mechanical or optical platform controls the laser scanning module's movement within a fixed hierarchy, performing depth ranging at each scan point, thereby spatially dividing the tool surface into an equivalent grid structure. Each grid point corresponds to a spatial position sampling, and each scan cycle generates a frame of data. The three-dimensional point cloud segments composed of several points are combined to form a spatial grid model. This grid has a unified topology, facilitating subsequent data matching across different time points. Before the tool enters the machining task for the first time, the system performs an initial scan and acquires spatial coordinates for all points in the grid structure. These coordinates are combined with the sensor number in the scan order to generate a first position data matrix. This matrix represents the reference structure model of the ideal tool surface. The transformation between the scan time and the coordinate origin is also recorded to ensure that data collected at different times are uniformly mapped into the same spatial reference system. After the tool completes a full machining cycle and detects that the tool has returned to a safe position, the system automatically activates the detection program and scans each point in the grid structure again using the same path and parameters, generating a second position data matrix. This matrix is structurally identical to the first position data matrix, but incorporates surface topography changes caused by material removal, thermal deformation, or edge chipping during machining. After obtaining the two time-series matrices, the corresponding points are interpolated to obtain the positional offset of each grid point before and after machining. This allows the creation of a surface wear distribution data matrix. This matrix reflects the overall material loss trend of the tool while retaining wear anomalies within local microscopic regions, such as micro-chipping in the tool tip area, protruding thinning in the corner area, or irregular wear in the central transition zone. These are all captured in the matrix with high spatial resolution. Based on the surface wear distribution data matrix, the unevenness of the tool surface wear distribution is quantified. The degree of wear variation within each grid area of the matrix is analyzed by constructing statistical deviation models, local gradient change models, and spatial variance models.The matrix is divided into regions using a local sliding window method. The range, standard deviation, and coefficient of variation of the wear values in each small region are calculated to obtain the local wear fluctuation index. The consistency of the overall surface distribution is then calculated by comparing the indicators between the small regions. By establishing a normalized index based on the local fluctuation and the global average wear value, the degree of spatial distribution unevenness is obtained. On this basis, the definition of the wear micro-heterogeneity index is introduced to represent the wear non-uniformity characteristics of the entire tool surface at the microscale in the form of a unified index. The larger the index, the more irregular the tool surface wear distribution tends to be, and the presence of local extreme stress concentration areas or thermal shock weaknesses. The smaller the index, the more balanced the tool surface wear state tends to be, and it is suitable for continuing high-precision machining tasks.

[0029] In one example, the workpiece geometric features and tool wear patterns are correlated and mapped based on the wear microheterogeneity index to obtain cutting boundary layer feature data, including: Obtain workpiece surface point cloud data, and extract the number of edges, edge length, angle between edges, surface curvature and material hardness distribution of the workpiece from the workpiece surface point cloud data to construct the workpiece geometric feature vector; The covariance relationship between the surface wear distribution data matrix and the workpiece geometric characteristic vector is calculated to obtain the wear covariance matrix; The workpiece geometric feature vector and wear micro-heterogeneity index are input into a four-layer fully connected neural network to predict the influence of workpiece geometric characteristics on tool wear, and the cutting boundary layer characteristic data describing the dynamic change law of the contact interface between the tool and the workpiece are obtained.

[0030] In this example, a high-resolution 3D laser scanning system or a structured light scanning system scans the entire surface of a target workpiece. Through precise positioning and scanning trajectory control, the scan results are converted into a dense point cloud dataset. This point cloud dataset represents the relative position of each spatial point on the workpiece surface in 3D coordinates. Post-processing involves operations such as point cloud resampling, noise removal, boundary enhancement, and normal vector fitting to reconstruct a high-quality geometric model of the workpiece's outer contour. A boundary extraction algorithm then identifies significant edge changes in the workpiece's geometry. These change points are then clustered to obtain a complete boundary contour. The number of edges, the length of each edge segment, the angle between adjacent edges, and the density distribution of boundary changes are calculated based on the connectivity between boundary segments. These are then incorporated into the feature set as the workpiece's basic topological features. Surface curvature is also analyzed based on the rate of change of the point cloud normal direction. By calculating the angle between the normal vector of each point and its neighboring points and the spatial fitting residual, the Gaussian curvature, mean curvature, and principal curvature directions are derived to characterize the presence of sudden breaklines, smooth transitions, or multi-level surface connections on the workpiece surface. While extracting geometric features, spatial mapping of workpiece material properties is performed, particularly the spatial distribution of material hardness. To this end, local material response information is extracted from the grayscale features and energy distribution data in the point cloud, leveraging a structural property matching mechanism from a priori material libraries or combining laser-induced Brillouin scattering techniques, ultrasonic reflectometry, and microtexture inversion models. This information is then mapped into a hardness distribution matrix. All of this extracted information, including edge count, edge length, edge-angle relationships, and curvature variation, is uniformly encapsulated with the hardness spatial function to form a workpiece geometric feature vector with clear structural meaning and physical properties. This vector possesses a multi-dimensional, highly semantic, and continuous composite feature structure. The covariance relationship between the surface wear distribution data matrix obtained during tool inspection and the aforementioned workpiece geometric feature vector is calculated. This calculation is based on spatial correspondence. By mapping each local workpiece region to its corresponding tool contact point during machining and then statistically analyzing the correlation fluctuation trends between the two types of data, the influence of each geometric feature on wear intensity in different wear areas is calculated. For example, whether high-curvature areas generally cause increased local tool wear, or whether areas with short edges and sharp angles are concentrated, leading to an increased frequency of tool chipping, the system constructs the corresponding feature covariance structure through a large number of historical data samples, thereby forming a statistically significant wear covariance matrix. After completing the covariance relationship modeling, deep learning methods are introduced to establish a nonlinear mapping relationship between geometric attributes and tool wear evolution behavior. A four-layer fully connected neural network structure is used as the modeling body, and the workpiece geometric feature vector and the wear micro-heterogeneity index are used as joint inputs. After encoding, they are passed to the first hidden layer for feature conversion. After multiple layers of activation functions and weighted summation operations, the output layer generates a predicted value for the tool wear response trend.The network model's training data is derived from a large number of scanned samples of machined workpieces and tool usage records. Through a supervised learning mechanism, the network parameters are continuously optimized, enabling it to accurately estimate tool response trends under different workpiece structural forms and material combinations. After training, the model rapidly outputs characteristic data describing the cutting boundary layer formed during contact between the tool and the workpiece based on any input geometric feature vector and the current level of wear heterogeneity. These cutting boundary layer characteristic data include the spatial density of contact point distribution, the state of interfacial friction, the intensity of thermal shock conduction, and the spatial gradient of material removal trends. Furthermore, the model quantifies the failure risk level of the local area, the amplitude of machining vibration feedback, and the degree of boundary stress concentration.

[0031] In one example, a tool condition evaluation calculation is performed based on cutting boundary layer characteristic data to obtain a tool health condition index and inter-tool collaborative wear relationship data, including: The wear distribution function, wear micro-heterogeneity index, remaining life, machining accuracy reliability and optimal intervention angle of each tool in the CNC tool library are combined and analyzed to obtain the tool state vector; Based on the tool state vector and wear covariance matrix, the health evaluation calculation of each tool in the CNC tool library is performed to obtain the tool health index; The cutting boundary layer characteristic data is input into the wear gradient field dynamic equilibrium model for numerical solution to obtain the wear evolution data; Based on the wear evolution data, the wear patterns of different tools in the CNC tool library are correlated and analyzed to obtain the collaborative wear relationship data between tools.

[0032] In this example, a highly structured data model is constructed to comprehensively characterize the operating status and wear evolution behavior of each tool. In this process, the wear distribution function of each tool is obtained from real-time monitoring and scanning analysis. This function describes the degree of material loss and spatial gradient at each point on the tool surface in a gridded form. It is reduced to a density function form through three-dimensional discretization technology, and then the non-uniform wear distribution characteristics in the micro-region are quantified. At the same time, the wear micro-heterogeneity index is extracted. This index is calculated based on the spatial change rate and variance aggregation characteristics of the wear distribution function to reveal the intensity level of local wear concentration and surface morphology disturbance. Combined with the change trend of the tool surface in multi-cycle machining tasks, the remaining life of each tool is further estimated using multivariate fitting and fatigue degradation models. This estimate not only refers to the current wear rate and thermal load trend, but also introduces correction terms for the influence of path complexity and workpiece material properties on life, thereby improving the environmental adaptability of life prediction. Simultaneously, combined with quality inspection data from finished workpieces during machining, a machining accuracy reliability index corresponding to each tool is extracted. This index comprehensively assesses the tool's ability to maintain machining accuracy under its current state by accumulating geometric errors, dimensional deviations, and surface roughness distribution trends. This index is then normalized into a probabilistic value domain reflecting its ability to maintain accuracy. During switching and intervention control, the optimal intervention angle for each tool is calculated based on the contact relationship between the tool space model and the workpiece geometric features. This angle considers the impact of the force direction at the entry point, the heat source migration path, and the tool's tilt posture on contact stability, and is used to determine whether the tool is capable of smooth engagement in the current machining segment. The system combines these five key parameters into a uniformly encoded tool state vector, with each dimension corresponding to a tool operational attribute. A joint calculation is performed based on the tool state vector and the wear covariance matrix. A projection mapping function is constructed to project the state vector into the covariance feature space to measure the stability and deviation of each tool within this feature space. The operational health of each tool is comprehensively assessed based on factors such as the projected distribution uniformity, the number of outliers, and the error accumulation rate, forming a unified tool health index. This index is used to measure the feasibility and risk level of the tool's continued use. Higher values indicate more stable tool conditions, while lower values indicate potential problems such as unpredictable wear or precision degradation. After the health assessment is completed, the cutting boundary layer characteristic data obtained by neural network inference is input into the wear gradient field dynamic equilibrium model to simulate and solve the spatial and temporal evolution of tool wear during the machining process. The model constructs a multidimensional space synchronized with the actual machining environment, combining heat flux density, contact stress distribution, and material peeling path. The wear field is constrained and controlled by constructing a spatial gradient vector field and local diffusion coefficient. Boundary absorption conditions and stress feedback loops are set to achieve an orderly transfer of wear gradients between grid cells.The model uses a time-stepping solution method, iteratively calculating a continuous function of wear intensity as a function of time and position. Ultimately, it outputs wear evolution data for each tool during the machining cycle. This data includes wear rate changes, the distribution of abnormal accumulation points, wear transfer zone trajectories, and typical thermal wear extension paths, revealing the evolution patterns of various areas on the tool surface under different operating conditions. Based on this wear evolution data, a wear pattern comparison model between tools is constructed, and correlations are calculated for all tool pairs using a multi-index similarity metric. The system uses techniques such as dynamic time warping, normalized deviation integration, and spatial gradient directional consistency analysis to compare the wear trajectories and morphological changes of each tool, extracting collaborative wear relationship data.

[0033] In one example, wear evolution data was used to correlate the wear patterns of different tools in a CNC tool library, yielding inter-tool collaborative wear relationship data, including: Extract the wear gradient field distribution of each tool in the CNC tool library from the wear evolution data, and construct the wear gradient vector based on the wear gradient field distribution; The spatial distribution of the wear gradient vector is integrated to construct the tool cooperative wear function. The tool cooperative wear function is then used to calculate the synergy index matrix between any two tools in the CNC tool library. All tools in the CNC tool library are grouped and clustered based on the synergy index matrix to obtain a tool combination set. The tool combination set is then associated and mapped with the workpiece geometric features to obtain the collaborative wear relationship data between tools.

[0034] In this example, the spatial wear variation structure of each tool at different time steps is extracted from wear evolution data. This evolution data contains the local rate of material loss on the tool surface during machining, as well as the dynamic response trajectories of different areas of the tool surface due to thermal stress conduction, contact point transfer, and multi-stage stress superposition. This data is then mapped back to each fixed sampling cell in the machining coordinate system. For each grid cell on the tool surface, the material removal difference between adjacent cells is calculated. From this, the local gradient value at each point is constructed. A complete three-dimensional wear gradient field distribution is formed by meshing the entire surface. This distribution not only records the trend of wear amplitude but also reveals the physical characteristics of wear propagation in space, such as directionality, concentration, and dispersion. The wear gradient field is vectorized, and the directional, intensity, and position mapping information of each spatial point in the gradient field are combined and encapsulated into a unified data format to form the tool's wear gradient vector set. Each vector represents the primary diffusion direction and velocity of wear within a surface cell in the local coordinate system. The combination of all vectors forms a vector cluster representing the wear behavior structure of the tool. This vector cluster exhibits spatial consistency, temporal sequence characteristics, and dependency on adjacent structures. Based on the spatial distribution of wear gradient vectors, an integral operation is performed to construct a tool cooperative wear function that describes whether there is a synergistic pattern in the wear behavior evolution of two tools. This function construction not only considers the directional and intensity distribution similarity between the wear gradient vectors of the two tools within the same time window, but also compares their spatial structural distribution patterns. This integral fusion of multiple local spatial similarity data is used to form a full-surface behavioral consistency metric. To improve the stability and distinguishability of the metric, a weight adjustment mechanism is introduced during the integral process, giving higher weights to high-gradient concentrated areas, failure-sensitive areas, and areas with rapid boundary changes. This ensures that the final synergy value is both spatially meaningful and reflects the performance synergy trends in actual use. By comparing the cooperative wear function for all tools in the CNC tool library, a synergy index matrix is obtained. Each element in this matrix represents the degree of coupling between the two tools' wear behavior patterns. Higher values indicate greater consistency in their spatial evolution paths, gradient direction shifts, and wear intensity variations, implying a higher potential for alternating machining, parallel backup, or wear compensation in actual use. Based on this matrix, a clustering algorithm is used to analyze the tools in groups. Clustering methods include hierarchical agglomerative clustering, density-based spatial clustering, or spectral clustering based on distance functions. The specific method selected is automatically determined based on the symmetry, discreteness, and dimensional complexity of the synergy index matrix. The goal of clustering is to group together a group of tools with highly consistent wear behavior. Each group represents a combination of tools with clear synergistic trends in structural characteristics and wear evolution.After grouping and clustering, these tool combinations are mapped to the workpiece feature space to match appropriate tool combination strategies for tasks with different structural features. To achieve this, the workpiece's geometric feature vector is extracted based on point cloud processing, edge recognition, and curvature extraction techniques. This vector includes elements such as the number of edges, edge length, edge angle, curvature change rate, regional complexity index, and material property distribution. These elements correspond to the load distribution and thermal wear mechanisms in different tool processing response paths. A structural matching model is then used to pair the workpiece's geometric feature vector with typical wear trajectory data from existing tool combinations. Regression analysis and pattern matching are used to identify which tool combinations are most suitable for machining tasks of a specific geometric structure. In particular, tool combinations that demonstrate high wear stability and coordinated load capacity under these conditions are prioritized to improve machining accuracy and tool utilization efficiency. A stable mapping relationship is established between the tool combinations and their corresponding workpiece geometric features, resulting in data with a complete data structure and clear spatial relationships between tool coordinated wear relationships.

[0035] In one example, a switching evaluation function is calculated in a tool state space based on the tool health index and the collaborative wear relationship data between tools to obtain a first switching timing decision sequence, including: Constructing the tool state space based on tool type parameters, workpiece geometry parameters, tool current wear distribution, wear microheterogeneity index and time parameters; Based on the tool health index and the collaborative wear relationship data between tools, a switching evaluation function is constructed, which includes the machining quality prediction value, the current wear degree, the switching cost and the small heterogeneity index deviation. According to the tool state space and the switching evaluation function, a tool switching network is constructed for all tool nodes and switching edges in the CNC tool library. The tool switching network is then solved to obtain the optimal switching tool combination. A first switching timing decision sequence is constructed according to the optimal switching tool combination and the preset switching condition triggering time point.

[0036] In this example, the entire life cycle status of the tool is modeled, and on this basis, a state space with high-dimensional decision support capabilities is constructed. The construction of this state space relies on the integrated analysis of five key variables. The first is the tool type parameter, which covers fixed attributes such as tool structure type, material composition, coating process, geometric dimensions, and cooling method. These parameters provide the upper limit of the tool's processing capability. The second is the workpiece geometry parameter, which is derived from point cloud scanning and CAD modeling analysis. It includes the number of workpiece edges, edge angles, edge lengths, local curvature, shape complexity coefficient, and thermal conductivity gradient. These parameters will determine the force state and material cutting load of the tool when processing different areas. The third is the current wear distribution of the tool. This parameter constructs the wear function matrix through 3D laser scanning and maps it to the tool surface coordinate system, reflecting the spatial gradient and position correlation of wear. The fourth is the wear micro-heterogeneity index. This index characterizes the degree of non-uniformity in the spatial distribution of micro-scale wear on the tool surface and serves as an early warning indicator of tool instability. The fifth is the time parameter, which represents the cumulative working time, total cutting length, or total spindle speed integral value since the tool was last replaced or maintained. It is used to measure the degree of fatigue accumulation and thermal degradation. After the above five types of information are fused and encoded, each tool is mapped to a point in the state space. The entire tool library is composed of a set of multiple state vectors, which constitutes a high-dimensional tool state space. This space has time-varying, structural and dynamic evolution capabilities, and can support state updates and strategy reconstruction over time. The tool health index and the collaborative wear relationship data between tools are introduced as the basic variables for switching decisions. Based on this, an evaluation function for evaluating tool switching quality is constructed. This function takes four core indicators as input dimensions. The first is the machining quality prediction value. By matching the current tool state with the machining area complexity mapping relationship model, the historical machining error statistics and precision residual model are used to regress and predict whether the tool can maintain the current workpiece machining quality requirements. The second is the current wear degree. The maximum value and spatial gradient of the wear distribution matrix are jointly extracted to quantify the relative position of the tool from the critical failure point. The third is the switching cost. This cost not only considers the shortest distance required in the tool robot path planning, but also considers system-level cost factors such as the robot arm angular acceleration constraint, fixture release response time, coolant temperature recovery curve, thermal stress balance hysteresis, and tool posture switching interference area. The fourth is the wear micro-heterogeneity index deviation, that is, the degree of deviation of the current wear heterogeneity index from the system average value. It is used to identify whether the tool has an unacceptable spatial mutation risk in the wear structure. The four indicators are integrated through a normalized weighted function to construct a switching evaluation function. The output value of this function is used as a measure of the switching cost between two tools and is the algebraic basis for subsequent path planning and switching sequence optimization.Based on the tool state space and a switching evaluation function, a tool switching network is constructed for all tool nodes and switching edges in the CNC tool library. This network uses tools as nodes and possible switching paths between any two tools as edges. Edge weights are generated by pairwise calculations of the node state vectors using the evaluation function. The entire network presents a weighted graph structure, where the edge set encompasses all possible tool change combinations and the node set covers all tools in the current tool library that can participate in machining. The cumulative cost of each path in the graph represents the combined impact of migrating from one state vector to another in a given machining task. To select the optimal path combination, a multi-source path search algorithm is used to solve this graph. The algorithm is based on heuristic search, reinforcement learning-guided graph search strategies, or a pruning mechanism combined with constraint satisfaction. The goal is to select a set of tool switching paths that optimizes the total switching cost, error accumulation, and tool change timing balance of the entire machining process while ensuring machining continuity, system resource scheduling, tool life balance, and tool change response time. The final solution outputs a set of optimal tool switching combinations. After obtaining the optimal tool combination, these tools are inserted into the dynamic scheduling timeline by combining the health status decline curve of each tool during use with the progress segmentation nodes of the processing task. According to the predicted value of the remaining life of the tool, the switching point of the processing task in space, and the spindle load and thermal fluctuation monitoring value, multiple sets of switching conditions are set. For example, when a tool is completed in a specific area, or before the heterogeneity index reaches the warning threshold, or near the wear gradient abrupt change point, or when the current processing accuracy confidence value is lower than the system minimum threshold, the tool change action is automatically triggered. Based on this logic, the system takes the optimal tool combination as the core and constructs the first switching timing decision sequence. The sequence records the tool number and execution order, and also includes the expected trigger time point, the minimum intervention error range, the compensation curve of the preheating stage before the tool change, and the redundant structure strategy of the tools used in each stage, so that the entire switching process forms a dynamic queue with time consistency, spatial continuity and structural coordination.

[0037] In one example, a tool switching network is constructed for all tool nodes and switching edges in a CNC tool library based on the tool state space and the switching evaluation function. The tool switching network is then solved to obtain the optimal switching tool combination, including: All tools in the CNC tool library are converted into nodes, each tool is represented as a node containing a tool state vector, and a tool node set is obtained; Based on the switching evaluation function, the switching cost between any two nodes of the tool node set is calculated to obtain the switching edge set that represents the switching feasibility and cost; The tool node set and the switching edge set are combined to construct a tool switching network. The weight values of the weighted edges in the tool switching network are calculated based on the switching evaluation function. Solve the shortest path of the tool switching network and obtain the shortest path result; The switching conditions are judged based on the shortest path results. When the deviation of the wear heterogeneity index exceeds the preset threshold, the switching decision is triggered to obtain the optimal switching tool combination.

[0038] In this example, data modeling is performed on all active tools in the current CNC tool library, abstracting each tool into an independent node with state characteristics and dynamic properties. This node is essentially a packaged structure containing the current tool state vector. This state vector consists of five dimensions: tool type parameters, machining geometry complexity parameters, current wear distribution function, wear microheterogeneity index, and accumulated time or machining cycle. Tool type parameters include basic configuration attributes such as tool structure, material grade, coating, tip shape, and cooling method. Machining geometry parameters primarily represent the machining characteristics of each area of the tool within the workpiece, such as curvature mutation, number of edges, contact area, and machining depth. The current wear distribution function, obtained through laser scanning and stress tracking technology, is a functional expression of the material removal morphology on the tool surface. The wear microheterogeneity index characterizes the local variability of this distribution function in the spatial dimension, the frequency of gradient mutations, and the degree of nonuniformity under area normalization. Time parameters record long-term indicators such as tool usage time, cumulative cutting volume, or spindle operation integral value. The combination of these dimensions constitutes a complete tool state characterization system. All the aforementioned tool nodes are organized into a unified tool node set, which represents the discrete distribution of all tools in the current tool resource pool in the state space. To construct a feasible path for tool switching behavior, the switching probability and switching cost between any two nodes in the tool node set are calculated based on an existing switching evaluation function. This switching evaluation function integrates four core variables: current wear level, machining quality prediction value, switching cost, and heterogeneity index deviation. The current wear level measures the distance between the tool's current state and its ideal state. The machining quality prediction value uses a regression model to calculate the tool's accuracy reliability trend for the current task. The switching cost includes factors such as the trajectory, time, energy consumption, and coordinated interference required for tool change by the robot arm. The heterogeneity deviation is used to determine whether the wear distribution approaches the instability threshold. These indices are normalized and weighted, resulting in a scalar indicator that serves as the comprehensive cost indicator for switching between two tools. The switching evaluation value is then used as the edge weight, and the tool node set and edge set are combined to form a weighted graph structure, namely, the tool switching network. In this network, each node corresponds to a tool, and each edge represents a feasible path for switching from one tool to another. The edge weight is the switching cost output by the evaluation function. The graph structure is an asymmetric weighted directed graph, and some edges may be removed due to process constraints, spatial interference, or insufficient lifespan, resulting in sparse and directional properties. After construction is complete, the shortest path solution is performed on this switching network using a graph search algorithm, starting with the currently used tool node and treating all candidate tools as target nodes.The solution process employs a Dijkstra algorithm, A* algorithm, or a priority path search method guided by reinforcement learning. By progressively traversing the edge set in the graph and accumulating the path costs, the system seeks the path with the lowest overall cost from the starting tool node to the optimal target tool node. The sequence of all intermediate nodes and the final node in this path represents the optimal tool switching combination for the current task. Once the system has determined the shortest path, it enters the real-time monitoring and judgment phase, specifically dynamically analyzing the micro-heterogeneity index of the currently used tool. The evolution of this index indicates whether localized areas of the tool surface have exhibited non-uniform degradation, sudden cracks, or chipping. The system analyzes the slope and mutation rate of this trend and compares it with a preset threshold. If the system detects that the index has deviated beyond the upper safety limit, indicating that the current wear distribution has begun to exhibit irreversible local structural imbalances, the switching decision mechanism is immediately triggered. After being triggered, the next tool specified in the path is called and the tool change process is started according to the shortest path structure obtained previously. At the same time, the node status in the tool library is updated, the tool lifecycle management record is adjusted, and the cost weight of the remaining path is rebuilt to complete the dynamic deployment of the optimal switching tool combination in this round.

[0039] In one example, a first switching timing decision sequence is input into a CNC tool library management system, and a tool changing robot is controlled to perform an automatic tool switching operation according to a calculated optimal intervention angle, including: Digitally model the tool location information, tool status, and robotic arm motion range in the CNC tool library to obtain a digital twin model of the tool library that includes tool state vectors, tool location 3D coordinates, occupancy status, and accessibility information. The first switching timing decision sequence is input into the CNC tool library management system, and the tool position allocation is optimized in combination with the tool library digital twin model to obtain the tool position optimization layout plan; According to the tool position optimization layout plan and the current machining status, the optimal exit point of the current tool and the optimal entry point of the next tool as well as the optimized switching trajectory coefficient are calculated to obtain the tool switching trajectory parameters; Based on the tool switching trajectory parameters, the CNC machine tool is controlled to enter a safe state and the current tool is retracted to a safe position. Subsequently, a switching instruction containing the target tool number and magazine position is sent to the tool magazine management system, which controls the tool changing robot arm to perform the current tool recovery and target tool loading operations according to the optimized path. The optimal intervention angle of the target tool is calculated based on the relationship between the tool wear distribution and the stress distribution on the workpiece surface, and the target tool is controlled to enter the workpiece according to the optimal intervention angle and optimized path. At the same time, the next tool to be used is predictively prepared during the execution of the current machining task, reducing the subsequent switching waiting time.

[0040] In this example, a digital twin model of the tool library, with high mapping consistency and dynamic feedback mechanisms, is established in digital space, using the physical tool library as a reference. Based on a three-dimensional data structure, this model models information about each tool location in the CNC tool library in a virtual environment. This includes the spatial coordinates of each tool location, whether the location is currently occupied, the angular range accessible to the changer arm, whether it is subject to interference conditions, the neighboring interaction coefficient, and the complete state vector for each tool at that location. This state vector comprises the tool's current wear distribution function, estimated remaining life, precision degradation index, thermal stability, structural strength, and heterogeneity index. It is also associated with the machining task partition, forming a triple binding relationship of structure, position, and function. Furthermore, the system models the range of motion of the tool changer arm, defining its rotational axis constraints, mobile arm span, end-effector degrees of freedom, speed limits, collision boundaries, and inertial offsets during execution. This allows for the dynamic encapsulation of the entire tool change space within the digital model, enabling the tool library digital twin to not only represent static structure but also analyze tool change motion accessibility and predict process interference. After the digital twin model is constructed, the first switching timing decision sequence is input into the CNC tool library management system. This sequence contains information such as the tool number of each tool to be replaced and called, the expected usage time node, the corresponding position in the processing area, the failure warning window, and the switching priority. By analyzing this sequence and deeply integrating it with the current tool library digital twin model, the matching degree between the current tool position occupancy and the feasible path of the robot arm is analyzed. Combined with the usage sequence of subsequent tools, a dynamic tool position allocation optimization model is constructed. This model optimizes the tool change path with the shortest tool change path, the shortest tool change time, the fewest path intersections, and the strongest tool change sequence consistency. Through enumeration, graph search, and intelligent search strategies, an optimized tool position layout solution is generated. The tool to be called is preferentially arranged in the tool position with the best current robot arm motion accessibility and the least path interference. The shortest recovery path and the optimal cache point in the reusable area are designed for the tool that is about to fail. Based on the generated tool position optimization layout plan, combined with the current machining status, including spindle speed, coolant flow rate, cutting load and the spatial contact status between the current tool and the workpiece, the optimal exit point of the current tool is calculated. This exit point should meet the principle of minimum mechanical impact in the cutting path and no damage to the machining stability due to premature tool withdrawal; at the same time, based on the spatial position of the tool position where the target tool is located, the entry path of the machining task, the reverse interference zone of the robot arm and the preheating guide area of the workpiece material, the optimal entry point of the next tool is calculated. This entry point must ensure that the thermal stress distribution is stable when the tool contacts the workpiece, the contact speed change rate is controllable and the tool tip load does not rise sharply; between the exit point and the entry point, the system plans a complete three-dimensional tool change trajectory, and introduces an optimized switching trajectory coefficient to represent the path smoothness, acceleration balance, energy consumption stability and tool change accuracy maintenance ability.This coefficient set and the path points constitute the final tool switching trajectory parameters, providing data support for the actual tool change action generation. Based on the above tool switching trajectory parameters, a state transition instruction is sent to the CNC main control unit to put the machine tool into safe mode. At this time, the spindle decelerates to a stable area, the cutting motion is paused, and the coolant pressure remains unchanged to ensure a stable temperature field. The system controls the current tool to slowly exit along the planned trajectory and move to a safe position. Thereafter, a tool change instruction containing key data such as the target tool number, the coordinates of the tool position, and the sequence of the robot arm path points is immediately sent to the tool magazine management system. The system controls the robot arm to move along the optimal path to perform recovery and loading operations. In this process, it ensures that there is no interference collision, the motion posture is stable, the trajectory error is controllable, and the matching accuracy of the tool gripping point and the tool holder does not exceed the design tolerance requirements. After loading, the system performs an engagement angle analysis based on the target tool's wear distribution data and the stress distribution field in the workpiece's current machining area. The optimal engagement posture is calculated using the tool-workpiece contact model. This posture ensures that the wear area avoids thermal shock zones or hard transition zones, while ensuring that the feed direction aligns with the material's chip removal path and the cutting direction is perpendicular to the principal stress axis. This ensures that no sharp corner stress accumulation or cutting force fluctuations occur when the tool enters the workpiece. The system then synchronizes this engagement angle with the path trajectory as input to precisely control tool engagement and resume spindle motion, achieving a seamless tool change transition. During the middle and later stages of the current task, the system preemptively enters the predictive preparation process, analyzing the remaining task structure and predicting the next tool to be used based on the machining stage, the rate of accuracy degradation, the range of machining load fluctuations, and the frequency of abnormal vibrations. Through pre-scanning, state loading, angle calculation, and path caching, the system completes the entire pre-tool change preparation process, reducing switching latency and thermal recovery losses, and achieving intelligent tool scheduling and dynamic execution control with high responsiveness, low interference, and strong continuity.

[0041] In one example, the tool switching method of the CNC tool magazine further includes: Real-time collection of multi-dimensional evaluation indicator data sets including machining accuracy, surface roughness, tool life extension rate, energy efficiency, switching time, noise level, vibration amplitude and cost-effectiveness; A switching strategy evaluation function is constructed based on a multi-dimensional evaluation index data set, and a multi-objective optimization solution is performed according to the switching strategy evaluation function and the preset constraint threshold to obtain the strategy optimization objective function; Based on the strategy optimization objective function, the tool switching problem is modeled as a tool switching decision model that includes the state space of workpiece state, tool state and machining stage and the action space of optional tool switching decisions. Use the deep Q network to perform strategy optimization training on the tool switching decision model to obtain the optimized tool switching strategy; Based on the optimized tool switching strategy, the workpiece shape and wear covariance matrix is updated and the wear balance evaluation index of all tools in the CNC tool library is calculated to generate the second switching timing decision sequence.

[0042] In this example, a real-time monitoring platform with multi-channel and multi-type sensor fusion capabilities is deployed to collect data on multi-dimensional performance parameters during the machining process. The platform includes a high-frequency sampling laser measurement head, an online roughness detector, a spindle vibration sensor, an energy consumption acquisition module, a noise recognition sensor array, and a tool life management unit. The machining accuracy is obtained by laser comparison of the difference between the geometric dimensions of the workpiece after machining and the CAD model. The surface roughness is evaluated by online scanning of the machined surface with a micro-contact or non-contact sensor and calculating the microscopic height difference. The tool life extension rate is obtained by comparing the actual usage cycle with the estimated life benchmark ratio. The energy efficiency is dynamically calculated by the ratio of energy consumption to material removal per unit machining time. The switching time is obtained by the time difference between the tool change command response cycle recorded by the machine tool control system and the tool robot execution completion cycle. The noise level is decoded by the acoustic array to the sound pressure level of a specific frequency band. The vibration amplitude is extracted by a high-precision three-axis acceleration sensor to extract the spectrum of the mechanical response between the spindle and the bed and statistically analyze the envelope characteristics. The cost-effectiveness is quantified by the comprehensive analysis of the processing value output per unit time and the tool consumption cost, energy loss and equipment occupancy rate. All indicators are synchronously collected at a fixed sampling period and formed into a unified format data set in the background and flowed into the system decision-making layer. This high-dimensional, multi-metric real-time evaluation data is fed into the strategy evaluation module. Based on this data, a switching strategy evaluation function is constructed. This function uses the aforementioned metrics as input variables and constructs an integrated objective value function based on the priority weights used in practical applications. A multi-objective optimization algorithm is used to calculate the optimal solution of this function within constraints, including the maximum allowable switching time, the minimum machining accuracy limit, the maximum allowable noise range, the maximum vibration intensity limit, and the minimum cost-effectiveness threshold. Within these constraints, a strategy combination is sought that optimizes machining accuracy, maximizes tool life, minimizes energy consumption, maximizes switching response, and minimizes vibration and noise. The optimization algorithm utilizes a non-dominated sorting algorithm with a Pareto frontier processing mechanism or a differential evolution algorithm within the evolutionary computing framework. The output strategy optimization objective function serves as the target reference for subsequent strategy model construction. Based on this strategy optimization objective function, the tool switching problem is modeled as a reinforcement learning model consisting of a multivariate state space consisting of workpiece states, tool states, and machining stages, and an action space with tool switching as the core behavior. In the state space, the workpiece state is composed of the geometric complexity, local stress state, temperature field distribution and roughness requirements of the current processing segment; the tool state is composed of the current wear distribution, health index, thermal response capability, structural strength and remaining life cycle; the processing stage indicates the percentage of processing task progress, whether it is close to the boundary turning point, whether the processing target is in the high-precision constraint area and other information; the action space is defined as any switching action in the optional tool set, and the tool change behavior is executed according to the current state vector.The system uses a deep Q-network to perform intensive training on the policy model. By constructing a state-action-reward learning framework, after each switching action, the system determines the immediate reward derived from the action based on a combined score of the aforementioned multi-dimensional evaluation metrics. The system then accumulates the long-term reward weighted by a discount factor to optimize the parameter convergence path of the deep Q-value. During the training process, the network structure uses a multilayer perceptron to encode state features, and the action selection strategy incorporates an ε-greedy mechanism to avoid falling into local optima, thereby enabling switching policy learning in high-dimensional states. Upon completion of training, the system obtains an optimized tool switching policy that automatically selects the most appropriate tool change action for each task phase and provides high-confidence tool change recommendations based on historical learning results when the state suddenly changes. The system applies this policy to the current machining task and dynamically updates the workpiece shape features and tool wear covariance matrix, combining the latest workpiece structure scan data with tool condition monitoring results in real time. This covariance matrix reflects the spatial dependencies between different workpiece geometric regions and the location of local tool wear. The system then uses this updated matrix structure to perform a weighted prediction of the current wear trend and estimates the wear balance of each tool based on its remaining life trend and the deviation between the current load and the expected load. Based on this information, the system calculates a wear balance index for all tools in the CNC tool library. This index measures whether resources are evenly distributed across tools and whether some tools are severely worn due to overuse or idle due to improper scheduling strategies. Combining the wear balance trend with the optimized switching strategy, the system ultimately generates a second switching timing decision sequence.

[0043] In an embodiment of the present invention, a tool surface wear distribution detection system, established using 3D laser scanning technology, accurately captures subtle heterogeneity on the tool surface, providing a high-precision data foundation for tool health assessment and enabling precise quantification of tool wear. Based on a correlation mapping mechanism between workpiece geometric features and tool wear patterns, a workpiece-tool wear covariance matrix and cutting boundary layer characteristic data are established. This overcomes the limitations of the traditional "one shape, one fixture" approach, enabling a single universal fixture to accommodate the machining needs of a wide variety of workpiece shapes. A dual evaluation system, combining tool health index and inter-tool collaborative wear relationship data, enables comprehensive dynamic monitoring of the status of all tools in the CNC tool library, providing a multi-dimensional basis for optimal tool switching decisions and significantly extending tool life. By calculating a switching evaluation function within a five-dimensional tool state space, an optimal tool switching timing decision sequence is generated, achieving distributed balance in tool wear. Tool wear patterns are proactively adapted to workpiece geometry, fundamentally eliminating the need for multiple specialized fixtures. A tool changing robot automatically switches tools according to the calculated optimal intervention angle. Combined with a predictive tool preparation mechanism, this significantly reduces tool switching time, improves machining efficiency, and ensures consistent and stable machining quality. The tool switching strategy optimized based on deep reinforcement learning, combined with the wear balance evaluation index, realizes the global optimal configuration of tool library resources, enables the system to continuously improve itself during continuous operation, and improves the intelligence level and adaptability of the overall machining system.

[0044] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.

[0045] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A tool switching method for a CNC tool library, characterized in that: include: Perform 3D laser scanning on the tool surface in CNC machine tools to obtain the wear micro-heterogeneity index; Correlation mapping is performed between workpiece geometric features and tool wear patterns based on the wear micro-heterogeneity index to obtain cutting boundary layer characteristic data; Performing tool status evaluation calculation based on the cutting boundary layer characteristic data to obtain tool health status index and inter-tool collaborative wear relationship data; Calculating a switching evaluation function in a tool state space according to the tool health index and the collaborative wear relationship data between the tools to obtain a first switching timing decision sequence; The first switching timing decision sequence is input into the CNC tool library management system, and the tool automatic switching operation is performed according to the calculated optimal intervention angle by controlling the tool changing robot arm.

2. The tool switching method of the CNC tool magazine according to claim 1, characterized in that: The three-dimensional laser scanning of the tool surface in the CNC machine tool to obtain the wear micro-heterogeneity index includes: Arranging a three-dimensional laser scanning sensor array in a matrix and setting a scanning frequency to obtain a tool surface detection system, and performing a Z-shaped scanning path division on the tool surface by the tool surface detection system to divide the tool surface in the CNC machine tool into a grid structure; Collecting a first position data matrix of each grid point in the grid structure in an initial state; After the tool completes a machining cycle and returns to a safe position, each grid point on the tool surface is scanned and collected again to obtain a second position data matrix; Performing difference calculation on the first position data matrix and the second position data matrix to obtain a surface wear distribution data matrix; The unevenness of the tool surface wear distribution is quantitatively calculated based on the surface wear distribution data matrix to obtain a wear micro-heterogeneity index, which is used to characterize the unevenness of the tool surface wear distribution.

3. The tool switching method of the CNC tool magazine according to claim 2, characterized in that: The correlative mapping of the workpiece geometric features and the tool wear pattern based on the wear micro-heterogeneity index to obtain cutting boundary layer characteristic data includes: Acquire workpiece surface point cloud data, and extract the number of edges, edge lengths, angles between edges, surface curvature, and material hardness distribution of the workpiece from the workpiece surface point cloud data to construct a workpiece geometric feature vector; Calculating the covariance relationship between the surface wear distribution data matrix and the workpiece geometric feature vector to obtain a wear covariance matrix; The workpiece geometric feature vector and the wear micro-heterogeneity index are input into a four-layer fully connected neural network to predict the influence of the workpiece geometric features on tool wear, and cutting boundary layer feature data describing the dynamic change law of the contact interface between the tool and the workpiece is obtained.

4. The tool switching method of the CNC tool magazine according to claim 3, characterized in that: The performing of tool status evaluation calculation based on the cutting boundary layer characteristic data to obtain tool health status index and collaborative wear relationship data between tools includes: The wear distribution function, wear micro-heterogeneity index, remaining life, machining accuracy reliability and optimal intervention angle of each tool in the CNC tool library are combined and analyzed to obtain the tool state vector; Performing a health assessment calculation on each tool in the CNC tool library based on the tool state vector and the wear covariance matrix to obtain a tool health status index; Inputting the cutting boundary layer characteristic data into the wear gradient field dynamic equilibrium model for numerical solution to obtain wear evolution data; Based on the wear evolution data, a correlation analysis is performed on the wear patterns of different tools in the CNC tool library to obtain collaborative wear relationship data between the tools.

5. The tool switching method of the CNC tool magazine according to claim 4, characterized in that: The correlation analysis of the wear patterns of different tools in the CNC tool library based on the wear evolution data is performed to obtain collaborative wear relationship data between the tools, including: Extracting the wear gradient field distribution of each tool in the CNC tool library from the wear evolution data, and constructing a wear gradient vector based on the wear gradient field distribution; Integrating the spatial distribution of the wear gradient vector to construct a tool cooperative wear function, and using the tool cooperative wear function to calculate between any two tools in the CNC tool library to obtain a synergy index matrix; All tools in the CNC tool library are grouped and clustered based on the synergy index matrix to obtain a tool combination set, and the tool combination set is associated and mapped with the workpiece geometric features to obtain collaborative wear relationship data between tools.

6. The tool switching method of the CNC tool magazine according to claim 1, characterized in that: The step of performing a switching evaluation function calculation in a tool state space based on the tool health index and the collaborative wear relationship data between tools to obtain a first switching timing decision sequence includes: Constructing the tool state space based on tool type parameters, workpiece geometry parameters, tool current wear distribution, wear microheterogeneity index and time parameters; Constructing a switching evaluation function including a machining quality prediction value, a current wear degree, a switching cost, and a slight heterogeneity index deviation based on the tool health index and the collaborative wear relationship data between the tools; Constructing a tool switching network for all tool nodes and switching edges in a CNC tool library according to the tool state space and the switching evaluation function, and solving the tool switching network to obtain an optimal switching tool combination; A first switching timing decision sequence is constructed according to the optimal switching tool combination and the preset switching condition triggering time point.

7. The tool switching method of the CNC tool magazine according to claim 6, characterized in that: The method of constructing a tool switching network for all tool nodes and switching edges in a CNC tool library according to the tool state space and the switching evaluation function, and solving the tool switching network to obtain an optimal switching tool combination includes: All tools in the CNC tool library are converted into nodes, each tool is represented as a node containing a tool state vector, and a tool node set is obtained; Calculating the switching cost between any two nodes of the tool node set based on the switching evaluation function to obtain a switching edge set representing the switching feasibility and cost; Combining the tool node set and the switching edge set to construct a tool switching network, wherein the weight values of the weighted edges in the tool switching network are calculated based on the switching evaluation function; Solving the shortest path for the tool switching network to obtain a shortest path result; The switching condition is judged based on the shortest path result, and the switching decision is triggered when the wear micro-heterogeneity index deviation exceeds a preset threshold, thereby obtaining the optimal switching tool combination.

8. The tool switching method of the CNC tool magazine according to claim 1, characterized in that: The step of inputting the first switching timing decision sequence into a CNC tool library management system and controlling a tool changing robot arm to perform an automatic tool switching operation according to the calculated optimal intervention angle includes: Digitally model the tool location information, tool status, and robotic arm motion range in the CNC tool library to obtain a digital twin model of the tool library that includes tool state vectors, tool location 3D coordinates, occupancy status, and accessibility information. Inputting the first switching timing decision sequence into the CNC tool library management system, and optimizing the tool position allocation in combination with the tool library digital twin model to obtain an optimized tool position layout solution; Calculate the optimal exit point of the current tool and the optimal entry point of the next tool and the optimized switching trajectory coefficient according to the tool position optimization layout plan and the current machining state, and obtain the tool switching trajectory parameters; Based on the tool switching trajectory parameters, the CNC machine tool is controlled to enter a safe state and the current tool is retracted to a safe position. Subsequently, a switching instruction including the target tool number and tool magazine position is sent to the tool magazine management system, and the tool changing robot arm is controlled to perform the current tool recovery and target tool loading operations according to the optimized path; The optimal intervention angle of the target tool is calculated based on the relationship between the tool wear distribution and the stress distribution on the workpiece surface, and the target tool is controlled to enter the workpiece according to the optimal intervention angle and optimized path. At the same time, the next tool to be used is predictively prepared during the execution of the current machining task, reducing the subsequent switching waiting time.

9. The tool switching method of the CNC tool magazine according to claim 1, characterized in that: The tool switching method of the CNC tool library also includes: Real-time collection of multi-dimensional evaluation indicator data sets including machining accuracy, surface roughness, tool life extension rate, energy efficiency, switching time, noise level, vibration amplitude and cost-effectiveness; Constructing a switching strategy evaluation function based on the multidimensional evaluation index data set, and performing a multi-objective optimization solution according to the switching strategy evaluation function and a preset constraint threshold to obtain a strategy optimization objective function; Based on the strategy optimization objective function, the tool switching problem is modeled as a tool switching decision model including a state space of workpiece state, tool state and machining stage and an action space of optional tool switching decisions; Using a deep Q network to perform strategy optimization training on the tool switching decision model to obtain an optimized tool switching strategy; Based on the optimized tool switching strategy, the workpiece shape and wear covariance matrix is updated and the balance evaluation index of all tool wear in the CNC tool library is calculated to generate a second switching timing decision sequence.

Citation Information

Cited By

  • Stamping die fault decision-making system based on dynamic evolution partition

    CN120941808A

  • Smart factory dual-mode switchable chip removal system and chip removal control method

    CN120985399A

  • Integrated machining process for metal products

    CN121050358A

  • A tool changing management method of an agv tool holder linkage mechanical hand, a terminal and a storage medium

    CN122353345A

  • A tool changing management method of an agv tool holder linkage mechanical hand, a terminal and a storage medium

    CN122353345B