Biomass energy generating capacity prediction method and system based on machine learning

Through the CNN-GRNN neural network hybrid algorithm and DBO algorithm optimization, the uncertainty problem of biomass power generation prediction is solved, more accurate and reliable prediction results are achieved, and the uncertainty of biomass power generation prediction is reduced.

CN118713072APending Publication Date: 2024-09-27洪泽县晓天木业制品厂 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410915755.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

It is difficult to accurately predict biomass power generation with existing technology. It is affected by uncertain factors such as ambient temperature and solar radiation fluctuations, resulting in inaccurate prediction results.

Method used

A hybrid algorithm based on CNN-GRNN neural network is used to perform machine learning on the long-term historical data of the biogas power generation system. By constructing an input feature matrix and a pre-trained model, the daily grid power of the biogas generator is predicted, and is optimized by combining the DBO algorithm and the random sampling method. Model weights to improve prediction accuracy.

Benefits of technology

It reduces the uncertainty of biomass power generation prediction, improves prediction accuracy and confidence, avoids over-fitting and under-fitting problems, and ensures the reliability of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118713072A
    Figure CN118713072A
Patent Text Reader

Abstract

A biomass energy generating capacity prediction method based on machine learning is characterized by comprising the following steps: collecting gas storage cabinet discharge flow, on-grid energy and non-on-grid energy of a biomass energy methane production and power generation system and environment data of the system, and constructing an input feature matrix; and inputting the input characteristic matrix into a pre-trained CNN-GRNN model to obtain a predicted generating capacity curve of the biogas generator in the system. According to the method, long-term historical data in the biogas power generation system are comprehensively considered, the characteristics of the power generation system are fully analyzed, and the uncertainty of biomass energy generating capacity prediction is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power systems, and more specifically, to a method and system for predicting biomass power generation based on machine learning. Background Art

[0002] With the advancement of new energy construction, biomass energy has become a new energy source that has attracted much attention due to its characteristics of being unaffected by weather and sustainable in power generation. Biomass energy is converted from solar energy. Through photosynthesis of plants, solar energy is converted into chemical energy and stored in biomass. It is a renewable energy source. Currently, the more effective ways to use biomass energy are: producing biogas and using biomass to produce alcohol.

[0003] Using biomass materials such as livestock manure and straw to produce biogas through anaerobic digestion is an important way to achieve industrialized biomass power generation and grid connection. The output of biogas is affected by multiple complex factors such as materials, temperature, and environmental changes. At the same time, the anaerobic digestion equipment that produces biogas is also affected by uncertain factors such as rural ambient temperature and solar radiation fluctuations. After the biogas stored in the gas storage cabinet is sent to the biogas generator through the valve to generate electricity, part of the electricity generated will drive the electric boiler to convert into heat energy. The above uncertainties make it difficult for the grid dispatching department to predict the power generation of biomass energy. Accurately predicting the power generation of biomass energy is an important problem to be solved.

[0004] In response to this problem, some scholars have proposed a rolling optimization operation method across hydraulic retention cycles, which takes into account equipment climbing, heat balance, temperature stability and other constraints based on updated environmental forecast data and anaerobic digestion operation conditions. However, the operation time span of rural biomass power generation systems is long, and when making decisions on equipment output, it is necessary to consider not only the current status, but also the uncertainties of ambient temperature and solar radiation under cross-cycle operation, and continuously optimize the remaining time by updating the forecast data.

[0005] However, the use of rolling optimization to predict biomass power generation in real time assumes that the uncertainty of biomass power generation changes slowly, that is, the changes before and after the prediction are not large or follow a regular pattern. But in fact, the uncertainty of biomass power generation is uncertain, which leads to inaccurate prediction results and low reference value.

[0006] In view of the above problems, a new biomass energy power generation prediction method and system is urgently needed. Summary of the invention

[0007] In order to solve the deficiencies in the prior art, the present invention provides a method and system for predicting biomass power generation based on machine learning. Through the CNN-GRNN neural network hybrid algorithm, machine learning is performed on long-term historical data related to the biogas power generation system to predict the daily grid-connected power of the biogas generator.

[0008] The present invention adopts the following technical solution.

[0009] The first aspect of the present invention relates to a method for predicting biomass power generation based on machine learning, the method comprising the following steps: collecting the emission flow rate of the gas storage cabinet of the biomass energy production and power generation system, the online power, the off-grid energy, and the environmental data of the system, and constructing an input feature matrix; inputting the input feature matrix into a pre-trained CNN-GRNN model to obtain a predicted power generation curve of the biogas generator in the system.

[0010] Preferably, the pre-trained CNN-GRNN model includes: taking the path between any two nodes in the input layer and the connection layer in the CNN-GRNN model as a sample to be optimized; taking all the samples to be optimized as input, and using the DBO algorithm to iteratively improve the input layer weights and the connection layer weights in the CNN-GRNN model.

