Power system load forecasting method, device, computer equipment, readable storage medium and program product

By using the improved extended Kalman filter algorithm and exponential moving average filtering, the parameters of the load forecasting model are dynamically updated, which solves the problem that the traditional model cannot be flexibly adjusted and achieves real-time accuracy and adaptability of power system load forecasting.

CN120525142BActive Publication Date: 2025-09-16ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511029816.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-09-16
Estimated Expiration
2045-07-25

AI Technical Summary

Technical Problem

Traditional load forecasting models in existing technologies cannot be flexibly adjusted without retraining and cannot adapt to dynamic environmental changes, resulting in inaccurate predictions.

Method used

The improved extended Kalman filter (MEKFλ) algorithm is combined with the exponential moving average filter to obtain the real load data on the user side online and dynamically update the model parameters, including the calculation of the target matrix, covariance matrix and Kalman gain, to achieve real-time update of the model.

Benefits of technology

It realizes real-time online update of the load forecasting model without retraining, improves the accuracy and adaptability of the forecast, and can effectively respond to environmental changes and load fluctuations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120525142B_ABST
    Figure CN120525142B_ABST
Patent Text Reader

Abstract

The present application relates to a load forecasting method, apparatus, computer equipment, computer-readable storage medium, and computer program product for an electric power system. The method comprises: obtaining real load data on the user side within the current preset time period at every preset time period; determining the target gain and number of model updates within the current preset time period; updating the parameters of the load forecasting model within the previous preset time period based on the number of model updates, the load forecasting data within the previous preset time period, the real load data within the current preset time period, the target gain within the current preset time period, and the preset model update weight, to obtain the load forecasting model within the current preset time period; inputting the real load data within the current preset time period into the load forecasting model within the current preset time period to obtain the load forecasting data within the next preset time period. This method can update the model parameters online in real time without retraining.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electrical technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for load forecasting of a power system. Background Art

[0002] With the rapid development of modern smart grids, short-term load forecasting is becoming increasingly important. Power system operations rely on accurate load demand forecasts to ensure stable and efficient grid operation. Short-term load forecasting typically involves predicting power load for the next few hours to several days, with a timeframe typically ranging from 24 hours to a week.

[0003] In existing technologies, traditional load forecasting models usually build static frameworks, rely heavily on historical data, require comprehensive retraining for updates, and cannot be flexibly adjusted without retraining. Summary of the Invention

[0004] Based on this, it is necessary to provide a load forecasting method, device, computer equipment, computer-readable storage medium and computer program product for a power system that can perform online forecasting and updating in order to address the above technical problems.

[0005] In a first aspect, the present application provides a load forecasting method for a power system, comprising:

[0006] Every preset time period, obtain the actual load data of the user side within the current preset time period;

[0007] Determining a target matrix within a current preset time period; obtaining a covariance matrix of parameter estimates within a previous preset time period; and determining a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0008] Determining the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period; updating the parameters of the load forecast model in the previous preset time period based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period, and the preset model update weight, to obtain the load forecast model in the current preset time period;

[0009] The actual load data within the current preset time period is input into the load forecasting model within the current preset time period to obtain the load forecasting data within the next preset time period; the load forecasting data within the next preset time period is used for power regulation in the next preset time period.

[0010] In one embodiment, after obtaining the load forecast model within the current preset time period, the method further includes:

[0011] Based on the preset covariance weight of the parameter estimation, the covariance matrix of the parameter estimation in the previous preset time period, the preset forgetting factor, the Jacobian matrix of the load forecasting model in the current preset time period and the Kalman gain in the current preset time period, the covariance matrix of the parameter estimation in the current preset time period is determined.

[0012] In one embodiment, determining the number of model updates based on load forecast data in a previous preset time period and actual load data in a current preset time period includes:

[0013] The load forecast data in the previous preset time period and the actual load data in the current preset time period are subtracted to obtain a prediction error; if the prediction error is not greater than a first preset value, the number of model updates is determined to be one; if the error is greater than the first preset value and less than a second preset value, the number of model updates is determined to be two; if the error is not less than the second preset value, the number of model updates is determined to be zero.

[0014] In one embodiment, obtaining the actual load data of the user side within the current preset time period includes:

[0015] Obtain the load data of the user side within the current preset time period; perform missing value filling operations, outlier removal operations, normalization transformation and data processing based on the sliding window mechanism on the load data to obtain the real load data of the user side within the current preset time period.

[0016] In one embodiment, the method further includes: pre-training the initial load forecasting model; the pre-training process of the initial load forecasting model includes:

[0017] Acquire the real load data on the user side and establish a load data set based on the real load data on the user side; pre-train the initial load forecasting model based on the load data set, a preset forgetting factor, a preset model update weight and a preset covariance weight of parameter estimation to obtain a pre-trained load forecasting model; the load forecasting model is used to obtain the real load data on the user side online, update its own parameters based on the real load data and predict the load forecast result for the next preset time period.

