An ultra-short-term load prediction method, device and electronic equipment

CN115528684BActive Publication Date: 2026-08-28SUNGROW ICARBON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211292832.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2026-08-28
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明提供一种超短期负荷预测方法、装置及电子设备,以解决亟需实现超短期负荷预测的问题

Benefits of technology

[0049]This invention provides a method, apparatus, and electronic device for ultra-short-term load forecasting. The method involves obtaining a target forecasting input data length corresponding to a pre-determined target load forecasting model, acquiring initial historical load data according to the target forecasting input data length, calculating the rate of change of data points in the initial historical load data, performing data preprocessing operations on the initial historical load data based on the initial historical load data and the rate of change of data points, obtaining target historical load data, and then calling the target load forecasting model to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data. In other words, this invention enables ultra-short-term load forecasting. Furthermore, the target load forecasting model is a reference load forecasting model selected from multiple reference load forecasting models whose forecasting errors conform to forecasting error rules. The reference load forecasting model is generated based on the centroid vector corresponding to the reference forecasting input data length; that is, the target load forecasting model is a superior reference load forecasting model selected from the reference load forecasting models. Therefore, ultra-short-term load forecasting based on this target load forecasting model has high prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115528684B_ABST
    Figure CN115528684B_ABST
Patent Text Reader

Abstract

The application provides a kind of ultra-short-term load prediction method, device and electronic equipment, in the application, target historical load data is handled by calling target load prediction model, to obtain the ultra-short-term load prediction result corresponding to initial historical load data. That is, through the application, ultra-short-term load prediction can be carried out. Further, the target load prediction model is a reference load prediction model whose prediction error meets the prediction error rule, selected from a plurality of reference load prediction models; the reference load prediction model corresponds to the length of reference prediction input data and is generated based on the centroid vector corresponding to the length of reference prediction input data, that is, the target load prediction model is the optimal reference load prediction model selected from the reference load prediction model, and the ultra-short-term load prediction is carried out based on the target load prediction model, with high prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of load forecasting, and more specifically, to a method, apparatus, and electronic device for ultra-short-term load forecasting. Background Technology

[0002] Microgrids are controllable energy supply systems composed of distributed generation, energy storage systems, and loads. Encouraged by relevant policies, they have broad and promising development prospects.

[0003] Ultra-short-term load forecasting is indispensable in the entire microgrid energy dispatch and management system, serving as the foundation for the optimized dispatch of controllable micro-sources such as energy storage systems, diesel generators, and wind turbines. Furthermore, the results of ultra-short-term load forecasting also affect the safe and stable operation of the entire microgrid and the implementation of optimization strategies. How to achieve ultra-short-term load forecasting is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] In view of this, the present invention provides a method, apparatus and electronic device for ultra-short-term load forecasting to solve the problem of the urgent need to achieve ultra-short-term load forecasting.

[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0006] A method for ultra-short-term load forecasting includes:

[0007] Obtain the target prediction input data length corresponding to the predetermined target load prediction model, and obtain the initial historical load data according to the target prediction input data length; the target load prediction model is a reference load prediction model selected from multiple reference load prediction models whose prediction error conforms to the prediction error rules; the reference load prediction model is generated based on the centroid vector corresponding to the reference prediction input data length.

[0008] Calculate the rate of change of the data points of the initial historical load data, and based on the initial historical load data and the rate of change of the data points of the initial historical load data, perform data preprocessing operations on the initial historical load data to obtain the target historical load data;

[0009] The target load forecasting model is invoked to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data.

[0010] Optionally, the process of determining the target load prediction model includes:

[0011] Obtain historical load data samples;

[0012] The historical load data sample is preprocessed to obtain the target load data sample.

[0013] The autocorrelation coefficient of the target load data sample is calculated to obtain the lengths of multiple reference prediction input data.

[0014] Determine the centroid vector corresponding to the length of the reference prediction input data, and construct a reference load prediction model corresponding to the length of the reference prediction input data based on the centroid vector;

[0015] Reference load forecasting models whose forecasting errors conform to the forecasting error rules are selected and used as target load forecasting models.

[0016] Optionally, the autocorrelation coefficient of the target load data sample is calculated to obtain multiple reference prediction input data lengths, including:

[0017] Obtain the predetermined length of the predicted output data;

[0018] Based on the target load data sample and the predicted output data length, the range of values ​​for the time length is determined, wherein the time length is the sum of the predicted output data length and the reference predicted input data length;

[0019] Determine the autocorrelation coefficients of each dataset formed in the target load data sample as the time length gradually increases from the minimum to the maximum value of the range;

[0020] Target autocorrelation coefficients that meet the autocorrelation coefficient selection rules are selected, and the length of the reference prediction input data corresponding to the target autocorrelation coefficient is determined.

[0021] Optionally, determining the centroid vector corresponding to the length of the reference prediction input data includes:

[0022] The population size is set to the number of reference prediction input data lengths, and the initial centroid vector of the population is determined using the k-means clustering method.

[0023] The initial centroid vector is used as the set of particle positions for the particle swarm optimization algorithm, and the optimization range of the particle swarm optimization algorithm is set to the number of reference prediction input data lengths.

[0024] The initial centroid vector is corrected using the particle swarm optimization algorithm to obtain the centroid vector.

[0025] Optionally, based on the centroid vector, a reference load prediction model corresponding to the length of the reference prediction input data is constructed, including:

[0026] Obtain a load forecasting model; the model parameters of the load forecasting model include at least the center and width parameters of the kernel function;

[0027] The reference load prediction model is obtained by taking the centroid vector corresponding to the length of the reference prediction input data as the center of the kernel function and the maximum mutual distance of all centroid vectors as the width parameter of the kernel function.

