A monitoring system for CNC machine tools

By identifying and quantifying the relationship between CNC machine tool processing parameters and product quality through the random forest model and Bayesian network model, the problems of low product quality monitoring efficiency and inaccurate parameter control in the existing technology are solved, and the product qualification rate is improved. promote.

CN118466397BActive Publication Date: 2024-10-29SHANTOU CITY GOODERS PRECISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410935037.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-29
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

The existing technology is difficult to identify processing parameters that have a significant impact on CNC machine tool product quality, and it is difficult to quantify the relationship between processing parameters and product qualification rates, leading to problems such as low product quality monitoring efficiency and inaccurate control of processing parameters.

Method used

The random forest model is used to identify key processing parameters, and the relationship between these parameters and product quality is quantified through the Bayesian network model. The processing parameters are monitored and adjusted in real time to ensure product qualification rate.

Benefits of technology

By identifying key processing parameters and quantifying their impact on product quality, efficient monitoring and parameter control of CNC machine tool product quality is achieved, and the product qualification rate is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118466397B_ABST
    Figure CN118466397B_ABST
Patent Text Reader

Abstract

The present invention relates to a monitoring system for a numerically controlled machine tool, which records the processing parameters of the numerically controlled machine tool during the processing of the mold, as well as the final product quality; based on the recorded and stored numerically controlled machine tool data, a random forest model is used to identify key processing parameters that have a significant impact on the product quality; a Bayesian network model is used to quantify the relationship between the key processing parameters and the product quality; based on the relationship between the processing parameters and the product quality, the current processing parameters are monitored and adjusted to make the product qualification rate meet the standard. The present invention solves the problem that the prior art is difficult to identify processing parameters that have a significant impact on product quality, and is difficult to quantify the relationship between processing parameters and product qualification rate, resulting in low efficiency in product quality monitoring of numerically controlled machine tools and inaccurate control of processing parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of numerically controlled machine tools and relates to a monitoring system for numerically controlled machine tools. Background Art

[0002] A CNC machine tool is an automated mechanical tool that controls the operation of a machine tool through a pre-written program. Compared with traditional manually operated machine tools, CNC machine tools have higher precision, repeatability and production efficiency. The operation process of a CNC machine tool is controlled by a computer system. Users can use computer software to generate a machine tool processing path and convert the path into a CNC program. The CNC program contains various instructions that guide the machine tool to perform processing operations such as cutting, drilling, milling, and turning.

[0003] For injection mold processing, CNC machine tools need to adjust multiple parameters to ensure product quality. However, due to the large number of processing parameters, existing technologies have difficulty in identifying processing parameters that have a significant impact on product quality, and it is difficult to quantify the relationship between processing parameters and product qualification rate, resulting in low efficiency in product quality monitoring of CNC machine tools and inaccurate control of processing parameters. Summary of the invention

[0004] The present invention provides a monitoring system for CNC machine tools, which aims to achieve real-time monitoring and post-event traceability of product quality by recording data of CNC machine tools during the mold processing process and combining it with statistical process control theory (SPC), so as to solve the problems of low efficiency in product quality monitoring and inaccurate control of processing parameters of CNC machine tools.

[0005] The purpose of the present invention can be achieved through the following technical solutions:

[0006] The present application provides a monitoring system for a numerically controlled machine tool, comprising a data recording module, a data analysis module and a parameter adjustment module, wherein the data recording module, the data analysis module and the parameter adjustment module are communicatively connected, wherein:

[0007] The data recording module is used to record the processing parameters of the CNC machine tool during the processing of the mold, as well as the final product quality, and the product quality includes qualified and unqualified;

[0008] The data analysis module is used to analyze the relationship between the processing parameters and the product quality according to the recorded and stored CNC machine tool data, and includes the following steps:

[0009] S1. Use random forest model to identify key processing parameters that have a significant impact on product quality;

[0010] S2, using Bayesian network model to quantify the relationship between key processing parameters and product quality;

[0011] The parameter adjustment module is used to monitor the current processing parameters and adjust the processing parameters according to the relationship between the processing parameters and the product quality, so that the product qualification rate meets the standard.

