Peak-valley period division method based on future predicted electrical load
By clustering historical load data and predicting future loads, combined with the CNN-BiLSTM-Transformer model, the problem of lack of accuracy and future load prediction of existing peak and valley electricity price period division is solved, and a period closer to the user's electricity curve is achieved. The division enhances the peak-cutting and valley-filling effect and load prediction accuracy of the power system.
Patent Information
- Application Number
- CN202411078059.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-26
AI Technical Summary
The existing peak-to-valley electricity price period division method lacks prediction of future load curves and the time period division is not accurate enough to effectively alleviate the contradiction between power supply and demand.
The K-medoids algorithm of soft-DTW based on historical load data is used for full load data clustering, combined with the CNN-BiLSTM-Transformer model for future load prediction, and the peak and non-peak months of electricity consumption are divided, and full load is carried out within the month. Cluster to determine peak, regular and valley periods.
Through accurate future load forecasts and time segmentation, the peak-cut and valley filling effect of peak-to-valley time-sharing electricity price policy is enhanced, the utilization rate of power equipment is improved, the fixed cost of kilowatt-hours is reduced, and the accurate prediction of peak-to-valley load of the power system is achieved, and the system is supported. Energy management and safe economic operation.
Smart Images

Figure CN119026739A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power market mechanism design, and in particular to a method for dividing peak and valley time periods based on future predicted power load. Background Art
[0002] As my country's electricity demand grows year by year, the peak-to-valley difference in load during the winter and summer peak seasons is gradually widening. In order to alleviate the contradiction between power supply and demand during peak and valley periods, improve the power supply and demand situation, and smooth the power load curve, my country has introduced a peak-to-valley electricity price mechanism for many years. Through time-of-use electricity price signals, users are guided to use less electricity during peak periods and more electricity during valley periods, participating in peak shaving and valley filling, thereby ensuring the safe, stable and economical operation of the power system.
[0003] However, the existing peak-valley time-of-use electricity price policy lacks a reasonable and effective time-of-use mechanism, the time period division method is rough, and more precise and scientific classification methods are rarely used; at the same time, the existing time-of-use method is based on fuzzy hierarchical clustering of historical load data, and there is no prediction of load change trends when future policies are implemented, and there is a lack of prediction of future load curves.
[0004] Therefore, a new technical solution is urgently needed to solve the technical problems that the existing peak-valley electricity price period division method lacks prediction of future load curves and the period division is not accurate enough. Summary of the invention
[0005] The present invention provides a peak-valley time division method based on future predicted electricity load, which is used to solve the technical problems that the existing peak-valley electricity price time division method lacks prediction of future load curve and the time division is not accurate enough.
[0006] To achieve the above object, the present invention provides a method for dividing peak and valley time periods based on future predicted power load, comprising the following steps:
[0007] S1. Collect historical load data; perform full load data clustering on the historical load data according to a first algorithm to obtain a first curve set; the first curve set includes historical typical load curves of each month of the historical load data.
[0008] S2. Perform future load forecasting based on the first model and the first curve set to obtain a second curve set; the second curve set includes typical load curves predicted for each month of a preset number of years in the future.
[0009] S3. Clustering the full-load data of the second curve set according to the first algorithm to obtain a first result; the first result includes clustering of peak electricity consumption months and clustering of non-peak electricity consumption months in a preset number of years in the future.
[0010] S4. Perform monthly full load clustering on the peak electricity consumption months and non-peak electricity consumption months in the first result according to the first algorithm to obtain a second result; the second result includes the peak time period, normal time period and valley time period in each month of the first result.
[0011] Preferably, collecting historical load data includes:
[0012] Collect N years of historical full load data of the target area; N>0, N is a positive integer.
[0013] The historical full load data includes full load data divided by a preset time scale.
[0014] The historical full load data includes a preset number of collection nodes.
[0015] Preferably, the first curve set obtained by clustering the historical load data into full load data according to the first algorithm includes:
[0016] Taking the historical load data as the target data set, the full load data clustering is performed on the historical load data according to the K-medoids algorithm based on soft-DTW to obtain the first curve set.
[0017] Preferably, performing full load data clustering on the second curve set according to the first algorithm to obtain the first result includes:
[0018] The second curve set is taken as the target data set, and full-load data clustering is performed on the second curve set according to the K-medoids algorithm based on soft-DTW to obtain the first result.
[0019] Preferably, the peak electricity consumption months and non-peak electricity consumption months in the first result are clustered according to the first algorithm to obtain the second result including:
[0020] The first result is used as the target data set, and the full load in the peak power consumption month and the non-peak power consumption month in the first result is clustered according to the K-medoids algorithm based on soft-DTW to obtain the second result.
[0021] Preferably, the clustering process of the K-medoids algorithm based on soft-DTW includes:
[0022] A1. Select k load curves from the target data set as the center points of the initial k clusters; the remaining curves in the target data set are used as other load curves.
[0023] A2. Calculate the distance between other load curves and the cluster center, that is, the distance between the selected k load curves; Assume that the load curve vector b of a cluster center is (b 1 ,b 2 ,...,bm ) and some other load curve vector d = (d 1 ,d 2 ,...,d n ) are two sequences, b i and d j The distance between them can be expressed as C i,j =(b i -d j ) 2 , then the local cost matrix is Each set of adjacent elements in the local cost matrix C is defined as a warp path W, consisting of:
[0024] W=w 1 ,w 2 ,...,w k ,...w K
[0025] Among them, max(m,n)≤K≤m+n-1.
[0026] The goal of DTW is to find a path D that minimizes the total cumulative distance between two sequences b and d. dtw ,include:
[0027]
[0028] Use dynamic programming to calculate recursion and define the cumulative distance D as the sum of the distance in the current element and the minimum of the cumulative distance in the adjacent elements. i,j ,include:
[0029] D i,j =|b i -d j |+min(D i-1,j ,D i,j-1 ,D i-1,j-1 )
[0030] The DTW distance DTW(b,d) between time series b and d includes:
[0031] DTW(b,d)=D(m,n)
[0032] Matrix A∈{0,1} m×n is defined as the monotone registration matrix, the Frobenius inner product<A,C> is the sum of the costs along the alignment A; Dynamic Time Warping DTW(b,d) is reconstructed to solve the minimization problem:
[0033]
[0034] Soft DTW is able to take advantage of smooth expressions to differentiate all its parameters, and all possible permutations of the matrix A(m,n) are taken into account:
[0035]
[0036] The parameter γ controls the adjustment between smoothing and approximating the minimum value; substituting this condition into DTW(C), the expression of Soft-DTW is obtained, including:
[0037]
[0038] Since the entropy deviation Soft-DTW may produce negative values and will not be minimized when the time series are equal, Soft-DTW divergence is used To overcome, including:
[0039]
[0040] What you get That is, the distance between a cluster center point load curve vector b and another load curve vector d; calculate the distance between all cluster center point load curves and other load curves, divide other load curves into clusters according to the distance, and assign other load curves to the nearest cluster.
[0041] A3. Randomly update the cluster center point position, that is, randomly update the cluster center point curve, and repeat A2. If the obtained cluster loss value decreases, confirm to update the cluster center point and form a new cluster; if the obtained cluster loss value does not decrease, continue to randomly update the cluster center point curve; the cluster loss value calculation model can be expressed by the following relationship:
[0042]
[0043] A4. Repeat A2 to A3 until the formed clusters no longer change, and clustering is completed.
[0044] Preferably, the first model includes a model based on CNN-BiLSTM-Transformer, and future load forecasting is performed according to the first model and the first curve set, and the second curve set includes:
[0045] B1. Encode the values in the first curve set to obtain position coding; introduce position coding to retain position information, including:
[0046] Positional encoding is achieved by adding the encoding of each position to its corresponding input embedding; positional encoding involves using a combination of sine and cosine functions:
[0047]
[0048] Among them, pos is the position, i is the dimension, d model is the model dimension.
[0049] B2. Consider all elements in the sequence to capture long-distance dependencies within the sequence and perform self-attention calculations, including:
[0050]
[0051] Where Q, K and V represent the query matrix, key matrix and value matrix respectively, d k is the dimension of the key vector, is a scaling factor that helps stabilize the gradient.
[0052] B3. The multi-head self-attention mechanism linearly maps the Q, K, and V matrices to different representation spaces, calculates self-attention in parallel, concatenates the outputs and maps them again to improve the model's attention ability, including:
[0053] MultiHead(Q,K,V)=Concat(head 1 ,...,head h )W O
[0054] where head i =Attention(QW i Q ,KW i K ,VW i V )
[0055] Among them, W i Q , W i K , W i V and W O is the learnable parameter matrix, h is the number of heads, and represents the number of parallel self-attention mechanisms.
[0056] B4. Build the position feed-forward network layer between the encoder and decoder levels of the Transformer:
[0057] The position feedforward network consists of two fully connected networks. A Relu nonlinear activation function is included between the two fully connected linear layers to perform nonlinear mapping and normalization on the learned data. The position feedforward network includes:
[0058] FNN(x)=max(0,xW 1 +b 1 )W 2 +b2
[0059] Where x is the output result of the Multi-Head formula in B3; W 1 and W 2 is the parameter matrix with opposite latitude; b 1 With b 2 is the initial unit in time series b.
[0060] B5. Build LSTM:
[0061]
[0062] Where: u t 、f t and t Respectively represent the input gate, forget gate and output gate at time t; W xu , W xf , W xo and W xg For x t The corresponding weight matrix; W hu , W hf , W ho and W hg h t-1 The corresponding weight matrix; b u , b f , b o and b g is the bias matrix; x t is the input feature matrix at time t; h t is the hidden state at time t; c t is the intermediate state value; σ is the sigmoid activation function; ⊙ represents the element-by-element product.
[0063] B6. Construct BiLSTM structure:
[0064] In the LSTM at time t, the LSTM unit will input the final output result y(t-1) and the current variable x(t), first determine the forgotten content of the cell state c(t-1), calculate the input variable through the forgetting gate, and obtain the forgetting factor f(t); the input variables x(t) and y(t-1) determine the new information that needs to update the cell state through the sigmoid activation function of the input gate, and create a new cell candidate state u(t) through the tanh activation function of the input gate.
[0065] The key function of the input gate and the forget gate is to control information preservation and forgetting, thereby establishing a new neuron cell state c(t) to update the neuron cell state; finally, the output gate o(t) uses the sigmoid activation function to determine part of the output information, multiply it with the new cell state c(t) after tanh transformation, and obtain the output result y(t).
[0066] B7. Obtain the second curve set based on the BiLSTM structure.
[0067] The present invention has the following beneficial effects:
[0068] The peak-valley time division method based on the future predicted power load of the present invention predicts the future load data through historical load data, obtains the future predicted load number, and divides the peak-valley time period according to the future predicted load number, so that the basis of time period division is closer to the actual power consumption curve of users. On the one hand, the method of the present invention can enhance the peak-shaving and valley-filling effect of the peak-valley time-of-use electricity price policy, improve the average utilization rate of power sources and power transmission and distribution equipment, reduce the peak-valley difference of system load, and thus reduce the fixed cost per kilowatt-hour of electricity in the entire region, and alleviate the peak power consumption contradiction of the system and the problem of insufficient utilization of capacity investment; on the other hand, the method of the present invention can realize the accurate prediction of the peak and valley of the power system load, and lay a solid data support for realizing unified energy management of the system and improving the safe and economical operation capability of the system.
[0069] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0071] Figure 1 It is a schematic diagram of a flow chart of a preferred embodiment of the present invention.
[0072] Figure 2 This is a schematic diagram of the load curve of Province G in 2021 according to a preferred embodiment of the present invention.
[0073] Figure 3 It is a schematic diagram of the load curve of Province G in 2022 according to a preferred embodiment of the present invention.
[0074] Figure 4 It is a schematic diagram of the load curve of Province G in 2023 according to a preferred embodiment of the present invention.
[0075] Figure 5 This is a schematic diagram of the monthly load clustering results of Province G in 2021 according to a preferred embodiment of the present invention.
[0076] Figure 6 This is a schematic diagram of the monthly load clustering results of Province G in 2022 according to a preferred embodiment of the present invention.
[0077] Figure 7 This is a schematic diagram of the monthly load clustering results of Province G in 2023 according to a preferred embodiment of the present invention.
[0078] Figure 8 This is a schematic diagram of typical load forecast results for each month in 2024 in Province G according to a preferred embodiment of the present invention.
[0079] Fig. 9 It is a schematic diagram comparing the actual average load curve in January and the predicted typical load of the preferred embodiment of the present invention.
[0080] Fig.10 It is a schematic diagram of the clustering quantity and clustering curve of the predicted load for each month in the preferred embodiment of the present invention. DETAILED DESCRIPTION
[0081] The embodiments of the present invention are described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.
[0082] See also Figure 1 In a preferred embodiment of the present invention, a method for dividing peak and valley periods based on future predicted power load is provided, comprising the following steps:
[0083] S1. Collect historical load data; perform full load data clustering on the historical load data according to a first algorithm to obtain a first curve set; the first curve set includes historical typical load curves of each month of the historical load data; in a preferred embodiment of the present invention, the historical typical load curves of each month include typical daily load curves at 24 o'clock in each month, and 24 o'clock means 24 hours in a day.
[0084] In S1, the historical load data collected include:
[0085] Collect N years of historical full load data of the target area; N>0, N is a positive integer; in the preferred embodiment of the present invention, N is 3, that is, 3 years of historical full load data are collected. The more years of historical data collected, the higher the subsequent prediction accuracy can be.
[0086] The historical full load data includes full load data divided according to a preset time scale; in a preferred embodiment of the present invention, a sampling node is set every quarter of an hour;
[0087] The historical full load data includes a preset number of collection nodes. In the preferred embodiment of the present invention, since the historical full load data of 3 years is collected, a sampling node is set every quarter hour, 96 quarter hours per day, and 365 days per year, the collection nodes include 3*365*96=105120, that is, the data volume.
[0088] In a preferred embodiment of the present invention, all load data of historical load data are clustered according to a first algorithm to obtain a first curve set, including: taking the historical load data as the target data set, and all load data of historical load data are clustered according to a K-medoids algorithm based on soft-DTW to obtain the first curve set.
[0089] In a preferred embodiment of the present invention, the first algorithm includes a K-medoids algorithm based on soft-DTW, and the clustering process of the K-medoids algorithm based on soft-DTW includes:
[0090] A1. Select k load curves from the target data set as the center points of the initial k clusters; and use the remaining curves in the target data set as other load curves.
[0091] A2. Calculate the distance between other load curves and the cluster center, that is, the distance between the selected k load curves; Assume that the load curve vector b of a cluster center is (b 1 ,b 2 ,...,b m ) and some other load curve vector d = (d 1 ,d 2 ,...,d n ) are two sequences, b i and d j The distance between them can be expressed as C i,j =(b i -d j ) 2 , then the local cost matrix is Each set of adjacent elements in the local cost matrix C is defined as a warp path W, consisting of:
[0092] W=w 1 ,w 2 ,...,w k ,...w K
[0093] Among them, max(m,n)≤K≤m+n-1.
[0094] The goal of DTW is to find a path D that minimizes the total cumulative distance between two sequences b and d. dtw ,include:
[0095]
[0096] Use dynamic programming to calculate recursion and define the cumulative distance D as the sum of the distance in the current element and the minimum of the cumulative distance in the adjacent elements. i,j ,include:
[0097] D i,j =|b i -d j |+min(D i-1,j ,D i,j-1 ,D i-1,j-1 )
[0098] The DTW distance DTW(b,d) between time series b and d includes:
[0099] DTW(b,d)=D(m,n)
[0100] Matrix A∈{0,1} m×n is defined as the monotone registration matrix, the Frobenius inner product<A,C> is the sum of the costs along the alignment A; Dynamic Time Warping DTW(b,d) is reconstructed to solve the minimization problem:
[0101]
[0102] Soft DTW is able to take advantage of smooth expressions to differentiate all its parameters, and all possible permutations of the matrix A(m,n) are taken into account:
[0103]
[0104] The parameter γ controls the adjustment between smoothing and approximating the minimum value; substituting this condition into DTW(C), the expression of Soft-DTW is obtained, including:
[0105]
[0106] Since the entropy deviation Soft-DTW may produce negative values and will not be minimized when the time series are equal, Soft-DTW divergence is used To overcome, including:
[0107]
[0108] What you get That is, the distance between a cluster center point load curve vector b and another load curve vector d; calculate the distance between all cluster center point load curves and other load curves, divide other load curves into clusters according to the distance, and assign other load curves to the nearest cluster.
[0109] A3. Randomly update the cluster center point position, that is, randomly update the cluster center point curve, and repeat A2. If the obtained cluster loss value decreases, confirm to update the cluster center point and form a new cluster; if the obtained cluster loss value does not decrease, continue to randomly update the cluster center point curve; the cluster loss value calculation model can be expressed by the following relationship:
[0110]
[0111] A4. Repeat A2 to A3 until the formed clusters no longer change, and clustering is completed.
[0112] In the preferred embodiment of the present invention, load clustering is performed based on K-medoids of soft-DTW, and the research on improving K-medoids clustering is combined with the actual electricity consumption characteristics of users, so that the method of time-of-use electricity price period division is closer to the user load characteristics. The K-medoids algorithm is a partition-based clustering algorithm, which abandons the mean strategy in K-means and selects the most central sample as the cluster center, thereby reducing the sensitivity of K-medoids to outliers; and DTW achieves better alignment effect by distorting the sequence under the time axis.
[0113] S2. Perform future load forecasting based on the first model and the first curve set to obtain a second curve set; the second curve set includes typical load curves predicted for each month of a preset number of years in the future.
[0114] In a preferred embodiment of the present invention, the predicted typical load curves for each month in a preset number of years in the future specifically include predicted typical load curves for each month in the future year.
[0115] The first model includes a model based on CNN-BiLSTM-Transformer. Future load forecasting is performed according to the first model and the first curve set, and the second curve set includes:
[0116] B1. Encode the values in the first curve set to obtain position coding; introduce position coding to retain position information, including:
[0117] Positional encoding is implemented by adding the encoding of each position to its corresponding input embedding; a common form of positional encoding uses a combination of sine and cosine functions, including:
[0118]
[0119] Among them, pos is the position, i is the dimension, d model is the model dimension.
[0120] B2. Consider all elements in the sequence to capture long-distance dependencies within the sequence and perform self-attention calculations, including:
[0121]
[0122] Among them, Q, K and V represent the query matrix (Query), key matrix (Key) and value matrix (Value), respectively. k is the dimension of the key vector, is a scaling factor that helps stabilize the gradient.
[0123] B3. Multi-head self-attention mechanism linearly maps the Q, K, and V matrices to different representation spaces, calculates self-attention in parallel, concatenates the outputs and maps them again to improve the model's attention ability, including:
[0124] MultiHead(Q,K,V)=Concat(head 1 ,...,head h )W O
[0125] where head i =Attention(QW i Q ,KW i K,VW i V )
[0126] Among them, W i Q , W i K.W i V and W O is the learnable parameter matrix, h is the number of heads, and represents the number of parallel self-attention mechanisms.
[0127] B4. Build the position feed-forward network layer between the encoder and decoder levels of the Transformer:
[0128] The position feedforward network consists of two fully connected networks. A Relu nonlinear activation function is included between the two fully connected linear layers to perform nonlinear mapping and normalization on the learned data. The position feedforward network includes:
[0129] FNN(x)=max(0,xW 1 +b 1 )W 2 +b 2
[0130] The feedforward neural network (FFN) is a two-layer neural network that aims to decode the eigenvalue data of the curve, which includes a linear transformation, then a ReLU nonlinearity, and then a linear transformation. Where x is the output of the Multi-Head formula in step B3, and W 1 and W 2 It is a parameter matrix with opposite latitude. The purpose of this step is to map the output of step B3 to a higher-dimensional space, and then filter it through nonlinear filtering, and then return it to the original dimension. 1 With b 2 is the initial unit in time series b.
[0131] B5. Build LSTM:
[0132]
[0133] Where: u t 、f t and t Respectively represent the input gate, forget gate and output gate at time t; W xu , W xf , W xo and W xg For x t The corresponding weight matrix; W hu , W hf , W ho and W hg h t-1 The corresponding weight matrix; b u 、b f 、b o and b g is the bias matrix; x t is the input feature matrix at time t; h t is the hidden state at time t; c t is the intermediate state value; σ is the sigmoid activation function; ⊙ represents the element-by-element product.
[0134] B6. Construct BiLSTM structure:
[0135] In the LSTM at time t, the LSTM unit will input the final output result y(t-1) and the current variable x(t), first determine the forgotten content of the cell state c(t-1), calculate the input variable through the forgetting gate, and obtain the forgetting factor f(t); the input variables x(t) and y(t-1) determine the new information that needs to update the cell state through the sigmoid activation function of the input gate, and create a new cell candidate state u(t) through the tanh activation function of the input gate.
[0136] The key function of the input gate and the forget gate is to control information preservation and forgetting, thereby establishing a new neuron cell state c(t) to update the neuron cell state; finally, the output gate o(t) uses the sigmoid activation function to determine part of the output information, multiply it with the new cell state c(t) after tanh transformation, and obtain the output result y(t).
[0137] B7. Obtain the second curve set based on the BiLSTM structure.
[0138] In a preferred embodiment of the present invention, the features of the first curve set are first extracted to record the position information of the curves at each month and time in the historical load curve. Then, self-attention calculation is performed based on the data position information, and a decoding and output model is built. The future load forecast curve, i.e., the second curve set, is determined based on the output result of the position information.
[0139] In the preferred embodiment of the present invention, future load forecasting is performed based on CNN-BiLSTM-Transformer, and the Transformer forecasting model is applied to the load forecasting of time period division, so that the basis of time period division is closer to the actual power consumption curve of users. When CNN extracts the correlation features between load and meteorological factors at the same time, it does not destroy the original time series form; BiLSTM can capture time dependency and extract time features; Transformer's multi-head self-attention mechanism is used to perform time attention operations on the time feature sequence output by BiLSTM to highlight the differences in the importance of feature vectors at different time steps.
[0140] S3. Cluster the full load data of the second curve set according to the first algorithm to obtain a first result; the first result includes the clustering of peak power consumption months and non-peak power consumption months in a preset number of years in the future. Specifically including:
[0141] The second curve set is taken as the target data set, and full-load data clustering is performed on the second curve set according to the K-medoids algorithm based on soft-DTW to obtain the first result.
[0142] S4. Perform monthly full load clustering on the peak power consumption months and non-peak power consumption months in the first result according to the first algorithm to obtain a second result; the second result includes the peak time period, normal time period and valley time period in each month of the first result. Specifically including:
[0143] The first result is taken as the target data set, and the full load in the peak months and non-peak months in the first result is clustered according to the K-medoids algorithm based on soft-DTW to obtain the second result, that is, the division of peak time, normal time and valley time in each month is completed.
[0144] Verification part:
[0145] 1. Historical load curve clustering
[0146] Cluster analysis is performed on historical load curves to cluster a large amount of redundant historical load data into monthly typical load curves that can serve as a basis for prediction.
[0147] (1) See Figures 2 to 4 , the industry load data of Province G, China from 2021 to 2023 was selected for case analysis, and the data has been desensitized.
[0148] (2) Using the K-medoids clustering algorithm of soft-DTW, cluster analysis is performed on the load curves of Province G from 2021 to 2023. The historical load curves of 96 data points (one every quarter hour) per day of each month are clustered into a typical load curve of 24 hours per month. The specific clustering results can be found in Figures 5 to 7 . Figure 6 and Figure 7 The middle curve represents the month and Figure 5 Consistent.
[0149] 2. Future load curve prediction
[0150] Based on the clustered historical typical load curves of each month, the typical load curves of future months are predicted to serve as the basis for future time period division.
[0151] (1) The typical load curves of each month in Province G in 2024 are predicted. The specific prediction results can be found in Figure 8 .
[0152] (2) Verification of the accuracy of the prediction results. In order to verify the accuracy of the prediction results, the actual load curve of Province G in January 2024 was collected, and the average value at each time of the month was calculated to obtain the average load curve for January. The actual average value curve for January was compared with the predicted typical curve for January. The specific comparison results can be found in Fig. 9 .
[0153] The overall trend of the predicted load curve is consistent with that of the actual load curve. Although there are errors in the specific values, the predicted load and the actual load are basically consistent in the changing trend at each moment, so it can be used as the basis for the division of peak and valley time-of-use electricity price policy in the future.
[0154] 3. Peak and valley time division
[0155] (1) Monthly clustering results. After verification, it can be seen that the prediction results basically fit the actual situation. According to the policy needs of the peak-valley time-of-use electricity price policy, the typical load curves predicted for each month are clustered and analyzed. There are two types of clustering: one is to distinguish between peak months and non-peak months, and the other is to cluster the peak and off-peak periods in the two types of months. The monthly clustering results are shown in Fig.10
[0156] (2) Time period clustering results. According to the monthly clustering results, the entire year can be divided into two categories: peak season and non-peak season according to the load level differences in each month in Province G. The peak season is mainly concentrated in winter and summer, including July to August and November to January of the following year, a total of 5 months. The non-peak season includes February to June and September to October. On this basis, the peak season and non-peak season are further clustered for peak, flat and valley periods.
[0157] The time period clustering results are shown in Table 1. It can be seen that the time period clustering results of the peak season and the non-peak season are generally consistent, and the valley period is 0-7 o'clock and 15 o'clock in the afternoon. The new peak and valley period division is closer to the future electricity demand of users in this area.
[0158] Table 1 Results of time period division based on load forecasting
[0159]
[0160] In summary, the peak-valley time division method based on the future predicted power load of the preferred embodiment of the present invention predicts the future load data through historical load data, obtains the future predicted load number, and divides the peak-valley time period according to the future predicted load number, so that the basis of time period division is closer to the actual power consumption curve of the user. On the one hand, the method of the present invention can enhance the peak-shaving and valley-filling effect of the peak-valley time-of-use electricity price policy, improve the average utilization rate of power sources and power transmission and distribution equipment, reduce the peak-valley difference of system load, and thus reduce the fixed cost per kilowatt-hour of the entire region, and alleviate the peak power consumption contradiction of the system and the problem of insufficient utilization of capacity investment; on the other hand, the method of the present invention can realize the accurate prediction of the peak and valley of the power system load, and lay a solid data support for realizing unified energy management of the system and improving the safe and economical operation capability of the system.
[0161] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for dividing peak and valley periods based on future predicted power load, characterized in that: The following steps are involved: S1. Collect historical load data; perform full load data clustering on the historical load data according to a first algorithm to obtain a first curve set; the first curve set includes historical typical load curves of each month of the historical load data; S2. Perform future load forecasting based on the first model and the first curve set to obtain a second curve set; the second curve set includes typical load curves predicted for each month of a preset number of years in the future; S3. Clustering the full-load data of the second curve set according to the first algorithm to obtain a first result; the first result includes a clustering of peak electricity consumption months and a clustering of non-peak electricity consumption months in the future preset number of years; S4. Perform monthly full load clustering on the peak electricity consumption months and non-peak electricity consumption months in the first result according to the first algorithm to obtain a second result; the second result includes the peak time period, normal time period and valley time period in each month of the first result.
2. The method for dividing peak and valley periods based on future predicted power load according to claim 1, characterized in that: The collection of historical load data includes: Collect N years of historical full load data of the target area; N>0, N is a positive integer; The historical full load data includes full load data divided according to a preset time scale; The historical full load data includes a preset number of collection nodes.
3. The method for dividing peak and valley periods based on future predicted power load according to claim 2 is characterized in that: The first curve set obtained by clustering the historical load data according to the first algorithm to obtain the full load data includes: The historical load data is taken as a target data set, and full load data clustering is performed on the historical load data according to a K-medoids algorithm based on soft-DTW to obtain a first curve set.
4. The method for dividing peak and valley periods based on future predicted power load according to claim 3 is characterized in that: The second curve set is subjected to full load data clustering according to the first algorithm, and a first result is obtained, including: The second curve set is taken as a target data set, and full-load data clustering is performed on the second curve set according to a K-medoids algorithm based on soft-DTW to obtain a first result.
5. The method for dividing peak and valley periods based on future predicted power load according to claim 4 is characterized in that: According to the first algorithm, the peak electricity consumption months and the non-peak electricity consumption months in the first result are clustered by full load within the month, and the second result obtained includes: The first result is used as the target data set, and the full load in the peak power consumption month and the non-peak power consumption month in the first result is clustered according to the K-medoids algorithm based on soft-DTW to obtain the second result.
6. The method for dividing peak and valley periods based on future predicted power load according to claim 5, characterized in that: The clustering process of the K-medoids algorithm based on soft-DTW includes: A1. Select k load curves from the target data set as the center points of the initial k clusters respectively; the remaining curves in the target data set are used as other load curves; A2. Calculate the distance between other load curves and the cluster center, that is, the distance between the selected k load curves; Assume that the load curve vector b of a cluster center is (b1, b2, ..., b m ) and some other load curve vector d = (d1, d2, ..., d n ) are two sequences, b i and d j The distance between them can be expressed as C i,j =(b i -d j ) 2 , then the local cost matrix is Each set of adjacent elements in the local cost matrix C is defined as a warp path W, consisting of: W=w1,w2,...,w k ,...In K Among them, max(m,n)≤K≤m+n-1; The goal of DTW is to find a path D that minimizes the total cumulative distance between two sequences b and d. dtw ,include: Use dynamic programming to calculate recursion and define the cumulative distance D as the sum of the distance in the current element and the minimum of the cumulative distance in the adjacent elements. i,j ,include: D i,j =|b i -d j |+min(D i-1,j ,D i,j-1 ,D i-1,j-1 ) The DTW distance DTW(b,d) between time series b and d includes: DTW(b,d)=D(m,n) Matrix A∈{0,1} m×n is defined as the monotone registration matrix, the Frobenius inner product<A,C> is the sum of the costs along the alignment A; Dynamic Time Warping DTW(b,d) is reconstructed to solve the minimization problem: Soft DTW is able to take advantage of smooth expressions to differentiate all its parameters, and all possible permutations of the matrix A(m,n) are taken into account: The parameter γ controls the adjustment between smoothing and approximating the minimum value; substituting this condition into DTW(C), the expression of Soft-DTW is obtained, including: Since the entropy deviation Soft-DTW may produce negative values and will not be minimized when the time series are equal, Soft-DTW divergence is used To overcome, including: What you get That is, the distance between a cluster center point load curve vector b and another load curve vector d; calculate the distance between all cluster center point load curves and other load curves, divide the other load curves into clusters according to the distance, and assign the other load curves to the nearest cluster; A3. Randomly update the cluster center point position, that is, randomly update the cluster center point curve, and repeat A2. If the obtained cluster loss value decreases, confirm to update the cluster center point and form a new cluster; if the obtained cluster loss value does not decrease, continue to randomly update the cluster center point curve; the cluster loss value calculation model can be expressed by the following relationship: A4. Repeat A2 to A3 until the formed clusters no longer change, and clustering is completed.
7. The method for dividing peak and valley periods based on future predicted power load according to claim 6, characterized in that: The first model includes a model based on CNN-BiLSTM-Transformer, and the future load forecasting is performed according to the first model and the first curve set to obtain the second curve set including: B1. Encoding the values in the first curve set to obtain a position code; introducing the position code to retain position information, including: Positional encoding is achieved by adding the encoding of each position to its corresponding input embedding; positional encoding involves using a combination of sine and cosine functions: Among them, pos is the position, i is the dimension, d model is the model dimension; B2. Consider all elements in the sequence to capture long-distance dependencies within the sequence and perform self-attention calculations, including: Where Q, K and V represent the query matrix, key matrix and value matrix respectively, d k is the dimension of the key vector, is the scaling factor that helps stabilize the gradient; B3. The multi-head self-attention mechanism linearly maps the Q, K, and V matrices to different representation spaces, calculates self-attention in parallel, concatenates the outputs and maps them again to improve the model's attention ability, including: MultiHead(Q,K,V)=Concat(head1,...,head h )W O where head i =Attention(QW i Q ,KW i K ,VW i V ) Among them, W i Q , W i K , W i V and W O is the learnable parameter matrix, h is the number of heads, indicating the number of parallel self-attention mechanisms; B4. Build the position feed-forward network layer between the encoder and decoder levels of the Transformer: The position feedforward network consists of two fully connected networks. A Relu nonlinear activation function is included between the two fully connected linear layers to perform nonlinear mapping and normalization on the learned data. The position feedforward network includes: FNN(x)=max(0,xW1+b1)W2+b2 Among them, x is the output result of the Multi-Head formula in B3; W1 and W2 are parameter matrices with opposite latitudes; b1 and b2 are the initial units in time series b; B5. Build LSTM: Where: u t 、f t and t Respectively represent the input gate, forget gate and output gate at time t; W xu , W xf , W xo and W xg For x t The corresponding weight matrix; W hu , W hf , W ho and W hg h t-1 The corresponding weight matrix; b u , b f , b o and b g is the bias matrix; x t is the input feature matrix at time t; h t is the hidden state at time t; c t is the intermediate state value; σ is the sigmoid activation function; ⊙ represents the element-by-element product; B6. Construct BiLSTM structure: In the LSTM at time t, the LSTM unit will input the last output result y(t-1) and the current variable x(t), first determine the forgotten content of the cell state c(t-1), calculate the input variable through the forgetting gate, and obtain the forgetting factor f(t); the input variables x(t) and y(t-1) are used to determine the new information that needs to update the cell state through the sigmoid activation function of the input gate, and create a new cell candidate state u(t) through the tanh activation function of the input gate; The key functions of the input gate and forget gate are to control information preservation and forgetting, thereby establishing a new neuron cell state c(t) to update the neuron cell state; finally, the output gate o(t) uses the sigmoid activation function to determine part of the output information, multiply it with the new cell state c(t) after tanh transformation, and obtain the output result y(t); B7. Obtain a second curve set according to the BiLSTM structure.
Citation Information
Cited By
Electric energy consumption monitoring method
CN119582348A
