Cutter state detection method and device, computer device, readable storage medium and program product
By combining Bayesian hybrid expert networks and Gaussian process classifiers, the problems of lag and misjudgment in tool condition detection are solved, enabling accurate online monitoring and reliable quantification, thereby improving the quality and efficiency of engine cylinder head and other parts production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGFENG HONDA ENGINE CO LTD
- Filing Date
- 2026-02-12
- Publication Date
- 2026-06-12
Smart Images

Figure CN122196731A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine tool monitoring technology, and in particular to a tool condition detection method, device, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] In the automated production of precision parts such as engine cylinder heads, the health of the cutting tools directly determines the machining quality and production cost.
[0003] Traditional technologies typically rely on leak test data from post-processing machines to infer tool condition. This approach suffers from significant time lag; tool failure during machining often goes undetected until subsequent processes, easily leading to mass scrap and substantial economic losses. While some solutions attempt to incorporate monitoring technologies, existing deep learning models are largely black-box in nature. When faced with complex nonlinear machining conditions, this lack of uncertainty quantification makes assessment prone to misjudgments or missed detections. Consequently, the system cannot provide a safe and reliable basis for stopping and changing tools, failing to meet the demands of high-precision intelligent manufacturing. Summary of the Invention
[0004] Therefore, it is necessary to provide a tool condition detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the above-mentioned technical problems.
[0005] Firstly, this application provides a tool condition detection method, including:
[0006] Acquire vibration signal characteristics and machining data characteristics during the tool machining process;
[0007] The machining data features are input into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results. The Bayesian hybrid expert network includes multiple Bayesian expert networks, each of which is used to obtain a tool state prediction result for the tool belonging to the tool state corresponding to the Bayesian expert network. The tool states corresponding to the multiple Bayesian expert networks are different.
[0008] The probability distribution of the tool belonging to various tool states is determined by the Gaussian process classifier based on the vibration signal characteristics;
[0009] Based on the probability distribution, the state weights of the different tool states are determined; the state weights are used to characterize the network credibility of each of the multiple Bayesian expert networks.
[0010] Based on the network credibility and the multiple sets of tool state prediction results, the tool state detection result and the credibility of the tool state detection result are determined.
[0011] In one embodiment, the Bayesian hybrid expert network is trained through the following steps:
[0012] Obtain historical machining datasets and divide the historical machining datasets into multiple tool status sample sets according to tool status labels;
[0013] Using multiple tool state sample sets, the Bayesian expert network corresponding to different tool state sample sets is trained respectively;
[0014] Based on the multiple trained Bayesian expert networks, the Bayesian hybrid expert network is obtained.
[0015] In one embodiment, training the Bayesian expert network corresponding to different tool state sample sets using multiple tool state sample sets includes:
[0016] Obtain a loss function that includes a classification cross-entropy term and a physical constraint term; wherein, the physical constraint term is used to generate a penalty value during training when the predicted failure probability at the next processing time is less than the predicted failure probability at the previous processing time, based on the time series relationship of the tool state sample set.
[0017] Based on the tool state sample set and the loss function, the parameters of the Bayesian expert network are updated, and the Bayesian expert network is obtained when the preset training completion conditions are met.
[0018] In one embodiment, the propagation path of the Bayesian expert network includes a random dropout layer. The machining data features are input into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results, including:
[0019] Based on the processed data features, the Bayesian expert network in the Bayesian hybrid expert network performs a preset number of inferences, generating multiple output results corresponding to the preset number of inferences; wherein, in each inference process, different combinations of neurons are discarded through the random discard layer, generating different output results;
[0020] Based on the multiple output results generated by each of the Bayesian expert networks, multiple sets of tool state prediction results are determined.
[0021] In one embodiment, determining the tool state detection result and the reliability of the tool state detection result based on the network reliability and the multiple sets of tool state prediction results includes:
[0022] Based on the network credibility and the tool state prediction results output by each of the multiple Bayesian expert networks, a fusion prediction value corresponding to each group of tool state prediction results is determined.
[0023] Based on the fused prediction value corresponding to each group of tool state prediction results, a prediction distribution set is constructed.
[0024] The tool condition detection result is determined based on the mean of the predicted distribution set;
[0025] The confidence level is determined based on the variance or information entropy of the predicted distribution set.
[0026] In one embodiment, the Gaussian process classifier includes a covariance kernel function that combines a radial basis function and a white noise kernel function, wherein the radial basis function is used to indicate the gradual characteristics of tool degradation.
[0027] The step of determining the probability distribution of the tool belonging to various tool states by the Gaussian process classifier based on the vibration signal characteristics includes:
[0028] The covariance kernel function is used to determine multiple similarities between the vibration signal features and the sample features corresponding to different tool state sample sets.
[0029] Based on the multiple similarities, the probability distribution of belonging to each of the various tool states is determined.
[0030] Secondly, this application also provides a tool condition detection device, comprising:
[0031] The feature acquisition module is used to acquire vibration signal features and machining data features during the tool machining process;
[0032] The Bayesian network prediction module is used to input the machining data features into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results. The Bayesian hybrid expert network includes multiple Bayesian expert networks, each of which is used to obtain a tool state prediction result indicating that the tool belongs to the tool state corresponding to that Bayesian expert network. The tool states corresponding to the multiple Bayesian expert networks are different.
[0033] A Gaussian classification module is used to determine the probability distribution of the tool belonging to various tool states based on the vibration signal characteristics by a Gaussian process classifier.
[0034] The weight determination module is used to determine the state weights of the different tool states according to the probability distribution; the state weights are used to characterize the network credibility of the multiple Bayesian expert networks.
[0035] The tool detection status determination module is used to determine the tool status detection result and the reliability of the tool status detection result based on the network reliability and the multiple sets of tool status prediction results.
[0036] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0037] Acquire vibration signal characteristics and machining data characteristics during the tool machining process;
[0038] The machining data features are input into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results. The Bayesian hybrid expert network includes multiple Bayesian expert networks, each of which is used to obtain a tool state prediction result for the tool belonging to the tool state corresponding to the Bayesian expert network. The tool states corresponding to the multiple Bayesian expert networks are different.
[0039] The probability distribution of the tool belonging to various tool states is determined by the Gaussian process classifier based on the vibration signal characteristics;
[0040] Based on the probability distribution, the state weights of the different tool states are determined; the state weights are used to characterize the network credibility of each of the multiple Bayesian expert networks.
[0041] Based on the network credibility and the multiple sets of tool state prediction results, the tool state detection result and the credibility of the tool state detection result are determined.
[0042] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0043] Acquire vibration signal characteristics and machining data characteristics during the tool machining process;
[0044] The machining data features are input into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results. The Bayesian hybrid expert network includes multiple Bayesian expert networks, each of which is used to obtain a tool state prediction result for the tool belonging to the tool state corresponding to the Bayesian expert network. The tool states corresponding to the multiple Bayesian expert networks are different.
[0045] The probability distribution of the tool belonging to various tool states is determined by the Gaussian process classifier based on the vibration signal characteristics;
[0046] Based on the probability distribution, the state weights of the different tool states are determined; the state weights are used to characterize the network credibility of each of the multiple Bayesian expert networks.
[0047] Based on the network credibility and the multiple sets of tool state prediction results, the tool state detection result and the credibility of the tool state detection result are determined.
[0048] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0049] Acquire vibration signal characteristics and machining data characteristics during the tool machining process;
[0050] The machining data features are input into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results. The Bayesian hybrid expert network includes multiple Bayesian expert networks, each of which is used to obtain a tool state prediction result for the tool belonging to the tool state corresponding to the Bayesian expert network. The tool states corresponding to the multiple Bayesian expert networks are different.
[0051] The probability distribution of the tool belonging to various tool states is determined by the Gaussian process classifier based on the vibration signal characteristics;
[0052] Based on the probability distribution, the state weights of the different tool states are determined; the state weights are used to characterize the network credibility of each of the multiple Bayesian expert networks.
[0053] Based on the network credibility and the multiple sets of tool state prediction results, the tool state detection result and the credibility of the tool state detection result are determined.
[0054] The aforementioned tool condition detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire vibration signal characteristics and machining data characteristics during tool processing; input the machining data characteristics into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data characteristics and outputs multiple sets of tool condition prediction results; the Bayesian hybrid expert network includes multiple Bayesian expert networks, each used to obtain a tool condition prediction result indicating that the tool belongs to the tool condition corresponding to that Bayesian expert network, and the tool conditions corresponding to each Bayesian expert network are different; a Gaussian process classifier determines the probability distribution of the tool belonging to various tool conditions based on the vibration signal characteristics; based on the probability distribution, the state weights of different tool conditions are determined; the state weights are used to characterize the network credibility of each of the multiple Bayesian expert networks; based on the network credibility and the multiple sets of tool condition prediction results, the tool condition detection result and the credibility of the tool condition detection result are determined. In this application, by fusing vibration signals sensitive to microscopic changes with machining data reflecting macroscopic physical processes, and using a Gaussian process classifier to dynamically establish the state weights of each Bayesian expert network based on the probability distribution generated by vibration features, cross-modal attention allocation guided by vibration priors for machining inference is achieved, effectively solving the problem of feature decoupling of multi-source data at different degradation stages. At the same time, by constructing a prediction distribution through multiple random inferences performed by a Bayesian hybrid expert network, the credibility of the detection results can be quantified while outputting the tool status, thus providing a clear uncertainty boundary when the system faces unknown or ambiguous working conditions, significantly improving the accuracy of online monitoring. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 This is a flowchart illustrating a tool state detection method in one embodiment;
[0057] Figure 2 This is a schematic diagram of the process for determining weights via a network control network in one embodiment;
[0058] Figure 3 This is a network diagram of a Bayesian expert network in one embodiment;
[0059] Figure 4 This is a schematic diagram of the process for determining the tool detection status result in one embodiment;
[0060] Figure 5 This is a schematic diagram of the process of predicting tool state using a Gaussian classifier in one embodiment;
[0061] Figure 6 This is a flowchart illustrating the tool state detection method in another embodiment;
[0062] Figure 7 This is a schematic diagram of the feature extraction and feature preprocessing process in one embodiment;
[0063] Figure 8 This is a structural block diagram of a tool condition detection device in one embodiment;
[0064] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0066] The method provided in this invention can be applied to an industrial monitoring system architecture. This system architecture may include a terminal and a processing device (Hyper Machining Center, HCR) that interacts with it via a communication network. In this embodiment, the processing device can be an automated mechanical device for performing precision cutting or metal processing tasks, and its internal or external components may be equipped with sensor components for sensing physical states. During operation, the processing device can generate multi-source heterogeneous data, such as raw electrical signals reflecting mechanical vibrations and time-series data recording the device's operating parameters.
[0067] A terminal can be an electronic device with computing and data communication capabilities. Specifically, it can take the form of an edge computing node or an industrial control computer deployed on a production site. The terminal establishes a physical or logical connection with the processing equipment through a communication network to receive or retrieve various signal characteristics generated by the processing equipment in real time.
[0068] In one optional operating scenario, when the machining equipment executes specific machining logic, sensor components can capture vibration fluctuations generated by the interaction between the tool and the workpiece. The terminal, acting as the core control and evaluation entity, acquires this multi-dimensional feature information through a preset data interface and utilizes its built-in probabilistic inference model and expert network algorithm to perform online evaluation and uncertainty quantification of the tool's current health status. The evaluation results can be output in real time by the terminal or fed back to the machining equipment via the network to trigger closed-loop control commands, thereby achieving intelligent management of the machining process.
[0069] In one exemplary embodiment, such as Figure 1 As shown, a tool state detection method is provided. Taking a terminal using the above embodiment as an example, the method includes the following steps S102 to S110. Wherein:
[0070] Step S102: Obtain the vibration signal characteristics and machining data characteristics during the tool machining process.
[0071] Among them, vibration signal characteristics can usually be generated based on high-frequency fluctuation data captured by microphones or accelerometers deployed at the processing site. By performing time-domain analysis, frequency-domain transformation, or time-frequency joint analysis on discrete raw signals, the extracted indicators can cover sensitive parameters reflecting system stability, such as root mean square value, peak factor, spectral energy distribution, and signal entropy value.
[0072] Machining data features can be acquired based on intrinsic time-series data from the CNC system, such as basic parameters including spindle speed, feed rate, axial coordinate position, spindle load current, and motor power. These parameters can then be used to construct statistics reflecting energy consumption rates or machining resistance fluctuations. This set of features can be preprocessed through dimensional normalization and linear or nonlinear mapping to transform it into feature vectors conforming to the input specifications of a probabilistic model, thus providing data source support for subsequent heterogeneous data fusion and state inference.
[0073] Specifically, regarding the acquisition of vibration signal characteristics, during the processing, in-depth time-domain analysis can be performed on the acquired raw vibration signals. Specifically, the root mean square (RMS) value of the signal sequence can be calculated to characterize the average energy of the signal, kurtosis can be calculated to reflect the strength of the impact component in the signal, the crease factor can be calculated to detect the presence of abnormal impacts in the signal, and the shape factor can be calculated to describe the characteristics of the waveform shape. The statistical quantities obtained from the above calculations are then used as the corresponding vibration signal characteristics in the time domain.
[0074] Specifically, vibration signal characteristics are represented differently in different domains. For example, in the time domain, the root mean square (RMS) value of the signal sequence can be calculated to characterize the average energy of the signal, kurtosis can be calculated to reflect the strength of the impact component in the signal, the crease factor can be calculated to detect whether there is an abnormal impact in the signal, and the shape factor can be calculated to describe the waveform shape characteristics. The statistical quantities obtained from the above calculations are used as the vibration signal characteristics corresponding to the time domain. In the frequency domain, the frequency corresponding to the largest amplitude in the power spectrum can be extracted as the dominant frequency characteristic to indicate the main vibration frequency of the signal, the central trend of the power spectrum can be calculated as the average frequency, the dispersion of the frequency distribution can be calculated as the frequency standard deviation, and the concentration point of the spectral energy can be calculated as the spectral centroid. The statistical quantities obtained from the above calculations are used as the vibration signal characteristics corresponding to the frequency domain. In addition, in order to characterize the non-stationary characteristics of the signal, the signal can be divided into different frequency bands such as low frequency, mid frequency, and high frequency for time-frequency domain analysis. Specifically, the ratio of energy within a specified frequency band to total energy can be calculated as an energy proportion feature to reflect the distribution changes of energy in different frequency bands. The entropy value of the energy of each node after wavelet packet decomposition can be used as the wavelet packet energy entropy feature to characterize the complexity and uncertainty of signal energy. The above vibration signal features are shown in Table 1.
[0075] Table 1 Vibration signal characteristics
[0076]
[0077] To acquire machining data features, a combination of basic data acquisition, statistical calculation, and physical construction can be adopted. First, time-series data such as Z-axis coordinates, spindle load, speed, and motor temperature can be directly read from the CNC system as basic features. Second, the mean of the time-series data for each machining cycle can be calculated to characterize the process average level, the standard deviation can be calculated to characterize process stability and fluctuation, and the kurtosis can be calculated to detect abnormal impacts on the machining load. Simultaneously, the minimum, maximum, median, quartiles, skewness, and kurtosis are calculated, and this series of statistical quantities serves as the statistical machining data features describing each machining cycle. More importantly, domain knowledge can be used to perform calculations on the basic data to construct structural features that more directly reflect the physical process. Specifically, this includes: calculating the cumulative sum of the Z-axis coordinates to reflect the total workload, which is used as the cumulative machining volume characteristic; calculating the ratio of the first-order difference of the spindle load to the rotational speed to reflect the instantaneous change in machining resistance, which is used as the load change rate characteristic; calculating the moving average and maximum values of the spindle load within a certain window size to smooth noise and capture trends, which are used as the rolling average load characteristic and the rolling maximum temperature characteristic, respectively; calculating the ratio of the spindle load to the motor temperature to monitor machining efficiency and thermal management status, which is used as the load temperature ratio characteristic; calculating the product of the spindle load and the rotational speed to estimate the energy consumption of a single machining operation, which is used as the energy consumption characteristic; calculating the standard deviation of the spindle load to characterize the stability of the machining process, which is used as the load fluctuation characteristic; and calculating the first-order difference of the Z-axis coordinates to reflect the smoothness of the feed motion, which is used as the Z-axis variation characteristic. The machining data characteristics obtained above are shown in Table 2.
[0078] Table 2 Processing Data Characteristics Table
[0079]
[0080] Optionally, after obtaining the vibration signal features and processing data features, the feature set can be preprocessed to address potential redundancy and high dimensionality issues. Specifically, the Pearson correlation coefficient matrix of all features can be calculated, feature pairs with an absolute correlation coefficient greater than a preset first threshold (e.g., 0.95) can be identified, and one of these features can be removed as a redundancy removal process. Principal Component Analysis (PCA) is then used to reduce the dimensionality of the retained features. PCA solves for the feature covariance matrix. The eigenvalues and eigenvectors are used to project the original data onto a new orthogonal basis, where N is the number of samples and X is the matrix formed by the features. Before selection... Each principal component is assigned a cumulative variance contribution rate greater than 95%, which maps the features to a low-dimensional space. This retains most of the information while reducing computational cost and mitigating the risk of overfitting.
[0081] Alternatively, StandardScaler can be used to standardize the features using Z-score, making their mean 0 and variance 1, i.e.: ,in and Features mean and standard deviation
[0082] Step S104: Input the machining data features into the trained Bayesian hybrid expert network. The Bayesian hybrid expert network performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results. The Bayesian hybrid expert network includes multiple Bayesian expert networks. Each Bayesian expert network is used to obtain the tool state prediction result of the tool belonging to the tool state corresponding to the Bayesian expert network. The tool states corresponding to the multiple Bayesian expert networks are different.
[0083] Bayesian hybrid expert networks (HBRs) are deep learning prediction models that integrate Bayesian probability theory with a hybrid expert system architecture. They provide probabilistically interpretable evaluation results when dealing with nonlinear time-varying data. Typically, they consist of several sub-network structures (i.e., Bayesian expert networks) focused on different feature patterns or physical states, working in parallel. These sub-networks collaborate based on the distribution characteristics of the input data. A key characteristic distinguishing this network from traditional deterministic neural networks is the inclusion of a stochastic mechanism in its inference process. This involves introducing probability distributions into the network parameters, structure, or activation states, ensuring that each computation on the same input sample produces a statistically distinct output. This allows for the construction of a posterior predictive distribution of the target variable through multiple computations.
[0084] Tool status can be a comprehensive classification and description of the physical structural integrity and operational performance reliability of a tool throughout its entire life cycle of performing a cutting task. It is used to characterize the degree of degradation of the tool from complete failure. Specifically, it can include a healthy state with a sharp cutting edge and stable cutting force, an early warning state with micro-wear or slight vibration abnormalities but still able to maintain machining tolerances, and a fault state with chipping, severe wear or breakage, which makes it impossible to guarantee machining quality.
[0085] Specifically, the preprocessed and dimensionality-reduced feature vectors of the machining data from the preceding steps can be used as input data for a Bayesian hybrid expert network. Upon receiving the input, the network can initiate an internal stochastic inference mechanism, driving it to perform a preset number of forward computations (e.g., N times) on the same set of input features as multiple inferences. During this process, the weight parameters or neuron connection states within the network can undergo slight random perturbations according to a preset probability model, resulting in slightly different numerical values for the output vectors generated in each forward computation. Finally, the terminal uses the set of all output vectors generated from these N inferences as multiple sets of tool status prediction results. This set of results statistically constitutes a predicted probability distribution regarding the current health status of the tool.
[0086] For example, to achieve refined modeling of the complex degradation process of cutting tools, a Bayesian hybrid expert network can include multiple Bayesian expert networks corresponding to different physical states of the cutting tool. For instance, expert sub-modules representing "healthy state," "warning state," and "fault state" can be pre-defined. During the inference phase, each Bayesian expert network can independently interpret the features of the input machining data and calculate the probability value of the tool belonging to its corresponding state. Through the aforementioned multiple inference mechanism, each expert network will output a series of fluctuating probability estimates (e.g., N health probabilities, N fault probabilities, etc.). This multi-set output not only provides state estimates but also intuitively reflects the expert network's confidence in the current input data through the dispersion of the results (e.g., variance).
[0087] Step S106: The Gaussian process classifier determines the probability distribution of the tool belonging to various tool states based on the vibration signal characteristics.
[0088] The Gaussian Process Classifier (GPC) is a probabilistic prediction model built on Bayesian nonparametric statistical theory. It does not require pre-setting fixed model structure parameters; instead, it describes the distribution characteristics of the latent function by defining a mean function and a covariance kernel function, assuming that the function values corresponding to any finite number of input samples follow a joint Gaussian distribution. This classifier not only uses the kernel function to measure the similarity between input features to drive classification decisions but also automatically optimizes hyperparameters through integral marginal likelihood. Finally, it maps the latent Gaussian distribution to the (0, 1) interval using response functions such as Sigmoid or Softmax, outputting the posterior probability values of the tool belonging to each category.
[0089] Specifically, the terminal can input the extracted time-domain, frequency-domain, and time-frequency-domain vibration signal feature vectors into a pre-built Gaussian process classifier, use the kernel function inside the classifier to calculate the covariance matrix between the current input features and the historical training sample features, and use the posterior probability vector derived based on the covariance matrix as the probability distribution.
[0090] For example, a linear combination of the radial basis function (RBF) and the white noise kernel function can be selected as the covariance kernel function. The RBF is used to characterize the smooth, gradual nature of tool degradation, while the white noise kernel function is used to model the random noise in the data. During inference, the GPC model calculates the latent function distribution based on this combined kernel function. Due to the non-Gaussian likelihood nature of the classification task, the posterior distribution can be approximated using the Laplace approximation or the expectation propagation algorithm. The final output is a set of probability values indicating whether the tool belongs to "healthy state," "warning state," or "fault state," and this set of probability values is used as the prior probability distribution for generating subsequent gating weights.
[0091] Step S108: Determine the state weights for different tool states based on the probability distribution. The state weights are used to characterize the network credibility of each of the multiple Bayesian expert networks.
[0092] Among them, the state weights can be a set of numerical coefficients used to adjust the decision influence of each sub-model within the hybrid expert network. They are usually represented as normalized vectors with a sum of 1, reflecting the degree of confidence in which preset physical mode the current input data is more in line with. They are used in the decision-making stage to weight the output results of each Bayesian expert network based on the prior knowledge provided by the Gaussian process classifier.
[0093] For example, such as Figure 2 As shown, the probability distribution output by the Gaussian process classifier (e.g., [p_healthy, p_warning, p_fault], representing health probability, warning probability, and fault probability) can be input into a pre-defined gating network for recalculation. The new probability distribution obtained through nonlinear computation in the hidden layer of the gating function, smoothed by the softmax function, becomes the state weight. For example, when the warning probability output by the Gaussian process classifier is slightly higher than other states, this value can be further amplified through the hidden layer of the gating network, thereby generating a more targeted weight vector to ensure that subsequent decisions are biased towards the warning state in the Bayesian expert network.
[0094] Step S110: Based on the network credibility and multiple sets of tool status prediction results, determine the tool status detection results and the credibility of the tool status detection results.
[0095] Tool condition detection results are typically obtained by averaging Bayesian models and calculating the expected value of probability distributions generated from multiple random inferences. This value characterizes the most likely physical health classification of the tool (e.g., healthy, warning, or faulty). The reliability of tool condition detection results is a quantitative measure of the uncertainty accompanying the decision-making process. It can be constructed based on the dispersion of the predicted distribution (e.g., variance) or the degree of information confusion (e.g., entropy). This reliability helps distinguish whether the model's ambiguity stems from data noise (random uncertainty) or from never having seen the current operating condition before (cognitive uncertainty), thus providing a safety boundary for downtime or tool change operations on automated production lines.
[0096] Specifically, based on the network credibility, a weighted fusion operation can first be performed on multiple sets of tool condition prediction results to integrate the prediction contributions of different expert networks under the current working condition, and the fused data distribution can be used as a comprehensive prediction distribution. Subsequently, a unique category label can be determined as the tool condition detection result based on the statistical central trend (such as the direction of the maximum probability) of the comprehensive prediction distribution. At the same time, uncertainty quantification calculation can be performed based on the statistical dispersion or information disorder of the comprehensive prediction distribution, and the calculated quantified value can be used as the credibility of the tool condition detection result.
[0097] In this embodiment, by fusing vibration signals sensitive to microscopic changes with machining data reflecting macroscopic physical processes, and using a Gaussian process classifier to dynamically establish the state weights of each Bayesian expert network based on the probability distribution generated by vibration features, cross-modal attention allocation guided by vibration priors for machining inference is achieved, effectively solving the problem of feature decoupling of multi-source data at different degradation stages. At the same time, by constructing a prediction distribution through multiple random inferences performed by a Bayesian hybrid expert network, the reliability of the detection results can be quantified while outputting the tool status, thus providing a clear uncertainty boundary when the system faces unknown or ambiguous working conditions, significantly improving the accuracy of online monitoring.
[0098] In one embodiment, the Bayesian hybrid expert network is trained through the following steps:
[0099] Obtain historical machining datasets and divide them into multiple tool state sample sets based on tool state labels; train Bayesian expert networks corresponding to different tool state sample sets using these multiple tool state sample sets; and obtain a Bayesian hybrid expert network based on the trained multiple Bayesian expert networks.
[0100] Among them, the historical machining dataset can be a set of original records accumulated in long-term industrial production activities, containing complete information on the entire life cycle of the cutting tool. For example, vibration waveforms and CNC operating parameters in all machining cycles from the installation of a new tool to the scrapping of the tool, and associated with clear maintenance logs (such as tool change time points) and quality inspection reports (such as workpiece leak test results).
[0101] Tool status sample sets can be subsets formed by decomposing historical machining datasets based on specific physical state labels. For example, a health set including normal cutting data, a warning set including minor wear data, and a fault set including failure features. These sample sets are used to train a Bayesian expert network specifically for a particular degradation stage, thereby achieving decoupled learning of complex fault modes.
[0102] Specifically, vibration signal files and machine tool operation logs generated by all tools during machining over a past period (e.g., six months or one year) can be extracted from the CNC system or historical database as the original data source. Subsequently, based on the on-site tool change records and the quality inspection results after the workpiece is completed (e.g., airtightness test data), the samples for each machining cycle are labeled with the following status: samples during the new tool break-in period and stable cutting period are labeled as healthy; samples where quality inspection data begins to fluctuate but is not yet out of tolerance are labeled as warnings; and samples that fail quality inspection or are before a forced tool change are labeled as faults. This series of time-series datasets with clear physical labels is then combined into a historical machining dataset. Further, to evaluate the model's generalization ability, this historical machining dataset can be randomly divided into a training set, a validation set, and a test set according to a preset ratio (e.g., 7:2:1). In the training set, the data is further physically isolated based on the aforementioned labels: all sample sequences labeled as healthy are selected as the healthy tool status sample set; all sample sequences labeled as warnings are selected as the warning tool status sample set; and all sample sequences labeled as faults are selected as the faulty tool status sample set.
[0103] Using a healthy tool state sample set as input, the first set of network parameters is updated by minimizing the reconstruction error or classification loss function to obtain a sub-model capable of recognizing normal machining patterns, which serves as the healthy state Bayesian expert network. Using a warning tool state sample set as input, the second set of network parameters is trained to obtain a sub-model capable of capturing early degradation features, which serves as the warning state Bayesian expert network. Using a faulty tool state sample set as input, the third set of network parameters is trained to obtain a sub-model capable of judging failure behavior, which serves as the faulty state Bayesian expert network.
[0104] The three independently trained Bayesian expert networks are integrated in parallel into a unified topology, and the connection interfaces between them and the gating network are initialized. This integrated composite model is used as a Bayesian hybrid expert network for subsequent online inference tasks.
[0105] In this embodiment, the dataset partitioning and independent training strategy based on physical state labels, compared to training a single model by mixing all data together, effectively avoids the mutual interference of feature distributions under different health states, and significantly improves the feature sensitivity of each expert network to its specific responsible stage.
[0106] In one embodiment, Bayesian expert networks corresponding to different tool state sample sets are trained using multiple tool state sample sets, including:
[0107] Obtain a loss function that includes a classification cross-entropy term and a physical constraint term. The physical constraint term is used to generate a penalty value during training when the predicted failure probability at the next processing time is less than the predicted failure probability at the previous processing time, based on the time series relationship of the tool state sample set. Based on the tool state sample set and the loss function, update the parameters of the Bayesian expert network. Under the condition of satisfying the preset training completion conditions, the Bayesian expert network is obtained.
[0108] Among them, the classification cross-entropy term is used to measure the relative entropy or information difference between the predicted probability distribution of the model output and the true physical state label of the sample.
[0109] Physical constraints can be penalty components built based on prior knowledge of the monotonic degradation of tool performance. They are used to constrain the predictive behavior of the model in the time series dimension, preventing it from generating predictive trajectories that violate tool operation axioms in unsupervised or weakly supervised regions (e.g., the failure probability decreases as machining time progresses).
[0110] Specifically, the predicted probability distribution of the Bayesian expert network output for the current training batch of samples and the corresponding true state labels of the samples can be obtained. The difference between the two can be calculated using the log-likelihood formula as the classification cross-entropy term to ensure that the model has basic classification and recognition capabilities. Simultaneously, to introduce physical guidance, sample features of the same tool at two adjacent processing times (e.g., the previous processing time and the next processing time) can be input into the network, and the predicted probability of the fault state output by the model at these two times can be obtained respectively. Then, a one-sided activation logic (such as the ReLU function) is used to compare and determine these two probability values: if the fault probability at the next time time is less than the fault probability at the previous time time, it is determined that a violation of physical laws has occurred, and the square or absolute value of the difference is multiplied by a preset penalty weight coefficient as a physical constraint term; if the fault probability remains constant or increases over time, no penalty value is generated. Finally, the calculated classification cross-entropy term and the physical constraint term are weighted and summed to calculate the loss function.
[0111] Based on the loss function constructed above, the gradient vector of the loss function with respect to the weight parameters of each layer in the Bayesian expert network can be calculated using the backpropagation algorithm. Then, optimizers such as Stochastic Gradient Descent (SGD) or Adaptive Moment Estimation (Adam) can be used to fine-tune and update the parameters along the gradient descent direction. Specifically, the WarmupCosineAnnealingLR strategy is adopted, and in the warmup phase, the learning rate is... The learning rate increases linearly from 0 to a set value. During the cosine annealing phase, the learning rate decays according to the following formula: ,in To minimize the learning rate, To achieve the maximum learning rate, This represents the current training iteration number (epoch). For the number of warmup epochs, This represents the total number of epochs. Simultaneously, the AdamW optimizer is used during the training phase, and its update rule incorporates decoupled weight decay into the Adam optimizer's algorithm: ,in This is the decay rate, also known as the weight decay coefficient. It is a first-order moment estimate. It is a second-order moment estimate. , This is for learning parameters. Alternatively, a Monte Carlo dropout layer can be used, where neurons are randomly dropped during forward propagation for updates.
[0112] This iterative update process continues until the value of the loss function converges to a preset minimum threshold range, or the number of training iterations reaches a preset upper limit. At this point, it is determined that the preset training completion condition is met, thus obtaining a trained Bayesian expert network.
[0113] In this embodiment, by introducing a physical constraint term into the classification loss function, the physical axiom of "irreversible tool wear" is embedded into the weight structure of the Bayesian expert network, which greatly enhances the interpretability and logical consistency of tool condition detection in industrial settings.
[0114] In one embodiment, a random dropout layer is included in the propagation path of the Bayesian expert network. Machining data features are input into a trained Bayesian hybrid expert network, which performs multiple inferences based on these features, outputting multiple sets of tool state prediction results, including:
[0115] Based on the characteristics of the machining data, the Bayesian expert network in the Bayesian hybrid expert network performs a preset number of inferences, generating multiple output results corresponding to the preset number of inferences. In each inference process, different combinations of neurons are discarded through a random discard layer to generate different output results. Based on the multiple output results generated by each Bayesian expert network, multiple sets of tool state prediction results are determined.
[0116] The random dropout layer can be a regularization component embedded in the propagation path of a Bayesian expert network. It can generate a binary mask based on the Bernoulli distribution to temporarily block the activation state of some neurons during signal propagation.
[0117] Specifically, such as Figure 3 As shown, a dropout layer can be deployed between fully connected or convolutional layers in a Bayesian expert network. During the inference phase of online monitoring, this layer is explicitly kept active. For each independent forward propagation computation, the Bernoulli distribution of the network parameters can be sampled to generate a binary mask vector with the same number of neurons in that layer. This mask vector is then element-wise multiplied with the current weight matrix or activation output as an operation to drop out different combinations of neurons through the dropout layer. This process can be specifically represented by the following formula: ,in The discard mask for the t-th forward propagation , Let be the weight matrix, and y represent the output of the randomly dropped layer.
[0118] Secondly, a cyclic sampling mechanism can be constructed for the execution flow of multiple inferences. Specifically, for the same set of input processing data features, each Bayesian expert network in the Bayesian hybrid expert network is driven to perform a preset number of forward propagations. In each propagation step, the random dropout layer inside the network independently regenerates the aforementioned binary mask, making the network structure at the current moment actually a random sparse subgraph of the original full network. At this time, the network calculates the output vector based on this sparse subgraph and uses this calculation result as one of multiple output results corresponding to the preset number of generation times.
[0119] Finally, to determine the prediction results, the output vectors generated during the above iterative process are collected. The set of probability vectors obtained from these multiple random forward propagations, which fluctuate numerically due to minor differences in network structure, is summarized and directly mapped as multiple sets of tool state prediction results. This process essentially approximates a complex Bayesian posterior integral using a Monte Carlo sampling distribution, thereby obtaining a complete prediction profile containing uncertainties without changing the number of network parameters.
[0120] In this embodiment, by maintaining the activation of the random dropout layer and performing multiple forward propagations during the inference phase, this method utilizes Monte Carlo Dropout technology. Compared to the huge computational overhead caused by the need to model each weight parameter in traditional Bayesian neural networks, this embodiment can capture the cognitive uncertainty of the model through simple binary masking operations, thereby avoiding the risk of traditional models being blindly confident in unknown areas and greatly improving the safety boundary and interpretability of the system.
[0121] In one embodiment, the tool state detection result and the reliability of the tool state detection result are determined based on the network credibility and multiple sets of tool state prediction results, including:
[0122] Based on the network credibility and the tool state prediction results output by multiple Bayesian expert networks, the fused prediction value corresponding to each group of tool state prediction results is determined; based on the fused prediction value corresponding to each group of tool state prediction results, a prediction distribution set is constructed; based on the mean of the prediction distribution set, the tool state detection result is determined; based on the variance or information entropy of the prediction distribution set, the credibility is determined.
[0123] The fused prediction value can be an instantaneous evaluation vector generated by integrating the local judgments of different expert networks based on a gating mechanism during a single random inference process. It reflects the temporary prediction of the tool state under specific random perturbations. The prediction distribution set can be the entire set of fused prediction values accumulated through multiple inferences, constituting an empirical distribution describing the posterior probability of the tool state.
[0124] Specifically, such as Figure 4As shown, for the t-th forward propagation performed on the Bayesian hybrid expert network, the predicted probability vectors of the health, early warning, and fault expert networks output by this inference are obtained (denoted as ). , , ), and combined with the state weights determined by the Gaussian process classifier ( ,and According to the linear weighting formula The calculation is performed, and the resulting weighted sum vector is used as the fusion prediction value corresponding to this inference. Subsequently, all the fusion prediction values generated by the inference are aggregated into a vector group, and this vector group is used as the prediction distribution set, which forms a point cloud distribution that fluctuates around the real state in the numerical space.
[0125] Secondly, regarding the determination of the tool condition detection results, mean-based expectation estimation is performed. The arithmetic mean of all vectors in the predicted distribution set is calculated using the following formula: The calculated average probability vector is used as the final predicted probability after eliminating random noise. Next, the state category index corresponding to the element with the largest value in the average probability vector is identified, and this category is used as the final tool condition detection result.
[0126] Finally, to determine the credibility, the dispersion of each fused prediction value in the prediction distribution set relative to the mean can be calculated. The variance is calculated and used as a credibility index characterizing epistemic uncertainty. A larger value indicates significant differences in the model's results across multiple inferences, meaning the current input data belongs to an unknown distribution region, and the credibility is lower. Alternatively, the information disorder of the final predicted probability distribution can be calculated. Specifically, the Shannon entropy formula can be used. (where c iterates through the three states of health, warning, and failure) and performs calculations, using the calculated entropy value as a reliability index representing the aleatoric uncertainty of the prediction result. The larger the value of this index, the more difficult it is for the model to distinguish which state it belongs to (e.g., at the state boundary), and the more ambiguous the prediction result is.
[0127] In this embodiment, random errors are eliminated by mean calculation, and the variance / information entropy quantification model is used to recognize uncertainty. This mechanism supports a confidence-based hierarchical maintenance strategy, effectively avoiding production safety accidents caused by false alarms or omissions.
[0128] In one embodiment, the Gaussian process classifier includes a covariance kernel function combining radial basis functions and a white noise kernel function, whereby the radial basis functions are used to indicate the gradual characteristics of tool degradation. Based on vibration signal features, the Gaussian process classifier determines the probability distribution of the tool belonging to various tool states, including:
[0129] By using the covariance kernel function, multiple similarities between the vibration signal features and the sample features corresponding to different tool state sample sets are determined; based on these multiple similarities, the probability distribution of belonging to various tool states is determined.
[0130] Among them, the Gaussian process classifier is a probabilistic classifier whose function is... It follows the prior of a Gaussian process, that is... ,in This is the mean function (usually set to 0). This is the covariance kernel function. This classifier not only uses the kernel function to measure the similarity between input features to drive classification decisions, but also automatically optimizes hyperparameters by integrating marginal likelihood, for example, by maximizing the marginal likelihood to learn the kernel function's hyperparameters. A commonly used kernel function is a composite of the radial basis function (RBF) and a white noise kernel. .in and For signal variance and length scale hyperparameters, The variance of white noise. and For the input feature data, This refers to the Kronecker delta function.
[0131] In some embodiments, a Gaussian process classifier can be trained using historical vibration feature data and its corresponding tool status labels (health, warning, fault), for example by maximizing the log marginal likelihood. To optimize kernel function hyperparameters .in For the label vector, Let X be the latent variable covariance matrix predicted by the model, and let X be the input vibration signal features.
[0132] Specifically, a radial basis function (RBF) capable of mapping an infinite-dimensional feature space is selected and additively combined with a white noise kernel function capable of representing random perturbations to obtain the covariance kernel function of the Gaussian process classifier. Further, as... Figure 5As shown, the covariance matrix between the current input vibration signal features and the features of each state (health, warning, fault) in the historical training sample set is calculated using the aforementioned covariance kernel function. This determines their distance relationship in the feature space, and this distance relationship is used as multiple similarities between the vibration signal features and the sample features corresponding to different tool state sample sets. Subsequently, a joint Gaussian distribution of the latent function is constructed based on these similarities, and the latent function values are mapped to the (0, 1) interval using the Sigmoid or Softmax likelihood function. For a new input feature vector... The Gaussian process classifier outputs a triple posterior probability vector about the tool health status. Each element Indicates belonging to the first The probability of a class (healthy, warning, fault). This probability vector intrinsically carries information about the uncertainty of the prediction.
[0133] In this embodiment, a covariance kernel function combining radial basis functions and white noise kernel functions is used to achieve dual modeling of the physical reality of the tool degradation process and the complexity of the environment. The radial basis functions accurately capture the smooth performance degradation trend of the tool as the number of machining cycles increases, conforming to the physical laws of mechanical wear. The white noise kernel function introduces tolerance to high-frequency noise and transient interference from sensors, preventing overfitting of the GPC model in an attempt to fit noise. This composite kernel design enables the Gaussian process classifier to maintain a keen ability to distinguish different tool states under small sample conditions while significantly improving its generalization robustness in noisy industrial environments.
[0134] To enable those skilled in the art to better understand the above steps, the following example illustrates the embodiments of this application, but it should be understood that the embodiments of this application are not limited thereto.
[0135] In one exemplary embodiment, the tool condition detection process is performed by a terminal device communicatively connected to the CNC machining center. This process aims to utilize the high-frequency sensitivity of vibration signals and the physical macroscopic nature of machining data, employing a Bayesian probabilistic framework to accurately identify the tool health status (including healthy status, warning status, and fault status) and quantitatively assess the reliability of the results. Figure 6 As shown, the specific execution process is as follows:
[0136] Acquisition and preprocessing of multi-source features. Specifically, as follows... Figure 7As shown, during each cycle of the cutting process, the terminal device synchronously collects vibration waveform data from an accelerometer mounted on the machine tool and real-time operating data from the CNC system. For the vibration waveform data, the terminal first performs clock alignment and then performs multi-domain feature extraction. In the time domain, the root mean square value of the signal is calculated to characterize the average energy, kurtosis and peak factor are calculated to capture the impact component caused by microcracks, and waveform factor is calculated to describe the waveform shape. In the frequency domain, the dominant frequency amplitude, spectral centroid, and frequency standard deviation are extracted using fast Fourier transform to identify resonance changes at specific frequencies. In the time-frequency domain, wavelet packet decomposition is used to divide the signal into low-frequency, mid-frequency, and high-frequency components, and the energy proportion of each frequency band and wavelet packet energy entropy are calculated to quantify the complexity and uncertainty of the signal energy distribution.
[0137] Based on the CNC system's operating data, the terminal reads the Z-axis coordinate, spindle load, speed, and motor temperature. Using this basic data, the terminal further calculates structural features with clear physical meaning: it accumulates the Z-axis coordinates to obtain the cumulative machining amount, reflecting the tool's historical total workload; it calculates the ratio of the first-order difference of the spindle load to the speed to obtain the load change rate, characterizing the instantaneous fluctuation of cutting resistance; it calculates the ratio of the spindle load to the motor temperature to obtain the load-temperature ratio, monitoring the balance between machining efficiency and thermal state; and it simultaneously calculates the product of the spindle load and speed to estimate energy consumption.
[0138] After obtaining the initial feature set containing multiple dimensions, the terminal calculates the Pearson correlation coefficient between all features and removes redundant feature pairs with extremely high correlation. Subsequently, principal component analysis is used to reduce the dimensionality of the remaining features. Through linear projection, the high-dimensional data is mapped to a low-dimensional space, and only principal component components whose cumulative variance contribution rate meets a preset high threshold (e.g., 95%) are retained to form the final processing data feature vector and vibration signal feature vector.
[0139] Subsequently, based on the prior probability determination of the Gaussian process classifier, the terminal inputs the extracted vibration signal feature vector into a preset Gaussian process classifier. This classifier internally constructs a composite covariance kernel function, which is a linear superposition of a radial basis function used to characterize the gradual degradation characteristics of the tool and a white noise kernel function used to simulate random environmental noise.
[0140] Using this composite kernel function, the classifier calculates the similarity matrix between the vibration features of the current input and the features of historical training samples. Based on the Bayesian nonparametric inference principle, it outputs the posterior probabilities of the tool belonging to healthy, warning, and fault states, respectively. This set of probability values is directly determined as the state weights (i.e., network credibility) of each expert subnetwork in the subsequent hybrid expert network, thereby realizing the dynamic adjustment of the attention allocation of the subsequent inference model using the prior judgment of the vibration signal.
[0141] Multiple stochastic inferences using a Bayesian hybrid expert network. The terminal inputs the dimensionality-reduced processed data feature vector into a trained Bayesian hybrid expert network. This network comprises three parallel Bayesian expert networks, each specifically designed to identify three patterns: health, early warning, and fault.
[0142] These three expert networks were pre-trained on historical processing datasets: a health expert network was trained using a sample set labeled "healthy," an early warning expert network was trained using a sample set labeled "warning," and a fault expert network was trained using a sample set labeled "fault." Specifically, during training, a loss function incorporating physical constraints was employed. This constraint penalizes phenomena that violate the irreversible law of tool wear, such as "the predicted fault probability at the next moment is less than that at the previous moment," thereby forcing the model to learn a degradation trajectory that conforms to physical common sense.
[0143] In the current online inference phase, the terminal drives three Bayesian expert networks to perform multiple (e.g., one hundred) forward propagation calculations on the same set of input features. During each calculation, a random dropout layer within the network is activated, temporarily blocking the connections of some neurons using a random mask generated according to a Bernoulli distribution. This ensures that each inference is actually based on a sparse subnetwork with slightly different structures. Through this Monte Carlo sampling mechanism, each expert network ultimately outputs multiple (e.g., one hundred) sets of predictions with slightly fluctuating values.
[0144] Multi-layered fusion decision-making and reliability quantification. The terminal performs weighted fusion of multiple sets of prediction results output in the third stage based on the state weights determined in the second stage. Specifically, for each of the 100th inferences, the terminal uses the state weights to weighted sum the probability vectors output by the three expert networks to obtain the fused prediction value corresponding to that inference. After 100 calculations, the terminal obtains a prediction distribution set consisting of 100 fused prediction values.
[0145] Subsequently, the terminal calculates the arithmetic mean of the predicted distribution set to obtain the final predicted probability distribution, and selects the category with the highest probability value as the tool status detection result (e.g., determined as "warning status").
[0146] Meanwhile, to assess the reliability of the detection result, the terminal calculates the statistical characteristics of the predicted distribution set to quantify the uncertainty. The terminal calculates the variance of the distribution set relative to the mean to characterize the model's cognitive uncertainty regarding the current operating condition; or it calculates the information entropy of the final probability distribution to characterize the degree of confusion in the model's classification. Finally, the terminal outputs the calculated variance or information entropy value as the credibility of the detection result. If the credibility is lower than a preset safety threshold, the terminal will issue a manual review alarm; if the credibility meets the requirements, it will directly control the machine tool to perform tool changing or parameter adjustment operations based on the detection result.
[0147] In this embodiment, by fusing multi-source information and using GPC to process vibration signals to generate prior probabilities, which are then used as gating signals to intelligently guide the analysis of processing data, effective and adaptive fusion of vibration and processing data is achieved. Furthermore, uncertainty is quantified; both Gaussian classifiers and Bayesian hybrid expert networks are probabilistic models that can provide a measure of prediction uncertainty, thus quantifying decision-making. The final output includes not only the health status detection results but also the credibility of those results. Users can formulate different levels of decisions based on the confidence level, greatly improving the intelligence, safety, and economy of decision-making. The system can monitor changes in the processing process in real time, verify the effectiveness of adjustment strategies, and guide the next steps based on the feedback results, achieving a closed loop from detection to control.
[0148] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0149] Based on the same inventive concept, this application also provides a tool condition detection device for implementing the tool condition detection method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more tool condition detection device embodiments provided below can be found in the limitations of the tool condition detection method described above, and will not be repeated here.
[0150] In one exemplary embodiment, such as Figure 8 As shown, a tool state detection device is provided, including: a feature acquisition module 810, a Bayesian network prediction module 820, a Gaussian classification module 830, a weight determination module 840, and a tool detection state determination module 850, wherein:
[0151] The feature acquisition module 810 is used to acquire vibration signal features and machining data features during the tool machining process;
[0152] The Bayesian network prediction module 820 is used to input the machining data features into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results. The Bayesian hybrid expert network includes multiple Bayesian expert networks, each of which is used to obtain a tool state prediction result indicating that the tool belongs to the tool state corresponding to that Bayesian expert network. The tool states corresponding to the multiple Bayesian expert networks are different.
[0153] Gaussian classification module 830 is used by a Gaussian process classifier to determine the probability distribution of the tool belonging to various tool states based on the vibration signal characteristics;
[0154] The weight determination module 840 is used to determine the state weights of the different tool states according to the probability distribution; the state weights are used to characterize the network credibility of the multiple Bayesian expert networks.
[0155] The tool detection status determination module 850 is used to determine the tool status detection result and the reliability of the tool status detection result based on the network reliability and the multiple sets of tool status prediction results.
[0156] In one embodiment, the Bayesian network prediction module 820 is further configured to:
[0157] Obtain historical machining datasets and divide the historical machining datasets into multiple tool status sample sets according to tool status labels;
[0158] Using multiple tool state sample sets, the Bayesian expert network corresponding to different tool state sample sets is trained respectively;
[0159] Based on the multiple trained Bayesian expert networks, the Bayesian hybrid expert network is obtained.
[0160] In one embodiment, the Bayesian network prediction module 820 is further configured to:
[0161] Obtain a loss function that includes a classification cross-entropy term and a physical constraint term; wherein, the physical constraint term is used to generate a penalty value during training when the predicted failure probability at the next processing time is less than the predicted failure probability at the previous processing time, based on the time series relationship of the tool state sample set.
[0162] Based on the tool state sample set and the loss function, the parameters of the Bayesian expert network are updated, and the Bayesian expert network is obtained when the preset training completion conditions are met.
[0163] In one embodiment, the propagation path of the Bayesian expert network includes a random dropout layer, and the Bayesian network prediction module 820 is further configured to:
[0164] Based on the processed data features, the Bayesian expert network in the Bayesian hybrid expert network performs a preset number of inferences, generating multiple output results corresponding to the preset number of inferences; wherein, in each inference process, different combinations of neurons are discarded through the random discard layer, generating different output results;
[0165] Based on the multiple output results generated by each of the Bayesian expert networks, multiple sets of tool state prediction results are determined.
[0166] In one embodiment, the tool detection state determination module 850 is further configured to:
[0167] Based on the network credibility and the tool state prediction results output by each of the multiple Bayesian expert networks, a fusion prediction value corresponding to each group of tool state prediction results is determined.
[0168] Based on the fused prediction value corresponding to each group of tool state prediction results, a prediction distribution set is constructed.
[0169] The tool condition detection result is determined based on the mean of the predicted distribution set;
[0170] The confidence level is determined based on the variance or information entropy of the predicted distribution set.
[0171] In one embodiment, the Gaussian process classifier includes a covariance kernel function combining a radial basis function and a white noise kernel function, wherein the radial basis function is used to indicate the gradual characteristics of tool degradation; the Gaussian classification module 830 is further configured to:
[0172] The covariance kernel function is used to determine multiple similarities between the vibration signal features and the sample features corresponding to different tool state sample sets.
[0173] Based on the multiple similarities, the probability distribution of belonging to each of the various tool states is determined.
[0174] Each module in the aforementioned tool condition detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0175] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a tool condition detection method.
[0176] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0177] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0178] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0179] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0180] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0181] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0182] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0183] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A tool condition detection method, characterized in that, include: Acquire vibration signal characteristics and machining data characteristics during the tool machining process; The machining data features are input into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results. The Bayesian hybrid expert network includes multiple Bayesian expert networks, each of which is used to obtain a tool state prediction result for the tool belonging to the tool state corresponding to the Bayesian expert network. The tool states corresponding to the multiple Bayesian expert networks are different. The probability distribution of the tool belonging to various tool states is determined by the Gaussian process classifier based on the vibration signal characteristics; Based on the probability distribution, the state weights of the different tool states are determined; the state weights are used to characterize the network credibility of each of the multiple Bayesian expert networks. Based on the network credibility and the multiple sets of tool state prediction results, the tool state detection result and the credibility of the tool state detection result are determined.
2. The method according to claim 1, characterized in that, The Bayesian hybrid expert network is trained through the following steps: Obtain historical machining datasets and divide the historical machining datasets into multiple tool status sample sets according to tool status labels; Using multiple tool state sample sets, the Bayesian expert network corresponding to different tool state sample sets is trained respectively; Based on the multiple trained Bayesian expert networks, the Bayesian hybrid expert network is obtained.
3. The method according to claim 2, characterized in that, The step of training the Bayesian expert network corresponding to different tool state sample sets using multiple tool state sample sets includes: Obtain a loss function that includes a classification cross-entropy term and a physical constraint term; wherein, the physical constraint term is used to generate a penalty value during training when the predicted failure probability at the next processing time is less than the predicted failure probability at the previous processing time, based on the time series relationship of the tool state sample set. Based on the tool state sample set and the loss function, the parameters of the Bayesian expert network are updated, and the Bayesian expert network is obtained when the preset training completion conditions are met.
4. The method according to claim 1, characterized in that, The propagation path of the Bayesian expert network includes a random dropout layer. The machining data features are input into a trained Bayesian hybrid expert network, which performs multiple inferences based on these features and outputs multiple sets of tool state prediction results, including: Based on the processed data features, the Bayesian expert network in the Bayesian hybrid expert network performs a preset number of inferences, generating multiple output results corresponding to the preset number of inferences; wherein, in each inference process, different combinations of neurons are discarded through the random discard layer, generating different output results; Based on the multiple output results generated by each of the Bayesian expert networks, multiple sets of tool state prediction results are determined.
5. The method according to claim 4, characterized in that, The step of determining the tool state detection result and the reliability of the tool state detection result based on the network reliability and the multiple sets of tool state prediction results includes: Based on the network credibility and the tool state prediction results output by each of the multiple Bayesian expert networks, a fusion prediction value corresponding to each group of tool state prediction results is determined. Based on the fused prediction value corresponding to each group of tool state prediction results, a prediction distribution set is constructed. The tool condition detection result is determined based on the mean of the predicted distribution set; The confidence level is determined based on the variance or information entropy of the predicted distribution set.
6. The method according to any one of claims 1 to 5, characterized in that, The Gaussian process classifier includes a covariance kernel function that combines a radial basis function and a white noise kernel function, wherein the radial basis function is used to indicate the gradual characteristics of tool degradation. The step of determining the probability distribution of the tool belonging to various tool states by the Gaussian process classifier based on the vibration signal characteristics includes: The covariance kernel function is used to determine multiple similarities between the vibration signal features and the sample features corresponding to different tool state sample sets. Based on the multiple similarities, the probability distribution of belonging to each of the various tool states is determined.
7. A tool condition detection device, characterized in that, The device includes: The feature acquisition module is used to acquire vibration signal features and machining data features during the tool machining process; The Bayesian network prediction module is used to input the machining data features into a trained Bayesian hybrid expert network, which performs multiple inferences based on the machining data features and outputs multiple sets of tool state prediction results. The Bayesian hybrid expert network includes multiple Bayesian expert networks, each of which is used to obtain a tool state prediction result indicating that the tool belongs to the tool state corresponding to that Bayesian expert network. The tool states corresponding to the multiple Bayesian expert networks are different. A Gaussian classification module is used to determine the probability distribution of the tool belonging to various tool states based on the vibration signal characteristics by a Gaussian process classifier. The weight determination module is used to determine the state weights of the different tool states according to the probability distribution; the state weights are used to characterize the network credibility of the multiple Bayesian expert networks. The tool detection status determination module is used to determine the tool status detection result and the reliability of the tool status detection result based on the network reliability and the multiple sets of tool status prediction results.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.