Energy consumption simulation prediction method for cutting process based on CBAS-ELM algorithm

By introducing the logistic mapping of the chaos optimization algorithm into the Longhorn Algorithm and optimizing the weights and thresholds of the ELM network, the Longhorn Algorithm solves the problems of slow convergence and low accuracy in the energy consumption prediction of the machine tool cutting process, and achieves a higher prediction accuracy and stability.

CN114721330BActive Publication Date: 2024-10-01JIANGNAN UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210547783.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2024-10-01
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

The existing Longhorn Algorithm has the problems of slow convergence, low solution accuracy and easy to fall into local optimality in the energy consumption prediction of machine tool cutting process. In addition, the random generation of weights and thresholds of the extreme learning machine results in model instability and low prediction accuracy. .

Method used

The logistic mapping in the chaos optimization algorithm is used to improve the beetle algorithm, search through the chaotic variables generated by the chaotic disturbance, optimize the weights and thresholds of the ELM network, establish an energy consumption prediction model based on CBAS-ELM, and combine the global situation in the iterative process Search and local search speed up convergence.

Benefits of technology

It improves the accuracy and stability of energy consumption prediction, reduces the random search solution of the beetle algorithm, avoids the local optimal trap, and improves the performance of the ELM network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114721330B_ABST
    Figure CN114721330B_ABST
Patent Text Reader

Abstract

The present invention discloses a simulation prediction method for energy consumption of a cutting process based on a CBAS-ELM algorithm, and belongs to the technical field of energy consumption prediction for numerically controlled machine tools. Aiming at the problems of slow convergence, low solution accuracy, and easy falling into local optimum existing in the beetle whisker algorithm, the method adopts the logistic mapping in the chaos optimization algorithm to improve the beetle whisker algorithm, and uses the chaotic variables generated by the chaotic disturbance to search, so as to reduce the random search solution of the beetle whisker algorithm; the improved beetle whisker algorithm uses the chaotic disturbance mechanism to perform a global search in the first part of the iteration, and the second half of the iteration performs a local search based on the original behavior, thereby accelerating the convergence speed. Furthermore, in view of the problem that the weights and thresholds of the extreme learning machine are randomly generated, resulting in the instability of the ELM network and the low prediction accuracy, the present application uses the improved beetle whisker algorithm to optimize the ELM weights and thresholds, thereby improving the stability of the ELM, and then improving the prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a cutting process energy consumption simulation prediction method based on a CBAS-ELM algorithm, and belongs to the technical field of energy consumption prediction of numerically controlled machine tools. Background Art

[0002] CNC machine tools play an important role in modern production. They are basic energy-consuming equipment in the manufacturing industry and have a significant impact on the economies of countries around the world. With the rise of low-carbon manufacturing, reducing energy consumption has become one of the hot issues in CNC machining technology. Accurate prediction of energy consumption also has certain guiding significance for the processing process of enterprises.

[0003] In the process of machine tool processing, there are many factors affecting energy consumption and their effects are complex, making it difficult to obtain energy consumption. With the development of artificial intelligence, some new energy consumption models have been proposed. Among them, the extreme learning machine (ELM) is a commonly used algorithm in prediction. It has a simple theory, is easy to implement, has good generalization performance, and its learning speed is much faster than that of training using the back propagation algorithm (Huang GB, Zhu QY, Siew CK. Extreme learning machine: Theory and applications, Neurocomputing [J], 2006, 70 (1), 489-501). However, due to the defects of the ELM algorithm itself, its weights and thresholds are randomly generated, which will cause some shortcomings such as insufficient model prediction accuracy and instability during the simulation process. Therefore, some scholars have adopted other heuristic algorithms to optimize the above ELM model, such as the ant colony algorithm optimized ELM (ACO-ELM) model (Zhang Dujuan, Su Xi. Research on disease prediction based on improved extreme learning machine [J], 2020, 43(09), 56-60), genetic algorithm optimized ELM (GA-ELM) model (Qin Mian, Zhong Jianwei, Zhu Yongdan, Huang Ming, Zhang Jixue, Yan Bei. Research on short-term load forecasting based on GA-ELM [J]. Hubei Nationalities Research Institute Journal of University (Natural Science Edition), 2021, 39(01), 111-114), Particle Swarm Optimization ELM (PSO-ELM) Model (Fan Wei, Tian Li, Wang Chen, Feng Zhimin, Wu Daolin, Li Congfei. Short-term power system load forecasting based on PSO-ELM model [J]. Journal of Nanyang Institute of Technology, 2017, 9(04), 12-15), BAS-ELM Model (Liu Lu, Cao Zhengcai. Smart grid load forecasting method based on BAS_ELM [C]. Proceedings of the Fifth National Conference on Modern Manufacturing Integration Technology. 2018: 1-10), etc., and have achieved certain results.

[0004] Among the above optimization algorithms, the beetle whiskers (BAS) algorithm is a new type of heuristic algorithm with a simple optimization mechanism, convenient implementation, and small amount of computation, which has great research value. However, due to some defects in the implementation of the algorithm, such as its own theory is not perfect enough, its search range is randomly generated, so there are slow convergence, low solution accuracy, and easy to fall into local optimality (Liao Liefa, Yang Hong. A review of the research on beetle whiskers search algorithm [J]. Computer Engineering and Applications, 2021, 57(12), 54-64). Summary of the invention

