A method for predicting energy consumption behavior of smart building users based on LSTM neural network

Through the LSTM neural network method, the user's historical daily load curve is clustered and trained, and an energy-using behavior prediction model is built, which solves the problem of difficult to deal with complex user energy-using behavior in the existing technology, and realizes efficient load prediction and energy management.

CN113780684BActive Publication Date: 2025-04-11LONGYAN POWER SUPPLY COMPANY STATE GRID FUJIAN ELECTRIC POWER
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing load prediction method based on BP neural network is difficult to effectively deal with complex user energy usage behaviors, especially in environments with complex timing and nonlinear relationships, and lacks consideration of the time correlation of timing data.

Method used

Using the LSTM neural network method, the user's historical daily load curve is collected and K-Means clustering is performed to obtain the K-type typical historical daily load curve, and K LSTM neural networks are trained separately to build K energy-using behavior prediction models to realize short-term load prediction for building-specific users.

Benefits of technology

Effectively handle complex user energy usage behaviors, improve the accuracy and efficiency of load prediction, and be able to diagnose equipment health and key factors in energy waste based on usage, optimize load operation time, and reduce total power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113780684B_ABST
    Figure CN113780684B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for predicting energy consumption behavior of users in a smart building based on an LSTM neural network, comprising the following steps: collecting historical energy consumption data; collecting daily historical energy consumption data of each user in the building to obtain a historical daily load curve of each user; classifying energy consumption behavior; clustering the historical daily load curves of all users using a K-Means clustering algorithm, determining the optimal cluster number K of clustering by calculating a silhouette coefficient and a DBI index, obtaining K clustering results, and adding a user energy consumption behavior label to the data in each clustering result; training a prediction model; constructing K LSTM neural networks according to the clustering results, training each LSTM neural network using the historical daily load curve of the user in each clustering result as a training sample, and obtaining K energy consumption behavior prediction models; and predicting the energy consumption behavior of any user in the building in the future using the trained K energy consumption behavior prediction models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for predicting energy consumption behavior of users in a smart building based on an LSTM neural network, and belongs to the technical field of electricity consumption behavior prediction. Background Art

[0002] Accurate building load forecasting is the basis for achieving safe and economical operation and intelligent and scientific management of building power load systems. Smart buildings with "Internet +" as the core will become one of the important directions for energy service providers to carry out user-side service management. Therefore, the analysis and prediction of user energy consumption behavior is an important way for energy suppliers to adapt to the growth of user energy demand and the trend of diversified energy consumption methods. It also provides a necessary means for users to formulate personalized energy consumption plans. Therefore, it is very urgent to conduct in-depth analysis of user-side energy consumption behavior.

[0003] With the continuous advancement of my country's energy supply-side structural reform, the types and influencing factors of user loads are increasing. In the power market environment, user energy consumption behavior, user response to incentive policies, and urban development conditions have increased the complexity of power consumption patterns. However, at present, most of the load forecasting methods based on artificial intelligence are traditional BP neural networks, which are difficult to handle the relationship between input and output in such a complex environment. At the same time, the improvement of the level of informationization of the power system has brought opportunities for further improvement of the accuracy of load forecasting by obtaining massive power distribution and consumption information through a variety of measurement systems. The effective analysis of these data has become the key to improving the accuracy of power load forecasting. In addition, with the continuous development of intelligent monitoring equipment and information technology, large-scale, complex and highly real-time energy consumption system data will continue to emerge, and real-time data rapid analysis and decision-making based on machine learning algorithms and big data computing platforms will become the most effective means. Therefore, user energy consumption behavior prediction analysis based on multi-source heterogeneous big data analysis can realize the effective mining and utilization of energy consumption information on the user side of the integrated energy system. With the continuous deepening of the national energy conservation and emission reduction process, analyzing the laws of user energy consumption behavior will become a necessary prerequisite for maximizing energy utilization while meeting the personalized needs of users.

[0004] Power load data has the characteristics of time series and nonlinearity. Based on its characteristics, the research on short-term power load forecasting models at home and abroad is generally divided into two categories. One is the time series analysis method, such as regression analysis, exponential smoothing model, Kalman filter, multivariate linear regression, Fourier expansion model and autoregressive integral moving average model. The basic idea is to predict future load values ​​from the past load values ​​and current load values ​​of random time series. The second category is machine learning analysis methods, such as back propagation (BP) neural network prediction, gray projection and random forest algorithm, deep belief network prediction, multi-core support vector machine algorithm for regression prediction, etc.