[0012] Furthermore, the machining parameters include cutting speed, feed speed, spindle speed, cutting depth and width, tool path, cooling and lubrication, tool type and material.

[0013] Specifically, in step S1, the random forest model includes the following construction steps:

[0014] S11. Randomly extract from the dataset L samples as training set;

[0015] S12, random non-repetitive extraction N The processing parameter variables are used as the split points, and the Gini coefficient is used to determine the best split points for the product quality situation variables to generate a decision tree;

[0016] S13, repeat M The operation of steps S11-S12 yields M decision trees to generate random forests;

[0017] S14, calculate the prediction error of each decision tree in the random forest for out-of-bag data;

[0018] S15, adding random disturbances of processing parameter variables in out-of-bag data, and calculating the prediction error of each decision tree of the random forest for the random disturbances;

[0019] S16. Sort the importance of processing parameter variables according to the prediction error of random forest for out-of-bag data;

[0020] S17. Before selecting importance ranking n The processing parameter variables are taken as key processing parameters.

[0021] Further, in step S13, the M A decision tree, M The value is determined as follows:

[0022] by O Taking decision trees as the step size, random forests with different numbers of decision trees are generated;

[0023] Calculate the prediction error of the random forest for the test sample;

[0024] Select the random forest with the smallest prediction error and determine the number of decision treesM .

[0025] Furthermore, in step S16, the importance of the processing parameter variables is ranked according to the prediction error of the random forest for the out-of-bag data, and the calculation formula is as follows:

[0026] ,

[0027] Where: PIM Indicates the importance of processing parameter variables; M is the number of decision trees in the random forest; Indicates k The decision tree adds i The prediction error of out-of-bag data with random disturbances of processing parameter variables; Indicates k The prediction error of the tree decision on the out-of-bag data without adding random perturbations.

[0028] Furthermore, in step S2, the Bayesian network model includes the following construction steps:

[0029] S21. Determine the model connection relationship: take the key processing parameters as the parent node and the product quality status as the child node, connect the parent node and the child node to form a Bayesian network model structure;

[0030] S22, data parameterization processing: estimating model parameters of key processing parameters and product quality conditions according to preset standards;

[0031] S23. Constructing a conditional probability table: constructing a conditional probability table of the correlation between each key processing parameter and the model parameters of the product quality condition according to the model parameters obtained by the data parameterization processing.

[0032] Furthermore, in step S22, the model parameters of key processing parameters and transmission quality data are estimated according to preset standards, specifically by using the K-means clustering method to divide the key processing parameters into several level parameters; and dividing the "qualified" and "unqualified" in the product quality conditions into two logical parameters of "yes" and "no", respectively.

[0033] Furthermore, the method of using K-means clustering method to divide the key processing parameters into several level parameters includes the following steps:

[0034] T1. Normalization: normalize key processing parameters;

[0035] T2, Initialize cluster centers: Randomly select several data objects in the data space as initial cluster centers;

[0036] T3, Initialize clusters: Calculate the Euclidean distance between all data objects and the initial cluster center, and divide each data object into the initial cluster center with the smallest Euclidean distance to form an initial cluster;

[0037] T4, update cluster center: calculate the average value of the data objects of each initial cluster, and use the average value as the new cluster center;

[0038] T5. Determine the final cluster: repeatedly calculate the Euclidean distance between all data objects and the new cluster center, divide each data object into the new cluster center with the smallest Euclidean distance to form a new cluster; calculate the average value of each new cluster as the new cluster center again until the new cluster center no longer changes, determine the final cluster, and determine the level parameters corresponding to each final cluster according to the key processing parameter data characteristics of the final cluster.

[0039] Furthermore, in step T1, the normalization process is calculated using the following formula:

[0040] ,

[0041] In the formula, Y i After normalization, i Key processing parameter data samples; K i For the i Key processing parameter data samples; K max Indicates the maximum value of all key processing parameter data samples; K min Indicates the minimum value of all key processing parameter data samples.

[0042] Furthermore, in step T3, the Euclidean distance is calculated as follows:

[0043] ,

[0044] In the formula, d ( x, C i ) represents the Euclidean distance function; x is the normalized data object; C i Indicates i Cluster centers; n is the number of samples in the data set; x j Indicates the data set j A data object with a variable; C ij Indicates j The variable iCluster centers.