[0028] Optionally, reference load forecasting models whose forecasting errors conform to the forecasting error rules are selected and used as target load forecasting models, including:

[0029] The target load data samples are divided into a training set and a validation set;

[0030] The reference load prediction model is trained using the training set and validated using the validation set to obtain the prediction error.

[0031] Determine if there exists a reference load forecasting model whose forecasting error conforms to the forecasting error rules;

[0032] If so, select the reference load forecasting model whose forecasting error conforms to the forecasting error rule, and use it as the target load forecasting model.

[0033] If not, return to the step of determining the centroid vector corresponding to the length of the reference prediction input data, and proceed sequentially until a reference load prediction model whose prediction error conforms to the prediction error rule can be selected and used as the target load prediction model, or stop when the maximum number of iterations is reached.

[0034] Optionally, based on the initial historical load data and the rate of change of the data points of the initial historical load data, data preprocessing operations are performed on the initial historical load data to obtain target historical load data, including:

[0035] Based on the initial historical load data and the rate of change of the data points of the initial historical load data, an outlier deletion operation is performed on the initial historical load data to obtain intermediate historical load data.

[0036] The intermediate historical load data is processed for missing values ​​and normalized to obtain the target historical load data.

[0037] Optionally, based on the initial historical load data and the rate of change of the data points of the initial historical load data, an outlier removal operation is performed on the initial historical load data to obtain intermediate historical load data, including:

[0038] Calculate the first mean and first standard deviation of the initial historical load data, and calculate the second mean and second standard deviation of the rate of change of the data points of the initial historical load data;

[0039] Based on the initial historical load data, the rate of change of the data points of the initial historical load data, the first average value, the first standard deviation, the second average value, and the second standard deviation, a control interval is constructed;

[0040] Delete the data points in the initial historical load data that do not meet the control interval to obtain intermediate historical load data.

[0041] An ultra-short-term load forecasting device, comprising:

[0042] The data acquisition module is used to acquire the target prediction input data length corresponding to the predetermined target load prediction model, and to acquire the initial historical load data according to the target prediction input data length; the target load prediction model is a reference load prediction model selected from multiple reference load prediction models whose prediction error conforms to the prediction error rules; the reference load prediction model is generated based on the centroid vector corresponding to the reference prediction input data length.

[0043] The data processing module is used to calculate the rate of change of the data points of the initial historical load data, and to perform data preprocessing operations on the initial historical load data based on the initial historical load data and the rate of change of the data points of the initial historical load data to obtain the target historical load data.

[0044] The load forecasting module is used to call the target load forecasting model to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data.

[0045] An electronic device includes: a memory and a processor;

[0046] The memory is used to store programs;

[0047] The processor calls the program and executes the ultra-short-term load forecasting method described above.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] This invention provides a method, apparatus, and electronic device for ultra-short-term load forecasting. The method involves obtaining a target forecasting input data length corresponding to a pre-determined target load forecasting model, acquiring initial historical load data according to the target forecasting input data length, calculating the rate of change of data points in the initial historical load data, performing data preprocessing operations on the initial historical load data based on the initial historical load data and the rate of change of data points, obtaining target historical load data, and then calling the target load forecasting model to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data. In other words, this invention enables ultra-short-term load forecasting. Furthermore, the target load forecasting model is a reference load forecasting model selected from multiple reference load forecasting models whose forecasting errors conform to forecasting error rules. The reference load forecasting model is generated based on the centroid vector corresponding to the reference forecasting input data length; that is, the target load forecasting model is a superior reference load forecasting model selected from the reference load forecasting models. Therefore, ultra-short-term load forecasting based on this target load forecasting model has high prediction accuracy. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0051] Figure 1 An architecture diagram of a microgrid provided for an embodiment of the present invention;

[0052] Figure 2 A flowchart of an ultra-short-term load forecasting method provided in an embodiment of the present invention;

[0053] Figure 3 A flowchart of another ultra-short-term load forecasting method provided in an embodiment of the present invention;

[0054] Figure 4 A flowchart illustrating another ultra-short-term load forecasting method provided in this embodiment of the invention;

[0055] Figure 5 This is a schematic diagram of the structure of an ultra-short-term load forecasting device provided in an embodiment of the present invention. Detailed Implementation

[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] Microgrids are controllable energy supply systems composed of distributed generation, energy storage systems, and loads. Encouraged by relevant policies, they have broad and promising development prospects. Ultra-short-term load forecasting is indispensable in the entire microgrid energy dispatch and management system, serving as the foundation for the optimized dispatch of controllable micro-sources such as energy storage systems, diesel generators, and wind turbines. Furthermore, the results of ultra-short-term load forecasting also affect the safe and stable operation of the entire microgrid and the implementation of optimization strategies. This is mainly reflected in the fact that low load forecasting accuracy increases microgrid operating costs, and the inability to accurately obtain load change trends leads to fluctuations in power generation, which can also damage the connected large power grid. Therefore, improving the accuracy of microgrid power load forecasting is undoubtedly a pressing issue that needs to be addressed.

[0058] Microgrids differ significantly from traditional large-scale power grids. Microgrid ultra-short-term load forecasting is more complex, primarily due to the small user capacity, stronger load randomness, weak load aggregation smoothing effect, and more significant and drastic overall load fluctuations. Furthermore, considering the lack of meteorological data or weak correlation with meteorological factors in microgrid systems, how to conduct ultra-short-term load forecasting for microgrids is a technical problem that urgently needs to be solved by those skilled in the art.

[0059] To address this issue, this invention proposes to achieve ultra-short-term load forecasting using historical load data, based on autocorrelation coefficients, k-means clustering, and least squares support vector machines using particle swarm optimization.

