A new building energy consumption prediction method based on deep adversarial neural network with transfer learning

Through the deep adversarial neural network method based on transfer learning, the data of existing buildings and the data of new buildings are trained and modeled, which solves the problem of low energy consumption prediction accuracy of new buildings, and realizes high-precision and full-life cycle online energy consumption prediction.

CN113191529BActive Publication Date: 2025-06-06WUHAN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110371084.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-07
Publication Date
2025-06-06
Estimated Expiration
2041-04-07

AI Technical Summary

Technical Problem

The existing building energy consumption prediction methods have low prediction accuracy in newly built or missing buildings, and cannot effectively adapt to the data distribution and feature differences of different buildings.

Method used

The deep adversarial neural network method based on transfer learning is adopted, and energy consumption prediction is achieved by using the data of existing buildings as source domain data and the data of new buildings as target domain data. This method includes steps such as data collection and organization, training model, online prediction and performance evaluation.

Benefits of technology

It realizes high-precision prediction of new building energy consumption, and can make online energy consumption prediction for the full life cycle, which is better than traditional machine learning methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113191529B_ABST
    Figure CN113191529B_ABST
Patent Text Reader

Abstract

The present invention discloses a new building energy consumption prediction method based on a deep adversarial neural network of transfer learning, which relates to the technical field of building energy consumption prediction. The key points of its technical solution are: including the following steps: S1, using the existing building energy consumption data as source domain data, and using the new building energy consumption data as target domain data; S2, training the source domain data and the target domain data, and using the deep domain adaptation adversarial neural network method to train and model; S3, setting the time interval of the new building energy consumption data, screening the modeling data, updating and adjusting the training model, comparing the traditional machine learning energy consumption prediction and the energy consumption prediction performance evaluation of the training model, selecting the advantage online prediction, selecting the best time node for online prediction strategy transition, and realizing the online energy consumption prediction of the new building throughout its life cycle. This method uses the deep domain adaptation adversarial neural network method to predict the building energy consumption data of the new building, with high prediction accuracy, and can realize the online energy consumption prediction of the new building throughout its life cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building energy consumption prediction, and more specifically, to a new building energy consumption prediction method based on a deep adversarial neural network based on transfer learning. Background Art

[0002] Buildings are an important part of energy consumption. The energy utilization rate of the energy-consuming system inside the building is an important indicator affecting the building's energy consumption. Excessive building energy consumption will directly affect the degree of achievement of energy conservation and emission reduction goals. As the basic foundation for many building energy consumption management tasks, efficient, reliable, accurate, robust and generalizable building energy consumption prediction models play a vital role in optimizing the operation and control of building energy systems.

[0003] At present, many traditional machine learning or deep learning methods are applied to the research field of building energy consumption prediction, such as random forest, support vector regression, back propagation neural network, long short-term memory neural network, etc. The reliability and accuracy of these methods depend on as much modeling data as possible that covers all building energy equipment conditions and has sufficient data volume. Moreover, the prediction accuracy of the method is higher for the same type of buildings, the same equipment operating conditions, and similarly distributed energy consumption related data. Conversely, the prediction accuracy is lower. However, for newly built buildings, or buildings that lack data measurement and collection equipment, or have relatively limited data collection, the amount of modeling data available is limited. If the distribution of all data used for prediction from new buildings and existing buildings is completely similar, the model is universal, and the prediction problem can be solved simply by using the same energy consumption prediction model as that of existing buildings. However, due to different geographical locations, meteorological conditions, and user uses of different buildings, there are obvious differences in data distribution and feature composition.

[0004] Therefore, it is ineffective to use the same model for accurate prediction without data adjustment. In order to overcome the above problems, the present invention aims to design and provide a new building energy consumption prediction method based on deep adversarial neural network with transfer learning. Summary of the invention

[0005] The purpose of the present invention is to provide a new building energy consumption prediction method based on a deep adversarial neural network of transfer learning. The method adopts a deep domain adaptive adversarial neural network method to predict the energy consumption of new buildings. The prediction accuracy is high and online energy consumption prediction of new buildings can be realized throughout their life cycle.