[0045] Furthermore, in step S23, the model parameters obtained by data parameterization processing are used to construct a conditional probability table of the correlation between each key processing parameter and the model parameters of the product quality situation. Specifically, for each variable parameter, given its parent node, its joint conditional probability at the parent node is calculated, and the formula is:

[0046] ,

[0047] ,

[0048] In the formula, P ( U ) is represented as a set of nodes U = B 1 , B 2 ,……, B n The joint conditional probability of Pa ( B i ) is a node in the Bayesian network B i The parent node set of P ( B i ) represents the target node B i The prior probability of .

[0049] Furthermore, the Bayesian network model also uses residual analysis or model fit to evaluate the prediction performance of the model.

[0050] Furthermore, in the parameter adjustment module, monitoring the current processing parameters and adjusting the processing parameters according to the relationship between the processing parameters and the product quality conditions includes the following steps:

[0051] Obtain key processing parameters for a time series at a specific time step;

[0052] Input key processing parameters into the trained Bayesian network model to predict product quality;

[0053] When the qualified rate of product quality is lower than the preset qualified rate threshold, the key processing parameters are adjusted.

[0054] Beneficial effects of the present invention:

[0055] By recording the processing parameters of the CNC machine tool during the mold processing process, as well as the final product quality; based on the recorded and stored CNC machine tool data, a random forest model is used to identify the key processing parameters that have a significant impact on the product quality; a Bayesian network model is used to quantify the relationship between the key processing parameters and the product quality; based on the relationship between the processing parameters and the product quality, the current processing parameters are monitored and adjusted to ensure that the product qualification rate meets the standard. The present invention solves the problem that the prior art is difficult to identify the processing parameters that have a significant impact on product quality, and is difficult to quantify the relationship between the processing parameters and the product qualification rate, resulting in low efficiency in product quality monitoring of CNC machine tools and inaccurate control of processing parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0057] Figure 1 The figure is a structural diagram of a monitoring system for a numerically controlled machine tool in the present invention. DETAILED DESCRIPTION

[0058] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation mode, structure, characteristics and effects of the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.

[0059] See also Figure 1 The present application provides a monitoring system for a numerically controlled machine tool, comprising a data recording module, a data analysis module and a parameter adjustment module, wherein the data recording module, the data analysis module and the parameter adjustment module are communicatively connected, wherein:

[0060] The data recording module is used to record the processing parameters of the CNC machine tool during the processing of the mold, as well as the final product quality, and the product quality includes qualified and unqualified;

[0061] In this embodiment, when using CNC machine tools to process the mold, multiple parameters need to be adjusted to ensure processing accuracy, surface quality and processing efficiency. The following are some key parameters and their adjustment points:

[0062] 1) Cutting speed: The cutting speed depends on the type of material and the tool material. When processing injection molds, the cutting speed is generally higher to avoid melting the material, and the speed range is generally 150-300 m / min.

[0063] 2) Feed speed: Feed speed affects cutting load and surface finish. For plastic materials, a feed speed of 200-800 mm / min is usually used, and the specific speed needs to be adjusted according to the complexity of the mold and the type of tool.

[0064] 3) Spindle speed: The number of times the spindle rotates per minute, expressed in revolutions per minute (RPM). The setting of the spindle speed is related to the cutting speed and the workpiece diameter.

[0065] 4) Cutting depth and width: Cutting depth and width affect cutting force and processing efficiency. For injection mold processing, shallow cutting depth and smaller cutting width are usually selected to reduce material deformation and tool wear.

[0066] 5) Tool path: Properly plan the tool path to reduce cutting vibration and stress concentration, especially when machining complex geometries. Commonly used path strategies include parallel cutting, spiral cutting and contour cutting.

[0067] 6) Cooling and lubrication: Use an appropriate amount of coolant or lubricant to prevent overheating in the cutting area. Air cooling or water-soluble cutting fluid is commonly used to avoid deformation of plastic materials or adhesion of the tool.

[0068] 7) Tool type and material: Choose the appropriate tool material and geometry. Carbide or high-speed steel tools are suitable for injection mold processing. Tool sharpness has an important influence on processing quality.