[0005] Time series analysis is essentially a statistical method. Its advantage is that it takes into account the temporal relationship of data. It can effectively predict the development law of some data that changes linearly over time, but its prediction ability for nonlinear relationship data is limited. BP neural network is essentially an approximation of linear weight function, which means using the changes of some linear parameters in the function to make a certain approximation to the pattern or function to be identified. This method is effective when the data before and after the input and output are unrelated, but when identifying data that are related before and after, if the previous data is not used as the input variable of the next data, the algorithm is essentially unable to mine the pattern generated by the data. The problem is that it lacks consideration of the time correlation of time series data, and it is necessary to artificially add time features to ensure the prediction results.

[0006] Based on the need to mine the internal patterns of time series data, recurrent neural networks (RNNs) emerged to make inputs correlated with each other. Long short-term memory (LSTM) networks are an effective nonlinear recurrent neural network. As they take into account both the temporal and nonlinear relationships of data, they are gradually being used in the field of load forecasting. Summary of the invention

[0007] In order to solve the problems existing in the above-mentioned prior art, the present invention proposes a method for predicting energy consumption behavior of smart building users based on LSTM neural network, collects the historical daily load curves of each user in the building and clusters them to obtain K types of typical historical daily load curves, and trains K LSTM neural networks respectively through the K types of historical daily load curves to obtain K energy consumption behavior prediction models, so as to realize short-term load prediction for specific users in the building.

[0008] The technical solution of the present invention is as follows:

[0009] On the one hand, the present invention provides a method for predicting energy consumption behavior of smart building users based on LSTM neural network, comprising the following steps:

[0010] Collect historical energy consumption data; collect daily historical energy consumption data of each user in the building and obtain the historical daily load curve of each user;

[0011] Energy consumption behavior classification: K-Means clustering algorithm is used to cluster the historical daily load curves of all users. The optimal number of clusters K is determined by calculating the silhouette coefficient and DBI index. K clustering results are obtained, and user energy consumption behavior labels are added to the data in each clustering result.

[0012] Training prediction models: Based on the clustering results, K LSTM neural networks are constructed, and the historical daily load curves of users in each clustering result are used as training samples to train each LSTM neural network, and K energy consumption behavior prediction models are obtained;

[0013] The K trained energy consumption behavior prediction models are used to predict the energy consumption behavior of any user in the building in the future.

[0014] As a preferred implementation, when collecting the user's daily historical energy usage data, the historical energy usage data is normalized to obtain the daily load curve.

[0015] As a preferred implementation, the step of determining the optimal number of clusters K for clustering by calculating the silhouette coefficient and the DBI index is specifically as follows:

[0016] Randomly select a K value and divide n samples into K categories;

[0017] For the i-th sample, its contour value is defined as:

[0018]

[0019] Among them, a is the average distance between the i-th point and other points in the same class; b is a vector whose elements are the average distances between the i-th point and points in different classes;

[0020] The mean value of the silhouette coefficients of all sample points is calculated as the silhouette coefficient of the clustering result based on the current K value;

[0021] Calculate the DBI index:

[0022]

[0023] Among them, Ri is the maximum similarity between the i-th class and other classes after clustering according to the current K value: is the mean of the maximum similarity of each class;

[0024] The K value is repeatedly selected, and the silhouette coefficient and the DBI index are combined to obtain a K value that maximizes the silhouette coefficient and minimizes the DBI index, which is determined as the optimal number of clusters K.

[0025] As a preferred implementation, the step of adding user energy usage behavior labels to the data in each clustering result is specifically as follows:

[0026] The daily load curves of the K cluster centers are used as the characteristic curves of each clustering result; the energy consumption behavior type of the characteristic curve is determined according to the peak size, peak frequency and peak position of the characteristic curve;

[0027] According to the energy consumption behavior type of each characteristic curve, the corresponding user energy consumption behavior label is added to all historical daily load curves in the corresponding clustering results.

[0028] As a preferred implementation, the steps of training the prediction model are specifically as follows:

[0029] Build LSTM neural network;

