A method and system for predicting energy consumption of CNC milling machine based on time parameters

By dividing machine tools, production lines and equipment type layers in CNC milling machines, combining Bayesian networks and gradient enhancement tree models, the problem of inaccurate energy consumption prediction in the existing technology is solved, and more accurate and flexible energy consumption analysis is achieved. Supports meticulous energy consumption management strategies.

CN118795839BActive Publication Date: 2024-11-29启东大同电机有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411263949.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-11-29
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

The existing CNC milling machine energy consumption prediction methods are difficult to accurately capture the intrinsic connections between complex data. Traditional models lack adaptability and flexibility, resulting in inaccurate energy consumption prediction and insufficient data accuracy and real-time performance.

Method used

Using a time parameter-based method, by dividing the machine tool layer, production line layer and equipment type layer, collecting and analyzing the corresponding data points, building an energy consumption prediction model, and using the naive Bayesian network and Bayesian network regression tree model to calculate the weight. Combining meteorological, time and operation factors, a gradient enhancement tree model is constructed to predict energy consumption.

Benefits of technology

Improve the accuracy and depth of energy consumption analysis, enhance the adaptability and flexibility of the model, ensure the accuracy and real-time of data, and can be subdivided into the energy consumption prediction of each process, providing more detailed energy consumption management. Analysis basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118795839B_ABST
    Figure CN118795839B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for predicting energy consumption of a numerically controlled milling machine based on time parameters, which is used in the field of numerically controlled milling machines. The method comprises the following steps: dividing the workshop area according to the operation factors of the numerically controlled milling machine, and dividing the machine tool layer, production line layer and equipment type layer within each area; assigning weights to the machine tool layer, production line layer and equipment type layer according to production operation factors; collecting time parameter data of the machine tool layer, production line layer and equipment type layer, and extracting data points corresponding to energy consumption indicators; constructing an energy consumption prediction model; inputting various data of the numerically controlled milling machine in the actual processing process into the energy consumption prediction model, and predicting the total energy consumption and energy consumption of each process. The present invention is adjusted according to the production environment and data conditions, has adaptability and flexibility, adapts to various production scenarios and needs, and provides a basis for subsequent energy consumption prediction through weight distribution results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of numerically controlled milling machines, and in particular to a method and system for predicting energy consumption of numerically controlled milling machines based on time parameters. Background Art

[0002] In the process of mechanical manufacturing, people often focus on ensuring product quality and pursuing the optimization of processing performance and process effects, but often ignore the energy consumption problem in the processing link. However, in the current social environment of pursuing energy conservation, emission reduction and green manufacturing, the energy utilization efficiency in the machine tool processing process has received widespread attention. Considering that my country's mechanical processing industry is centered on machine tools and has a huge processing volume, there is a huge room for energy-saving improvement. Therefore, optimizing the machine tool processing process to reduce energy consumption has become the focus of machine tool energy-saving technology research; in this context, the accurate prediction of workpiece processing energy consumption has become a key link in solving the energy consumption problem. It provides important theoretical and practical support for the formulation of energy consumption quotas, energy efficiency evaluation, energy management, and research on machine tool energy-saving measures.

[0003] Numerical Control Milling Machine is a highly efficient automated machine tool that processes workpieces with complex shapes by programming the movement of the workbench and milling cutter. Numerical Control Milling Machines are widely used in industries such as automobiles, aviation, mold manufacturing, and mechanical processing. As the manufacturing industry's requirements for precision and efficiency increase, Numerical Control Milling Machines play an increasingly important role in modern manufacturing.

[0004] In the existing technology, CNC milling machines often only focus on energy consumption analysis at a single level, ignoring the comprehensive impact of multiple levels such as the production line level and the machine tool level, resulting in incomplete energy consumption analysis and failure to accurately reflect the actual energy consumption of the entire production process. Traditional energy consumption analysis methods may rely too much on expert experience and subjective judgment, lacking objective analysis and utilization of actual production data, which limits the accuracy of energy consumption assessment and optimization. Existing technologies often have poor effects when processing data with nonlinear relationships and complex interactions. It is difficult to capture and analyze the inherent connections between these complex data, resulting in inaccurate energy consumption predictions. Traditional energy consumption prediction models are often rigidly designed and lack sufficient adaptability and flexibility. They are difficult to adapt to a variety of production environments and data situations, limiting the scope of application and effectiveness of the model. Due to the lack of effective data collection and preprocessing mechanisms, the data relied on for energy consumption analysis and prediction often have problems with accuracy and real-time performance.

[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0006] In order to overcome the above problems, the present invention aims to propose a method and system for predicting energy consumption of CNC milling machines based on time parameters, with the aim of solving the problem that the prior art often has poor effects when processing data with nonlinear relationships and complex interactions, and it is difficult to capture and analyze the inherent connections between these complex data, resulting in inaccurate energy consumption prediction. Traditional energy consumption prediction models are often rigidly designed, lack sufficient adaptability and flexibility, and are difficult to adapt to a variety of production environments and data conditions, which limits the scope of application and effectiveness of the model. Due to the lack of effective data collection and preprocessing mechanisms, the data relied on for energy consumption analysis and prediction often have problems of insufficient accuracy and real-time performance.

[0007] To this end, the specific technical solution adopted by the present invention is as follows:

[0008] According to one aspect of the present invention, a method for predicting energy consumption of a CNC milling machine based on a time parameter is provided, and the method for predicting energy consumption of a CNC milling machine comprises the following steps:

[0009] S1. Divide the workshop into areas according to the operating factors of the CNC milling machine, and divide each area into machine tool layer, production line layer and equipment type layer;

[0010] S2. Assign weights to the machine tool layer, production line layer, and equipment type layer based on production operation factors;

