Boiler water supply temperature prediction method based on Bayesian optimization BP neural network

By using the Bayesian optimization BP neural network method and the Gaussian process to build a proxy model, the hyperparameters of the gas boiler water supply temperature prediction model are updated in real time. This solves the problems of slow convergence speed and untimely model update of the BP neural network in gas boiler water supply temperature prediction, and realizes efficient and accurate water supply temperature prediction.

CN120633907AInactive Publication Date: 2025-09-12TIANJIN UNIV +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510675379.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-09-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, BP neural network has the problems of slow convergence speed and easy falling into local optimal solution in gas boiler water supply temperature prediction, and traditional optimization algorithm consumes a lot of computing power and cannot update model parameters in real time.

Method used

The BP neural network method based on Bayesian optimization is adopted to construct the initial BP neural network model by obtaining the operating parameter data of the gas boiler, and the Gaussian process is used to build the proxy model. The optimal combination is selected from the hyperparameter search space, and the network hyperparameters are updated in real time to improve the prediction accuracy.

Benefits of technology

It achieves accurate prediction of gas boiler water supply temperature, improves model training efficiency and prediction accuracy, avoids overfitting and underfitting, and enhances the model's generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633907A_ABST
    Figure CN120633907A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of boiler temperature monitoring, in particular to a boiler water supply temperature prediction method based on a Bayesian optimization BP neural network, and the method comprises the steps: obtaining the operation parameter data and water supply temperature data of a gas boiler in a target time period; segmenting the target time period to obtain a plurality of time domain sub-segments, determining a dominant rule characterization value, and judging whether to mark the target time period according to the dominant rule characterization value; if the target time period is marked, constructing an initial BP neural network model; defining a hyper-parameter search space; constructing a proxy model by using a Gaussian process to obtain an optimal hyper-parameter combination; determining a Bayesian optimization BP neural network model based on the optimal hyper-parameter combination and the initial BP neural network model; and predicting the water supply temperature of the gas-fired boiler based on the Bayesian optimization BP neural network model. The model parameters can be updated, adjusted and optimized in real time, and the accuracy of predicting the water supply temperature of the gas boiler is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of boiler temperature monitoring, and in particular to a boiler water supply temperature prediction method based on a Bayesian optimization BP neural network. Background Art

[0002] Gas-fired boilers, as essential thermal energy conversion devices, play a crucial role in industrial production and residential life. Accurately predicting the supply water temperature of gas-fired boilers is crucial for optimizing the combustion process, improving energy efficiency, and ensuring stable system operation. However, due to the complexity of gas-fired boiler systems, supply water temperature is affected by multiple factors, such as gas flow rate, combustion efficiency, return water temperature, ambient temperature, and boiler load. These interdependent factors make supply water temperature prediction a challenging task.

[0003] In recent years, artificial neural networks (ANNs) have been widely used in temperature prediction due to their powerful nonlinear mapping and self-learning capabilities. Back propagation (BP) neural networks, a commonly used feedforward neural network, continuously adjust network weights and thresholds to minimize the error between output and actual values, thereby fitting and predicting data. However, BP neural networks suffer from slow convergence and a tendency to fall into local optimal solutions during training, which to some extent limits their application in gas boiler water supply temperature prediction.

[0004] In order to improve the performance of BP neural networks, researchers have proposed a variety of optimization methods, including genetic algorithms and particle swarm optimization algorithms. However, these traditional optimization algorithms consume a lot of computing power, have low optimization efficiency, and cannot use the latest data collected during boiler operation to update the prediction model in real time.

[0005] Therefore, there is an urgent need in the existing technology for a new method that can quickly and efficiently update the network hyperparameters based on the latest data set to achieve accurate prediction of the gas boiler water supply temperature. Summary of the Invention

[0006] To this end, the present invention provides a boiler water supply temperature prediction method based on Bayesian optimization BP neural network to overcome the problems in the existing technology that it is difficult to accurately predict the water supply temperature of a gas boiler and it is impossible to update and adjust the model parameters in real time.

[0007] To achieve the above object, the present invention provides a method for predicting boiler water supply temperature based on a Bayesian optimized BP neural network, comprising:

[0008] Step S1, obtaining operating parameter data and water supply temperature data of the gas boiler within a target time period, wherein the operating parameters include return water temperature, water supply flow rate, and gas consumption;

[0009] Step S2: dividing the target time period into a plurality of time domain sub-segments, determining an explicit regularity representation value based on the operating parameter data and the water supply temperature data in each time domain sub-segment, and determining whether to mark the target time period based on the explicit regularity representation value;

[0010] Step S3: if the target time period is marked, an initial BP neural network model is constructed based on the operating parameter data and water supply temperature data within the target time period, wherein the initial BP neural network model includes an input layer, a hidden layer, and an output layer, and the hidden layer includes three fully connected layers, a normalization layer, and a Dropout layer;

[0011] Step S4, determining hyperparameters based on the number of network nodes of each fully connected layer, the initial learning rate, and the dropout layer dropout rate, and defining a hyperparameter search space, wherein the hyperparameter search space includes a plurality of hyperparameter combinations, and each hyperparameter combination includes a plurality of hyperparameters;

[0012] Step S5, constructing a proxy model using a Gaussian process, selecting several hyperparameter combinations from the hyperparameter search space, and training the proxy model based on the respective hyperparameter combinations to obtain an optimal hyperparameter combination;

[0013] Step S6, determining a Bayesian optimized BP neural network model based on the optimal hyperparameter combination and the initial BP neural network model;

