Adjustable electrical load characteristic analysis and prediction method and system based on machine learning

Through machine learning-based clustering analysis and LSTM-Transformer hybrid architecture, the problem of inaccurate power load prediction in the prior art is solved, and higher prediction accuracy and grid stability are achieved.

CN119886542AInactive Publication Date: 2025-04-25STATE GRID SHANDONG ELECTRIC POWER CO

Patent Information

Application Number
CN202411934181.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict and adjust the power load, resulting in unstable operation of the power grid and difficult to cope with load fluctuations.

Method used

Using a machine learning-based approach, combining clustering analysis and LSTM-Transformer hybrid architecture, time series characteristics and global context information of load data are extracted to predict the adjustable amount of load.

Benefits of technology

The accuracy of load prediction is improved, the average absolute error and root mean square error are significantly reduced, supporting the stability of power grid operation and the improvement of energy utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886542A_ABST
    Figure CN119886542A_ABST
Patent Text Reader

Abstract

The invention discloses an adjustable electrical load characteristic analysis and prediction method and system based on machine learning, and relates to the technical field of load prediction. Comprising the steps of obtaining historical electricity utilization information of a user, and constructing an input data set; based on the input data set, comparing the load curves by adopting a density-based spatial clustering algorithm, and taking the deviation between the load curve without demand response and the load curve with demand response as an adjustable variable; an adjustable load prediction model based on the LSTM-Transform hybrid architecture is established, and a trained adjustable load prediction model is obtained after a plurality of times of training; and processing a time sequence prediction task based on the trained adjustable load prediction model. According to the method, accurate load prediction is realized, and compared with a conventional LSTM algorithm, the average absolute error is reduced from 8.344% to 1.926%, and the root mean square error is reduced from 10.258% to 3.214%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of load forecasting, and in particular to a method and system for analyzing and predicting adjustable power load characteristics based on machine learning. Background Art

[0002] Modern power grids include a variety of power sources such as traditional power generation, renewable energy, and power loads such as households and industries. Their dynamic characteristics and complex load patterns make prediction and regulation complex and important. At the same time, the massive access to renewable energy such as wind and solar power has increased the grid's demand for peak-shaving resources, while the rapid growth of air-conditioning loads in summer has increased the grid's supply pressure. In order to cope with load fluctuations, the grid encourages users to adjust their electricity consumption behavior to ensure the safety of grid operation. The machine learning techniques currently used to analyze and predict adjustable electricity loads include the following: Time series analysis: Use LSTM (Long Short-Term Memory Network) and GRU (Gated Recurrent Unit) to model load data to capture temporal dependencies and seasonal changes; Regression models: Apply random forest regression, support vector regression (SVR) and XGBoost to predict load demand, especially when dealing with complex nonlinear relationships; Deep learning: Use convolutional neural networks (CNN) and deep neural networks (DNN) to extract features from load data for more accurate load forecasting; Ensemble learning: Combine multiple models (such as stacked models) to improve prediction accuracy and reduce model bias and variance; Reinforcement learning: Use reinforcement learning algorithms to optimize load scheduling strategies to maximize energy efficiency while ensuring grid stability.

[0003] Load-side demand response is an effective means to deal with the current sharp increase in grid supply pressure and insufficient consumption of new energy. However, when formulating demand-side dispatch strategies, it is necessary to predict load data and load adjustable capacity in advance, and then formulate response strategies through optimization algorithms. The accuracy of load forecast data and adjustable capacity assessment data determines the feasibility of the strategy.

[0004] Therefore, it is an urgent problem for technical personnel in this field to propose an adjustable power load characteristic analysis and prediction method and system based on machine learning to solve the difficulties existing in the prior art. Summary of the invention

[0005] In view of this, the present invention provides an adjustable electricity load characteristic analysis and prediction method and system based on machine learning. Through the adjustable electricity load characteristic analysis and prediction method based on machine learning, a clustering method considering load time series characteristics and an LSTM-Transformer hybrid architecture are utilized to provide a reliable data foundation for demand response strategy formulation and support the effective formulation of strategies.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] A method for analyzing and predicting adjustable power load characteristics based on machine learning, comprising the following steps:

[0008] S1. Obtain data: Obtain historical electricity usage information of users and construct input data sets;

[0009] S2. Obtaining adjustable quantities: Based on the input data set, a density-based spatial clustering algorithm is used to compare the load curves, and a cluster formed by a load curve without demand response and a load curve with demand response is obtained, and the deviation between the load curve without demand response and the load curve with demand response is used as the adjustable quantity;