[0018] In one embodiment, the method further comprises:

[0019] The real load data in the load data set are arranged in ascending order, starting from the minimum value, and the mth real load data is used as the first preset value, and the nth real load data is used as the second preset value.

[0020] In a second aspect, the present application further provides a load forecasting device for a power system, comprising:

[0021] An acquisition module is used to acquire the real load data of the user side within the current preset time period every preset time period;

[0022] A first updating module is configured to determine a target matrix within a current preset time period; obtain a covariance matrix of parameter estimates within a previous preset time period; and determine a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0023] A second updating module is configured to determine a number of model updates based on the load forecast data within a previous preset time period and the actual load data within a current preset time period; and to update the parameters of the load forecast model within the previous preset time period based on the number of model updates, the load forecast data within the previous preset time period, the actual load data within the current preset time period, the target gain within the current preset time period, and a preset model update weight, to obtain a load forecast model within the current preset time period.

[0024] The prediction module is used to input the actual load data within the current preset time period into the load prediction model within the current preset time period to obtain the load prediction data within the next preset time period; the load prediction data within the next preset time period is used to perform power regulation in the next preset time period.

[0025] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0026] Every preset time period, obtain the actual load data of the user side within the current preset time period;

[0027] Determining a target matrix within a current preset time period; obtaining a covariance matrix of parameter estimates within a previous preset time period; and determining a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0028] Determining the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period; updating the parameters of the load forecast model in the previous preset time period based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period, and the preset model update weight, to obtain the load forecast model in the current preset time period;

[0029] The actual load data within the current preset time period is input into the load forecasting model within the current preset time period to obtain the load forecasting data within the next preset time period; the load forecasting data within the next preset time period is used for power regulation in the next preset time period.

[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0031] Every preset time period, obtain the actual load data of the user side within the current preset time period;

[0032] Determining a target matrix within a current preset time period; obtaining a covariance matrix of parameter estimates within a previous preset time period; and determining a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0033] Determining the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period; updating the parameters of the load forecast model in the previous preset time period based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period, and the preset model update weight, to obtain the load forecast model in the current preset time period;

[0034] The actual load data within the current preset time period is input into the load forecasting model within the current preset time period to obtain the load forecasting data within the next preset time period; the load forecasting data within the next preset time period is used for power regulation in the next preset time period.

[0035] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:

[0036] Every preset time period, obtain the actual load data of the user side within the current preset time period;

[0037] Determining a target matrix within a current preset time period; obtaining a covariance matrix of parameter estimates within a previous preset time period; and determining a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0038] Determining the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period; updating the parameters of the load forecast model in the previous preset time period based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period, and the preset model update weight, to obtain the load forecast model in the current preset time period;

[0039] The actual load data within the current preset time period is input into the load forecasting model within the current preset time period to obtain the load forecasting data within the next preset time period; the load forecasting data within the next preset time period is used for power regulation in the next preset time period.

[0040] The above-mentioned power system load forecasting method, apparatus, computer equipment, computer-readable storage medium, and computer program product obtain real load data of the user side within the current preset time period at every preset time period; determine the target matrix within the current preset time period; obtain the covariance matrix of the parameter estimates within the previous preset time period; determine the target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of the parameter estimates within the previous preset time period; determine the number of model updates based on the load forecast data within the previous preset time period and the real load data within the current preset time period; update the parameters of the load forecast model within the previous preset time period based on the number of model updates, the load forecast data within the previous preset time period, the real load data within the current preset time period, the target gain within the current preset time period, and a preset model update weight to obtain a load forecast model within the current preset time period; input the real load data within the current preset time period into the load forecast model within the current preset time period to obtain load forecast data for the next preset time period; and use the load forecast data for the next preset time period for power regulation in the next preset time period. This method enables online real-time updating of model parameters without retraining. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 1 is a flow chart of a method for load forecasting of a power system in one embodiment;

[0043] Figure 2 is a detailed flow chart of a load forecasting method for a power system in one embodiment;

[0044] Figure 3 is a structural block diagram of a load forecasting device for a power system in one embodiment;

[0045] Figure 4 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0047] It should be noted that the terms "first", "second", etc. used in this application may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "including" and "having" used in this application and any variations thereof are intended to cover non-exclusive inclusions. The term "plurality" used in this application refers to two or more. The term "and / or" used in this application refers to one of the solutions or any combination of multiple solutions.

[0048] In one embodiment, Figure 1 As shown, a load forecasting method for a power system is provided. This embodiment uses the method applied to a terminal as an example for illustration. It is understandable that the method can also be applied to a server, or to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0049] Step 102: every preset time period, obtain the actual load data of the user side within the current preset time period.

[0050] Optionally, the preset time period may be 15 minutes or one hour.

[0051] The power load data at the user side is obtained online from the smart meter or telecommunication information collection system as the real load data.