[0060] More specifically, this invention provides a method, apparatus, and electronic device for ultra-short-term load forecasting. The method involves obtaining a target forecasting input data length corresponding to a pre-determined target load forecasting model, acquiring initial historical load data according to the target forecasting input data length, calculating the rate of change of data points in the initial historical load data, performing data preprocessing operations on the initial historical load data based on the initial historical load data and the rate of change of data points in the initial historical load data, obtaining target historical load data, and calling the target load forecasting model to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data. In other words, this invention enables ultra-short-term load forecasting. Furthermore, the target load forecasting model is a reference load forecasting model selected from multiple reference load forecasting models whose forecasting errors conform to forecasting error rules. The reference load forecasting model is generated based on the centroid vector corresponding to the reference forecasting input data length. That is, the target load forecasting model is a superior reference load forecasting model selected from the reference load forecasting models. Therefore, ultra-short-term load forecasting based on this target load forecasting model has high prediction accuracy.

[0061] Based on the above, one embodiment of the present invention provides an ultra-short-term load forecasting method. Before introducing the ultra-short-term load forecasting method, the architecture of a microgrid will be described first.

[0062] Reference Figure 1 This invention acquires power data measured by electricity meters and heat meters in the microgrid system in real time through a data acquisition device (the sampling frequency is limited by the actual electricity meters and data acquisition device), and then uploads it to an industrial control computer for model training and prediction of ultra-short-term load forecasting.

[0063] Electricity meters and heat meters can collect power data from photovoltaic, wind power, power grid, loads, and energy storage. In this embodiment, since ultra-short-term load forecasting is being performed, the primary focus is on collecting load power data. When performing ultra-short-term load forecasting, if electrical load forecasting is being performed, historical electrical load data of the load is collected using electricity meters. If heating / cooling load forecasting is being performed, historical heating / cooling load data of the load is collected using heat meters.

[0064] Reference Figure 2 Ultra-short-term load forecasting methods may include:

[0065] S11. Obtain the target prediction input data length corresponding to the predetermined target load prediction model, and obtain the initial historical load data according to the target prediction input data length.

[0066] The target load prediction model is a reference load prediction model selected from multiple reference load prediction models whose prediction error conforms to the prediction error rules; the reference load prediction model is generated based on the centroid vector corresponding to the length of the reference prediction input data.

[0067] In practical applications, multiple reference forecast input data lengths are determined. The reference forecast input data length refers to the processing length when processing historical load data, such as one day, two days, or several hours of load data. Generally, the reference forecast input data length is determined in minutes; for example, one day corresponds to 24 * 60 minutes, and one hour corresponds to 60 minutes. One day's (24 * 60 minutes) of historical load data can be used for short-term load forecasting, as can two days' or several hours' worth of historical load data. Furthermore, the reference forecast input data length can also be expressed in terms of the number of load data points, such as 20 load data points, 60 load data points, etc.

[0068] After determining the length of the reference forecast input data, the centroid vector corresponding to the length of the reference forecast input data is calculated. Then, a reference load forecast model is generated based on the centroid vector. The reference load forecast model whose forecast error conforms to the forecast error rule is selected from the reference load forecast models and is used as the target load forecast model.

[0069] After the target load forecasting model is determined, the length of the reference forecasting input data corresponding to the target load forecasting model will also be determined and used as the target forecasting input data length. The meaning of the target forecasting input data length is explained in the above-mentioned explanation of the meaning of the reference forecasting input data length.

[0070] Then, when using the target load forecasting model, the initial historical load data of the target forecast input data length will be obtained.

[0071] If the target prediction input data length is one day, i.e. 24*60 minutes, and the short load is predicted for September 30, 2022, then the initial historical load data for September 29, 2022 will be collected.

[0072] If the target forecast input data length is two days, i.e. 48*60 minutes, and the short load is predicted for September 30, 2022, then the initial historical load data for September 28-29, 2022 will be collected.

[0073] Using different target forecast input data lengths for ultra-short-term load forecasting will result in different forecasting accuracies. Therefore, in this embodiment, it is first necessary to determine the target load forecasting model and the target forecast input data length corresponding to the model.

[0074] S12. Calculate the rate of change of the data points of the initial historical load data, and perform data preprocessing operation on the initial historical load data based on the initial historical load data and the rate of change of the data points of the initial historical load data to obtain the target historical load data.

[0075] To avoid data anomalies and missing data, data preprocessing operations can be performed, such as outlier handling, missing value handling, and normalization.

[0076] S13. The target load prediction model is invoked to process the target historical load data to obtain the ultra-short-term load prediction result corresponding to the initial historical load data.

[0077] Specifically, by inputting the aforementioned target historical load data into the target load prediction model, the ultra-short-term load prediction results corresponding to the initial historical load data can be obtained.

[0078] In this embodiment, the target forecast input data length corresponding to the predetermined target load forecasting model is obtained. Initial historical load data is obtained according to the target forecast input data length. The rate of change of the data points in the initial historical load data is calculated. Based on the initial historical load data and the rate of change of the data points, data preprocessing is performed on the initial historical load data to obtain target historical load data. The target load forecasting model is then called to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data. That is, ultra-short-term load forecasting can be performed through this invention. Furthermore, the target load forecasting model is a reference load forecasting model whose forecasting error conforms to the forecasting error rules selected from multiple reference load forecasting models. The reference load forecasting model is generated based on the centroid vector corresponding to the reference forecast input data length. In other words, the target load forecasting model is a superior reference load forecasting model selected from the reference load forecasting models. Therefore, ultra-short-term load forecasting based on this target load forecasting model has high prediction accuracy.