[0010] S3. Model establishment: Establish an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture. After several trainings, a trained adjustable load forecasting model is obtained.

[0011] S4. Task processing: Based on the trained adjustable load forecasting model, the time series forecasting task is processed.

[0012] Optionally, the user's historical electricity consumption information is obtained in S1, and the specific content of constructing the input data set is:

[0013] Electricity consumption information includes agricultural electricity consumption information and industrial production electricity consumption information. Agricultural electricity consumption information divides electricity consumption data time periods according to the characteristics of slack farming and busy farming. Industrial production electricity consumption information divides electricity consumption data time periods based on seasonality and working day / non-working day characteristics, thereby constructing the input data set.

[0014] Optionally, in S2, based on the input data set, a density-based spatial clustering algorithm is used to compare the load curves to obtain a cluster formed by a load curve without demand response and a load curve with demand response, and the specific content of taking the deviation between the load curve without demand response and the load curve with demand response as the adjustable quantity is:

[0015] First, the segmented electricity consumption data of the users to be predicted is transformed into the interval [0,1] by the maximum and minimum normalization method. Then, DBSCAN clustering is used to obtain the deviation between the load curve without demand response and the load curve with demand response, so as to quantify the adjustable amount. The specific content is as follows:

[0016] S21. arbitrarily select a data object point p from the input data set;

[0017] S22. If for the parameters Eps and MinPts, the selected data object point p is a core point, then find all data object points that are density-reachable from p to form a cluster;

[0018] S23. If the selected data object point p is an edge point, select another data object point;

[0019] S24. Repeat S22 and S23 until all data object points are processed.

[0020] Optionally, the specific contents of establishing an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture in S3 are:

[0021] The adjustable load forecasting model first extracts the time series pattern through the LSTM layer, then understands the global context through the Transformer layer, uses the LSTM layer as the decoding layer, and uses the multi-scale time series method and the Transformer layer as the encoding layer. After linear transformation and the introduction of the softmax function, the adjustable load forecasting model is established, which satisfies the following relationship:

[0022]

[0023] In the formula, y d is the predicted value at step d, is the weight of the predicted output in step d, b d is the bias for predicting the output at step d.

[0024] Optionally, the LSTM layer uses a multi-layer LSTM structure to capture long-term dependencies in time series data, including memory units, input gates, forget gates, output gates, and dropout mechanisms; the LSTM layer is processed by three fully connected layers with sigmoid activation functions to calculate the values ​​of the input gate, forget gate, and output gate; assuming there are h hidden units, the batch size is n, and the number of inputs is d, then the input is X t ∈R n×d , the hidden state of the previous time step is H t-1 ∈R n×h , accordingly, the gate at time step t is defined as follows: the input gate is I t ∈R n×h , the forget gate is F t ∈R n×h , the output gate is O t ∈R n×h , calculated as follows:

[0025] I t =σ(X t W xi +H t-1 W hi +b i )

[0026] F t =σ(X t W xf+H t-1 W hf +b f )

[0027] O t =σ(X t W xo +H t-1 W ho +b o )

[0028] Among them, W xi , W xf , W xo ∈R d×h and W hi , W hf , W ho ∈R h×h is the weight parameter, b i 、b f 、b o ∈R 1×h is the bias parameter;

[0029] Memory Unit C t , using the tanh function as the activation function, the value range of the function is (-1,1), and the equation derived at time step t is:

[0030] C t =tanh(X t W xc +H t-1 W hc +b c )

[0031] Among them, W xc ∈R d×h and W hc ∈R h×h is the weight parameter, b c ∈R 1×h is the bias parameter;

[0032] Finally, calculate the hidden state H t ∈R n×h , which is the memory unit C t The gated version of the tanh function, H t The value of is always in the interval (-1,1):

[0033] H t =O t ⊙tanh(C t )

[0034] As long as the output gate is close to 1, all memory information can be passed to the prediction part, and for an output gate close to 0, all information in the memory unit is retained without updating the hidden state.

[0035] Optionally, the Transformer layer uses a self-attention mechanism to understand the global context information in the sequence data, which consists of multiple self-attention heads; the QKV model of the Transformer satisfies the following relationship:

[0036]

[0037] In the formula, I SA To utilize the output c of multi-scale convolution m The n×m matrix is ​​composed of m, m is the total number of modal components, n is the total number of time convolution kernels, is the weight matrix of the QKV model, the size of the weight matrix is ​​n×n, is the bias matrix of the QKV model. The size of the bias matrix is ​​n×m, and * represents Q, K, and V.