[0011] Preferably, the DBO algorithm is used to iteratively improve the input layer weights and connection layer weights in the CNN-GRNN model, including: when the number of iterations of the DBO algorithm exceeds a preset value or the fitness value exceeds a preset value, retaining the optimal solution of each iterative process to obtain an optimal solution set; substituting each optimal solution in the optimal solution set into the CNN-GRNN model, calculating the model output during random retreat, so as to extract the optimal weights of the CNN-GRNN model from the optimal solution set.

[0012] Preferably, each optimal solution in the optimal solution set is substituted into the CNN-GRNN model to calculate the model output during random temporary withdrawal, including: removing the output nodes in the CNN-GRNN model and assigning row and column numbers to each node of the GRNN structure in the CNN-GRNN model; extracting the current optimal solution from the optimal solution set, and updating the input layer weights and connection layer weights in the CNN-GRNN model; randomly sampling the row and column numbers of each node to obtain multiple temporary withdrawal nodes, setting the connection weights related to the multiple temporary withdrawal nodes to 0, and then performing model training to calculate a single output of the CNN-GRNN model; repeating the random sampling multiple times to obtain multiple outputs of the CNN-GRNN model.

[0013] Preferably, the optimal weight of the CNN-GRNN model is extracted from the optimal solution set, including: using multiple outputs of the CNN-GRNN model to generate an evaluation error of a current optimal solution; traversing the optimal solution set, analyzing the evaluation error corresponding to each optimal solution in the optimal solution set, and extracting an optimal solution with the smallest evaluation error; substituting the optimal solution with the smallest evaluation error into the CNN-GRNN model, updating the weight of the CNN-GRNN model, and obtaining a pre-trained CNN-GRNN model.

[0014] Preferably, the row and column numbers of each node are randomly sampled to obtain multiple temporarily retired nodes, including: obtaining the probability density function after the standard normal distribution is compressed to the positive semi-axis, performing the first sampling with the probability density function as the distribution condition, and corresponding the first sampling result to the row number of each node; performing the second sampling with the exponential distribution as the distribution condition, and corresponding the second sampling result to the column number of each node; combining the row number and the column number to obtain a temporarily retired node in the CNN-GRNN model; and obtaining multiple temporarily retired nodes by repeating the above process.

[0015] Preferably, the probability density function after the standard normal distribution is compressed to the positive semi-axis is:

[0016]

[0017] In the formula, p(x) is the probability density function of the parameter x on the positive semi-axis; the first sampling is performed using the probability density function as a distribution condition, including: using the exponential distribution as a reference distribution of the probability density function, and implementing the first sampling using a rejection sampling method.

[0018] The second aspect of the present invention relates to a biomass power generation prediction system based on learning using the method in the first aspect of the present invention, the system includes a collection module and a prediction module; wherein the collection module is used to collect the emission flow of the gas storage cabinet of the biomass energy production and power generation system, the online power, the non-online power, and the environmental data of the system, and construct an input feature matrix; the prediction module is used to input the input feature matrix into a pre-trained CNN-GRNN model to obtain the predicted power generation curve of the biogas generator in the system.

[0019] A third aspect of the present invention relates to a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method according to the first aspect of the present invention.

[0020] A fourth aspect of the present invention relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in the first aspect of the present invention.

[0021] The beneficial effect of the present invention is that, compared with the prior art, the method and system for predicting biomass power generation based on machine learning in the present invention predicts the daily grid-connected power of biogas generators by machine learning the long-term historical data related to the biogas power generation system through the CNN-GRNN neural network hybrid algorithm. The present invention comprehensively considers the long-term historical data in the biogas power generation system, fully analyzes the characteristics of the power generation system, and reduces the uncertainty of biomass power generation prediction.

[0022] The beneficial effects of the present invention also include:

[0023] 1. Adopt Adam, DBO, random extraction of temporary withdrawal nodes and other methods to jointly improve the model pre-training process, ensure that the evaluation error is closer to the actual output error of the model, ensure the accurate selection of each weight parameter during the training process, and improve the prediction accuracy and confidence.

[0024] 2. The method draws on Monte Carlo sampling methods such as inverse sampling and rejection sampling. Under the premise that the data of each dimension in the input matrix is ​​approximately Gaussian distributed, it ensures that the sampling results also obey the Gaussian distribution. In this way, while fully improving the temporary withdrawal rate, the calculation results of the neural network are still comprehensive and reliable, and under the premise of fully eliminating overfitting, the occurrence of underfitting problems is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of energy conversion of a biomass energy production and power generation system in the prior art;

[0026] Figure 2 A schematic diagram of the steps of a method for predicting biomass energy generation based on machine learning according to the present invention;

[0027] Figure 3 A schematic diagram of the construction of a CNN-GRNN model in a biomass energy power generation prediction method based on machine learning in the present invention;