[0069] Therefore, further, the processing parameters include cutting speed, feed speed, spindle speed, cutting depth and width, tool path, cooling and lubrication, tool type and material.

[0070] The data analysis module is used to analyze the relationship between the processing parameters and the product quality according to the recorded and stored CNC machine tool data, and includes the following steps:

[0071] S1. Use random forest model to identify key processing parameters that have a significant impact on product quality;

[0072] S2, using Bayesian network model to quantify the relationship between key processing parameters and product quality;

[0073] The parameter adjustment module is used to monitor the current processing parameters and adjust the processing parameters according to the relationship between the processing parameters and the product quality, so that the product qualification rate meets the standard.

[0074] In this embodiment, due to the excessive number of processing parameters involved, the degree of their influence on the product quality is different, and it is difficult for people to identify the key processing parameters with greater influence. To this end, this embodiment uses the processing parameters as explanatory variables and the product quality as the response variable, constructs a random forest model to rank the importance of the processing parameters, and selects the processing parameters with the highest importance as the key processing parameters. Random forest is a classic machine learning algorithm that can be used for feature extraction and variable importance ranking. Random forest trains and predicts by constructing multiple decision trees, and each decision tree only uses a part of the training data and some features for modeling. By constructing multiple decision trees, a powerful classification or regression model is finally obtained, in which each decision tree has a weight contribution. Random forest can give the importance ranking of each input feature in the model, and the importance scores of these features are calculated based on their influence on the model prediction results in the random forest. Usually, the feature importance score in the random forest is calculated based on the out-of-bag error.

[0075] Specifically, in step S1, the random forest model includes the following construction steps:

[0076] S11. Randomly extract from the dataset L samples as training set;

[0077] S12, random non-repetitive extraction N The processing parameter variables are used as the split points, and the Gini coefficient is used to determine the best split points for the product quality situation variables to generate a decision tree;

[0078] S13, repeat M The operation of steps S11-S12 yields M decision trees to generate random forests;

[0079] S14, calculate the prediction error of each decision tree in the random forest for out-of-bag data;

[0080] It should be noted that out-of-bag data refers to data that is not used in model training and has never been used in training. In machine learning and statistical modeling, out-of-bag data is one of the important indicators used to evaluate the performance and generalization ability of the model. The role of out-of-bag data is to test the performance of the model when facing unseen samples. During the training process, the model only uses part of the data set for parameter estimation and model fitting, while out-of-bag data provides an independent data set that can be used to evaluate the prediction accuracy and reliability of the model. In some machine learning algorithms, such as random forests, gradient boosting trees, cross validation, etc., by using out-of-bag data for model evaluation and tuning, the performance of the model can be better estimated and help identify problems such as overfitting or underfitting.

[0081] S15, adding random disturbances of processing parameter variables in out-of-bag data, and calculating the prediction error of each decision tree of the random forest for the random disturbances;

[0082] It should be noted that adding random perturbations to out-of-bag data means making a certain degree of random modification or perturbation to the out-of-bag data when training the model. The purpose of this perturbation is to increase the model's generalization ability to unknown data and reduce overfitting of the training data. By adding random perturbations to out-of-bag data, the model can better learn and adapt to different types of data changes, reduce the model's dependence on specific samples and specific features in the training set, and thus improve its performance in real scenarios. At the same time, reasonable perturbations to out-of-bag data can effectively prevent overfitting and improve the generalization ability of the model.

[0083] S16. Sort the importance of processing parameter variables according to the prediction error of random forest for out-of-bag data;

[0084] S17. Before selecting importance ranking n The processing parameter variables are taken as key processing parameters.

[0085] It should be noted that in this embodiment, the importance ranking n The processing parameter variables are n It depends on the model when adding the n The value at which the prediction error starts to get larger after the marketing campaign information variable is added.

[0086] Further, in step S13, the M A decision tree, M The value is determined as follows:

[0087] by O Taking decision trees as the step size, random forests with different numbers of decision trees are generated;

[0088] Calculate the prediction error of the random forest for the test sample;

[0089] Select the random forest with the smallest prediction error and determine the number of decision trees M .

