A new energy station electric quantity prediction method and system based on a global-local double-layer prediction architecture
Patent Information
- Application Number
- CN202610809151.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-09-04
AI Technical Summary
[0004]发明目的:本发明提供一种基于全局-本地双层预测架构的新能源场站电量预测方法及系统旨在解决现有技术存在的单一场站数据量过少无法支撑训练、无法有效利用多场站共性规律、缺乏对特殊时段的后处理修正机制的问题
[0027]1. Solve the challenge of small sample modeling and improve prediction accuracy: Adopt a global-local two-layer architecture. The upper layer uses data from all stations to train a global model, mining common patterns such as seasons, weather, capacity, and historical trends, avoiding the problem of insufficient data from a single station to support training. The lower layer uses the output of the global model as an enhancement feature, combined with historical data from a single station to train a local model, learning individual characteristics such as equipment efficiency and operation and maintenance level, achieving a balance between common and individual characteristics, and improving prediction accuracy.
Smart Images

Figure CN122697286A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power generation prediction technology for new energy power plants, and particularly relates to a method and system for predicting power generation for new energy power plants based on a global-local two-layer prediction architecture. Background Technology
[0002] The randomness, volatility, and instability brought about by the high proportion of new energy grid connection pose a severe challenge to the safe and stable operation of the power grid. Accurately predicting the power generation of new energy is one of the core requirements for maintaining the stability of the power grid.
[0003] Currently, most forecasts of renewable energy power generation focus on short-term and ultra-short-term predictions, supporting renewable energy power plants in reporting to the grid dispatch center and participating in the electricity spot market. Research on medium- and long-term forecasts for renewable energy power plants is limited. Monthly power generation forecasts, compared to overall power generation forecasts, are primarily constrained by the lack of sufficient data for training forecasting models. Renewable energy power plants often only have one to two years of historical data, and some newer plants may only have a few months' worth. It is understood that most renewable energy power plants currently use an empirical method of averaging historical power generation for the following month, which has significant errors. Alternatively, they use a method of integrating medium- and long-term power forecasts monthly. However, while current numerical weather prediction capabilities can maintain accuracy for the next few days, the deviation rate is large for longer periods. Therefore, in most cases, it is more efficient to refer to the same period of previous years and use empirical methods to assess the next month's power generation. Furthermore, the impact of holidays is difficult to learn from, and models struggle to learn curtailment patterns from limited data, leading to distortions in the prediction of periods of sharp drops. Summary of the Invention
[0004] Purpose of the invention: This invention provides a method and system for predicting the power generation of new energy power plants based on a global-local two-layer prediction architecture. It aims to solve the problems of insufficient data from a single power plant to support training, inability to effectively utilize the common patterns of multiple power plants, and lack of post-processing correction mechanisms for special time periods in existing technologies.
[0005] Technical solution: The present invention provides a method for predicting the power generation of renewable energy power plants based on a global-local two-layer prediction architecture, comprising:
[0006] S1. Obtain the factors affecting power generation at each power station, and collect historical data of each power station based on the factors to form a dataset;
[0007] S2. Preprocess the data in the dataset and construct the original feature matrix of each category of station based on the station category;
[0008] S3. Construct an upper-level global prediction model, using the original feature matrix of each type of power station as input, and output the predicted power generation of each power station in each type of power station;
[0009] S4. The predicted power generation of each station is used as a new feature and incorporated into the original feature matrix of each station to obtain the enhanced feature matrix of each station; the lower-level local prediction model of each station is constructed, and the lower-level local prediction model of each station is trained with the enhanced feature matrix of each station as input to obtain the trained lower-level local prediction model of each station.
[0010] S5. Use the lower-level local prediction model trained at each station to obtain the preliminary monthly power generation of each station; construct corresponding adjustment factors for preset holidays, correct the predicted values of the months in which the preset holidays are located in the preliminary power generation, and obtain the final predicted power generation of each station.
[0011] Furthermore, the dataset includes historical power generation data, meteorological data, installed capacity data, planned power generation data, and shutdown plan data for each power station;
[0012] The preprocessing includes identifying outliers using the median deviation method, and filling in the identified outliers and missing values based on the ratio between the average power generation of the station to which the outlier or missing value belongs and the average meteorological data, thereby obtaining the preprocessed dataset.
[0013] Furthermore, the step of constructing the original feature matrix of each type of station based on the station category includes: extracting multi-dimensional features from the preprocessed dataset according to the station category to construct the original feature matrix of each type of station; the multi-dimensional features include time features, historical statistical features, meteorological features, capacity and planning features.
[0014] Furthermore, S3 includes: setting the hyperparameters of the XGBoost algorithm to construct an upper-level global prediction model, using the original feature matrices of each type of power station as input, learning common patterns using all power station data, and outputting the predicted power generation of each power station in each type of power station.
[0015] Furthermore, S4 includes: adjusting the hyperparameters of the XGBoost algorithm, constructing a lower-level local prediction model for each site, training the lower-level local prediction model for each site using the enhanced feature matrix of each site as input, learning individual features based on historical data of a single site, and obtaining the trained lower-level local prediction model for each site.
[0016] Furthermore, the step of constructing corresponding adjustment factors for preset holidays includes: obtaining historical data before the prediction date, identifying the months in which preset holidays are located in each year, calculating the average power generation in the months in which preset holidays are located and the average power generation in the months in which non-preset holidays are located, and using the ratio of the two as the adjustment factor for preset holidays.
[0017] Furthermore, the step of correcting the predicted values of the months containing the preset holidays in the preliminary predicted power generation includes multiplying the preliminary predicted power generation of the months containing the preset holidays by the corresponding adjustment factor to correct the final predicted power generation of each power station in the months containing the preset holidays.
[0018] The present invention discloses a power generation prediction system for renewable energy power plants based on a global-local two-layer prediction architecture, comprising:
[0019] The data acquisition module is used to acquire the factors affecting power generation at each power station, and collect historical data of each power station based on the factors to form a dataset.
[0020] The data processing module is used to preprocess the centralized data in the dataset and construct the original feature matrix of each type of station based on the station category.
[0021] The global prediction module is used to build the upper-level global prediction model. It takes the original feature matrix of each type of power station as input and outputs the predicted power generation of each power station in each type of power station.
[0022] The local prediction module is used to incorporate the predicted power generation of each power station as a new feature into the original feature matrix of each power station to obtain the enhanced feature matrix of each power station; and to construct the lower-level local prediction model of each power station. The lower-level local prediction model of each power station is trained by taking the enhanced feature matrix of each power station as input to obtain the trained lower-level local prediction model of each power station.
[0023] The adjustment factor correction module is used to obtain the preliminary monthly power generation forecast of each power station using the lower-level local prediction model trained at each power station; it constructs corresponding adjustment factors for preset holidays to correct the predicted values of the months in which the preset holidays are located in the preliminary power generation forecast, and obtains the final predicted power generation of each power station.
[0024] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.
[0025] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0026] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0027] 1. Solve the challenge of small sample modeling and improve prediction accuracy: Adopt a global-local two-layer architecture. The upper layer uses data from all stations to train a global model, mining common patterns such as seasons, weather, capacity, and historical trends, avoiding the problem of insufficient data from a single station to support training. The lower layer uses the output of the global model as an enhancement feature, combined with historical data from a single station to train a local model, learning individual characteristics such as equipment efficiency and operation and maintenance level, achieving a balance between common and individual characteristics, and improving prediction accuracy.
[0028] 2. Effectively correct for the impact of holidays: Adjustment factors are constructed for holidays such as the Spring Festival and post-processing is performed to solve the problem that the model cannot learn the power rationing pattern due to the scarcity of samples, thereby improving the prediction effect of holiday months.
[0029] 3. Enhance model robustness: The global model and the local model adopt different parameter settings. The global model uses more decision trees and greater depth to learn common patterns; the local model reduces the number of trees, reduces the depth, and increases the learning rate to prevent overfitting on small samples and enhance model robustness. Attached Figure Description
[0030] Figure 1 This is a flowchart of the method of the present invention.
[0031] Figure 2 This is a flowchart of the calculation process for the adjustment factor of the Spring Festival in this invention.
[0032] Figure 3 This is a schematic diagram illustrating the changes in actual and planned power generation over time.
[0033] Figure 4 This is a schematic diagram illustrating the variation of power generation with average meteorological conditions.
[0034] Figure 5 A comparison chart showing the impact of the Spring Festival adjustment factor on prediction accuracy. Detailed Implementation
[0035] like Figure 1 As shown, the present invention provides a new energy power generation prediction method based on a global-local two-layer prediction architecture, comprising:
[0036] S1. Based on the relevant factors affecting the monthly power generation of photovoltaic and wind turbines, obtain data such as the power generation of new energy power stations, local weather (monthly average irradiance, temperature, and wind speed at the location of the power station), installed capacity of the power station, planned power generation, and shutdown plans, and form a dataset.
[0037] S2. Preprocess the data in the dataset and construct the original feature matrix according to the station category;
[0038] Specifically, for power generation forecasting, due to the limited data volume, box plots cannot be used to detect outliers, resulting in a waste of valuable data. Since outlier identification primarily aims to identify extreme anomalies, this invention employs the median deviation method for outlier identification: first, the median M is calculated for each station's historical power generation and meteorological data; then, the deviation for each data point is calculated. , For the first in the dataset There are 10 data points; the median of the deviation is denoted as MAD, and the normal data range is represented as:
[0039] [ ];
[0040] in, is a coefficient.
[0041] After identifying outliers, the data at the outliers needs to be replaced with padding. Similarly, after identifying missing values, the missing data needs to be filled in. This process yields a preliminary dataset. The missing or outlier values are primarily historical electricity data. The padding calculation formula is as follows:
[0042] ;
[0043] in, For the first The value that needs to be inserted for each outlier or missing point; Meteorological data corresponding to outliers or missing points; This represents the average monthly power generation of all power plants belonging to the anomaly point. The average monthly solar irradiance or wind speed per 100 meters for all stations to which the anomaly point belongs.
[0044] Based on the type of station, features are extracted from the preliminary processed dataset to construct the original feature matrix of the station category, including the original feature matrix of each station in the category. The features include time features, historical statistical features, meteorological features, capacity and planning features. The feature design is shown in Table 1.
[0045] Table 1 Features in the original feature matrix
[0046]
[0047] S3. Use the XGBoost algorithm to construct an upper-level global prediction model. Take the original feature matrix of each type of power station as input and output the predicted power generation of each power station in each type of power station.
[0048] Specifically, an upper-level global prediction model is constructed using the XGBoost algorithm. XGBoost is a gradient boosting decision tree algorithm with advantages such as high accuracy, strong robustness, and support for parallel computing. The decision tree gradient model aims to minimize the error between the predicted and actual values, and iteratively mines data patterns by controlling the contribution of each tree, i.e., the learning rate. The upper-level optimization model mainly learns the common patterns in the global data, including seasonal patterns, meteorological influences, capacity relationships, historical trends, and the impact of shutdown plans, as shown in Table 2. The parameter settings of the upper-level optimization model are shown in Table 3. Using the original feature matrices of each type of power station as input, the predicted power generation of each power station in each category is output.
[0049] Table 2 Learning Content of Upper-Level Optimization Model
[0050]
[0051] Table 3 Parameter settings for the upper-level optimization model
[0052]
[0053] S4. Incorporate the predicted power generation of each power station as a new feature into the original feature matrix of each power station to obtain the enhanced feature matrix of each power station; adjust the parameters of the XGBoost algorithm to construct the lower-level local prediction model of each power station; use the enhanced feature matrix of each power station as input to train the lower-level local prediction model of each power station to obtain the trained lower-level local prediction model of each power station.
[0054] Specifically, the predicted power generation of each power station is used as a new feature and incorporated into the original feature matrix of each power station to obtain the enhanced feature matrix of each power station, as shown in Table 4.
[0055] Table 4. Features in the Enhanced Feature Matrix
[0056]
[0057] The parameters of the XGBoost algorithm were adjusted to construct the lower-level local prediction model. The differences in parameters are shown in Table 5. The number of decision trees (n_estimators) is set to 120 for the global model and 80 for the local model due to the large amount of global data and the need for more trees to learn commonalities. The decision tree depth (max_depth) is set to 5 for the global model and 3 for the local model to avoid overfitting due to the limited local data. The learning rate (learning_rate) is set to 0.08 for the global model and 0.1 for the local model due to the higher learning rate and faster convergence of the local model. The regularization (reg_alpha) is set to 0.4 for the global model and 0.3 for the local model due to the more relaxed and flexible regularization of the local model.
[0058] Table 5. Difference parameters between the lower-level local prediction model and the upper-level global prediction model.
[0059]
[0060] The lower-level local prediction model is mainly based on historical data of individual sites, aiming to uncover unique characteristics such as equipment efficiency and operation and maintenance level of each site. The lower-level local prediction model of each site is trained by using the enhanced feature matrix of each site as input, resulting in the trained lower-level local prediction model of each site.
[0061] S5. Use the lower-level local prediction model trained at each station to obtain the preliminary monthly power generation of each station; construct corresponding adjustment factors for preset holidays (such as Spring Festival and Mid-Autumn Festival) to correct the predicted values of the months in which the preset holidays are located in the preliminary power generation, and obtain the final predicted power generation of each station.
[0062] Specifically, adjustment factors are constructed for holidays such as the Spring Festival and Mid-Autumn Festival. During major holidays like the Spring Festival, the overall power load decreases, and the power grid will impose power rationing on various renewable energy power plants. Therefore, renewable energy power generation often drops sharply during these holidays. Although holidays are already taken into account when constructing the feature matrix, it is difficult for the model to learn the patterns of holidays like the Spring Festival, which only occur once a year. Therefore, it is necessary to construct adjustment factors after the prediction is completed and post-process the prediction results to fully reflect the impact of holidays on power generation.
[0063] Taking the Spring Festival as an example, the process of constructing the adjustment factor for the Spring Festival is as follows: Figure 2 As shown, firstly, historical data prior to the prediction date is obtained, the month in which the Spring Festival falls in each year is identified, the power generation data for the corresponding month is extracted, and power generation data for other months is collected. The average power generation sf_avg for the Spring Festival month and the average power generation non_sf_avg for other months are calculated respectively. The adjustment factor for the Spring Festival is the ratio between the two, sf_avg / non_sf_avg.
[0064] The predicted values for the months containing the preset holidays in the preliminary power generation forecast are corrected by multiplying the adjustment factor by the predicted value for the months containing the preset holidays.
[0065] The present invention discloses a power generation prediction system for renewable energy power plants based on a global-local two-layer prediction architecture, comprising:
[0066] The data acquisition module is used to acquire the factors affecting power generation at each power station, and collect historical data of each power station based on the factors to form a dataset.
[0067] The data processing module is used to preprocess the centralized data in the dataset and construct the original feature matrix of each type of station based on the station category.
[0068] The global prediction module is used to build the upper-level global prediction model. It takes the original feature matrix of each type of power station as input and outputs the predicted power generation of each power station in each type of power station.
[0069] The local prediction module is used to incorporate the predicted power generation of each power station as a new feature into the original feature matrix of each power station to obtain the enhanced feature matrix of each power station; and to construct the lower-level local prediction model of each power station. The lower-level local prediction model of each power station is trained by taking the enhanced feature matrix of each power station as input to obtain the trained lower-level local prediction model of each power station.
[0070] The adjustment factor correction module is used to obtain the preliminary monthly power generation forecast of each power station using the lower-level local prediction model trained at each power station; it constructs corresponding adjustment factors for preset holidays to correct the predicted values of the months in which the preset holidays are located in the preliminary power generation forecast, and obtains the final predicted power generation of each power station.
[0071] The computer device of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.
[0072] The computer-readable storage medium of the present invention stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0073] Regarding the above technical solution in this embodiment, the following is a detailed explanation. Figures 3 to 5 This will explain in detail the process of applying the technical solution to a specific experiment and the technical effects of the technical solution.
[0074] The experiment involved 39 new energy power stations belonging to a large new energy company in a certain province, including 28 photovoltaic power stations and 11 wind power stations. The data covered historical records for the past three years. Some newly built stations had limited data, with only one year or a few months of data available. Basic data included power generation data, meteorological data (monthly average irradiance, temperature, and wind speed per 100 meters at the station's location), planned power generation and shutdown plans, and installed capacity data.
[0075] Statistical analysis of historical data reveals the patterns of change in actual and planned power generation over time, as follows: Figure 3 As shown, there is a certain correlation between power generation and seasonal and monthly variations. Photovoltaics exhibit overall seasonal fluctuations, with higher generation in summer (June-August) and lower generation in winter (December-February). Wind power fluctuates significantly, showing no clear seasonal pattern and is significantly affected by wind speed. Actual power generation in most months is close to planned generation, with a few months showing larger deviations.
[0076] A typical wind turbine and photovoltaic power station were selected for demonstration, and their power generation varied with average weather conditions as follows: Figure 4 As shown, monthly average irradiance and power generation have a certain linear correlation; wind speed and power generation also have a certain positive correlation, but under the same conditions such as wind speed saturation, they have a certain nonlinear correlation.
[0077] Based on the data analysis results, the median deviation method (MAD) was used to identify outlier data. The value is 3. The identified outliers or missing values are filled in to construct the original feature matrix of each station.
[0078] The XGBoost algorithm is used to construct an upper-level global prediction model. The original feature matrix of each power station is used as input, and the predicted power generation of each power station is output. The parameters of the upper-level global prediction model are shown in Table 3.
[0079] The predicted power generation of each power station is used as a new feature and incorporated into the original feature matrix of each power station to obtain the enhanced feature matrix of each power station, as shown in Table 4. The parameters of the XGBoost algorithm are adjusted as shown in Table 5 to construct the lower-level local prediction model of each power station. The lower-level local prediction model of each power station is trained with the enhanced feature matrix of each power station as input to obtain the lower-level local prediction model of each power station after training.
[0080] The lower-level local prediction models trained at each power station were used to predict power generation from November 2025 to March 2026. The adjustment factor for the Spring Festival was calculated, and the predicted power generation for the month containing the Spring Festival was corrected by multiplying the Spring Festival adjustment factor by the predicted value for that month. A deviation analysis was performed between the final predicted values for the five months and the actual results to obtain the deviation rate. The deviation rate formula is as follows:
[0081] ;
[0082] Figure 5 To adjust the average prediction deviation rate of all stations before and after factor processing, it can be found that although there is a slight impact on the accuracy of results in non-Spring Festival months, the prediction effect in Spring Festival months is significantly improved.
[0083] Table 6. Average prediction deviation rate between the present invention and the traditional method by month.
[0084]
[0085] Table 7. Average Prediction Result Deviation Rate Comparing the Invention and Traditional Methods by Business Type
[0086]
[0087] The traditional power generation forecasting method currently used by power plants is to take the average monthly power generation of the same period in the past three years as the predicted power generation for that month. Table 6 shows the average prediction deviation rate of the present invention and the traditional power generation forecasting method over 5 months at all power plants. Table 7 shows the average prediction deviation rate of the present invention and the traditional power generation forecasting method over 5 months at all power plants according to the business type. It can be found that the present invention has a significant improvement in the accuracy of monthly power generation forecasting for actual power plants.
Claims
1. A method for predicting the power generation of renewable energy power plants based on a global-local two-layer prediction architecture, characterized in that, include: S1. Obtain the factors affecting power generation at each power station, and collect historical data of each power station based on the factors to form a dataset; S2. Preprocess the data in the dataset and construct the original feature matrix of each category of station based on the station category; S3. Construct an upper-level global prediction model, using the original feature matrix of each type of power station as input, and output the predicted power generation of each power station in each type of power station; S4. The predicted power generation of each station is used as a new feature and incorporated into the original feature matrix of each station to obtain the enhanced feature matrix of each station. Construct a lower-level local prediction model for each site, using the enhanced feature matrix of each site as input, train the lower-level local prediction model for each site, and obtain the trained lower-level local prediction model for each site. S5. Use the lower-level local prediction model trained at each power station to obtain the preliminary monthly power generation forecast for each power station. Adjustment factors are constructed for preset holidays, and the predicted values of the months in which the preset holidays are located in the preliminary predicted power generation are corrected to obtain the final predicted power generation of each station.
2. The renewable energy power generation prediction method based on a global-local two-layer prediction architecture according to claim 1, characterized in that, The dataset includes historical power generation data, meteorological data, installed capacity data, planned power generation data, and shutdown plan data for each power station; The preprocessing includes identifying outliers using the median deviation method, and filling in the identified outliers and missing values based on the ratio between the average power generation of the station to which the outlier or missing value belongs and the average meteorological data, thereby obtaining the preprocessed dataset.
3. The renewable energy power generation prediction method based on a global-local two-layer prediction architecture according to claim 1, characterized in that, The construction of the original feature matrix for each type of station based on the station category includes: extracting multi-dimensional features from the preprocessed dataset according to the station category to construct the original feature matrix for each type of station; the multi-dimensional features include time features, historical statistical features, meteorological features, capacity and planning features.
4. The renewable energy power generation prediction method based on a global-local two-layer prediction architecture according to claim 1, characterized in that, S3 includes: setting the hyperparameters of the XGBoost algorithm to build an upper-level global prediction model, taking the original feature matrix of each type of power station as input, learning common patterns using all power station data, and outputting the predicted power generation of each power station in each type of power station.
5. The renewable energy power generation prediction method based on a global-local two-layer prediction architecture according to claim 1, characterized in that, S4 includes: adjusting the hyperparameters of the XGBoost algorithm, constructing the lower-level local prediction model for each site, training the lower-level local prediction model for each site using the enhanced feature matrix of each site as input, learning individual features based on historical data of a single site, and obtaining the trained lower-level local prediction model for each site.
6. The renewable energy power generation prediction method based on a global-local two-layer prediction architecture according to claim 1, characterized in that, The process of constructing corresponding adjustment factors for preset holidays includes: acquiring historical data before the prediction date, identifying the months in which preset holidays are located in each year, calculating the average power generation in the months in which preset holidays are located and the average power generation in the months in which non-preset holidays are located, and using the ratio of the two as the adjustment factor for preset holidays.
7. The renewable energy power generation prediction method based on a global-local two-layer prediction architecture according to claim 1, characterized in that, The step of correcting the predicted value of the month in which the preset holidays fall in the preliminary predicted power generation includes multiplying the preliminary predicted power generation of the month in which the preset holidays fall by the corresponding adjustment factor, and correcting the final predicted power generation of each power station in the month in which the preset holidays fall.
8. A power generation prediction system for new energy power plants based on a global-local two-layer prediction architecture, characterized in that, include: The data acquisition module is used to acquire the factors affecting power generation at each power station, and collect historical data of each power station based on the factors to form a dataset. The data processing module is used to preprocess the centralized data in the dataset and construct the original feature matrix of each type of station based on the station category. The global prediction module is used to build the upper-level global prediction model. It takes the original feature matrix of each type of power station as input and outputs the predicted power generation of each power station in each type of power station. The local prediction module is used to incorporate the predicted power generation of each power station as a new feature into the original feature matrix of each power station to obtain the enhanced feature matrix of each power station. Construct a lower-level local prediction model for each site, using the enhanced feature matrix of each site as input, train the lower-level local prediction model for each site, and obtain the trained lower-level local prediction model for each site. The adjustment factor correction module is used to obtain the preliminary monthly power generation forecast of each power station using the lower-level local prediction model trained at each power station. Adjustment factors are constructed for preset holidays, and the predicted values of the months in which the preset holidays are located in the preliminary predicted power generation are corrected to obtain the final predicted power generation of each station.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.