Flexible load forecasting method based on building energy consumption pattern recognition and multi-task learning

By applying building energy pattern recognition and multi-task learning methods in building load prediction, the problem of difficult multi-load prediction under building flexible regulation is solved, and high-precision load prediction is achieved.

CN118940075BActive Publication Date: 2025-04-04BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410959140.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2025-04-04
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

The existing multi-load prediction methods have errors in predicting flexible loads in buildings, which are mainly due to the complex coupling relationship between multi-flexible loads and the variability of multiple energy consumption patterns in buildings, making it difficult to accurately identify and predict.

Method used

The flexible load prediction method based on building energy usage pattern recognition and multi-task learning is adopted, and the flexible building energy usage pattern is identified through ToU-K-means cluster analysis, and the correlation between influencing factors and load is analyzed in combination with the GRA method. A multi-task learning model (MTL) is built and trained using LSTM network to improve the accuracy of load prediction.

Benefits of technology

Effectively identify the flexible energy consumption mode of building, reduce the prediction error of multiple flexible loads, improve prediction accuracy, solve the problem of difficult prediction of multiple flexible loads under building flexibility regulation, and achieve efficient load prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940075B_ABST
    Figure CN118940075B_ABST
Patent Text Reader

Abstract

The present invention discloses a flexible load prediction method based on building energy consumption pattern recognition and multi-task learning, which belongs to the field of building energy conservation and load prediction, including using the ToU‑K‑means method to perform cluster analysis on the flexible load data set to identify different building energy consumption patterns; quantitatively analyzing the correlation between different influencing factors and multivariate loads based on the GRA method; using the similar day data vertical comparison method to identify outliers and fill missing values ​​in the flexible load data set, and then divide the training set, verification set and prediction set; building a multivariate flexible load prediction model framework based on the MTL algorithm, and building a model sharing layer structure based on LSTM to obtain a trained prediction model; and evaluating the performance of the load prediction model. The present invention adopts the above-mentioned flexible load prediction method based on building energy consumption pattern recognition and multi-task learning, which can solve the problem that the load is difficult to accurately predict due to the use of building flexibility, and effectively improve the prediction accuracy of multivariate flexible loads in buildings.
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 conservation and load forecasting, and in particular to a flexible load forecasting method based on building energy consumption pattern recognition and multi-task learning. Background Art

[0002] The growth of renewable energy capacity provides new opportunities to cope with the global energy crisis and the growing energy demand. However, compared with traditional energy, renewable energy exhibits inherent randomness, volatility and intermittency, and renewable energy generation poses a huge challenge to the overall dispatch of the power grid. Therefore, in the presence of uncertainty in renewable energy, how to ensure power balance is the focus of smart grid research. In order to achieve real-time balance between the supply and demand sides of the power grid, it is necessary to improve the flexibility of the energy system. Compared with the energy supply side, there is a large proportion of flexible loads on the energy demand side. The flexible loads on the demand side have the ability to actively participate in grid regulation, can solve the uncertainty associated with renewable energy generation, and can help the power grid achieve stable and safe operation. In order to utilize the various flexible loads in the building, it is necessary to understand the operating status and energy consumption of the system during the time period in advance. Therefore, accurate prediction of building loads is a prerequisite for achieving supply and demand balance of the energy system.

[0003] Through the joint efforts of scholars at home and abroad, load forecasting methods have been continuously developed, the scenarios they target are becoming more and more complex, and the prediction accuracy is getting higher and higher. At present, load forecasting methods can be roughly divided into two stages: the first stage is the traditional method represented by time series analysis and regression analysis, and the second stage is the artificial intelligence method represented by machine learning. Most of the early studies focused on single load forecasting. However, the single load forecasting method ignores the variability, randomness and coupling between multiple energy demands. In order to solve the shortcomings of the single load forecasting method, most scholars began to study multi-load coupling forecasting technology to more effectively extract the coupling information between multiple loads.