[0090] Furthermore, in step S16, the importance of the processing parameter variables is ranked according to the prediction error of the random forest for the out-of-bag data, and the calculation formula is as follows:

[0091] ,

[0092] Where: PIM Indicates the importance of processing parameter variables; M is the number of decision trees in the random forest; Indicatesk The decision tree adds i The prediction error of out-of-bag data with random disturbances of processing parameter variables; Indicates k The prediction error of the tree decision on the out-of-bag data without adding random perturbations.

[0093] In this embodiment, by using the Bayesian network model to quantify the relationship between the key processing parameters and the product quality in the CNC machine tool mold processing, the important influence of the key processing parameters on the product qualification rate can be more deeply understood. Bayesian network is a probabilistic graphical model, which can be used to represent the dependencies between variables and analyze these dependencies through probabilistic reasoning. In the relationship between the key processing parameters and the product quality, the key processing parameters can be used as input variables and the product quality can be used as output variables. The product qualification rate can be predicted by analyzing the dependency between them.

[0094] Specifically, the Bayesian network model is trained by historical record data, and the model can learn the probability distribution between key processing parameters and product quality. By learning these probability distributions, we can understand the probability of qualified products under different key processing parameters, and thus quantify the relationship between them.

[0095] Once a well-trained Bayesian network model is obtained, it can be used to predict the product qualification rate. By observing the changes in key processing parameters over a period of time, these observations can be input into the Bayesian network model and probabilistic reasoning can be performed to obtain the probability distribution of product quality. These probability distributions can help us assess the risk of product failure and adjust key processing parameters accordingly to prevent or solve potential product quality problems.

[0096] Furthermore, in step S2, the Bayesian network model includes the following construction steps:

[0097] S21. Determine the model connection relationship: take the key processing parameters as the parent node and the product quality status as the child node, connect the parent node and the child node to form a Bayesian network model structure;

[0098] In the process of building a Bayesian network model, the explanatory variable is usually used as the parent node and the response variable as the child node to represent the influence relationship between the variables. In this embodiment, the key processing parameters are used as the parent node and the product quality situation is used as the child node. The parent node and the child node are connected to form a Bayesian network model structure. In this structure, the key processing parameters have a direct impact on the product quality situation.

[0099] S22, data parameterization processing: estimating model parameters of key processing parameters and product quality conditions according to preset standards;

[0100] In this embodiment, the Bayesian network is a graphical model for modeling and inferring probability relationships. Parameterization is an important task in the Bayesian network, and its purpose is to estimate the parameters of the probability distribution in the network based on the observed data. These parameters are used to describe the conditional probabilities and marginal probabilities between variables. The values ​​of the test data samples obtained are high and low. In the process of parameterization, this embodiment uses preset standards to estimate the model parameters of key processing parameters and transmission quality data:

[0101] Furthermore, in step S22, the key processing parameters and the parameters of the transmission quality data are estimated according to the preset standards, specifically by using the K-means clustering method to divide the key processing parameters into several level parameters; and dividing the "qualified" and "unqualified" in the product quality conditions into two logical parameters of "yes" and "no", respectively.

[0102] In this embodiment, the product quality situation is divided into two logical parameters of "yes" and "no" which can be used to determine the probability of whether an event occurs. For example, for the product quality situation, "yes" indicates the probability that the product quality is qualified, and "no" indicates the probability that the product quality is unqualified.

[0103] Furthermore, the method of using K-means clustering method to divide the key processing parameters into several level parameters includes the following steps:

[0104] T1. Normalization: normalize key processing parameters;

[0105] In this embodiment, the purpose of normalizing the key processing parameters is to unify the data ranges between different features so that they have the same scale. This can avoid the problem of weight imbalance between different features due to different data ranges, and ensure that each feature can be properly reflected in the clustering process. Through normalization, the dimensional influence between data can be eliminated, making the data easier to compare and analyze, thereby improving the accuracy and efficiency of clustering. In addition, normalization can also make the clustering algorithm more stable and converge faster, which is conducive to obtaining more accurate and reliable clustering results. Therefore, before performing cluster analysis of key processing parameters, the data is usually normalized to achieve better clustering effects.