[0030] According to the clustering results, the historical daily load curves with the same user energy consumption behavior labels are selected as the training sample set and used as the input for LSTM neural network training;

[0031] Reconstruct the historical daily load curve into a row vector according to the time series, the first 90% of the sequence is used for training, and the last 10% is used for testing;

[0032] Set up the time series of the LSTM neural network, specify the training options, and use the observed values ​​at the previous moment to predict the predicted values ​​at the next moment;

[0033] The root mean square error (RMSE) between the predicted value and the true value is calculated to judge the network performance. When the network performance meets the expected accuracy, the output is the energy consumption behavior prediction model corresponding to the user energy consumption behavior label type;

[0034] Repeat the above steps to obtain K energy consumption behavior prediction models.

[0035] On the other hand, the present invention also provides a smart building user energy consumption behavior prediction device based on an LSTM neural network, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the prediction method as described in any embodiment of the present invention is implemented.

[0036] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the prediction method as described in any embodiment of the present invention.

[0037] The present invention has the following beneficial effects:

[0038] 1. The present invention discloses a method for predicting energy consumption behavior of users in smart buildings based on LSTM neural network. The method adopts K-Means clustering algorithm to divide the energy consumption behavior of each user in the building according to the historical daily load curve of each user, and obtains K types of typical user energy consumption behavior curves. The silhouette coefficient and DBI index are introduced to determine the optimal number of clusters K to obtain the best clustering effect. The method adopts unidirectional LSTM long short-term memory network for deep learning to construct K energy consumption behavior prediction models to realize short-term load prediction for specific users in the building.

[0039] 2. The present invention provides a method for predicting energy usage behavior of smart building users based on LSTM neural network. The power usage habits and power usage behavior characteristics of building users can be calculated by the energy usage behavior prediction model algorithm. The health of equipment can be outlined according to usage, energy waste caused by equipment aging or failure can be diagnosed and analyzed, and the key factors of energy waste caused by energy usage behavior can be analyzed. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a flow chart of Embodiment 1 of the present invention;

[0041] Figure 2 This is an example diagram of a dynamic clustering process of clustering using a K-Means clustering algorithm in an embodiment of the present invention;

[0042] Figure 3 It is a topological structure expansion diagram of a standard RNN neural network involved in an embodiment of the present invention;

[0043] Figure 4 A topological structure diagram of the LSTM neural network used in the embodiment of the present invention;

[0044] Figure 5 A flowchart of creating and training an LSTM neural network in an embodiment of the present invention;

[0045] Figure 6 This is a flow chart of constructing a K-type energy consumption behavior prediction model in an embodiment of the present invention. DETAILED DESCRIPTION

[0046] 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.

[0047] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.

[0048] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0049] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0050] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0051] Embodiment 1:

[0052] See also Figure 1 The present invention provides a method for predicting energy consumption behavior of smart building users based on LSTM neural network, comprising the following steps:

[0053] Collect historical energy consumption data; collect daily historical energy consumption data of each household in the building with a granularity of 15 minutes, that is, 96 energy consumption data of each household need to be collected every day to obtain the historical daily load curve of each user;

[0054] Energy behavior classification; K-Means clustering algorithm is used to cluster the historical daily load curves of all users. The optimal number of clusters K is determined by calculating the silhouette coefficient and DBI index, and K clustering results are obtained. The user's energy behavior label is added to the data in each clustering result, and the building users are divided into K types of typical energy behavior law types; two important information can be obtained through clustering: one is to obtain the typical load distribution of users, and the other is to become important data for classifying users according to load characteristics. This method has important theoretical and practical significance for different aspects such as load forecasting, load control, and power consumption anomaly detection. The user's daily load curve is the data source of load analysis and is an intuitive reflection of the user's energy consumption behavior. If users have similar energy consumption patterns, they also have similar load distribution shapes. In order to facilitate the management of enterprises and formulate targeted operation strategies, users can be classified according to the similarity of their load distribution. Cluster analysis occupies a dominant position in load analysis and is the basis of load analysis.

[0055] Referring to Figure,2, the K-Means clustering algorithm is as follows:

[0056] First: Randomly select K samples as initial cluster centers.

[0057] Second: Classify all samples except the cluster center one by one, and classify them into the closest data cluster according to the distance between each remaining sample and each cluster center, and then recalculate the cluster center of each data cluster as the new cluster center.