[0004] Overall, the existing methods have achieved good results in solving the traditional multi-load prediction problem. However, the use of building flexibility leads to the rapid adjustment of the building load curve, and the intricate relationship between different flexibilities makes the building load characteristics more variable. The existing multi-load prediction methods have two limitations when predicting multi-flexible loads. First, the use of building flexibility further promotes the mutual transmission and conversion between multiple loads. For example, the heat storage and release of the building thermal storage body will change the cold and hot loads at the current moment, which will lead to changes in the electric load; in addition, the adjustment of electrical equipment such as lighting in the building can directly change the electric load, and the heat emitted by the electrical equipment also indirectly causes changes in the cold and hot loads. Obviously, the mutual transmission and conversion between multiple flexible loads makes the coupling relationship between loads more complex and difficult to learn. Secondly, the application of multiple flexible control strategies leads to multiple energy consumption modes inside the building. Different energy consumption modes have different load characteristics. If the multiple energy consumption modes under the flexible regulation of the building cannot be accurately identified, it will lead to the difficulty of accurately predicting the multi-flexible load. Therefore, in order to solve the problem of the difficulty of predicting the multi-flexible load under the flexible regulation of the building, an accurate method for predicting the multi-flexible load of the building is still needed. Summary of the invention

[0005] The purpose of the present invention is to provide a flexible load forecasting method based on building energy consumption pattern recognition and multi-task learning to solve the problems mentioned in the above background technology.

[0006] To achieve the above objectives, the present invention provides a flexible load forecasting method based on building energy consumption pattern recognition and multi-task learning, including a flexible energy consumption pattern recognition module, an input and output parameter selection module, a data processing and division module, and a model construction and evaluation module. The specific steps are as follows:

[0007] S1. Identify the flexible energy consumption mode of the building, use the ToU-K-means method to perform cluster analysis on the flexible load data set, identify the flexible energy consumption modes of different buildings, analyze the characteristics of multivariate flexible loads under each flexible energy consumption mode, extract the key flexible control parameters of the building energy system, and optimize the input parameters of the load prediction model based on the parameters;

[0008] S2. Determine the input and output parameters of the load forecasting model, comprehensively consider the characteristics of the multi-element flexible load and the forecasting task, and then select the key influencing factors of the multi-element flexible load, and quantitatively analyze the correlation between different influencing factors and the multi-element load based on the GRA method;

[0009] S3. Preprocess and divide the data, use the vertical comparison method of similar day data to identify outliers and fill missing values ​​in the flexible load data set to ensure the integrity and quality of the data set. On this basis, use the min-max standardization method to normalize the data set, and divide the processed data into training set, validation set and prediction set according to a certain ratio;

[0010] S4. Train the load forecasting model. Build a multivariate flexible load forecasting model framework based on the multi-task learning algorithm MTL, and build a model sharing layer structure based on LSTM. Then use the multidimensional feature vectors under each flexible energy mode as input and the load forecast value as output. Train the network from bottom to top until the preset number of iterations is reached to obtain a trained forecasting model.

[0011] S5. Evaluate the performance of the load forecasting model. Use R-squared, mean absolute error and root mean square error as evaluation indicators to evaluate the model prediction performance. Assign different weights to each prediction task according to its importance. Evaluate the overall prediction performance of the model based on the weighted average of each evaluation indicator.

[0012] Preferably, S11, dividing the daily load curve into n time periods according to the time-of-use electricity price ToU, aggregating the loads of all hours in each time period into a single data point, and merging the daily load curve into n points to form a subsequence;

[0013] S12, generating multiple subsequences for all daily load data according to the same method, and extracting data features of each subsequence;

[0014] S13, clustering these data features using K-Means clustering analysis, iterating until the cluster center no longer changes, indicating that the clustering result is optimal;

[0015] The core of K-Means clustering is to determine the cluster number K. If the number of flexible energy modes used in a building is known, the number of flexible energy modes is used to determine the cluster number K. Otherwise, the selection of K value is determined according to the characteristics of the data sample through the elbow method and Dunn index.

[0016] Preferably, the core indicator of the elbow method is the square sum of errors (SSE), as shown in formula (1). SSE represents the clustering error of all samples and reflects the quality of clustering effect. As the number of clusters K increases, SSE first gradually decreases and then tends to be stable. The K value corresponding to the elbow is the actual number of clusters of the data set. The Dunn index is an indicator used to evaluate the effectiveness of the clustering results. It measures the balance between the tightness within the cluster and the separation between the clusters. As shown in formula (2), the larger the Dunn index, the higher the tightness within the cluster and the separation between the clusters, and the better the clustering effect.