[0106] T2, Initialize cluster centers: Randomly select several data objects in the data space as initial cluster centers;

[0107] In this embodiment, when initializing the cluster centers, a common practice is to randomly select several data objects in the data space as the initial cluster centers. The reason for this is that by randomly selecting the initial cluster centers, it can be ensured that the algorithm will not be affected by the position of a specific initial cluster center, thereby avoiding falling into a local optimal solution. By randomly selecting data objects in the data space as the initial cluster centers, the algorithm can have a certain degree of randomness, which helps to explore different aspects of the data, and can increase the robustness and reliability of the algorithm, and improve the quality of the final clustering results. Randomly selecting data objects as initial cluster centers is a common and effective initialization method.

[0108] T3, Initialize clusters: Calculate the Euclidean distance between all data objects and the initial cluster center, and divide each data object into the initial cluster center with the smallest Euclidean distance to form an initial cluster;

[0109] T4, update cluster center: calculate the average value of the data objects of each initial cluster, and use the average value as the new cluster center;

[0110] T5. Determine the final cluster: repeatedly calculate the Euclidean distance between all data objects and the new cluster center, divide each data object into the new cluster center with the smallest Euclidean distance to form a new cluster; calculate the average value of each new cluster as the new cluster center again until the new cluster center no longer changes, determine the final cluster, and determine the level parameters corresponding to each final cluster according to the key processing parameter data characteristics of the final cluster.

[0111] In this embodiment, K-means clustering is a common unsupervised learning algorithm used to divide data points into different clusters. By calculating the similarity between data points, the K-means algorithm can classify data points into the closest clusters. This method helps to discover hidden patterns and structures in the data, thereby realizing cluster analysis and classification of data. The K-means algorithm is used to divide the key processing parameters into different clusters, each cluster representing key processing parameters with similar characteristics.

[0112] Furthermore, in step T1, the normalization process is calculated using the following formula:

[0113] ,

[0114] In the formula, Y i After normalization, i Key processing parameter data samples; K i For the i Key processing parameter data samples; Kmax Indicates the maximum value of all key processing parameter data samples; K min Indicates the minimum value of all key processing parameter data samples.

[0115] Furthermore, in step T3, the Euclidean distance is calculated using the following formula:

[0116] ,

[0117] In the formula, d ( x, C i ) represents the Euclidean distance function; x is the normalized data object; C i Indicates i Cluster centers; n is the number of samples in the data set; x j Indicates the data set j A data object with a variable; C ij Indicates j The variable i Cluster centers.

[0118] S23. Constructing a conditional probability table: constructing a conditional probability table of the correlation between each key processing parameter and the model parameters of the product quality condition according to the model parameters obtained by the data parameterization processing.

[0119] In this embodiment, the conditional probability table is a table used to represent the conditional probability relationship between variables, which shows the probability of the variables occurring under certain conditions. Assuming there are two discrete variables A and B, the conditional probability table will be presented in the form of a table, in which the rows represent the values ​​of variable A and the columns represent the values ​​of variable B. Each cell in the table represents the probability of a certain value of A occurring under the condition of a certain value of B. The purpose of the conditional probability table is to describe and measure the conditional probability relationship between variables, and it can be used to infer, predict and analyze the dependency between variables. By observing and analyzing the conditional probability table, the correlation between variables can be understood, and effective reasoning and decision-making can be made based on this information.

[0120] When it comes to conditional probabilities with multiple parent nodes, an extended form of the conditional probability table is often used, called a joint conditional probability table or joint probability table. A joint conditional probability table is a table used to describe the relationship between multiple variables. It takes into account all combinations of parent node values ​​and shows the probability of the child nodes given the values ​​of these parent nodes. In a joint conditional probability table, each column represents the value of a child node, and each combination of parent node values ​​corresponds to a row. Each cell represents the probability of a child node given a combination of parent node values. Joint conditional probability tables are very useful for modeling complex probabilistic relationships and making inferences. By observing and analyzing joint conditional probability tables, we can understand the dependencies between multiple variables and make effective probabilistic inferences and decisions.