[0052] Step 104, determining a target matrix within the current preset time period; obtaining a covariance matrix of parameter estimates within a previous preset time period; and determining a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0053] Optionally, the target matrix may be a partial derivative matrix of the load forecasting model with respect to its parameters in the previous preset time period, ie, a Jacobian matrix, and the target gain may be a Kalman gain.

[0054] Among them, the improved extended Kalman filter with forgetting factor (MEKFλ) is the basis of the online adaptive algorithm. , emphasizing the importance of recent observations, thereby meeting the model's adaptability requirements in a dynamic environment. The MEKFλ method adopts a momentum update strategy that enables the model to automatically adjust parameters in response to newly observed data samples and adapt to environmental changes and load fluctuations. Compared with the traditional extended Kalman filter method, MEKFλ is more suitable for processing time-varying load patterns and effectively reduces prediction errors caused by environmental changes and system disturbances. In MEKFλ, we regard the parameters of the prediction model as the state of the dynamic system. The system model can be expressed as the following equation:

[0055] , (1)

[0056] , (2)

[0057] in, is the parameter estimate (parameter of the load forecast model) of the forecast model (load forecast model) at the current time step (current preset time period), is the parameter estimate at the previous time step, is the process noise, which is assumed to obey a zero-mean Gaussian distribution , Indicates from time arrive The actual observed load value, is the prediction function, which represents a parameterized function, such as a neural network or other regression model, that The historical load value (such as the actual load data of the previous preset time period) is input and the output is The predicted value of the future load (such as the load forecast data of the current preset data segment), It's from time arrive The actual observed load value (the actual load data of the previous preset time period), is the measurement noise, also assumed to obey the zero-mean Gaussian distribution . and Denote the covariance matrices of process noise and measurement noise respectively, which need to be semi-positive definite matrices. This paper assumes that the components in the noise vector are independent of each other and and is set to be proportional to the identity matrix, i.e. ,in , is a hyperparameter, which takes an integer greater than 0, and I is the identity matrix.

[0058] By extending the principle of the Kalman filter, we linearize the observation model and use the Kalman gain formula to update the parameter estimates and covariance matrix:

[0059] , (3)

[0060] , (4)

[0061] , (5)

[0062] , (6)

[0063] in, The partial derivative matrix of the load forecast model with respect to its parameters for the previous preset time period, that is, the Jacobian matrix (target matrix) , Transpose it, is the Kalman gain (target gain), at each time step (each preset time period) , Indicates the covariance of the parameter estimation in the current preset time period, which is used to determine the Kalman gain of the next preset time period and optimize the model parameters of the next preset time period. The Kalman gain of the current preset time period is determined by the covariance of the parameter estimation in the previous preset time period, and the quantified model parameters The uncertainty of the update method takes into account the observation error feedback, process noise influence and forgetting factor control, which controls the adaptation speed of the model to new data and has the initial value condition , is the forgetting factor, which exponentially decays old samples. In online adaptation, we assume that older data is no longer relevant for modeling the current dynamics, while more recent data is more important. The forgetting factor prevents saturation of the extended Kalman filter and enhances the algorithm's ability to track changing systems.

[0064] Step 106, based on the load forecast data in the previous preset time period and the actual load data in the current preset time period, determine the number of model updates; based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period and the preset model update weight, update the parameters of the load forecast model in the previous preset time period to obtain the load forecast model in the current preset time period.

[0065] Among them, the prediction error is determined according to the load prediction data in the previous preset time period and the actual load data in the current preset time period, and based on the prediction error, it is determined to perform 1, 2 or 0 parameter updates according to the load prediction data in the previous preset time period.

[0066] Among them, combined with the extension of the exponential moving average filter: To simplify the expression, the optimizer that solves the adaptive problem (such as MEKFλ) is recorded as , whose internal state matrix is ​​S. Therefore, the optimization process can be expressed as:

[0067] , (7)

[0068] , (8)

[0069] For MEKFλ, we have the covariance matrix As its internal state matrix S. By applying EMA to the step size and , we propose an improved extended Kalman filter algorithm combined with exponential moving average:

[0070] , (9)

[0071] , (10)

[0072] in, Refers to the load forecast data predicted by the model, is the corresponding real load data; It includes The optimizer of , and the formula (5) correspond; is the preset model update weight, Control parameters The weight of the previous change, is the covariance weight of the preset parameter estimate, control The weight of .

[0073] Step 108: Input the actual load data within the current preset time period into the load forecasting model within the current preset time period to obtain the load forecasting data within the next preset time period; the load forecasting data within the next preset time period is used for power regulation in the next preset time period.

[0074] Among them, based on the load forecast data in the next preset time period, power regulation on the user side is carried out, line overload risks are predicted, and the intermittent nature and load demand of wind and solar power generation are coordinated.