[0006] The above technical objectives of the present invention are achieved through the following technical solutions: a new building energy consumption prediction method based on a deep adversarial neural network with transfer learning, specifically comprising the following steps:

[0007] S1. Collect and organize data based on the transfer learning theory, and use the energy consumption and related data of existing buildings with large volume and multiple working conditions as source domain data D s , the building energy consumption and related data of new buildings are taken as the target domain data D t , and for the source domain data D s and target domain data D t Collect, organize, divide and pre-process data;

[0008] S2, training data, according to step S1, the source domain data D s and target domain data D t Conduct data training, adopt a deep domain adaptation adversarial neural network method to train and model it, and obtain a training model, which is used for learning and training new building energy consumption data, and then used for energy consumption prediction of new buildings;

[0009] S3. According to step S1 and step S2, the hourly data of the time series energy consumption data of the new building is set with a time interval Δt, and the modeling data is screened. Then, the hourly data with the time interval Δt is used as new training data for data training, and the training model is updated and adjusted to perform online prediction on the hourly energy consumption data of the new building. Then, the energy consumption prediction performance evaluation of the traditional machine learning energy consumption prediction method and the training model is compared, the online prediction with advantages is selected, and the best time node in the time interval Δt is selected to transition the online energy consumption prediction strategy of the new building, so as to realize the online energy consumption prediction of the new building throughout its life cycle.

[0010] Furthermore, the neural network structure trained and modeled by the deep domain adaptation adversarial neural network method in step S2 includes a feature extractor M f , regression predictor M y and domain classifier M d , the feature extractor adopts a long short-term neural network, and the regression predictor and domain classifier both select a fully connected layer;

[0011] The feature extractor M f Used to extract the time characteristics of input time series data; the regression predictor M y It is used to find the mapping between the extracted features and the building energy consumption and make predictions based on the source domain data and the target domain data.

[0012] Furthermore, the neural cells of the long short-term neural network are composed of a forget gate, an input gate and an output gate;

[0013] The calculation formula of the forget gate is: t =σ(W f ·h t-1 +U f ·xt +b f );

[0014] The calculation formula of the input gate is: t =σ(W i ·h t-1 +U i ·x t +b i ),

[0015] a t =tanh(W a ·h t-1 +U a ·x t +b a ),

[0016] c t =c t-1 ·f t +i t ·a t ;

[0017] The calculation formula of the output gate is: t =σ(W o ·h t-1 +U o ·x t +b o ),

[0018] h t =o t ·tanh(c t );

[0019] Among them, f t is the output of the forget gate, σ is the Sigmoid activation function, tanh is the activation function, W and U are weight matrices, and b is the bias matrix;

[0020] The calculation process of the nerve cells of the long-term short-term neural network is: by inputting the value x at time t t Combined with the state information c at time t-1 t-1 And the output value h t-1 After the forget gate, input gate and output gate work together, useless information is eliminated, useful information is retained, and then the state information c at time t is output t And the output value h t , and use it for the next cell learning calculation, and continue in this way until all cells have completed the calculation;

[0021] The loss value L of the regression prediction of the long-term short-term neural network y The calculation formula is:

[0022]

[0023] Among them, y i and They are the actual energy consumption value and the predicted energy consumption value respectively.

[0024] In summary, the present invention has the following beneficial effects:

[0025] 1. The present invention collects and organizes data based on the transfer learning theory, takes the building energy consumption and related data of existing buildings with large volume and multiple working conditions as source domain data, takes the building energy consumption and related data of new buildings as target domain data, and collects, organizes, divides and preprocesses the source domain data and target domain data respectively, adopts the deep domain adaptation adversarial neural network method to train and model the building energy consumption data of new buildings, and trains the learning of the new building energy consumption data through the training model. Through the training model, it is easy to find the similarities between the source domain data and the target domain data and effectively transfer the energy consumption prediction capability, so as to accurately predict the energy consumption of new buildings;

