Short-term load prediction method based on pattern recognition
By adopting a pattern recognition-based method in power load prediction, combining the analysis of LSTM and historical data, identifying and positioning the period of accidental events, generating pattern characteristic curves, and correcting the prediction results, the problem of insufficient load prediction in the prior art is solved, and more efficient and accurate load prediction is achieved.
Patent Information
- Application Number
- CN202411858930.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to effectively distinguish the impact of different factors on the power load prediction results, resulting in insufficient accuracy in short-term load prediction.
A short-term load prediction method based on pattern recognition is adopted to perform load prediction through LSTM, and combined with the accidental event pattern recognition and cluster analysis of historical data, the period of specific accidental events is identified and positioned, the pattern characteristic curve is generated, and the prediction results are corrected.
It improves the accuracy of short-term load prediction, can more effectively deal with accidental factors such as different types of events and weather, reduces energy waste rates, and improves electricity efficiency.
Smart Images

Figure CN119886415A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of power load forecasting, and in particular relates to a short-term load forecasting method based on pattern recognition. Background Art
[0002] As the overall configuration of the power grid becomes increasingly complex, how to deepen the operation of the power distribution network is the focus and key to the development of the power distribution network. Power load is an important reference for power grid planning. Accurately predicting power load is of great significance to improving the safety and economy of power grid operation. Optimizing the distribution load forecast calculation can help power suppliers better plan energy supply, stabilize power grid operation, reduce the demand for external power purchases, and reduce energy waste. At the same time, power load forecasting technology can be applied to smart grids, energy storage systems, and renewable energy power generation equipment, helping users predict future power consumption, adjust power strategies and plans, and improve power efficiency.
[0003] At present, load forecasting mainly adopts data-driven forecasting technology, which directly conducts comprehensive analysis through historical data, meteorological information, economic conditions and other factors. Specific methods include traditional univariate linear regression, gray forecasting analysis, quadratic polynomial regression, etc., as well as modern artificial intelligence forecasting methods, such as BP neural network model, support vector machine model, etc. However, when multidimensional factors (meteorological, historical data, social events) are directly used as inputs of the forecasting model, it is impossible to distinguish the different effects of different factors on the forecasting results. Therefore, it is urgent to develop a universal short-term load forecasting method to effectively deal with different types of events and accidental factors such as meteorology. Summary of the invention
[0004] Purpose of the invention: To solve the above technical problems, the present invention provides a short-term load forecasting method based on pattern recognition, which can automatically correct the short-term (next day) load forecasting results more accurately by learning from historical data and analyzing accidental events.
[0005] Technical solution: The present invention provides a short-term load forecasting method based on pattern recognition, comprising the following steps:
[0006] A short-term load forecasting method based on pattern recognition, characterized in that it comprises the following steps:
[0007] (1) Multi-dimensional real-time data input and feature processing;
[0008] (2) Carry out short-term load forecasting based on LSTM;
[0009] (3) Pattern recognition and cluster analysis of accidental events based on historical data;
[0010] (4) Periodic identification and location of specific accidental events;
[0011] (5) Generating a pattern characteristic curve of periodic data of accidental events: generating features for each type of event according to the period, using the feature extraction network in step (3) and using multi-dimensional feature values as the pattern characteristic curve of the accidental event;
[0012] (6) Modify the short-term load forecast results based on different mode characteristic curves;
[0013] (7) Output the corrected short-term load forecast results: According to the load forecast time requirements, output the forecast results of the corresponding length.
[0014] Furthermore, in step (1), since the input x of load forecasting is diverse and time-series, the input data of each dimension is firstly normalized. The duration T of each data is 10 days, and the time interval is 15 minutes, so the length of each dimension data is 960. The mean normalization formula is as follows:
[0015]
[0016] Where: mean(x), max(x), min(x) are the mean, maximum, and minimum values of the sample data respectively.
[0017] Furthermore, the specific steps of carrying out short-term load forecasting based on LSTM in step (2) are:
[0018] S21 model and network hyperparameter configuration: The short-term load forecasting model is based on LSTM, with 5 layers of LSTM and 1 layer of Dense layer, the time step is 10 days and 960 points, the activation function uses ReLU activation function, and L2 regularization is used to prevent overfitting;
[0019] S22 conducts short-term load forecasting model training with a batch size of 4. The number of iterations is not set, but the early stopping technique is used to prevent overfitting. Training is stopped when the performance of the validation set begins to decline.
[0020] S23 uses the root mean square error (RMSE) as the loss function of the prediction model.
[0021] The root mean square error (RMSE) is used as the loss function of the prediction model.
[0022]
[0023] Where: y_pred i is the predicted value, y_true i is the true value.
[0024] Furthermore, the specific process of pattern recognition and cluster analysis of accidental events based on historical data in step (3) is as follows:
[0025] S31 manually labels the type, start time and end time of accidental events; in short-term load forecasting, accidental events include but are not limited to: extreme weather, holidays and special social activities. In order to accurately identify various types of events, data is first manually labeled. In order to ensure that the impact of accidental events on load forecasting is covered as much as possible, the start and end time can be extended, and the total duration is fixed at 960 points and 10 days.
[0026] S32 performs pattern recognition and cluster analysis on different types of accidental events.
[0027] According to the manual labeling results, the number of cluster categories is determined. Each event and its historical events of the same period can be treated as a separate category; events of similar types, such as holidays, can be merged into one category. After determining the number of clusters, a dynamic adaptive feature extraction method can be used to use the load results during the event as the input of pattern recognition, and the output feature dimension is set between 50-100. Furthermore, this method selects 64 as the output feature dimension.
[0028] Furthermore, CNN is used as the feature extraction network, and center loss is used as the loss function for feature extraction. Center loss specifies a category center for each class. The features corresponding to the inputs of the same class are as close to their category centers as possible, and the category centers of different classes are as far away as possible. During the training process, the distance constraint between the sample and the class center in the feature space after being mapped by the network is added, so as to take into account both intra-class aggregation and inter-class separation.
[0029] The calculation of centor loss is shown below. Where xi is the output feature of the i-th event, and c_(y_i) is the class center of the yi-th category.
[0030]
[0031] Furthermore, the clustering center of each event feature is continuously updated The update method is as follows. Where m represents the number of event categories
[0032]
[0033] Furthermore, in order to optimize the pattern recognition and clustering of various types of events, centor loss and softmax loss are used for joint supervision, and a hyperparameter λ is used to balance the two supervision signals. The purpose of softmax loss is to expand the feature differences between classes; the purpose of center loss is to reduce the feature changes within a class, and the advantage is that it does not require complex training sample compounding. The joint supervision formula is:
[0034]
[0035] Furthermore, different events have different durations. The previous steps only identify the events. To more accurately locate the start time and duration of the events, it is necessary to perform statistical analysis on the cycles of various events. Events of the same type have the same cycle. The specific steps for cycle identification and location of specific accidental events in step (4) are as follows:
[0036] S41, first set the possible longest and shortest event time, set the minimized time interval, and cycle with different lengths according to the time interval to verify whether it matches the event.
[0037] S42, event period matching method: NCC is used to evaluate the similarity of two sequences. For events with unknown start time, a sliding window and NCC are combined to calculate the similarity. Based on the principle of maximizing NCC, the period Period of each category of events is obtained. The calculation formula of NCC is as follows:
[0038]
[0039] Where: f and t are two samples, n is the window size, σ is the standard deviation of the two samples, and μ is the mean of the two samples.
[0040] S43, for the actual load forecast result, identify whether an event has occurred, and use NCC to calculate the start time of the event. When the similarity between the load of the event that is occurring and the marked event exceeds a certain threshold, the time point when the event is currently occurring can be located, and the load forecast can be corrected during the subsequent duration of the event.
[0041] Furthermore, the process of correcting the short-term load forecasting result in step (6) is as follows:
[0042] S61, locating the start time t1 of the current accidental event.
[0043] S62, delaying the event by 960 time points, and identifying the category of the current event;
[0044] S63, interpolate the features corresponding to the identified event categories and fuse them with the current prediction sequence. Control the feature value between -1 and 1, and fuse the current value in the following way:
[0045] Corrected prediction value = original prediction value + original prediction value * characteristic value
[0046] S6-4: For day-ahead load forecasting, the event characteristic values are automatically integrated with the real-time forecast results according to the forecast requirements.
[0047] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following significant advantages: (1) The present invention proposes a short-term load forecast correction method based on pattern recognition. By learning from historical data and analyzing accidental events, the short-term (next day) load forecast results are automatically corrected more accurately. (2) The short-term load forecast model and the accidental event pattern recognition, positioning and cycle recognition rely on each other and are used in conjunction with each other to more efficiently and accurately correct the forecast results based on different types of events. (3) The present method can identify the occurrence time, cycle, operation mode and characteristic curve of accidental events, and can qualitatively evaluate the impact of different events on load forecasting, thereby improving the interpretability of load forecasting. (4) The present method innovatively proposes a fusion (correction) method of accidental event characteristic curves and forecast curves. The impact of accidental events on load forecasting is placed in the correction link of forecast results, rather than as an input factor for load forecasting. This can not only reduce the complexity of the load forecasting model by reducing the input factors, but also keep the load forecasting model focused on the load forecasting itself to the maximum extent, and can flexibly control the correction strategy, and can still manually choose whether to use the correction method. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 The figure is a schematic diagram of the working process of the short-term load forecasting method based on pattern recognition of the present invention. DETAILED DESCRIPTION
[0049] The technical solution of the present invention is further described in detail below through specific embodiments. However, it is necessary to point out that the following embodiments are only used to describe the content of the invention and do not constitute a limitation on the protection scope of the present invention.
[0050] A method for intelligent peak load optimization transformation of thermal power units is proposed. By learning historical data and analyzing accidental events, the short-term (next day) load forecast results are automatically corrected more accurately. The specific implementation steps are as follows:
[0051] Step S1: Multi-dimensional real-time data input and feature processing Since the input x of load forecasting is diverse and time-series, the input data of each dimension is first averaged and normalized. The duration T of each data is 10 days, and the time interval is 15 minutes, so the length of each dimension data is 960.
[0052] The mean normalization formula is as follows:
[0053]
[0054] Where: mean(x), max(x), min(x) are the mean, maximum, and minimum values of the sample data respectively.
[0055] Step S2: Short-term load forecasting based on LSTM
[0056] S21: Model and network hyperparameter configuration: The short-term load forecasting model is based on LSTM, with 5 layers of LSTM and 1 layer of Dense layer. Its main features are: the time step is 10 days (960 points), the activation function uses ReLU activation function, and L2 regularization is used to prevent overfitting.
[0057] S22: Conduct short-term load forecasting model training with a batch size of 4. Do not set the number of iterations. Instead, use the early stopping technique to prevent overfitting and stop training when the performance of the validation set begins to decline.
[0058] S23: Use the root mean square error (RMSE) as the loss function of the prediction model.
[0059]
[0060] Where: y_pred i is the predicted value, y_true i is the true value.
[0061] Step S3: Pattern recognition and cluster analysis of accidental events based on historical data.
[0062] S31: Manual labeling: In short-term load forecasting, accidental events include but are not limited to: extreme weather, holidays and special social activities. In order to accurately identify various types of events, data is first labeled manually, and the labeling content is: event type, start time and end time.
[0063] Furthermore, in order to ensure that the impact of accidental events on load forecasting is covered as completely as possible, the start and end times can be extended, and the total duration is fixed at 960 points, 10 days.
[0064] S32: Pattern recognition and cluster analysis of accidental events: Pattern recognition and cluster analysis are performed on different types of events. First, based on the manual labeling results, the number of cluster categories is determined. Each event and its historical events of the same period can be treated as a separate category; events of similar types, such as holidays, can be merged into one category. After determining the number of clusters, a dynamic adaptive feature extraction method can be used to use the load results during the event as the input of pattern recognition, and the output feature dimension is set between 50-100. This embodiment selects 64 as the output feature dimension.
[0065] Furthermore, CNN is used as the feature extraction network, and center loss is used as the loss function for feature extraction. Center loss specifies a category center for each class. The features corresponding to the inputs of the same class are as close to their category centers as possible, and the category centers of different classes are as far away as possible. During the training process, the distance constraint between the sample and the class center in the feature space after being mapped by the network is added, so as to take into account both intra-class aggregation and inter-class separation.
[0066] The calculation of centor loss is shown below. Where xi is the output feature of the i-th event, is the class center of the first category.
[0067]
[0068] Furthermore, the clustering center of each event feature is continuously updated The update method is as follows:
[0069]
[0070] Where m indicates the number of event categories.
[0071] Furthermore, in order to optimize the pattern recognition and clustering of various types of events, centor loss and softmax loss are used for joint supervision, and a hyperparameter λ is used to balance the two supervision signals. The purpose of softmax loss is to expand the feature differences between classes; the purpose of center loss is to reduce the feature changes within a class, and the advantage is that it does not require complex training sample compounding. The joint supervision formula is:
[0072] L=Lsoftmax+Lcentor
[0073]
[0074] Step S4: Identification and location of the cycle of characteristic accidental events: Different events have different durations. The previous steps only identify the events. In order to more accurately locate the start time and duration of the events, it is necessary to perform statistical analysis on the cycles of various events. Events of the same type have the same cycle.
[0075] S41: First, set the longest and shortest possible event time, set the minimum time interval, and cycle with different lengths according to the time interval to verify whether it matches the event.
[0076] S42: Event period matching method: NCC is used to evaluate the similarity of two sequences. For events with unknown start time, a sliding window and NCC are combined to calculate the similarity. Based on the principle of maximizing NCC, the period Period of each category of events is obtained. The calculation formula of NCC is as follows:
[0077]
[0078] Where: f and t are two samples, n is the window size, σ is the standard deviation of the two samples, and μ is the mean of the two samples.
[0079] S43: For the actual load forecast results, identify whether an event has occurred, and use NCC to calculate the start time of the event. When the similarity between the load of the event that is occurring and the marked event exceeds a certain threshold, the time point when the event is currently occurring can be located, and the load forecast can be corrected during the subsequent duration of the event.
[0080] Step S5: Generate a pattern characteristic curve of periodic data of random events.
[0081] For each type of event, features are generated according to the period, and the feature extraction network is the feature extraction network in step S3, using multi-dimensional feature values (64 feature values) as the pattern characteristic curve of the accidental event.
[0082] Step S6: Correct the short-term load forecasting result based on the characteristic curves of different modes.
[0083] The correction process of the day-ahead load forecast result is as follows:
[0084] S61: Locate the start time t1 of the current accidental event.
[0085] S62: delay the event by 960 time points and identify the event category to which the current event belongs;
[0086] S63: Interpolate the features corresponding to the identified event categories and fuse them with the current prediction sequence. The feature value is controlled between -1 and 1, and the fusion method for the current value is:
[0087] Corrected prediction value = original prediction value + original prediction value * characteristic value
[0088] S64: For the day-ahead load forecast, the event characteristic values are automatically integrated with the real-time forecast results according to the forecast requirements.
[0089] Step S7: Output the corrected short-term load forecast result: according to the load forecast time requirement, output the forecast result of the corresponding length.
[0090] In summary, the present invention proposes a short-term load forecast correction method based on pattern recognition. By learning from historical data and analyzing accidental events, the short-term (next day) load forecast results are automatically corrected more accurately. Accidental events include not only extreme weather, holidays, and special social activities, but also the impact of other describable events on short-term load forecast results. This method can be used to correct them, and there is no need to use multiple models. Different events can share a set of processes and prediction algorithms. The short-term load forecast model and accidental event pattern recognition, positioning, and cycle recognition rely on each other and are used in conjunction, so that the prediction results can be corrected more efficiently and accurately based on different types of events.
Claims
1. A short-term load forecasting method based on pattern recognition, characterized in that: The following steps are involved: (1) Multi-dimensional real-time data input and feature processing; (2) Carry out short-term load forecasting based on LSTM; (3) Pattern recognition and cluster analysis of accidental events based on historical data; (4) Periodic identification and location of specific accidental events; (5) Generating a pattern characteristic curve of periodic data of accidental events: generating features for each type of event according to the period, using the feature extraction network in step (3) and using multi-dimensional feature values as the pattern characteristic curve of the accidental event; (6) Modify the short-term load forecast results based on different mode characteristic curves; (7) Output the corrected short-term load forecast results: According to the load forecast time requirements, output the forecast results of the corresponding length.
2. The short-term load forecasting method based on pattern recognition according to claim 1 is characterized in that: The data feature processing method in step (1) is to normalize the input data of each dimension by the mean, and the formula is as follows: Where: mean(x), max(x), min(x) are the mean, maximum, and minimum values of the sample data respectively.
3. The short-term load forecasting method based on pattern recognition according to claim 1 is characterized in that: The specific steps of carrying out short-term load forecasting based on LSTM in step (2) are: S21, model and network hyperparameter configuration: The short-term load forecasting model is based on LSTM, the activation function uses ReLU activation function, and L2 regularization is used to prevent overfitting; S22, conduct short-term load forecasting model training: use early stopping technology to prevent overfitting, and stop training when the performance of the validation set begins to decline; S23, using the root mean square error (RMSE) as the loss function of the prediction model; Where: y_pred i is the predicted value, y_true i is the true value.
4. The short-term load forecasting method based on pattern recognition according to claim 1 is characterized in that: The specific process of pattern recognition and cluster analysis of accidental events based on historical data in step (3) is as follows: S31, manually label the accidental event type, start time and end time; S32, perform pattern recognition and cluster analysis on different types of accidental events.
5. The short-term load forecasting method based on pattern recognition according to claim 4 is characterized in that: The start and end times are extended, and the total duration is fixed at 10 days and 960 points.
6. The short-term load forecasting method based on pattern recognition according to claim 4 is characterized in that: In step (3), pattern recognition is to determine the number of clustering categories based on the manual labeling results. Each event and its historical events of the same period can be regarded as a separate category, and events of similar types are merged into one category. After determining the number of clusters, a dynamic adaptive feature extraction method is used to take the load results during the event as the input of pattern recognition, and the output feature dimension is set between 50 and 100.
7. The short-term load forecasting method based on pattern recognition according to claim 6 is characterized in that: The dynamic adaptive feature extraction method uses CNN as the feature extraction network and center loss as the loss function of feature extraction. Center loss specifies a category center for each class. The features corresponding to the input of the same class are as close to the category center as possible, and the category centers of different classes are as far away as possible. During the training process, the distance constraint between the sample and the class center in the feature space is added after the sample is mapped by the network.
8. The short-term load forecasting method based on pattern recognition according to claim 1 is characterized in that: The specific steps for period identification and location of specific accidental events in step (4) are as follows: S41, firstly set the longest and shortest possible event time, set the minimum time interval, and cycle different lengths according to the time interval to verify whether it matches the event; S42, event period matching: NCC is used to evaluate the similarity of two sequences. For events with unknown start time, a sliding window and NCC are combined to calculate the similarity. Based on the principle of maximizing NCC, the period Period of each category of events is obtained. The calculation formula of NCC is as follows: Where: f and t are two samples, n is the window size, σ is the standard deviation of the two samples, and μ is the mean of the two samples; S43, for the actual load forecast result, identify whether an event has occurred, and use NCC to calculate the start time of the event. When the similarity between the load of the event that is occurring and the marked event exceeds a certain threshold, the time point when the event is currently occurring can be located, and the load forecast can be corrected during the subsequent duration of the event.
9. The short-term load forecasting method based on pattern recognition according to claim 1 is characterized in that: The process of correcting the short-term load forecasting result in step (6) is as follows: S61, locating the start time t1 of the current accidental event; S62, delaying the event by 960 time points, and identifying the event category to which the current event belongs; S63, interpolating the features corresponding to the identified event categories and fusing them with the current prediction sequence; S64: For the day-ahead load forecast, the event characteristic values are automatically integrated with the real-time forecast results according to the forecast requirements.
10. The intelligent peak-shaving optimization and transformation method for thermal power units according to claim 9 is characterized in that: The fusion method is: control the eigenvalue between -1 and 1, and the corrected prediction value = original prediction value + original prediction value * eigenvalue.
Citation Information
Patent Citations
Dense reconstruction method for ship traveling wave numerical simulation
CN115186600A
Short-term load prediction method for extracting load curve characteristics based on grid method
CN116341714A
Ultra-short-term load prediction method based on similar interval adaptive identification
CN117458458A
Short-term load prediction method based on self-attention encoder and time convolutional network
CN118554422A