[0028] Figure 4 The present invention is a schematic diagram of the module structure of a biomass energy power generation prediction system based on machine learning. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in the present invention are only embodiments of a part of the present invention, not all embodiments. Based on the spirit of the present invention, all other embodiments not recorded in the present invention obtained by ordinary technicians in this field according to the embodiments recorded in the present invention without making creative work should belong to the protection scope of the present invention.

[0030] Figure 1 The figure is a schematic diagram of energy conversion of a biomass energy production and power generation system in the prior art. Figure 1 As shown, the outlet of the anaerobic digestion biogas tank is connected to the inlet of the biogas purification equipment. After being purified, the primary biogas is temporarily stored in a dry gas storage cabinet. The gas outlet pipe of the gas storage cabinet is connected to the biogas power generation equipment and the exhaust gas treatment link. The biogas generator is equipped with a combustion chamber to burn the biogas from the dry gas storage cabinet to drive the unit rotor to rotate and generate electricity.

[0031] In the biomass energy production and power generation system, the digester is huge, and the biomass energy power generation system is operated outdoors for a long time. The external temperature changes, solar radiation illumination, convection heat transfer and other factors lead to the heat transfer process, and its working conditions are changing. Therefore, the process of predicting power generation requires the reasonable collection and analysis of the important parameters of the system.

[0032] Figure 2 The present invention relates to a method for predicting biomass power generation based on machine learning, and the method comprises steps 1 and 2.

[0033] Step 1: Collect the emission flow, grid-connected power, non-grid-connected energy, and environmental data of the gas storage tank of the biomass energy production and power generation system, and construct an input feature matrix.

[0034] Preferably, the pre-trained CNN-GRNN model includes: taking the path between any two nodes in the input layer and the connection layer in the CNN-GRNN model as a sample to be optimized; taking all the samples to be optimized as input, and using the DBO algorithm to iteratively improve the input layer weights and the connection layer weights in the CNN-GRNN model.

[0035] In the present invention, a meter is arranged at the gas valve to monitor the flow rate per second of biogas discharged from the gas storage cabinet, and the flow rate per second of biogas discharged from the gas storage cabinet is used as a parameter of a neural network, thereby taking into account the factor of human participation in control.

[0036] Secondly, consider the changes in the amount of biomass in the tank when the outside temperature changes, solar radiation, convective heat transfer (methane consumption of thermal storage electric boiler). From the perspective of biogas production, the outside temperature has the greatest impact on the anaerobic reaction of the biomass in the tank, followed by solar radiation. The change in outside temperature is closely related to the 24 solar terms every year, so the temperature is used as a parameter of the neural network, and the solar radiation is used as a parameter of a neural network.

[0037] In addition, part of the electricity generated by biogas is connected to the grid, part is used for thermal storage electric boilers, and part is used for waste heat recovery. Therefore, the total flow of biogas in a certain period of time is the biggest factor affecting the amount of electricity connected to the grid. In addition, some of the non-grid energy will promote anaerobic reactions by heating water, so the ratio of this non-grid energy to the grid electricity is also used as a parameter of the neural network. This ratio is generally related to temperature and climate. The ratio will increase in winter and decrease in summer.

[0038] According to the sensitivity of the influencing factors, these parameters are arranged from low to high, so as to obtain the solar radiation illumination, the outside temperature, the ratio of non-grid energy to grid electricity and the total biogas flow in a certain period of time.

[0039] Thus, the dimensions of the input feature matrix are expressed as s, t, e, v, p. The final result obtained by the present invention and its learning, that is, the predicted power generation M, is:

[0040] M=f(s,t,e,v,p)

[0041] Where s is the solar irradiance, t is the ambient temperature, e is the ratio of grid-connected power to non-grid-connected energy, v is the total biogas flow rate during the period, and p is grid-connected power.

[0042] In one embodiment, the measurement unit period is measured once every 15 minutes, so the input feature matrix of the model in each historical day is:

[0043] X=[s 1×96 ,t 1×96 ,e 1×96 ,v 1×96 ,p 1×96 ]

[0044] Here, 1×96 represents the data dimension, which is 96 values ​​measured in one day. For temperature and solar irradiance data, the temperature and solar irradiance at noon are usually higher, so s 1×96 and 1×96 Usually approximates a Gaussian distribution.

[0045] In addition, 1×96 It also changes with the temperature during the day. Obviously, the weather is warm at noon, the waste heat required for life is reduced, the amount of electricity used for the Internet is more, and the e value increases; the waste heat required for life in the morning and evening increases, and the e value decreases accordingly. Therefore, this function also conforms to the Gaussian distribution.

[0046] Step 2: Input the input feature matrix into the pre-trained CNN-GRNN model to obtain the predicted power generation curve of the biogas generator in the system.

[0047] Preferably, the pre-trained CNN-GRNN model includes: taking the path between any two nodes in the input layer and the connection layer in the CNN-GRNN model as a sample to be optimized; taking all the samples to be optimized as input, and using the DBO algorithm to iteratively improve the input layer weights and the connection layer weights in the CNN-GRNN model, so that during the iteration process, Adam does not actually calculate the input layer weights and the connection layer weights, but extracts the above data from the calculation results of DBO for the calculation of other hyperparameters.