[0058] Third: Repeat step 2 until the criterion function converges. In general, the square error criterion is used, and the mathematical expression is as follows:

[0059]

[0060] In the above formula, E is the sum of squared errors of all objects in the database, p is a point in space, and mi is the average value of cluster Ci. The distance metric in this formula is the Euclidean distance. Using this error function, the generated clusters can be made as compact and independent as possible.

[0061] The K-Means clustering algorithm is simple to calculate and can be used for various data types, but it requires the number of data clusters to be determined in advance as an input parameter. The setting of this parameter often involves the clustering effect. However, for different buildings, the individual differences between users are large. Therefore, it is not easy to determine the clustering parameter K of user energy behavior clustering for different buildings. In the process of selecting the K value, it often takes multiple experiments to find the optimal number of clusters. In order to determine the best clustering effect, the silhouette coefficient and DBI effectiveness index are introduced for evaluation to select the optimal number of clusters K.

[0062] Training prediction model; Based on the clustering results, K LSTM neural networks are constructed based on the MATLAB platform. Based on the clustering results, the user's historical daily load curves are grouped according to different energy consumption types and used as the input of the corresponding LSTM network. The network is trained to obtain K energy consumption behavior prediction models;

[0063] LSTM neural network is a special recurrent neural network. Recurrent neural network is a neural network used to process sequence data. The most commonly used and powerful tool for time series model is recurrent neural network (RNN). Compared with the independent characteristics of each calculation result of ordinary neural network, each calculation result of the hidden layer of RNN is related to the current input and the previous hidden layer result, which is very suitable for processing sequence changing data. In this way, the calculation result of RNN has the characteristic of remembering the previous results. In the standard RNN, this repeated module has only a very simple structure, such as a single tanh layer. The standard RNN network is like Figure 3 As shown in the figure, the loop structure allows information to be passed from the current step to the next step. However, RNN has the problem of vanishing gradients, that is, if the interval between the relevant information and the predicted position is relatively small, RNN can learn to use the previous information. But when this interval continues to increase, RNN will lose the ability to learn information that is so far away. The emergence of LSTM neural networks solves the long dependency problem.

[0064] The LSTM network structure is as follows Figure 4As shown in the figure, its repeated unit module is different from the standard RNN network, where the unit has only one network layer. It has four network layers inside, interacting in a very special way. The characteristic of LSTM is that valve nodes of each layer are added outside the RNN structure. There are three types of valves: forget gate, input gate and output gate. These valves can be opened or closed to determine whether the memory state of the model network (the previous state of the network) reaches the threshold when output at this layer, so as to be added to the calculation of the current layer. Figure 2 As shown in the figure, the valve node uses the sigmoid function to calculate the memory state of the network as input; if the output reaches the threshold, the valve output is multiplied by the calculation result of the current layer as the input of the next layer; if the threshold is not reached, the output result is forgotten. The weights of each layer including the valve node will be updated during each model back-propagation training process. The more specific LSTM judgment calculation process is as follows:

[0065] The key to LSTM is the cell state. LSTM has the ability to remove or add information to the cell state through carefully designed structures called "gates". Gates are a way to selectively let information pass through. They consist of a sigmoid neural network layer and a pointwise multiplication operation. The sigmoid layer outputs a value between 0 and 1, describing how much of each part can pass through. 0 means "no amount is allowed to pass through", and 1 means "allow any amount to pass through". LSTM has three gates to protect and control the cell state.

[0066] The basic steps of LSTM neural network are as follows:

[0067] (1) Deciding to discard information

[0068] The first step in the LSTM network is to decide what information to discard from the cell state. This decision is made through a gate called a "forget gate". This gate reads ht-1 and xt and outputs a value between 0 and 1 for each number in the cell state Ct-1. 1 means "totally keep" and 0 means "totally discard".

[0069] f t =σ(W f ×[h t-1 ,x t ]+b f );

[0070] (2) Determine the updated information

[0071] The next step is to decide what new information to store in the cell state. There are two parts to this. First, a sigmoid layer called the “input gate” decides what value we are going to update. Then, a tanh layer creates a new candidate value vector Add to status.

[0072] i t =σ(W i ×[h t-1 ,x t ]+b i );

[0073]