[0011] S3, collecting time parameter data at the machine tool layer, production line layer and equipment type layer, and extracting data points corresponding to energy consumption indicators;

[0012] S4, combining the weights and data points of the machine tool layer, production line layer and equipment type layer to build an energy consumption prediction model;

[0013] S5. Input various data of the CNC milling machine in the actual processing process into the energy consumption prediction model to predict the total energy consumption and the energy consumption of each process.

[0014] Optionally, dividing the workshop into areas according to the operating factors of the CNC milling machine, and dividing the machine tool layer, the production line layer and the equipment type layer within each area includes the following steps:

[0015] S11. Divide the workshop into areas according to operation factors, the divided areas include high-precision processing area, general processing area and heavy cutting processing area, and collect production operation factors of the divided areas;

[0016] S12. Each area is divided into a machine tool layer, a production line layer and an equipment type layer;

[0017] S13, identify energy consumption indicators at the machine tool level, production line level, and equipment type level;

[0018] S14. Standardize the identified energy consumption indicators.

[0019] Optionally, assigning weights to the machine tool layer, the production line layer, and the equipment type layer according to production operation factors includes the following steps:

[0020] S21, collecting energy consumption indicators and production operation factors at the machine tool layer, production line layer and equipment type layer, and converting them into feature vectors;

[0021] S22. Based on the feature vector, the naive Bayesian network classifier is used to evaluate the influence of each energy consumption indicator at each level;

[0022] S23. Using the Bayesian network regression tree model, combined with the conditional independence assumption and the principle of maximizing the posterior probability, the weights of each level are calculated;

[0023] S24. Use historical energy consumption data to train the Bayesian network regression tree model, optimize the weights, verify the model through cross-validation method, and adjust the weight distribution.

[0024] Optionally, based on the feature vector, using a naive Bayesian network classifier to evaluate the influence of each energy consumption indicator at each level includes the following steps:

[0025] S221, obtaining a feature vector, and marking the feature vector into a category according to the degree of influence of energy consumption, and the category is used as a predicted label;

[0026] S222, dividing the feature vectors and corresponding labels into a training set and a test set;

[0027] S223, training a naive Bayesian network classifier using the training set data, and testing the performance of the naive Bayesian network classifier using the test set data;

[0028] S224. Use the trained and tested naive Bayesian network classifier to predict the new feature vector and evaluate the energy consumption impact category of the new feature vector.

[0029] Optionally, using the Bayesian network regression tree model, combined with the conditional independence assumption and the principle of maximizing the posterior probability, the weights of each level are calculated, including the following steps:

[0030] S231. Design the structure of the Bayesian network and determine the dependencies between nodes, including energy consumption indicators and production operation factors;

[0031] S232, using the conditional probability distribution between the nodes to learn the parameters in the network;

[0032] S233, using the feature vector as input data and combining it with the parameters learned in the Bayesian network to calculate the conditional probability of each node;

[0033] S234. For the machine tool layer, production line layer and equipment type layer, a regression tree model is used to model the impact of energy consumption indicators on energy consumption;

[0034] S235. Based on the output of the regression tree model and the principle of maximizing the posterior probability, the weights of each level are calculated.

[0035] Optionally, based on the output of the regression tree model and in combination with the principle of maximizing the posterior probability, calculating the weights for each level includes the following steps:

[0036] S2351, calculating the posterior probability;

[0037] S2352, calculating a likelihood function using the predicted values ​​of energy consumption impact at each level obtained from the regression tree model;

[0038] S2353. Calculate weights for each level using posterior probabilities according to the likelihood function;

[0039] The calculation formula of the posterior probability is:

[0040] ;

[0041] In the formula, represents the posterior probability;

[0042] Indicates the given level parameter i Download data X The likelihood function of ;

[0043] Representation level parameters i The prior distribution of

[0044] represents the marginal probability of the observed data;

[0045] The weight calculation formula is:

[0046] ;

[0047] In the formula, represents the posterior probability;

[0048] i ′ represents the set of all considered level parameters;

[0049] Indicates a specific level parameter i The weight of

[0050] Indicates that given data X Under the condition that i The posterior probability of ′.

[0051] Optionally, combining the weights and data points of the machine tool layer, the production line layer, and the equipment type layer, constructing the energy consumption prediction model includes the following steps:

[0052] S41, integrating the time parameter data of the machine tool layer, the production line layer and the equipment type layer and the data points corresponding to the energy consumption index;

[0053] S42, selecting the most influential features for energy consumption prediction, and weighting the features according to the weights of each level;

[0054] S43, grouping by meteorological factors, time factors and operation factors, calculating the local similarity within the group, and combining the local similarities to obtain the overall similarity of each historical data point relative to the prediction point;

[0055] S44, according to the overall similarity, a threshold is set, and when the similarity between the historical data point and the prediction point exceeds the set threshold, the data point is selected as a training set;

[0056] S45. Using the integrated, preprocessed and weighted data set, a gradient boosting tree is used to build and train an energy consumption prediction model;

[0057] S46. Evaluate the performance of the energy consumption prediction model on the test set and verify the prediction ability.

[0058] Optionally, selecting the most influential features for energy consumption prediction and weighting the features according to the weights of each level includes the following steps:

[0059] S421. Based on the integrated data set, identify all features and select features that have potential impact on energy consumption prediction;

[0060] S422. Evaluate the importance of the initially screened features using statistical methods, and rank the features according to the results of the feature importance analysis;

[0061] S423, selecting the feature that has the greatest impact on energy consumption prediction according to the feature importance ranking;

[0062] S424, weighting the selected features according to the weights of the machine tool layer, the production line layer, and the equipment type layer;

[0063] S425: Apply the calculated weight to each feature to generate a weighted feature set.