[0014] Step S7: predicting the water supply temperature of the gas boiler based on the Bayesian optimization BP neural network model and the current operating parameter data of the gas boiler to obtain a predicted value of the water supply temperature of the gas boiler.

[0015] Furthermore, in step S2, determining the explicit regularity characterization value includes:

[0016] Step S21, constructing corresponding time domain characteristic curves based on the operating parameter data and water supply temperature data in each of the time domain sub-segments;

[0017] Step S22, determining a first characteristic value based on a comparison result of time points corresponding to peak values ​​of the time domain characteristic curves;

[0018] Step S23, determining a second characteristic value based on a comparison result of the length of each mutation time period of each time domain characteristic curve from the start time of each time domain sub-segment;

[0019] Step S24: determining a dominant regularity representation value based on the first eigenvalue and the second eigenvalue.

[0020] Furthermore, in step S3, an initial BP neural network model is constructed, including:

[0021] Step S31, constructing an initial data set based on the operating parameter data and the water supply temperature data;

[0022] Step S32, preprocessing the initial data set to obtain an input data set;

[0023] Step S33: Initialize the model structure and parameters of the BP neural network based on the input data set, and train to obtain an initial BP neural network model.

[0024] Furthermore, the step S33 includes:

[0025] Step S331, determining the number of neurons in the input layer, hidden layer, and output layer according to the input data set and the expected output;

[0026] Step S332: Initialize connection weights and thresholds, and set an initial learning rate and activation function. The connection weights include the connection weights between the input layer and each fully connected layer, the connection weights between each hidden layer, the normalization layer weights, the Dropout layer weights, and the output layer weights. The thresholds include the input layer threshold, the hidden layer thresholds, and the output layer threshold.

[0027] Step S333, determining the output layer output based on the input data set, each of the connection weights and the threshold;

[0028] Step S334, determining an overall loss function based on the output layer output and the expected output;

[0029] Step S335, based on the overall loss function, each connection weight and threshold are updated, and it is determined whether the training is completed. If it is determined not to be completed, step S333 is continued. If it is determined to be completed, the initial BP neural network model is obtained.

[0030] Furthermore, the step S333 includes:

[0031] Step S3331, performing forward calculation on each of the fully connected layers based on the input data set, the connection weights between the input layer and each fully connected layer, and each fully connected layer threshold to obtain a corresponding first hidden layer output;

[0032] Step S3332: normalize the outputs of each fully connected layer, and determine the normalized layer output based on the normalization result, the normalized layer weight, and the normalized layer threshold;

[0033] Step S3333, determining a second hidden layer output based on the normalized layer output, the connection weights between the hidden layers, and the hidden layer threshold;

[0034] Step S3334: determining a Dropout layer output based on the second hidden layer output and the dropout rate of the Dropout layer;

[0035] Step S3335: determining a third hidden layer output based on the Dropout layer output, the connection weights between the hidden layers, and the hidden layer threshold;

[0036] Step S3336: Determine the output layer output based on the third hidden layer output, the output layer weight, and the output layer threshold.

[0037] Furthermore, in step S335, each of the connection weights and thresholds is updated based on the overall loss function, including:

[0038] Step S3351, determining a first update parameter and a second update parameter based on the overall loss function;

[0039] Step S3352: Update the connection weights and thresholds based on the first update parameter, the second update parameter, and the initial learning rate.

[0040] Furthermore, in the step S335, it includes:

[0041] An overall loss value is determined based on the overall loss function, and whether training is terminated is determined based on the overall loss value.

[0042] Furthermore, in the step S5, it further includes:

[0043] Step S51, defining an acquisition function;

[0044] Step S52: determining a hyperparameter combination to be evaluated based on the acquisition function and the hyperparameter search space.

[0045] Furthermore, in the step S5, it includes:

[0046] Step S53, generating an initial sample data set based on the selected hyperparameter combinations;

[0047] Step S54: training the proxy model based on the initial sample data set to obtain a candidate proxy model;

[0048] Step S55, adding the hyperparameter combination to be evaluated to the initial sample data set to obtain a candidate sample data set;

[0049] Step S56: updating the candidate proxy model based on the candidate sample data set, and determining whether a maximum number of iterations has been reached. If the maximum number of iterations has been reached, obtaining the optimal hyperparameter combination.

[0050] Furthermore, step S6 includes:

[0051] The given values ​​of the initial BP neural network model are determined based on the optimal hyperparameter combination, and the initial BP neural network model is trained based on the input data set to obtain a Bayesian optimized BP neural network model.

[0052] Compared with the existing technology, the beneficial effect of the present invention is that it evaluates the potential regularity of the data in the time domain dimension within the target time period, mines highly standardized data for model training, and can improve the accuracy of subsequent model predictions. The Bayesian optimization method is introduced into the neural network model for predicting the water supply temperature of the gas boiler system, and the network hyperparameters such as the learning rate, the number of network layer nodes, and the Dropout layer discarding rate in the network model are optimized, thereby improving the prediction accuracy of the neural network model for the gas boiler return water temperature. The Gaussian process in Bayesian optimization is used to establish a proxy model, and then the optimal hyperparameter combination is found to achieve real-time update and adjustment of the network hyperparameters and precise optimization.

