A bus load adaptive prediction method, system, device and storage medium
By combining data cleaning and feature engineering with the XGBoost model, the accuracy problem of bus load prediction model under abnormal conditions was solved, and adaptive bus load prediction was achieved, improving prediction accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2026-03-31
AI Technical Summary
Existing bus load forecasting models have low prediction accuracy when faced with abnormal situations such as bus load transfer, changes in operating status, and maintenance, and cannot adapt to the grid environment of rapid expansion of new energy grid connection and changes in load patterns.
By acquiring numerical weather forecast data from substations and historical measured load data from busbars, data cleaning and feature engineering are performed. The XGBoost model is used for adaptive prediction, and anomalies in historical data are detected and corrected to construct an adaptive output correction strategy.
It improves the accuracy and robustness of bus load forecasting, enhances the model's adaptability, and ensures that reliable forecast results can still be provided under abnormal conditions.
Smart Images

Figure CN117613856B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to power system bus load forecasting technology, specifically to an adaptive bus load forecasting method, system, device, and storage medium. Background Technology
[0002] Bus load is defined as the total load supplied to a relatively small power supply area by the main transformer of a substation. Bus loads can be categorized into five types: urban residential load, commercial load, office load, agricultural load, and industrial load. Bus load forecasting, considering the operating characteristics of the bus system, capacity expansion decisions, natural conditions, and social impacts, studies a mathematical method to process past and future bus loads, meeting certain accuracy requirements, and determining the bus load value at a future moment. Bus load forecasting is a crucial basis for formulating power grid operation modes, calculating line transmission capacity, and thus conducting safety verification of dispatch plans and assessing the power grid's safety status. Furthermore, as the foundation for subsequent power generation dispatch plans considering safety constraints, bus load forecasting is of great significance for achieving the safety, energy efficiency, and economy of the entire power grid dispatch. Bus loads are small in scale and easily affected by meteorological changes; for example, sudden increases or decreases in temperature will cause drastic changes in residential electricity consumption, especially air conditioning load. The power grid system has numerous buses, and different bus loads are characterized by their large quantity and wide distribution. The variation patterns of each bus have their own characteristics, making in-depth analysis of the specific characteristics of each bus difficult. Furthermore, it is affected by factors related to planned grid operations. Bus load is significantly impacted by changes in grid topology. Grid line maintenance and load transfer will both affect bus load.
[0003] Current bus load forecasting efforts primarily focus on improving model and algorithm prediction performance with high-quality data. However, they lack consideration for the inconsistent quality of bus load data and the inadequacy of data processing for situations such as load transfer and maintenance. This can lead to inaccurate model predictions. Furthermore, if abnormal conditions such as load transfer or changes in operating mode occur during the model forecasting process, the model predictions may become unusable for a period of time. Taking the 220kV bus in Jiangsu Province as an example, with the establishment of the "dual carbon" target, the scale of new energy grid connection, mainly wind and photovoltaic power generation, has continued to expand rapidly. The bus load patterns are significantly different from before and change continuously over time, making the original bus load forecasting models inadequate and resulting in low prediction accuracy. Summary of the Invention
[0004] Purpose of the invention: The purpose of this invention is to provide a method, system, device and storage medium for adaptive bus load prediction, which solves the problem that the model prediction is biased due to the input and output of the model being affected by abnormalities such as historical load transfer, changes in operating status and maintenance, and improves the accuracy and robustness of bus load prediction.
[0005] Technical solution: Firstly, a method for adaptive prediction of bus load is provided, comprising the following steps:
[0006] Acquire numerical weather forecast data for substations and historical measured load data for busbars, and align them chronologically.
[0007] The aligned data is divided into a sample set and a prediction set according to the time order. The sample set is used to train and select the model, and the prediction set is used to evaluate the prediction performance of the final model.
[0008] For each weather data point in the sample set, exceedance values, abrupt changes, and continuous constant values are detected. For the load data in the sample set, exceedance values, abrupt changes, continuous constant values, as well as changes in operating mode, maintenance, and power transfer are detected.
[0009] The sample set after testing is cleaned using a strategy of either filling or discarding.
[0010] Based on the cleaned sample set, time-series features, multinomial features, and statistical features are generated.
[0011] Based on the generated features, the features are filtered using correlation coefficients and feature importance. The sample set is divided into training and validation sets using cross-validation. The selected features and parameters are used to build corresponding XGBoost prediction models. The prediction accuracy of models with different parameters on the validation set is tested. Based on the prediction accuracy of the models on the validation set, the optimal model parameters are selected.
[0012] The XGBoost prediction model is trained using the optimal model parameters and training set to obtain the optimal model. The corresponding features are constructed using the prediction set as input data. The changes in power transfer, maintenance, and operation mode in the prediction set data are analyzed and detected. The input data is repaired, and the output results of the optimal model on the prediction set and the measured load data of the prediction set are analyzed. An adaptive output result correction strategy is constructed to correct the model output results and obtain the final bus load prediction result.
[0013] Furthermore, for each weather data point in the sample set, detection of out-of-limit values, abrupt changes, and continuous constant values is performed, including:
[0014] Based on the statistical characteristics of weather data, range restrictions are imposed on the numerical weather forecast data in the sample set to detect out-of-limit values in the weather data; the 3 Sigma detection method and box plots are used. Figure 4 The quantile detection method detects local outliers in weather data; the logic-based detection method detects continuous constant values in weather data.
[0015] Furthermore, based on logical judgment detection methods, the detection of continuous constant values in weather data includes:
[0016] For meteorological element data, calculate its standard deviation and remove all meteorological element data with a standard deviation near zero, that is, do not consider the current weather when building the model;
[0017] For all meteorological elements, calculate the change range of data points in adjacent time intervals, and identify meteorological elements with change ranges less than a specified change threshold as suspected constant value data points;
[0018] The number of consecutive suspected constant value data points is counted. When the number of consecutive suspected constant value data points exceeds the set threshold for the number of consecutive constant values, these consecutive suspected constant value data points are identified as abnormal data points.
[0019] Furthermore, the load data in the sample set is subjected to detection of out-of-limit values, abrupt changes, continuous constant values, and changes in operating mode, maintenance, and power supply transfer.
[0020] Based on the statistical characteristics of bus load data and voltage levels, the range of bus loads in the sample set is limited, and out-of-limit values in the bus loads are detected.
[0021] Based on a logical judgment detection method, continuous constant values in bus load data are detected;
[0022] The bus loads in the sample set are time-series completed and aligned to obtain historical bus load data for different dates at the same time. The 3sigma detection method is used to detect local abrupt changes in bus load values and mark them as outliers.
[0023] The bus load in the sample set is divided into days and summed separately to obtain the total daily bus load. The 3sigma detection method is used to detect the days with abnormal bus load and the corresponding data is marked as anomalies.
[0024] Based on clustering algorithms, the daily bus load is clustered, and outliers are identified according to the degree of deviation between the daily bus load curve and the cluster center.
[0025] Based on the abnormal load values, changes in operating mode, maintenance, and power transfer situations are identified. Specifically, if the load value continuously exceeds a specified number of points and then returns to zero, it is identified as a maintenance anomaly; if the load value continuously decreases for a specified number of points and then recovers after a period of time, it is identified as a power transfer anomaly; if the load value continuously decreases or increases for a specified number of points and then does not recover, it is identified as a change in operating mode.
[0026] Furthermore, based on clustering algorithms, the daily bus load is clustered, and outliers are identified according to the deviation of the daily bus load curve from the cluster center, including the following steps:
[0027] The bus load data is divided into days to construct a daily bus load dataset, where the load points of one day constitute a high-dimensional sample.
[0028] Cluster the daily bus load dataset and record the cluster center for each category;
[0029] Calculate the distance between each sample in the daily load dataset and its corresponding cluster center, and sort the distances.
[0030] Mark the data with the largest percentage distance from the cluster center as data anomalies, and mark all time periods of the load data corresponding to the sample as data anomalies.
[0031] Furthermore, based on the logic-based detection method, the detection of continuous constant values in the bus load data includes:
[0032] Calculate the change amplitude of data points in adjacent time intervals, and identify bus loads with change amplitudes less than a specified change threshold as suspected constant value data points;
[0033] The number of consecutive suspected constant value data points is counted. When the number of consecutive suspected constant value data points exceeds the set threshold for the number of consecutive constant values, these consecutive suspected constant value data points are marked as abnormal data points.
[0034] Furthermore, the cleansing of the tested sample set involves either filling or discarding samples, including:
[0035] Merge all data points marked as anomalies and set the corresponding data points to null values;
[0036] All null points are categorized as follows: null points with fewer than N1 consecutive null points are interpolated using a linear interpolation algorithm; null points with more than N1 but less than N2 consecutive null points are interpolated using a multiple linear regression algorithm; null points with more than N2 consecutive null points or null points whose adjacent data points do not meet the linear regression conditions are discarded. Here, N1 and N2 are both positive integers, and N1... <N2。
[0037] Furthermore, the multiple linear regression algorithm performs interpolation, including the following steps:
[0038] The formula for constructing a multiple linear autoregressive function is as follows:
[0039] X i =β1X i-1 +β2X i-2 +…+βn X i-n
[0040] Among them, X i X represents the current sample value. i-1 ,X i-2 ,…,X i-n The sample values for the first n time steps, β1, β2, ..., β n Represents the regression coefficient;
[0041] The data is centralized, and the value of each sample is updated. Among them, X i For the i-th sample value, The mean of the sample;
[0042] Input data and use the least squares method to estimate the regression coefficients β1, β2, ..., β n The value;
[0043] The estimated value of the current outlier data point is calculated by inputting the sample values of the previous N2 time steps into the autoregressive function, and then used to repair the current outlier data point.
[0044] Furthermore, based on the cleaned sample set, time-series features, multinomial features, and statistical features are generated, including:
[0045] The periodicity of time-series data is analyzed to construct multi-dimensional time-series features and fit the periodic variation pattern of bus load data;
[0046] The nonlinear changes in load data are analyzed, polynomial features are constructed, and the model's fitting ability in high-dimensional space is extended.
[0047] Analyze the changing trends of load data, construct statistical features, and fit the future trend changes of load data;
[0048] Align time series features, multinomial features, and statistical features according to time series.
[0049] Furthermore, the analysis and detection of changes in power transfer, maintenance, and operation modes in the prediction set data, and the repair of the input data include:
[0050] Perform data quality analysis on the input data of the current prediction set to determine the reliability of the current prediction set data;
[0051] Perform statistical analysis on recent measured load data in the forecast set to determine whether power transfer or maintenance has occurred, and mark the current status and abnormal values;
[0052] The similarity of recent measured load data in the forecast set is calculated on a daily basis to determine whether the current operating mode has changed, and the current status and outliers are marked.
[0053] Interpolation or filling is performed based on the continuity of anomalies to correct input data deviations caused by unreliable data, power transfer or maintenance, or changes in bus operation mode.
[0054] Furthermore, interpolation or padding based on the continuity of outliers includes:
[0055] For outliers with fewer than N1 consecutive outliers, linear interpolation is performed; for outliers with more than N1 but less than N2 consecutive outliers, multiple linear regression is used for interpolation; for outliers with more than N2 consecutive outliers, linear interpolation is performed using points from adjacent days at the same time; where N1 and N2 are both positive integers and N1 <N2;
[0056] For other outliers, interpolation is performed using the mean of points at the same time.
[0057] Forward or backward filling is performed on all remaining outliers until there are no outliers in the prediction set.
[0058] Furthermore, data quality analysis is performed on the input data of the current prediction set to determine the reliability of the current prediction set data, including:
[0059] Analyze the missing data and record the percentage of outliers. If the missing data exceeds 50%, mark the current input data as unreliable.
[0060] Detect zero values and abrupt outliers in the data, determine whether they are genuine anomalies or data input errors, and record the percentage of outlier data.
[0061] The system detects duplicate data and continuous constant value data in the data and records the percentage of abnormal data.
[0062] Sum the percentages of outlier data. If the sum of outlier data percentages exceeds 50%, mark the current input data as unreliable.
[0063] Furthermore, the similarity of recent measured load data in the forecast set is calculated on a daily basis to determine whether the current operating mode has changed, including:
[0064] The measured load is divided into days and mapped to time points to construct a daily dataset of bus load.
[0065] Calculate the Euclidean distance between each day in the bus load daily dataset and all other days, calculate the sum of the Euclidean distances for the corresponding dates, and mark the N days with the largest sum of Euclidean distances as outliers.
[0066] After normalizing the daily load dataset of the bus load according to the daily extreme value, calculate the cosine distance between the load of the current date and the load of other dates, calculate the sum of the cosine distances of the corresponding dates, and mark the N days of data with the smallest sum of cosine distances as outliers.
[0067] Set the data marked as anomalies to null values and perform anomaly category judgment. Specifically, if the load value continuously exceeds a specified number of points, all points will be zero values, which is identified as maintenance anomaly; if the load value continuously decreases for more than a specified number of points and recovers after N days, it is identified as power transfer anomaly; if the load value continuously decreases or increases for more than a specified number of points and does not recover, it is identified as operation mode change.
[0068] Furthermore, by analyzing the output of the optimal model on the prediction set and the measured load data of the prediction set, an adaptive output correction strategy is constructed to correct the model output, including:
[0069] Based on the reliability test of the input data, it is determined whether to use the current model output as the final prediction result. If the data is reliable and the bus load operation mode is switched to normal, the current model output is used as the final prediction result.
[0070] Based on the marking of abnormal bus load periods, the current operating status of the bus is determined, and the final prediction result is output according to the current bus status. Specifically, when the bus is under maintenance, the output result is zero; when the bus is in a transfer state, the output result is a linear interpolation at the same time point; and when the operating mode is changed, the output result is the average value at the same time point.
[0071] Secondly, a bus load adaptive prediction system is provided, comprising:
[0072] The data acquisition module is configured to acquire numerical weather forecast data of the substation and historical measured load data of the busbar, and align them in time sequence.
[0073] The dataset partitioning module is configured to divide the aligned data into a sample set and a prediction set according to the time order, where the sample set is used to train and select the model, and the prediction set is used to evaluate the prediction performance of the final model.
[0074] The data anomaly detection module is configured to detect out-of-limit values, abrupt changes, and continuous constant values for each weather data in the sample set, as well as out-of-limit values, abrupt changes, continuous constant values, and changes in operating mode, maintenance, and power supply transfer for the load data in the sample set.
[0075] The data preprocessing module is configured to clean the detected sample set using a strategy of filling or discarding.
[0076] The feature engineering module is configured to generate time-series features, multinomial features, and statistical features based on the cleaned sample set.
[0077] The model building and evaluation module is configured to filter features based on the generated features using correlation coefficients and feature importance, divide the sample set into training and validation sets using cross-validation, and build corresponding XGBoost prediction models using the selected features and parameters. The prediction accuracy of models with different parameters on the validation set is tested, and the optimal model parameters are selected based on the prediction accuracy of the models on the validation set.
[0078] The adaptive correction module for prediction results is configured to train the XGBoost prediction model using the optimal model parameters and training set to obtain the optimal model. It then uses the prediction set to construct corresponding features as input data, analyzes and detects changes in power transfer, maintenance, and operation modes in the prediction set data, repairs the input data, analyzes the output results of the optimal model on the prediction set and the measured load data of the prediction set, constructs an adaptive output result correction strategy, corrects the model output results, and obtains the final bus load prediction result.
[0079] Thirdly, a computer device is provided, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the bus load adaptive prediction method as described in the first aspect of the invention.
[0080] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the bus load adaptive prediction method as described in the first aspect of the present invention.
[0081] Beneficial effects: This invention detects and repairs the changes in bus load patterns caused by power transfer, maintenance, and changes in operating modes in historical bus load data, further improving the reliability of historical bus load prediction data. At the same time, it constructs an input data anomaly repair strategy for the bus load prediction model, reducing the impact of abnormal data on model prediction and improving the robustness of the model. Finally, it constructs an adaptive prediction result repair strategy based on the prediction results, further improving the accuracy of bus load prediction, thereby providing data support for the safe and stable operation of the power system. Attached Figure Description
[0082] Figure 1 This is a flowchart illustrating an adaptive prediction method for bus load disclosed in an embodiment of the present invention.
[0083] Figure 2 This is a flowchart illustrating the anomaly detection process described in an embodiment of the present invention;
[0084] Figure 3 This is a schematic diagram of the anomaly detection results described in an embodiment of the present invention;
[0085] Figure 4 This is a schematic diagram of the data cleaning results described in an embodiment of the present invention;
[0086] Figure 5 This is a flowchart illustrating the adaptive correction process for prediction results as described in an embodiment of the present invention.
[0087] Figure 6 This is an adaptive correction prediction result diagram of the prediction results described in the embodiments of the present invention;
[0088] Figure 7 This is a schematic diagram of the structure of a bus load adaptive prediction system disclosed in an embodiment of the present invention. Detailed Implementation
[0089] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0090] Example 1
[0091] Reference Figure 1 The present invention discloses an adaptive prediction method for bus load, comprising the following steps:
[0092] Step S1: Obtain numerical weather forecast data for the substation and historical measured load data for the busbar, and align them according to time sequence.
[0093] In this embodiment, numerical weather forecast meteorological data and bus load data of a 220kV bus in Jiangsu Province from January 1, 2022 to May 25, 2023 were obtained. The relevant weather data include temperature, rainfall, irradiance, wind speed, humidity, air pressure, etc.
[0094] Step S2: Based on the dataset obtained in step S1, divide the dataset into a sample set and a prediction set in chronological order. The sample set is used to train and select models, while the prediction set is used to evaluate the prediction performance of the final model.
[0095] In this embodiment, a sample point is taken every 15 minutes. The samples from January 1, 2022 to April 25, 2023 are divided into a sample set, and the samples from April 26, 2023 to May 25, 2023 are divided into a prediction set.
[0096] Step S3: For each weather element in the sample set in step S2, perform limit exceedance, abrupt change, and continuous constant value detection. For the load data in the forecast set, perform limit exceedance, abrupt change, continuous constant value detection, as well as detection of changes in operating mode, maintenance, and power transfer.
[0097] This invention refers to the detection performed in this step collectively as data anomaly detection. (See reference...) Figure 2 Data anomaly detection mainly includes: weather and load exceeding limits detection, weather change detection, weather and load continuous constant detection, and load change detection. Among them, load change detection includes 3sigma local change detection at the same time, 3sigma continuous time period anomaly detection of the total daily load, and cluster-based detection of changes in maintenance period and operation mode.
[0098] Specifically, it includes the following steps:
[0099] In step S3.1, the weather and load exceedance values are detected.
[0100] For weather limit violation detection, based on the statistical characteristics of weather data, range restrictions are imposed on numerical weather forecast data such as temperature, wind speed, and humidity in the weather data to detect values exceeding the limits. All detected values exceeding the limits are recorded as outliers.
[0101] In this embodiment, based on the statistical data of meteorological information from Jiangsu Province over the years, relevant meteorological extreme values are obtained, and the range of each meteorological element data is limited. The extreme values of the meteorological elements are shown in Table 1 below. Since the processing here is unit-independent, the unit information is omitted in Table 1.
[0102] Table 1. Maximum and minimum values of meteorological elements
[0103] meteorological elements Maximum value Minimum value temperature 45 -10 Rainfall 250 0 Irradiance 1500 0 wind speed 40 0 wind direction 360 0 humidity 100 50 air pressure 1045 980
[0104] For load over-limit detection, based on the statistical characteristics of bus load data and voltage level, the range of bus load is limited, and over-limit values in the load data are detected. All detected over-limit values are recorded as anomalies.
[0105] In step S3.2, the 3sigma detection method is used to detect the box line. Figure 4 Quantile detection is used to detect abrupt changes in weather data.
[0106] In this step, the 3sigma detection method is used to detect outliers in the weather data. Specifically, numerical weather forecast data containing wind speed, wind direction, temperature, and humidity are subjected to 3sigma condition checks. Data records that do not meet the 3sigma condition are considered abrupt anomalies. Specifically, for each sample x∈X in the weather dataset, it is checked whether μ-3σ≤x≤μ+3σ is satisfied, where μ is the sample mean, calculated using the following formula:
[0107]
[0108] Where n represents the number of samples; X i Let represent the value of the i-th sample; σ represents the sample standard deviation; the formula for calculating the sample standard deviation σ is:
[0109]
[0110] Where n represents the number of samples; X i represents the value of the i-th sample; μ represents the mean of the current data sample.
[0111] In this step, box plots are used to analyze the data of each meteorological element. Figure 4 The quantile detection method for outlier detection includes the following steps:
[0112] (a) For meteorological data, sort the data in ascending order and then calculate the middle 25% of the values, which is the first quartile Q1 of the data, the middle 50% of the values, which is the median Q2 of the data, and the middle 75% of the values, which is the third quartile Q3 of the data.
[0113] (b) Calculate the interquartile range of meteorological elements as the difference between Q3 and Q1, i.e., IQR = Q3 - Q1. Use upper and lower limits to detect local outliers of meteorological elements. The formula for calculating the upper limit is: Q3 + 1.5 × IQR, and the formula for calculating the lower limit is Q1 - 1.5 × IQR.
[0114] (c) Perform the above-mentioned anomaly detection operations on all meteorological elements and record all anomalies.
[0115] In step S3.3, a logical judgment detection method is used to detect continuous constant value anomalies in weather and load.
[0116] The following describes the specific detection process, using the example of detecting continuous constant value anomalies in various meteorological element data. It includes the following steps:
[0117] (a) For each meteorological element, calculate its standard deviation based on the data of that element at all time points, and discard the data of that meteorological element if the standard deviation is very close to zero, for example, within a set range near zero.
[0118] (b) For the remaining meteorological element data, set a change threshold for each meteorological element and calculate the change magnitude of the meteorological element in each time interval. If the change magnitude between the current data point and the adjacent data points is less than the set change threshold, the current point is recorded as a suspected constant value data point.
[0119] For example, for ten temperature data points labeled T1 to T10, calculate the variation amplitude ΔT1 between T2 and T1, the variation amplitude ΔT2 between T3 and T2, ..., the variation amplitude ΔT9 between T10 and T9, and compare these variation amplitudes with the variation threshold T. th The size will be less than T. th The corresponding temperature value is recorded as a suspected constant value data point.
[0120] (c) Count the number of consecutive suspected constant value data points. If there are more than a set threshold number of consecutive suspected constant value data points, these consecutive suspected constant value data points are identified as abnormal data points, and the other points are normal data points. All abnormal points are marked. If there are no consecutive suspected constant value data points exceeding the set threshold, the marked suspected constant value data points are released as normal data points.
[0121] In this embodiment, the meteorological data frequency of the data weather forecast is 15 minutes, and the threshold for the number of changes is 8, that is, a constant value exceeding 8 points consecutively is considered an outlier.
[0122] For the detection of continuous constant value anomalies in load, the detection is carried out according to steps (b) and (c) of the above-mentioned method for detecting continuous constant value anomalies in meteorological elements. The only difference may be the size of the threshold, which will not be elaborated here.
[0123] In step S3.4, load mutation detection is performed, and anomalies are identified based on the temporal distribution of load mutations, including:
[0124] (a) Based on the bus load data at the same time every day, the 3sigma detection method is used to detect local abrupt changes in bus load. The specific method is as follows: the historical bus load data is time-series completed, and missing parts are replaced with null values so that the daily bus load data has the same number of samples; the data dimensions of the bus load historical data with completed time series are changed so that the time series at the same time every day is aligned; the 3sigma data anomaly detection is performed on the historical bus load data of different dates at the same time, and the anomaly points are marked.
[0125] (b) Based on the daily total bus load data, the 3sigma detection method is used to detect abnormalities in the bus load over consecutive periods. The specific method is as follows: the bus load data is divided into days and summed separately to obtain the daily total bus load dataset; the 3sigma detection method is used on the daily total bus load to detect abnormal bus load dates and the corresponding data is marked as anomalies.
[0126] (c) Using clustering methods, based on the deviation of the daily bus load curve from the cluster center, the bus load is used to detect changes in maintenance periods and operating modes. The specific method is as follows: the bus load data is divided into days to construct a daily bus load dataset, where the load points of one day constitute a high-dimensional sample; clustering is performed on the daily bus load dataset, and the cluster center of each category is recorded; the distance between each sample in the daily load dataset and its corresponding cluster center is calculated, and the distances are sorted; the 10% of data with the largest distance from the cluster center are marked as data anomalies, and the corresponding time periods of the load data are also marked as data anomalies.
[0127] (d) Classify the data anomalies according to the above anomaly detection period, as shown in Table 2 below.
[0128] Table 2. Judgment of Abnormal Categories
[0129] Classification basis Anomaly Category The load value is zero for more than 8 consecutive points. Inspection abnormality The load value dropped sharply for more than 8 points continuously, and then recovered after a period of time. abnormal transfer The load value drops or rises sharply for more than 8 consecutive points and does not recover. Change in operating mode
[0130] The anomaly detection results in the embodiments of the present invention are as follows: Figure 3 As shown, the gray line (ori) represents the measured load value, and the black dot (abnormal) represents the abnormal value.
[0131] Step S4: Clean the sample set data after the detection in step S3 using a filling or discarding strategy, including the following steps:
[0132] S4.1 Merge all data points marked as abnormal and set the corresponding data points to null values.
[0133] S4.2 Classify all null points. Null points with fewer than 4 consecutive null points are interpolated using a linear interpolation algorithm; null points with more than 4 but less than 12 consecutive null points are interpolated using a multiple linear regression algorithm; null points with more than 12 consecutive null points or null points whose adjacent data points do not meet the linear regression conditions are discarded.
[0134] Taking bus load processing as an example, for null points with more than 4 but less than 12 consecutive null points, a multiple linear regression algorithm is used for interpolation, including the following steps:
[0135] (a) Construct the multiple linear autoregressive function, the calculation formula of which is:
[0136] X i =β1X i-1 +β2X i-2 +…+β n X i-n
[0137] Among them, X i X represents the current load sample value. i-1 ,X i-2 ,…,X i-n Let β1, β2, ..., β be the load sample values for the first n time steps. n Represents the regression coefficient;
[0138] (b) Centralize the data and update the value of each sample. Among them, X i For the i-th load sample value, This represents the mean of the load sample.
[0139] (c) Input the data and estimate the regression coefficients β1, β2, ..., β using the least squares method. n The value;
[0140] (d) Input the sample values of the 12 time points before the abnormal load point into the autoregressive function to calculate the estimated value of the current abnormal point, which is used to repair the current abnormal point.
[0141] The data cleaning results in the embodiments of the present invention are as follows: Figure 4 As shown, the gray line (ori) represents the measured load value, and the black line (fixed) represents the value after repair.
[0142] Step S5: Based on the cleaned sample set data obtained in step S4, generate time-series features, multinomial features, and statistical features, including the following steps:
[0143] S5.1 Analyze the periodicity of the time series data, construct multi-dimensional time series features, and fit the periodic variation law of the bus load data. The time series features are constructed as shown in Table 3 below.
[0144] Table 3 Temporal Characteristics
[0145] Feature name meaning Sin_month Periodic features constructed in months Sin_week Periodic features constructed on a weekly basis Sin_day Periodic features constructed on a daily basis Mean_absolute_differences Mean of absolute difference with a daily period Peak to peak distance Distance between peaks and troughs on a daily basis Maximum_peak_num The number of maximum peaks in a daily cycle Minimum_peak_num Minimum number of peaks in a daily cycle Autocorrelation Autocorrelation Others Other time-series features
[0146] S5.2 Analyze the nonlinear changes in load data, construct polynomial features, and expand the model's fitting ability in high-dimensional space; the polynomial features are generated by performing four arithmetic operations on each pair of features.
[0147] S5.3 Analyze the changing trends of load data, construct statistical features, and fit the future trend changes of load data. The constructed statistical features are shown in Table 4 below.
[0148] Table 4 Statistical Characteristics
[0149] feature meaning Day_max_tmp Maximum temperature characteristics constructed on a daily cycle Day_min_tmp Minimum temperature characteristics constructed on a daily cycle Day_mean_tmp Average temperature characteristics constructed on a daily basis Day_max_humid Maximum humidity characteristics constructed on a daily cycle Day_min_humid Minimum humidity characteristics constructed on a daily cycle Day_mean_humid Average humidity characteristics constructed on a daily basis Etc… Other meteorological statistical characteristics
[0150] Step S6: Based on the cleaned sample set obtained in Step S4 and the relevant features generated in Step S5, the features are filtered using correlation coefficients and feature importance. The sample set is divided into a training set and a validation set using cross-validation. The selected features and parameters are used to construct the corresponding XGBoost prediction model. The prediction accuracy of models with different parameters on the validation set is tested. Based on the model validation accuracy, the model parameters and features are filtered, including the following steps:
[0151] S6.1 Based on the feature construction results generated in step S5, the features in the dataset are filtered according to data relevance and feature importance, including the following steps:
[0152] S6.1.1 The Pearson product-moment correlation coefficient (PCC) is used to assess the linear correlation between several other variables and the load. This variable varies between -1 and 1, and the correlation coefficient r between the two variables is... xy It can be represented as:
[0153]
[0154] in For variable x i and y i The mean.
[0155] The degree of correlation between variables is determined by the absolute value of the correlation coefficient. The larger the absolute value, the stronger the correlation. The correlation coefficients are classified as shown in Table 5 below.
[0156] Table 5. Classification of Correlation Coefficients
[0157] <![CDATA[|r xy |]]> Relevance [0,0.2] Irrelevant or weakly correlated [0.2,0.5] Moderately related [0.5,1] Strong correlation
[0158] S6.1.2 The importance of variables to the load is calculated using the maximal information coefficient (MIC) method. The calculation process is as follows: the scatter plot of variables and load is divided into grids, and the maximum mutual information value is solved; the maximum mutual information value is normalized; the maximum value of mutual information at different scales is selected as the MIC value.
[0159] S6.1.3 Calculate the PCC and MIC values of each generated feature and load in S5. Based on the calculation results, select features in the sample set with PCC values greater than 0.2 and MIC values greater than 0.5.
[0160] S6.2. The sample dataset is split into training and validation sets using cross-validation, including the following steps:
[0161] S6.2.1. Randomly shuffle the data daily.
[0162] S6.2.2 Divide the shuffled dataset into 10 approximately equal subsets. Each subset typically contains N / K samples, where N is the total number of samples and K is the cross-validation number, which is 10 in this case.
[0163] S6.2.3 Set up 10 model training iterations to evaluate the overall model performance. In each of the 10 iterations, a different subset is selected as the validation set, while the remaining subsets are used as the training set. That is, a different validation set is used to evaluate the model's performance in each iteration. For example, in the first iteration, the first subset is the validation set, and the rest are the training set; in the second iteration, the second subset is the validation set, and the rest are the training set, and so on.
[0164] S6.3 Construct the XGBoost bus load prediction model;
[0165] XGBoost is essentially an ensemble model of many classification / regression decision trees. It obtains the predicted value by summing the results of the weak classifiers in each individual tree model. The main idea of the algorithm is as follows:
[0166] (1) Base learner selection decision tree;
[0167] (2) Use an additive model for improvement, that is, add a base learner in each round to gradually approach the target function;
[0168] (3) To prevent overfitting, a normalization term is introduced at each step;
[0169] (4) Use the second derivative to perform Taylor expansion on the loss function, and use a combination of the first and second derivatives as the segmentation rule to reduce computational complexity.
[0170] S6.4. Train XGBoost models with different parameters using the corresponding training sets (i.e., the training sets corresponding to each round in the 10 iterations), and evaluate the overall performance of the models on the 10 validation sets. The evaluation formula uses the mean squared error (MSE), and its calculation formula is as follows:
[0171]
[0172] Where y i To verify the actual value of the i-th sample in the set, Let be the predicted value for the i-th sample.
[0173] S6.5. Based on the prediction accuracy of the model on the validation set, select the optimal model parameters and record them.
[0174] Step S7: Use the optimal model parameters and training set obtained in Step S6 to train the bus load XGBoost prediction model to obtain the optimal prediction model; based on the features constructed in Step S5, construct corresponding features for the prediction set obtained in Step S2, analyze and detect situations such as power transfer, maintenance, and changes in operating mode in the prediction set input data, construct an input data repair strategy, further analyze the model prediction set output results and the measured load data of the prediction set, construct an adaptive output result correction strategy, correct the model output results, and finally obtain the bus load prediction result.
[0175] In this step, the analysis and detection of changes in supply transfer, maintenance, and operating mode in the prediction set input data are performed, and the specific input data repair strategy is constructed, including:
[0176] S7.1 Perform data quality analysis on the input data of the current prediction set to determine the reliability of the current prediction set data. The specific method is as follows:
[0177] (a) Analyze the missing data and record the percentage of outliers. If the missing data exceeds 50%, mark the current prediction input data as unreliable.
[0178] (b) Detect zero values and abrupt outliers in the data, determine whether they are genuine anomalies or data input errors, and record the percentage of outlier data; detect duplicate data and continuous constant value data in the data, and record the percentage of outlier data.
[0179] (c) Sum the percentages of outlier data. If the sum of the percentages of outlier data exceeds 50%, mark the current prediction input data as unreliable.
[0180] S7.2 Perform statistical analysis on the measured load data of the prediction set obtained in step S2 to determine whether power transfer or maintenance has occurred, and mark the current status and abnormal values.
[0181] S7.3. Calculate the similarity of the measured load data of the prediction set obtained in step S2 on a daily basis to determine whether the current operating mode has changed, and mark the current status and outliers. The specific method is as follows (the judgment method is the same as in Table 2):
[0182] (a) Divide the measured load into days and match them with time points to construct a daily dataset of bus load;
[0183] (b) Calculate the Euclidean distance between each day and all other days in the bus load daily data set, calculate the sum of the Euclidean distances for the corresponding dates, and mark the 3 days with the largest sum of Euclidean distances as outliers;
[0184] (c) Normalize the daily load dataset of the bus load according to the daily maximum value. For the normalized daily load dataset, calculate the cosine distance between the load of the current date and the load of other dates, calculate the sum of the cosine distances of the corresponding dates, and mark the 3 days with the smallest sum of cosine distances as outliers.
[0185] (d) Set the data marked as outliers to null values and classify the outliers according to the judgment method shown in Table 2.
[0186] S7.4 Construct an adaptive strategy to correct input data deviations caused by unreliable data, power transfer or maintenance, or changes in bus operation. The specific methods are as follows: For outliers with fewer than 4 consecutive outliers, perform linear interpolation; for outliers with more than 4 but less than 12 consecutive outliers, use a multiple linear regression algorithm for interpolation; for outliers with more than 12 consecutive outliers, use points from adjacent days at the same time for linear interpolation; for other outliers, use the mean of points at the same time for interpolation; finally, perform forward or backward padding on all remaining outliers until there are no outliers in the prediction set.
[0187] In step S7, an output correction strategy is constructed for the predicted model output to correct the model's prediction results. (Refer to...) Figure 5 The specific methods for correcting the prediction results are as follows:
[0188] S7.5. Based on the reliability test of the input data, determine whether to use the current model output as the final prediction result;
[0189] S7.6. Based on the markers for abnormal bus load periods, determine the current operating status of the bus, using the following criteria:
[0190] (1) If the abnormal bus load period is the last two days and the bus load is zero on the last two days, then the current bus is judged to be under maintenance.
[0191] (2) If the abnormal bus load period is the last two days, and the bus load is not zero on the last two days, and the Euclidean distance and cosine similarity are large, then it is judged to be a transfer state.
[0192] (3) If the abnormal bus load period is the last two days, and the bus load is not zero on the last two days, and the cosine similarity is small, then it is judged to be a change in operating mode.
[0193] (4) If the abnormal bus load period is the middle period, then it is determined that the current bus has switched to normal status.
[0194] S7.7 Output the final prediction result based on the current state of the busbar. The output result is shown in Table 6 below.
[0195] Table 6 Prediction Output Results
[0196] state Output When the input data is reliable, and the system switches to normal mode... Model output results Overhaul The output is zero. Resupplied Linear interpolation at the same time point Change in operating mode mean at the same time point other Model output results
[0197] The adaptive correction results in the embodiments of the present invention are as follows: Figure 6 As shown in the figure, real represents the actual value, predict represents the model's predicted value, and output represents the final output result after correction. It can be seen that the corrected output value is very close to the actual value, demonstrating that the method of this invention has a significant effect on further improving the accuracy of bus load prediction.
[0198] The method of this invention detects and corrects changes in bus load patterns caused by factors such as power transfer, maintenance, and changes in operating mode in historical bus load data, further improving the reliability of historical bus load prediction data. At the same time, it constructs an input data anomaly repair strategy for the bus load prediction model, reducing the impact of abnormal data on model prediction and improving the robustness of the model. Furthermore, it constructs an adaptive prediction result repair strategy based on the prediction results, further improving the accuracy of bus load prediction, thereby providing data support for the safe and stable operation of the power system.
[0199] Example 2
[0200] Based on the same inventive concept, this embodiment provides a bus load adaptive prediction system, referring to... Figure 7 The system includes:
[0201] The data acquisition module is configured to acquire numerical weather forecast data of the substation and historical measured load data of the busbar, and align them in time sequence.
[0202] The dataset partitioning module is configured to divide the aligned data into a sample set and a prediction set according to the time order, where the sample set is used to train and select the model, and the prediction set is used to evaluate the prediction performance of the final model.
[0203] The data anomaly detection module is configured to detect out-of-limit values, abrupt changes, and continuous constant values for each weather data in the sample set, as well as out-of-limit values, abrupt changes, continuous constant values, and changes in operating mode, maintenance, and power supply transfer for the load data in the sample set.
[0204] The data preprocessing module is configured to clean the detected sample set using a strategy of filling or discarding.
[0205] The feature engineering module is configured to generate time-series features, multinomial features, and statistical features based on the cleaned sample set.
[0206] The model building and evaluation module is configured to filter features based on the generated features using correlation coefficients and feature importance, divide the sample set into training and validation sets using cross-validation, and build corresponding XGBoost prediction models using the selected features and parameters. The prediction accuracy of models with different parameters on the validation set is tested, and the optimal model parameters are selected based on the prediction accuracy of the models on the validation set.
[0207] The adaptive correction module for prediction results is configured to train the XGBoost prediction model using the optimal model parameters and training set to obtain the optimal model. It then uses the prediction set to construct corresponding features as input data, analyzes and detects changes in power transfer, maintenance, and operation modes in the prediction set data, repairs the input data, analyzes the output results of the optimal model on the prediction set and the measured load data of the prediction set, constructs an adaptive output result correction strategy, corrects the model output results, and obtains the final bus load prediction result.
[0208] It should be understood that the bus load adaptive prediction system in this embodiment can implement all the technical solutions in the above method embodiments. The functions of each functional module can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above embodiments, which will not be repeated here.
[0209] Example 3
[0210] This embodiment provides a computer device, including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs, when executed by the processors, implement the steps of the bus load adaptive prediction method as described above.
[0211] Example 4
[0212] This embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the bus load adaptive prediction method as described above.
[0213] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus (systems), computer devices, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0214] This invention is described with reference to a flowchart of a method according to embodiments of the invention. It should be understood that each step in the flowchart and combinations thereof can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A device for a function specified in one or more processes.
[0215] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.
[0216] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.
Claims
1. A bus load adaptive prediction method, characterized by, The method comprises the following steps: Obtain substation numerical weather forecast data and bus historical measured load data, and align them in time sequence; According to the time sequence, the aligned data is divided into a sample set and a prediction set, wherein the sample set is used for training and selecting a model, and the prediction set is used for evaluating the prediction effect of the final model; For each weather data in the sample set, the out-of-limit value, mutation value, and continuous constant value are detected, and the load data in the sample set is detected for out-of-limit value, mutation value, continuous constant value, and change of operation mode, maintenance, and power supply; The detected sample set is cleaned by using a filling or discarding strategy; Based on the cleaned sample set, time sequence features, polynomial features, and statistical features are generated; including: analyzing the periodicity of time sequence data, constructing multi-dimensional time sequence features, and fitting the periodicity of bus load data; analyzing the nonlinear change of load data, constructing polynomial features, and extending the fitting ability of the model in high-dimensional space; analyzing the trend of load data, constructing statistical features, and fitting the future trend of load data; aligning the time sequence features, polynomial features, and statistical features in time sequence; Based on the generated features, the features are selected using correlation coefficients and feature importance, the sample set is divided into a training set and a validation set in a cross-validation manner, and the corresponding XGBoost prediction model is constructed using the selected features and parameters, the prediction accuracy of the model on the validation set is tested, and the optimal model parameters are selected according to the prediction accuracy of the model on the validation set; The XGBoost prediction model is trained using the optimal model parameters and the training set to obtain an optimal model, the corresponding features of the prediction set are used as input data to analyze and detect the power supply, maintenance, and operation mode change in the prediction set data, the input data is repaired, and the output result of the optimal model on the prediction set and the measured load data of the prediction set are analyzed to construct an adaptive output result correction strategy, the model output result is corrected, and the final bus load prediction result is obtained; wherein, analyzing and detecting the power supply, maintenance, and operation mode change in the prediction set data, repairing the input data, including: performing data quality analysis on the input data of the current prediction set to determine the reliability of the current prediction set data; performing statistical analysis on the measured load data in the prediction set to determine whether power supply or maintenance occurs, and marking the current state and abnormal value; calculating the similarity of the measured load data in the prediction set by day to determine whether the current operation mode changes, and marking the current state and abnormal value; according to the continuous situation of the abnormal points, interpolation processing or filling is performed to repair the input data deviation caused by unreliable data, power supply or maintenance, and change of bus operation mode.
2. The method of claim 1, wherein, The out-of-limit value, mutation value, and continuous constant value detection for each weather data in the sample set comprises: Based on the statistical characteristics of weather data, the range of the numerical weather forecast data in the sample set is limited, and the out-of-limit values in the weather data are detected; the 3sigma detection method and the box plot 4 quantile detection method are used to detect the local outliers in the weather data; and the continuous constant values in the weather data are detected based on the logical judgment detection method.
3. The method of claim 2, wherein, The detection of the continuous constant values in the weather data based on the logical judgment detection method comprises the following steps: For meteorological element data, the standard deviation is calculated, and all meteorological element data with a standard deviation near zero value are removed, that is, the current meteorological element is not considered when building the model; For all meteorological elements, the change amplitude of adjacent time interval data points is calculated, and the meteorological elements with a change amplitude less than a specified change threshold are identified as suspected constant value data points; The number of continuous suspected constant value data points is counted, and when the number of continuous suspected constant value data points exceeds a set continuous constant value number threshold, these continuous suspected constant value data points are identified as abnormal data points.
4. The method of claim 1, wherein, The detection of the out-of-limit values, sudden change values, continuous constant values, and operation mode changes, maintenance, and transfer supply conditions of the load data in the sample set comprises the following steps: Based on the statistical characteristics of busbar load data and voltage levels, the range of the busbar load in the sample set is limited, and the out-of-limit values in the busbar load are detected; Based on the logical judgment detection method, the continuous constant values in the busbar load data are detected; The busbar load in the sample set is time-series filled and aligned to obtain busbar load historical data of different dates at the same time, and the 3sigma detection method is used to detect local sudden change values of the busbar load, which are marked as abnormal points; The busbar load in the sample set is segmented by day and summed up respectively to obtain the total amount of busbar daily load, and the 3sigma detection method is used to detect the busbar load abnormal dates, which are marked as abnormal points; Based on the clustering algorithm, the busbar daily load is clustered, and the abnormal points are identified according to the deviation degree of the daily busbar load curve from the cluster center; According to the abnormal points of the load value, the operation mode change, maintenance, and transfer supply conditions are identified, wherein the points with continuous load values exceeding a specified number of zero values are identified as maintenance abnormalities; the points with continuous load values decreasing by more than a specified number and recovering after a period of time are identified as transfer supply abnormalities; and the points with continuous load values decreasing or increasing by more than a specified number and not recovering are identified as operation mode changes.
5. The method of claim 4, wherein, Based on the clustering algorithm, the busbar daily load is clustered, and the abnormal points are identified according to the deviation degree of the daily busbar load curve from the cluster center, comprising the following steps: The busbar load data is segmented by day to construct a busbar daily load data set, wherein the load points of a day constitute a high-dimensional sample; The busbar daily load data set is clustered, and the cluster center of each category is recorded; The distance between each sample in the daily load data set and its corresponding cluster center is calculated, and the distance is sorted; The specified percentage of data with the largest distance from the cluster center is marked as data abnormality, and the load data time period corresponding to the sample is also marked as data abnormality.
6. The method of claim 4, wherein, The detection method based on logical judgment comprises the following steps: Detecting continuous constant values in the bus load data, including: Calculating the change amplitude of adjacent time interval data points, and identifying the bus load with a change amplitude less than a specified change threshold as a suspected constant value data point; 7. The method of claim 1, wherein, Counting the number of continuous suspected constant value data points, and marking the continuous suspected constant value data points as abnormal data points when the number of continuous suspected constant value data points exceeds a set constant value number threshold. The sample set after detection is cleaned up by using a filling or discarding strategy, including: Combining all the data points marked as abnormal, and setting the data of the corresponding points to null values; 8. The method of claim 7, wherein, Classifying all the null value points, and using a linear interpolation algorithm to interpolate the null value points with a continuous null value point number less than N1; using a multivariate linear regression algorithm to interpolate the null value points with a continuous null value point number higher than N1 and less than N2; discarding the null value points with a continuous null value point number higher than N2 or the null value points whose adjacent data points do not satisfy the linear regression condition, wherein N1 and N2 are positive integers and N1 < N2. The multivariate linear regression algorithm for interpolation comprises the following steps: X i = β1X i-1 + β2X i-2 + … + β n X i-n wherein X i represents the current sample value, X i-1 , X i-2 , …, X i-n are sample values of the previous n time instants, β1, β2, …, β n represent regression coefficients; Centralizing the data, updating the value of each sample to where X i is the ith sample value, is the sample mean; Input data, estimate the regression coefficients β1, β2, …, β n using least squares; Constructing a multivariate linear autoregressive function, and the calculation formula is:
9. The method of claim 1, wherein, Inputting the sample values at the previous N2 time points of the current abnormal data point into the autoregressive function to obtain the estimated value of the current abnormal data point, which is used to repair the current abnormal data point. The interpolation processing or filling according to the continuous condition of the abnormal points comprises: Performing linear interpolation on the abnormal values with a continuous abnormal point number less than N1; using a multivariate linear regression algorithm to interpolate the abnormal points with a continuous abnormal point number higher than N1 and less than N2; using linear interpolation on the abnormal points with a continuous abnormal point number higher than N2 using the points at the same time of the adjacent days; wherein N1 and N2 are positive integers and N1 < N2; Using the mean value of the points at the same time to interpolate other abnormal points; 10. The method of claim 1, wherein, Performing forward or backward filling on all the remaining abnormal points until there is no abnormal point in the prediction set. The data quality analysis on the input data of the current prediction set to determine the reliability of the current prediction set data comprises: Analyzing the missing condition in the data, and recording the abnormal data proportion, if the missing condition exceeds 50%, the current input data is marked as unreliable; Detecting zero values and mutation abnormal values in the data, determining whether they are real abnormalities or data input errors, and recording the abnormal data proportion; Detecting repeated data and continuous constant value data in the data, and recording the abnormal data proportion; 11. The method of claim 1, wherein, Summing the abnormal data proportions, and if the total abnormal data proportion exceeds 50%, the current input data is marked as unreliable. The similarity calculation on the recent measured load data in the prediction set by day to determine whether the current operation mode has changed comprises: Segmenting the measured load by day, and corresponding by time point, to construct a bus load daily data set; Calculating the Euclidean distance of each day in the bus load daily data set from all other days, calculating the sum of the Euclidean distances of the corresponding dates, and marking the previous N days of the largest Euclidean distance sum as abnormal points; After normalizing the bus load daily load data set by the daily maximum value, the cosine distance between the current date load and other date load is calculated, the sum of the cosine distance of the corresponding date is calculated, and the first N-day data with the minimum sum of the cosine distance is marked as an abnormal point; The data marked as an abnormal point is set to a null value, and an abnormal category judgment is performed, wherein, if the load value of a point is zero for a specified number of consecutive times, the point is identified as a maintenance abnormality; if the load value of a point continuously decreases for a specified number of consecutive times and recovers after N days, the point is identified as a transfer supply abnormality; if the load value of a point continuously decreases or increases for a specified number of consecutive times and does not recover, the point is identified as a change in operation mode.
12. The method of claim 1, wherein, The output results of the optimal model on the prediction set and the measured load data of the prediction set are analyzed, and an adaptive output result correction strategy is constructed to correct the model output results, including: According to the reliability detection of the input data, it is judged whether the current model output is used as the final prediction result. If the data is reliable and the bus load operation mode is switched to the normal state, the current model output is used as the final prediction result; According to the marking of the bus load abnormal period, the current state of the bus is judged, and the final prediction result is output according to the current state of the bus, wherein, in the maintenance state of the bus, the output result is zero; in the transfer supply state, the output result is the linear interpolation of the same time point; in the operation mode change state, the output result is the average value of the same time point.
13. A bus load adaptive prediction system characterized by, It includes: A data acquisition module configured to acquire substation numerical weather prediction data and bus historical measured load data, and align the data in time sequence; A data set division module configured to divide the aligned data into a sample set and a prediction set according to the time sequence, wherein the sample set is used for training and selecting a model, and the prediction set is used for evaluating the prediction effect of the final model; A data anomaly detection module configured to detect the out-of-limit value, sudden change value, and continuous constant value of each weather data in the sample set, and detect the out-of-limit value, sudden change value, continuous constant value, operation mode change, maintenance, and transfer supply of the load data in the sample set; A data preprocessing module configured to clean the detected sample set by using a filling or discarding strategy; A feature engineering module configured to generate time sequence features, polynomial features, and statistical features based on the cleaned sample set, including: analyzing the periodicity of time series data, constructing multi-dimensional time sequence features, and fitting the periodicity of bus load data; analyzing the non-linear change of load data, constructing polynomial features, and expanding the fitting ability of the model in high-dimensional space; analyzing the trend of load data, constructing statistical features, and fitting the future trend of load data; aligning the time sequence features, polynomial features, and statistical features in time sequence; A model construction and evaluation module configured to filter features using correlation coefficients and feature importance based on the generated features, divide the sample set into a training set and a validation set in a cross-validation manner, and construct a corresponding XGBoost prediction model using the filtered features and parameters, test the prediction accuracy of the model with different parameters on the validation set, and select the optimal model parameters according to the prediction accuracy of the model on the validation set; The prediction result self-adaptive correction module is configured to train an XGBoost prediction model using the optimal model parameters and the training set to obtain an optimal model, use the prediction set to construct corresponding features as input data, analyze and detect transfer, maintenance, and operation mode change in the prediction set data, repair the input data, analyze the output result of the optimal model on the prediction set and the measured load data of the prediction set, construct an adaptive output result correction strategy, correct the model output result, and obtain the final bus load prediction result.
14. A computer device, comprising: Comprise: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs are executed by the processor to implement the steps of the bus load adaptive prediction method as claimed in any one of claims 1-12.
15. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the bus load adaptive prediction method as claimed in any one of claims 1-12.
Citation Information
Patent Citations
Big data mining technology based reliable power supply capacity evaluation method for power distribution network
CN105470951A
Bus load prediction automatic following power grid operation mode adjustment method
CN115775073A