[0005] In order to further improve the accuracy and stability of energy consumption prediction of machine tool cutting process using ELM model, the present invention provides a cutting process energy consumption simulation prediction method based on CBAS-ELM algorithm, the method comprising:

[0006] Step 1: Determine the input and output variables of the energy consumption prediction model and establish an energy consumption model based on the extreme learning machine ELM network;

[0007] Step 2: Use the chaotic beetle whisker optimization algorithm to optimize the weight threshold of the ELM network and establish an energy consumption prediction model based on CBAS-ELM; the chaotic beetle whisker optimization algorithm is an optimization algorithm obtained by improving the beetle whisker algorithm using the logistic mapping in the chaotic optimization algorithm;

[0008] Step 3: Use the CBAS-ELM-based energy consumption prediction model established in Step 2 to predict the energy consumption of the machine tool cutting process.

[0009] Optionally, the input and output variables of the energy consumption prediction model in Step 1 are:

[0010] Input variables: v-cutting speed; a p - cutting depth; f t - feed rate;

[0011] Output variables: E-energy consumption;

[0012] The relationship between input and output variables is:

[0013] E=E c +E va =E spindle +E feed =f(v,a p , f t ,mat) (1)

[0014] Among them, E c Indicates cutting energy consumption, E va Indicates variable energy consumption; E spindle Indicates the energy consumption of the spindle motor, Efeed Indicates the energy consumption of the feed axis motor; v-cutting speed, a p - cutting depth, f t -feed rate, mat-material characteristics.

[0015] Optionally, the energy consumption model based on the extreme learning machine ELM network is established in Step 1, including:

[0016] The ELM network includes an input layer, a hidden layer, and an output layer; the standard extreme learning machine calculation process is described as follows:

[0017]

[0018] Among them, L is the number of nodes in the hidden layer of the ELM network, β i is the weight connecting the i-th hidden layer node and the output layer node, g i (x) is the corresponding activation function, w i is the threshold of the i-th hidden layer node, b i is the offset of the i-th hidden layer; N represents the number of training samples; then formula (2) is expressed as:

[0019] T=Hβ (3)

[0020]

[0021]

[0022] Where m is the dimension of the input variable x, H is the hidden layer output matrix, and T is the training target matrix;

[0023] Obtain the input and output variable values ​​of the energy consumption prediction model and divide them into a training set and a test set;

[0024] According to the ELM algorithm theory, the energy consumption model of the ELM network is constructed, in which the input variables are x-cutting process v-cutting speed, a p - cutting depth and f t -feed amount, the output variable is E-energy consumption; set the number of hidden layers, initialize the weights and thresholds of the model according to the input and output variable values ​​in the training set, and obtain the energy consumption model based on the extreme learning machine ELM network.

[0025] Optionally, the chaotic beetle whisker optimization algorithm in Step 2 is an algorithm obtained by improving the beetle whisker algorithm by using the logistic mapping in the chaos optimization algorithm, and searching by using the chaotic variables generated by the chaotic disturbance to limit the search space to a region near the optimal solution. The specific optimization process includes:

[0026] Step (1). Parameter initialization: BAS algorithm parameter initialization, chaos optimization algorithm parameter initialization;

[0027] Step (2). Set the stop criteria. If the stop criteria are not met, jump to (3). If the stop criteria are met, jump to (10).

[0028] Step (3). BAS algorithm generates random search direction, position search, and status update;

[0029] Random search direction:

[0030]

[0031] Where k is the dimension of the space, rand() is the random search function;

[0032] Location Search:

[0033]

[0034]

[0035] In the search range, x l Represents the left whisker coordinate, x r represents the coordinate of the right whisker; d is the distance between the two whiskers;

[0036] Status Update:

[0037] x t+1 =x t -δ t bsign(f(x rt )-f(x lt )) (9)

[0038] Where x t represents the coordinates of the center of mass during iteration, x lt is the left whisker position coordinate at time t, x rt is the position coordinate of the right whisker at time t, δ t is the iteration step size, f(x rt ) is the value to be searched on the right, f(x lt ) is the value to be searched for on the left;

[0039] Step (4). Set the number of iterations. If it is less than iteration / 2, jump to step (5); if it is greater, jump to step (7);

[0040] Step (5). Initialize the chaotic population: Generate h random numbers between [0,1], which are h-dimensional chaotic variables Z=(Z1,Z2,...,Z k ) The initial values ​​of each component are used to generate n h-dimensional sequences with chaotic characteristics through n iterations;

[0041] The chaotic variables are generated by Logistic mapping, and the generated variables are mapped to the search area of ​​the optimization variables, that is, n initial positions are obtained. The specific formula is as follows;

[0042] Use Logistic mapping to generate a pseudo-random sequence y g+1 :

[0043] y g+1 =μy g (1-y g ) g ∈[0,1],μ∈[0,4],g=0,1,… (10)

[0044] Where y g Distributed between (0,1), y0∈(0,1) and μ is the bifurcation coefficient; μ t ∈[0,4] is the Logistic parameter, which is 3.5699456<μ t ≤4;

[0045] Using Logistic mapping to explain chaotic variables, formula (10) is rewritten as:

[0046]