[0038] Optionally, after several trainings in S3, the specific content of the trained adjustable load forecasting model is:

[0039] S31. Composing a data set of the LSTM layer according to the adjustable amount with the time characteristics and spatial characteristics of the adjustable load power sequence, and dividing the data set into a training set and a test set;

[0040] S32. Input the training set into the adjustable load forecasting model and train the adjustable load forecasting model; update the network weight parameters through the loss function, and after several trainings, obtain the trained adjustable load forecasting model.

[0041] Optionally, the mean absolute error and root mean square error are used to evaluate the performance of the adjustable load forecasting model as follows:

[0042] The mean absolute error MAE satisfies the following relationship:

[0043]

[0044] The root mean square error RMSE satisfies the following relationship:

[0045]

[0046] In the formula, y d is the predicted value at step d, is the true value of the dth step, d = 1, 2, ..., D, D is the number of prediction steps.

[0047] Optionally, the mean absolute error (MAE) is used to calculate the first lift P of the prediction model. MAE , satisfying the following relationship:

[0048]

[0049] In the formula, Model1 MAE is the mean absolute error MAE of the single-step adjustable load forecasting model or the multi-step adjustable load forecasting model; Model2 MAE is the mean absolute error MAE of the single-step adjustable load forecasting model;

[0050] The second lift P of the prediction model is calculated using the root mean square error RMSE RMSE , satisfying the following relationship:

[0051]

[0052] In the formula, Model1 RMSE is the root mean square error RMSE of the single-step adjustable load forecasting model or the multi-step adjustable load forecasting model; Model2 RMSE is the root mean square error RMSE of the single-step adjustable load forecasting model;

[0053] The mean absolute error (MAE) is used to calculate the cumulative mean absolute error from prediction step a to prediction step b. MAE,ab , satisfying the following relationship:

[0054] Adde MAE,ab =MAE a -MAE b a>b

[0055] In the formula, MAE a is the mean absolute error MAE when the prediction step length is a; MAE b is the mean absolute error MAE when the prediction step length is b;

[0056] The root mean square error RMSE is used to calculate the cumulative root mean square error Adde from the prediction step length a to the prediction step length b. RMSE,ab , satisfying the following relationship:

[0057] Adde RMSE,ab =RMSE a -RMSE b a>b

[0058] In the formula, RMSE a is the root mean square error RMSE when the prediction step length is a; RMSE b is the root mean square error RMSE when the prediction step size is b.

[0059] A system for analyzing and predicting adjustable power load characteristics based on machine learning, applying any of the above-mentioned methods for analyzing and predicting adjustable power load characteristics based on machine learning, comprising: a data acquisition module, an adjustable quantity acquisition module, a model building module, and a task processing module;

[0060] A data acquisition module is connected to the input end of the adjustable quantity acquisition module and is used to acquire the user's historical electricity consumption information and construct an input data set;

[0061] The adjustable quantity acquisition module is connected to the input end of the model establishment module and is used to compare the load curve based on the input data set by using a density-based spatial clustering algorithm to obtain a cluster formed by the load curve without demand response and the load curve with demand response, and use the deviation between the load curve without demand response and the load curve with demand response as the adjustable quantity;

[0062] The model building module is connected to the input end of the task processing module and is used to build an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture. After several trainings, a trained adjustable load forecasting model is obtained.

[0063] The task processing module is used to process the time series forecasting tasks based on the trained adjustable load forecasting model.

[0064] It can be seen from the above technical solution that compared with the prior art, the present invention provides an adjustable power load characteristic analysis and prediction method and system based on machine learning, which has the following beneficial effects: accurate prediction of load is achieved. Compared with the conventional LSTM algorithm, the mean absolute error is reduced from 8.344% to 1.926%, and the root mean square error is reduced from 10.258% to 3.214%. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0066] Figure 1 A flow chart of an adjustable power load characteristic analysis and prediction method based on machine learning provided by the present invention;

[0067] Figure 2 The seasonal electricity load curve of the agricultural planting industry provided by the present invention is a comparison between the slack season and the busy season;

[0068] Figure 3A comparison of seasonal load variation curves of the industrial metal forging industry from 2015 to 2016 provided by the present invention;

[0069] Figure 4 The annual load curve of a certain enterprise in the steel mining and selection related industry provided by the present invention;