[0026] 2. The present invention sets time intervals for the time series energy consumption data of new buildings, screens the modeling data, and then uses the hourly data at the set time intervals as new training data for data training, and updates and adjusts the training model to facilitate online prediction of the hourly energy consumption data of new buildings. At the same time, by comparing the energy consumption prediction performance evaluation of the traditional machine learning energy consumption prediction method and the training model, the advantageous online prediction is selected, and the best time node in the time interval is selected to transition the online energy consumption prediction strategy for the new building, which can realize online energy consumption prediction for the entire life cycle of the new building. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a diagram of the implementation process of new building energy consumption prediction for traditional machine learning algorithms;

[0028] Figure 2 It is a diagram of the implementation process of new building energy consumption prediction based on deep domain adaptive adversarial neural network based on transfer learning theory in an embodiment of the present invention;

[0029] Figure 3 It is an online prediction flow chart of new building energy consumption prediction based on deep adversarial neural network of transfer learning in an embodiment of the present invention;

[0030] Figure 4 is a line chart of an online prediction strategy for energy consumption of an office building selectively migrated in an embodiment of the present invention;

[0031] Figure 5 It is a line chart of the online prediction strategy for energy consumption of hospital buildings with selective migration in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The following is combined with Figure 1-5 The present invention is described in further detail.

[0033] Example: A new building energy consumption prediction method based on deep adversarial neural network with transfer learning, such as Figure 1 , Figure 2 and Figure 3 As shown, the specific steps include:

[0034] S1. Collect and organize data based on the transfer learning theory, and use the energy consumption and related data of existing buildings with large volume and multiple working conditions as source domain data D s , the building energy consumption and related data of new buildings are taken as the target domain data D t , and for the source domain data D s and target domain data D t Collect, organize, divide and pre-process data;

[0035] S2, training data, according to step S1, the source domain data D s and target domain data D t Conduct data training and use the deep domain adaptation adversarial neural network method to train and model it to obtain a training model. The training model is used to learn and train the energy consumption data of new buildings, and then used to predict the energy consumption of new buildings;

[0036] S3. According to step S1 and step S2, the hourly data of the time series energy consumption data of the new building is set with a time interval Δt, and the modeling data is screened. Then, the hourly data with the time interval Δt is used as the new training data for data training, and the training model is updated and adjusted to perform online prediction on the hourly energy consumption data of the new building. Then, the energy consumption prediction performance evaluation of the traditional machine learning energy consumption prediction method and the training model is compared, and the mean absolute error (MAE) is used for evaluation. The evaluation calculation formula is: Where n is the number of data, y i and Represents the actual value and predicted value of building energy consumption; then selects the advantageous online prediction, and selects the best time node in the time interval Δt to transition the online prediction strategy of new building energy consumption, so as to realize the online energy consumption prediction of the whole life cycle of the new building.

[0037] The neural network structure trained and modeled by the deep domain adaptation adversarial neural network method in step S2 includes a feature extractor M f , regression predictor M y and domain classifier M d ,The feature extractor uses long short term neural network, and the regression predictor and the domain classifier both choose fully connected layers;

[0038] Feature Extractor M f Used to extract the time characteristics of input time series data; regression predictor M y It is used to find the mapping between the extracted features and the building energy consumption and make predictions based on the source domain data and the target domain data.

[0039] Among them, the nerve cells of the long-term short-term neural network are composed of a forget gate, an input gate, and an output gate;

[0040] The calculation formula of the forget gate is: t =σ(W f ·h t-1 +U f ·x t +b f ) (1);

[0041] The calculation formula of the input gate is: t =σ(W i ·h t-1 +U i ·x t +b i ) (2),

[0042] a t =tanh(W a ·h t-1 +U a ·x t +b a ) (3),

[0043] c t =c t-1 ·f t +i t ·a t (4);

[0044] The calculation formula of the output gate is: t =σ(W o ·h t-1 +U o ·x t +b o ) (5),

[0045] h t =o t ·tanh(c t ) (6);

[0046] Among them, f t is the output of the forget gate, σ is the Sigmoid activation function, tanh is the activation function, W and U are weight matrices, and b is the bias matrix;