[0047] Where y c is the cth chaotic variable, D represents the number of chaotic variables, and g is the number of iterations. After generating chaotic variables according to formula (11), the generated variables are mapped back to the search space of the problem to obtain the mapped search space position x gc , as shown in formula (12):

[0048]

[0049] Step (6) Local search: Use the method in (5) for Q iterations to generate an h-dimensional chaotic sequence of length Q, and then use x = x bst +R(Z-0.5), get Q at the optimal position x bst The search points with chaotic characteristics near the optimization function are substituted into the optimization function for testing, and the results are compared with the optimal solution of the function f bst Make comparisons;

[0050] Step (7) If the function value obtained by the search is less than the optimal solution of the function, the searched position can be updated to x bst , if not satisfied, jump to (8);

[0051] Step (8). Update the left and right whisker distance and step length of the BAS algorithm according to equations (13) and (14);

[0052] d t =0.95d t-1 +0.01 (13)

[0053] δ t =0.95δ t-1 (14)

[0054] Step (9). Return to f bst , x bst Optionally, the chaotic beetle whisker optimization algorithm is used in Step 2 to optimize the weight threshold of the ELM network, including:

[0055] The input and output variable values ​​of the energy consumption prediction model obtained in Step 1 are divided into a training set and a test set, and the cutting speed, cutting depth, and feed rate data in the training set are used as input variables of the ELM model, and the cutting energy consumption is used as the output variable of the ELM model to train the ELM model;

[0056] (1). Initialization parameter setting, ELM network structure setting; initialization of relevant parameters of chaotic beetle whisker optimization algorithm CBAS, including step size and search position of left and right whiskers;

[0057] (2) Divide the input and output variable values ​​of the energy consumption prediction model obtained in Step 1 into a training set and a test set, use the cutting speed, cutting depth, and feed rate data in the training set as the input variables of the ELM model, and the cutting energy consumption as the output variable of the ELM model for simulation;

[0058] (3) Define the objective function: take the training error of the ELM model in (2) as the fitness value, and use the CBAS algorithm to optimize the weight threshold of the extreme learning machine network; the training error refers to the error between the energy consumption prediction value obtained by inputting the input variable value in the training set into the ELM model and the actual prediction value;

[0059] (4) Determine whether the optimal solution is found; if not, update the step size and then the position of the longhorn beetle; if yes, directly update the position of the longhorn beetle;

[0060] (5) Determine whether the termination condition is met: if the termination condition is met, jump to (6); if the termination condition is not met, jump to (3); the termination condition is that the training error reaches a preset error threshold;

[0061] (6) Obtain the ELM network structure that meets the termination conditions: obtain the optimal weights and thresholds.

[0062] (7). Obtain the machine tool energy consumption prediction model based on CBAS-ELM network.

[0063] The beneficial effects of the present invention are:

[0064] This application aims at the problems of slow convergence, low solution accuracy, easy falling into local optimum, etc. of the beetle whisker (BAS) algorithm. The logistic mapping in the chaos optimization algorithm is used to improve the beetle whisker algorithm. The chaotic variables generated by chaotic disturbance are used for searching, so as to reduce the defects of the beetle whisker algorithm in random search and low solution accuracy, and obtain a chaotic disturbance beetle whisker algorithm (CBAS). Moreover, when the CBAS algorithm starts to iterate, the first part of the iteration uses the chaotic disturbance mechanism to perform global search, and the second half of the iteration performs local search based on the original behavior, so as to accelerate the convergence speed.

[0065] Furthermore, the present application addresses the problem of ELM network instability and low prediction accuracy caused by the random generation of extreme learning machine weights and thresholds. The present application scheme uses the CBAS algorithm to optimize the ELM weights and thresholds, thereby overcoming the instability of the ELM network, improving network performance and further improving prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0067] Figure 1 It is an energy consumption prediction model diagram established based on the ELM algorithm in the present invention.

[0068] Figure 2 It is a flow chart of a cutting process energy consumption simulation prediction method based on CBAS-ELM algorithm of the present invention.

[0069] Figure 3 The present invention uses MATLAB to optimize the ELM model using the traditional beetle whisker algorithm and the present application uses the improved beetle whisker algorithm to optimize the ELM model, and the error of power consumption prediction using training samples varies with the number of iterations. DETAILED DESCRIPTION

[0070] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0071] Embodiment 1:

[0072] This embodiment provides a cutting process energy consumption simulation prediction method based on the CBAS-ELM algorithm, the method comprising:

[0073] Step 1: Determine the input and output variables of the energy consumption prediction model;

[0074] Cutting energy consumption is mainly affected by process parameters and workpiece materials. This part of energy consumption can be expressed by formula (1):

[0075] E=E c +E va =E spindle +E feed =f(v,a p ,f t ,mat) (1)

[0076] Where E c Indicates cutting energy consumption, E va Indicates variable energy consumption, E spindle Indicates the energy consumption of the spindle motor, E feed Indicates the energy consumption of the feed axis motor, v-cutting speed, a p - cutting depth, f t -feed rate, mat-material characteristics.

[0077] In actual operation, the machining process is mainly controlled by modifying the control parameters of the machine tool. Therefore, the process parameters are used as independent variables to explore their relationship with energy consumption. Therefore, the input and output variables in the energy consumption prediction model are determined as follows:

[0078] Input variables: v-cutting speed; a p - cutting depth; f t - Feed rate.

[0079] Output variable: E-energy consumption.