[0075] The above-mentioned power system load forecasting method, apparatus, computer equipment, computer-readable storage medium, and computer program product obtain real load data of the user side within the current preset time period at every preset time period; determine the target matrix within the current preset time period; obtain the covariance matrix of the parameter estimates within the previous preset time period; determine the target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of the parameter estimates within the previous preset time period; determine the number of model updates based on the load forecast data within the previous preset time period and the real load data within the current preset time period; update the parameters of the load forecast model within the previous preset time period based on the number of model updates, the load forecast data within the previous preset time period, the real load data within the current preset time period, the target gain within the current preset time period, and a preset model update weight to obtain a load forecast model within the current preset time period; input the real load data within the current preset time period into the load forecast model within the current preset time period to obtain load forecast data for the next preset time period; and use the load forecast data for the next preset time period for power regulation in the next preset time period. This method enables online real-time updating of model parameters without retraining.

[0076] In an exemplary embodiment, after obtaining the load forecast model for the current preset time period, the method further includes:

[0077] Based on the preset covariance weight of the parameter estimation, the covariance matrix of the parameter estimation in the previous preset time period, the preset forgetting factor, the Jacobian matrix of the load forecasting model in the current preset time period and the Kalman gain in the current preset time period, the covariance matrix of the parameter estimation in the current preset time period is determined.

[0078] For example, based on formula (6) and combined with exponential moving average filtering, we can get formula (10):

[0079] , (10)

[0080] in, is the covariance matrix of the parameter estimates in the current preset time period, which is used to determine the Kalman gain in the next preset time period. The Kalman gain in the current preset time period is determined by the covariance matrix of the parameter estimates in the previous preset time period. is the preset covariance weight of the parameter estimate, which is used to determine the weight of the covariance matrix of the parameter estimate in the previous preset time period and the covariance matrix of the parameter estimate in the current preset time period; is the covariance matrix of the parameter estimates during the previous preset time period; It is the preset forgetting factor; is the Jacobian matrix of the load forecasting model within the current preset time period; is the Kalman gain during the previous preset time period.

[0081] In this embodiment, the covariance matrix of the parameter estimates in the current preset time period is updated each time the parameters are updated, so that the parameters of the load forecasting model in the next preset time period can be accurately optimized.

[0082] In an exemplary embodiment, determining the number of model updates based on load forecast data in a previous preset time period and actual load data in a current preset time period includes:

[0083] The load forecast data in the previous preset time period and the actual load data in the current preset time period are subtracted to obtain a prediction error; if the prediction error is not greater than a first preset value, the number of model updates is determined to be one; if the error is greater than the first preset value and less than a second preset value, the number of model updates is determined to be two; if the error is not less than the second preset value, the number of model updates is determined to be zero.

[0084] Among them, a simple criterion is introduced to determine the number of update rounds for each sample (Update times). Using two thresholds (first preset value) and (Second preset) Classify the sample as "easy", "hard" or "abnormal". Before updating the parameters, we calculate the prediction error at the current time step If the error satisfies , the sample is classified as a "simple" sample and a single round of update (one update) is performed on it; if the error is If the error satisfies , the sample is considered a "difficult" sample. In this case, we reuse the sample and perform two adaptive updates (two updates). This strategy is based on the understanding that "difficult" samples may not be fully learned through a single round of updates. On the contrary, if the error satisfies , the sample is marked as "abnormal" and skipped Updates (0 updates). The principle is that high error indicates that the sample may be an outlier in the data distribution, and including it may undermine the stability of the model's adaptiveness. Therefore, it is crucial to effectively identify and learn "difficult" samples while maintaining the model's generalization ability.

[0085] Exemplarily, the load forecast data in the previous preset time period is subtracted from the actual load data in the current preset time period, and the absolute value of the result is taken to obtain the prediction error; if the prediction error is not greater than the first preset value, the load forecast data in the previous preset time period is determined to be a simple sample, and the model is updated once; if the error is greater than the first preset value and less than the second preset value, the load forecast data in the previous preset time period is determined to be a difficult sample, and the difficult sample is used for two updates (after updating once, the difficult sample is re-input into the model after being updated once and the parameters are updated for the second time); if the error is not less than the second preset value, the load forecast data in the previous preset time period is determined to be an abnormal sample, and the abnormal sample is not used for parameter update.

[0086] In this embodiment, by classifying samples into simple, difficult, and abnormal samples and performing corresponding model updates for different times, a load forecasting model with more accurate prediction results can be obtained.

[0087] In an exemplary embodiment, obtaining the actual load data of the user side within the current preset time period includes:

[0088] Obtain the load data of the user side within the current preset time period; perform missing value filling operations, outlier removal operations, normalization transformation and data processing based on the sliding window mechanism on the load data to obtain the real load data of the user side within the current preset time period.

[0089] Exemplarily, the load data of the user side within the current preset time period is obtained; the load data is subjected to missing value filling operations, outlier elimination operations, normalization transformation, and data processing based on a sliding window mechanism to obtain the real load data of the user side within the current preset time period, wherein processing the data based on the sliding window mechanism is to process the real load data of a preset time period into data in a two-dimensional window format (for example, the input of the model is: each window includes K consecutive historical real load data, which can be the real load data of the current preset time period, and the output is: H future load forecast data corresponding to each window, which can be the real load data of the next preset time period, and K can be equal to H).