[0064] Optionally, grouping by meteorological factor, time factor and operation factor, calculating the local similarity within the group, and integrating the local similarities to obtain the overall similarity of each historical data point relative to the forecast point includes the following steps:

[0065] S431, dividing the factors affecting energy consumption into several groups according to the weighted feature set, the factors affecting energy consumption including meteorological factors, time factors and operation factors;

[0066] S432, respectively performing local similarity calculations on the meteorological factor, the time factor, and the operation factor;

[0067] S433, combining the local similarities calculated within each group to obtain the overall similarity of each historical data point relative to the prediction point.

[0068] According to another aspect of the present invention, there is also provided a CNC milling machine energy consumption prediction system based on time parameters, the system comprising: a hierarchical division module, a weight distribution module, a data processing module, an energy consumption prediction model construction module and an energy consumption prediction module;

[0069] The hierarchical division module is connected to the data processing module through the weight distribution module, and the data processing module is connected to the energy consumption prediction module through the energy consumption prediction model construction module;

[0070] The hierarchical division module is used to divide the workshop into areas according to the operating factors of the CNC milling machine, and to divide each area into the machine tool layer, production line layer and equipment type layer;

[0071] A weight allocation module is used to allocate weights to the machine tool layer, production line layer and equipment type layer according to production operation factors;

[0072] A data processing module is used to collect time parameter data at the machine tool level, production line level and equipment type level, and extract data points corresponding to energy consumption indicators;

[0073] Energy consumption prediction model building module, used to build energy consumption prediction model by combining weights and data points of machine tool layer, production line layer and equipment type layer;

[0074] The energy consumption prediction module is used to input various data of the CNC milling machine in the actual processing process into the energy consumption prediction model to predict the total energy consumption and the energy consumption of each process.

[0075] Compared with the prior art, this application has the following beneficial effects:

[0076] 1. The present invention can more comprehensively reflect the actual situation of energy consumption by comprehensively considering the energy consumption indicators and production operation factors at the machine tool level, production line level and equipment type level, thereby improving the accuracy and depth of energy consumption analysis. The data-based method can more objectively evaluate the impact of each level on energy consumption by collecting and analyzing actual production data, reduce the error of subjective judgment, and utilize the naive Bayesian network classifier and the Bayesian network regression tree model to perform well in processing complex data relationships, and can capture the nonlinear relationships and interactions in the data. The weights are calculated by the Bayesian network regression tree model and the principle of maximizing the posterior probability, ensuring the objectivity and scientificity of the weight distribution, and providing a solid foundation for subsequent energy consumption analysis and optimization.

[0077] 2. The present invention is adjusted according to the production environment and data conditions, has strong adaptability and flexibility, can adapt to multiple production scenarios and needs, and provides an accurate basis for subsequent energy consumption prediction, optimization analysis, etc. through weight distribution results, which is helpful for in-depth analysis and formulation of effective energy consumption management strategies; the present invention ensures comprehensive coverage of time parameter data and energy consumption index data, and ensures data accuracy and real-time performance by collecting data from reliable data sources such as production management devices and equipment monitoring devices. Through steps such as data cleaning, formatting and time alignment, data consistency and integrity are ensured.

[0078] 3. The present invention improves the prediction accuracy and efficiency of the model by identifying and weighting the features that have an impact on energy consumption prediction. It provides a scientific method for selecting a training set by calculating the local similarity of meteorological factors, time factors and operation factors and integrating them into an overall similarity. It uses a gradient boosting tree to construct an energy consumption prediction model. By evaluating the model performance on a test set, it ensures that the model has good generalization ability and can accurately predict energy consumption in an actual production environment.

[0079] 4. The present invention collects the operating data of the CNC milling machine in real time, thereby ensuring that the energy consumption prediction model can make predictions based on the latest and most accurate information, thereby improving the timeliness and accuracy of the prediction. It not only takes into account the basic parameters of the machine tool operation, such as speed and load, but also includes cutting parameters and environmental parameters. The consideration of comprehensive information makes the energy consumption prediction more accurate and comprehensive. It can not only predict the total energy consumption of the entire machining process, but also break down the energy consumption prediction into each process, providing a more detailed analysis basis for energy consumption management, helping to identify the energy consumption hotspots of each process, and facilitating the targeted implementation of energy consumption optimization measures. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] The above characteristics, features and advantages of the present invention and their implementation methods and methods will become more clearly understood in conjunction with the following description of the embodiments, which are described in detail in conjunction with the accompanying drawings. Herein, a schematic diagram is shown:

[0081] Figure 1 is a flow chart of a method for predicting energy consumption of a CNC milling machine based on time parameters according to an embodiment of the present invention;

[0082] Figure 2 The invention is a principle block diagram of a time parameter-based energy consumption prediction system for a CNC milling machine according to an embodiment of the invention.

[0083] In the figure:

[0084] 1. Hierarchical division module; 2. Weight allocation module; 3. Data processing module; 4. Energy consumption prediction model construction module; 5. Energy consumption prediction module. DETAILED DESCRIPTION

[0085] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0086] According to an embodiment of the present invention, a method and system for predicting energy consumption of a CNC milling machine based on time parameters are provided.

[0087] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to one embodiment of the present invention, a method for predicting energy consumption of a CNC milling machine based on time parameters is provided, and the method for predicting energy consumption of a CNC milling machine includes the following steps:

[0088] S1. Divide the workshop into areas according to the operating factors of the CNC milling machine, and divide each area into machine tool layer, production line layer and equipment type layer.

[0089] Preferably, dividing the workshop into areas according to the operating factors of the CNC milling machine, and dividing the machine tool layer, production line layer and equipment type layer within each area includes the following steps:

[0090] S11. Divide the workshop into areas according to operation factors, including high-precision processing area, general processing area and heavy cutting processing area, and collect production operation factors of each area (collect operation factors of CNC milling machines, including types of processing materials, processing accuracy requirements, cutting speed, load conditions, etc. According to the differences in operation factors, workpieces with high processing accuracy requirements need to be arranged in high-precision processing areas; large batches of workpieces with low precision requirements are processed in general processing areas. In each divided area, collect specific production operation factors of the area, such as work shifts, equipment use frequency and maintenance cycle, etc.);

[0091] S12. Each area is divided into a machine tool layer, a production line layer and an equipment type layer;

[0092] Among them, the machine tool layer includes CNC milling machines of various models and specifications, such as vertical CNC milling machines, horizontal CNC milling machines and bridge-type CNC milling machines;

[0093] The production line level includes various production processes, for example, a production line focuses on the production of a specific type of parts;

[0094] The equipment type layer includes various types of equipment and identifies auxiliary equipment for various functions, such as washing and drying;

[0095] S13, identify energy consumption indicators at the machine tool level, production line level, and equipment type level;

[0096] S14. Standardize the identified energy consumption indicators.

[0097] It needs to be explained that the energy consumption indicators of each equipment and production line should be analyzed, and the dimension and magnitude of each indicator should be determined, such as converting all energy consumption data into kilowatt-hours, and using normalization processing, such as minimum and maximum standardization, to ensure that all indicators are at the same magnitude. By reasonably dividing the workshop areas and considering operational factors, it is ensured that the production activities in each area match their design purposes, thereby improving the overall production efficiency and the effectiveness of energy consumption management. Correctly identifying the key indicators that affect energy consumption is a prerequisite for effective energy consumption forecasting and management. It is necessary to comprehensively consider various operating parameters and production conditions to identify the indicators that best represent the trend of energy consumption changes.

[0098] S2. Assign weights to the machine tool layer, production line layer, and equipment type layer based on production operation factors.

[0099] Preferably, according to the production operation factors, allocating weights to the machine tool layer, the production line layer and the equipment type layer comprises the following steps:

[0100] S21. Collect energy consumption indicators and production operation factors at the machine tool layer, production line layer and equipment type layer, and convert them into feature vectors.

[0101] S22. Based on the feature vector, the naive Bayesian network classifier is used to evaluate the impact of each energy consumption indicator at each level.

[0102] Preferably, based on the feature vector, using a naive Bayesian network classifier to evaluate the influence of each energy consumption indicator at each level includes the following steps:

[0103] S221, obtaining a feature vector, and marking the feature vector into a category according to the degree of impact of energy consumption, and the category is used as a predicted label (based on the identified energy consumption indicators, construct a feature vector, each feature vector represents a data point, which contains the values ​​of multiple energy consumption indicators, and each feature vector is marked as a category according to the actual degree of impact of energy consumption represented by it; for example, the feature vector is divided into three categories according to high, medium and low energy consumption);

[0104] S222. Divide the feature vectors and the corresponding labels into a training set and a test set (using a commonly used data segmentation method, such as random segmentation or stratified sampling, to divide the entire data set into a training set and a test set. Generally speaking, the data set is divided into a ratio of 70% training set and 30% test set to ensure that the model has enough data for learning and can verify its performance on independent data);

[0105] S223. Use the training set data to train a naive Bayesian network classifier, and use the test set data to test the performance of the naive Bayesian network classifier (use the training set data to train the naive Bayesian network classifier, involving calculating the conditional probability of features under each category, and the prior probability of each category, and use the test set data to evaluate the performance of the classifier, and the performance indicators include accuracy, recall rate, F1 score, etc.);

[0106] S224. Use the trained and tested naive Bayesian network classifier to predict the new feature vector and evaluate the category of the energy consumption impact of the new feature vector (use the trained and tested classifier to predict the new feature vector, determine the category of its energy consumption impact, analyze the prediction results, evaluate the energy consumption impact of the new feature vector, and take in-depth energy consumption optimization or adjustment measures based on this).

[0107] In addition, it should be noted that the training and testing process is the core step to implement the naive Bayes classifier, which directly determines the effect and accuracy of the classifier. The naive Bayes classifier is based on a probability model. It learns the feature probability distribution of each category through training data, and then applies probability to classify new data points. The "naivety" of naive Bayes lies in its assumption that each feature is independent of each other.

[0108] During the training process, it is important to accurately calculate the conditional probability and prior probability, which requires sufficient and representative training data. The testing process evaluates the generalization ability of the classifier on unseen data and is a key link in verifying the practicality of the model.

[0109] S23. Use the Bayesian network regression tree model, combined with the conditional independence assumption and the principle of maximizing the posterior probability, to calculate the weights of each level.

[0110] Preferably, using the Bayesian network regression tree model, combined with the conditional independence assumption and the principle of maximizing the posterior probability, the weights of each level are calculated, including the following steps:

[0111] S231. Design the structure of the Bayesian network to determine the dependencies between nodes, where the nodes include energy consumption indicators and production operation factors (first identify all relevant nodes, where the nodes represent energy consumption indicators and production operation factors, where the dependencies between nodes are usually determined based on professional knowledge or through data analysis, for example, some production operation factors may directly affect energy consumption indicators);

[0112] S232, using the conditional probability distribution between the nodes to learn the parameters in the network (using statistical methods or machine learning algorithms, such as maximum likelihood estimation to learn the parameters in the network, that is, each node is given the conditional probability distribution of its parent node);

[0113] S233, taking the feature vector as input data, and combining the parameters learned in the Bayesian network, calculating the conditional probability of each node (taking the feature vector as input data, the feature vector represents a specific production situation, and calculating the conditional probability of each node based on the parameters learned in the Bayesian network);

[0114] S234. For the machine tool layer, production line layer and equipment type layer, a regression tree model is used to model the impact of energy consumption indicators on energy consumption (for the machine tool layer, production line layer and equipment type layer, a regression tree model is used to model the specific impact of energy consumption indicators on energy consumption, with energy consumption indicators as input variables and energy consumption as output variables for modeling);