[0080] Step 2: Establish an energy consumption model based on the extreme learning machine ELM network according to the input and output variables determined in step 1;

[0081] The ELM network consists of an input layer, a hidden layer, and an output layer; the standard extreme learning machine calculation process can be described as follows:

[0082]

[0083] Where L is the number of nodes in the hidden layer of the ELM network, β i is the weight connecting the i-th hidden layer node and the output layer node, g i (x) is the corresponding activation function, w i is the threshold of the i-th hidden layer node, b i is the offset of the i-th hidden layer; N represents the number of training samples; then formula (2) is expressed as:

[0084] T=Hβ (3)

[0085]

[0086]

[0087] Where m is the dimension of the input variable x, H is the hidden layer output matrix, and T is the training target matrix;

[0088] According to the ELM algorithm theory, the energy consumption model of the ELM network is built, where the input variables are v-cutting speed during the cutting process; a p - cutting depth; f t -feed amount, the output variable is E-energy consumption, the number of hidden layers is set to 12, and the weights and thresholds of the model are initialized.

[0089] The model was simulated using MATLAB to obtain the prediction results of the initial ELM model and verify whether the accuracy requirements were met.

[0090] Step 3: The logistic mapping in the chaos optimization algorithm is used to improve the beetle whisker algorithm, and a chaotic beetle whisker (CBAS) optimization algorithm is obtained;

[0091] The logistic mapping in the chaos optimization algorithm is used to improve the beetle whisker algorithm, and a chaotic beetle whisker (CBAS) optimization algorithm is obtained, which includes:

[0092] The traditional beetle whisker (BAS) algorithm has problems such as slow convergence, low solution accuracy, and easy to fall into local optimality. Therefore, this application uses the logistic mapping in the chaos optimization algorithm to improve the beetle whisker algorithm, and uses the chaotic variables generated by chaotic disturbance to search, so as to reduce the defects of random search solution and low solution accuracy of the beetle whisker algorithm, and obtains a chaotic perturbation beetle whisker algorithm (CBAS). The steps are as follows:

[0093] (1) Parameter initialization: BAS algorithm parameter initialization, chaos optimization algorithm parameter initialization;

[0094] (2) Set the stopping criterion (i.e., determine whether the optimal solution of the optimized function has been found). If the stopping criterion is not met, jump to (3). If the stopping criterion is met, jump to (10).

[0095] (3).BAS algorithm generates random search direction, position search, and status update;

[0096] Random search direction:

[0097]

[0098] Where k is the dimension of the space, rand() is the random search function;

[0099] Location Search:

[0100]

[0101]

[0102] In the search range, x l Represents the left whisker coordinate, x r represents the coordinate of the right whisker; d is the distance between the two whiskers;

[0103] Status Update:

[0104] x t+1 =x t -δ t bsign(f(x rt )-f(x lt )) (9)

[0105] Where x t represents the coordinates of the center of mass during iteration, x lt is the left whisker position coordinate at time t, x rt is the position coordinate of the right whisker at time t, δ t is the iteration step size, f(x rt ) is the value to be searched on the right, f(x lt ) is the value to be searched for on the left;

[0106] (4) Set the number of iterations. If it is less than iteration / 2, jump to step (5). If it is greater, jump to step (7).

[0107] (5) Chaotic initialization population: Generate h random numbers between [0,1], which are h-dimensional chaotic variables Z=(Z1,Z2,...,Z k ) The initial values ​​of each component are used to generate n h-dimensional sequences with chaotic characteristics through n iterations;

[0108] The chaotic variables are generated by Logistic mapping, and the generated variables are mapped to the search area of ​​the optimization variables, that is, n initial positions are obtained. The specific formula is as follows;

[0109] Use Logistic mapping to generate a pseudo-random sequence y g+1 :

[0110] y g+1 =μy g (1-y g ) g ∈[0,1],μ∈[0,4],g=0,1,… (10)

[0111] Where y gDistributed between (0,1), y0∈(0,1) and μ is the bifurcation coefficient; μ t ∈[0,4] is called the Logistic parameter, which is 3.5699456<μ t ≤4;

[0112] Using Logistic mapping to explain chaotic variables, formula (10) is rewritten as:

[0113]

[0114] Where y c is the cth chaotic variable, c represents the number of chaotic variables, g is the number of iterations. After generating chaotic variables according to formula (11), the generated variables are mapped back to the search space of the problem to obtain the mapped search space position x gc , as shown in formula (12):

[0115]