[0090] In this embodiment, by processing the data, it is possible to facilitate subsequent model training to obtain a more accurate model.

[0091] In an exemplary embodiment, the method further includes: pre-training the initial load forecasting model; the pre-training process of the initial load forecasting model includes:

[0092] Acquire the real load data on the user side and establish a load data set based on the real load data on the user side; pre-train the initial load forecasting model based on the load data set, a preset forgetting factor, a preset model update weight and a preset covariance weight of parameter estimation to obtain a pre-trained load forecasting model; the load forecasting model is used to obtain the real load data on the user side online, update its own parameters based on the real load data and predict the load forecast result for the next preset time period.

[0093] Exemplarily, before real-time online updating and prediction, the initial load prediction model will be pre-trained. The pre-training process is: obtaining the actual load data on the user side, and establishing a load data set based on the actual load data on the user side; pre-training the initial load prediction model based on the load data set, a preset forgetting factor, a preset model update weight and a preset covariance weight of parameter estimation to obtain a pre-trained load prediction model; the load prediction model is used to obtain the actual load data on the user side online, update its own parameters based on the actual load data and predict the load forecast results for the next preset time period.

[0094] In this embodiment, by pre-training the model, accurate results can be directly predicted when used.

[0095] In an exemplary embodiment, the method further comprises:

[0096] The real load data in the load data set are arranged in ascending order, starting from the minimum value, and the mth real load data is used as the first preset value, and the nth real load data is used as the second preset value.

[0097] Optionally, the mth true load data may be the 55th true load data starting from the minimum value; the nth true load data may be the 99th true load data starting from the minimum value.

[0098] Exemplarily, the real load data in the load data set are arranged in ascending order, starting from the minimum value, and the real load data ranked at 55% is used as the first preset value, and the real load data ranked at 99% is used as the second preset value.

[0099] In this embodiment, by determining the first preset value and the second preset value, it is possible to accurately distinguish simple samples, difficult samples, and abnormal samples, so as to accurately train the model.

[0100] In an exemplary embodiment, Figure 2As shown, a load forecasting method for a power system includes: before performing real-time online updates and forecasts, pre-training an initial load forecasting model, wherein the pre-training process is as follows: obtaining real load data on the user side and establishing a load data set based on the real load data on the user side; pre-training the initial load forecasting model based on the load data set, a preset forgetting factor, a preset model update weight, and a preset covariance weight of parameter estimation to obtain a pre-trained load forecasting model; the load forecasting model is used to obtain real load data on the user side online, update its own parameters based on the real load data, and predict the load forecast result for the next preset time period. The first preset value and the second preset value are determined as follows: the real load data in the load data set are arranged in ascending order, starting from the minimum value, and the real load data ranked at the 55th percentile is used as the first preset value, and the real load data ranked at the 99th percentile is used as the second preset value. The pre-trained load forecasting model is then used for online updating and forecasting. The process is as follows: every preset time period, the load data of the user side in the current preset time period is obtained; the load data is filled with missing values, outliers are eliminated, normalized, and processed based on a sliding window mechanism to obtain the real load data of the user side in the current preset time period. The data processing based on the sliding window mechanism is to process the real load data of a preset time period into data in a two-dimensional window format (for example, the input of the model is: each window includes K consecutive historical real load data, and the output is: H future load forecast data corresponding to each window). Determine the target matrix in the current preset time period; obtain the covariance matrix of the parameter estimation in the previous preset time period; and determine the target gain in the current preset time period based on the target matrix in the current preset time period and the covariance matrix of the parameter estimation in the previous preset time period. The load forecast data in the previous preset time period is subtracted from the actual load data in the current preset time period, and the absolute value of the result is taken to obtain the prediction error; if the prediction error is not greater than the first preset value, the load forecast data in the previous preset time period is determined to be a simple sample, and the model is updated once; if the error is greater than the first preset value and less than the second preset value, the load forecast data in the previous preset time period is determined to be a difficult sample, and the difficult sample is used for two updates (after updating once, the difficult sample is re-input into the model after being updated once and a second parameter update is performed); if the error is not less than the second preset value, the load forecast data in the previous preset time period is determined to be an abnormal sample, and the abnormal sample is not used for parameter update. Based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period, and the preset model update weight, the parameters of the load forecast model in the previous preset time period are updated to obtain the load forecast model in the current preset time period.The covariance matrix of the parameter estimates for the current preset time period is determined based on the preset covariance weights of the parameter estimates, the covariance matrix of the parameter estimates for the previous preset time period, a preset forgetting factor, the Jacobian matrix of the load forecasting model for the current preset time period, and the Kalman gain for the current preset time period. Actual load data for the current preset time period is input into the load forecasting model for the current preset time period to obtain load forecast data for the next preset time period; the load forecast data for the next preset time period is used to perform power control in the next preset time period.