[0115] S235. Based on the output of the regression tree model and the principle of maximizing the posterior probability, the weights of each level are calculated.

[0116] Preferably, based on the output of the regression tree model and in combination with the principle of maximizing the posterior probability, calculating the weights for each level includes the following steps:

[0117] S2351. Calculate the posterior probability (calculate the posterior probability of each level based on the conditional probability and prior probability);

[0118] S2352. Calculate the likelihood function using the predicted values ​​of energy consumption impact at each level obtained from the regression tree model (calculate the likelihood function using the predicted values ​​of energy consumption impact obtained from the regression tree model, the likelihood function describes the probability of observing data under given parameters);

[0119] S2353. Calculate weights for each level using posterior probabilities according to the likelihood function;

[0120] The calculation formula of the posterior probability is:

[0121] ;

[0122] In the formula, represents the posterior probability;

[0123] Indicates the given level parameter i Download data X The likelihood function of ;

[0124] Representation level parameters i The prior distribution of

[0125] represents the marginal probability of the observed data;

[0126] The weight calculation formula is:

[0127] ;

[0128] In the formula, represents the posterior probability;

[0129] i ′ represents the set of all considered level parameters;

[0130] Indicates a specific level parameter i The weight of

[0131] Indicates that given data X Under the condition that i The posterior probability of ′.

[0132] In addition, it should be noted that network parameter learning is the core step in building an effective Bayesian network. Correctly estimating the conditional probability distribution is crucial to predicting the impact of energy consumption indicators, ensuring that the model can accurately reflect the dependencies between various factors in the real world. Weight calculation is another key step, which directly determines the final weight distribution. By combining the principle of maximizing the posterior probability and the predictions obtained from the regression tree model, the impact of each level on energy consumption can be effectively quantified, thereby providing support for in-depth analysis and decision-making.

[0133] S24. Use historical energy consumption data to train the Bayesian network regression tree model, optimize the weights, verify the model through cross-validation method, and adjust the weight distribution.

[0134] It should be explained that relevant energy consumption indicators and production operation factors are extracted from historical data as input features, and actual energy consumption data is used as the target variable. The extracted data is used to train the Bayesian network regression tree model, select a suitable tree structure, determine the best split node, and calculate the conditional probability distribution of each node after the split. In the model training process, the calculated weights are used to guide the model training, especially when dealing with the relationship between input features and target variables. The weights are optimized according to the performance of the model on the training data, and the weights are adjusted to improve the prediction accuracy of the model. The performance of the model is verified by cross-validation methods. Commonly used methods include k-fold cross-validation, which divides the data set into k subsets, and uses one of the subsets as a test set in turn, and the rest as a training set to evaluate the generalization ability of the model and the average performance of the model on each test set. The accuracy, mean square error and other indicators are used to adjust the weight distribution based on the results of model verification. If the weight of some features causes the model performance to decline, the weight of the feature needs to be reduced.

[0135] The naive Bayesian network classifier is a simple probabilistic classifier based on Bayesian theorem and the conditional independence assumption of features. Under the condition of a given category, it assumes that all features are independent of each other. The naive Bayesian classifier still shows good performance in many practical situations, especially in fields such as text classification and spam identification.

[0136] The Bayesian network regression tree model combines the characteristics of the Bayesian network and regression tree models. It is used to capture complex dependencies between variables and predict continuous values. The Bayesian network is a graph model that represents the dependencies between variables through nodes and directed edges, where nodes represent variables and edges represent the dependencies between variables. The regression tree is a type of decision tree that is used to predict a continuous value output.

[0137] S3. Collect time parameter data at the machine tool layer, production line layer, and equipment type layer, and extract data points corresponding to energy consumption indicators.

[0138] What needs to be explained is that first, the time parameters involved in the machine tool layer, production line layer and equipment type layer should be clarified. The time parameters include machine tool operating time, production line operating cycle, equipment maintenance interval, etc. It is also necessary to determine which data sources the time parameter data can be collected from. The data sources include production management devices, equipment monitoring devices, etc. The data is collected by directly exporting from the data source, calling APIs or manually recording. The indicators that affect energy consumption are defined. The indicators include electricity consumption, cutting fluid usage, etc. It is also necessary to identify which data sources can provide energy consumption indicator data. For example, electricity consumption may be obtained through a power monitoring device. The collected time parameter data and energy consumption indicator data are integrated to ensure data consistency and integrity. This involves processes such as data cleaning, formatting and time alignment. Data points corresponding to energy consumption indicators are extracted from the integrated data, including calculating the total energy consumption and average operating time within a specific time period.

[0139] S4. Combine the weights and data points of the machine tool layer, production line layer and equipment type layer to build an energy consumption prediction model.

[0140] Preferably, combining the weights and data points of the machine tool layer, the production line layer and the equipment type layer, constructing the energy consumption prediction model comprises the following steps:

[0141] S41, integrating the time parameter data of the machine tool layer, the production line layer and the equipment type layer and the data points corresponding to the energy consumption indicators.

[0142] S42. Select the features that have the greatest impact on energy consumption prediction, and weight the features according to the weights of each level.

[0143] Preferably, selecting the most influential features for energy consumption prediction and weighting the features according to the weights of each level includes the following steps:

[0144] S421. Based on the integrated data set, identify all features and screen the features that have potential impact on energy consumption forecasting (identify all possible features from the integrated data set, including energy consumption indicators, time parameters, production operation factors, etc., and screen the features that have potential impact on energy consumption forecasting based on professional knowledge and simple data analysis, such as correlation analysis);