[0079] The above embodiments mentioned a target load forecasting model; the process of determining the target load forecasting model will now be described. (Refer to...) Figure 3 It can include:

[0080] S21. Obtain historical load data samples.

[0081] In this embodiment, the load active power data (the longer the time span, the better, preferably more than 3 months) uploaded by the data acquisition device can be obtained by the industrial control computer, with a time interval of several minutes (e.g., 15 minutes), and used as a historical load data sample.

[0082] S22. Perform data preprocessing on the historical load data sample to obtain the target load data sample.

[0083] This embodiment introduces a method for ultra-short-term load forecasting based on historical electricity load data collected by electricity meters.

[0084] The electricity meter samples to obtain the active power data of the load, that is, the historical load data samples are x1(t1), x2(t2), x3(t3),...,x n (t n Using the first data point as a baseline (i.e., assuming the first data point is a normal value), the formula is applied... Calculate the rate of change Δx for each data point. i (t i ), i = 2, 3, ..., n.

[0085] In practical applications, data collected from electricity meters inevitably contains anomalies and omissions, and the units and orders of magnitude of input for ultra-short-term load forecasting are not uniform. Therefore, data preprocessing is required before load forecasting, including the following steps:

[0086] 1. Outlier deletion operation:

[0087] Calculate the following values:

[0088] The average of historical load data samples, i.e., the first average.

[0089] The standard deviation of the historical load data sample, i.e., the first standard deviation.

[0090] The average rate of change of data points in the historical load data sample, i.e., the second average:

[0091]

[0092] The standard deviation of the rate of change of data points in the historical load data sample, i.e., the second standard deviation:

[0093]

[0094] Based on the Pauta criterion, two control intervals are constructed:

[0095] |x i (t i )-E x |<3σ x i = 2, 3, ..., n

[0096] |Δx i (ti )-E Δx <3σ Δx i = 2, 3, ..., n

[0097] If a data point in the initial historical load data sample does not meet either of the two control intervals, the data point is deleted, and then the data missing handling stage begins.

[0098] In this embodiment, the standard deviation and mean of the rate of change are used for outlier removal. This is because when there are occasional large jumps in the data (i.e., the interpolation between two adjacent numbers is very large), but these two data points are within the normal range, the outlier detection algorithm based on the data may fail to identify them. Therefore, an outlier detection based on the rate of change is added here. For example, the maximum value of the normal load data for the day is 10MW and the minimum value is 5MW. Under normal circumstances, the data should increase or decrease slowly. However, due to equipment failure or other reasons, the power drops directly from 9MW to 5MW (an outlier point) and then increases back to 9MW. The outlier detection algorithm based on the data may have difficulty identifying the 5MW outlier data, while the outlier detection algorithm based on the rate of change can identify the 5MW outlier data, thus accurately identifying outliers and improving the accuracy of outlier removal.

[0099] 2. Handling missing data values ​​or inconsistent time spans:

[0100] Assume the remaining data points after deletion are x1(t1), x2(t2), x3(t3), ..., x k (t k Using these data, a Lagrange interpolation function is constructed as follows:

[0101] Where p and q are variables, both ranging from 1 to k, k is the maximum amount of data, t represents time, and f(t) represents the active power of the load at that time point.

[0102] Then from t1 to t k If the time interval is divided into z equally spaced time periods with an interval of Δt, then the processed dataset is {f}. i (Δt*i),i=1,2,...,z}.

[0103] Normalization process:

[0104] For dataset {f i The normalization process for (Δt*i), i=1,2,...,z} is as follows:

[0105]

[0106] in, For the normalized data, f max The dataset {f} is within z time intervals. i The maximum value of (Δt*i), i=1,2,...,z}, f min It is the dataset {f i The minimum value of (Δt*i), i=1,2,...,z}.

[0107] By handling the missing data and normalizing the data as described above, the target load data sample can be obtained.

[0108] S23. Calculate the autocorrelation coefficient of the target load data sample to obtain the lengths of multiple reference prediction input data.

[0109] Specifically, the reference forecast input data length can be used as an input item for the reference load forecasting model. The output item ny can generally be set to a fixed value according to the actual application, such as 30 minutes or 6 load data points (i.e., predicting the load of 6 future load data points). It should be noted that the units of the reference forecast input data length and the output item ny should be consistent, such as both in minutes or both in the number of load data points.

[0110] Step S23 may specifically include the following steps:

[0111] 1) Obtain the predetermined length of the predicted output data.

[0112] Specifically, the length of the predicted output data is the output item ny, such as 6.

[0113] 2) Based on the target load data sample and the predicted output data length, determine the range of values ​​for the time length.

[0114] Wherein, the time length is the sum of the predicted output data length and the reference predicted input data length.

[0115] This embodiment uses the autocorrelation coefficient A to roughly determine the model input terms for a dataset spanning z time periods. When the time length is m (where m represents the sum of the input and output items), the autocorrelation coefficient A of the target load data sample for that time period is calculated using the following formula:

[0116]

[0117] Where i is a variable, taking values ​​from 1, 2, ..., z. It is a dataset The average value.

[0118] This embodiment determines the number of input items based on data correlation. When the number of output items is n... yWhen the input item must have at least one value, the minimum value of m is n. y +1. Since the dataset contains at most z data points, the maximum value of m is z-1.

[0119] 3) Determine the autocorrelation coefficients of each dataset formed in the target load data sample as the time length gradually increases from the minimum to the maximum value of the range.

[0120] Specifically, the time length m ranges from n y By gradually increasing +1 to z-1, we obtain each dataset Q (the active power data of the load has a time correlation, so the change pattern of the dataset Q is an oscillating and decaying waveform).