[0070] Figure 5 The DBSCAN cluster analysis of the interruption response of the steel mining and selection related industries provided by the present invention;

[0071] Figure 6 The maximum interruption response capacity curve of DBSCAN clustering for steel mining and related industries provided by the present invention;

[0072] Figure 7 The Ward cluster analysis results of the steel mining and dressing related industries provided by the present invention;

[0073] Figure 8 The Ward clustering maximum interruption response capacity curve for the steel mining and dressing related industries provided by the present invention;

[0074] Fig. 9 The GMM cluster analysis of the interruption response of the steel mining and selection related industries provided by the present invention;

[0075] Fig.10 The maximum interruption response capacity curve of the GMM clustering of the steel mining and dressing related industries provided by the present invention;

[0076] Fig.11 A schematic diagram of the structure of an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture provided by the present invention;

[0077] Fig.12 A predicted power curve for an art school provided by the present invention;

[0078] Fig.13 The CDC load forecast curve provided by the present invention;

[0079] Fig.14 The food enterprise load prediction curve provided by the present invention

[0080] Fig.15 The technology company provided by the present invention predicts the load curve. DETAILED DESCRIPTION

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

[0082] Reference Figure 1 As shown, the present invention discloses a method for analyzing and predicting adjustable power load characteristics based on machine learning, comprising the following steps:

[0083] S1. Obtain data: Obtain historical electricity usage information of users and construct input data sets;

[0084] S2. Obtaining adjustable quantities: Based on the input data set, a density-based spatial clustering algorithm is used to compare the load curves, and a cluster formed by a load curve without demand response and a load curve with demand response is obtained, and the deviation between the load curve without demand response and the load curve with demand response is used as the adjustable quantity;

[0085] S3. Model establishment: Establish an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture. After several trainings, a trained adjustable load forecasting model is obtained.

[0086] S4. Task processing: Based on the trained adjustable load forecasting model, the time series forecasting task is processed.

[0087] Furthermore, S1 obtains the user's historical electricity consumption information, and the specific content of constructing the input data set is:

[0088] Electricity consumption information includes agricultural electricity consumption information and industrial production electricity consumption information. Agricultural electricity consumption information divides electricity consumption data time periods according to the characteristics of slack farming and busy farming. Industrial production electricity consumption information divides electricity consumption data time periods based on seasonality and working day / non-working day characteristics, thereby constructing the input data set.

[0089] Specifically, the agricultural load divides the electricity consumption data into time periods based on the characteristics of slack season and busy season, such as Figure 2 As shown in Figure 2, industrial production divides the data period based on seasonality and working day / non-working day characteristics, and divides it into different data sets, such as the load changes in the cold and hot seasons of the metal forging industry. Figure 3 shown.

[0090] Furthermore, in S2, based on the input data set, a density-based spatial clustering algorithm is used to compare the load curves, and a cluster formed by the load curve without demand response and the load curve with demand response is obtained. The specific content of taking the deviation between the load curve without demand response and the load curve with demand response as the adjustable quantity is:

[0091] First, the segmented electricity consumption data of the users to be predicted is transformed into the interval [0,1] by the maximum and minimum normalization method. Then, DBSCAN clustering is used to obtain the deviation between the load curve without demand response and the load curve with demand response, so as to quantify the adjustable amount. The specific content is as follows:

[0092] S21. arbitrarily select a data object point p from the input data set;

[0093] S22. If for the parameters Eps and MinPts, the selected data object point p is a core point, then find all data object points that are density-reachable from p to form a cluster;

[0094] S23. If the selected data object point p is an edge point, select another data object point;

[0095] S24. Repeat S22 and S23 until all data object points are processed.