[0017] (1)

[0018] (2)

[0019] In the formula, For sample p With sample q The distance between and They are different clusters respectively; p Representation clustering Samples in Representation clustering The cluster center of .

[0020] Preferably, the key influencing factors in S2 include flexible control parameters, historical load data and meteorological parameters.

[0021] Preferably, the quantitative analysis of the correlation between different influencing factors and multivariate loads based on the GRA method in S2 is as follows:

[0022] The GRA method is used to quantitatively analyze the nonlinear coupling relationship between multivariate loads and between them and influencing factors. The calculation formulas of the correlation coefficient and the correlation degree are shown in formula (3) and formula (4). The correlation strength is judged according to the geometric similarity of the curves, that is, the correlation degree. The closer the curves are, the greater the correlation between the corresponding sequences.

[0023] (3)

[0024] (4)

[0025] In the formula, ρ is the resolution coefficient, generally taken as 0.5, is the current sequence, is a subsequence.

[0026] Preferably, the load forecasting model development in step S4 includes the following steps:

[0027] S41. Build a multivariate load forecasting model framework based on MTL, adopt a hard sharing mechanism to design the model network structure, use the shared layer to learn and obtain the auxiliary coupling information provided by the relevant subtasks, and define the prediction function as ,The overall optimization loss function of MTL is shown in Equation (5) and Equation (6);

[0028] (5)

[0029] (6)

[0030] In the formula, are parameters shared by different subtasks, Parameters related to the subtask, is the weight coefficient of the subtask, is the loss function;

[0031] S42. Use LSTM neural network with memory function to develop MTL's shared learning layer. Through the gating mechanism of LSTM network, selectively retain or forget past information. Through iterative learning and extracting information from multiple hidden layers in LSTM, learn the complex relationship within the input data.

[0032] S43, feed the input information of all subtasks to the shared layer, and through the training of the multi-layer neural network, fully learn the effective information of each subtask. Finally, the coupling features output by the shared layer enter the output layer of each subtask respectively, completing the mapping of the coupling features and the output of each subtask.

[0033] Preferably, the model performance evaluation method in S5 is as follows:

[0034] According to the comparison and analysis between the actual operation data and the forecast results, the R of different load forecast results is calculated respectively. 2 , MAE and RMSE, and calculate the average prediction accuracy based on the weight coefficients of different prediction tasks. The equations of each evaluation index are shown as follows:

[0035] (7)

[0036] (8)

[0037] (9).

[0038] Therefore, the present invention adopts the above-mentioned flexible load forecasting method based on building energy consumption pattern recognition and multi-task learning, which has the following beneficial effects:

[0039] (1) It can effectively identify the flexible energy consumption mode of the building and then predict the flexible loads under different flexible energy consumption modes;

[0040] (2) The sharing mechanism of MTL can be used to learn the information contained in different subtasks and fully explore the coupling relationship between multiple loads under different flexible energy consumption modes;

[0041] (3) It can effectively reduce the prediction error of multiple flexible loads under various flexible energy consumption modes;

[0042] (4) It can solve the problem of difficult prediction of multiple flexible loads under flexible control of buildings;

[0043] (5) The model has fast prediction speed and high prediction accuracy.

[0044] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a flow chart of the development of a method for predicting building multivariate flexible loads according to an embodiment of the present invention;

[0046] Figure 2 is a diagram for determining the number of cluster centers based on ToU-K-means according to an embodiment of the present invention;

[0047] Figure 3 It is a schematic diagram of clustering results of energy consumption patterns of water temperature dynamic programming based on time-of-use electricity prices in an embodiment of the present invention;

[0048] Figure 4 This is a schematic diagram of clustering results of energy consumption modes of storing heat at a constant water temperature at night and supplementing heat on demand during the day according to an embodiment of the present invention;

[0049] Figure 5 It is a schematic diagram of the clustering results of energy consumption patterns based on daytime variable water temperature control according to an embodiment of the present invention;

[0050] Figure 6 It is a schematic diagram of the clustering results of energy consumption patterns based on daytime constant water temperature operation according to an embodiment of the present invention;