[0121] Then, calculate the autocorrelation coefficient for each dataset Q.

[0122] 4) Select target autocorrelation coefficients that meet the autocorrelation coefficient selection rules, and determine the length of the reference prediction input data corresponding to the target autocorrelation coefficients.

[0123] Specifically, the peaks and troughs in dataset Q with an absolute value of autocorrelation coefficient greater than 0.1 are selected (the number of peaks and troughs is n). p ), as the target autocorrelation coefficient, find the time series length {m} corresponding to the target autocorrelation coefficient. i i = 1, 2, ..., n p Finally, we can determine that the input item is {(m)}. i -n y ), i = 1, 2, ..., n p Input item m i -n y This refers to the length of the reference prediction input data.

[0124] S24. Determine the centroid vector corresponding to the length of the reference prediction input data, and construct a reference load prediction model corresponding to the length of the reference prediction input data based on the centroid vector.

[0125] In this embodiment, a least-squares support vector machine based on k-means clustering and particle swarm optimization is proposed to achieve ultra-short-term load forecasting for a microgrid system. Specifically, k-means clustering and particle swarm optimization are used to determine the centroid vector.

[0126] Specifically, determining the centroid vector corresponding to the length of the reference prediction input data may include:

[0127] 1) Set the population size to the number of reference prediction input data lengths, and use the k-means clustering method to determine the initial centroid vector of the population.

[0128] Set the population size to n p (The number of populations is determined by the autocorrelation coefficient, which indicates the number of input terms.) For each population, the ideal parameters are iteratively obtained using the k-means clustering method, as follows:

[0129] a) Determine if this is the first run. If so, randomly select R samples from the dataset as the initial centroid vector: {μ1,μ2,...,μ R}, and set up R clusters, with each initial cluster corresponding to each initial centroid vector; otherwise, use the particle positions of the obtained optimal population as the initial centroid vectors.

[0130] b) Calculate the training set The distance between the sample and each centroid vector: Then the samples are assigned to the cluster with the smallest centroid vector.

[0131] c) Recalculate the new centroids for each cluster. If all centroids no longer change or the number of iterations reaches the maximum value, proceed to step d); otherwise, proceed to step a).

[0132] d) Output the final initial centroid vector for each population.

[0133] 2) Use the initial centroid vector as the particle position set of the particle swarm algorithm, and set the optimization range of the particle swarm algorithm to the number of reference prediction input data lengths.

[0134] The initial centroid vector of the population obtained above is used as an example. As the set of particle positions in the particle swarm optimization algorithm, we define {v1, v2, ..., v...} R The particle velocities can be used as a set, and the optimization range of the particle swarm optimization algorithm is set to the number of reference prediction input data lengths, n. p This is to avoid local optima.

[0135] 3) Use the particle swarm optimization algorithm to correct the initial centroid vector to obtain the centroid vector.

[0136] The position of the j-th particle is determined according to the following formula. With speed renew:

[0137]

[0138]

[0139] Where w is the inertia weight factor, k represents the number of iterations; c1 represents the learning factor, c2 represents the learning factor, and r1 and r2 represent two random numbers between [0,1]. This represents the optimal position that particle j can search for at the current iteration number k. This represents the optimal position that the entire population can search for at the current iteration number k, i.e., the optimal centroid vector.

[0140] This step yields the centroid vector for each population. Each population corresponds to a reference prediction input data length, meaning this step provides the centroid vector corresponding to the reference prediction input data length.

[0141] After obtaining the centroid vector, a reference load prediction model corresponding to the length of the reference prediction input data is constructed based on the centroid vector. Specifically, this includes the following steps:

[0142] Obtain a load forecasting model, wherein the model parameters of the load forecasting model include at least the center of the kernel function and the width of the kernel function. The centroid vector corresponding to the length of the reference forecasting input data is used as the center of the kernel function, and the maximum value of the mutual distance of all centroid vectors is used as the width of the kernel function, thus obtaining a reference load forecasting model.

[0143] Specifically, based on the centroid vectors obtained for each population, a least-squares support vector machine prediction model is constructed, which is also the load prediction model:

[0144] y = wψ(x) + b,

[0145] Where y is the output term, x is the input term for each population, w is the weight of the support vector machine (initial weights are random), and b is the threshold of the support vector machine (initial threshold is also random). However, the weights w and threshold b are obtained approximately optimally based on the training set using the least squares method. ψ(x) is the kernel function; in this embodiment, the radial basis function is chosen. c i The centroid vector is the center of the kernel function, and σ is the kernel function width parameter. This is based on the centroid vector obtained from the current iteration of each population. Assign values ​​to the center and width parameters of the kernel function of the least squares support vector machine, using the following formula: σ is the maximum mutual distance between the centroid vectors of each population, serving as the center c of the kernel function. i The kernel width parameter σ is obtained approximately optimally through improved K-means clustering and particle swarm optimization algorithms.

[0146] S25. Select reference load forecasting models whose forecasting errors conform to the forecasting error rules, and use them as target load forecasting models.

[0147] Specifically, the target load data samples can be divided into a training set and a validation set.

[0148] After obtaining the target load data samples, they are divided into training set and validation set.

[0149] Divide the target load data samples into training sets and verification set Where l∈[1,z], is a boundary point, which is generally taken as

[0150] The reference load prediction model can be trained using the training set and validated using the validation set to obtain the prediction error.

[0151] After iterative training using the training set, the least squares support vector machine prediction values ​​are obtained through the validation set. These prediction values ​​are then inversely normalized (to obtain the actual prediction values), and the root mean square error (i.e., the prediction error) is calculated. This error serves as the fitness evaluation metric for the particle swarm optimization algorithm, and the best centroid of each population is selected.