[0096] Specifically, Figure 4 The annual load curve of a company in the steel mining industry is given; the DBSCAN cluster analysis is used to analyze the interruption response (i.e., no demand response) curve. The clustering results are as follows: Figure 5 As shown; therefore, the maximum interruption response capacity curve for each period is as follows Figure 6 Compared with Ward cluster analysis, the clustering results are shown in Figure 7 As shown in the figure, class 1 is the normal power load, and class 2 is the power load with interruption response; the maximum interruption response capacity curve is shown in Figure 8 As shown) and GMM clustering method (clustering results as shown Fig. 9 As shown, the maximum interrupt response capacity curve is as follows Fig.10 As shown in the figure, it can be seen that DBSCAN can better distinguish normal loads and loads with interrupt response than Ward algorithm and GMM algorithm.

[0097] Further, such as Fig.11 As shown in the figure, the specific contents of establishing an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture in S3 are as follows:

[0098] The adjustable load forecasting model first extracts the time series pattern through the LSTM layer, then understands the global context through the Transformer layer, uses the LSTM layer as the decoding layer, and uses the multi-scale time series method and the Transformer layer as the encoding layer. After linear transformation and the introduction of the softmax function, the adjustable load forecasting model is established, which satisfies the following relationship:

[0099]

[0100] In the formula, y d is the predicted value at step d, is the weight of the predicted output in step d, b d is the bias for predicting the output at step d.

[0101] Furthermore, the LSTM layer adopts a multi-layer LSTM structure to capture the long-term dependencies in time series data, including memory units, input gates, forget gates, output gates, and dropout mechanisms; the LSTM layer is processed by three fully connected layers with sigmoid activation functions to calculate the values ​​of the input gate, forget gate, and output gate; assuming there are h hidden units, the batch size is n, and the number of inputs is d, then the input is X t ∈R n×d , the hidden state of the previous time step is H t-1 ∈R n×h , accordingly, the gate at time step t is defined as follows: the input gate is I t ∈R n×h , the forget gate is F t ∈R n×h , the output gate is O t ∈R n×h , calculated as follows:

[0102] I t =σ(X t W xi +H t-1 W hi +n i )

[0103] F t =σ(X t W xf +H t-1 W hf +b f )

[0104] O t =σ(X t W xo +H t-1 W ho +b o )

[0105] Among them, W xi , W xf , W xo ∈R d×h and W hi , W hf , W ho ∈R h×h is the weight parameter, b i 、b f 、b o ∈R1×h is the bias parameter;

[0106] Memory Unit C t , using the tanh function as the activation function, the value range of the function is (-1,1), and the equation derived at time step t is:

[0107] C t =tanh(X t W xc +H t-1 W hc +b c )

[0108] Among them, W xc ∈R d×h and W hc ∈R h×h is the weight parameter, b c ∈R 1×h is the bias parameter;

[0109] Finally, calculate the hidden state H t ∈R n×h , which is the memory unit C t The gated version of the tanh function, H t The value of is always in the interval (-1,1):

[0110] H t =O t ⊙tanh(C t )

[0111] As long as the output gate is close to 1, all memory information can be passed to the prediction part, and for an output gate close to 0, all information in the memory unit is retained without updating the hidden state.

[0112] Furthermore, the Transformer layer uses a self-attention mechanism to understand the global context information in the sequence data, which consists of multiple self-attention heads. The QKV model of the Transformer satisfies the following relationship:

[0113]

[0114] In the formula, I SA To utilize the output c of multi-scale convolution m The n×m matrix is ​​composed of m, m is the total number of modal components, n is the total number of time convolution kernels, is the weight matrix of the QKV model, the size of the weight matrix is ​​n×n, is the bias matrix of the QKV model. The size of the bias matrix is ​​n×m, and * represents Q, K, and V.

[0115] Furthermore, after several trainings in S3, the specific content of the trained adjustable load forecasting model is:

[0116] S31. Composing a data set of the LSTM layer according to the adjustable amount with the time characteristics and spatial characteristics of the adjustable load power sequence, and dividing the data set into a training set and a test set;

[0117] S32. Input the training set into the adjustable load forecasting model and train the adjustable load forecasting model; update the network weight parameters through the loss function, and after several trainings, obtain the trained adjustable load forecasting model.

[0118] Furthermore, the mean absolute error and root mean square error are used to evaluate the performance of the adjustable load forecasting model as follows:

[0119] The mean absolute error MAE satisfies the following relationship:

[0120]

[0121] The root mean square error RMSE satisfies the following relationship:

[0122]

[0123] In the formula, y d is the predicted value at step d, is the true value of the dth step, d = 1, 2, ..., D, D is the number of prediction steps.

[0124] Furthermore, the mean absolute error (MAE) is used to calculate the first improvement P of the prediction model. MAE , satisfying the following relationship:

[0125]

[0126] In the formula, Model1 MAE is the mean absolute error MAE of the single-step adjustable load forecasting model or the multi-step adjustable load forecasting model; Model2 MAE is the mean absolute error MAE of the single-step adjustable load forecasting model;

[0127] The second lift P of the prediction model is calculated using the root mean square error RMSE RMSE , satisfying the following relationship:

[0128]

[0129] In the formula, Model1 RMSE is the root mean square error RMSE of the single-step adjustable load forecasting model or the multi-step adjustable load forecasting model; Model2 RMSEis the root mean square error RMSE of the single-step adjustable load forecasting model;

[0130] The mean absolute error (MAE) is used to calculate the cumulative mean absolute error from prediction step a to prediction step b. MAE,ab , satisfying the following relationship:

[0131] Adde MAE,ab =MAE a -MAE b a>b

[0132] In the formula, MAE a is the mean absolute error MAE when the prediction step length is a; MAE b is the mean absolute error MAE when the prediction step length is b;

[0133] The root mean square error RMSE is used to calculate the cumulative root mean square error Adde from the prediction step length a to the prediction step length b. RMSE,ab , satisfying the following relationship:

[0134] Adde RMSE,ab =RMSE a -RMSE b a>b

[0135] In the formula, RMSE a is the root mean square error RMSE when the prediction step length is a; RMSE b is the root mean square error RMSE when the prediction step size is b.

[0136] In a specific embodiment, in order to verify the effectiveness of the present invention, the load data of an art school for 24 hours a day in a year was selected as the research object for analysis, and then the adjustable load of the area was predicted; among them, the first 80% of the sample data was used as a training set, and the last 20% was used as a test set.

[0137] In order to verify the prediction effect of the proposed prediction method, an adjustable load prediction model of LSTM and LSTM-Transformer hybrid architecture is set for comparative experimental analysis.

[0138] The performance of the two models under the evaluation indicators MAE and RMSE is shown in Table 1. As can be seen from Table 1, compared with the LSTM model, the adjustable load forecasting model with LSTM-Transformer hybrid architecture has a significant improvement in performance. Fig.12It can be found that the prediction curve of an art school obtained by the adjustable load prediction model of the LSTM-Transformer hybrid architecture is closer to the fitting curve than the LSTM model prediction curve. The prediction accuracy of the adjustable load prediction model of the LSTM-Transformer hybrid architecture is higher. It can also be seen that the school's electricity consumption behavior peaks between 12:00 and 16:00. This is due to the high temperature at noon in summer, which makes the regional load peak on peak. The air-conditioning load is constantly changing with the changes in indoor and outdoor temperatures, showing a fluctuating curve. Therefore, by predicting the school's electricity consumption through effective prediction methods and taking effective ways to adjust the load curve, the effect of peak shaving and valley filling can be achieved, and the load curve can be smoothed.

[0139] Table 1 Comparison of LSTM and LSTM-Transformer hybrid architecture results

[0140]

[0141] Next, in order to further verify the effectiveness of the model, we selected load data from different industries to verify the model, including disease control centers, food companies, and biotechnology companies. Using the adjustable load forecasting model of the LSTM-Transformer hybrid architecture, we conducted short-term forecasts on the three types of load data and predicted the load curve on June 25. The forecasts for the three types of enterprise users are as follows: Figure 13-Figure 15 As shown in the figure, it includes the real data, the predicted data and the error graph of the two. It can be seen that the adjustable load forecasting model using the LSTM-Transformer hybrid architecture can effectively forecast the load of different industries in the short term.

[0142] and Figure 1 Corresponding to the method described above, an embodiment of the present invention further provides an adjustable power load characteristic analysis and prediction system based on machine learning, including: a data acquisition module, an adjustable quantity acquisition module, a model building module, and a task processing module;

[0143] A data acquisition module is connected to the input end of the adjustable quantity acquisition module and is used to acquire the user's historical electricity consumption information and construct an input data set;

[0144] The adjustable quantity acquisition module is connected to the input end of the model establishment module and is used to compare the load curve based on the input data set by using a density-based spatial clustering algorithm to obtain a cluster formed by the load curve without demand response and the load curve with demand response, and use the deviation between the load curve without demand response and the load curve with demand response as the adjustable quantity;

[0145] The model building module is connected to the input end of the task processing module and is used to build an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture. After several trainings, a trained adjustable load forecasting model is obtained.

[0146] The task processing module is used to process the time series forecasting tasks based on the trained adjustable load forecasting model.

[0147] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0148] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for analyzing and predicting adjustable power load characteristics based on machine learning, characterized in that: The following steps are involved: S1. Obtain data: Obtain historical electricity usage information of users and construct input data sets; S2. Obtaining adjustable quantities: Based on the input data set, a density-based spatial clustering algorithm is used to compare the load curves, and a cluster formed by a load curve without demand response and a load curve with demand response is obtained, and the deviation between the load curve without demand response and the load curve with demand response is used as the adjustable quantity; S3. Model establishment: Establish an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture. After several trainings, a trained adjustable load forecasting model is obtained. S4. Task processing: Based on the trained adjustable load forecasting model, the time series forecasting task is processed.