[0053] Furthermore, the present invention determines the number of neurons in the input layer, hidden layer, and output layer based on the input data set and the expected output. The number of neurons in the input layer matches the characteristic dimension of the training data, which can ensure that the model fully receives the data information. The number of neurons in the hidden layer and the number of layers are reasonably set, so that the model has sufficient ability to extract complex features and patterns in the data. The number of neurons in the output layer is determined according to the expected output to ensure that the model output meets the prediction target. By passing the training data through the input layer, hidden layer, and output layer in sequence, weighted summation and nonlinear transformation are performed using connection weights and thresholds to finally obtain the output of the output layer, which can achieve prediction of the input data. The loss function is used to measure the difference between the model output value and the expected output. By calculating the value of the loss function, the prediction error of the model can be quantified. According to the overall loss function, the connection weights and thresholds are updated using the backpropagation algorithm, so that the model is adjusted in the direction of reducing the loss function. By continuously iteratively updating the parameters, the model can gradually learn the features and patterns in the data and improve the accuracy of the prediction.

[0054] Furthermore, the present invention achieves the transfer and integration of information from the input layer to the hidden layer by performing forward calculations on each fully connected layer. The fully connected layer can linearly combine and weight the input training data, converting the original input features into more representative feature representations. In the prediction of gas boiler water supply temperature, by calculating the connection weights and thresholds between the input layer and the first fully connected layer, original features such as return water temperature and water supply flow can be converted into features with greater predictive value for water supply temperature, laying the foundation for subsequent processing. Normalization processing can adjust the output data of the fully connected layer to an appropriate range, making the data distribution more stable, thereby accelerating the training convergence speed of the model. The second hidden layer further extracts and converts features based on the output of the normalization layer. By calculating the connection weights and thresholds between each hidden layer, the model can learn more advanced and abstract feature representations, thereby capturing more complex nonlinear relationships in the gas boiler operating data and improving the model's prediction accuracy. The dropout layer randomly discards the output of some neurons, preventing the model from over-relying on certain specific neurons during training, thereby increasing the model's generalization ability. The third hidden layer further refines features based on the output of the dropout layer. By further utilizing the connection weights and thresholds between hidden layers, the model learns a more in-depth feature representation, further improving its ability to predict gas boiler water supply temperature. The output layer calculates the weights and thresholds based on the output of the third hidden layer to obtain the final prediction result. The feature information learned by the previous layers is integrated and transformed, outputting a result relevant to the prediction target. By properly setting the weights and thresholds in the output layer, the model's prediction results can be made more accurate and reliable.

[0055] Furthermore, the present invention determines an overall loss value based on an overall loss function, and determines whether training has concluded based on this overall loss value. The overall loss function is a quantitative measure of the difference between the model's predicted output and the actual expected output. By calculating the overall loss value, the degree of deviation between the model's predicted water supply temperature and the actual water supply temperature can be clearly determined, ensuring model convergence and performance optimization, avoiding overfitting and underfitting, and improving training efficiency.

[0056] Furthermore, the present invention can avoid blindly evaluating all combinations in the hyperparameter search space by obtaining a function to select the hyperparameter combination to be evaluated, thereby improving search efficiency.

[0057] Furthermore, the proxy model of the present invention can model and approximate the objective function based on the initial sample data set. By training the candidate proxy model, an estimate of the change trend of the objective function in the search space can be obtained. As the optimization process proceeds, the hyperparameter combination to be evaluated and its corresponding objective function value are added to the initial sample data set, and the input data set can be continuously updated, so that the proxy model can continuously learn new data information and adjust the model parameters, thereby more accurately approximating the objective function and improving the accuracy of the prediction. Setting the maximum number of iterations can control the search process of hyperparameter optimization. When the maximum number of iterations is reached, the search is stopped and the optimal hyperparameter combination is output, avoiding the search process from continuing indefinitely and saving computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 This is a flow chart of a method for predicting boiler water supply temperature based on a Bayesian optimized BP neural network according to an embodiment of the present invention;

[0059] Figure 2 Schematic diagram of the steps of a method for predicting boiler water supply temperature based on Bayesian optimization BP neural network according to an embodiment of the present invention;

[0060] Figure 3 This is a schematic diagram of step S25 of an embodiment of the present invention;

[0061] Figure 4 This is a comparison chart of the water supply temperature prediction results of the Bayesian optimization BP neural network model in an embodiment of the present invention and the actual reference value. DETAILED DESCRIPTION

[0062] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention.

[0063] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0064] See also Figure 1-Figure 2 As shown, it is a flow chart of a method for predicting boiler water supply temperature based on Bayesian optimization BP neural network according to an embodiment of the present invention; Figure 2 Schematic diagram of the steps of a method for predicting boiler water supply temperature based on a Bayesian optimization BP neural network according to an embodiment of the present invention. The embodiment of the present invention provides a method for predicting boiler water supply temperature based on a Bayesian optimization BP neural network, comprising:

[0065] Step S1, obtaining operating parameter data and water supply temperature data of the gas boiler within a target time period, wherein the operating parameters include return water temperature, water supply flow rate, and gas consumption;

[0066] In practice, operating parameters also include air flow, gas flow, furnace temperature, and water supply pressure.

[0067] It is understandable that the actual implementation personnel can set the target time period based on the actual situation. Preferably, the target time period is set to 10 to 15 days. In actual application, the operating parameter data and water supply temperature data can be collected every 5 to 10 seconds.

[0068] Step S2: dividing the target time period into a plurality of time domain sub-segments, determining an explicit regularity representation value based on the operating parameter data and the water supply temperature data in each time domain sub-segment, and determining whether to mark the target time period based on the explicit regularity representation value;

[0069] Specifically, in step S2, determining the explicit regularity representation value includes:

[0070] Step S21, constructing corresponding time domain characteristic curves based on the operating parameter data and water supply temperature data in each of the time domain sub-segments;

[0071] Step S22, determining a first characteristic value based on a comparison result of time points corresponding to peak values ​​of the time domain characteristic curves;

[0072] Step S23, determining a second characteristic value based on a comparison result of the length of each mutation time period of each time domain characteristic curve from the start time of each time domain sub-segment;

[0073] Step S24: determining a dominant regularity representation value based on the first eigenvalue and the second eigenvalue.

[0074] In a specific embodiment, time is used as the independent variable, and the return water temperature, water flow rate, gas consumption, and water supply temperature in each time domain sub-segment are used as dependent variables. The corresponding time domain characteristic curves are constructed, including the return water temperature characteristic curve, the water flow characteristic curve, the gas consumption characteristic curve, and the water supply temperature characteristic curve. The time points corresponding to the peak values ​​of the return water temperature characteristic curve, the water flow characteristic curve, the gas consumption characteristic curve, and the water supply temperature characteristic curve in the same time domain are compared, for example, Y1, Y2, ..., Y j ,…,Y m ; Y j Y is the comparison value of the time point corresponding to the peak value of the return water temperature characteristic curve, water flow characteristic curve, gas consumption characteristic curve and water supply temperature characteristic curve of the jth time domain sub-segment, j =((T1 j-A j ) 2 +(T2 j -A j ) 2 +(T3 j -A j ) 2 +(T4 j -A j ) 2 ) / 4,A j T1 j 、T2 j 、T3 j 、T4 j The mean value, T1 j is the time point corresponding to the peak value of the return water temperature characteristic curve of the jth time domain sub-segment, T2 j T3 is the time point corresponding to the peak value of the water supply flow characteristic curve of the jth time domain sub-segment, j is the time point corresponding to the peak value of the gas consumption characteristic curve of the jth time domain sub-segment, T4 j is the time point corresponding to the peak value of the water supply temperature characteristic curve of the jth time domain sub-segment, m is the number of time domain sub-segments, then the first eigenvalue is Y=(∑ m j=1 Y j ) / m. E1, E2, …, E j ,…,E m ;E j E is the comparison value of the length of the sudden change time period of the return water temperature characteristic curve, water flow characteristic curve, gas consumption characteristic curve and water supply temperature characteristic curve of the jth time domain sub-segment from the start time of the jth time domain sub-segment, j =((W1 j -B j ) 2 +(W2 j -B j ) 2 +(W3 j -B j ) 2 +(W4 j -B j ) 2 ) / 4,B j W1 j 、W2 j 、W3 j 、W4 j The mean value, W1 j W2 is the length of time from the mutation period of the return water temperature characteristic curve of the jth time domain sub-segment to the start time of the jth time domain sub-segment, jW3 is the length of time from the mutation time period of the water supply flow characteristic curve of the j-th time domain sub-segment to the start time of the j-th time domain sub-segment, j W4 is the length of time from the mutation period of the gas consumption characteristic curve of the j-th time domain sub-segment to the start time of the j-th time domain sub-segment, j is the length of time from the mutation time period of the water supply temperature characteristic curve of the j-th time domain sub-segment to the start time of the j-th time domain sub-segment, then the second eigenvalue is E=(∑ m j=1 E j In an implementation, the dominant regularity characterization value may be determined based on the mean of the first eigenvalue and the second eigenvalue.

[0075] It is understood that whether to mark the target time period is determined based on the comparison result of the explicit rule characterization value and the preset characterization value. If the explicit rule characterization value is greater than the preset characterization value, the target time period is marked; if the explicit rule characterization value is less than or equal to the preset characterization value, the target time period is not marked. In actual application scenarios, the actual implementer can set the preset characterization value based on the average of the explicit rule characterization values ​​corresponding to the marked target time periods that have passed the qualification test in the historical data. Preferably, the preset characterization value is set in the range of 0.8 to 0.9.

[0076] Step S3: If the target time period is marked, an initial BP neural network model is constructed based on the operating parameter data and water supply temperature data within the target time period, wherein the initial BP neural network model includes an input layer, a hidden layer and an output layer, and the hidden layer includes three fully connected layers, a normalization layer and a Dropout layer; in order to improve the nonlinear mapping ability of the model and prevent overfitting, the number of hidden layers is set to five in the present invention.

[0077] Specifically, in step S3, constructing an initial BP neural network model includes:

[0078] Step S31, constructing an initial data set based on the operating parameter data and the water supply temperature data;

[0079] Step S32, preprocessing the initial data set to obtain an input data set;

[0080] Step S33: Initialize the model structure and parameters of the BP neural network based on the input data set, and train to obtain an initial BP neural network model.

[0081] Specifically, in step S32, the preprocessing includes data cleaning and data standardization.

[0082] In the implementation, data cleaning is performed to remove missing data and abnormal data, and features related to the water supply temperature of the gas boiler are selected. The data cleaning method is a conventional technology and is not specifically limited. The data in the initial data set are standardized through data normalization. In the implementation, the minimum-maximum scaling method can be used to perform data normalization on the data in the initial data set. The formula is:

[0083]

[0084] Among them, x i is the initial data, x i * is the training data after data standardization, x max , x min are the maximum and minimum values ​​of each parameter in the initial data set, respectively.

[0085] Specifically, step S33 includes:

[0086] Step S331, determining the number of neurons in the input layer, hidden layer, and output layer according to the input data set and the expected output;

[0087] In practice, the number of neurons in the input layer is determined by the characteristic dimension of the input data, with each neuron corresponding to one input feature. For example, if the input features are return water temperature, water flow rate, and gas consumption, the number of neurons in the input layer is 3. The number of neurons in the output layer is determined by the characteristic dimension of the output data, with each neuron corresponding to one output feature. If the output feature is water supply temperature, the number of neurons in the output layer is 1. The number of neurons in the hidden layer can be automatically searched for the optimal number of hidden layer neurons based on algorithms such as genetic algorithms, particle swarm algorithms, and Bayesian optimization algorithms. Taking the Bayesian optimization algorithm as an example, a probabilistic model is constructed regarding the number of hidden layer neurons and model performance. This model is continuously updated based on existing experimental data, and the next number of neurons to be tried is selected through an acquisition function until the optimal value is found.

[0088] Step S332: Initialize connection weights and thresholds, and set an initial learning rate and activation function. The connection weights include the connection weights between the input layer and each fully connected layer, the connection weights between each hidden layer, the normalization layer weights, the Dropout layer weights, and the output layer weights. The thresholds include the input layer threshold, the hidden layer thresholds, and the output layer threshold.

[0089] Step S333, determining the output layer output based on the input data set, each of the connection weights and the threshold;

[0090] See also Figure 3, which is a schematic diagram of step S25 of an embodiment of the present invention; specifically, step S333 includes:

[0091] Step S3331, performing forward calculation on each of the fully connected layers based on the input data set, the connection weights between the input layer and each fully connected layer, and each fully connected layer threshold to obtain a corresponding first hidden layer output;

[0092] In the implementation, the input feature vector is determined based on the input data set, and the first fully connected layer performs forward calculation: the input feature vector first passes through the fully connected layer, and the output of the first hidden layer is:

[0093]

[0094] Where j = 1, 2, ..., m; x i is the input data of the i-th node (neuron), v ij is the connection weight between the input layer and the i-th node (neuron) in the j-th fully connected layer, N is the number of hidden layer nodes (neurons), a j is the jth fully connected layer threshold, m is the number of fully connected layers, and f is the activation function.

[0095] Step S3332: normalize the outputs of each fully connected layer, and determine the normalized layer output based on the normalization result, the normalized layer weight, and the normalized layer threshold;

[0096] In the implementation, the output y of the first hidden layer is 1,i To perform normalization, first, calculate the mean μ and variance σ according to the following formula 2 :

[0097]

[0098] Then the normalized value is:

[0099]

[0100] Here, ε is a small positive number used to prevent division by zero errors, usually set to 1×10 -6 or similar small value;

[0101] Then the normalization layer output is:

[0102]

[0103] Where γ is the normalization layer weight and β is the normalization layer threshold. These parameters allow the model to restore the expressive power of the data after normalization.

[0104] Step S3333, determining a second hidden layer output based on the normalized layer output, the connection weights between the hidden layers, and the hidden layer threshold;

[0105] In the implementation, the calculated output value y of the normalization layer is 2,i As the input value, repeat the forward calculation of the fully connected layer in step S3331 above, and the output of the second hidden layer is:

[0106]

[0107] Among them, w ij is the connection weight between the hidden layers, and b is the hidden layer threshold.

[0108] Step S3334: determining a Dropout layer output based on the second hidden layer output and the dropout rate of the Dropout layer;

[0109] In the implementation, the Dropout layer: the output value y calculated by the fully connected layer in step S253 is 3,i As the input value, the output of each neuron is retained with a probability of 1-dropout_rate during the training process, where dropout_rate is the dropout rate, that is, the proportion of dropped neurons, and the Dropout layer output y is obtained. 4,i .

[0110] Step S3335: determining a third hidden layer output based on the Dropout layer output, the connection weights between the hidden layers, and the hidden layer threshold;

[0111] In the implementation, the Dropout layer output y 4,i As the input value, repeat the forward calculation of the fully connected layer in step S253 above, and the output of the third hidden layer is:

[0112]

[0113] Step S3336: Determine the output layer output based on the third hidden layer output, the output layer weight, and the output layer threshold.

[0114] In the implementation, the output value y of the previous layer is 5,i As input value, the output of the output layer is:

[0115] o k =w out y 5,i +b out ,

[0116] Among them, w out is the output layer connection weight, b out is the output layer threshold.

[0117] The present invention realizes the transmission and integration of information from the input layer to the hidden layer by performing forward calculations on each fully connected layer. The fully connected layer can linearly combine and weight the input training data, converting the original input features into more representative feature representations. In the prediction of gas boiler water supply temperature, by calculating the connection weights and thresholds between the input layer and the first fully connected layer, the original features such as return water temperature and water supply flow can be converted into features with more predictive value for water supply temperature, laying the foundation for subsequent processing. Normalization processing can adjust the output data of the fully connected layer to an appropriate range, making the data distribution more stable, thereby accelerating the training convergence speed of the model. The second hidden layer further extracts and converts features based on the output of the normalization layer. By calculating the connection weights and thresholds between the hidden layers, the model can learn more advanced and abstract feature representations, thereby capturing more complex nonlinear relationships in the gas boiler operation data and improving the prediction accuracy of the model. The dropout layer randomly discards the output of some neurons, so that the model cannot overly rely on certain specific neurons during training, thereby increasing the generalization ability of the model. The third hidden layer further refines features based on the output of the dropout layer. By further utilizing the connection weights and thresholds between hidden layers, the model learns a more in-depth feature representation, further improving its ability to predict gas boiler water supply temperature. The output layer calculates the weights and thresholds based on the output of the third hidden layer to obtain the final prediction result. The feature information learned by the previous layers is integrated and transformed, outputting a result relevant to the prediction target. By properly setting the weights and thresholds in the output layer, the model's prediction results can be made more accurate and reliable.

[0118] Step S334, determining an overall loss function based on the output layer output and the expected output;

[0119] In the implementation, the loss function is used to measure the output o of the output layer. k The difference between the expected output d can be determined by the mean square error loss function, cross entropy loss function and other methods, which are not limited here. For example, if it is determined by the mean square error loss function, the formula of the mean square error loss function is: Loss = (o k -d) 2 / 2, then the overall loss function L is: L=(∑ M k=1 (o k -d) 2 ) / (2M), where M is the number of input data in the input dataset.

[0120] Step S335, based on the overall loss function, each connection weight and threshold are updated, and it is determined whether the training is completed. If it is determined not to be completed, step S333 is continued. If it is determined to be completed, the initial BP neural network model is obtained.

[0121] Specifically, in step S335, updating each of the connection weights and thresholds based on the overall loss function includes:

[0122] Step S3351, determining a first update parameter and a second update parameter based on the overall loss function;

[0123] Step S3352: Update the connection weights and thresholds based on the first update parameter, the second update parameter, and the initial learning rate.

[0124] In the implementation, the overall loss function is processed based on the back propagation algorithm, and the first update parameter is obtained and the second update parameter And update the parameters using the gradient descent algorithm:

[0125]

[0126] Where η is the initial learning rate.

[0127] The present invention determines the overall loss value based on the overall loss function and determines whether training has ended based on this value. The overall loss function is a quantitative indicator that measures the difference between the model's predicted output and the actual expected output. By calculating the overall loss value, the degree of deviation between the model's predicted water supply temperature and the actual water supply temperature can be clearly determined, ensuring model convergence and performance optimization, avoiding overfitting and underfitting, and improving training efficiency.

[0128] Specifically, the step S335 includes:

[0129] An overall loss value is determined based on the overall loss function, and whether training is terminated is determined based on the overall loss value.

[0130] During implementation, an initial training epoch can be set. If the overall loss value does not drop significantly within a preset number of epochs (the change in the overall loss value is less than the preset change. The actual implementer can set the preset change based on the actual situation. Preferably, the preset change value range is set to 0.0001 to 0.001), the model training is judged to be completed. Preferably, the preset number value range is set to 10 to 20. For example, the initial training epoch is set to 200, and the model early stopping and learning rate decay are set. If the loss function value does not drop significantly within 10 epochs, the model training is judged to be completed, then the training is ended and the best model is saved.

[0131] The present invention determines the number of neurons in the input layer, hidden layer, and output layer based on the input data set and the expected output. The number of neurons in the input layer matches the characteristic dimension of the training data, which can ensure that the model fully receives data information. The number of neurons in the hidden layer and the number of layers are reasonably set, which can enable the model to have sufficient ability to extract complex features and patterns in the data. The number of neurons in the output layer is determined according to the expected output to ensure that the model output meets the prediction target. By passing the training data through the input layer, hidden layer, and output layer in sequence, weighted summation and nonlinear transformation are performed using connection weights and thresholds to finally obtain the output of the output layer, which can achieve prediction of the input data. The loss function is used to measure the difference between the model output value and the expected output. By calculating the value of the loss function, the prediction error of the model can be quantified. According to the overall loss function, the connection weights and thresholds are updated using the backpropagation algorithm, so that the model is adjusted in the direction of reducing the loss function. By continuously iteratively updating the parameters, the model can gradually learn the features and patterns in the data and improve the prediction accuracy.

[0132] Step S4, determining hyperparameters based on the number of network nodes of each fully connected layer, the initial learning rate, and the dropout layer dropout rate, and defining a hyperparameter search space, wherein the hyperparameter search space includes a plurality of hyperparameter combinations, and each hyperparameter combination includes a plurality of hyperparameters;

[0133] In practice, the number of network nodes in the fully connected layer determines the number of neurons in each layer of the neural network, affecting the modeling ability and complexity of the model. Too many nodes may lead to overfitting, while too few may lead to underfitting. The actual implementer can set the number of network nodes according to the actual situation. Preferably, the number of network nodes can be set to 32, 64, 128 or 256. The initial learning rate controls the amplitude of weight updates and is a key factor affecting the training speed and performance of the neural network. Too high a learning rate may cause the training process to be unstable and divergent; too low a learning rate may slow the training speed. The actual implementer can set the initial learning rate according to the actual situation. Preferably, the initial learning rate value range is set to 1e -5 0~1e -1 The dropout layer dropout rate is used to randomly drop a portion of neurons during training to prevent overfitting. Preferably, the dropout layer dropout rate is set to a value range of 0 to 1. The hyperparameter search space is a multidimensional space formed by combining the possible value ranges of the aforementioned hyperparameters, where each point corresponds to a specific set of hyperparameter combinations.

[0134] Step S5, constructing a proxy model using a Gaussian process, selecting several hyperparameter combinations from the hyperparameter search space, and training the proxy model based on the respective hyperparameter combinations to obtain an optimal hyperparameter combination;

[0135] In the implementation, let f(x) be the objective function, where x is the input vector. The objective function f(x) is defined as the loss function. The smaller its value, the more accurate the model's prediction. Next, a Gaussian process (GP) is used to construct a proxy model to approximate the objective function. The proxy model will predict unknown hyperparameter combinations based on the existing hyperparameter evaluation results, thereby greatly reducing the number of times the objective function is directly evaluated.

[0136] Specifically, in step S5, the following is also included:

[0137] Step S51, defining an acquisition function;

[0138] Step S52: determining a hyperparameter combination to be evaluated based on the acquisition function and the hyperparameter search space.

[0139] In the implementation, the expected improvement (EI) is selected as the acquisition function. By continuously calculating the expected maximum point and the actual corresponding objective function value, the potential minimum point of the objective function is found with the least number of iterations until the given maximum number of iterations is reached.

[0140] The present invention selects the hyperparameter combination to be evaluated by obtaining a function, which can avoid blind evaluation of all combinations in the hyperparameter search space and improve search efficiency.

[0141] Specifically, the step S5 includes:

[0142] Step S53, generating an initial sample data set based on the selected hyperparameter combinations;

[0143] Step S54: training the proxy model based on the initial sample data set to obtain a candidate proxy model;

[0144] Step S55, adding the hyperparameter combination to be evaluated to the initial sample data set to obtain a candidate sample data set;

[0145] Step S56: updating the candidate proxy model based on the candidate sample data set, and determining whether a maximum number of iterations has been reached. If the maximum number of iterations has been reached, obtaining the optimal hyperparameter combination.

[0146] The proxy model of the present invention can model and approximate the objective function based on the initial sample data set. By training the candidate proxy model, an estimate of the change trend of the objective function in the search space can be obtained. As the optimization process proceeds, the hyperparameter combination to be evaluated and its corresponding objective function value are added to the initial sample data set, and the input data set can be continuously updated, so that the proxy model can continuously learn new data information and adjust the model parameters, thereby more accurately approximating the objective function and improving the accuracy of the prediction. Setting the maximum number of iterations can control the search process of hyperparameter optimization. When the maximum number of iterations is reached, the search is stopped and the optimal hyperparameter combination is output, preventing the search process from continuing indefinitely and saving computing resources.

[0147] Step S6, determining a Bayesian optimized BP neural network model based on the optimal hyperparameter combination and the initial BP neural network model;

[0148] Specifically, step S6 includes:

[0149] The given values ​​of the initial BP neural network model are determined based on the optimal hyperparameter combination, and the initial BP neural network model is trained based on the input data set to obtain a Bayesian optimized BP neural network model.

[0150] In implementation, the optimal hyperparameter combination is used as the given value of the initial BP neural network model, the initial BP neural network model is trained using the input data set, and the test data set is divided to observe the model performance. The model is trained until the maximum number of training times or the performance is not significantly improved, and a Bayesian optimized BP neural network model is obtained.

[0151] Step S7: predicting the water supply temperature of the gas boiler based on the Bayesian optimization BP neural network model and the current operating parameter data of the gas boiler to obtain a predicted value of the water supply temperature of the gas boiler.

[0152] In the implementation, the input features of the model are the return water temperature, supply water flow rate and instantaneous gas consumption of the current gas boiler, and the corresponding output is the boiler's supply water temperature.

[0153] This paper incorporates Bayesian optimization into a neural network model for predicting the supply water temperature of a gas boiler system. This method optimizes network hyperparameters, such as the learning rate, number of network layer nodes, and dropout layer dropout rate, improving the neural network's accuracy in predicting the return water temperature of the gas boiler. By leveraging the Gaussian process in Bayesian optimization to establish a proxy model, the optimal hyperparameter combination is found, enabling real-time update and adjustment of network hyperparameters for precise optimization.

[0154] Example:

[0155] See also Figure 4 The figure below shows a comparison of the water supply temperature prediction results of the Bayesian-optimized BP neural network model according to an embodiment of the present invention and the actual reference values. The red color in the figure represents the actual reference value, and the black color represents the prediction results of the present invention. A comparison is made between three network models: the Bayesian-optimized BP neural network, the genetic algorithm-optimized BP neural network, and the traditional BP neural network. The lowest model loss function values ​​and the average model training time are shown in Table 1.

[0156] Table 1 Comparison of the lowest loss function values ​​and average training time of three network models: Bayesian optimized BP neural network, genetic algorithm optimized BP neural network, and traditional BP neural network

[0157]

[0158] Table 1 shows that the Bayesian optimization BP neural network model proposed in the present invention improves the model prediction accuracy compared with the traditional BP neural network model. At the same time, compared with the genetic algorithm optimized BP neural network model, while improving the prediction accuracy, it greatly shortens the model training time, saves computing costs, and can realize real-time update and adjustment of the network model hyperparameters, thereby improving the prediction accuracy of the model under different working conditions.

[0159] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.

Claims

1. A method for predicting boiler water supply temperature based on Bayesian optimization BP neural network, characterized in that: include: Step S1, obtaining operating parameter data and water supply temperature data of the gas boiler within a target time period, wherein the operating parameters include return water temperature, water supply flow rate, and gas consumption; Step S2: dividing the target time period into a plurality of time domain sub-segments, determining an explicit regularity representation value based on the operating parameter data and the water supply temperature data in each time domain sub-segment, and determining whether to mark the target time period based on the explicit regularity representation value; Step S3: if the target time period is marked, an initial BP neural network model is constructed based on the operating parameter data and water supply temperature data within the target time period, wherein the initial BP neural network model includes an input layer, a hidden layer, and an output layer, and the hidden layer includes three fully connected layers, a normalization layer, and a Dropout layer; Step S4, determining hyperparameters based on the number of network nodes of each fully connected layer, the initial learning rate, and the dropout layer dropout rate, and defining a hyperparameter search space, wherein the hyperparameter search space includes a plurality of hyperparameter combinations, and each hyperparameter combination includes a plurality of hyperparameters; Step S5, constructing a proxy model using a Gaussian process, selecting several hyperparameter combinations from the hyperparameter search space, and training the proxy model based on the respective hyperparameter combinations to obtain an optimal hyperparameter combination; Step S6, determining a Bayesian optimized BP neural network model based on the optimal hyperparameter combination and the initial BP neural network model; Step S7: predicting the water supply temperature of the gas boiler based on the Bayesian optimization BP neural network model and the current operating parameter data of the gas boiler to obtain a predicted value of the water supply temperature of the gas boiler.

2. The boiler water supply temperature prediction method based on Bayesian optimization BP neural network according to claim 1 is characterized in that: In step S2, determining the explicit regularity characterization value includes: Step S21, constructing corresponding time domain characteristic curves based on the operating parameter data and water supply temperature data in each of the time domain sub-segments; Step S22, determining a first characteristic value based on a comparison result of time points corresponding to peak values ​​of the time domain characteristic curves; Step S23, determining a second characteristic value based on a comparison result of the length of each mutation time period of each time domain characteristic curve from the start time of each time domain sub-segment; Step S24: determining a dominant regularity representation value based on the first eigenvalue and the second eigenvalue.

3. The boiler water supply temperature prediction method based on Bayesian optimization BP neural network according to claim 2 is characterized in that: In step S3, an initial BP neural network model is constructed, including: Step S31, constructing an initial data set based on the operating parameter data and the water supply temperature data; Step S32, preprocessing the initial data set to obtain an input data set; Step S33: Initialize the model structure and parameters of the BP neural network based on the input data set, and train to obtain an initial BP neural network model.

4. The method for predicting boiler water supply temperature based on Bayesian optimization BP neural network according to claim 3, characterized in that: The step S33 includes: Step S331, determining the number of neurons in the input layer, hidden layer, and output layer according to the input data set and the expected output; Step S332: Initialize connection weights and thresholds, and set an initial learning rate and activation function. The connection weights include the connection weights between the input layer and each fully connected layer, the connection weights between each hidden layer, the normalization layer weights, the Dropout layer weights, and the output layer weights. The thresholds include the input layer threshold, the hidden layer thresholds, and the output layer threshold. Step S333, determining the output layer output based on the input data set, each of the connection weights and the threshold; Step S334, determining an overall loss function based on the output layer output and the expected output; Step S335, based on the overall loss function, each connection weight and threshold are updated, and it is determined whether the training is completed. If it is determined not to be completed, step S333 is continued. If it is determined to be completed, the initial BP neural network model is obtained.

5. The boiler water supply temperature prediction method based on Bayesian optimization BP neural network according to claim 4 is characterized in that: The step S333 includes: Step S3331, performing forward calculation on each of the fully connected layers based on the input data set, the connection weights between the input layer and each fully connected layer, and each fully connected layer threshold to obtain a corresponding first hidden layer output; Step S3332: normalize the outputs of each fully connected layer, and determine the normalized layer output based on the normalization result, the normalized layer weight, and the normalized layer threshold; Step S3333, determining a second hidden layer output based on the normalized layer output, the connection weights between the hidden layers, and the hidden layer threshold; Step S3334: determining a Dropout layer output based on the second hidden layer output and the dropout rate of the Dropout layer; Step S3335: determining a third hidden layer output based on the Dropout layer output, the connection weights between the hidden layers, and the hidden layer threshold; Step S3336: Determine the output layer output based on the third hidden layer output, the output layer weight, and the output layer threshold.

6. The method for predicting boiler water supply temperature based on Bayesian optimization BP neural network according to claim 5, characterized in that: In step S335, each of the connection weights and thresholds is updated based on the overall loss function, including: Step S3351, determining a first update parameter and a second update parameter based on the overall loss function; Step S3352: Update the connection weights and thresholds based on the first update parameter, the second update parameter, and the initial learning rate.

7. The method for predicting boiler water supply temperature based on Bayesian optimization BP neural network according to claim 6, characterized in that: In the step S335, it includes: An overall loss value is determined based on the overall loss function, and whether training is terminated is determined based on the overall loss value.

8. The method for predicting boiler water supply temperature based on Bayesian optimization BP neural network according to claim 7, characterized in that: In the step S5, it further includes: Step S51, defining an acquisition function; Step S52: determining a hyperparameter combination to be evaluated based on the acquisition function and the hyperparameter search space.

9. The method for predicting boiler water supply temperature based on Bayesian optimization BP neural network according to claim 8, characterized in that: In the step S5, it includes: Step S53, generating an initial sample data set based on the selected hyperparameter combinations; Step S54: training the proxy model based on the initial sample data set to obtain a candidate proxy model; Step S55, adding the hyperparameter combination to be evaluated to the initial sample data set to obtain a candidate sample data set; Step S56: updating the candidate proxy model based on the candidate sample data set, and determining whether a maximum number of iterations has been reached. If the maximum number of iterations has been reached, obtaining the optimal hyperparameter combination.

10. The method for predicting boiler water supply temperature based on Bayesian optimization BP neural network according to claim 9, characterized in that: The step S6 comprises: The given values ​​of the initial BP neural network model are determined based on the optimal hyperparameter combination, and the initial BP neural network model is trained based on the input data set to obtain a Bayesian optimized BP neural network model.

Citation Information

Cited By

  • Raw water 2-MIB concentration prediction method based on multi-source sensing data

    CN121435196A