[0051] Figure 7 is a heat map of correlation analysis of input and output parameters of a load forecasting model according to an embodiment of the present invention;

[0052] Figure 8 It is a structural block diagram of a building multivariate flexible load prediction model according to an embodiment of the present invention;

[0053] Fig. 9 Schematic diagram of the effect of the number of LSTM layers on the prediction accuracy of the model in an embodiment of the present invention;

[0054] Fig.10 This is a flexible load prediction effect diagram of the energy consumption mode based on the water temperature dynamic planning of the time-of-use electricity price in an embodiment of the present invention;

[0055] Fig.11 This is a flexible load prediction effect diagram of an energy consumption mode of storing heat at a constant water temperature at night and supplementing heat on demand during the day in an embodiment of the present invention;

[0056] Fig.12 This is a diagram showing the effect of flexible load prediction of energy consumption mode based on daytime variable water temperature control in an embodiment of the present invention;

[0057] Fig.13 This is a diagram showing the effect of flexible load prediction of energy consumption mode based on daytime constant water temperature operation according to an embodiment of the present invention;

[0058] Fig.14 is the heat load prediction accuracy of each control model in the embodiment of the present invention;

[0059] Fig.15 is the electric load prediction accuracy of each control model in the embodiment of the present invention;

[0060] Fig.16 It is the improvement ratio of prediction accuracy of the method proposed in the embodiment of the present invention. DETAILED DESCRIPTION

[0061] Example

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] Reference Figure 1 The present invention discloses a flexible load prediction method based on building energy consumption pattern recognition and multi-task learning, and the specific steps are as follows:

[0064] S1. Identify the flexible energy consumption mode of the building, use the ToU-K-means method to perform cluster analysis on the flexible load data set, identify the flexible energy consumption modes of different buildings, analyze the characteristics of multivariate flexible loads under each flexible energy consumption mode, extract the key flexible control parameters of the building energy system, and optimize the input parameters of the load prediction model based on the parameters;

[0065] The daily load curve is divided into n periods according to ToU, and the loads of all hours in each period are summarized as a single data point. The daily load curve is merged into n points to form a subsequence. Then, multiple subsequences are generated for all daily load data according to the same method, and the data features of each subsequence are extracted. Finally, K-Means clustering analysis is used to cluster these data features, and iterate until the cluster center no longer changes, indicating that the clustering result reaches the optimal value. The core of this clustering analysis method is to determine the cluster number K value. If the number of flexible energy modes used in the building is known, the number of flexible energy modes can be used to determine the cluster number K. However, when the number of flexible energy modes of the building is uncertain, the selection of K value often needs to consider the characteristics of the data sample, which is determined by the elbow method and Dunn index.

[0066] The core indicator of the elbow method is the sum of squared errors (SSE). As shown in formula (1), SSE represents the clustering error of all samples and reflects the quality of the clustering effect. As the number of clusters K increases, SSE first gradually decreases and then tends to be stable. The K value corresponding to the elbow is the actual number of clusters in the data set. The Dunn index is an indicator used to evaluate the effectiveness of clustering results. It measures the balance between the tightness within the cluster and the separation between clusters. As shown in formula (2), the larger the Dunn index, the higher the tightness within the cluster and the separation between clusters, and the better the clustering effect.

[0067] (1)

[0068] (2)

[0069] In the formula, For sample p With sample q The distance between and They are different clusters respectively; p Representation clustering Samples in Representation clustering The cluster center of .

[0070] S2. Determine the input and output parameters of the load forecasting model, comprehensively consider the characteristics of the multi-element flexible load and the forecasting task, and then select the key influencing factors of the multi-element flexible load, and quantitatively analyze the correlation between different influencing factors and the multi-element load based on the GRA method;

[0071] The three categories of flexible control parameters, historical load data and meteorological parameters are used as key influencing factors of the load for correlation analysis, and the input parameters of the load forecasting model are determined based on the analysis results. The GRA method is used to quantitatively analyze the nonlinear coupling relationship between multiple loads and between them and the influencing factors. Among them, the calculation formulas for the correlation coefficient and the correlation degree are shown in formulas (3) and (4). The correlation strength is judged based on the degree of similarity of the curve geometry, that is, the correlation degree. The closer the curves are, the greater the correlation between the corresponding sequences.