[0047] The calculation process of the nerve cells of the long-term short-term neural network is: through the input value x at time t t Combined with the state information c at time t-1 t -1 and output value h t-1 After the forget gate, input gate and output gate work together, useless information is eliminated, useful information is retained, and then the state information c at time t is output t And the output value h t , and use it for the next cell learning calculation, and continue in this way until all cells have completed the calculation;

[0048] The loss value L of the regression prediction of the long-term and short-term neural network y The calculation formula is:

[0049]

[0050] Among them, y i and They are the actual energy consumption value and the predicted energy consumption value respectively.

[0051] In this embodiment, the domain classifier is used to try to distinguish whether the features extracted by the feature extractor are source domain or target domain. The training model trains the domain classifier to correctly identify the domain labels of the extracted features (source: 0, target 1), and its domain classification loss value L d Defined as binary cross entropy, its calculation formula is shown in the following formula (8):

[0052]

[0053] Among them, n is the number of data, l i and are the actual domain label and the predicted domain label, respectively. The feature extractor is trained in an adversarial form by introducing a gradient reversal layer G λ , reducing the difference between the source domain and the target domain, making it difficult for the domain classifier to distinguish the domain labels. The forward and reverse propagation processes are shown in the following formulas (9) and (10):

[0054] G λ (x) = x (9),

[0055]

[0056]

[0057]

[0058] Among them, I is the identity matrix, α is a positive hyperparameter used to achieve the trade-off between regression loss and domain classification, η is a constant term, q is the current batch of data, k is the current number of iterations of data, m is the total number of iterations, and C is the length of the minimum total batch of training data in the source domain and the target domain. Then, through the gradient descent method, G λ The optimization process is shown in the following formulas (13)-(18):

[0059]

[0060] where w f , w y , w d They are feature extractors M f , regression predictor M y and domain classifier M d The network connection weight, N S and N T Represent the number of source domain data and target domain data respectively, and R represents the function symbol. Then, by searching for the minimum point w f , w y , w d The loss function φ is optimized as follows:

[0061]

[0062]

[0063] The learning weights in the training model are updated by gradient descent, as shown in the following equations (16)-(18):

[0064]

[0065]

[0066]

[0067] Wherein, λ represents the learning rate, and equations (16)-(18) can realize the optimal weight parameters by performing a gradient descent algorithm. At this time, the features extracted by the feature extractor can be considered to be domain-invariant. After the above learning process, the building energy consumption data from the source domain data and the target domain data can be directly applied to the energy consumption prediction of new buildings in the target domain using the method of the present invention.

[0068] In the embodiment of the present invention, the time series energy consumption data of the new building is an online data stream, and the volume and operating range of the energy consumption data of the new building will gradually increase. Figure 3As shown, when conducting online energy consumption prediction for new buildings, it is necessary to set a certain time interval, screen the modeling data, and update and adjust the model to improve the online prediction accuracy. When it reaches a certain time node, the energy consumption data collected by the new building is relatively sufficient and the operating conditions are relatively wide. Only using the target domain data and the traditional machine learning method can also have sufficient energy consumption prediction accuracy. At the same time, other core tasks of the present invention are to set reasonable time intervals, compare the traditional machine learning energy consumption prediction method with the new building energy consumption prediction method based on the deep domain adaptive adversarial neural network of the present invention based on transfer learning theory, and select a better online prediction model, and select an optimal time node for the transition of the online prediction strategy, so as to achieve better online energy consumption prediction for the entire life cycle of the new building.

[0069] The effectiveness of the solution of the present invention is experimentally verified by using the following public building energy consumption data set.

[0070] This example selects four office buildings and hospital buildings in the United States from the data set to verify and evaluate the energy consumption prediction performance of the method proposed in the present invention. Building 1# is an office building with a construction area of ​​3328m 2 , in this embodiment, it is a source domain building; Building 2# is another office building with a different energy behavior, with a construction area of ​​11795m 2 In this embodiment, it is the building of target area 1; building 3# is a hospital building with a construction area of ​​11295m 2 In this embodiment, it is a source domain building. Building 4# is another hospital building with a construction area of ​​41806m 2 , in this embodiment, it is the building of target domain 2; in this invention, it is assumed that buildings 2# and 4# are newly built buildings. Among them, the training data includes source domain data and target domain data. The source domain buildings 1# and 3# contain a total of 8784 weather and energy consumption samples for one year, while the target domain 1 building 2# and the target domain 2 building 4# accumulate data gradually over time ΔT, ΔT is 7 days. The test data set is the current time t of the target domain buildings 2# and 4# 0 Data for the next 7 days.