[0152] To determine whether there exists a reference load forecasting model whose forecasting error conforms to the forecasting error rule, in this embodiment, a forecasting error threshold can be set in the forecasting error rule. Then, it is determined whether there exists a reference load forecasting model whose forecasting error is less than the forecasting error threshold. If so, the reference load forecasting model whose forecasting error conforms to the forecasting error rule is selected and used as the target load forecasting model.

[0153] It should be noted that if multiple reference load forecasting models are selected, the one with the smallest forecasting error should be chosen as the target load forecasting model. The length of the reference forecasting input data corresponding to the target load forecasting model can then be used as the target forecasting input data length. Subsequently, based on the real-time collected data, online ultra-short-term load forecasting can be achieved through data preprocessing and the optimal least-squares support vector machine model.

[0154] If no model is found, return to the step of determining the centroid vector corresponding to the length of the reference prediction input data, and proceed sequentially until a reference load prediction model whose prediction error conforms to the prediction error rule can be selected and used as the target load prediction model, or stop when the maximum number of iterations is reached.

[0155] In this embodiment, the present invention performs outlier processing and missing item filling on the initial historical load data. In the outlier identification, the Pauta criterion is used to determine the initial historical load data and the rate of change of the initial historical load data to reduce the false judgment rate.

[0156] This embodiment first determines a reasonable set of input items for the prediction model (containing multiple input options) through autocorrelation coefficients. Then, based on the analysis of the prediction results of k-means clustering and least squares support vector machine using particle swarm optimization, the length of the input item data is determined. Compared with other algorithms, it is more reasonable to select input items manually or randomly.

[0157] In this embodiment, the prediction accuracy of the least squares support vector machine is affected by the initial parameters (the center and width parameters of the kernel function). By iteratively optimizing through k-means clustering and particle swarm optimization, the approximately optimal initial parameters can be obtained, which greatly improves the prediction accuracy.

[0158] The ultra-short-term load prediction algorithm proposed in this embodiment combines the advantages of autocorrelation coefficient, k-means clustering, and particle swarm optimization, which to some extent reduces the number of iterations, narrows the optimization range, accelerates the convergence of the algorithm, and improves the prediction accuracy of least squares support vector machine.

[0159] The ultra-short-term load forecasting method proposed in this embodiment can be applied to scenarios where meteorological data is lacking or where the load is not closely related to meteorological factors, thus assisting the energy management system in achieving optimized scheduling.

[0160] In another embodiment of the present invention, reference is made to Figure 4 The document provides a detailed implementation process for "preprocessing the initial historical load data based on the initial historical load data and the rate of change of the data points of the initial historical load data to obtain the target historical load data," including:

[0161] S31. Based on the initial historical load data and the rate of change of the data points of the initial historical load data, perform an outlier deletion operation on the initial historical load data to obtain intermediate historical load data.

[0162] Step S31 specifically includes:

[0163] 1) Calculate the first average and first standard deviation of the initial historical load data, and calculate the second average and second standard deviation of the rate of change of the data points of the initial historical load data.

[0164] 2) Based on the initial historical load data, the rate of change of the data points of the initial historical load data, the first average value, the first standard deviation, the second average value, and the second standard deviation, construct a control interval.

[0165] 3) Delete the data points in the initial historical load data that do not meet the control interval to obtain intermediate historical load data.

[0166] S32. Perform missing data processing and normalization on the intermediate historical load data to obtain the target historical load data.

[0167] It should be noted that the specific implementation process of steps S31 and S32 can be found in the corresponding descriptions in the above embodiments.

[0168] In this embodiment, data preprocessing is performed to avoid problems such as data anomalies and missing data.

[0169] Optionally, based on the embodiments of the above-described ultra-short-term load forecasting method, another embodiment of the present invention provides an ultra-short-term load forecasting device, referring to... Figure 5 It can include:

[0170] The data acquisition module 11 is used to acquire the target prediction input data length corresponding to the predetermined target load prediction model, and acquire the initial historical load data according to the target prediction input data length; the target load prediction model is a reference load prediction model selected from multiple reference load prediction models whose prediction error conforms to the prediction error rules; the reference load prediction model is generated based on the centroid vector corresponding to the reference prediction input data length.

[0171] Data processing module 12 is used to calculate the rate of change of data points of the initial historical load data, and to perform data preprocessing operation on the initial historical load data based on the initial historical load data and the rate of change of data points of the initial historical load data to obtain target historical load data.

[0172] The load forecasting module 13 is used to call the target load forecasting model to process the target historical load data in order to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data.

[0173] Furthermore, it also includes a model determination module, which comprises:

[0174] The sample acquisition submodule is used to acquire historical load data samples;

[0175] The data processing submodule is used to perform data preprocessing operations on the historical load data sample to obtain the target load data sample;

[0176] The length calculation submodule is used to calculate the autocorrelation coefficient of the target load data sample to obtain the lengths of multiple reference prediction input data.

[0177] The model building submodule is used to determine the centroid vector corresponding to the length of the reference prediction input data, and to build a reference load prediction model corresponding to the length of the reference prediction input data based on the centroid vector.

[0178] The model filtering submodule is used to filter out reference load forecasting models whose forecasting errors conform to the forecasting error rules, and use them as target load forecasting models.

[0179] Furthermore, the length calculation submodule includes:

[0180] The length acquisition unit is used to acquire the predetermined length of the predicted output data;

[0181] The value determination unit is used to determine the value range of the time length based on the target load data sample and the predicted output data length, wherein the time length is the sum of the predicted output data length and the reference predicted input data length;