[0048] In the present invention, a dual network structure of a convolutional neural network (CNN) and a gated recurrent unit neural network (GRNN) is used to predict biomass power generation. First, the two-dimensional input quantity at each point in the time series is determined, and then the convolutional neural network of the first layer is used to generate a one-dimensional intermediate quantity, which is used as the input of the second layer of the gated recurrent neural network. Finally, through the continuous learning of these two layers, the output of the gated recurrent neural network is used as the prediction result.

[0049] Artificial neural networks (ANN) are an artificial intelligence technology that solves complex nonlinear, data organization, pattern recognition, simulation and optimization problems by simulating and learning the way the human brain processes information. The structure of deep learning neural networks is relatively complex, and its internal multi-level and multi-dimensional calculations enable the model to achieve better prediction performance, but it consumes a lot of computing resources. In recent years, the rapid improvement of computer computing power has enabled the analytical learning ability of deep learning algorithms to be demonstrated. Deep learning algorithm models represented by convolutional neural networks (CNN) and long short-term memory (LSTM) networks have become a research hotspot for power generation and load forecasting.

[0050] The network structure of CNN is mainly composed of a layered structure of convolutional layers, pooling layers, fully connected layers, and logistic regression layers. The convolutional layer extracts spatial features and implicit information from the input data through multi-step convolution calculations; the pooling layer is usually used to connect the previous convolutional layer. There are two main types of pooling calculations: maximum pooling and average pooling. The feature map output by the convolutional layer focuses on the input features through pooling calculations to achieve feature selection and information filtering; the fully connected layer is usually set between the pooling layer and the logistic regression layer. Its purpose is to transfer the learned distributed feature representation to a space for high-level reasoning; the logistic regression layer is located at the last layer of the entire network structure and outputs the operation results of the entire network by using a logical function.

[0051] CNN contains several convolution blocks, each of which includes a convolution layer, an activation function, and a pooling layer. Among them, the convolution layer is the core of the convolutional neural network, and each convolution layer has a certain number of convolution kernels as feature extractors. The convolution kernel slides and translates on the input data with a certain step size to perform convolution operations, thereby obtaining a feature map of the input features, and the convolution kernel performs feature extraction.

[0052] Gated recurrent neural network (GRNN) is a type of recurrent neural network. Recurrent neural network (RNN) is a type of recursive neural network that takes sequence data as input, recurses in the direction of sequence evolution, and all nodes (recurrent units) are connected in a chain. In traditional neural networks, including CNN, input and output are independent of each other. But for some tasks, the subsequent output is related to the previous content. Therefore, RNN introduces the concept of "memory", that is, the output needs to depend on the previous input sequence and remember the key input. The word "loop" comes from the fact that each element performs the same task. The gradient of recurrent neural network is more prone to attenuation or explosion. Although clipping gradient can deal with gradient explosion, it cannot solve the problem of gradient attenuation. Usually for this reason, it is difficult for recurrent neural networks to capture dependencies with large time step distances in time series in practice.

[0053] GRNN is proposed to better capture the dependencies with large time step distance in time series. It controls the flow of information through learnable gates. Among them, the gated recurrent unit (GRU) is a commonly used gated recurrent neural network.

[0054] In GRU, the update gate Z t It determines how to combine past information with current input information to control the degree of retention of old information. The value of the update gate is between 0 and 1, 0 means completely ignoring past information, and 1 means completely retaining past information; the reset gate is used to decide whether to ignore the past state. Its function is to control the degree of influence of the past state on the current state. The reset gate R t It can help the model capture long-term dependencies to a certain extent; X t is the input gate; Y t is the output at the current moment; H t-1 , H t and It is the state at the previous moment, the current state, and the candidate state.

[0055] And there are:

[0056]

[0057] Where W t , W z , and W o are the weight parameter matrices of the update gate, reset gate, candidate set, and output vector respectively; [] and I represent vector connection and unit matrix respectively; “·” and “×” represent the matrix operation mode; σ represents the sigmoid activation function, and tanh is the hyperbolic tangent activation function.

[0058] Figure 3 The figure is a schematic diagram of the structure of the CNN-GRNN model in the biomass energy power generation prediction method based on machine learning of the present invention. Figure 3 As shown in the figure, the number of convolution kernels of the two CNN layers, the number of hidden neurons of the three GRNN layers, the maximum number of iterations, the batch sample size and the learning rate in the CNN-GRNN model are set as the hyperparameters to be optimized. The optimization ranges of the number of convolution kernels of the two CNN layers and the number of hidden neurons of the three GRNN layers are both [8,128], the optimization range of the maximum number of iterations is [10,100], the optimization range of the batch sample size is [128,512], and the optimization range of the learning rate is [0.001,0.1].