[0116] (6) Local search: Use the method in (5) for Q iterations to generate an h-dimensional chaotic sequence of length Q, and then use x = x bst +R(Z-0.5), get Q at x bst (x bst The search points with chaotic characteristics near the optimal position are substituted into the optimization function for testing, and are compared with f bst (f bst is the optimal solution of the function) for comparison;

[0117] (7) If the function value obtained by the search is less than the optimal solution of the function, the searched position can be updated to x bst , if not satisfied, jump to (8);

[0118] (8). Update the left and right whisker distance and step length of the BAS algorithm;

[0119] d t =0.95d t-1 +0.01 (13)

[0120] δ t =0.95δ t-1 (14)

[0121] (9). Return f bst , x bst ;

[0122] When the beetle whisker algorithm is searching for the optimal solution, the search direction it generates is random, which will cause the algorithm's search results to fall into the local optimum. The chaos optimization algorithm has randomness (chaotic variables appear to be as messy as random variables on the surface. If it is a two-dimensional chaotic variable, its value is a point that looks messy on the plane), convenience (chaotic variables can traverse all states in the space without repetition, that is, the value of the chaotic variable in the evolution process will never be repeated), and can achieve excellent global search functions. Therefore, the logistic mapping in the chaos optimization algorithm is used to improve the beetle whisker algorithm. When the area near the optimal solution obtained by the BAS algorithm, the chaos algorithm is used to generate n h-dimensional sequences with chaotic characteristics and map them to the search space. This will generate n search points with chaotic characteristics, increase the search range, and make it closer to the optimal solution. These points are further searched and substituted into the optimization function for testing, respectively compared with f bst (f bst The optimal solution of the function is compared to prevent the BAS algorithm from falling into the local optimal solution, so as to reduce the defects of random search solution and low solution accuracy of the beetle whisker algorithm, and a chaotic perturbation beetle whisker algorithm (CBAS) is obtained.

[0123] Step 4: Use the CBAS algorithm proposed in step 3 to optimize the weight threshold of the ELM network and establish an energy consumption prediction model based on CBAS-ELM;

[0124] Divide the training set and the test set, use the cutting speed, cutting depth, and feed rate data in the training set as the input variables of the ELM model, and the cutting energy consumption as the output variable of the ELM model for simulation, including:

[0125] (1) Initialization parameter setting, ELM network structure setting, CBAS algorithm related parameters initialization, including step size, left and right whisker search positions, etc.

[0126] (2) Divide the training set and the test set, use the cutting speed, cutting depth, and feed rate data in the training set as the input variables of the ELM model, and the cutting energy consumption as the output variable of the ELM model for simulation.

[0127] (3) Define the objective function: Take the training error of the ELM model in (2) as the fitness value and use the CBAS algorithm to optimize the weight threshold of the extreme learning machine network.

[0128] (4) Whether the optimal value is found. If not, update the step size and then update the position of the longhorn beetle. If yes, directly update the position of the longhorn beetle.

[0129] (5) Determine whether the termination condition is met: If the termination condition is met, jump to (6); if the termination condition is not met, jump to (3).

[0130] (6) Obtain the ELM network structure: obtain the optimal weights and thresholds.

[0131] (7). Establish a machine tool energy consumption prediction model based on CBAS-ELM network.

[0132] Step 5: Use MATLAB software to simulate the model, obtain the prediction results of the CBAS-ELM model, and analyze the model accuracy; the size of the model accuracy indicates the accuracy of the energy consumption prediction model proposed in this application for energy consumption prediction. When the model accuracy reaches the preset value, the model can be used in subsequent practical applications to predict the actual energy consumption of the machine tool cutting process;

[0133] In this example, the coefficient of determination (R 2 ) and absolute percentage error (MAPE) are calculated.

[0134] Coefficient of determination:

[0135]

[0136] In the formula is the true value, y i is the predicted value, is the average value.

[0137] Absolute Percent Error:

[0138]

[0139] In the formula is the true value, y i is the predicted value.

[0140] When the method proposed in this application is used to predict energy consumption in the future, only the v-cutting speed of the machine tool cutting process needs to be collected; a p - cutting depth; f t -Feed rate, you can accurately predict the energy consumption of the machine tool.

[0141] Embodiment 2:

[0142] This embodiment provides a cutting process energy consumption simulation prediction method based on the CBAS-ELM algorithm. Figure 1 , the method comprising:

[0143] Step 1: Determine the input and output variables of the energy consumption prediction model to be built;

[0144] According to the energy consumption mathematical model described in formula (1), taking the cutting process of a workpiece as an example, v-cutting speed, a p - cutting depth and f t-feed rate, the three machining factors are input variables, and each factor takes four levels, that is, the four-level-three-factor design matrix is ​​used in the experimental design, and the experimental factor level table is shown in Table 1.

[0145] Table 1. Experimental factor level table

[0146] Impact Factor Level 1 Level 2 Level 3 Level 4 <![CDATA[X1—V(m / min)]]> 60 80 100 120 <![CDATA[X2—a p (mm)]]> 0.5 1 1.5 2 <![CDATA[X3—f t (mm / t)]]> 0.1 0.15 0.2 0.25

[0147] Obtain the energy consumption data during the machining process and remove the singular samples. Based on the existing public data set (Zhou Zhiheng. Energy consumption prediction modeling and parameter optimization of CNC lathe cutting process [D]. Huazhong University of Science and Technology. 2016), the energy consumption is modeled. The experimental data are shown in Table 2 and Table 3.

[0148] Table 2. Training samples

[0149]

[0150]

[0151] Table 3. Test samples

[0152] NO. V(m / min) <![CDATA[f t (mm / r)]]> <![CDATA[a p (mm)]]> E(W) 1 70 0.12 0.6 1590.6 2 90 0.15 0.8 2221.7 3 90 0.16 1 2504.3 4 100 0.18 1 2922.8 5 110 0.2 1.2 3703.8

[0153] Step 2: Establish an energy consumption model based on the extreme learning machine ELM network;

[0154] According to the ELM algorithm theory, the energy consumption model of the ELM network is built, where the input variables are v-cutting speed during the cutting process; a p - cutting depth; f t -feed amount, the output variable is E-energy consumption, the number of hidden layers is set to 12, the weights and thresholds of the model are initialized, and the established ELM model is as follows Figure 1 shown.

[0155] Step 3: The logistic mapping in the chaos optimization algorithm is used to improve the beetle whisker algorithm, and a chaotic beetle whisker (CBAS) optimization algorithm is obtained;

[0156] The logistic mapping improves the beetle beard algorithm. When the CBAS algorithm starts to iterate, the first part of the iteration uses the chaotic perturbation mechanism to perform a global search, while the second half of the iteration performs a local search based on the original behavior, which can speed up the convergence. The steps are as follows:

[0157] (1) Parameter initialization: BAS algorithm parameter initialization, chaos optimization algorithm parameter initialization;

[0158] (2) Set the stop standard. If the stop standard is not reached, jump to (3). If the stop standard is reached, jump to (10).

[0159] (3).BAS algorithm generates random search direction, position search, and status update;

[0160] Random search direction:

[0161]

[0162] Where k is the dimension of the space and rand() is the random search function.

[0163] Location Search:

[0164]

[0165]

[0166] In the search range, x l represents the left whisker coordinate, x r represents the coordinate of the right whisker. d is the distance between the two whiskers.

[0167] Status Update:

[0168] x t+1 =x t -δ t bsign(f(x rt )-f(x lt )) (9)

[0169] Where x t represents the coordinates of the center of mass during iteration, x lt is the left whisker position coordinate, x rt is the right whisker position coordinate, δ t is the iteration step size.

[0170] (4) Set the number of iterations. If it is less than iteration / 2, jump to step (5). If it is greater, jump to step (7).

[0171] (5) Chaotic initialization population: Use formula (10) to generate m random numbers between [0,1], which are m-dimensional chaotic variables Z = (Z1, Z2, ..., Z m ) The initial values ​​of each component are obtained, and 2N m-dimensional sequences with chaotic characteristics are generated through 2N iterations. Through the Logistic mapping of formula (12), it is mapped to the search area of ​​the optimization variable, that is, 2N initial positions are obtained, and the one with better fitness value is selected as the initial position;

[0172] Logistic mapping to generate pseudo-random sequences:

[0173] y i+1 =μy i (1-y i )i ∈[0,1],μ∈[0,4],i=0,1,… (10)

[0174] Where y i Distributed between (0,1), y0∈(0,1) and μ is the bifurcation coefficient. t ∈[0,4] is called the Logistic parameter. Generally, it is taken as 3.5699456<μ t ≤4.

[0175] Using Logistic mapping to explain chaotic variables, formula (10) is rewritten as:

[0176]

[0177] Where y j is the chaotic variable of j, i is the number of iterations, and after generating chaotic variables according to formula (11), the generated variables are mapped back to the search space of the problem, as shown in formula (12):

[0178]

[0179] (6) Local search: Use the method in (5) for K iterations to generate an m-dimensional chaotic sequence of length K, and then use Get K in x bst Search points with chaotic characteristics nearby, substitute these points into the optimization function for testing, and compare them with f bst Make comparisons;

[0180] (7) If f(x)<f bst , you can update x to x bst , if not satisfied, jump to (8);

[0181] (8). Update the length and step size of the left and right whiskers of the BAS algorithm;

[0182] d t =0.95d t-1 +0.01 (13)

[0183] δ t =0.95δ t-1 (14)

[0184] (9). Return f bst , x bst ;

[0185] (10). End

[0186] The improved algorithm is simulated and tested using MATLAB to verify the feasibility of the improved algorithm. The test function is shown in Table 4, and the test results are shown in Table 5:

[0187] Table 4. Test function expressions and target values

[0188]

[0189] Table 5. Function test performance

[0190]

[0191] Step 4: Use the CBAS algorithm proposed in step 3 to optimize the weight threshold of the ELM network and establish an energy consumption prediction model based on CBAS-ELM, including:

[0192] (1) Initialization parameter setting, ELM network structure setting, CBAS algorithm related parameters initialization, including step size, left and right whisker distance, etc.

[0193] (2) Define the objective function: Take the training set error in the ELM model as the fitness value and use the CBAS algorithm to optimize the weight threshold of the ELM network.

[0194] (3) Calculate the coordinates of the left and right whiskers of the CBAS algorithm.

[0195] (4) Whether the optimal value is found. If not, update the step size and then update the position of the longhorn beetle. If yes, directly update the position of the longhorn beetle.

[0196] (5) Determine whether the termination condition is met: If the termination condition is met, jump to (6); if the termination condition is not met, jump to (3).

[0197] (6) Obtain the ELM network structure: obtain the optimal weights and thresholds.

[0198] (7) Establish a machine tool energy consumption prediction model based on CBAS-ELM network

[0199] Step 5: Use MATLAB to simulate the model, obtain the prediction results of the CBAS-ELM model, and analyze the model accuracy;

[0200] In order to verify the feasibility of the proposed model, the beetle whisker optimized ELM energy consumption model (BAS-ELM, see Liu Lu, Cao Zhengcai. Smart grid load forecasting method based on BAS_ELM [C]. Proceedings of the Fifth National Modern Manufacturing Integration Technology Academic Conference. 2018: 1-10), the ant colony algorithm optimized ELM model (ACO-ELM, see Zhang Dujuan, Su Xi. Disease prediction based on improved extreme learning machine [J], 2020, 43(09), 56-60), and the genetic algorithm optimized ELM model were established. The GA-ELM model (see Qin Mian, Zhong Jianwei, Zhu Yongdan, Huang Ming, Zhang Jixue, Yan Bei. Research on short-term load forecasting based on GA-ELM [J]. Journal of Hubei University for Nationalities (Natural Science Edition), 2021, 39(01), 111-114) and the Chaos Longicorn Beetle Optimization ELM model (CBAS-ELM) were used. The MATLAB software was used to simulate and verify the established models, and the prediction accuracy of each model was calculated, using the absolute percentage error (MAPE) and the determination coefficient (R 2 ) indicates that the lower the MAPE value, the higher the accuracy of the model; R 2 The closer it is to 1, the higher the accuracy of the model. Figure 3 The simulation diagram of the change of the error of power consumption prediction using training samples with the traditional beetle whisker algorithm to optimize the ELM model and the improved beetle whisker algorithm to optimize the ELM model in this application is shown in MATLAB. The established model is simulated using training samples, where the training error is set to be less than 0.01, such as Figure 3 It can be seen that the error of the BAS-ELM model reached more than 90% at the beginning of training with the training set, and then slowly decreased. The initial training error of the CBAS-ELM model proposed in this application is only about 20%, and the convergence speed of the model is faster than that of the BAS-ELM model. Its error accuracy is also less than 0.01, which meets the design requirements.

[0201] Table 6. Prediction values ​​of each model

[0202]

[0203]

[0204] Table 7. MAPE and R 2

[0205] ELM BAS-ELM ACO-ELM GA-ELM CBAS-ELM MAPE 0.0830 0.0743 0.0593 0..0540 0.0445 <![CDATA[R 2 ]]> 0.9091 0.9380 0.9599 0.9665 0.9733

[0206] In contrast, the accuracy of the established CBAS-ELM model is the best.

[0207] In this embodiment, the cutting process of CNC machine tools is taken as the research object, the cutting speed, cutting depth and feed speed are taken as input parameters, and the energy consumption is taken as the output parameter. A prediction model of the energy consumption of the cutting process of CNC machine tools based on the extreme learning machine algorithm (ELM) is established. In order to improve the accuracy and stability of model prediction, a chaotic beetle whisker search algorithm (CBAS) is proposed to optimize the ELM model, and a prediction model based on the CBAS-ELM algorithm is established. The simulation results show that the CBAS-ELM model of the present invention has good accuracy and stability in energy consumption prediction.

[0208] Some steps in the embodiments of the present invention may be implemented using software, and the corresponding software program may be stored in a readable storage medium, such as a CD or a hard disk.

[0209] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. The energy consumption simulation prediction method of cutting process based on CBAS-ELM algorithm is characterized by: The method comprises: Step 1: Determine the input and output variables of the energy consumption prediction model and establish an energy consumption model based on the extreme learning machine ELM network; Step 2: Use the chaotic beetle whisker optimization algorithm to optimize the weight threshold of the ELM network and establish an energy consumption prediction model based on CBAS-ELM; the chaotic beetle whisker optimization algorithm is an optimization algorithm obtained by improving the beetle whisker algorithm using the logistic mapping in the chaotic optimization algorithm; Step 3: Use the CBAS-ELM-based energy consumption prediction model established in Step 2 to predict the energy consumption of the machine tool cutting process; In the Step 1, an energy consumption model based on an extreme learning machine ELM network is established, including: The ELM network includes an input layer, a hidden layer, and an output layer; the standard extreme learning machine calculation process is described as follows: Among them, L is the number of nodes in the hidden layer of the ELM network, β i is the weight connecting the i-th hidden layer node and the output layer node, g i (x) is the corresponding activation function, w i is the threshold value of the i-th hidden layer node, b i is the offset of the i-th hidden layer; N represents the number of training samples; then formula (2) is expressed as: T=Hβ (3) Where m is the dimension of the input variable x, H is the hidden layer output matrix, and T is the training target matrix; Obtain the input and output variable values ​​of the energy consumption prediction model and divide them into a training set and a test set; According to the ELM algorithm theory, the energy consumption model of the ELM network is constructed, in which the input variables are x-cutting process v-cutting speed, a p - cutting depth and f t -The vector composed of feed amount, the output variable is E-energy consumption; set the number of hidden layers, initialize the weights and thresholds of the model according to the input and output variable values ​​in the training set, and obtain the energy consumption model based on the extreme learning machine ELM network; The chaotic beetle beard optimization algorithm in Step 2 is an algorithm obtained by improving the beetle beard algorithm by using the logistic mapping in the chaotic optimization algorithm, and searching by using the chaotic variables generated by the chaotic disturbance to limit the search space to the area near the optimal solution. The specific optimization process includes: Step (1). Parameter initialization: BAS algorithm parameter initialization, chaos optimization algorithm parameter initialization; Step (2). Set the stop criteria. If the stop criteria are not met, jump to (3). If the stop criteria are met, jump to (10). Step (3). BAS algorithm generates random search direction, position search, and status update; Random search direction: Where k is the dimension of the space, rand() is the random search function; Location Search: In the search range, x l Represents the left whisker coordinate, x r represents the coordinate of the right whisker; d is the distance between the two whiskers; Status Update: x t+1 =x t -δ t bsign(f(x rt )-f(x lt ))(9) Where x t represents the coordinates of the center of mass during iteration, x lt is the left whisker position coordinate at time t, x rt is the position coordinate of the right whisker at time t, δ t is the iteration step size, f(x rt ) is the value to be searched on the right, f(x lt ) is the value to be searched for on the left; Step (4). Set the number of iterations. If it is less than iteration / 2, jump to step (5); if it is greater, jump to step (7); Step (5). Initialize the chaotic population: Generate h random numbers between [0,1], which are h-dimensional chaotic variables Z=(Z1,Z2,...,Z k ) The initial values ​​of each component are used to generate n h-dimensional sequences with chaotic characteristics through n iterations; The chaotic variables are generated by Logistic mapping, and the generated variables are mapped to the search area of ​​the optimization variables, that is, n initial positions are obtained. The specific formula is as follows; Use Logistic mapping to generate a pseudo-random sequence y g+1 : y g+1 =μy g (1-y g )y g ∈[0,1],μ∈[0,4],g=0,1,… (10) Where y g Distributed between (0,1), y0∈(0,1) and μ is the bifurcation coefficient; μ t ∈[0,4] is the Logistic parameter, which is 3.5699456<μ t ≤4; Using Logistic mapping to explain chaotic variables, formula (10) is rewritten as: Where y c is the cth chaotic variable, D represents the number of chaotic variables, and g is the number of iterations. After generating chaotic variables according to formula (11), the generated variables are mapped back to the search space of the problem to obtain the search space position x after mapping. gc , as shown in formula (12): Step (6) Local search: Use the method in (5) for Q iterations to generate an h-dimensional chaotic sequence of length Q, and then use x = x bst +R(Z-0.5), get Q at the optimal position x bst The search points with chaotic characteristics near the optimization function are substituted into the optimization function for testing, and the results are compared with the optimal solution of the function f bst Make comparisons; Step (7) If the function value obtained by the search is less than the optimal solution of the function, the searched position can be updated to x bst , if not satisfied, jump to (8); Step (8). Update the left and right whisker distance and step length of the BAS algorithm according to equations (13) and (14); <h2 style=";text-align:left;direction:ltr">d<h2 style=";text-align:left;direction:ltr"> t <h2 style=";text-align:left;direction:ltr"> <0.95d<h2 style=";text-align:left;direction:ltr"> t-1 <h2 style=";text-align:left;direction:ltr"> +0.01 (13) d t =0.95d t-1 (14) Step (9). Return to f bst , x bst ; In the Step 2, the weight threshold of the ELM network is optimized by using the chaotic beetle whisker optimization algorithm, including: The input and output variable values ​​of the energy consumption prediction model obtained in Step 1 are divided into a training set and a test set, and the cutting speed, cutting depth, and feed rate data in the training set are used as input variables of the ELM model, and the cutting energy consumption is used as the output variable of the ELM model to train the ELM model; (1). Initialization parameter setting, ELM network structure setting; initialization of relevant parameters of chaotic beetle whisker optimization algorithm CBAS, including step size and search position of left and right whiskers; (2) Divide the input and output variable values ​​of the energy consumption prediction model obtained in Step 1 into a training set and a test set, use the cutting speed, cutting depth, and feed rate data in the training set as the input variables of the ELM model, and the cutting energy consumption as the output variable of the ELM model for simulation; (3) Define the objective function: take the training error of the ELM model in (2) as the fitness value, and use the CBAS algorithm to optimize the weight threshold of the extreme learning machine network; the training error refers to the error between the energy consumption prediction value obtained by inputting the input variable value in the training set into the ELM model and the actual prediction value; (4) Determine whether the optimal solution is found; if not, update the step size and then the position of the longhorn beetle; if yes, directly update the position of the longhorn beetle; (5) Determine whether the termination condition is met: if the termination condition is met, jump to (6); if the termination condition is not met, jump to (3); the termination condition is that the training error reaches a preset error threshold; (6) Obtain the ELM network structure that meets the termination conditions: obtain the optimal weights and thresholds; (7). Obtain the machine tool energy consumption prediction model based on CBAS-ELM network.

2. The method according to claim 1, characterized in that: The input and output variables of the energy consumption prediction model in Step 1 are: Input variables: v-cutting speed; a p - cutting depth; f t - feed rate; Output variables: E-energy consumption; The relationship between input and output variables is: E=E c +E va =E spindle +E feed =f(v,a p ,f t ,mat) (1) Among them, E c Indicates cutting energy consumption, E va Indicates variable energy consumption; E spindle Indicates the energy consumption of the spindle motor, E feed Indicates the energy consumption of the feed axis motor; v-cutting speed, a p - cutting depth, f t -feed rate, mat-material characteristics.

Citation Information

Patent Citations

  • Machine tool cutting amount energy consumption optimization method based on adaptive genetic algorithm

    CN105844356A

  • Machine tool manufacturing system processing and energy saving optimization method based on particle swarm algorithm

    CN105929689A

  • Method for establishing low-carbon optimization model of cutting parameters

    CN106777660A

  • Machining energy-saving optimization method for machine tool based on longicorn beard algorithm

    CN111859698A

  • Building energy consumption prediction method based on longicorn beard optimization algorithm and neural network

    CN112418495A