[0182] The coefficient determination unit is used to determine the autocorrelation coefficient of each dataset formed in the target load data sample as the time length gradually increases from the minimum value to the maximum value in the range.

[0183] The length determination unit is used to filter out target autocorrelation coefficients that meet the autocorrelation coefficient filtering rules, and to determine the length of the reference prediction input data corresponding to the target autocorrelation coefficients.

[0184] Furthermore, when the model building submodule determines the centroid vector corresponding to the length of the reference prediction input data, it is specifically used for:

[0185] The population size is set to the number of reference prediction input data lengths, and the initial centroid vector of the population is determined using the k-means clustering method.

[0186] The initial centroid vector is used as the set of particle positions for the particle swarm optimization algorithm, and the optimization range of the particle swarm optimization algorithm is set to the number of reference prediction input data lengths.

[0187] The initial centroid vector is corrected using the particle swarm optimization algorithm to obtain the centroid vector.

[0188] Furthermore, when the model building submodule is used to construct the reference load prediction model corresponding to the reference prediction input data length based on the centroid vector, it is specifically used for:

[0189] Obtain a load forecasting model; the model parameters of the load forecasting model include at least the center and width parameters of the kernel function;

[0190] The reference load prediction model is obtained by taking the centroid vector corresponding to the length of the reference prediction input data as the center of the kernel function and the maximum mutual distance of all centroid vectors as the width parameter of the kernel function.

[0191] Furthermore, the model selection submodule is specifically used for:

[0192] The target load data samples are divided into a training set and a validation set;

[0193] The reference load prediction model is trained using the training set and validated using the validation set to obtain the prediction error.

[0194] Determine if there exists a reference load forecasting model whose forecasting error conforms to the forecasting error rules;

[0195] If so, select the reference load forecasting model whose forecasting error conforms to the forecasting error rule, and use it as the target load forecasting model.

[0196] If not, return to the step of determining the centroid vector corresponding to the length of the reference prediction input data, and proceed sequentially until a reference load prediction model whose prediction error conforms to the prediction error rule can be selected and used as the target load prediction model, or stop when the maximum number of iterations is reached.

[0197] Furthermore, the data processing module 12 includes:

[0198] The outlier removal submodule is used to perform outlier removal operations on the initial historical load data based on the initial historical load data and the rate of change of the data points of the initial historical load data, so as to obtain intermediate historical load data.

[0199] The missing and normalization processing submodule is used to process the missing data and normalize the intermediate historical load data to obtain the target historical load data.

[0200] Furthermore, the outlier removal submodule is specifically used for:

[0201] Calculate the first mean and first standard deviation of the initial historical load data, and calculate the second mean and second standard deviation of the rate of change of the data points of the initial historical load data;

[0202] Based on the initial historical load data, the rate of change of the data points of the initial historical load data, the first average value, the first standard deviation, the second average value, and the second standard deviation, a control interval is constructed;

[0203] Delete the data points in the initial historical load data that do not meet the control interval to obtain intermediate historical load data.

[0204] In this embodiment, the target forecast input data length corresponding to the predetermined target load forecasting model is obtained. Initial historical load data is obtained according to the target forecast input data length. The rate of change of the data points in the initial historical load data is calculated. Based on the initial historical load data and the rate of change of the data points, data preprocessing is performed on the initial historical load data to obtain target historical load data. The target load forecasting model is then called to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data. That is, ultra-short-term load forecasting can be performed through this invention. Furthermore, the target load forecasting model is a reference load forecasting model whose forecasting error conforms to the forecasting error rules selected from multiple reference load forecasting models. The reference load forecasting model is generated based on the centroid vector corresponding to the reference forecast input data length. In other words, the target load forecasting model is a superior reference load forecasting model selected from the reference load forecasting models. Therefore, ultra-short-term load forecasting based on this target load forecasting model has high prediction accuracy.

[0205] It should be noted that the working process of each module, submodule and unit in this embodiment is described in the corresponding description in the above embodiment, and will not be repeated here.

[0206] Optionally, based on the embodiments of the ultra-short-term load forecasting method and apparatus described above, another embodiment of the present invention provides an electronic device, including: a memory and a processor;

[0207] The memory is used to store programs;

[0208] The processor calls the program and executes the ultra-short-term load forecasting method described above.

[0209] In this embodiment, the target forecast input data length corresponding to the predetermined target load forecasting model is obtained. Initial historical load data is obtained according to the target forecast input data length. The rate of change of the data points in the initial historical load data is calculated. Based on the initial historical load data and the rate of change of the data points, data preprocessing is performed on the initial historical load data to obtain target historical load data. The target load forecasting model is then called to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data. That is, ultra-short-term load forecasting can be performed through this invention. Furthermore, the target load forecasting model is a reference load forecasting model whose forecasting error conforms to the forecasting error rules selected from multiple reference load forecasting models. The reference load forecasting model is generated based on the centroid vector corresponding to the reference forecast input data length. In other words, the target load forecasting model is a superior reference load forecasting model selected from the reference load forecasting models. Therefore, ultra-short-term load forecasting based on this target load forecasting model has high prediction accuracy.

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

Claims