[0121] Furthermore, in step S23, the model parameters obtained by data parameterization processing are used to construct a conditional probability table of the correlation between each key processing parameter and the model parameters of the product quality situation. Specifically, for each variable parameter, given its parent node, its joint conditional probability at the parent node is calculated, and the formula is:

[0122] ,

[0123] ,

[0124] In the formula, P ( U ) is represented as a set of nodes U = B 1 , B 2 ,……, B n The joint conditional probability of Pa ( B i ) is a node in the Bayesian network B i The parent node set of P ( B i ) represents the target node B i The prior probability of .

[0125] Furthermore, the Bayesian network model also uses residual analysis or model fit to evaluate the prediction performance of the model.

[0126] In Bayesian network models, residual analysis and model fit assessment are often used to evaluate the predictive accuracy and fit of the model. These methods can help understand the performance and predictive ability of the model on the training data.

[0127] Residual analysis evaluates the accuracy of the model by calculating the difference between the actual observations and the model's predictions. For Bayesian network models, you can calculate the residuals (actual observations minus model predictions) for each observed variable and then analyze the distribution and pattern of the residuals. If the residuals meet certain assumptions (for example, they follow a normal distribution) and have no obvious structure or trend, this may indicate that the model has a high predictive accuracy. On the contrary, if there are systematic patterns, trends, or outliers in the residuals, it may be necessary to further improve the model or correct the data.

[0128] Model fit evaluation is to evaluate the fit of the model based on the performance of the model on the training data. Common indicators include the log-likelihood function value (Log-Likelihood) and the Bayesian Information Criterion (BIC). The log-likelihood function value measures the fit of the model on the observed data. The higher the value, the better the fit. BIC is an indicator that comprehensively considers the complexity and fit of the model. A lower BIC value indicates that the model better balances complexity and fit.

[0129] In addition to residual analysis and model fit assessment, there are many other methods that can be used to evaluate the predictive accuracy of Bayesian network models, such as cross-validation and leave-one-out method.

[0130] Furthermore, in the parameter adjustment module, monitoring the current processing parameters and adjusting the processing parameters according to the relationship between the processing parameters and the product quality conditions includes the following steps:

[0131] Obtain key processing parameters for a time series at a specific time step;

[0132] Input key processing parameters into the trained Bayesian network model to predict product quality;

[0133] When the qualified rate of product quality is lower than the preset qualified rate threshold, the key processing parameters are adjusted.

[0134] Beneficial effects of the present invention:

[0135] By recording the processing parameters of the CNC machine tool during the mold processing process, as well as the final product quality; based on the recorded and stored CNC machine tool data, a random forest model is used to identify the key processing parameters that have a significant impact on the product quality; a Bayesian network model is used to quantify the relationship between the key processing parameters and the product quality; based on the relationship between the processing parameters and the product quality, the current processing parameters are monitored and adjusted to ensure that the product qualification rate meets the standard. The present invention solves the problem that the prior art is difficult to identify the processing parameters that have a significant impact on product quality, and is difficult to quantify the relationship between the processing parameters and the product qualification rate, resulting in low efficiency in product quality monitoring of CNC machine tools and inaccurate control of processing parameters.