2. The method for analyzing and predicting adjustable power load characteristics based on machine learning according to claim 1, characterized in that: In S1, the user's historical electricity consumption information is obtained, and the specific content of constructing the input data set is as follows: Electricity consumption information includes agricultural electricity consumption information and industrial production electricity consumption information. Agricultural electricity consumption information divides electricity consumption data time periods according to the characteristics of slack farming and busy farming. Industrial production electricity consumption information divides electricity consumption data time periods based on seasonality and working day / non-working day characteristics, thereby constructing the input data set.

3. The method for analyzing and predicting adjustable power load characteristics based on machine learning according to claim 1, characterized in that: In S2, based on the input data set, a density-based spatial clustering algorithm is used to compare the load curves, and a cluster is obtained between the load curve without demand response and the load curve with demand response. The deviation between the load curve without demand response and the load curve with demand response is used as the specific content of the adjustable quantity: First, the segmented electricity consumption data of the users to be predicted is transformed into the interval [0,1] by the maximum and minimum normalization method. Then, DBSCAN clustering is used to obtain the deviation between the load curve without demand response and the load curve with demand response, so as to quantify the adjustable amount. The specific content is as follows: S21. arbitrarily select a data object point p from the input data set; S22. If for the parameters Eps and MinPts, the selected data object point p is a core point, then find all data object points that are density-reachable from p to form a cluster; S23. If the selected data object point p is an edge point, select another data object point; S24. Repeat S22 and S23 until all data object points are processed.