1. A method for ultra-short-term load forecasting, characterized in that, include: Obtain the target prediction input data length corresponding to the predetermined target load prediction model, and obtain the initial historical load data according to the target prediction input data length; The target load prediction model is a reference load prediction model selected from multiple reference load prediction models whose prediction error conforms to the prediction error rules; The reference load prediction model is generated based on the centroid vector corresponding to the length of the reference prediction input data. Calculate the rate of change of the data points of the initial historical load data, and based on the initial historical load data and the rate of change of the data points of the initial historical load data, perform data preprocessing operations on the initial historical load data to obtain the target historical load data; The target load forecasting model is invoked to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data; The process of determining the target load prediction model includes: Obtain historical load data samples; The historical load data sample is preprocessed to obtain the target load data sample. The autocorrelation coefficient of the target load data sample is calculated to obtain the lengths of multiple reference prediction input data. Determine the centroid vector corresponding to the length of the reference prediction input data, and construct a reference load prediction model corresponding to the length of the reference prediction input data based on the centroid vector; Reference load forecasting models whose forecasting errors conform to the forecasting error rules are selected and used as target load forecasting models.

2. The ultra-short-term load forecasting method according to claim 1, characterized in that, The autocorrelation coefficient of the target load data sample is calculated to obtain multiple reference prediction input data lengths, including: Obtain the predetermined length of the predicted output data; Based on the target load data sample and the predicted output data length, the range of values ​​for the time length is determined, wherein the time length is the sum of the predicted output data length and the reference predicted input data length; Determine the autocorrelation coefficients of each dataset formed in the target load data sample as the time length gradually increases from the minimum to the maximum value of the range; Target autocorrelation coefficients that meet the autocorrelation coefficient selection rules are selected, and the length of the reference prediction input data corresponding to the target autocorrelation coefficient is determined.

3. The ultra-short-term load forecasting method according to claim 1, characterized in that, Determining the centroid vector corresponding to the length of the reference prediction input data includes: The population size is set to the number of reference prediction input data lengths, and the initial centroid vector of the population is determined using the k-means clustering method. The initial centroid vector is used as the set of particle positions for the particle swarm optimization algorithm, and the optimization range of the particle swarm optimization algorithm is set to the number of reference prediction input data lengths. The initial centroid vector is corrected using the particle swarm optimization algorithm to obtain the centroid vector.

4. The ultra-short-term load forecasting method according to claim 1, characterized in that, Based on the centroid vector, a reference load prediction model corresponding to the reference prediction input data length is constructed, including: Obtain a load forecasting model; the model parameters of the load forecasting model include at least the center and width parameters of the kernel function; The reference load prediction model is obtained by taking the centroid vector corresponding to the length of the reference prediction input data as the center of the kernel function and the maximum mutual distance of all centroid vectors as the width parameter of the kernel function.

5. The ultra-short-term load forecasting method according to claim 1, characterized in that, Reference load forecasting models whose forecasting errors conform to the forecasting error rules are selected and used as target load forecasting models, including: The target load data samples are divided into a training set and a validation set; The reference load prediction model is trained using the training set and validated using the validation set to obtain the prediction error. Determine if there exists a reference load forecasting model whose forecasting error conforms to the forecasting error rules; If so, select the reference load forecasting model whose forecasting error conforms to the forecasting error rule, and use it as the target load forecasting model. If not, return to the step of determining the centroid vector corresponding to the length of the reference prediction input data, and proceed sequentially until a reference load prediction model whose prediction error conforms to the prediction error rule can be selected and used as the target load prediction model, or stop when the maximum number of iterations is reached.

6. The ultra-short-term load forecasting method according to claim 1, characterized in that, Based on the initial historical load data and the rate of change of the data points in the initial historical load data, data preprocessing operations are performed on the initial historical load data to obtain target historical load data, including: Based on the initial historical load data and the rate of change of the data points of the initial historical load data, an outlier deletion operation is performed on the initial historical load data to obtain intermediate historical load data. The intermediate historical load data is processed for missing values ​​and normalized to obtain the target historical load data.

7. The ultra-short-term load forecasting method according to claim 6, characterized in that, Based on the initial historical load data and the rate of change of the data points in the initial historical load data, an outlier removal operation is performed on the initial historical load data to obtain intermediate historical load data, including: Calculate the first mean and first standard deviation of the initial historical load data, and calculate the second mean and second standard deviation of the rate of change of the data points of the initial historical load data; Based on the initial historical load data, the rate of change of the data points of the initial historical load data, the first average value, the first standard deviation, the second average value, and the second standard deviation, a control interval is constructed; Delete the data points in the initial historical load data that do not meet the control interval to obtain intermediate historical load data.

8. A short-term load forecasting device, characterized in that, include: The data acquisition module is used to acquire the target prediction input data length corresponding to the predetermined target load prediction model, and to acquire the initial historical load data according to the target prediction input data length; The target load prediction model is a reference load prediction model selected from multiple reference load prediction models whose prediction error conforms to the prediction error rules; the reference load prediction model is generated based on the centroid vector corresponding to the length of the reference prediction input data. The process of determining the target load forecasting model includes: acquiring historical load data samples; performing data preprocessing on the historical load data samples to obtain target load data samples; calculating the autocorrelation coefficient on the target load data samples to obtain multiple reference forecast input data lengths; determining the centroid vector corresponding to the reference forecast input data lengths, and constructing a reference load forecasting model corresponding to the reference forecast input data lengths based on the centroid vectors; and selecting reference load forecasting models whose forecasting errors conform to the forecasting error rules, and using them as the target load forecasting models. The data processing module is used to calculate the rate of change of the data points of the initial historical load data, and to perform data preprocessing operations on the initial historical load data based on the initial historical load data and the rate of change of the data points of the initial historical load data to obtain the target historical load data. The load forecasting module is used to call the target load forecasting model to process the target historical load data to obtain the ultra-short-term load forecasting result corresponding to the initial historical load data.

9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor calls the program and is used to execute the ultra-short-term load forecasting method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method for forecasting short-term load of support vector machine

    CN102682219A

  • Short-term load prediction method based on TCN and IPSO-LSSVM combined model

    CN111860979A