[0136] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A monitoring system for CNC machine tools, Features: It includes a data recording module, a data analysis module and a parameter adjustment module, wherein the data recording module, the data analysis module and the parameter adjustment module are communicatively connected, wherein: The data recording module is used to record the processing parameters of the CNC machine tool during the processing of the mold, as well as the final product quality, and the product quality includes qualified and unqualified; The data analysis module is used to analyze the relationship between the processing parameters and the product quality according to the recorded and stored CNC machine tool data, and includes the following steps: S1. Using a random forest model to identify key processing parameters that have a significant impact on product quality; the random forest model includes the following construction steps: S11. Randomly extract from the dataset L samples as training set; S12, random non-repetitive extraction N The processing parameter variables are used as the split points, and the Gini coefficient is used to determine the best split points for the product quality situation variables to generate a decision tree; S13, repeat M The operation of steps S11-S12 yields M decision trees to generate random forests; S14, calculate the prediction error of each decision tree in the random forest for out-of-bag data; S15, adding random disturbances of processing parameter variables in out-of-bag data, and calculating the prediction error of each decision tree of the random forest for the random disturbances; S16. Sort the importance of processing parameter variables according to the prediction error of random forest for out-of-bag data; S17. Before selecting importance ranking n The processing parameter variables are taken as key processing parameters; S2. Using a Bayesian network model to quantify the relationship between key processing parameters and product quality; the Bayesian network model includes the following construction steps: S21. Determine the model connection relationship: take the key processing parameters as the parent node and the product quality status as the child node, connect the parent node and the child node to form a Bayesian network model structure; S22, data parameterization processing: estimating model parameters of key processing parameters and product quality conditions according to preset standards; S23, constructing a conditional probability table: constructing a conditional probability table of the correlation between each key processing parameter and the model parameters of the product quality condition according to the model parameters obtained by the data parameterization processing; In step S22, the key processing parameters and the model parameters of the transmission quality data are estimated according to the preset standards, specifically, the key processing parameters are divided into several level parameters by using the K-means clustering method; "qualified" and "unqualified" in the product quality situation are divided into two logical parameters of "yes" and "no" respectively; The parameter adjustment module is used to monitor the current processing parameters and adjust the processing parameters according to the relationship between the processing parameters and the product quality, so that the product qualification rate meets the standard.

2. A monitoring system for a CNC machine tool according to claim 1, Features: The machining parameters include cutting speed, feed rate, spindle speed, cutting depth and width, tool path, cooling and lubrication, and tool type and material.

3. A monitoring system for a CNC machine tool according to claim 1, Features: In step S13, the M A decision tree, M The value is determined as follows: by O Taking decision trees as the step size, random forests with different numbers of decision trees are generated; Calculate the prediction error of the random forest for the test sample; Select the random forest with the smallest prediction error and determine the number of decision trees M .

4. A monitoring system for a CNC machine tool according to claim 1, Features: In step S16, the importance of the processing parameter variables is ranked according to the prediction error of the random forest for the out-of-bag data, and the calculation formula is as follows: , Where: PIM Indicates the importance of processing parameter variables; M is the number of decision trees in the random forest; Indicates k The decision tree adds i The prediction error of out-of-bag data with random disturbances of processing parameter variables; Shidi k The prediction error of the tree decision on the out-of-bag data without adding random perturbations.

5. A monitoring system for a CNC machine tool according to claim 1, Features: The K-means clustering method is used to divide the key processing parameters into several level parameters, including the following steps: Normalization: normalize key processing parameters; Initialize cluster centers: randomly select several data objects in the data space as initial cluster centers; Initialize clusters: Calculate the Euclidean distance between all data objects and the initial cluster center, and divide each data object into the initial cluster center with the smallest Euclidean distance to form an initial cluster; Update cluster centers: Calculate the average value of the data objects in each initial cluster and use the average value as the new cluster center; Determine the final cluster: repeatedly calculate the Euclidean distance between all data objects and the new cluster center, divide each data object into the new cluster center with the smallest Euclidean distance to form a new cluster; calculate the average value of each new cluster as the new cluster center again until the new cluster center no longer changes, determine the final cluster, and determine the level parameters corresponding to each final cluster according to the key processing parameter data characteristics of the final cluster.

6. A monitoring system for a CNC machine tool according to claim 1, Features: In step S23, the model parameters obtained by data parameterization processing are used to construct a conditional probability table of the correlation between each key processing parameter and the model parameters of the product quality situation. Specifically, for each variable parameter, given its parent node, its joint conditional probability at the parent node is calculated, and the formula is: , , In the formula, P ( U ) is represented as a set of nodes U = B 1 , B 2 ,……, B n The joint conditional probability of Pa ( B i ) is a node in the Bayesian network B i The parent node set of P ( B i ) represents the target node B i The prior probability of .

7. A monitoring system for a CNC machine tool according to claim 1, Features: In the parameter adjustment module, the current processing parameters are monitored and adjusted according to the relationship between the processing parameters and the product quality, including the following steps: Obtain key processing parameters for a time series at a specific time step; Input key processing parameters into the trained Bayesian network model to predict product quality; When the qualified rate of product quality is lower than the preset qualified rate threshold, the key processing parameters are adjusted.