[0101] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps. It is understandable that the various steps in different embodiments can be freely combined as needed, and the various non-contradictory schemes formed by the combination all fall within the scope of protection of this application.

[0102] In an exemplary embodiment, Figure 3 As shown, a load forecasting device for a power system is provided, comprising: an acquisition module 301, a first update module 302, a second update module 303 and a forecasting module 304, wherein:

[0103] An acquisition module is used to acquire the real load data of the user side within the current preset time period every preset time period;

[0104] A first updating module is configured to determine a target matrix within a current preset time period; obtain a covariance matrix of parameter estimates within a previous preset time period; and determine a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0105] A second updating module is configured to determine a number of model updates based on the load forecast data within a previous preset time period and the actual load data within a current preset time period; and to update the parameters of the load forecast model within the previous preset time period based on the number of model updates, the load forecast data within the previous preset time period, the actual load data within the current preset time period, the target gain within the current preset time period, and a preset model update weight, to obtain a load forecast model within the current preset time period.

[0106] The prediction module is used to input the actual load data within the current preset time period into the load prediction model within the current preset time period to obtain the load prediction data within the next preset time period; the load prediction data within the next preset time period is used to perform power regulation in the next preset time period.

[0107] In one embodiment, the second update module is further configured to:

[0108] Based on the preset covariance weight of the parameter estimation, the covariance matrix of the parameter estimation in the previous preset time period, the preset forgetting factor, the Jacobian matrix of the load forecasting model in the current preset time period and the Kalman gain in the current preset time period, the covariance matrix of the parameter estimation in the current preset time period is determined.

[0109] In one embodiment, determining the number of model updates based on load forecast data in a previous preset time period and actual load data in a current preset time period includes:

[0110] The load forecast data in the previous preset time period and the actual load data in the current preset time period are subtracted to obtain a prediction error; if the prediction error is not greater than a first preset value, the number of model updates is determined to be one; if the error is greater than the first preset value and less than a second preset value, the number of model updates is determined to be two; if the error is not less than the second preset value, the number of model updates is determined to be zero.

[0111] In one embodiment, the acquisition module is further configured to:

[0112] Obtain the load data of the user side within the current preset time period; perform missing value filling operations, outlier removal operations, normalization transformation and data processing based on the sliding window mechanism on the load data to obtain the real load data of the user side within the current preset time period.

[0113] In one embodiment, the present invention further includes a pre-training module for:

[0114] Acquire the real load data on the user side and establish a load data set based on the real load data on the user side; pre-train the initial load forecasting model based on the load data set, a preset forgetting factor, a preset model update weight and a preset covariance weight of parameter estimation to obtain a pre-trained load forecasting model; the load forecasting model is used to obtain the real load data on the user side online, update its own parameters based on the real load data and predict the load forecast result for the next preset time period.

[0115] In one embodiment, the pre-training module is further used to:

[0116] The real load data in the load data set are arranged in ascending order, starting from the minimum value, and the mth real load data is used as the first preset value, and the nth real load data is used as the second preset value.

[0117] Each module in the aforementioned power system load forecasting device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0118] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 4 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store real load data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a load forecasting method for a power system is implemented.

[0119] Those skilled in the art will understand that Figure 4The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0120] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0121] Every preset time period, obtain the actual load data of the user side within the current preset time period;

[0122] Determining a target matrix within a current preset time period; obtaining a covariance matrix of parameter estimates within a previous preset time period; and determining a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0123] Determining the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period; updating the parameters of the load forecast model in the previous preset time period based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period, and the preset model update weight, to obtain the load forecast model in the current preset time period;

[0124] The actual load data within the current preset time period is input into the load forecasting model within the current preset time period to obtain the load forecasting data within the next preset time period; the load forecasting data within the next preset time period is used for power regulation in the next preset time period.

[0125] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0126] Based on the preset covariance weight of the parameter estimation, the covariance matrix of the parameter estimation in the previous preset time period, the preset forgetting factor, the Jacobian matrix of the load forecasting model in the current preset time period and the Kalman gain in the current preset time period, the covariance matrix of the parameter estimation in the current preset time period is determined.

[0127] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0128] The load forecast data in the previous preset time period and the actual load data in the current preset time period are subtracted to obtain a prediction error; if the prediction error is not greater than a first preset value, the number of model updates is determined to be one; if the error is greater than the first preset value and less than a second preset value, the number of model updates is determined to be two; if the error is not less than the second preset value, the number of model updates is determined to be zero.

[0129] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0130] Obtain the load data of the user side within the current preset time period; perform missing value filling operations, outlier removal operations, normalization transformation and data processing based on the sliding window mechanism on the load data to obtain the real load data of the user side within the current preset time period.

