Tool magazine tool changing method and system
The tool magazine tool change strategy of the CNC machining center is optimized through the bidirectional circular neural network model, which solves the problem of long tool change time and improves the processing efficiency.
Patent Information
- Application Number
- CN202410919094.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-10
AI Technical Summary
In CNC machining centers, frequent tool changing operations increase non-production time and affect processing efficiency and production rhythm. There is an urgent need to optimize the tool changing process to improve efficiency.
A bidirectional recurrent neural network model is used to predict tool change in the tool magazine. Through data preprocessing, feature extraction, correlation analysis and model training, a tool magazine optimization model is generated, and the tool change strategy is dynamically optimized to reduce tool change time.
By optimizing the tool magazine tool changing strategy, the tool changing time is significantly reduced and the processing efficiency of the CNC machining center is improved.
Smart Images

Figure CN118699844A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of tool operation in a numerical control machining center, and more specifically to a tool changing method and system for a tool magazine in a numerical control machining center. Background Art
[0002] CNC machining center is a kind of high-efficiency, automated and high-precision machine tool equipment. It is not only used in the machinery manufacturing industry, but also widely covers many fields such as aerospace, automobile industry and electronics industry. CNC machining center integrates multiple processing technologies such as drilling, milling, boring, reaming and tapping. It can complete complex processing of multiple surfaces in one clamping, aiming to improve production efficiency and reduce labor intensity.
[0003] At present, CNC machining centers usually include several key components, including machine tool body, CNC system, automatic tool changer (ATC) and auxiliary devices, among which: the machine tool body includes mechanical structure parts such as bed, worktable, spindle, etc.; the CNC system controls the core of the machining center, and controls the operation and coordination of the equipment through programming and algorithms; the automatic tool changer realizes the automatic replacement of various tools to improve machining efficiency; the automatic tool changer usually includes a tool magazine and a manipulator, in which the tool magazine stores various tools, and the tools in the tool magazine are arranged according to pre-set rules and automatically replaced by the automatic tool changer to realize tool switching between different machining processes; auxiliary devices such as cooling system, chip removal system, etc., ensure the smooth progress of the machining process.
[0004] During the tool changing process, the CNC system issues a tool changing command according to the machining program, the tool magazine selects the corresponding tool according to the tool changing command, the automatic tool changing device takes the selected tool out of the tool magazine and installs it on the spindle, and puts the original tool back into the tool magazine. After the tool change is completed, the CNC system continues to execute the machining program; therefore, in the CNC machining process, tool changing time is one of the important factors affecting machining efficiency. Frequent tool changing operations not only increase non-productive time, but also affect the machining cycle and overall production efficiency.
[0005] Therefore, there is an urgent need for a tool magazine tool changing method that can optimize the tool changing process during the production process of a CNC machining center. Summary of the invention
[0006] The present application provides a tool changing method and system for a tool magazine of a CNC machining center, which uses a bidirectional recurrent neural network model to predict tool replacement in the tool magazine, thereby optimizing the tool changing process of the tool magazine of the CNC machining center, which can reduce the tool changing time and thus improve the machining efficiency of the CNC center.
[0007] In a first aspect, the present application provides a tool changing method for a tool magazine of a CNC machining center, the method comprising the following steps: performing data preprocessing based on collected tool operation data; performing preset feature extraction based on the preprocessed tool operation data, and then performing correlation analysis and importance evaluation based on the extracted preset features to generate a data set; continuously training the data set using a bidirectional recurrent neural network model to generate a tool magazine optimization model, the training process comprising: dividing the data set into a training set and a test set, using forward propagation, loss calculation and back propagation to update weights on the training set, and then using the test set to perform performance evaluation; deploying the tool magazine optimization model, and continuously collecting real-time operation data of the CNC machining center at the same time, and then inputting the real-time operation data into the tool magazine optimization model to generate a prediction result; dynamically optimizing the tool magazine tool changing strategy based on the prediction result, and then replacing the initial tool changing strategy of the CNC machining center with the tool magazine tool changing strategy in real time.
[0008] In an optional scheme of the first aspect, when performing data preprocessing, the method includes the following steps: reading the collected tool operation data, checking and deleting duplicate data, and then performing data cleaning: processing missing values and abnormal values; performing data standardization based on the tool operation data that has undergone data cleaning; and performing data verification based on the standardized tool operation data.
[0009] In an optional solution of the first aspect, when generating a data set, the method comprises the following steps: extracting preset features contained in the tool operation data, wherein the preset features include one or more of a machining process sequence, a machining time, a tool type, a machining material, a tool life, and a tool wear state; and performing a correlation analysis using a Pearson correlation coefficient: Generate features that are strongly correlated with the target features; where x i is the eigenvalue of the i-th sample, y i is the target value of the i-th sample, is the mean of the eigenvalues, is the mean of the target value, and n is the number of samples. The gradient boosting tree is used to evaluate the importance of each feature, rank the feature importance, and then select the features with preset rankings to generate the data set.
[0010] In an optional solution of the first aspect, when forward propagation is used for the training set, the method comprises the following steps: for the input l at time step t t , update the hidden state of the forward LSTM layer: in, is the forward hidden state at time step t, is the forward hidden state at time step t-1; for the input l at time step t t , update the hidden state of the reverse LSTM layer: in, is the reverse hidden state at time step t, is the forward hidden state at time step t+1; concatenate the hidden states of the forward LSTM layer and the reverse LSTM layer as the output: in, To concatenate the forward and reverse hidden states in the feature dimension, h t is the hidden state after forward and backward connections at time step t.
[0011] In an optional solution of the first aspect, when loss calculation is adopted for the training set, the method comprises the following steps:
[0012] Calculate the output of each time step t according to the forward propagation in, is the predicted value of the i-th sample at time step t; h t,i is the hidden state of the i-th sample after forward and backward connection at time step t, and f is the activation function of the output layer; the loss is calculated for each time step t: Among them, L t is the loss for each time step t, n is the number of samples, y t,i is the true value of the i-th sample at time step t; the loss L of each time step t t Accumulate and generate the total loss L total : Where T is the time step length.
[0013] In an optional solution of the first aspect, when loss calculation and back propagation are used for the training set, the method comprises the following steps: calculating the error term for each time step t: in, is the error term for each time step t, is the predicted output at time step t, y t is the true value at time step t; calculate the error term of the cell state: in, is the error term of the cell state; calculate the error term of the output gate: in, is the error term of the output gate; calculate the error term of the input gate: in, is the error term of the input gate; calculate the error term of the candidate cell: in, is the error term of the candidate cell; calculate the error term of the forget gate: in, is the error term of the forget gate; calculate the error term of the hidden state: in, is the error term of the hidden state; according to the error term, the gradient of the weight and bias of the forget gate is calculated: in, is the gradient of the weight of the forget gate, is the gradient of the bias of the forget gate, h t-1 is the hidden state of the i-th sample after forward and backward connection at time step t-1; according to the error term, the gradient of the weight and bias of the input gate is calculated: in, is the gradient of the weight of the input gate, is the gradient of the bias of the input gate; according to the error term, the gradient of the weight and bias of the candidate cell state is calculated: in, is the gradient of the weight of the forget gate, is the gradient of the bias of the forget gate; according to the error term, the gradient of the output gate weight and bias is calculated: in, is the gradient of the weight of the forget gate, is the gradient of the bias of the forget gate; weights and biases are updated using the gradient descent optimization method.
[0014] In an optional solution of the first aspect, when the weights and biases are updated using a gradient descent optimization method, the method comprises the following steps: updating the gradients of the weights and biases of the forget gate according to a learning rate η: Among them, W f ′ is the weight of the updated forget gate, b f ′ is the bias of the updated forget gate; according to the learning rate η, the weight and bias gradient of the input gate are updated: Among them, W i ′ is the weight of the updated forget gate, b i ′ is the bias of the updated forget gate; according to the learning rate η, the weight and bias gradient of the candidate cell state are updated: Among them, W C ′ is the weight of the updated forget gate, b C ′ is the bias of the updated forget gate; according to the learning rate η, the weight and bias gradient of the output gate are updated: Among them, W O ′ is the weight of the updated forget gate, b O ′ is the bias of the updated forget gate.
[0015] In an optional solution of the first aspect, when a test set is used for performance evaluation, the method comprises the following steps: using a trained bidirectional recurrent neural network model to predict the test set to obtain predicted labels and true labels; and constructing a confusion matrix according to the predicted results and the true labels: Among them, TP is the number of samples correctly predicted as positive, TN is the number of samples correctly predicted as negative, FP is the number of samples incorrectly predicted as positive, and FN is the number of samples incorrectly predicted as negative. Calculate the accuracy: Calculate recall: Calculate the precision: Calculate the F1 score:
[0016] In an optional solution of the first aspect, when dynamically optimizing the tool magazine tool change strategy, the method includes the following steps: extracting tool processing sequence data according to the prediction result: {D1, D2, D3, ..., D N},; According to the tool processing sequence data, define the tool change path between the tools under the current tool magazine layout and calculate the tool change time: Among them, D switch is the total time for all tool changes, N is the number of tools, D a The tool used in step a, D a+1 is the tool used in step a+1, d(D a ,D a+1 ) is from tool D a Switch to tool D a+1 The time between; construct the tool change time matrix: Then the nearest neighbor method is used to generate the optimal tool change sequence: {D′1,D′2,D′3,...,D′ N Generate a tool change strategy for the tool magazine based on the optimal tool change sequence, and dynamically sort the tools in the tool magazine.
[0017] In the second aspect, the present application provides a tool magazine tool changing system for a CNC machining center, including a data processing module for performing data preprocessing based on the collected tool operation data; a feature processing module for performing preset feature extraction based on the tool operation data that has undergone data preprocessing, and then performing correlation analysis and importance evaluation based on the extracted preset features to generate a data set; a model training module for continuously training the data set using a bidirectional recurrent neural network model to generate a tool magazine optimization model, the training process comprising: dividing the data set into a training set and a test set, using forward propagation, loss calculation and back propagation to update the weights of the training set, and then using the test set for performance evaluation; a model deployment module for deploying the tool magazine optimization model; a data acquisition module for continuously acquiring real-time operation data of the CNC machining center; a tool magazine optimization module for inputting the real-time operation data into the tool magazine optimization model to generate a prediction result; based on the prediction result, dynamically optimizing the tool magazine tool changing strategy, and then replacing the initial tool changing strategy of the CNC machining center with the tool magazine tool changing strategy in real time.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate one or more embodiments of the present application and, together with the description, serve to explain the principles of the present application and to enable one of ordinary skill in the relevant art to make and use the present application.
[0020] Figure 1 It is a flowchart of an exemplary method for changing tools in a tool magazine of a CNC machining center according to some embodiments of the present application.
[0021] Figure 2 is a flowchart of an exemplary data preprocessing method according to some embodiments of the present application.
[0022] Figure 3 is a flowchart of an exemplary method for generating a data set according to some embodiments of the present application.
[0023] Figure 4 It is a flowchart of an exemplary forward propagation and loss calculation method according to some embodiments of the present application.
[0024] Figure 5 is a flowchart of an exemplary back-propagation method according to some embodiments of the present application.
[0025] Figure 6 is a flowchart of an exemplary weight and bias updating method according to some embodiments of the present application.
[0026] Figure 7 is a flowchart of an exemplary performance evaluation method according to some embodiments of the present application.
[0027] Figure 8 It is a line graph of an exemplary method of changing evaluation indicators with training rounds according to some embodiments of the present application.
[0028] Fig. 9 It is a flowchart of an exemplary method for optimizing tool magazine tool change strategy according to some embodiments of the present application.
[0029] Fig.10 This is a flowchart of an exemplary automatic tool management method according to some embodiments of the present application.
[0030] Fig.11 is a flow chart of an exemplary tool adjustment method according to some embodiments of the present application.
[0031] Fig.12This is a schematic diagram of the module connections of an exemplary CNC machining center tool magazine tool changing system according to some embodiments of the present application.
[0032] Fig.13 This is a connection diagram of an exemplary control unit according to some embodiments of the present application.
[0033] Fig.14 This is a schematic diagram of the structure of an exemplary terminal device according to some embodiments of the present application. DETAILED DESCRIPTION
[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present application will be more comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application.
[0035] To facilitate understanding, we first give a brief introduction to the CNC machining center.
[0036] The CNC machining center is a highly automated multifunctional CNC machine tool, which is widely used in high-precision machining of complex parts. Its main components include the CNC system, the machine tool body, the automatic tool changer (ATC, Automatic ToolChanger) and various auxiliary devices.
[0037] Specifically, the CNC system is the core of the CNC machining center, responsible for interpreting the machining program and issuing control instructions. It is connected to the machine tool body, automatic tool changer and various auxiliary devices contained in the CNC machining center to control the various movements and functions of the machine tool and ensure the precise execution of the entire production process; the CNC system usually includes a computer, various control modules and an operating interface (HMI). The computer and various control modules are used to process CNC codes and generate corresponding control signals; the operating interface provides a human-computer interaction interface, and the operator inputs the machining program through the operating interface, monitors the machining process, and adjusts the machining parameters.
[0038] Specifically, the machine tool body is the mechanical structure part of the CNC machining center, which provides a stable machining platform and necessary motion functions. The machine tool body usually includes a bed, a worktable, a spindle and a servo mechanism. The bed is the basic part of the machine tool, providing a solid and stable support structure. It is usually made of cast iron or high-strength steel to ensure rigidity and stability during the machining process; the worktable is the plane on which the workpiece is mounted, which can move on multiple axes and cooperate with the spindle for multi-directional machining, and the worktable can be fixed or rotating to meet different machining requirements; the spindle is the core component that drives the tool to rotate, and the spindle speed and power directly affect the machining efficiency and accuracy; the servo structure usually includes a servo drive and a servo motor, which are used to precisely control the movement of each axis.
[0039] Specifically, the automatic tool changer is one of the key components of the CNC machining center, which is used to realize the automatic replacement of multiple tools, improve machining efficiency and automation level; ATC usually includes a tool magazine and a manipulator, among which the tool magazine is used to store and manage tools. The tools in the tool magazine are arranged according to certain rules and cooperate with the manipulator to complete automatic replacement, so as to realize the rapid switching of tools between different machining processes; the tool magazine stores a variety of tools, and the tool magazine capacity ranges from a few to dozens. Common forms include chain type and disc type. In the disc tool magazine, the tools are arranged in the form of a disc, and there are multiple tool positions on the disc, and a tool is fixed on each tool position; in the chain tool magazine, the tools are arranged in the form of a chain, and there are multiple tool holders on the chain, and a tool is fixed on each tool holder. It can accommodate more tools and is suitable for complex machining scenarios that require a large number of tools; the manipulator is a device for automatically changing tools, which can quickly and accurately transfer tools from the tool magazine to the spindle or from the spindle back to the tool magazine. Specific tool changing process: The CNC system controls the manipulator to perform tool changing operations according to the preset program, including tool identification, grasping, transfer and installation.
[0040] Specifically, auxiliary devices ensure the smooth progress of the machining process and improve the machining quality and efficiency. Auxiliary devices usually include cooling devices, chip removal devices, lubrication devices, protective devices and measuring devices, among which: cooling devices usually include coolant pumps, coolant nozzles and coolant recovery devices, which are used to cool the tool and workpiece during the cutting process, reduce heat accumulation, prevent tool overheating and thermal deformation of the workpiece; chip removal systems usually include chip conveyors, chip belts and chip boxes, which are used to promptly remove metal chips generated by cutting, keep the machining area clean, and prevent metal chips from accumulating and affecting machining quality and equipment operation; lubrication systems usually include centralized lubrication devices and automatic lubrication devices, which are used to lubricate various moving parts of the machine tool, reduce friction, and extend equipment life; protective devices usually include machine tool covers, door locks and safety gratings, which are used to protect the safety of operators, prevent chips and coolant splashing, and ensure the safety of the machining environment; measuring devices include online measurement systems and tool setting instruments, which are used to monitor the workpiece size and tool position in real time, perform precision correction and error compensation, and improve machining accuracy.
[0041] Therefore, reference Figure 1 As shown, in some embodiments, the tool changing method of the tool magazine of the CNC machining center involved in the present application includes the following steps:
[0042] S1: Perform data preprocessing based on the collected tool operation data.
[0043] Specifically, tool operation data includes tool usage records, processing sequence, processing time, tool change records and other data obtained from the CNC machining center. The specific tool operation data can be increased or reduced by the operator according to actual needs; among them, the collected data is stored in a database to ensure the integrity and availability of the data.
[0044] In the actual implementation process, reference Figure 2 As shown, the data preprocessing includes the following steps:
[0045] S11: Read the collected tool operation data, check and delete duplicate data, and then perform data cleaning: handle missing values and outliers.
[0046] Specifically, duplicate records are checked and deleted to prevent duplicate data from causing deviations to the model; methods for handling missing values mainly include deletion, filling and interpolation, among which, if the missing values account for a very small proportion, the data containing missing values are directly deleted; if missing values need to be filled, the existing mean, median and mode methods are used to fill them; if missing values need to be interpolated, the existing linear interpolation method is used; outlier processing can be detected and processed through statistical methods, among which the existing Z-Score method is usually used to detect outliers, and then the detected outliers are deleted.
[0047] S12: Perform data standardization processing based on the tool operation data that has undergone data cleaning.
[0048] Specifically, data standardization can make data with different features have the same dimension. Common standardization methods include Z-Score standardization and Min-Max normalization. Among them, Z-Score standardization converts the data into a standard normal distribution with a mean of 0 and a standard deviation of 1; Min-Max normalization scales the data to a specified range (usually 0 to 1).
[0049] This application takes Min-Max normalization as an example, and the formula for data normalization processing using the Min-Max normalization method is:
[0050]
[0051] Among them, R′ is the tool operation data after data standardization, R is the tool operation data after data cleaning, and R min is the minimum value of tool operation data, R max This is the maximum value of the tool operation data.
[0052] S13: Perform data verification based on the standardized tool operation data.
[0053] Specifically, after the tool operation data is standardized, the central tendency and dispersion of the data distribution are evaluated by calculating statistics, such as the mean, standard deviation, and quartiles; and / or the deviation and centralization of the data distribution are evaluated by calculating the skewness and kurtosis, and the standardized data are checked to ensure that the data distribution is uniform and eliminate the impact of outliers and missing values on model training.
[0054] Among them, the skewness is calculated:
[0055]
[0056] Among them, S is skewness, E is the expected value (Expectation), that is, the average value; X is a sample value in the data, μ is the data mean, and υ is the data standard deviation; skewness = 0 means that the data distribution is symmetrical; skewness>0 means that the data distribution is positively skewed (right-skewed), which means that the right tail of the distribution is longer and most of the data are concentrated on the left; skewness<0 means that the data distribution is negatively skewed (left-skewed), which means that the left tail of the distribution is longer and most of the data are concentrated on the right; skewness is a statistic that describes the degree of asymmetry of the data distribution. It is used to measure the symmetry of the data distribution relative to the mean. The larger the absolute value of the skewness value, the greater the degree to which the data distribution deviates from symmetry.
[0057] Among them, the kurtosis is calculated:
[0058]
[0059] Among them, K is the kurtosis. If the kurtosis = 3, it means that the peak degree of the data distribution is the same as that of the normal distribution. At this time, 3 is usually subtracted to adjust the kurtosis of the normal distribution to 0. If the kurtosis > 0, it means that the peak degree of the data distribution is higher than that of the normal distribution, indicating that more data are concentrated near the mean. If the kurtosis < 0, it means that the data distribution is flatter than the normal distribution, indicating that the data is more dispersed near the mean. Kurtosis is a statistic that describes the peak and flatness of the data distribution, which is used to measure the peak or flatness of the data distribution relative to the normal distribution.
[0060] S2: Extract preset features based on the tool operation data that has undergone data preprocessing, and then perform correlation analysis and importance evaluation based on the extracted preset features to generate a data set.
[0061] In the actual implementation process, reference Figure 3 As shown, when generating the dataset, the following steps are included:
[0062] S21: extracting preset features contained in the tool operation data, where the preset features include one or more of a machining process sequence, a machining time, a tool type, a machining material, a tool life, and a tool wear state.
[0063] Among them, feature extraction is to extract meaningful information from the tool operation data after data preprocessing so that the model can effectively learn and predict; the processing sequence is the sequential encoding of the processing steps, which can use integer encoding or one-hot encoding; the processing time is the time spent in the processing process, which can be directly used as a numerical feature; the type encoding of the tool and the type encoding of the processing material can both use integer encoding or one-hot encoding; the service life of the tool can be used as a numerical feature; the wear state of the tool can be measured by the operator operating the machine or directly obtained using sensor data and used as a numerical feature.
[0064] S22: Correlation analysis using Pearson correlation coefficient:
[0065]
[0066] Generate features that are strongly correlated with the target features; where x i is the eigenvalue of the i-th sample, y i is the target value of the i-th sample, is the mean of the eigenvalues, is the mean of the target value, and n is the number of samples.
[0067] Among them, when performing correlation analysis, the Spearman correlation coefficient can also be used for correlation analysis:
[0068]
[0069] Γ i is the rank difference between the eigenvalue and target value of the i-th sample.
[0070] S23: Use the gradient boosting tree to evaluate the importance of each feature, rank the feature importance, and then select the features with preset rankings to generate the data set.
[0071] Among them, the gradient boosting tree is an integrated learning method that combines multiple decision trees together, and each tree is trained on the residuals of all previous trees; the feature importance is usually determined by calculating the contribution of each feature's split points in all trees to the model performance. Commonly used indicators include: Gini Importance and Gain. Gini Importance measures the importance of each feature in reducing Gini impurity, and loss reduction measures the importance of each feature in reducing the target loss function.
[0072] Among them, Gini impurity is used to measure the impurity of the node. For node m, the calculation formula of its Gini impurity G(m) is:
[0073]
[0074] C is the number of categories, p c is the proportion of samples belonging to category c.
[0075] Among them, for the split of feature j at node m, the calculation formula of Gini importance ΔI is:
[0076]
[0077] M is the number of samples of node m, M left and M right is the number of samples of the left child node and the right child node after the split, G(left) and G(right) are the Gini impurity of the left child node and the right child node.
[0078] Among them, for the split of feature j at node m, the loss reduction ΔL is calculated as:
[0079]
[0080] L(m) is the loss function value of node m, L(left) and L(right) are the loss function values of the left and right child nodes.
[0081] Through the above steps and formulas, the importance of each feature in the gradient boosting tree model can be evaluated, so that the corresponding important features can be selected according to the preset ranking threshold to generate a new data set, thereby reducing the complexity of the model and improving the prediction accuracy.
[0082] S3: A bidirectional recurrent neural network model is used to continuously train the data set to generate a tool magazine optimization model. The training process includes: dividing the data set into a training set and a test set, using forward propagation, loss calculation and back propagation to update the weights of the training set, and then using the test set for performance evaluation.
[0083] Among them, the bidirectional recurrent neural network (Bi-RNN) is a neural network that can process sequence data. It is a variant of the time recurrent neural network (long short-term memory network) and can consider both past and future information in a sequence data. Unlike the traditional recurrent neural network (RNN), BRNN uses two independent loop structures at each time step, one for transferring information from the past to the future, and the other for transferring information from the future to the past. When processing sequence data, the bidirectional recurrent neural network introduces two independent hidden layers to process the forward and reverse information of the input sequence respectively. Usually, the input data is passed into the model in the forward propagation, and the bidirectional LSTM layer processes the forward and reverse information respectively to obtain two hidden state sequences, which are then connected.
[0084] In the actual implementation process, reference Figure 4 As shown, when forward propagation is used for the training set, the method includes the following steps:
[0085] In a bidirectional recurrent neural network, the forward propagation of the forward and reverse LSTMs is performed in the bidirectional LSTM layer. Specifically, the bidirectional LSTM layer includes two independent LSTM networks: a forward LSTM and a reverse LSTM, which process the forward and reverse information of the input sequence respectively. The forward LSTM processes information from the beginning to the end of the input sequence, while the reverse LSTM processes information from the end to the beginning of the input sequence. Finally, the hidden states of the forward and reverse LSTMs are concatenated as the final output.
[0086] Among them, when performing forward propagation, the input sequence l={l1,l2,...,l t} is passed to the forward LSTM and the backward LSTM at the same time. The forward LSTM processes the forward information of the input sequence l, that is, from l1 to l t ; Reverse LSTM processes the reverse information of the input sequence l, that is, from l t to l1.
[0087] thus:
[0088] S301: For the input l at time step t t , update the hidden state of the forward LSTM layer:
[0089]
[0090] in, is the forward hidden state at time step t, is the forward hidden state at time step t-1.
[0091] In the implementation process, the specific process of updating the hidden state of the forward LSTM layer is:
[0092] Calculate the forget gate:
[0093]
[0094] Among them, f t is the output of the forget gate, σ is the sigmoid function, W f is the weight matrix of the forget gate, is the connection between the forward hidden state and the input, l t is the input at time step t, b f is the bias term of the forget gate.
[0095] Among them, the forget gate determines how much of the cell state in the previous time step is retained to the current time step, σ is the sigmoid function,
[0096] Calculate input gate i t :
[0097]
[0098] Generating candidate cell states
[0099]
[0100] Among them, i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias term of the input gate, is the candidate cell state, W C is the weight matrix of the candidate cell state, b C is the bias term of the candidate cell state, tanh is the hyperbolic tangent function,
[0101] Among them, the input gate determines how much information of the input of the current time step and the hidden state of the previous time step is updated to the cell state.
[0102] Update cell status C t :
[0103]
[0104] Among them, C t is the cell state at the current time step. The update of the cell state is the weighted sum of the forget gate and the input gate.
[0105] Calculate the output gate o t :
[0106]
[0107] Among them, t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate.
[0108] Among them, the output gate controls the hidden state of the current time step.
[0109] Update forward hidden state
[0110]
[0111] in, is the forward hidden state at time step t, tanh(C t ) is the nonlinear transformation of the cell state at the current time step.
[0112] S302: For the input l at time step t t , update the hidden state of the reverse LSTM layer:
[0113]
[0114] in, is the reverse hidden state at time step t, is the forward hidden state at time step t+1.
[0115] In the implementation, the specific process of updating the hidden state of the reverse LSTM layer is:
[0116] Calculate the forget gate:
[0117]
[0118] in, is the concatenation of the reverse hidden state and input.
[0119] Calculate input gate i t :
[0120]
[0121] Generating candidate cell states
[0122]
[0123] Update cell status C t :
[0124]
[0125] Calculate the output gate o t :
[0126]
[0127] Update reverse hidden state
[0128]
[0129] in, is the reverse hidden state at time step t.
[0130] S303: Connect the hidden states of the forward LSTM layer and the reverse LSTM layer as the final output of time step t:
[0131]
[0132] in, To concatenate the forward and reverse hidden states in the feature dimension, h t is the hidden state after forward and backward connections at time step t.
[0133] Through the above steps, the bidirectional LSTM can make better use of the contextual information of the input sequence by splicing the forward and reverse hidden states together at each time step, improving the model's ability to understand time series data, thereby improving the accuracy and reliability of predictions.
[0134] In the actual implementation process, reference Figure 4 As shown, when the loss calculation is used for the training set, the following steps are included:
[0135] S304: Calculate the output of each time step t based on forward propagation
[0136]
[0137] in, is the predicted value of the i-th sample at time step t; h t,iis the hidden state of the i-th sample at time step t after forward and backward connections, and f is the activation function of the output layer (for example, a linear function for regression tasks and a softmax function for classification tasks).
[0138] S305: Calculate the loss for each time step t:
[0139]
[0140] Among them, L t is the loss for each time step t, n is the number of samples, y t,i is the true value of the i-th sample at time step t.
[0141] Among them, if it is used for classification tasks to measure the difference between the predicted probability and the true label, the cross entropy loss can be used:
[0142]
[0143] S306: The loss L of each time step t t Accumulate and generate the total loss L total :
[0144]
[0145] Where T is the time step length.
[0146] When training a bidirectional recurrent neural network model, loss calculation is one of the key steps. The loss function measures the gap between the model's predicted value and the true value. By minimizing the loss function, the model parameters are optimized.
[0147] In the actual implementation process, reference Figure 5 As shown, when using loss calculation and back propagation for the training set, the following steps are included:
[0148] Among them, back propagation updates the weights by calculating the gradient of the loss function with respect to the network parameters. Back propagation is divided into two stages: error propagation and gradient calculation.
[0149] The error propagation is:
[0150] S311: Calculate the error term for each time step t, and start backpropagation from the output layer:
[0151]
[0152] in, is the error term for each time step t, is the predicted output at time step t, y t is the true value at time step t.
[0153] S312: Calculate the error term of the cell state:
[0154]
[0155] in, is the error term of the cell state, and the error propagation between time steps needs to be considered:
[0156]
[0157] S313: Calculate the error term of the output gate:
[0158]
[0159] in, is the error term of the output gate.
[0160] S314: Calculate the error term of the input gate:
[0161]
[0162] in, is the error term of the input gate.
[0163] S315: Calculate the error term of candidate cells:
[0164]
[0165] in, is the error term of the candidate cells.
[0166] S316: Calculate the error term of the forget gate:
[0167]
[0168] in, is the error term of the forget gate.
[0169] S317: Calculate the error term of the hidden state:
[0170]
[0171] in, is the error term of the hidden state.
[0172] The gradient is calculated as:
[0173] S318: Based on the error term, calculate the gradient of the weight and bias of the forget gate:
[0174]
[0175] in, is the gradient of the weight of the forget gate, is the gradient of the bias of the forget gate, h t-1 is the hidden state after forward and backward connections at time step t.
[0176] S319: Based on the error term, calculate the gradient of the input gate weight and bias:
[0177]
[0178] in, is the gradient of the weight of the input gate, is the gradient of the bias of the input gate.
[0179] S320: Based on the error term, calculate the gradient of the weight and bias of the candidate cell state:
[0180]
[0181] in, is the gradient of the weight of the forget gate, is the gradient of the bias of the forget gate.
[0182] S321: Based on the error term, calculate the gradient of the output gate weight and bias:
[0183]
[0184] in, is the gradient of the weight of the forget gate, is the gradient of the bias of the forget gate.
[0185] S322: Update weights and biases using gradient descent optimization method.
[0186] In the actual implementation process, reference Figure 6 As shown, when updating weights and biases using the gradient descent optimization method, the following steps are included:
[0187] S3221: Update the weight and bias gradient of the forget gate according to the learning rate η:
[0188]
[0189] Among them, W f ′ is the weight of the updated forget gate, b f ′ is the bias of the updated forget gate.
[0190] S3222: Update the weight and bias gradient of the input gate according to the learning rate η:
[0191]
[0192]
[0193] Among them, W i ′ is the weight of the updated forget gate, b i ′ is the bias of the updated forget gate.
[0194] S3223: Update the weight and bias gradient of the candidate cell state according to the learning rate η:
[0195]
[0196] Among them, W C ′ is the weight of the updated forget gate, b C ′ is the bias of the updated forget gate.
[0197] S3224: Update the weight and bias gradient of the output gate according to the learning rate η:
[0198]
[0199] Among them, W O ′ is the weight of the updated forget gate, b O ′ is the bias of the updated forget gate.
[0200] Backpropagation is the core step in training neural networks. Through the above steps, gradients can be calculated during the backpropagation process and used to update the weights of the bidirectional recurrent neural network, thereby minimizing the loss function and improving the prediction accuracy of the model.
[0201] In the actual implementation process, reference Figure 7 and Figure 8 As shown, when using the test set for performance evaluation, the following steps are included:
[0202] S323: Use the trained bidirectional recurrent neural network model to predict the test set and obtain the predicted label and the true label;
[0203] S324: Construct a confusion matrix based on the predicted results and true labels:
[0204]
[0205] Among them, TP is the number of samples correctly predicted as positive, TN is the number of samples correctly predicted as negative, FP is the number of samples incorrectly predicted as positive, and FN is the number of samples incorrectly predicted as negative.
[0206] S325: Calculate accuracy:
[0207]
[0208] Among them, accuracy is the proportion of correctly predicted samples to the total samples.
[0209] S326: Calculate recall rate:
[0210]
[0211] The recall rate refers to the proportion of samples that are correctly predicted to be positive among all samples that are actually positive, also known as sensitivity.
[0212] S327: Calculate the accuracy:
[0213]
[0214] Among them, precision refers to the proportion of samples that are actually positive among all samples predicted to be positive.
[0215] S328: Calculate F1 score:
[0216]
[0217] Among them, the F1 score is the harmonic mean of precision and recall, which comprehensively considers the two indicators of precision and recall.
[0218] When evaluating the performance of a bidirectional recurrent neural network model, a test set is usually used and a series of indicators are calculated to measure the predictive ability of the model, including accuracy, recall, precision, and F1 score, to ensure that the model has good predictive ability.
[0219] S4: deploying the tool magazine optimization model, and continuously collecting real-time operation data of the CNC machining center, and then inputting the real-time operation data into the tool magazine optimization model to generate a prediction result.
[0220] S5: According to the prediction result, the tool magazine tool change strategy is dynamically optimized, and then the tool magazine tool change strategy replaces the initial tool change strategy of the CNC machining center in real time.
[0221] In the actual implementation process, reference Fig. 9 As shown, when dynamically optimizing the tool magazine tool change strategy, the following steps are included:
[0222] S51: According to the prediction results, extract the tool processing sequence data: {D1, D2, D3, ..., D N}.
[0223] S52: According to the tool processing sequence data, define the tool change path between the tools under the current tool magazine layout and calculate the tool change time:
[0224]
[0225] Among them, D switch is the total time for all tool changes, N is the number of tools, D a The tool used in step a, D a+1 is the tool used in step a+1, d(D a ,D a+1 ) is from tool D a Switch to tool D a+1 The time between.
[0226] S53: Construct tool change time matrix:
[0227]
[0228] Then the nearest neighbor method is used to generate the optimal tool change sequence: {D′1,D′2,D′3,...,D′ N}.
[0229] Among them, the steps of the nearest neighbor method are:
[0230] S531: Select an initial node (usually starting from D1).
[0231] S532: Find the unvisited node closest to the current node and move to that node.
[0232] S533: Repeat S532 until all nodes are visited.
[0233] S534: Return to the starting node.
[0234] S54: Generate a tool magazine tool change strategy according to the optimal tool change sequence, and dynamically sort the tools in the tool magazine.
[0235] Among them, the dynamic sorting of tools in the tool magazine is controlled by the tool magazine tool change strategy to minimize the tool change time.
[0236] In some embodiments, reference Fig.10 As shown, after the CNC machining center is started, the application method also includes the following steps:
[0237] S101: Utilize the RFID reading device 200 disposed in the CNC machining center to collect the RFID tag information of the tool in real time, and then identify the tool data contained in the RFID tag information.
[0238] In the actual implementation process, a high temperature resistant, impact resistant and waterproof RFID tag is selected to ensure its stability and durability in the processing environment, and then the RFID tag is fixed to the non-working part of the tool to ensure that the tag will not affect the normal operation of the tool and can be identified by the RFID reading device 200; according to the layout of the CNC machining center and the use environment of the tool, a suitable RFID reading device 200 is selected to ensure that it can cover the entire working area. For example, the RFID reading device 200 is installed in key locations such as the tool magazine and the entrance to the machining area to ensure that the tool can be accurately identified when entering and exiting; wherein, the RFID reading device 200 is integrated with the control unit 30 of the CNC machining center to ensure real-time sharing and synchronization of data.
[0239] S102: Automatically identify each tool based on tool data and update its position in the tool magazine in real time, so as to achieve automatic management of tools, reduce manual intervention and improve work efficiency.
[0240] In some embodiments, reference Fig.11 As shown, after the CNC machining center completes the processing, the application method further includes the following steps:
[0241] S111: Collect the usage frequency, usage sequence and usage time data of various types of tools in each production task, and then count the usage frequency of various types of tools.
[0242] S112: Based on the frequency of use of the tool, a preset threshold is defined, and tools with a frequency of use higher than the threshold are defined as frequently used tools. Then, the position of the tool in the tool magazine is dynamically adjusted based on the frequency of use of the tool, and the frequently used tools are placed in the position that is most easily accessible.
[0243] Among them, the preset threshold is set by the operator according to actual needs.
[0244] In some embodiments, reference Fig.12 and Fig.13 As shown, the present application also relates to a tool magazine tool changing system for a CNC machining center, including the above-mentioned CNC machining center 10, and also including an RFID device and a control unit 30. The RFID device includes an RFID reading device 200 and an RFID tag. The RFID reading device 200 is installed at the entrance of the tool magazine or the machining area, and is used to read the information stored in the RFID tag of the tool; the RFID tag is fixed to the non-working part of the tool, and is used to record the information of the tool.
[0245] The control unit 30 comprises:
[0246] The data processing module 301 is used to perform data preprocessing based on the collected tool operation data; when performing data preprocessing, the collected tool operation data is read, duplicate data is checked and deleted, and then data cleaning is performed: missing values and abnormal values are processed; data standardization is performed based on the tool operation data that has undergone data cleaning; and data verification is performed based on the tool operation data that has undergone standardized processing.
[0247] The feature processing module 302 is used to extract preset features based on the tool operation data that has undergone data preprocessing, and then perform correlation analysis and importance evaluation based on the extracted preset features to generate a data set; when generating the data set, the preset features contained in the tool operation data are extracted, and the preset features include one or more of the machining process sequence, machining time, tool type, machining material, tool life and tool wear status, and the Pearson correlation coefficient is used to perform correlation analysis, and the gradient boosting tree is used to evaluate the importance of each feature, and the feature importance is ranked, and then the features with preset rankings are selected to generate the data set.
[0248] The model training module 303 is used to continuously train the data set using a bidirectional recurrent neural network model to generate a tool magazine optimization model. The training process includes: dividing the data set into a training set and a test set, using forward propagation, loss calculation and back propagation to update the weights of the training set, and then using the test set to evaluate the performance; when forward propagation is used for the training set, the input of the current time step and the hidden state and cell state of the previous time step are input, the forget gate is calculated, the input gate is calculated, the candidate cell state is calculated, the cell state is updated, the output gate is calculated, and the hidden state is updated; when loss calculation is used for the training set, the output of each time step is calculated according to forward propagation, the loss of each time step t is calculated, and the loss of each time step t is accumulated to generate a total loss; when loss calculation and back propagation are used for the training set, the loss of each time step t is calculated. The error term of the interval step, the error term of the cell state, the error term of the output gate, the error term of the input gate, the error term of the candidate cell, the error term of the forget gate, and the error term of the hidden state are calculated. According to the error terms, the gradients of the weights and biases of the forget gate, input gate, candidate cell state, and output gate are calculated, and the weights and biases are updated using the gradient descent optimization method; when the weights and biases are updated using the gradient descent optimization method, the gradients of the weights and biases of the forget gate, input gate, candidate cell state, and output gate are updated according to the learning rate; when the test set is used for performance evaluation, the trained bidirectional recurrent neural network model is used to predict the test set to obtain the predicted labels and the true labels, and a confusion matrix is constructed based on the predicted results and the true labels, and then the accuracy, recall, precision, and F1 score are calculated.
[0249] The model deployment module 304 is used to deploy the tool magazine optimization model.
[0250] The data acquisition module 305 is used to continuously acquire the real-time operation data of the CNC machining center.
[0251] The tool magazine optimization module 306 is used to input the real-time operation data into the tool magazine optimization model to generate a prediction result; based on the prediction result, dynamically optimize the tool magazine tool change strategy, and then replace the initial tool change strategy of the CNC machining center with the tool magazine tool change strategy in real time; when dynamically optimizing the tool magazine tool change strategy, according to the prediction result, extract the tool processing sequence data, define the tool change path between the tools under the current tool magazine layout according to the tool processing sequence data, calculate the tool change time, construct a tool change time matrix, and then use the nearest neighbor method to generate the optimal tool change sequence, generate the tool magazine tool change strategy according to the optimal tool change sequence, and dynamically sort the tools in the tool magazine.
[0252] Fig.14 A block diagram of the terminal device 40 of the present application is shown. In some embodiments, the terminal device 40 includes a processor 401 and a memory 402, wherein the number of the processor 401 and the memory 402 can be one or more. The memory 402 is coupled to the processor 401 and is used to store a computer program or instruction 403 executed by the processor 401. When the computer program or instruction 403 is executed by the processor 401, the terminal device 40 executes any of the tool magazine tool changing methods described in the foregoing.
[0253] Specifically, the processor 401 communicates with the memory 402, and the memory 402 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. In addition, a part of the memory 402 may also include a non-volatile random access memory (NVRAM). In the memory 402, operation instructions, executable modules, data structures or their subsets, or even their extended sets are stored. These operation instructions cover various operations and are used to implement various operations. The tool magazine tool changing method described in the embodiment of the present application can be applied to the processor 401, or implemented by the processor 401. The processor 401 can be any applicable computer processor, such as a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device (FPGA), etc. In an embodiment of the present application, the processor 401 is responsible for executing each step of the tool magazine tool changing method.
[0254] The computer program or instructions 403 include a computer program for executing a computer process on a computing device. In some embodiments, the computer program or instructions 403 are provided using a signal-bearing medium. The signal-bearing medium may include one or more program instructions, which when executed by one or more processors 401 may provide the functions or part of the functions described in the above embodiments of the tool magazine tool changing method. Thus, for example, one or more features in the tool magazine tool changing method may be undertaken by one or more instructions associated with the signal-bearing medium.
[0255] In some embodiments, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by the processor 401, implements the tool magazine tool changing method described in any of the above items.
[0256] Specifically, a computer-readable storage medium refers to a medium that can be read by a computer system, such as a hard disk, a solid-state hard disk, an optical disk, a flash drive, etc. In some embodiments of the present application, a computer-readable storage medium stores a set of computer programs, which are executed by the processor 401 to implement the various steps and functions described in the tool magazine tool changing method. These computer programs may include operating systems, embedded software, applications, etc., for controlling and managing the process of the method. By reading and executing the programs stored on the computer-readable storage medium, the computer system can effectively implement the tool magazine tool changing method of the present application.
[0257] In some embodiments, the present application further provides a computer program product, which includes computer executable instructions. When the computer executable instructions are executed by a processor, the computer implements the tool magazine tool changing method described in any of the above items.
[0258] Specifically, a computer program product is a product storing computer executable instructions, the purpose of which is to implement the various steps and functions described in the tool magazine tool changing method when executed by the processor 401 of the computer system. The computer executable instructions may include an operating system, an application program, an embedded software, etc., to control and manage the process of the method. By using such a computer program product, a user can execute the tool magazine tool changing method of the present application on a computer system.
[0259] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A tool changing method for a tool magazine of a CNC machining center, characterized in that: The method comprises the following steps: Perform data preprocessing based on the collected tool operation data; Extract preset features based on the tool operation data that has undergone data preprocessing, and then perform correlation analysis and importance evaluation based on the extracted preset features to generate a data set; A bidirectional recurrent neural network model is used to continuously train the data set to generate a tool magazine optimization model. The training process includes: dividing the data set into a training set and a test set, using forward propagation, loss calculation and back propagation to update the weights of the training set, and then using the test set for performance evaluation; The tool magazine optimization model is deployed, and real-time operation data of the CNC machining center is continuously collected, and then the real-time operation data is input into the tool magazine optimization model to generate a prediction result; According to the prediction results, the tool magazine tool change strategy is dynamically optimized, and then the tool magazine tool change strategy replaces the initial tool change strategy of the CNC machining center in real time.
2. The tool magazine tool changing method according to claim 1, characterized in that: When performing data preprocessing, the method comprises the following steps: Read the collected tool operation data, check and delete duplicate data, and then perform data cleaning: handle missing values and outliers; Perform data standardization based on the tool operation data that has been cleaned; Data verification is performed based on standardized tool operation data.
3. The tool magazine tool changing method according to claim 1 or 2, characterized in that: When generating a data set, the method comprises the following steps: Extracting preset features contained in the tool operation data, wherein the preset features include one or more of a machining process sequence, a machining time, a tool type, a machining material, a tool life, and a tool wear state; Correlation analysis was performed using the Pearson correlation coefficient: Generate features that are strongly correlated with the target features; where x i is the eigenvalue of the i-th sample, y i is the target value of the i-th sample, is the mean of the eigenvalues, is the mean of the target value, and n is the number of samples; The gradient boosting tree is used to evaluate the importance of each feature, rank the feature importance, and then select the features with preset rankings to generate the data set.
4. The tool magazine tool changing method according to claim 1, characterized in that: When forward propagation is used for the training set, the method comprises the following steps: For the input l at time step t t , update the hidden state of the forward LSTM layer: in, is the forward hidden state at time step t, is the forward hidden state at time step t-1; For the input l at time step t t , update the hidden state of the reverse LSTM layer: in, is the reverse hidden state at time step t, is the forward hidden state at time step t+1; Concatenate the hidden states of the forward LSTM layer and the backward LSTM layer as the output: in, To concatenate the forward and reverse hidden states in the feature dimension, h t is the hidden state after forward and backward connections at time step t.
5. The tool magazine tool changing method according to claim 4, characterized in that: When the loss calculation is applied to the training set, the method comprises the following steps: Calculate the output of each time step t according to the forward propagation in, is the predicted value of the i-th sample at time step t; h t,i is the hidden state of the i-th sample after forward and reverse connection at time step t, and f is the activation function of the output layer; Compute the loss at each time step t: Among them, L t is the loss for each time step t, n is the number of samples, y t,i is the true value of the i-th sample at time step t; The loss L at each time step t t Accumulate and generate the total loss L total : Where T is the time step length.
6. The tool magazine tool changing method according to claim 5, characterized in that: When using loss calculation and back propagation on the training set, the method includes the following steps: Compute the error term at each time step t: in, is the error term for each time step t, is the predicted output at time step t, y t is the true value at time step t; Compute the error term for the cell state: in, is the error term of the cell state; Calculate the error term of the output gate: in, is the error term of the output gate; Calculate the error term of the input gate: in, is the error term of the input gate; Calculate the error term for candidate cells: in, is the error term of the candidate cell; Calculate the error term of the forget gate: in, is the error term of the forget gate; Compute the error term for the hidden state: in, is the error term of the hidden state, h t-1 is the hidden state of the i-th sample after forward and reverse connection at time step t-1; Based on the error term, calculate the gradient of the weight and bias of the forget gate: in, is the gradient of the weight of the forget gate, is the gradient of the bias of the forget gate; Based on the error term, calculate the gradient of the weight and bias of the input gate: in, is the gradient of the weight of the input gate, is the gradient of the bias of the input gate; Based on the error term, calculate the gradient of the weight and bias of the candidate cell state: in, is the gradient of the weight of the forget gate, is the gradient of the bias of the forget gate; Based on the error term, calculate the gradient of the output gate weight and bias: in, is the gradient of the weight of the forget gate, is the gradient of the bias of the forget gate; The weights and biases are updated using the gradient descent optimization method.
7. The tool magazine tool changing method according to claim 6, characterized in that: When updating weights and biases using the gradient descent optimization method, the method includes the following steps: According to the learning rate η, update the gradient of the weight and bias of the forget gate: Among them, W f ′ is the weight of the updated forget gate, b f ′ is the bias of the updated forget gate; According to the learning rate η, update the gradient of the weight and bias of the input gate: Among them, W i ′ is the weight of the updated forget gate, b i ′ is the bias of the updated forget gate; According to the learning rate η, update the gradient of the weight and bias of the candidate cell state: Among them, W C ′ is the weight of the updated forget gate, b C ′ is the bias of the updated forget gate; According to the learning rate η, update the gradient of the output gate weight and bias: Among them, W O ′ is the weight of the updated forget gate, b O ′ is the bias of the updated forget gate.
8. The tool magazine tool changing method according to claim 1, characterized in that: When using the test set for performance evaluation, the method includes the following steps: Use the trained bidirectional recurrent neural network model to predict the test set and obtain the predicted labels and true labels; Construct a confusion matrix based on the predicted results and the true labels: Among them, TP is the number of samples correctly predicted as positive, TN is the number of samples correctly predicted as negative, FP is the number of samples incorrectly predicted as positive, and FN is the number of samples incorrectly predicted as negative. Calculate the accuracy: Calculate recall: Calculate the precision: Calculate the F1 score:
9. The tool magazine tool changing method according to claim 1, characterized in that: When dynamically optimizing the tool magazine tool change strategy, the method includes the following steps: According to the prediction results, the tool processing sequence data is extracted: {D1, D2, D3, ..., D N }; According to the tool processing sequence data, define the tool change path between tools under the current tool magazine layout and calculate the tool change time Among them, D switch is the total time for all tool changes, N is the number of tools, D a The tool used in step a, D a+1 is the tool used in step a+1, d(D a ,D a+1 ) is from tool D a Switch to tool D a+1 The time between Construct tool change time matrix: Then the nearest neighbor method is used to generate the optimal tool change sequence: {D′1,D′2,D′3,...,D′ N }; Generate tool change strategy for tool magazine based on optimal tool change sequence and dynamically sort tools in the tool magazine.
10. A tool changing system for a CNC machining center, characterized in that: include: A data processing module, used for performing data preprocessing according to the collected tool operation data; A feature processing module is used to extract preset features based on the tool operation data that has undergone data preprocessing, and then perform correlation analysis and importance evaluation based on the extracted preset features to generate a data set; The model training module is used to continuously train the data set using a bidirectional recurrent neural network model to generate a tool magazine optimization model. The training process includes: dividing the data set into a training set and a test set, using forward propagation, loss calculation and back propagation to update the weights of the training set, and then using the test set for performance evaluation; Model deployment module, used to deploy the tool magazine optimization model; Data acquisition module, used to continuously collect real-time operation data of CNC machining centers; The tool magazine optimization module is used to input the real-time operation data into the tool magazine optimization model to generate a prediction result; according to the prediction result, the tool magazine tool change strategy is dynamically optimized, and then the tool magazine tool change strategy replaces the initial tool change strategy of the CNC machining center in real time.
Citation Information
Patent Citations
Household electrical load decomposition system with solar power supply system and decomposition method
CN110852655A
Cement finished product specific surface area prediction method and system based on long-term and short-term memory network
CN111079906A
Data classification method and device
CN114358153A
Cutter life dynamic prediction method
CN114536104A
Tool arrangement and tool changing method and device based on deep learning and storage medium
CN115062674A
Cited By
Tool magazine operation control method and system
CN119304675A
Machine tool interpolation tool changing method and device and computer readable storage medium
CN119566918A