[0145] S422. Using statistical methods to evaluate the importance of the initially selected features, and ranking the features according to the results of the feature importance analysis (using statistical methods such as Pearson correlation coefficient, mutual information, random forest feature importance evaluation, etc. to evaluate the importance of the initially selected features to energy consumption prediction, and ranking the features according to the above evaluation results to determine which features have the greatest impact on energy consumption prediction);

[0146] S423. According to the feature importance ranking, select the feature with the greatest influence on energy consumption prediction (set a threshold for feature importance. Only when the feature importance score exceeds the set threshold, it is considered to have a significant influence on energy consumption prediction. According to the feature importance ranking and threshold, select the most influential feature for energy consumption prediction);

[0147] S424, weighting the selected features according to the weights of the machine tool layer, the production line layer, and the equipment type layer (based on the weights of each layer previously determined, such as the machine tool layer, the production line layer, and the equipment type layer, assigning a weight to each selected feature, and adjusting the weight of the feature according to the layer to which it belongs);

[0148] S425. Apply the calculated weight to each feature to generate a weighted feature set (apply the calculated weight to each feature, i.e., adjust the value of the feature by multiplying it by the corresponding weight factor, and create a new feature set based on the weighted features for training and testing the energy consumption prediction model).

[0149] S43, grouping by meteorological factors, time factors and operation factors, calculating the local similarity within the group, and combining the local similarities to obtain the overall similarity of each historical data point relative to the prediction point.

[0150] Preferably, grouping by meteorological factors, time factors and operation factors, calculating the local similarity within the group, and integrating the local similarities to obtain the overall similarity of each historical data point relative to the forecast point includes the following steps:

[0151] S431. Based on the weighted feature set, the factors affecting energy consumption are divided into several groups. The factors affecting energy consumption include meteorological factors, time factors and operation factors (based on the weighted feature set, the factors affecting energy consumption are divided into three main groups: meteorological factors, time factors and operation factors. In each group, specific influencing factors are identified. Meteorological factors include temperature, humidity, etc.; time factors include seasons, working days or holidays, etc.; operation factors include machine tool running speed, load, etc.);

[0152] S432, respectively performing local similarity calculations on the meteorological factor, the time factor, and the operation factor;

[0153] In addition, it should be noted that for each factor group, the local similarity is calculated, and the similarity measurement method includes cosine similarity. The formula for calculating the local similarity of cosine similarity is:

[0154] ;

[0155] In the formula, A and B Represent the eigenvectors of two data points in a factor group respectively;

[0156] and represents the modulus of the eigenvector;

[0157] Represents local similarity.

[0158] S433, the local similarities calculated within each group are integrated to obtain the overall similarity of each historical data point relative to the predicted point (the local similarities calculated for each factor group are integrated to obtain the overall similarity. The integration method can adopt weighted average. The weight can be determined according to the importance of each factor group on the energy consumption. The overall similarity = w 1⋅Meteorological similarity+ w 2⋅Time Similarity+ w 3⋅Operation similarity, w 1. w 2 and w 3 are the weights of meteorological factor, time factor and operation factor respectively).

[0159] S44. According to the overall similarity, a threshold is set. When the similarity between the historical data point and the prediction point exceeds the set threshold, the data point is selected as a training set.

[0160] S45. Using the integrated, preprocessed and weighted dataset, an energy consumption prediction model is constructed and trained using a gradient boosting tree.

[0161] S46. Evaluate the performance of the energy consumption prediction model on the test set and verify the prediction ability.

[0162] It needs to be explained that, first, a similarity threshold is set, and the overall similarity of each historical data point and the predicted point is compared. When the similarity of the historical data point exceeds the set threshold, the data point is selected as the training set, and the gradient boosting tree is selected as the energy consumption prediction model. The model is trained using the integrated, preprocessed and weighted data set. The gradient boosting tree model is trained using the screened training set data, and the model parameters (such as the depth of the tree, the learning rate, etc.) are adjusted. The model performance is optimized through methods such as cross-validation. In addition to the training set, a test set needs to be prepared to evaluate the performance and predictive ability of the model. The test set should contain the data points of the training set to ensure the fairness and accuracy of the evaluation results. A series of indicators are used to evaluate the performance of the model, including mean square error, root mean square error, and coefficient of determination, etc. The model prediction results are verified to check the predictive ability of the model in practical applications.

[0163] S5. Input various data of the CNC milling machine in the actual processing process into the energy consumption prediction model to predict the total energy consumption and the energy consumption of each process.

[0164] It should be explained that relevant data are collected during the actual processing of the CNC milling machine, including machine tool operating speed, load, cutting parameters (such as feed rate, speed, etc.), and environmental parameters (such as temperature, humidity, etc.); the collected data are organized into the format required by the model, including preprocessing steps such as data cleaning, missing value processing, and data normalization, and features that have an impact on energy consumption prediction are extracted from the organized data; the features should correspond to the features used when training the model. If the features are weighted during the model training phase, it is also necessary to apply corresponding weights to the data features collected in real time, and the processed and weighted features are used as input data and input into the trained energy consumption prediction model. The model will output the total energy consumption prediction value of the entire processing process of the CNC milling machine. If the model supports energy consumption prediction subdivided into each process, the corresponding process data will be input into the model for prediction to obtain the energy consumption prediction value of each process.

[0165] According to another embodiment of the present invention, Figure 2 As shown, a CNC milling machine energy consumption prediction system based on time parameters is also provided, the system comprising: a hierarchical division module 1, a weight distribution module 2, a data processing module 3, an energy consumption prediction model construction module 4 and an energy consumption prediction module 5;

[0166] The hierarchical division module 1 is connected to the data processing module 3 via the weight distribution module 2, and the data processing module 3 is connected to the energy consumption prediction module 5 via the energy consumption prediction model construction module 4;