[0131] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0132] Acquire the real load data on the user side and establish a load data set based on the real load data on the user side; pre-train the initial load forecasting model based on the load data set, a preset forgetting factor, a preset model update weight and a preset covariance weight of parameter estimation to obtain a pre-trained load forecasting model; the load forecasting model is used to obtain the real load data on the user side online, update its own parameters based on the real load data and predict the load forecast result for the next preset time period.

[0133] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0134] The real load data in the load data set are arranged in ascending order, starting from the minimum value, and the mth real load data is used as the first preset value, and the nth real load data is used as the second preset value.

[0135] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0136] Every preset time period, obtain the actual load data of the user side within the current preset time period;

[0137] Determining a target matrix within a current preset time period; obtaining a covariance matrix of parameter estimates within a previous preset time period; and determining a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0138] Determining the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period; updating the parameters of the load forecast model in the previous preset time period based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period, and the preset model update weight, to obtain the load forecast model in the current preset time period;

[0139] The actual load data within the current preset time period is input into the load forecasting model within the current preset time period to obtain the load forecasting data within the next preset time period; the load forecasting data within the next preset time period is used for power regulation in the next preset time period.

[0140] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0141] Based on the preset covariance weight of the parameter estimation, the covariance matrix of the parameter estimation in the previous preset time period, the preset forgetting factor, the Jacobian matrix of the load forecasting model in the current preset time period and the Kalman gain in the current preset time period, the covariance matrix of the parameter estimation in the current preset time period is determined.

[0142] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0143] The load forecast data in the previous preset time period and the actual load data in the current preset time period are subtracted to obtain a prediction error; if the prediction error is not greater than a first preset value, the number of model updates is determined to be one; if the error is greater than the first preset value and less than a second preset value, the number of model updates is determined to be two; if the error is not less than the second preset value, the number of model updates is determined to be zero.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0145] Obtain the load data of the user side within the current preset time period; perform missing value filling operations, outlier removal operations, normalization transformation and data processing based on the sliding window mechanism on the load data to obtain the real load data of the user side within the current preset time period.

[0146] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0147] Acquire the real load data on the user side and establish a load data set based on the real load data on the user side; pre-train the initial load forecasting model based on the load data set, a preset forgetting factor, a preset model update weight and a preset covariance weight of parameter estimation to obtain a pre-trained load forecasting model; the load forecasting model is used to obtain the real load data on the user side online, update its own parameters based on the real load data and predict the load forecast result for the next preset time period.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0149] The real load data in the load data set are arranged in ascending order, starting from the minimum value, and the mth real load data is used as the first preset value, and the nth real load data is used as the second preset value.

[0150] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0151] Every preset time period, obtain the actual load data of the user side within the current preset time period;

[0152] Determining a target matrix within a current preset time period; obtaining a covariance matrix of parameter estimates within a previous preset time period; and determining a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period.

[0153] Determining the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period; updating the parameters of the load forecast model in the previous preset time period based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period, and the preset model update weight, to obtain the load forecast model in the current preset time period;

[0154] The actual load data within the current preset time period is input into the load forecasting model within the current preset time period to obtain the load forecasting data within the next preset time period; the load forecasting data within the next preset time period is used for power regulation in the next preset time period.

[0155] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0156] Based on the preset covariance weight of the parameter estimation, the covariance matrix of the parameter estimation in the previous preset time period, the preset forgetting factor, the Jacobian matrix of the load forecasting model in the current preset time period and the Kalman gain in the current preset time period, the covariance matrix of the parameter estimation in the current preset time period is determined.

[0157] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0158] The load forecast data in the previous preset time period and the actual load data in the current preset time period are subtracted to obtain a prediction error; if the prediction error is not greater than a first preset value, the number of model updates is determined to be one; if the error is greater than the first preset value and less than a second preset value, the number of model updates is determined to be two; if the error is not less than the second preset value, the number of model updates is determined to be zero.

[0159] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0160] Obtain the load data of the user side within the current preset time period; perform missing value filling operations, outlier removal operations, normalization transformation and data processing based on the sliding window mechanism on the load data to obtain the real load data of the user side within the current preset time period.

[0161] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0162] Acquire the real load data on the user side and establish a load data set based on the real load data on the user side; pre-train the initial load forecasting model based on the load data set, a preset forgetting factor, a preset model update weight and a preset covariance weight of parameter estimation to obtain a pre-trained load forecasting model; the load forecasting model is used to obtain the real load data on the user side online, update its own parameters based on the real load data and predict the load forecast result for the next preset time period.

[0163] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0164] The real load data in the load data set are arranged in ascending order, starting from the minimum value, and the mth real load data is used as the first preset value, and the nth real load data is used as the second preset value.

