A load forecasting and early warning method and system for areas with distributed resource distribution
By introducing a combined model of lightweight gradient boosting tree and locally weighted Gaussian process regression into the distribution network, the problem of lightweighting and high accuracy in load forecasting of distribution transformers is solved, and efficient load forecasting and early warning for distributed resource distribution areas are realized.
Patent Information
- Application Number
- CN202510980288.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-07-16
AI Technical Summary
Existing technologies struggle to effectively predict and warn of distribution transformer load conditions while simultaneously achieving lightweight models and high accuracy, especially during traditional high-load periods and when large amounts of distributed resources are connected. This results in poor accuracy of prediction simulations, insufficient model adaptability, and inadequate interpretability.
A lightweight gradient boosting tree (LGBM) is used as the main prediction model, and local weighted Gaussian process regression (LWGPR) is used for residual correction. By screening high-risk transformer areas, handling data anomalies and missing values, and introducing multi-dimensional transformer area operation characteristic data such as the number of active users, a load forecasting and early warning system is constructed.
It significantly improves the generalization ability and robustness of the prediction model, enabling it to quickly adapt to changes in transformer load data, reduce computational resource consumption, improve prediction accuracy and timely early warning, and reduce training time and weather fluctuation interference in traditional methods.
Smart Images

Figure CN120497919B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power distribution network technology, and more specifically, relates to a load forecasting and early warning method and system for distribution network areas with distributed resources. Background Technology
[0002] Overload operation of distribution transformers (hereinafter referred to as "distribution transformers") is one of the main causes of equipment failures and power outages, seriously threatening the safe and stable operation of the distribution network. Specifically: on the one hand, during traditional high-load periods (such as peak electricity consumption in summer and winter), distribution transformers are prone to prolonged overload operation, which can easily lead to equipment damage and power outages; on the other hand, in recent years, a large number of new distributed resources such as photovoltaics and charging piles have been connected to medium and low voltage distribution networks, significantly increasing load volatility and uncertainty, exacerbating the forward and reverse overload risks of distribution transformers, and bringing new challenges to the safe operation of the distribution network.
[0003] Conducting distribution transformer load forecasting and heavy / overload early warning helps operation and maintenance personnel assess the transformer's carrying capacity in advance and take preventive measures, which is an important means to ensure regional power supply safety. Current research mainly includes two types of methods: one is machine learning-based prediction models, which can comprehensively consider multi-dimensional data such as users and electricity consumption patterns at a relatively small model scale, but the accuracy of simulation results is poor; the other is a hybrid model of single / multi-stage time series prediction that integrates deep learning such as neural networks. Although it has strong nonlinear fitting capabilities, it has poor adaptability to small sample scenarios such as newly built transformer areas, limited model interpretability, long training time, untimely updates, and is easily affected by time series distribution drift. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention aims to provide a load forecasting and early warning method and system for areas with distributed resources that features a small model size and high prediction accuracy, thereby solving the problems of existing methods that struggle to balance lightweight models with high accuracy and high debugging costs.
[0005] To achieve the above objectives, according to one aspect of the present invention, a load forecasting and early warning method for areas containing distributed resource distribution zones is provided, comprising:
[0006] S1: Select high-risk transformer areas for both forward and reverse heavy / overload conditions as target transformer areas;
[0007] S2: Acquire load data, meteorological data, and time data of the target transformer area to generate a two-dimensional time-series data sample set;
[0008] S3: Obtain the ledger data, user attribute data and electricity consumption data of the target transformer area, and process them to generate characteristic operation datasets for each transformer area;
[0009] S4: Merge the two-dimensional time series data sample set and the transformer area feature operation dataset according to transformer area and timestamp to generate the prediction model training sample dataset;
[0010] S5: Build a Lightweight Gradient Boosting Machine (LGBM) as the main prediction model, input the training sample dataset for training, and use the Bayesian optimization algorithm to optimize the hyperparameters of the main prediction model;
[0011] S6: Following steps S2 to S4, obtain relevant data for all transformer areas to be predicted from the prediction date to the month preceding it, form a dataset to be predicted, and input it into the trained master prediction model to obtain the load prediction results of the master prediction model from the prediction date to the month preceding it.
[0012] S7: Process the data obtained in step S6, calculate and filter out the 7 days that are most similar to the weather of the day to be predicted, and construct a residual dataset using the meteorological data of these 7 days, the load prediction results of the master prediction model, and the prediction residual data.
[0013] S8: Based on Local Weighted Gaussian Process Regression (LWGPR), a residual correction model is established. The residual dataset is used as the training set, and the load prediction results of the main prediction model and meteorological data on the prediction day are used as the prediction input to obtain the load residual correction value on the prediction day.
[0014] S9: The load forecast results of the main forecast model for the forecast area on the forecast day are superimposed with the load residual correction value for the forecast day to obtain the final load forecast result; based on the forecast load level, the operating risk of the distribution transformer is assessed, and a heavy / overload warning message for the distribution area is issued.
[0015] Preferably, in step S1, the process of screening high-risk areas for forward and reverse heavy / overload conditions is as follows:
[0016] S101: Input the prediction period and filter the transformer areas that have experienced positive or negative heavy / overload in the past 3 months and the same month of the previous year from the historical database;
[0017] S102: Search for transformer stations whose absolute load rate exceeds 60% within one week before the forecast period and within ±1 week of the same period of the previous year.
[0018] S103: In the event of a holiday, supplement the search by checking the absolute value of the load rate exceeding 60% within ±1 week of the same holiday in the previous year.
[0019] Preferably, the specific process in step S2 is as follows:
[0020] S201: Obtain load data and meteorological data for the target transformer area. The load data is the historical daily load of the transformer area, covering the data for the three months preceding the forecast month and the same period last year; the meteorological data includes temperature, humidity, and rainfall; the time data is generated from the timestamps of the load data, including month, date, day of the week, and whether it is a holiday, etc.; all time series data are accurate to the hour, with a total of 24 data points per day for each transformer area;
[0021] S202: Remove abnormal load data that exceeds twice the capacity of the corresponding target area, and fill in the missing load and time data using least squares regression and linear interpolation.
[0022] S203: For the processed target area load data, calculate the quartile values and the maximum and minimum load values for each month and each area, mark abnormal load data, and obtain the abnormality rate of the target area data on a daily basis.
[0023] S204: Use box plots to remove outliers in meteorological data such as temperature and humidity, and use least squares regression to fill in the missing meteorological data;
[0024] S205: Integrate the processed and cleaned data to generate a two-dimensional time series data sample set.
[0025] Preferably, in step S203, the specific steps for processing the load data within the target distribution area using the box plot method and obtaining the data anomaly rate within the target distribution area daily are as follows: (1) Detect abnormal load data based on the degree to which the data deviates from the average level, and statistically determine the upper quartile Q3, lower quartile Q1, and interquartile range IQR = Q3-Q1. (2) The proportion of abnormal data in the three days prior to the date is calculated daily as the abnormality rate.
[0026] Preferably, the specific steps of step S3 are as follows:
[0027] S301: Obtain the ledger data, daily electricity consumption data of users, and user attribute data of the target distribution area. The daily electricity consumption data of users covers the three months before the forecast month and the same month last year.
[0028] S302: For each day, count the number of active users and electricity consumption of the target distribution area and different types of users within the target distribution area; the definition of an active user is: whose electricity consumption exceeds the threshold on 2 out of the last 3 days.
[0029] S303: Calculate the total electricity consumption of the target distribution area and various types of users within the target distribution area each day;
[0030] S304: Integrate the daily active capacity and electricity consumption of various users, and combine them with user attribute information to form a comprehensive characteristic dataset of the transformer area operation.
[0031] Preferably, the specific process of step S5 is as follows:
[0032] S501: Construct a lightweight gradient boosting tree as the primary prediction model;
[0033] S502: Use the hourly load of each area in the sample dataset as the prediction target value and the remaining features as input values to train the main prediction model;
[0034] S503: The optimal hyperparameters of the master prediction model are determined using the Bayesian optimization algorithm.
[0035] Furthermore, in step S6, the areas to be predicted include, but are not limited to, the high-risk areas screened in step S1, and the relevant data obtained include all data types involved in steps S2 and S3, with the data time range covering the prediction date and the month preceding it.
[0036] Furthermore, in step S7, for the area to be predicted, based on meteorological data such as daily maximum temperature, average temperature, minimum temperature, daily rainfall, average humidity, and weather conditions (e.g., sunny, cloudy), the Euclidean distance between the prediction date and each day in the previous month is first calculated, and a time decay factor is generated by combining the difference in the number of days between the two dates. The product of distance and time decay factor is used as the weather similarity index. The seven days with the highest weather similarity to the area to be predicted are selected, and data from five dimensions—temperature, humidity, rainfall, residuals between the master forecast model load prediction results and actual observations—are used to construct a residual dataset.
[0037] Preferably, the specific process of step S8 is as follows:
[0038] S801: The residual dataset contains temperature, humidity, rainfall, and load prediction results from the master prediction model. The residual between the load prediction results from the master prediction model and the actual observed values is used as the training set.
[0039] S802: The test set is the predicted temperature, humidity, rainfall, and load prediction results of the master prediction model for the predicted day.
[0040] S803: Build a locally weighted Gaussian process regression model, input the training set and test set into the residual correction model and train it to generate the load residual correction results for the predicted day of the transformer area to be predicted.
[0041] Further, in step S9, transformer substations where the predicted absolute load reaches 80% of the transformer's rated capacity for more than 2 hours are classified as heavily loaded substations, and transformer substations where the predicted absolute load reaches 100% of the transformer's rated capacity for more than 2 hours are classified as overloaded substations; the rest are classified as normal substations. Taking the 1-hour load data in this invention as an example, the substation operation risk assessment is shown in the table below:
[0042]
[0043] The present invention also discloses a load forecasting and early warning system for areas with distributed resource units, including a memory and a processor. The memory stores a computer program, which executes the steps of the above-described load forecasting and early warning method for areas with distributed resource units when the processor runs.
[0044] In summary, by comparing the above-described technical solutions conceived in this invention with the prior art, the following beneficial effects can be achieved:
[0045] (1) The innovative introduction of multi-dimensional distribution area operation characteristic data such as the number of active users and the electricity consumption of active photovoltaic users significantly improves the generalization ability of the prediction model, effectively simulates the impact of various distributed resource access on the distribution area load, and realizes the accurate characterization of the load change trend of different types of distribution areas.
[0046] (2) By using various data cleaning and missing value completion methods such as box plot method and least squares regression method, the interference of outliers and missing data on model training results is effectively reduced, ensuring data quality and model robustness.
[0047] (3) Using LGBM as the main prediction model for load prediction has the advantages of small model size, low training cost and strong interpretability, which can effectively improve the efficiency of model training and iteration and reduce the drift problem of time series prediction.
[0048] (4) An improved locally weighted Gaussian process regression model was established by using the date to be predicted as the baseline and selecting the 7 days with the highest weather similarity to the target date from the previous month's time window to form a training set. The output of the LGBM master prediction model was then adjusted using rolling residuals. This approach selects 7 days of highly correlated data within the past month as training samples, which significantly reduces computational resource consumption and avoids the weather fluctuation interference that may be introduced by using only short-term continuous data, thereby improving the robustness and adaptability of the model.
[0049] (5) By introducing an improved local weighting mechanism, the limitations of traditional methods such as Gaussian process regression, which require waiting for the training set to accumulate new distribution data for several days before they can adapt to changes and make up for residuals, are effectively overcome. This allows for faster adaptation to and tracking of the distribution changes of transformer load data, thereby significantly improving the accuracy of the results. Attached Figure Description
[0050] Figure 1 This is a flowchart of the method of the present invention.
[0051] Figure 2 This is a graph showing the load prediction results of the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0053] This invention proposes a load forecasting and early warning method and system for distribution transformer areas with distributed resources. It can balance lightweight model and high accuracy, effectively solving the problems of high debugging cost and poor applicability of existing methods. It has good forecasting effect on various distribution transformer areas with distributed resources.
[0054] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0055] like Figure 1 As shown, the load forecasting and early warning method for areas with distributed resources in this embodiment includes the following steps:
[0056] S1: Select high-risk transformer areas for both forward and reverse heavy / overload conditions as target transformer areas;
[0057] S2: Acquire load data, meteorological data, and time data of the target transformer area to generate a two-dimensional time-series data sample set;
[0058] S3: Obtain the ledger data, user attribute data and electricity consumption data of the target transformer area, and process them to generate characteristic operation datasets for each transformer area;
[0059] S4: Merge the two-dimensional time series data sample set and the transformer area feature operation dataset according to transformer area and timestamp to generate the prediction model training sample dataset;
[0060] S5: Build a Lightweight Gradient Boosting Machine (LGBM) as the main prediction model, input the training sample dataset for training, and use the Bayesian optimization algorithm to optimize the hyperparameters of the main prediction model;
[0061] S6: Following steps S2 to S4, obtain relevant data for all transformer areas to be predicted from the prediction date to the month preceding it, form a dataset to be predicted, and input it into the trained master prediction model to obtain the load prediction results of the master prediction model from the prediction date to the month preceding it.
[0062] S7: Process the data obtained in step S6, calculate and filter out the 7 days that are most similar to the weather of the day to be predicted, and construct a residual dataset using the meteorological data of these 7 days, the load prediction results of the master prediction model, and the prediction residual data.
[0063] S8: Based on Local Weighted Gaussian Process Regression (LWGPR), a residual correction model is established. The residual dataset is used as the training set, and the load prediction results of the main prediction model and meteorological data on the prediction day are used as the prediction input to obtain the load residual correction value on the prediction day.
[0064] S9: The load forecast results of the main forecast model for the forecast area on the forecast day are superimposed with the load residual correction value for the forecast day to obtain the final load forecast result; based on the forecast load level, the operating risk of the distribution transformer is assessed, and a heavy / overload warning message for the distribution area is issued.
[0065] Step S1 involves selecting high-risk transformer areas as target areas, and the process is as follows:
[0066] S101: Input the forecast period and filter from the historical database the transformer areas in the province that have experienced positive or negative heavy / overload in the past 3 months and the same month of the previous year;
[0067] S102: Search for transformer stations whose absolute load rate exceeds 60% within one week before the forecast period and within ±1 week of the same period of the previous year.
[0068] S103: In the event of a holiday, supplement the search by checking the absolute value of the load rate exceeding 60% within ±1 week of the same holiday in the previous year.
[0069] Specifically, in step S103, since the corresponding Gregorian calendar dates for traditional holidays (such as the Spring Festival) vary each year, in order to avoid data deviations caused by different holiday dates, this step supplements the search for the same holidays of the previous year and the week before and after them.
[0070] Step S2 includes the following steps:
[0071] S201: Obtain load data and meteorological data for the target transformer area. The load data is the historical daily load of the transformer area, covering the data for the three months preceding the forecast month and the same period last year; the meteorological data includes temperature, humidity, and rainfall; the time data is generated from the timestamps of the load data, including hour, date, month, day of the week, and whether it is a holiday, etc.; all time series data are accurate to the hour level, with a total of 24 data points per day for each transformer area;
[0072] In this step, the historical daily load of the transformer substation is the time series data of the three-phase average power load. The raw load data is collected every 15 minutes, that is, data is collected once every 15 minutes from 00:00 to 23:59 each day. Since the meteorological data is collected every hour, to facilitate data alignment, the load data collection frequency is downsampled to once per hour, so that each transformer substation obtains 24 load data points per day. The load data is denoted as... , Let p be the load data for time t, where t = {1, 2, ..., 24}, and the rated capacity of the distribution transformer be denoted as p. cap .
[0073] Specifically, in step S201, the time data generation process is as follows: based on the timestamp of the load data, extract the corresponding month, number of days in the month, and number of hours in the day, etc.; at the same time, according to the weekday information, Monday to Friday are marked as working days (marked as 0), and Saturday, Sunday and statutory holidays are marked as rest days (marked as 1).
[0074] S202: Remove abnormal historical load data that exceeds twice the capacity of the corresponding target area, and fill in the missing load and time data using least squares regression and linear interpolation.
[0075] S203: For the processed target area load data, calculate the quartile values and maximum and minimum load values for each month and each area. Mark abnormal load data and obtain the abnormality rate of the target area data daily.
[0076] In this step, firstly, based on the monthly load data for each target transformer area, the upper quartile (Q3), lower quartile (Q1), and maximum and minimum load values of the sample are statistically analyzed to calculate the interquartile range (IQR). For loads falling within the range... Data points outside of these categories are marked as abnormal load data. Subsequently, daily statistics are compiled, and the proportion of abnormal load data in each target area within the previous 3 days to the total data volume of those 3 days is used as the abnormality rate for that target area on that day, which is then used for subsequent abnormal data removal and data quality control.
[0077] S204: Use box plots to remove outliers in meteorological data such as temperature and humidity, and use least squares regression to fill in the missing meteorological data;
[0078] S205: Integrate the processed and cleaned data to generate a two-dimensional time series data sample set;
[0079] Specifically, in step S205, the characteristics of the formed two-dimensional time series data sample set are: each row corresponds to the load, weather and time-related data of a certain transformer area at a certain time.
[0080] The above data cleaning process can effectively solve the problems of data anomalies and missing data caused by abnormal acquisition of measuring equipment and noise interference, improve the quality of time series data of distribution transformer areas, and provide a good data foundation for distribution transformer load forecasting and heavy / overload early warning.
[0081] Step S3 includes the following steps:
[0082] S301: Obtain the target transformer area's ledger data, daily electricity consumption data, and user attribute data. Daily electricity consumption data covers the three months preceding the forecast month and the same period last year. User attribute markers include: residential user identifier, photovoltaic power generation facility identifier, and charging pile user identifier. Ledger data includes the city / prefecture-level city where the transformer area is located, whether it is an urban area, and the transformer area's capacity.
[0083] S302: For each day, count the number of active users and electricity consumption of the target distribution area and different types of users (such as residents, photovoltaic, charging piles, etc.) within the target distribution area. An active user is defined as someone whose electricity consumption (generation) exceeds the threshold on two out of the last three days. Total active electricity consumption is defined as the average electricity consumption (generation) of this type of active user over the last three days.
[0084] Specifically, in step S302, the criteria for determining active users are as follows: for residential users, the criterion is whether their daily electricity consumption exceeds 2 kWh; for photovoltaic and charging pile users, the criterion is whether their daily electricity consumption / generation exceeds 5 kWh. These criteria can be adjusted according to the model's prediction performance and the prediction period.
[0085] S303: Obtain the total electricity consumption of the target distribution area and various users (such as residents, photovoltaic, charging piles, etc.) within the target distribution area each day.
[0086] S304: Integrate daily active capacity and electricity consumption data of various users, and combine them with user attributes to form a comprehensive characteristic operation dataset for the power distribution area.
[0087] Specifically, the characteristics of the comprehensive feature dataset of the transformer substation formed in step S304 are as follows: each row corresponds to the total electricity consumption, active electricity consumption, active residential electricity consumption, and active photovoltaic power generation of a certain transformer substation on a certain day.
[0088] By processing and generating comprehensive characteristic operation data of the transformer substation through the above steps, the generalization ability of the model can be greatly enhanced, effectively supporting the comprehensive modeling and accurate simulation of the load characteristics of various transformer substations containing distributed resources (such as photovoltaics, charging piles, etc.).
[0089] Step S5 includes the following steps:
[0090] S501: Build a lightweight gradient boosting tree (LGBM) model as the main prediction model. The hyperparameters of the lightweight gradient boosting tree include tree structure parameters (maximum leaf tree, maximum tree depth, minimum number of samples per leaf node), regularization parameters (data sampling ratio per iteration, sampling frequency, proportion of selected features), and learning rate.
[0091] S502: Use the hourly load of each area in the sample dataset as the prediction target value and the remaining features as input values to train the lightweight gradient boosting tree.
[0092] S503: The optimal hyperparameters of the lightweight gradient boosting tree are determined using the Bayesian optimization algorithm.
[0093] Specifically, in step S502, the sample dataset is randomly divided into a training sample set and a validation sample set, with the training sample set accounting for 80% and the validation sample set accounting for 20%. The main prediction model is updated with data and retrained every half month.
[0094] Specifically, the principle of lightweight gradient boosting trees is as follows:
[0095] Lightweight Gradient Boosting Machine (LGBM) is an efficient Gradient Boosting Decision Tree (GBDT) framework. This method iteratively trains multiple classification and regression trees. Each new tree is used to fit the residuals of the previous model's predictions, and the growth direction of the new tree is guided by the negative gradient of the loss function (i.e., the residuals), gradually bringing the model's predictions closer to the true values. LGBM uses an efficient histogram binning method to accelerate feature splitting and introduces a leaf node-first splitting strategy (unlike traditional layer-by-layer splitting), further improving the model's training speed and prediction accuracy. The Lightweight Gradient Boosting Machine is shown in the following equation:
[0096] ;
[0097] in, This represents the predicted value of the u-th sample. Let u represent the u-th sample. For the collection space of trees, The model representing the nth tree, This represents the number of models.
[0098] The lightweight gradient boosting tree uses a leaf-based tree splitting strategy, selecting only the leaf node with the largest splitting gain in each round, rather than splitting nodes at the same level in parallel. The gain function can be expressed as:
[0099] ;
[0100] ;
[0101] in, For model gain, The term "split gain" is used, where "leaf" represents the leaf node, and "current bestleaf" indicates the leaf node with the largest gain in the current iteration of the tree splitting strategy generated by the leaf node. , These represent the gradients of the left and right leaf nodes, respectively. , λ represents the gradient and Hessian sum of the left and right leaf nodes, respectively, and λ is the L2 regularization coefficient. Unlike the traditional GBTD algorithm, LGBM does not sort continuous features and traverse split points when calculating the gain during splitting. Instead, it first performs histogram interval (binding) analysis on the features and only searches for the optimal split point on the finite bin boundaries, which greatly speeds up the process and reduces space complexity.
[0102] To evaluate the prediction performance, prediction result evaluation indicators are established. Three indicators are used to measure the deviation between the predicted value and the actual value: mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE). RMSE is used as the performance indicator of LGBM to correct the prediction error of the master prediction model.
[0103] Specifically, in step S6, the transformer areas to be predicted include, but are not limited to, the high-risk transformer areas screened in step S1. The relevant test data obtained includes all data types involved in steps S2 and S3, and the data time range covers the prediction date and the month preceding it. The above test data is processed according to the methods in steps S2 to S4 and input into the master prediction model trained in step S5 to obtain the load prediction results of the master prediction model.
[0104] Specifically, in step S7, the data obtained in S6 is processed, and the 7 days most similar to the weather forecast date are calculated and selected. The specific implementation steps are as follows:
[0105] (1) Based on the normalized meteorological data of the forecast date and each day in the previous month (including the daily maximum temperature T) max Average temperature T avg Minimum temperature T min The parameters include daily rainfall (R), average humidity (H), and weather condition (W), where weather condition W is coded as 0, 1, 2, etc., based on similarity. First, the Euclidean distance D between the predicted date and each day in the preceding month is calculated. i :
[0106] Where the subscript 0 represents the forecast day, i represents the historical day, and γ represents the weather state weight. To predict the daily maximum temperature, This is the highest temperature ever recorded on a given day. To predict the daily average temperature, The historical daily average temperature, To predict the daily minimum temperature, This is the lowest temperature ever recorded. To predict daily rainfall, This refers to historical daily rainfall. To predict the daily average humidity, The historical daily average humidity To predict daily weather conditions, Historical weather conditions.
[0107] (2) Next, combine the difference in the number of days between the two dates. Calculate the time decay factor ,in For adjustment coefficients, For historical date i, In this embodiment, the value can be set to 0.1 to predict the date.
[0108] (3) Finally, the product of the Euclidean distance and the time decay factor is used as the weather similarity index S. i : Weather similarity index S i The smaller the value, the more similar the weather conditions are between the historical date and the predicted date.
[0109] Step S8 includes the following steps:
[0110] S801: The residual dataset contains temperature, humidity, rainfall, and load prediction results from the master prediction model. The residual between the load prediction results from the master prediction model and the actual observed values is used as the training set.
[0111] S802: The test set is the predicted temperature, humidity, rainfall, and load prediction results of the master prediction model for the predicted day.
[0112] S803: Build a locally weighted Gaussian process regression model, input the training set and test set into the residual correction model and train it to generate the load residual correction results for the predicted day of the transformer area to be predicted.
[0113] Specifically, the Locally Weighted Gaussian Process Regression (LWGPR) model is trained using daily rolling data. The principle of LWGPR is as follows:
[0114] Gaussian process regression (GPR) is a nonparametric regression method based on kernel functions and Bayesian theory, capable of generating probability distribution predictions for any input point. Locally weighted Gaussian process regression (LWGPR) builds upon GPR by introducing feature similarity weights. Based on the distance between the predicted point and historical samples in the feature space, dynamic weights are assigned to each sample, thereby improving the model's responsiveness to local feature changes and achieving more accurate regression predictions. Its specific implementation process is as follows:
[0115] (1) Prepare the training set as described in S801 ,in, For the u-th training sample, the normalized LGBM prediction value, temperature, humidity, and rainfall at that time point are included. is the output corresponding to the u-th training sample, which is the residual between the load prediction result of the master prediction model and the actual observed value at this moment. N is the total number of samples.
[0116] (2) Select one test sample from the test set. , To calculate the similarity weight for each sample in the training set, given a feature at a certain point in time, the formula is as follows: ;
[0117] in, For sample features and Similarity weights For bandwidth parameters, This represents the Euclidean distance between two features.
[0118] (3) Determine the augmentation factor for each sample in the training set based on the similarity weights:
[0119] ;
[0120] in, To the maximum expansion factor, To train the features of the samples in the training set and Maximum similarity weight, To expand the training set U for the j-th training sample based on relevant results, we obtain a local training set:
[0121] .
[0122] (4) In the local training set Construct a Gaussian process using the RBF kernel function:
[0123] ;
[0124] in, Given two input feature vectors F and kernel function values between, Let be the signal variance, and l be the length scale.
[0125] (5) For the test sample Gaussian process regression prediction is performed to obtain the predicted mean. :
[0126] ;
[0127] in, Output vectors for the local training set. For the kernel matrix of the expanded local training set , The kernel matrix of the test sample and the local samples, for The transpose of . for and kernel function values between, For test samples and kernel function values between, For noise variance, It is the identity matrix. Used to add noise terms to the kernel matrix K.
[0128] (6) Repeat steps (2) to (5) for each time point feature in the test set to obtain the residual correction values for all time points of the day to be predicted.
[0129] The following specific implementation examples further illustrate the technical solution of the present invention:
[0130] The load forecast for 1000 transformer substations in a certain province on September 1, 2024 is as follows:
[0131] Step 1) Obtain detailed information on 6314 high-risk transformer substations across the province that experienced heavy / overload events between June and August 2024 and September 2023, as well as those with an absolute load rate exceeding 60% between August 25 and 31, 2024, and between August 25 and September 8, 2023. Simultaneously, obtain historical load data and relevant meteorological data for these substations in September 2023 and June-August 2024. Remove and mark outliers from the aggregated load and meteorological data, and use least squares regression and linear interpolation to repair and fill in missing and outlier data.
[0132] Step 2) Obtain daily user data, user attribute data, and substation ledger data for high-risk substations in September 2023 and June-August 2024, and process them to generate daily characteristic operation datasets for each substation. Merge these datasets with the datasets from Step 1) according to their timestamps to obtain the training sample dataset for the prediction model. The specific data format is shown in the table below:
[0133]
[0134] Step 3) Using sample data from 6314 transformer substations prior to September 1, 2024 as the training set, construct and train an LGBM. Use a Bayesian optimization algorithm to adjust and optimize the hyperparameters of the LGBM.
[0135] Step 4) Based on Steps 1) and 2), extract the relevant input data for the 1000 transformer substations to be predicted from August 1st to September 1st, 2024—where the load on September 1st is the target to be predicted, and the meteorological information such as temperature and humidity are the meteorological forecast values obtained one day in advance. Input the test dataset into the trained LGBM master prediction model to obtain the preliminary load prediction results for the 1000 transformer substations from August 1st to September 1st. At the same time, calculate the residuals between the predicted values of the master prediction model and the actual load from August 1st to 31st.
[0136] Step 5) Using the daily maximum temperature, average temperature, minimum temperature, daily rainfall, average humidity, and weather conditions (e.g., sunny, cloudy) of September 1st as a benchmark, calculate the Euclidean distance with the corresponding meteorological data for each day in the previous month, and combine this with the difference in the number of days between the two dates to generate a time decay factor. The product of Euclidean distance and time decay factor is used as the weather similarity index, and the 7 days with the smallest index (i.e. the 7 days most similar to September 1st) are selected as references.
[0137] Step 6) For a specific forecasting area, using the 7 days with the most similar weather conditions selected in Step 5 as samples, extract the model predictions, temperature, humidity, and rainfall for these 7 days as training features, and the residuals as the training objective to construct a residual training set. Simultaneously, use the model predictions, temperature, humidity, and rainfall for this area on September 1st as the test feature set. Based on this, construct an LWGPR residual correction model, inputting the residual training set and the test feature set into the model to obtain the corrected residuals for the load of this area on September 1st.
[0138] Step 7) Add the LGBM master forecast model prediction value for the area to be predicted on September 1st to the LWGPR residual to obtain the final load forecast result for that area. Repeat steps 5)-6) to obtain the load forecast values for all areas to be predicted. Based on the load forecast results, if three consecutive load forecast values for an area exceed 80% (100%) of the area's capacity, a heavy load (overload) warning is sent. Comparative tests were conducted using three models: LGBM alone, LGBM + original GPR, and LGBM + LWGPR. The load forecast results for the above 1000 areas to be predicted are shown in the table below.
[0139]
[0140] As shown in the table, the LGBM+LWGPR forecasting method performs best in all three metrics: average MAE, average RMSE, and average MAPE. Compared to applying the LGBM model alone, the method proposed in this invention improves average MAE and average RMSE by 30.4% and 19.4%, respectively, significantly enhancing the overall accuracy of load forecasting. Compared to the LGBM+GPR method, average MAE and average RMSE are also improved by 20.9% and 8.0%, respectively.
[0141] The prediction results for a certain area containing distributed photovoltaic power generation are as follows: Figure 2 As shown, the LGBM model first predicts the general trend of load changes in the transformer area. Compared with the GPR model, the LWGPR model better corrects the prediction bias at the load peak. This improvement is due to the fact that the locally weighted Gaussian process regression method can fully explore historical samples close to the prediction point, achieving a "nearer larger, farther smaller" weight allocation, thereby further enhancing the model's ability to fit local features and correct residuals.
[0142] Another embodiment of the present invention provides a load forecasting and early warning system for areas with distributed resource units, including a memory and a processor. The memory stores a computer program, which, when run by the processor, executes the steps of the load forecasting and early warning method for areas with distributed resource units described above.
[0143] In summary, this invention proposes a method and system for load forecasting and heavy / overload early warning for distribution transformer areas with distributed resources. It employs a short-term load forecasting strategy that combines a lightweight gradient boosting tree (LGBM) master forecasting model with a locally weighted Gaussian process regression (LWGPR) residual correction model. This approach balances lightweight model design with high accuracy, effectively addressing the problems of high debugging costs and poor applicability of existing methods. It also demonstrates excellent forecasting performance for various distribution transformer areas with distributed resources.
[0144] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A load forecasting and early warning method for areas with distributed resource distribution, characterized in that, include: S1: Select high-risk transformer areas for both forward and reverse heavy / overload conditions as target transformer areas; S2: Acquire load data, meteorological data, and time data of the target transformer area to generate a two-dimensional time-series data sample set; S3: Obtain the ledger data, user attribute data and electricity consumption data of the target transformer area, and process them to generate characteristic operation datasets for each transformer area; S4: Merge the two-dimensional time series data sample set and the transformer area feature operation dataset according to transformer area and timestamp to generate the prediction model training sample dataset; S5: Build a lightweight gradient boosting tree as the master prediction model and train it using the training sample dataset. Use the Bayesian optimization algorithm to optimize the hyperparameters of the master prediction model. S6: Following steps S2 to S4, obtain relevant data for all transformer areas to be predicted from the prediction date to the month preceding it, form a sample dataset to be predicted, and input it into the trained master prediction model to obtain the load prediction results of the master prediction model from the prediction date to the month preceding it. S7: Process the data obtained in step S6. For the area to be predicted, based on the meteorological data, first calculate the Euclidean distance between the prediction date and each day in the previous month, and combine the difference in the number of days between the two dates to generate a time decay factor. The product of the distance and the time decay factor is used as the weather similarity index. Select the seven days with the highest weather similarity to the area to be predicted, and construct a residual dataset based on five dimensions: temperature, humidity, rainfall, load prediction results from the master forecasting model, and the residuals between the load prediction results from the master forecasting model and the actual observed values. S8: Based on locally weighted Gaussian process regression, a residual correction model is established. The residual dataset is used as the training set, and the load prediction results of the main prediction model and meteorological data on the prediction day are used as the prediction input to obtain the load residual correction value on the prediction day. S9: The load forecast results of the main forecast model for the forecast area on the forecast day are superimposed with the load residual correction value for the forecast day to obtain the final load forecast result; based on the forecast load level, the operating risk of the distribution transformer is assessed, and a heavy / overload warning message for the distribution area is issued.
2. The load forecasting and early warning method for areas with distributed resources according to claim 1, characterized in that the steps are as follows: In S1, the process of screening high-risk transformer areas for both forward and reverse heavy / overload conditions is as follows: S101: Input the prediction period and filter the transformer areas that have experienced positive or negative heavy / overload in the past 3 months and the same month of the previous year from the historical database; S102: Search for transformer stations whose absolute load rate exceeds 60% within one week before the forecast period and within ±1 week of the same period of the previous year. S103: In the event of a holiday, supplement the search by checking the absolute value of the load rate exceeding 60% within ±1 week of the same holiday in the previous year.
3. The load forecasting and early warning method for areas with distributed resources as described in claim 1, characterized in that, The specific process in step S2 is as follows: S201: Acquire load data and meteorological data for the target transformer area; S202: Remove abnormal load data that exceeds twice the capacity of the corresponding target area, and fill in the missing load and time data using least squares regression and linear interpolation. S203: For the processed target area load data, calculate the quartile values and the maximum and minimum load values for each month and each area, mark abnormal load data, and obtain the abnormality rate of the target area data on a daily basis. S204: Use box plots to remove outliers from meteorological data and use least squares regression to fill in the missing meteorological data; S205: Integrate the processed and cleaned data to generate a two-dimensional time series data sample set.
4. The load forecasting and early warning method for areas with distributed resources as described in claim 1, characterized in that, The specific steps of step S3 are as follows: S301: Obtain the ledger data, daily electricity consumption data of users, and user attribute data of the target distribution area. The daily electricity consumption data of users covers the three months before the forecast month and the same month last year. S302: For each day, count the number of active users and electricity consumption of the target distribution area and different types of users within the target distribution area; the definition of an active user is: whose electricity consumption exceeds the threshold on 2 out of the last 3 days. S303: Calculate the total electricity consumption of the target distribution area and various types of users within the target distribution area each day; S304: Integrate the daily active capacity and electricity consumption of various users, and combine them with user attribute information to form a comprehensive characteristic dataset of the transformer area operation.
5. A load forecasting and early warning method for areas with distributed resources as described in claim 1, characterized in that, The specific process of step S5 is as follows: S501: Construct a lightweight gradient boosting tree as the primary prediction model; S502: Use the hourly load of each area in the sample dataset as the prediction target value and the remaining features as input values to train the main prediction model; S503: The optimal hyperparameters of the master prediction model are determined using the Bayesian optimization algorithm.
6. A load forecasting and early warning method for areas with distributed resources as described in claim 1, characterized in that, In step S6, the areas to be predicted include, but are not limited to, the high-risk areas screened in step S1. The relevant data obtained include all data types involved in steps S2 and S3, and the data time range covers the prediction date and the month preceding it.
7. A load forecasting and early warning method for areas with distributed resources as described in claim 1, characterized in that, The specific process of step S8 is as follows: S801: The residual dataset contains temperature, humidity, rainfall, and load prediction results from the master prediction model. The residual between the load prediction results from the master prediction model and the actual observed values is used as the training set. S802: The test set is the predicted temperature, humidity, rainfall, and load prediction results of the master prediction model for the predicted day. S803: Build a locally weighted Gaussian process regression model, input the training set and test set into the residual correction model and train it to generate the load residual correction results for the predicted day of the transformer area to be predicted.
8. A load forecasting and early warning method for areas with distributed resources as described in claim 1, characterized in that, In step S9, the transformer substations whose predicted absolute load reaches 80% of the transformer's rated capacity and lasts for more than 2 hours are identified as overloaded substations, and those whose predicted absolute load reaches 100% of the transformer's rated capacity and lasts for more than 2 hours are identified as overloaded substations. The rest are normal substations.
9. A load forecasting and early warning system for distributed resource areas, comprising a memory and a processor, characterized in that, The memory stores a computer program, which, when executed by a processor, performs the steps of the load forecasting and early warning method for distributed resource zones as described in any one of claims 1-8.
Citation Information
Patent Citations
Distribution transformer load prediction and heavy overload early warning method and system
CN115587672A
Power load prediction method and device, equipment and storage medium
CN119990479A