[0074] (3) Update cell status

[0075] Update the old cell state, Ct-1 is updated to Ct, and the state is updated based on the information calculated in the previous step. t Multiply, discard the information we are sure we need to discard, and then add is the new candidate value.

[0076]

[0077] (4) Output information

[0078] We first run a sigmoid layer to determine which part of the cell state will be output. Next, the cell state is processed through tanh (to get a value between -1 and 1) and multiplied with the output of the sigmoid gate. Finally, the network will output only the part of the information we determined to output based on the cell state.

[0079] o t =σ(W o ×[h t-1 ,x t ]+b o );

[0080] h t =o t ×tanh(C t );

[0081] In summary, the LSTM neural network is an improved recurrent neural network (RNN). It solves the problem of "gradient disappearance" in RNN model training, can learn long-term and short-term dependency information of time series, and is currently the most successful RNN architecture.

[0082] The K trained energy consumption behavior prediction models are used to predict the energy consumption behavior of any user in the building in the future.

[0083] This embodiment performs cluster analysis on the energy consumption behavior of each user in the building based on the historical daily compliance curve of each user, and introduces the silhouette coefficient and DBI index to determine the optimal number of clusters K to obtain the best clustering effect; a time series prediction model based on energy consumption behavior division is constructed to achieve short-term load prediction for specific users in the building.

[0084] As a preferred implementation mode of this embodiment, when collecting the user's daily historical energy consumption data, the historical energy consumption data is normalized, the historical energy consumption data to be processed is restricted within a certain range after processing, the dimensional expression is converted into a dimensionless expression, and the daily load curve is obtained.

[0085] As a preferred implementation of this embodiment, the step of determining the optimal number of clusters K for clustering by calculating the silhouette coefficient and the DBI index is specifically as follows:

[0086] The silhouette coefficient method combines cohesion and separation, which can be used to judge the quality of clustering. Its value ranges from -1 to 1. The larger the value, the better the clustering effect. Based on this principle, you can try to use multiple cluster parameters, repeatedly calculate the silhouette coefficient under each cluster number condition, and select the K value that corresponds to the larger value of the silhouette coefficient.

[0087] For a clustering task, we hope that the clusters obtained are as close as possible within the clusters and as far apart as possible. The silhouette coefficient is an evaluation index of the density and dispersion of the clusters. The silhouette value of the i-th sample is defined as:

[0088]

[0089] Among them, a is the average distance between the i-th point and other points in the same class; b is a vector whose elements are the average distances between the i-th point and points in different classes; the value range of the contour value S(i) is [-1,1]. The larger the value of S(i), the more reasonable the classification of the i-th sample. When S(i)<0, it means that the classification of the i-th sample is unreasonable, and there is a more reasonable classification than the current classification; the mean value of the contour coefficients of all sample points is the contour coefficient of the clustering result based on the current K value;

[0090] To facilitate understanding, this embodiment provides an example of calculating the silhouette coefficient; the following sample data does not represent actual data of the present invention, and is only used as an example to supplement the calculation method of the silhouette coefficient.

[0091] In order to simplify the calculation, the sample capacity is taken as 5, and calculated according to K=2. The coordinates of each sample point are shown below.

[0092] Sample 1 (4, 35);

[0093] Sample 2 (8, 36);

[0094] Sample 3 (20, 24);

[0095] Sample 4 (25, 26);

[0096] Sample 5 (30, 25);

[0097] The K-Means clustering results show that samples 1 and 2 belong to one class (class A), and samples 3, 4, and 5 belong to one class (class B). The cluster center of class A is (6, 35.5), and the cluster center of class B is (25, 25).

[0098] According to the formula of silhouette coefficient, the silhouette coefficient of sample 1 can be calculated as follows:

[0099]

[0100]

[0101]

[0102]

[0103]

[0104]

[0105] The silhouette coefficient for sample 3 is calculated as follows:

[0106]

[0107]

[0108]

[0109]

[0110]

[0111]

[0112]

[0113] By analogy, we can get:

[0114] S(2) = 0.8;

[0115] S(4) = 0.76;

[0116] S(5) = 0.71;

[0117] The mean of the silhouette coefficients S(i) of all samples is called the silhouette coefficient of the clustering result. Therefore, when K = 2, the silhouette coefficient of the clustering result is