[0059] In the CNN-GRNN hybrid network, there are many parameters that need to be set manually. If the grid method is used for parameter optimization, the calculation is large and time-consuming, and it is easy to fall into the local optimum. In order to better correct the gradient estimation during the model training process, the model uses the Adam algorithm that can adaptively adjust the learning rate as the optimization algorithm for the model gradient. Because the learning rate needs to be kept larger at the beginning of the model training to ensure the convergence speed, and it needs to be smaller when converging to the optimal point to avoid oscillation, the learning rate piecewise constant decay method is adopted. The learning rate decay cycle is set to 30 epochs, and the decay rate is 0.7.

[0060] However, the setting of the hyperparameter values ​​of traditional neural network models is often based on experience and trial and error, and is gradually adjusted according to the model performance until it approaches the optimal value. Manual tuning based on experience is often difficult to achieve good results without the support of deep professional knowledge. Therefore, in the present invention, the network weights are implemented by the DBO algorithm.

[0061] In one embodiment of the present invention, based on Adam, the connection weights of the input layer and the hidden layer in the CNN-GRNN are optimized by the DBO algorithm. The Adam gradient method updates the hyperparameters in the network, and on this basis, the cockroach optimization algorithm iteratively optimizes the weight parameters in the corresponding important layers.

[0062] The dung beetle optimization algorithm initializes the population position in the search space, but it will lead to the disadvantages of uneven distribution of dung beetle individuals, poor global search ability, and easy to fall into local optimality. Chaotic initialization generates chaotic sequences through chaotic mapping. The sequence has the characteristics of randomness, ergodicity, and sensitivity to initial values, so it can generate highly diverse initial populations. Compared with random initialization, chaotic initialization can distribute the population more evenly, thereby improving the search efficiency of the algorithm. During the operation of the intelligent search algorithm, using chaotic sequences to initialize the population instead of random initialization can achieve better results than pseudo-random numbers. The diversity and randomness of chaotic mapping in the parameter optimization process increase the breadth and depth of the search, thereby increasing the possibility of finding the optimal solution.

[0063] In order to enhance the diversity of the initial solution of the population, the Tent mapping is introduced for initialization. The Tent algorithm has excellent traversal uniformity and fast convergence speed, and its iterative process is suitable for computer operation, thus ensuring the efficiency and stability of the algorithm.

[0064] Among them, μ is the control parameter of the chaotic state. μ is obtained according to the weight parameter range determined by Adam. Tent mapping has better chaotic perturbation ability, ensuring the initial search speed and global optimization ability of the algorithm.

[0065] The position of the rolling dung beetle is updated as follows:

[0066] x i (t+1)=x i (t)+α×k×x i (t-1)+b×△x

[0067] △x=|x i (t)-X w |

[0068] Among them, t is the current iteration number, x i (t) is the location information of the i-th dung beetle at the t-th iteration, k∈0, 0.2 is the deflection coefficient, b∈[0,1], α=±1, △x represents the environmental change, X w is the global worst solution.

[0069] Dancing Dung Beetle's location has been updated to:

[0070] x i (t+1)=x i (t)+tan(θ)|x i (t)-x i (t-1)|

[0071] Among them, θ∈[0,π], when θ=0, When π, the position of the dung beetle does not change.

[0072] The breeding locations of dung beetles have been updated to:

[0073] Lb * =max(X * ×(1-R,Lb)),

[0074] Ub * =min(X * ×(1-R,Ub))

[0075] Among them, X * is the current local optimal solution, Lb * is the minimum spawning limit, Ub * The maximum spawning limit. Where R = 1-t / T max , T max is the maximum number of iterations, Lb is the minimum boundary of the optimization problem, and Ub is the maximum boundary of the optimization problem.

[0076] The dynamic changes in the egg ball position during iteration are:

[0077] B i (t+1)=X * +b 1 ×(B i (t)-Lb * )+b 2×(B i (t)-Ub * )

[0078] Among them, B i (t) is the iteration to the position of the i-th breeding ball at the t-th time. b1 and b2 are random vectors with a size of 1×D, where D is the dimension of the optimization problem.

[0079] The upper and lower bounds of the optimal food search area for foraging behavior are:

[0080] Lb b =max(X b ×(1-R,Lb)),

[0081] Ub b =min(X b ×(1-R,Ub))

[0082] Among them, Lb b is the lower bound of the optimal food search area, Ub b is the upper bound of the optimal food search area, X b It is the global optimal solution.

[0083] The location of the foraging dung beetle is updated to:

[0084] x i (t+1)=x i (t)+C 1 ×(x i (t)-Lb b )+C 2 ×(x i (t)-Ub b )

[0085] Among them, x i (t) is the position information of the i-th child dung beetle at the t-th iteration, C 1 is a random variable that conforms to the normal distribution, C 2 is a random vector between (0,1).

[0086] The dung beetle can be described as:

[0087] x i (t+1)=X b +S×g×(|x i (t)-X * |+|x i (t)-X b |)