[0072] (3)

[0073] (4)

[0074] In the formula, ρ is the resolution coefficient, generally taken as 0.5, is the current sequence, is a subsequence.

[0075] S3. Preprocess and divide the data, use the vertical comparison method of similar day data to identify outliers and fill missing values ​​in the flexible load data set to ensure the integrity and quality of the data set. On this basis, use the min-max standardization method to normalize the data set, and divide the processed data into training set, validation set and prediction set according to a certain ratio.

[0076] S4. Train the load forecasting model. Build a multivariate flexible load forecasting model framework based on the multi-task learning algorithm MTL, and build a model sharing layer structure based on LSTM. Then use the multidimensional feature vectors under each flexible energy mode as input and the load forecast value as output. Train the network from bottom to top until the preset number of iterations is reached to obtain a trained forecasting model.

[0077] S41: Based on MTL, a multivariate load forecasting model framework is built. The hard sharing mechanism is used to design the model network structure. The auxiliary coupling information provided by other related subtasks can be learned by using the shared layer. The prediction function is defined as ,The overall optimization loss function of MTL is shown in Equation (5) and Equation (6);

[0078] (5)

[0079] (6)

[0080] In the formula, are parameters shared by different subtasks, Parameters related to the subtask, is the weight coefficient of the subtask, is the loss function.

[0081] S42: Develop the shared learning layer of MTL using the LSTM neural network with memory function. Through the gating mechanism of the LSTM network, it selectively retains or forgets past information. It learns the complex relationships within the input data by iteratively learning and extracting information from multiple hidden layers in the LSTM.

[0082] S43: The input information of all subtasks is fed to the shared layer. Through the training of the multi-layer neural network, the effective information of each subtask is fully learned. Finally, the coupling features output by the shared layer enter the output layer of each subtask respectively to complete the mapping of the coupling features and the output of each subtask.

[0083] S5. Evaluate the performance of the load forecasting model. Use R-squared, mean absolute error and root mean square error as evaluation indicators to evaluate the model prediction performance. Assign different weights to each prediction task according to its importance. Evaluate the overall prediction performance of the model based on the weighted average of each evaluation indicator.

[0084] Based on the comparative analysis between the actual operation data and the forecast results, the R2, MAE and RMSE of different load forecast results are calculated respectively, and the average forecast accuracy is calculated based on the weight coefficients of different forecast tasks. The equations of each evaluation index are shown as follows:

[0085] (7)

[0086] (8)

[0087] (9). Specific embodiment:

[0089] The performance of the proposed method is verified based on the actual operation data of a small office building from January to March 2023. The building in the embodiment is located in Beijing. Since there is no cooling load in winter, the multivariate load data consists of heat load and electric load. In addition, the flexible load data set also includes meteorological data from the local meteorological station and operation data of the air-conditioning system, where the meteorological data comes from the real-time monitoring data of the local meteorological station. Combined with the accompanying drawings, the specific implementation method of this embodiment is further described by example:

[0090] It mainly includes four modules: flexible energy consumption pattern recognition module, input and output parameter selection module, data processing and division module, model construction and evaluation module. The creation process of each module is as follows:

[0091] 1) Flexible energy consumption pattern recognition: Based on the K-means clustering analysis method, the original multivariate load data is clustered according to the daily load curve, and the clustering result with the lowest loss is taken as the best clustering. Since there is a coupling relationship between thermal load and electrical load, this embodiment performs clustering based on thermal load related data. At the same time, the clustering result of electrical load is consistent with the clustering result of thermal load. The changes of SSE and Dunn under different K values ​​are shown in Figure 2. Figure 2 As shown. It can be seen that the K value corresponding to the elbow is around 4, and the Dunn value corresponding to this position is the largest. Therefore, the optimal number of clusters is 4. Secondly, this embodiment building applies four different control strategies: (1) Strategy 1: Utilize the heat storage of the building envelope structure and the water temperature dynamic programming strategy based on time-of-use electricity prices; (2) Strategy 2: Storing heat at night and supplementing heat on demand during the day; (3) Strategy 3: Variable water temperature control strategy based on supply and demand matching; (4) Strategy 4: Fixed water temperature control strategy. Considering that the load curves of the four control strategies are significantly different, the rationality of the cluster center K value of 4 is verified.