[0071] Traditional machine learning uses the long short-term memory neural network algorithm (LSTM) to predict online data. The training set data also increases with the accumulation of online data every week. The test set data is the current time t 0 Data for the next 7 days.

[0072] In this embodiment, the prediction performance of the energy consumption prediction model is evaluated mainly using the following mean absolute error (MAE) formula:

[0073]

[0074] Where n is the number of data, y i and Represents the actual value and predicted value of building energy consumption. The smaller the MAE value, the better the prediction performance. On the contrary, the larger the MAE value, the worse the prediction performance.

[0075] The computing resources and computing experimental conditions used in this embodiment are a computer with 8GB of memory and an Intel Core i5 processor. The deep domain adaptive adversarial neural network is constructed in the Python 3.7 and Pytorch1.4.0 environment.

[0076] In this embodiment, Figure 4 It is a line chart of the online prediction strategy of office building energy consumption with selective migration of building 1# as source domain data and building 2# as target domain data. Curve 1 is the office building energy consumption prediction based on the deep domain adaptive adversarial neural network based on transfer learning theory, and curve 2 is the online data energy consumption prediction by LSTM without transfer. Before 25 weeks, the use of transfer learning will be better than the online data energy consumption prediction by LSTM without transfer. With the increase of online data, the LSTM algorithm without transfer will be better than the online data energy consumption prediction by transfer learning.

[0077] In this embodiment, Figure 5 It is a line chart of the hospital building energy consumption online prediction strategy with selective migration of building 3# as source domain data and building 4# as target domain data, where curve 1 represents the MAE value of energy consumption prediction of deep domain adaptive adversarial neural network based on migration theory, and curve 2 represents the MAE value of online data energy consumption prediction of LSTM. Before 25 weeks, the use of transfer learning will be better than the online data energy consumption prediction performed by LSTM without migration. With the increase of online data, the LSTM algorithm will be better than the online data energy consumption prediction performed by transfer learning without migration after 25 weeks. Therefore, the present invention can be used to make more accurate energy consumption predictions for new buildings, thereby optimizing the operation and control of their energy systems.

[0078] According to the above-mentioned embodiments of the present invention, the new building energy consumption prediction method based on deep adversarial neural network of transfer learning of the present invention has the following beneficial effects:

[0079] 1. The present invention collects and organizes data based on the transfer learning theory, takes the building energy consumption and related data of existing buildings with large volume and multiple working conditions as source domain data, takes the building energy consumption and related data of new buildings as target domain data, and collects, organizes, divides and preprocesses the source domain data and target domain data respectively, adopts the deep domain adaptation adversarial neural network method to train and model the building energy consumption data of new buildings, and trains the learning of the new building energy consumption data through the training model. Through the training model, it is easy to find the similarities between the source domain data and the target domain data and effectively transfer the energy consumption prediction capability, so as to accurately predict the energy consumption of new buildings;

[0080] 2. The present invention sets time intervals for the time series energy consumption data of new buildings, screens the modeling data, and then uses the hourly data at the set time intervals as new training data for data training, and updates and adjusts the training model to facilitate online prediction of the hourly energy consumption data of new buildings. At the same time, by comparing the energy consumption prediction performance evaluation of the traditional machine learning energy consumption prediction method and the training model, the advantageous online prediction is selected, and the best time node in the time interval is selected to transition the online energy consumption prediction strategy for the new building, which can realize online energy consumption prediction for the entire life cycle of the new building.

[0081] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.

Claims