[0088] Among them, x i (t) is the position information of the i-th dung beetle at the t-th iteration, g is a random vector with a size of 1×D, and S is a constant.

[0089] When the DBO algorithm iterates to the later stage, the dung beetle individuals gradually converge, and their values ​​are close to a seemingly optimal solution. However, this position may not be the global optimal, causing the population to fall into the dilemma of local optimality and it is difficult to further find the true optimal solution. In order to overcome this limitation, the mutation perturbation operation is introduced to perturb the local optimal solution, increase the diversity of the population, and enable the algorithm to jump out of the local optimality and continue to explore the solution space until the global optimal solution is finally found.

[0090] Considering that neural networks are prone to overfitting and underfitting and are time-consuming, the present invention further makes improvements.

[0091] In one embodiment, a random backoff method is used to obtain multiple different model outputs for a single input matrix, and a simple calculation is used to solve the comprehensive features of the multiple model outputs as the final output of the algorithm. In this way, the error between the algorithm output and the true value is accurately calculated, thereby improving DBO and Adam, in order to obtain a better pre-training model.

[0092] In another embodiment, preferably, the DBO algorithm is used to iteratively improve the input layer weights and connection layer weights in the CNN-GRNN model, including: when the number of iterations of the DBO algorithm exceeds a preset value or the fitness value exceeds a preset value, retaining the optimal solution of each iterative process to obtain an optimal solution set; substituting each optimal solution in the optimal solution set into the CNN-GRNN model, calculating the model output during random retreat, so as to extract the optimal weights of the CNN-GRNN model from the optimal solution set.

[0093] In this embodiment, the random backoff is not only used for the precise analysis of the output error, but also when the DBO approaches the end of the iteration and obtains multiple optimal solutions, an abnormal disturbance is added by random backoff to analyze the model composed of multiple optimal solutions, thereby assisting the DBO to obtain an optimal solution that is closer to the actual situation.

[0094] To this end, the present invention adopts two different ways to obtain the optimal solution set, which includes multiple relatively optimal solutions. This acquisition method can be obtained based on the number of iterations, or the fitness value calculated by analyzing the objective function. The objective function here can be selected from the objective functions commonly used in the DBO algorithm.

[0095] For multiple optimal solutions, the present invention analyzes and calculates each solution. The disturbance added in this stage is obtained by implementing a temporary retreat mechanism in the model.

[0096] Preferably, each optimal solution in the optimal solution set is substituted into the CNN-GRNN model to calculate the model output during random temporary withdrawal, including: removing the output nodes in the CNN-GRNN model and assigning row and column numbers to each node of the GRNN structure in the CNN-GRNN model; extracting the current optimal solution from the optimal solution set, and updating the input layer weights and connection layer weights in the CNN-GRNN model; randomly sampling the row and column numbers of each node to obtain multiple temporary withdrawal nodes, setting the connection weights related to the multiple temporary withdrawal nodes to 0, and then performing model training to calculate a single output of the CNN-GRNN model; repeating the random sampling multiple times to obtain multiple outputs of the CNN-GRNN model.

[0097] In the present invention, the output nodes in the CNN-GRNN model are eliminated, and for the GRNN part in the model, row numbers and column numbers are assigned to each node. As a result, in the GRNN part structure in the neural network, each node includes a number consisting of a two-dimensional array. For the optimal solution set of the DBO algorithm, each solution includes multi-dimensional data, each dimension represents a network weight, and the start node and the end node corresponding to the network weight can be represented by row and column numbers. Therefore, according to the optimal solution, the connection weights between multiple nodes can be assigned. Ideally, the optimal solution can cover the connection weights between all nodes of the GRNN part.

[0098] At this time, multiple temporary withdrawal nodes are obtained by random sampling, and the multiple temporary withdrawal nodes are related to multiple connection weights. For example, the temporary withdrawal node may be the starting node or the ending node of a connection weight. In this case, if a node is randomly sampled as a temporary withdrawal node, the weight related to the node is automatically reset to zero and no longer participates in the calculation of the output result.

[0099] For the current optimal solution, the present invention supports multiple different temporary withdrawal modes, and each temporary withdrawal corresponds to multiple temporary withdrawal nodes. One temporary withdrawal mode can correspond to one model output, and multiple temporary withdrawal modes correspond to multiple model outputs. Finally, all model outputs are simply calculated to obtain the final model output result. This result eliminates or alleviates the overfitting problem of the network by discarding hidden neuron nodes, thereby providing a more realistic model output, and the model error calculated by the model output will be more realistic.

[0100] Each temporary withdrawal method requires an uncertain number of random samplings. The temporary withdrawal rate can be set in advance, and the number of random samplings can be obtained by estimating the temporary withdrawal rate. A temporary withdrawal node is obtained by a random sampling. The next random sampling obtains the removed row and column numbers to obtain the second temporary withdrawal node, and so on.