[0167] The hierarchical division module 1 is used to divide the workshop into areas according to the operation factors of the CNC milling machine, and to divide each area into a machine tool layer, a production line layer and an equipment type layer;

[0168] The weight allocation module 2 is used to allocate weights to the machine tool layer, the production line layer and the equipment type layer according to production operation factors;

[0169] Data processing module 3, used to collect time parameter data of machine tool layer, production line layer and equipment type layer, and extract data points corresponding to energy consumption indicators;

[0170] Energy consumption prediction model building module 4, used to build an energy consumption prediction model by combining weights and data points of the machine tool layer, production line layer and equipment type layer;

[0171] The energy consumption prediction module 5 is used to input various data of the CNC milling machine in the actual processing process into the energy consumption prediction model to predict the total energy consumption and the energy consumption of each process.

[0172] In summary, with the help of the above technical solutions of the present invention, the present invention can more comprehensively reflect the actual situation of energy consumption by comprehensively considering the energy consumption indicators and production operation factors of the machine tool layer, production line layer and equipment type layer, thereby improving the accuracy and depth of energy consumption analysis. The data-based method can more objectively evaluate the impact of each level on energy consumption by collecting and analyzing actual production data, reduce the error of subjective judgment, and use the naive Bayesian network classifier and the Bayesian network regression tree model to perform well in processing complex data relationships, and can capture nonlinear relationships and interactions in the data. The weights are calculated by the Bayesian network regression tree model and the principle of maximizing the posterior probability, ensuring the objectivity and scientificity of the weight distribution, and providing a solid foundation for subsequent energy consumption analysis and optimization; the present invention is adjusted according to the production environment and data conditions, has strong adaptability and flexibility, and can adapt to multiple production scenarios and needs. Through the weight distribution results, it provides an accurate basis for subsequent energy consumption prediction, optimization analysis, etc., which is helpful for in-depth analysis and formulation of effective energy consumption management strategies; the present invention ensures comprehensive coverage of time parameter data and energy consumption index data, and through the production management device and equipment monitoring device, etc. Reliable data sources are used to collect data, which ensures the accuracy and real-time nature of the data. Data consistency and integrity are ensured through steps such as data cleaning, formatting and time alignment. The present invention improves the prediction accuracy and efficiency of the model by identifying and weighting the features that have an impact on energy consumption prediction. By calculating the local similarity of meteorological factors, time factors and operation factors and synthesizing them into overall similarity, a scientific method is provided for selecting a training set. The energy consumption prediction model is constructed using a gradient boosting tree. By evaluating the model performance on a test set, it is ensured that the model has good generalization ability and can accurately predict the energy consumption in an actual production environment. The present invention collects the operation data of a CNC milling machine in real time, which ensures that the energy consumption prediction model can make predictions based on the latest and most accurate information, improves the timeliness and accuracy of the prediction, and considers not only the basic parameters of the machine tool operation, such as speed and load, but also cutting parameters and environmental parameters. The consideration of comprehensive information makes the energy consumption prediction more accurate and comprehensive, which can not only predict the total energy consumption of the entire machining process, but also subdivide the energy consumption prediction of each process, providing a more detailed analysis basis for energy consumption management, helping to identify the energy consumption hotspots of each process, and facilitating the targeted implementation of energy consumption optimization measures.

[0173] Although the present invention has been disclosed as above with preferred embodiments, the embodiments are merely examples for the convenience of description and are not intended to limit the present invention. Those skilled in the art may make several changes and modifications without departing from the spirit and scope of the present invention. The scope of protection claimed by the present invention shall be based on the claims.

Claims

1. A method for predicting energy consumption of a CNC milling machine based on time parameters, characterized in that: The energy consumption prediction method of a CNC milling machine comprises the following steps: S1. Divide the workshop into areas according to the operating factors of the CNC milling machine, and divide each area into machine tool layer, production line layer and equipment type layer; S2. Assign weights to the machine tool layer, production line layer, and equipment type layer based on production operation factors; S3, collecting time parameter data at the machine tool layer, production line layer and equipment type layer, and extracting data points corresponding to energy consumption indicators; S4, combining the weights and data points of the machine tool layer, production line layer and equipment type layer to build an energy consumption prediction model; S5. Input various data of the CNC milling machine in the actual processing process into the energy consumption prediction model to predict the total energy consumption and the energy consumption of each process; The method of allocating weights to the machine tool layer, the production line layer, and the equipment type layer according to the production operation factors includes the following steps: S21, collecting energy consumption indicators and production operation factors at the machine tool layer, production line layer and equipment type layer, and converting them into feature vectors; S22. Based on the feature vector, the naive Bayesian network classifier is used to evaluate the influence of each energy consumption indicator at each level; S23. Using the Bayesian network regression tree model, combined with the conditional independence assumption and the principle of maximizing the posterior probability, the weights of each level are calculated; S24. Use historical energy consumption data to train a Bayesian network regression tree model, optimize the weights, verify the model through a cross-validation method, and adjust the weight distribution; The method of using the Bayesian network regression tree model, combining the conditional independence assumption and the principle of maximizing the posterior probability, to calculate the weights of each level includes the following steps: S231. Designing the structure of the Bayesian network to determine the dependencies between nodes, wherein the nodes include energy consumption indicators and production operation factors; S232, using the conditional probability distribution between the nodes to learn the parameters in the network; S233, using the feature vector as input data and combining it with the parameters learned in the Bayesian network to calculate the conditional probability of each node; S234. For the machine tool layer, production line layer and equipment type layer, a regression tree model is used to model the impact of energy consumption indicators on energy consumption; S235. Based on the output of the regression tree model and the principle of maximizing the posterior probability, the weights of each level are calculated.