1. A new building energy consumption prediction method based on deep adversarial neural network with transfer learning, Its characteristics are: The specific steps include: S1. Collect and organize data based on the transfer learning theory, take the building energy consumption and related data of existing buildings with large volume and multiple working conditions as the source domain data Ds, take the building energy consumption and related data of new buildings as the target domain data Dt, and collect, organize, divide and preprocess the source domain data Ds and target domain data Dt respectively; S2, training data, according to step S1, the source domain data Ds and the target domain data Dt are trained, and a deep domain adaptation adversarial neural network method is used to train and model them to obtain a training model, which is used for learning and training the energy consumption data of new buildings, and then used for energy consumption prediction of new buildings; S3. According to step S1 and step S2, the hourly data of the time series energy consumption data of the new building is set with a time interval Δt, and the modeling data is screened. Then, the hourly data with the time interval Δt is used as the newly added training data for data training, and the training model is updated and adjusted to perform online prediction on the hourly energy consumption data of the new building. Then, the energy consumption prediction performance evaluation of the traditional machine learning energy consumption prediction method and the training model is compared, the advantageous online prediction is selected, and the best time node in the time interval Δt is selected to transition the online energy consumption prediction strategy of the new building, so as to realize the online energy consumption prediction of the new building throughout its life cycle. The best time node is the energy consumption prediction data collected by the new building. The method is characterized in that the energy consumption of a building is determined by the volume of energy consumption data and the range of working conditions; the transition of selecting the best time node for the online prediction strategy of energy consumption of a new building also includes, after the best time node, predicting the energy consumption of the new building based on the target domain data and the machine learning method; when the deep domain adaptation adversarial neural network method is used for training and modeling, the feature extractor in the neural network structure is trained by introducing a gradient reversal layer; when the gradient reversal layer is in forward propagation, the data does not change when passing through the layer; during back propagation, the direction of gradient transmission is changed, and the feature extractor is optimized in the direction of extracting more domain-invariant features, which is used to reduce the difference between the source domain and the target domain, making it difficult for the domain classifier to distinguish the domain labels.

2. According to claim 1, the new building energy consumption prediction method based on deep adversarial neural network based on transfer learning, Its characteristics are: The neural network structure trained and modeled by the deep domain adaptation adversarial neural network method in step S2 includes a feature extractor Mf, a regression predictor My and a domain classifier Md, the feature extractor adopts a long short-term neural network, and the regression predictor and the domain classifier both select a fully connected layer; The feature extractor Mf is used to extract the time features of the input time series data; the regression predictor My is used to find the mapping between the extracted features and the building energy consumption according to the source domain data and the target domain data and make predictions.

3. According to claim 2, the new building energy consumption prediction method based on deep adversarial neural network based on transfer learning, Its characteristics are: The neural cells of the long short-term neural network are composed of a forget gate, an input gate and an output gate; The calculation formula of the forget gate is: ft = σ (Wf·ht-1+Uf·xt+bf); The calculation formula of the input gate is: it = σ (Wi·ht-1+Ui·xt+bi), at=tanh(Wa·ht-1+Ua·xt+ba), ct = ct-1·ft+it·at; The calculation formula of the output gate is: ot = σ (Wo·ht-1+Uo·xt+bo), ht=ot·tanh(ct); Among them, ft is the output of the forget gate, σ is the Sigmoid activation function, tanh is the activation function, W and U are weight matrices, and b is the bias matrix; The calculation process of the neural cells of the long-term and short-term neural network is as follows: by combining the input value xt at time t with the state information ct-1 and the output value ht-1 at time t-1, after the forget gate, input gate and output gate work together, useless information is eliminated and useful information is retained, and then the state information ct and the output value ht at time t are output, and they are used for the cell learning calculation at the next moment, and this continues until the calculation of all cells is completed; The calculation formula of the loss value Ly of the regression prediction of the long-term and short-term neural network is: Among them, yi and They are the actual energy consumption value and the predicted energy consumption value respectively.

Citation Information

Patent Citations

  • Cross-band frequency spectrum prediction method based on deep transfer learning

    CN110730046A

  • Building energy consumption prediction method based on long-term and short-term memory network hybrid model

    CN112101521A