[0101] Preferably, the optimal weight of the CNN-GRNN model is extracted from the optimal solution set, including: using multiple outputs of the CNN-GRNN model to generate an evaluation error of the current optimal solution; traversing the optimal solution set, analyzing the evaluation error corresponding to each optimal solution in the optimal solution set, and extracting an optimal solution with the smallest evaluation error; substituting the optimal solution with the smallest evaluation error into the CNN-GRNN model, updating the weight of the CNN-GRNN model, and obtaining a pre-trained CNN-GRNN model.

[0102] In this way, it is easy to think that the evaluation error of the current optimal solution can be generated by comparing the multiple outputs of the model with the true value, obtaining the error sum of multiple outputs, the error sum of squares, etc. For each current optimal solution, the above method is used for calculation, and finally the evaluation error corresponding to each optimal solution is obtained, and the one with the smallest evaluation error is extracted. At this time, the optimal solution is the global optimal solution of the DBO algorithm. Therefore, the global optimal solution of the DBO algorithm can be used to update the weights of the corresponding layers in the CNN-GRNN model, and the CNN-GRNN model pre-training process is completed.

[0103] Preferably, the row and column numbers of each node are randomly sampled to obtain multiple temporarily retired nodes, including: obtaining the probability density function after the standard normal distribution is compressed to the positive semi-axis, performing the first sampling with the probability density function as the distribution condition, and corresponding the first sampling result to the row number of each node; performing the second sampling with the exponential distribution as the distribution condition, and corresponding the second sampling result to the column number of each node; combining the row number and the column number to obtain a temporarily retired node in the CNN-GRNN model; and obtaining multiple temporarily retired nodes by repeating the above process.

[0104] For a random variable, a probability density function is usually used to characterize the probability distribution characteristics of the variable. Specifically, given a value of a random variable, the probability density corresponding to the value can be calculated based on the probability density function. Conversely, a value of a random variable can also be generated based on the probability distribution information provided by the probability density function. This is sampling. Sampling random variables distributed according to a certain probability density function is essentially a simulation of random phenomena. The sample set obtained by sampling can also be regarded as a non-parametric model, that is, a smaller number of sample points are used to approximate the overall distribution and characterize the uncertainty in the overall distribution. Common sampling methods include inverse transform sampling, rejection sampling, and importance sampling.

[0105] In the present invention, random sampling of the row and column numbers of each node can be implemented in different ways. In one embodiment, the column numbers are selected by exponential distribution, and the row numbers are selected by compressed Gaussian distribution, ensuring that the randomly obtained row and column numbers conform to the corresponding mathematical distribution.

[0106] In the process of random sampling, the randomly generated raw data may not be an integer, so the randomly obtained data can be rounded to get the integer closest to the random amount to correspond to the row or column number. The corresponding node of the selected row and column number will perform the temporary withdrawal process and no longer participate in the calculation of the output result. When the output result is calculated next time, the node that was temporarily withdrawn last time will be activated again and participate in the calculation again.

[0107] Preferably, the probability density function after the standard normal distribution is compressed to the positive semi-axis is:

[0108]

[0109] Where p(x) is the probability density function of parameter x on the positive semi-axis;

[0110] The first sampling is performed using the probability density function as a distribution condition, including: using exponential distribution as a reference distribution of the probability density function, and adopting a rejection sampling method to implement the first sampling.

[0111] In the present invention, a sample x is randomly selected from the reference exponential distribution q(x) i , and then generate a random number u from the uniform distribution U(0,1) i , for the exponential distribution, we can calculate q(x i ), so if u i <p(x i ) / [M·q(x i )] then accept the sample x i , otherwise reject. Here, the premise is set as p(x)≤M·q(x) for any x. In the present invention, since the value of x is limited by the number of model rows, as long as p(x)≤M·q(x) is met within the value range of x, a suitable parameter M can be selected.

[0112] In practical applications, the value of M is as small as possible to ensure higher sampling efficiency. Therefore, we can calculate:

[0113]

[0114] X is the maximum row number, which is a natural number.

[0115] The present invention also supports the use of other functions as reference distribution. -x As the reference distribution, the acceptance probability of the rejection sampling method is

[0116] On the other hand, for the column number, the present invention adopts the inverse distribution method for sampling, for example, setting the inverse function F -1(u) = -log(1-u), randomly generate parameter u, input it into the inverse function, and get a quantity that conforms to the exponential distribution as the result of the column number. For this inverse distribution, the range of the randomly generated parameter u is limited so that the calculation result of the inverse function does not exceed the total number of columns of the model.

[0117] In summary, by performing random sampling multiple times in the above manner, multiple temporary retirement nodes are obtained, and temporary retirement and pre-training of the model are implemented on this basis.

[0118] Through the trained model, a large amount of historical data is input into the pre-trained model to predict future power. If the prediction result is the power generation of multiple consecutive time periods, the prediction results can also be combined in chronological order to generate a predicted power generation curve.