2. The method for predicting energy consumption of a CNC milling machine based on time parameters according to claim 1 is characterized in that: The method of dividing the workshop into areas according to the operating factors of the CNC milling machine and dividing the machine tool layer, production line layer and equipment type layer within each area includes the following steps: S11, dividing the workshop into areas according to operation factors, wherein the divided areas include a high-precision processing area, a general processing area, and a heavy cutting processing area, and collecting production operation factors of the divided areas; S12. Each area is divided into a machine tool layer, a production line layer and an equipment type layer; S13, identify energy consumption indicators at the machine tool level, production line level, and equipment type level; S14. Standardize the identified energy consumption indicators.

3. The method for predicting energy consumption of a CNC milling machine based on time parameters according to claim 1 is characterized in that: The method of evaluating the influence of each energy consumption index at each level by using a naive Bayesian network classifier based on the feature vector includes the following steps: S221, obtaining a feature vector, and marking the feature vector into a category according to the degree of influence of energy consumption, and the category is used as a predicted label; S222, dividing the feature vectors and corresponding labels into a training set and a test set; S223, training a naive Bayesian network classifier using the training set data, and testing the performance of the naive Bayesian network classifier using the test set data; S224. Use the trained and tested naive Bayesian network classifier to predict the new feature vector and evaluate the energy consumption impact category of the new feature vector.

4. The method for predicting energy consumption of a CNC milling machine based on time parameters according to claim 3 is characterized in that: The output of the regression tree model is combined with the principle of maximizing the posterior probability to calculate the weights for each level, including the following steps: S2351, calculating the posterior probability; S2352, calculating a likelihood function using the predicted values ​​of energy consumption impact at each level obtained from the regression tree model; S2353. Calculate weights for each level using posterior probabilities according to the likelihood function; The calculation formula of the posterior probability is: ; In the formula, represents the posterior probability; Indicates the given level parameter θ Download data X The likelihood function of ; Representation level parameters θ The prior distribution of represents the marginal probability of the observed data; The calculation formula of the weight is: ; In the formula, represents the posterior probability; θ ′ represents the set of all considered level parameters; Indicates a specific level parameter θ The weight of Indicates that given data X Under the condition that θ The posterior probability of ′.

5. The method for predicting energy consumption of a CNC milling machine based on time parameters according to claim 1 is characterized in that: The energy consumption prediction model is constructed by combining the weights and data points of the machine tool layer, the production line layer and the equipment type layer, and includes the following steps: S41, integrating the time parameter data of the machine tool layer, the production line layer and the equipment type layer and the data points corresponding to the energy consumption index; S42, selecting the most influential features for energy consumption prediction, and weighting the features according to the weights of each level; S43, grouping by meteorological factors, time factors and operation factors, calculating the local similarity within the group, and combining the local similarities to obtain the overall similarity of each historical data point relative to the prediction point; S44, according to the overall similarity, a threshold is set, and when the similarity between the historical data point and the prediction point exceeds the set threshold, the data point is selected as a training set; S45. Using the integrated, preprocessed and weighted data set, a gradient boosting tree is used to build and train an energy consumption prediction model; S46. Evaluate the performance of the energy consumption prediction model on the test set and verify the prediction ability.

6. The method for predicting energy consumption of a CNC milling machine based on time parameters according to claim 5 is characterized in that: The step of selecting the most influential features for energy consumption prediction and weighting the features according to the weights of each level includes the following steps: S421. Based on the integrated data set, identify all features and select features that have potential impact on energy consumption prediction; S422. Evaluate the importance of the initially screened features using statistical methods, and rank the features according to the results of the feature importance analysis; S423, selecting the feature that has the greatest impact on energy consumption prediction according to the feature importance ranking; S424, weighting the selected features according to the weights of the machine tool layer, the production line layer, and the equipment type layer; S425: Apply the calculated weight to each feature to generate a weighted feature set.

7. The method for predicting energy consumption of a CNC milling machine based on time parameters according to claim 6 is characterized in that: The grouping by meteorological factors, time factors and operation factors, calculating the local similarity within the group, and synthesizing the local similarities to obtain the overall similarity of each historical data point relative to the forecast point includes the following steps: S431, dividing factors affecting energy consumption into several groups according to the weighted feature set, wherein the factors affecting energy consumption include meteorological factors, time factors and operation factors; S432, respectively performing local similarity calculations on the meteorological factor, the time factor, and the operation factor; S433, combining the local similarities calculated within each group to obtain the overall similarity of each historical data point relative to the prediction point.

8. A CNC milling machine energy consumption prediction system based on time parameters, used to implement the CNC milling machine energy consumption prediction method based on time parameters as described in any one of claims 1 to 7, characterized in that: The system includes: a hierarchical division module, a weight distribution module, a data processing module, an energy consumption prediction model construction module and an energy consumption prediction module; The hierarchical division module is connected to the data processing module through the weight distribution module, and the data processing module is connected to the energy consumption prediction module through the energy consumption prediction model construction module; The hierarchical division module is used to divide the workshop into areas according to the operating factors of the CNC milling machine, and to divide each area into the machine tool layer, production line layer and equipment type layer; A weight allocation module is used to allocate weights to the machine tool layer, production line layer and equipment type layer according to production operation factors; A data processing module is used to collect time parameter data at the machine tool level, production line level and equipment type level, and extract data points corresponding to energy consumption indicators; Energy consumption prediction model building module, used to build energy consumption prediction model by combining weights and data points of machine tool layer, production line layer and equipment type layer; The energy consumption prediction module is used to input various data of the CNC milling machine in the actual processing process into the energy consumption prediction model to predict the total energy consumption and the energy consumption of each process.

Citation Information

Patent Citations

  • Method for predicting energy consumption of CNC milling machine based on time parameters

    CN103941644A

  • Energy consumption prediction method for digitalized workshop numerical control machine tool

    CN105159237A