[0092] According to the time-of-use electricity price in Beijing, the daily load curve is divided into 7 time periods, and the daily load curve is merged into 7 data points to form a subsequence. Then, multiple subsequences are generated based on all daily load data. The data features are extracted by calculating the maximum, minimum, average and standard deviation of each load subsequence. Based on K-Means clustering analysis, four flexible energy use modes of the building are identified. The load curves under the four energy use modes are shown in Figure 2. Figure 3-Figure 6 As shown, the black curve is the cluster center. By analyzing the flexible characteristics of the load under each flexible energy mode, it can be seen that the load of mode 1 and mode 2 is mainly concentrated in the valley electricity price period, and the load of mode 3 and mode 4 is mainly concentrated in the peak electricity price period. This is because in mode 1 and mode 2, by adjusting the water supply temperature and room temperature, the flexible load provided by the heat storage of the building envelope is utilized. It can be seen that the water supply temperature set value and the room temperature set value are the key control variables of the building energy system, thereby generating the flexible characteristics of the building energy system. Therefore, the water supply temperature set value and the indoor temperature set value are used as the flexible characteristic parameters of the building.

[0093] 2) Selection of input and output parameters: The multi-load coupling characteristics of the sub-data sets of each flexible energy mode are analyzed, and then the key influencing factors of the multi-load under each flexible energy mode are determined based on the GRA method. The correlation between the influencing factors and the multi-energy load data under each flexible energy mode is as follows: Figure 7 As shown, H represents heat load; E represents electric load; t represents the forecast time; t-1 to t-169 represent 1 hour before the forecast time to 169 hours before the forecast time; T out , R Hout , W Sout , S Rout Respectively represent outdoor temperature, relative humidity, wind speed and solar radiation intensity; T ws,t, T ins,t They represent the water temperature set value and room temperature set value at time t respectively. The results show that the historical load data has a high correlation with both meteorological parameters and flexible characteristic parameters. In addition, there is a significant high correlation between thermal load and electrical load, which once again verifies the time series characteristics and coupling relationship of multivariate loads.

[0094] First, the correlation of historical load data is analyzed. The correlation of load data 1 hour ago, 2 hours ago, 1 day ago, and 2 days ago is high in the four energy consumption modes. The correlation of load data 3 hours ago and 7 days ago shows differences in different modes. The correlation of these parameters in mode 1 and mode 2 is less than that in mode 3 and mode 4. This difference is due to the general law of demand response within 2 hours, resulting in a relatively small correlation of load data 3 hours ago. In the analysis of meteorological parameters, the correlation between outdoor temperature and outdoor relative humidity is greater than that between outdoor wind speed and solar radiation intensity. In addition, the correlation of meteorological parameters in mode 1 and mode 2 is less than that in mode 3 and mode 4. Flexible characteristic parameters include the set values ​​of water supply temperature and indoor temperature at the current moment and the previous moment. The correlation of flexible characteristic parameters in mode 1 and mode 2 is greater than that in mode 3 and mode 4, indicating that after the use of building flexibility, the correlation between multi-load and flexible characteristic parameters is enhanced, resulting in a relatively reduced correlation between multi-load and historical load data and meteorological parameters. Therefore, the input and output parameters of the load forecasting model under the four modes are shown in Table 1.

[0095] Table 1 Input and output parameters of prediction model under different energy consumption modes

[0096]

[0097] 3) Data preprocessing and division: The load data contained in the four clusters divided based on cluster analysis are classified as similar days. The load values ​​at each moment in the flexible load data set are compared with the average load values ​​of similar days at the same moment. The abnormal point is judged based on the difference between the two, as shown in formula (9). The abnormal point threshold is set according to the actual building scene. When formula (9) is established, the load value at time t is an abnormal value, which is removed and filled according to formula (10).

[0098] (10)

[0099] (11)

[0100] In the formula, is the true value of the load at time t, The average load value at time t on a similar day.

[0101] After determining the input / output data set, the min-max standardization method is used to normalize the data. By linearly transforming the original data, all data sequences are mapped between 0 and 1. The processed data is then divided into training set, validation set, and prediction set with a ratio of 70%, 15%, and 15%, respectively, and the time interval of the data sequence is 1 hour.