[0118] The DBI indicator was proposed by David L. Davis and Donald Bouldin and is an evaluation metric for clustering algorithms.

[0119] The DBI algorithm defines a dispersion value Si: it represents the degree of dispersion of the measured data points in the i-th class.

[0120]

[0121] Xj represents the jth data point in the ith class; Ai represents the center of the ith class; Ti represents the number of data points in the ith class; when q is 1, it represents the mean of the distance from each point to the center; when q is 2, it represents the standard deviation of the distance from each point to the center. They can all be used to measure the degree of dispersion.

[0122] DBI defines a distance value Mij: it represents the distance between the i-th category and the j-th category, and the calculation formula is:

[0123]

[0124] aki represents the value of the Kth attribute of the center point of the i-th class, and Mij is the distance between the i-th class and the j-th class center.

[0125] DBI defines a similarity value Rij, which is calculated as follows:

[0126]

[0127] Measure the similarity between the i-th class and the j-th class. Through the calculation of the above formula, we select the maximum value Ri=max(Rij) from Rij, which is the maximum similarity value between the i-th class and other classes. Finally, calculate the mean of these maximum similarities for each class to get the DBI index:

[0128]

[0129] Among them, Ri is the maximum similarity between the i-th class and other classes after clustering according to the current K value: The DBI index is the ratio of the sum of the distance within the class to the distance outside the class to optimize the selection of the K value and avoid the local optimal situation caused by only calculating the criterion function in the K-Means clustering algorithm. In summary, the smaller the DBI index, the better the clustering effect.

[0130] The K value is repeatedly selected, and the silhouette coefficient and the DBI index are combined to obtain a K value that maximizes the silhouette coefficient and minimizes the DBI index, which is determined as the optimal number of clusters K.

[0131] As a preferred implementation of this embodiment, the step of adding user energy usage behavior labels to the data in each clustering result is specifically as follows:

[0132] The curves of the K cluster centers are the characteristic curves in each type of historical daily load curve. The energy consumption behavior type of the characteristic curve is determined by analyzing the peak size, peak frequency and peak position of the characteristic curve.

[0133] According to the energy consumption behavior type of each characteristic curve, the corresponding user energy consumption behavior label is added to all historical daily load curves in the corresponding clustering results.

[0134] See also Figure 5 and Figure 6 As a preferred implementation of this embodiment, the energy consumption behavior of a user in a building is predicted, usually for short-term load prediction. It is necessary to predict the daily energy consumption curve of a future day on the same day. The prediction frequency is one load prediction value every 15 minutes, that is, predict 96 load nodes on a certain day. The steps of training the prediction model are specifically as follows:

[0135] Construct LSTM neural network based on MATLAB simulation platform;

[0136] According to the clustering results, the historical daily load curves with the same user energy consumption behavior labels are selected as the training sample set and used as the input for LSTM neural network training;

[0137] Reconstruct the historical daily load curve into a row vector according to the time series, the first 90% of the sequence is used for training, and the last 10% is used for testing;

[0138] Set the time series of the LSTM neural network, generally alternating a time step, specifying the training options, and using the observed value of the previous moment to predict the predicted value of the next moment;

[0139] The root mean square error (RMSE) between the predicted value and the true value is calculated to judge the network performance. When the network performance meets the expected accuracy, the output is the energy consumption behavior prediction model corresponding to the user energy consumption behavior label type;

[0140] Repeat the above steps to obtain K energy consumption behavior prediction models.

[0141] This embodiment uses the user energy behavior prediction model algorithm to calculate the electricity usage habits and electricity usage behavior characteristics of building users. It can outline the health of equipment according to usage, diagnose and analyze energy waste caused by equipment aging or failure, and analyze the key factors of energy waste caused by energy usage behavior. It is conducive to optimizing the scheduling of future load operation time, reducing the total power consumption of users, or predicting low-carbon emission priority electricity usage scenario models based on electricity usage behavior characteristics, providing a reference for building managers. Finally, big data is used to deduce a set of energy consumption configuration plans with the best economic benefits, which is committed to making energy-consuming equipment approach the efficiency limit, standardizing the use of building electrical equipment from a professional perspective, achieving the goals of highest efficiency and lowest cost, improving energy utilization, and achieving low-carbon energy-saving effects.