4. The method for analyzing and predicting adjustable power load characteristics based on machine learning according to claim 1, characterized in that: The specific contents of establishing an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture in S3 are as follows: The adjustable load forecasting model first extracts the time series pattern through the LSTM layer, then understands the global context through the Transformer layer, uses the LSTM layer as the decoding layer, and uses the multi-scale time series method and the Transformer layer as the encoding layer. After linear transformation and the introduction of the softmax function, the adjustable load forecasting model is established, which satisfies the following relationship: In the formula, y d is the predicted value at step d, is the weight of the predicted output in step d, b d is the bias for predicting the output at step d.

5. The method for analyzing and predicting adjustable power load characteristics based on machine learning according to claim 4 is characterized in that: The LSTM layer uses a multi-layer LSTM structure to capture long-term dependencies in time series data. It contains memory cells, input gates, forget gates, output gates, and dropout mechanisms. The LSTM layer is processed by three fully connected layers with sigmoid activation functions to calculate the values ​​of the input gate, forget gate, and output gate. Assuming there are h hidden units, the batch size is n, and the number of inputs is d, then the input is X t ∈R n×d , the hidden state of the previous time step is H t-1 ∈R n×h , accordingly, the gate at time step t is defined as follows: the input gate is I t ∈R n×h , the forget gate is F t ∈R n×h , the output gate is O t ∈R n×h , calculated as follows: I t =σ(X t W xi +H t-1 W hi +b i ) F t =σ(X t W xf +H t-1 W hf +b f ) O t =σ(X t W xo +H t-1 W ho +b o ) Among them, W xi , W xf , W xo ∈R d×h and W hi , W hf , W ho ∈R h×h is the weight parameter, b i 、b f 、b o ∈R 1×h is the bias parameter; Memory Unit C t , using the tanh function as the activation function, the value range of the function is (-1, 1), and the equation derived at time step t is: C t =tanh(X t W xc +H t-1 W hc +b c ) Among them, W xc ∈R d×h and W hc ∈R h×h is the weight parameter, b c ∈R 1×h is the bias parameter; Finally, calculate the hidden state H t ∈R n×h , which is the memory unit C t The gated version of the tanh function, R t The value of is always in the interval (-1, 1): R t =O t ⊙tanh(C t ) As long as the output gate is close to 1, all memory information can be passed to the prediction part, and for an output gate close to 0, all information in the memory unit is retained without updating the hidden state.