[0102] 4) Model construction and evaluation: Combination Figure 8The MTL-LSTM hybrid neural network architecture is constructed, and the multidimensional feature vectors under each flexible energy mode are used as input, and the heat load and electric load are used as output to train the network from bottom to top. In order to achieve the optimal structure of the model, the hyperparameters of the network structure are determined based on the control variable method, and the parameters in the model training process are optimized based on the Adam algorithm. The influence of the number of LSTM layers on the model prediction accuracy is shown in the figure below. Fig. 9 As shown in Figure 2, the R2 of each subtask reaches its peak when the number of LSTM layers is 3. Therefore, the optimal number of LSTM layers in the model is set to 3. The optimal model hyperparameters are finally determined as shown in Table 2.

[0103] Table 2 Model hyperparameters

[0104]

[0105] Based on the trained model, the thermal power load under four energy usage modes is predicted. The results are as follows: Figure 10-13 The prediction results of the four energy consumption modes are evaluated based on the model performance evaluation index, and the results are shown in Table 3. It can be seen that the proposed method can accurately predict the heat load and electric load under four different energy consumption modes, and the prediction accuracy of all energy consumption modes is very high. The average R 2 The average RMSE and MAE are 0.271 kW and 0.221 kW, respectively. Among them, the prediction accuracy of electric load is higher than that of thermal load, and the prediction accuracy of mode 3 is the highest among the four energy consumption modes.

[0106] Table 3 Load prediction accuracy under four energy consumption modes

[0107]

[0108] The method proposed in this embodiment is compared with the three single-task learning models of BPNN, SVR, and LSTM and the MTL-LSTM multi-task learning model without energy consumption pattern recognition for multivariate load forecasting. The prediction accuracy is as follows: Figure 14-15 As shown in Table 4, the focus is on verifying the impact of considering flexible energy consumption pattern recognition and the coupling relationship between different loads on the prediction accuracy during the prediction process. Compared with MTL-LSTM, BFFR can effectively improve the prediction accuracy of multivariate flexible loads. In addition, the prediction accuracy of MTL-LSTM is better than BPNN, SVR, and LSTM, indicating that the multi-task learning algorithm is better than the single-task learning algorithm. Comparing the prediction accuracy of BPNN, SVR, and LSTM, the prediction accuracy of LSTM is better than BPNN and SVR, indicating that LSTM has time series memory function and is more suitable for load prediction with strong time series characteristics.

[0109] Table 4 Prediction accuracy of different models

[0110]

[0111] like Fig.16 Compared with other models, the method proposed in this embodiment significantly improves the prediction accuracy, with an average R 2 The maximum improvement is 47%. Compared with the multi-task learning model without energy pattern recognition, the prediction accuracy can be improved by 29%; compared with the three single-task learning models, the prediction accuracy can be improved by 33%-47%.