[0119] Figure 4 The schematic diagram of the module structure of a biomass energy power generation prediction system based on machine learning in the present invention is shown in FIG. Figure 4 As shown, the second aspect of the present invention relates to a biomass power generation prediction system based on machine learning, the system includes a collection module and a prediction module; wherein the collection module is used to collect the emission flow of the gas storage cabinet of the biomass energy production and power generation system, the online power, the non-online energy, and the environmental data of the system, and construct an input feature matrix; the prediction module is used to input the input feature matrix into a pre-trained CNN-GRNN model to obtain the predicted power generation curve of the biogas generator in the system.

[0120] A third aspect of the present invention relates to a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method according to the first aspect of the present invention.

[0121] A fourth aspect of the present invention relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in the first aspect of the present invention.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for predicting biomass power generation based on machine learning, characterized in that: The method comprises the following steps: Collect the emission flow, grid-connected power, non-grid-connected energy, and environmental data of the gas storage tank of the biomass energy production and power generation system, and construct an input feature matrix; The input feature matrix is ​​input into a pre-trained CNN-GRNN model to obtain a predicted power generation curve of the biogas generator in the system.

2. The method for predicting biomass power generation based on machine learning according to claim 1, characterized in that: The pre-trained CNN-GRNN model includes: The path between any two nodes in the input layer and the connection layer of the CNN-GRNN model is taken as a sample to be optimized; Taking all the samples to be optimized as input, the DBO algorithm is used to iteratively improve the input layer weights and connection layer weights in the CNN-GRNN model.

3. The method for predicting biomass power generation based on machine learning according to claim 2 is characterized in that: The DBO algorithm is used to iteratively improve the input layer weights and connection layer weights in the CNN-GRNN model, including: When the number of iterations of the DBO algorithm exceeds the preset value or the fitness value exceeds the preset value, the optimal solution of each iteration process is retained to obtain the optimal solution set; Each optimal solution in the optimal solution set is substituted into the CNN-GRNN model, and the model output during random backoff is calculated to extract the optimal weight of the CNN-GRNN model from the optimal solution set.

4. The method for predicting biomass power generation based on machine learning according to claim 3 is characterized in that: Substituting each optimal solution in the optimal solution set into the CNN-GRNN model to calculate the model output during random backoff includes: Eliminate the output nodes in the CNN-GRNN model, and assign row and column numbers to each node of the GRNN structure in the CNN-GRNN model; Extracting a current optimal solution from the optimal solution set, and updating the input layer weights and the connection layer weights in the CNN-GRNN model; Randomly sampling the row and column numbers of each node to obtain a plurality of temporarily retired nodes, setting the connection weights related to the plurality of temporarily retired nodes to 0, and then performing model training to calculate a primary output of the CNN-GRNN model; The random sampling is repeated multiple times to obtain multiple outputs of the CNN-GRNN model.

5. The method for predicting biomass power generation based on machine learning according to claim 4 is characterized in that: The extracting the optimal weight of the CNN-GRNN model from the optimal solution set includes: Using multiple outputs of the CNN-GRNN model to generate an evaluation error of the current optimal solution; Traversing the optimal solution set, analyzing the evaluation error corresponding to each optimal solution in the optimal solution set, and extracting an optimal solution with the smallest evaluation error; An optimal solution with the smallest evaluation error is substituted into the CNN-GRNN model, the weight of the CNN-GRNN model is updated, and the pre-trained CNN-GRNN model is obtained.

6. The method for predicting biomass power generation based on machine learning according to claim 4, characterized in that: The random sampling of the row and column numbers of each node to obtain a plurality of temporarily retired nodes includes: Obtaining a probability density function after the standard normal distribution is compressed to the positive semi-axis, performing a first sampling using the probability density function as a distribution condition, and corresponding the first sampling result to the row number of each node; Performing second sampling with exponential distribution as a distribution condition, and corresponding the second sampling result to the column number of each node; Combining the row number and the column number to obtain a temporary withdrawal node in the CNN-GRNN model; By repeating the above process, multiple temporary retirement nodes are obtained.

7. The method for predicting biomass power generation based on machine learning according to claim 6 is characterized in that: The probability density function of the standard normal distribution after compression to the positive semi-axis is: Where p(x) is the probability density function of parameter x on the positive semi-axis; The first sampling is performed using the probability density function as a distribution condition, comprising: The exponential distribution is used as a reference distribution of the probability density function, and the first sampling is implemented using a rejection sampling method.

8. A biomass energy power generation prediction system based on and learning using the method described in any one of claims 1 to 7, characterized in that: The system includes a collection module and a prediction module; wherein, The collection module is used to collect the emission flow of the gas storage tank of the biomass energy production and power generation system, the online power, the non-online power, and the environmental data of the system, and construct an input feature matrix; The prediction module is used to input the input feature matrix into a pre-trained CNN-GRNN model to obtain a predicted power generation curve of the biogas generator in the system.

9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.