6. The method for analyzing and predicting adjustable power load characteristics based on machine learning according to claim 4, characterized in that: The Transformer layer uses the self-attention mechanism to understand the global context information in the sequence data, which consists of multiple self-attention heads. The QKV model of Transformer satisfies the following relationship: In the formula, I SA To utilize the output c of multi-scale convolution m The n×m matrix is ​​composed of m, m is the total number of modal components, n is the total number of time convolution kernels, is the weight matrix of the QKV model, the size of the weight matrix is ​​n×n, is the bias matrix of the QKV model. The size of the bias matrix is ​​n×m, and * represents Q, K, and V.

7. The method for analyzing and predicting adjustable power load characteristics based on machine learning according to claim 1, characterized in that: After several trainings in S3, the specific content of the trained adjustable load forecasting model is as follows: S31. Composing a data set of the LSTM layer according to the adjustable amount with the time characteristics and spatial characteristics of the adjustable load power sequence, and dividing the data set into a training set and a test set; S32. Input the training set into the adjustable load forecasting model and train the adjustable load forecasting model; update the network weight parameters through the loss function, and after several trainings, obtain the trained adjustable load forecasting model.

8. The method for analyzing and predicting adjustable power load characteristics based on machine learning according to claim 1, characterized in that: The performance of the adjustable load forecasting model is evaluated using mean absolute error and root mean square error, as follows: The mean absolute error MAE satisfies the following relationship: The root mean square error RMSE satisfies the following relationship: Where yd is the predicted value at step d, is the true value of the dth step, d = 1, 2, ..., D, D is the number of prediction steps.

9. The method for analyzing and predicting adjustable power load characteristics based on machine learning according to claim 8, characterized in that: The first lift P of the prediction model is calculated using the mean absolute error MAE MAE , satisfying the following relationship: In the formula, Model1 MAE is the mean absolute error MAE of the single-step adjustable load forecasting model or the multi-step adjustable load forecasting model; Model2 MAE is the mean absolute error MAE of the single-step adjustable load forecasting model; The second lift P of the prediction model is calculated using the root mean square error RMSE RMSE , satisfying the following relationship: In the formula, Model1 RMSE is the root mean square error RMSE of the single-step adjustable load forecasting model or the multi-step adjustable load forecasting model; Model2 RMSE is the root mean square error RMSE of the single-step adjustable load forecasting model; The mean absolute error (MAE) is used to calculate the cumulative mean absolute error from prediction step a to prediction step b. MAE,ab , satisfying the following relationship: Adde MAE,ab =There is a - IT IS b a>b In the formula, MAE a is the mean absolute error MAE when the prediction step length is a; MAE b is the mean absolute error MAE when the prediction step length is b; The root mean square error RMSE is used to calculate the cumulative root mean square error Adde from the prediction step length a to the prediction step length b. RMSE,ab , satisfying the following relationship: Adde RMSE,ab =RMSE a -RMSE b a>b In the formula, RMSE a is the root mean square error RMSE when the prediction step length is a; RMSE b is the root mean square error RMSE when the prediction step size is b.

10. An adjustable power load characteristic analysis and prediction system based on machine learning, characterized in that: A method for analyzing and predicting adjustable power load characteristics based on machine learning according to any one of claims 1 to 9 is applied, comprising: a data acquisition module, an adjustable quantity acquisition module, a model building module, and a task processing module; A data acquisition module is connected to the input end of the adjustable quantity acquisition module and is used to acquire the user's historical electricity consumption information and construct an input data set; The adjustable quantity acquisition module is connected to the input end of the model establishment module and is used to compare the load curve based on the input data set by using a density-based spatial clustering algorithm to obtain a cluster formed by the load curve without demand response and the load curve with demand response, and use the deviation between the load curve without demand response and the load curve with demand response as the adjustable quantity; The model building module is connected to the input end of the task processing module and is used to build an adjustable load forecasting model based on the LSTM-Transformer hybrid architecture. After several trainings, a trained adjustable load forecasting model is obtained. The task processing module is used to process the time series forecasting tasks based on the trained adjustable load forecasting model.

Citation Information

Patent Citations

  • Short-term load prediction method and system based on combined model

    CN116562559A

  • User demand response potential evaluation method and device, terminal and storage medium

    CN117013548A

  • Short-term photovoltaic power generation power prediction method based on L-Transform

    CN117034055A

  • Communication load prediction method, and computer-readable storage medium

    WO2024001867A1

Cited By

  • Adjustable load prediction method and system based on time sequence self-encoding and clustering algorithm

    CN120200240A

  • Adjustable Load Forecasting Method and System Based on Temporal Autoencoding and Clustering Algorithm

    CN120200240B