[0142] The user-side data of the building system is huge due to the granularity of the data, the number of user groups, and the diverse individual needs. The heterogeneous characteristics of user data types will also cause the amount of data to grow exponentially. The highly compounded and expansive energy data contains huge information value. Extracting valuable information from energy big data and providing users with optional energy strategies are important means for major integrated energy service providers and management agencies to compete in the market. Information mining and extraction of user-side energy data will play an extremely important role in the process of energy marketization.

[0143] Embodiment 2:

[0144] This embodiment provides a smart building user energy consumption behavior prediction device based on an LSTM neural network, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the prediction method described in any embodiment of the present invention is implemented.

[0145] Embodiment three:

[0146] This embodiment provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the prediction method as described in any embodiment of the present invention.

[0147] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for predicting energy consumption behavior of smart building users based on LSTM neural network, characterized in that: The following steps are involved: Collect historical energy consumption data; collect daily historical energy consumption data of each user in the building and obtain the historical daily load curve of each user; Energy consumption behavior classification: K-Means clustering algorithm is used to cluster the historical daily load curves of all users. The optimal number of clusters K is determined by calculating the silhouette coefficient and DBI index. K clustering results are obtained, and user energy consumption behavior labels are added to the data in each clustering result. Training prediction models: Based on the clustering results, K LSTM neural networks are constructed, and the historical daily load curves of users in each clustering result are used as training samples to train each LSTM neural network, and K energy consumption behavior prediction models are obtained; Use the trained K energy consumption behavior prediction models to predict the energy consumption behavior of any user in the building in the future; The steps of determining the optimal number of clusters K for clustering by calculating the silhouette coefficient and the DBI index are as follows: Randomly select a K value and divide n samples into K categories; For the i-th sample, its contour value is defined as: ; Among them, a is the average distance between the i-th point and other points in the same class; b is a vector whose elements are the average distances between the i-th point and points in different classes; The mean value of the silhouette coefficients of all sample points is calculated as the silhouette coefficient of the clustering result based on the current K value; Calculate the DBI index: ; Among them, Ri is the maximum similarity between the i-th class and other classes after clustering according to the current K value: is the mean of the maximum similarity of each class; Repeatedly select the K value, combine the silhouette coefficient and the DBI index, obtain a K value that maximizes the silhouette coefficient and minimizes the DBI index, and determine it as the optimal number of clusters K; The step of adding user energy usage behavior labels to the data in each clustering result is specifically as follows: The daily load curves of the K cluster centers are used as the characteristic curves of each clustering result; the energy consumption behavior type of the characteristic curve is determined according to the peak size, peak frequency and peak position of the characteristic curve; According to the energy consumption behavior type of each characteristic curve, the corresponding user energy consumption behavior label is added to all historical daily load curves in the corresponding clustering results.

2. According to claim 1, a method for predicting energy consumption behavior of smart building users based on LSTM neural network is characterized in that: When collecting the user's daily historical energy consumption data, the historical energy consumption data is normalized to obtain the daily load curve.

3. According to claim 1, a method for predicting energy consumption behavior of smart building users based on LSTM neural network is characterized in that: The steps of training the prediction model are specifically as follows: Build LSTM neural network; According to the clustering results, the historical daily load curves with the same user energy consumption behavior labels are selected as the training sample set and used as the input for LSTM neural network training; Reconstruct the historical daily load curve into a row vector according to the time series, the first 90% of the sequence is used for training, and the last 10% is used for testing; Set up the time series of the LSTM neural network, specify the training options, and use the observed values ​​at the previous moment to predict the predicted values ​​at the next moment; The root mean square error (RMSE) between the predicted value and the true value is calculated to judge the network performance. When the network performance meets the expected accuracy, the output is the energy consumption behavior prediction model corresponding to the user energy consumption behavior label type; Repeat the above steps to obtain K energy consumption behavior prediction models.

4. A device for predicting energy consumption behavior of smart building users based on LSTM neural network, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the prediction method according to any one of claims 1 to 3 is implemented.

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

Citation Information

Patent Citations

  • Intelligent energy consumption service cooperative control system and method

    CN111783846A

  • Electric bus charging load prediction method based on spectral clustering and LSTM neural network

    CN112330028A

  • Short-term power load prediction method based on user load mode classification

    CN112561156A