[0112] Therefore, the present invention adopts the above-mentioned flexible load prediction method based on building energy consumption pattern recognition and multi-task learning, which can solve the problem of difficult load prediction due to the use of building flexibility, and effectively improve the prediction accuracy of building multi-flexible loads.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A flexible load forecasting method based on building energy pattern recognition and multi-task learning, characterized in that: It includes flexible energy consumption pattern recognition module, input and output parameter selection module, data processing and division module and model construction and evaluation module. The specific steps are as follows: S1. Identify the flexible energy consumption mode of the building, use the ToU-K-means method to perform cluster analysis on the flexible load data set, identify the flexible energy consumption modes of different buildings, extract the flexible characteristic parameters under different energy consumption modes, analyze the multivariate flexible load characteristics under each flexible energy consumption mode, extract the flexible control parameters of the building energy system, and optimize the input parameters of the load prediction model based on the parameters; The specific contents of the identification of building flexible energy consumption mode are as follows: S11, dividing the daily load curve into n time periods according to the time-of-use electricity price ToU, summarizing the loads of all hours in each time period into a single data point, and merging the daily load curve into n points to form a subsequence; S12, generating multiple subsequences for all daily load data according to the same method, and extracting data features of each subsequence; S13, clustering the data features of each subsequence using K-Means cluster analysis, iterating until the cluster center no longer changes; The core of K-Means clustering is to determine the cluster number K. If the number of flexible energy modes used in a building is known, the number of flexible energy modes is used to determine the cluster number K. Otherwise, the selection of K value is determined by the elbow method and Dunn index according to the characteristics of the data sample. S2. Determine the input and output parameters of the load forecasting model, select the influencing factors of the multivariate flexible load through the multivariate flexible load characteristics and forecasting tasks, and quantitatively analyze the correlation between the multivariate load and meteorological parameters, historical load and flexible characteristic parameters based on the GRA method; S3. Preprocess and divide the data, use the vertical comparison method of similar day data to identify outliers and fill missing values ​​in the flexible load data set, and on this basis use the min-max standardization method to normalize the flexible load data set, and divide the processed data into training set, validation set and prediction set; S4. Train the load forecasting model. Build a multivariate flexible load forecasting model framework based on the multi-task learning algorithm MTL, and build a model sharing layer structure based on LSTM. Take the multidimensional feature vector under each flexible energy mode as input and the load forecast value as output. Train the network from bottom to top until the preset number of iterations is reached to obtain a trained forecasting model. S5. Evaluate the performance of the load forecasting model. Use R-squared, mean absolute error and root mean square error as evaluation indicators to evaluate the model prediction performance. Assign different weights to each prediction task according to its importance. Evaluate the overall prediction performance of the model based on the weighted average of each evaluation indicator.

2. The flexible load forecasting method based on building energy pattern recognition and multi-task learning according to claim 1 is characterized by: The core indicator of the elbow method is the sum of squared errors (SSE), as shown in formula (1). SSE represents the clustering error of all samples. The Dunn index is an indicator for evaluating the effectiveness of clustering results, which measures the balance between the tightness within the cluster and the separation between clusters, as shown in formula (2): (1) (2) In the formula, For sample p With sample q The distance between and They are different clusters respectively; p Representation clustering Samples in Representation clustering The cluster center of .

3. The flexible load forecasting method based on building energy pattern recognition and multi-task learning according to claim 1 is characterized in that: The influencing factors in S2 include flexible characteristic parameters, historical load data and meteorological parameters.

4. The flexible load forecasting method based on building energy pattern recognition and multi-task learning according to claim 3 is characterized in that: In S2, the correlation between multivariate loads and meteorological parameters, historical loads and flexible characteristic parameters is quantitatively analyzed based on the GRA method as follows: The GRA method is used to quantitatively analyze the nonlinear coupling relationship between multiple loads and between them and influencing factors. The calculation formulas of the correlation coefficient and the correlation degree are shown in formula (3) and formula (4), respectively: (3) (4) In the formula, ρ is the resolution coefficient, generally taken as 0.5, is the current sequence, is a subsequence.

5. The flexible load forecasting method based on building energy pattern recognition and multi-task learning according to claim 1 is characterized in that: The training load prediction model in step S4 includes the following steps: S41. Build a multivariate load forecasting model framework based on MTL, adopt a hard sharing mechanism to design the model network structure, use the shared layer to learn and obtain the auxiliary coupling information provided by the relevant subtasks, and define the prediction function as , the overall optimization loss function of MTL is shown in equations (5) and (6): (5) (6) In the formula, are parameters shared by different subtasks, Parameters related to the subtask, is the weight coefficient of the subtask, is the loss function; S42, using LSTM neural network with memory function to develop MTL's shared learning layer, through the gating mechanism of LSTM network, by iterative learning and extracting information from multiple hidden layers in LSTM, to learn the complex relationship within the input data; S43, feed the input information of all subtasks to the shared layer, and learn the effective information of each subtask through the training of the multi-layer neural network. Finally, the coupling features output by the shared layer enter the output layer of each subtask respectively to complete the mapping of the coupling features and the output of each subtask.

6. The flexible load forecasting method based on building energy pattern recognition and multi-task learning according to claim 1 is characterized in that: The contents of the evaluation of the performance of the load forecasting model in S5 are as follows: Calculate R of different load forecast results respectively 2 , MAE and RMSE, and calculate the average prediction accuracy based on the weight coefficients of different prediction tasks. The equations of each evaluation index are shown as follows: (7) (8) (9)。