[0165] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0166] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0167] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0168] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A load forecasting method for a power system, characterized in that: The method comprises: Every preset time period, obtain the actual load data of the user side within the current preset time period; Determining a target matrix within a current preset time period; obtaining a covariance matrix of parameter estimates within a previous preset time period; and determining a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period. Determine the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period; update the parameters of the load forecast model trained in the previous preset time period based on the number of model updates, the load forecast data in the previous preset time period, the actual load data in the current preset time period, the target gain in the current preset time period, and the preset model update weight, and obtain the load forecast model trained in the current preset time period; The real load data within the current preset time period is input into the load forecasting model trained within the current preset time period to obtain the load forecasting data within the next preset time period; the load forecasting data within the next preset time period is used to perform power regulation in the next preset time period; wherein, after the first preset time period, the pre-trained load forecasting model is used as the load forecasting model trained within the current preset time period, the real load data within the current preset time period is collected, and the real load data within the current preset time period is input into the load forecasting model trained within the current preset time period to obtain the load forecasting data within the first preset time period; The determining of the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period includes: The load forecast data in the previous preset time period is subtracted from the actual load data in the current preset time period to obtain a forecast error; if the forecast error is not greater than a first preset value, the number of model updates is determined to be one; if the error is greater than the first preset value and less than a second preset value, the number of model updates is determined to be two; if the error is not less than the second preset value, the number of model updates is determined to be zero; Before obtaining the real load data of the user side in the current preset time period at each preset time period, the method further includes: pre-training the initial load forecasting model to obtain a pre-trained load forecasting model; the pre-training of the initial load forecasting model to obtain the pre-trained load forecasting model includes: Acquire user-side real load data and establish a load data set based on the user-side real load data; pre-train the initial load forecasting model based on the load data set, a preset forgetting factor, a preset model update weight, and a preset covariance weight of parameter estimation to obtain a pre-trained load forecasting model.

2. The method according to claim 1, characterized in that After obtaining the load forecast model within the current preset time period, the method further includes: Based on the preset covariance weight of the parameter estimation, the covariance matrix of the parameter estimation in the previous preset time period, the preset forgetting factor, the Jacobian matrix of the load forecasting model in the current preset time period and the Kalman gain in the current preset time period, the covariance matrix of the parameter estimation in the current preset time period is determined.

3. The method according to claim 1, characterized in that The obtaining of the actual load data of the user side within the current preset time period includes: Obtain the load data of the user side within the current preset time period; The load data is subjected to missing value filling operations, outlier elimination operations, normalization transformation, and data processing based on a sliding window mechanism to obtain the real load data of the user side within the current preset time period.

4. The method according to claim 1, wherein The method further comprises: The real load data in the load data set are arranged in ascending order, starting from the minimum value, and the mth real load data is used as the first preset value, and the nth real load data is used as the second preset value.

5. A load forecasting device for a power system, characterized in that: The device comprises: An acquisition module is used to acquire the real load data of the user side within the current preset time period every preset time period; A first updating module is configured to determine a target matrix within a current preset time period; obtain a covariance matrix of parameter estimates within a previous preset time period; and determine a target gain within the current preset time period based on the target matrix within the current preset time period and the covariance matrix of parameter estimates within the previous preset time period. A second updating module is configured to determine a number of model updates based on the load forecast data within a previous preset time period and the actual load data within a current preset time period; and to update the parameters of the load forecast model trained within the previous preset time period based on the number of model updates, the load forecast data within the previous preset time period, the actual load data within the current preset time period, the target gain within the current preset time period, and a preset model update weight, to obtain a load forecast model trained within the current preset time period; A prediction module, configured to input the actual load data within the current preset time period into the load prediction model trained within the current preset time period to obtain the load prediction data within the next preset time period; the load prediction data within the next preset time period is used to perform power regulation in the next preset time period; wherein, after the first preset time period, the pre-trained load prediction model is used as the load prediction model trained within the current preset time period, the actual load data within the current preset time period is collected, and the actual load data within the current preset time period is input into the load prediction model trained within the current preset time period to obtain the load prediction data within the first preset time period; The determining of the number of model updates based on the load forecast data in the previous preset time period and the actual load data in the current preset time period includes: The load forecast data in the previous preset time period is subtracted from the actual load data in the current preset time period to obtain a forecast error; if the forecast error is not greater than a first preset value, the number of model updates is determined to be one; if the error is greater than the first preset value and less than a second preset value, the number of model updates is determined to be two; if the error is not less than the second preset value, the number of model updates is determined to be zero; Before obtaining the real load data of the user side in the current preset time period at each preset time period, the method further includes: pre-training the initial load forecasting model to obtain a pre-trained load forecasting model; the pre-training of the initial load forecasting model to obtain the pre-trained load forecasting model includes: Acquire user-side real load data and establish a load data set based on the user-side real load data; pre-train the initial load forecasting model based on the load data set, a preset forgetting factor, a preset model update weight, and a preset covariance weight of parameter estimation to obtain a pre-trained load forecasting model.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

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

8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Load forecasting method based on time series and Kalman filtering

    CN107832259A

  • Power system load prediction and analysis method

    CN111080472A