A short-term photovoltaic power prediction method and system suitable for multi-county geographical heterogeneity
By combining K-means++ clustering and SHAP value analysis with adaptive feature selection and hybrid model integration, the problem of photovoltaic power prediction under geographical heterogeneity in multiple counties was solved, achieving high-precision and stable prediction results, and adapting to complex meteorological scenarios in summer and autumn.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GANSU SHINING SCI & TECH
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-05
AI Technical Summary
Existing photovoltaic power prediction methods fail to effectively adapt to the geographical heterogeneity of multiple counties, ignore the differences in the sensitivity of meteorological factors between different geographical regions, fail to fully explore the synergistic effect of core factors, lack adaptive mechanisms, and are difficult to meet the prediction needs of complex scenarios such as high irradiance and frequent showers in summer and autumn.
By quantifying county-level geographical heterogeneity through K-means++ clustering and SHAP value analysis, adaptive feature selection and hybrid model integration are employed. The AdaBoost algorithm is used to dynamically allocate model weights, and specific adjustments are applied for different counties to construct a short-term photovoltaic power prediction system adapted to the geographical heterogeneity of multiple counties.
It improves the accuracy and stability of photovoltaic power prediction, especially in complex scenarios such as high irradiance and cloudy and rainy conditions, significantly reducing prediction errors, meeting the grid-connected scheduling requirements of distributed photovoltaic power, and reducing data acquisition costs.
Smart Images

Figure CN122159201A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power prediction technology, specifically to a short-term photovoltaic power prediction method and system adapted to the geographical heterogeneity of multiple counties, for short-term photovoltaic power prediction in multi-county scenarios. Background Technology
[0002] As the proportion of renewable energy in the power system continues to increase, photovoltaic power generation, as an important component of clean energy, has a significant impact on the safe and stable operation of the power grid due to its power prediction accuracy. Photovoltaic power prediction technology has become a key supporting technology for smart grid dispatch and renewable energy consumption.
[0003] Currently, photovoltaic (PV) power prediction methods are mainly divided into physical model methods, statistical model methods, and artificial intelligence (AI) model methods. Physical model methods establish mathematical models based on the physical characteristics of PV modules and meteorological conditions; statistical model methods utilize historical data to mine the statistical relationship between power and meteorological factors; and AI model methods automatically extract features and establish prediction models through machine learning algorithms. With the development of deep learning technology, PV power prediction methods based on algorithms such as LSTM and XGBoost have made significant progress.
[0004] In the field of short-term photovoltaic power prediction, data preprocessing is a fundamental step in improving prediction accuracy. CN112561139A discloses a method for short-term photovoltaic power prediction. This method starts with selecting a dataset and evaluation indicators, and then performs data preprocessing on the selected dataset, including data cleaning using the iForest algorithm, feature selection based on the Pearson coefficient, and data normalization. This method can effectively eliminate the adverse effects of numerical differences between different categories of input data on model training.
[0005] To address the issue of weather type differences in photovoltaic (PV) power forecasting, CN113837426A proposes a weather-type-based PV power forecasting method. This method classifies weather conditions into four types based on parameters such as total cloud cover, sunshine percentage, direct sunlight ratio, and modified atmospheric clarity index. Different input factors are selected for each weather type, and a statistical model is trained and built using principal component analysis for dimensionality reduction. This method improves forecast accuracy under different weather conditions to a certain extent.
[0006] Regarding model construction, CN114897129A discloses a short-term power prediction method for photovoltaic power plants based on daily similarity clustering and K-means-GRA-LSTM. This method first extracts power feature values and performs clustering using the K-means clustering algorithm. Then, based on the clustering results corresponding to the power feature values and multivariate meteorological factors, it selects power and multivariate meteorological factor data with high correlation to the prediction day as similar day samples. Finally, it performs prediction by optimizing the LSTM network parameters. This method improves the targeting of the prediction model through similar day selection.
[0007] To improve the reliability of prediction results, CN118801375B proposes a method for short-term photovoltaic power prediction and its uncertainty analysis. This method utilizes the WRF-Solar model to acquire high-resolution solar irradiance forecast data, combines it with mean clustering for classification, optimizes the support vector machine using a multi-objective slime mold algorithm to construct the prediction model, and employs kernel density estimation to analyze the prediction error and calculate the error boundary value at a given confidence level. This method not only provides predicted values but also assesses the uncertainty of the prediction results.
[0008] Regarding predictive performance evaluation, CN117010664A discloses an intelligent evaluation system and method for predicting the power output of new energy sources. This system includes a meteorological module, a predictive model store module, an intelligent evaluation module for predictive performance, and a data service module. It can achieve a comprehensive and intelligent evaluation of the performance of various power prediction algorithms for different types of new energy power plants. This evaluation system provides a standardized platform for comparing different prediction methods.
[0009] However, existing photovoltaic power prediction technologies still have the following problems:
[0010] First, most forecasting methods adopt a "uniform feature + fixed model" framework, ignoring the essential differences in the sensitivity of meteorological factors across different geographical regions. Especially at the county scale, due to differences in topography, climate, and other factors, the degree of influence of the same meteorological factor on photovoltaic power varies significantly, leading to an imbalance in forecast accuracy across different counties.
[0011] Secondly, existing methods fail to fully exploit the synergistic effects of core factors such as direct radiation, diffuse radiation, and total radiation when processing limited data for specific time periods (e.g., summer and autumn, May to September). The interaction mechanisms of these factors under different geographical environments are complex, and existing models struggle to accurately capture these dynamic relationships.
[0012] Third, there is a lack of specific optimization strategies for special meteorological scenarios such as high radiation and frequent showers in summer and autumn. In these scenarios, photovoltaic power fluctuates greatly, and existing forecasting methods are difficult to adapt to such rapid changes, failing to meet the precise scheduling requirements after large-scale grid connection of distributed photovoltaic systems.
[0013] Fourth, existing methods lack an adaptive mechanism in model integration, and cannot dynamically adjust model weights according to the characteristics of different counties, which limits further improvement in prediction accuracy.
[0014] Therefore, there is an urgent need to develop a short-term photovoltaic power prediction method that can adapt to the geographical heterogeneity of multiple counties. By using techniques such as quantifying county heterogeneity, adaptive feature selection, hybrid model integration, and scenario optimization, the accuracy and stability of photovoltaic power prediction under different geographical environments can be improved. Summary of the Invention
[0015] This invention addresses the shortcomings of existing technologies that employ a unified feature set and a fixed model, fail to consider geographical heterogeneity at the county level, lack adaptive feature selection and dynamic model weight allocation, and fail to establish differentiated correction mechanisms for three typical landforms: the Hexi Corridor, the Loess Plateau, and river valley basins. It discloses a short-term photovoltaic power prediction method adapted to the geographical heterogeneity of multiple counties.
[0016] To achieve the above objectives, the present invention is implemented through the following technical solution, including the following steps:
[0017] S1: Data preprocessing; collect meteorological data and actual power generation data from multiple counties from May to September, and perform time alignment, missing value imputation, outlier removal and feature engineering on the meteorological data and actual power generation data to generate a standard dataset;
[0018] S2: Quantification of county-level heterogeneity; K-means++ clustering is performed based on the geographical characteristics of counties and the statistical characteristics of meteorological data from May to September to divide each county into three typical scenarios;
[0019] The SHAP value analysis method is then used to calculate the SHAP value of the meteorological features in the standard dataset. By taking the average value of the absolute SHAP value of the meteorological features on the test set, the power contribution of each meteorological feature and time feature in different counties is quantified. After normalization, the county-specific factor weight vector is obtained.
[0020] S3: Adaptive feature selection; Based on the factor weight vector, sort the features of each county in descending order of weight, retain the Top-K core features, calculate the Pearson correlation coefficient between each pair of the core features, remove the redundant features with lower weights that have a correlation coefficient greater than a preset threshold, and then iterate until there are no highly redundant feature pairs, thereby generating a county-specific feature subset.
[0021] S4: Hybrid model integration; Construct a basic model library of LSTM, XGBoost, and GPR, and use the AdaBoost algorithm to dynamically allocate model weights with the goal of minimizing the mean absolute fractional error of the validation set, thereby integrating the initial predicted values.
[0022] S5: Summer and Autumn Scene Optimization; Apply specific corrections to different county-level scenes and output the final prediction results.
[0023] Furthermore,
[0024] In S1, the meteorological data includes air pressure, direct radiation, diffuse radiation, total radiation, humidity, and temperature;
[0025] The standard dataset is divided into a training set, a validation set, and a test set in chronological order, with the training set, the test set, and the validation set comprising 7:2:1 of the standard dataset.
[0026] The time characteristics include hour, day sequence, and solar altitude angle;
[0027] The formula for calculating the solar altitude angle is:
[0028] ; wherein, the The latitude of the observation point, the For the solar declination, the stated It is the hour angle.
[0029] Furthermore,
[0030] In step S2, the initial centroids of the K-means++ clustering are selected using a distance-weighted probability method, and the probability of selecting the Kth centroid is:
[0031] ;
[0032] Among them, the To select the probability, the For the sample The Euclidean distance to the nearest selected centroid, where j is the starting point of sample traversal, m is the total number of samples, and... For the sample;
[0033] The SHAP value is calculated using a tree model interpreter, for a single feature. Contribution to predicted values
[0034] Satisfying the formula: ;
[0035] Among them, the The average predicted value of the model, The actual predicted value of the model;
[0036] The three typical scenarios refer to the Hexi Corridor type, the Loess Plateau type, and the river valley basin type.
[0037] The meteorological characteristics refer to the representative indicators extracted after statistical processing of the original meteorological data.
[0038] Furthermore,
[0039] In S3, the characteristics of each county include the meteorological characteristics, temporal characteristics, and derived meteorological characteristics of that county;
[0040] The derived meteorological characteristics include the dispersion ratio. , proportion of diffuse radiation Temperature and humidity ratio (THR);
[0041] The direct dispersion ratio ,in, This refers to direct radiation irradiance. This refers to the diffuse radiation irradiance.
[0042] The proportion of diffuse radiation ,in, This refers to the diffuse radiation irradiance. Direct radiation irradiance;
[0043] The temperature and humidity ratio Where T is temperature and HR is relative humidity.
[0044] Furthermore,
[0045] In step S4, the AdaBoost algorithm determines the model weights by minimizing the mean absolute percentage error on the validation set, and the formula for calculating the initial predicted value of the ensemble output is as follows: ;
[0046] Wherein, in the formula for calculating the initial predicted value, For the initial predicted value, For the predicted values of the LSTM model, For the predicted values of the XGBoost model, These are the predicted values from the GPR model; All model weights are dynamically assigned.
[0047] Furthermore,
[0048] In S5, the specific corrections include county-wide high irradiance-temperature coupling correction, Loess Plateau county-wide diffuse radiation ratio correction, and Hexi Corridor county-wide pressure correlation correction.
[0049] Furthermore,
[0050] The valley basin type does not require separate specific correction, only the county-wide high irradiance-temperature coupling correction is needed;
[0051] The formula for correcting the proportion of diffuse radiation in counties of the Loess Plateau: ;
[0052] Among them, in the correction formula for the proportion of diffuse radiation in counties of the Loess Plateau, The revised final photovoltaic power forecast value, 0.2 is the initial predicted value, and 0.2 is a fixed correction factor. The proportion of diffuse radiation;
[0053] For the counties in the Hexi Corridor type, a pressure correlation correction is used; the formula for calculating the pressure correlation correction coefficient is as follows: ;in, For correction factor, The atmospheric pressure values are d and These are the parameters fitted based on historical data.
[0054] A short-term photovoltaic power forecasting system adapted to the geographical heterogeneity of multiple counties includes:
[0055] The data preprocessing module is used to collect meteorological and power generation data from multiple counties from May to September, perform time alignment, missing value imputation, outlier removal, and feature engineering to generate a standard dataset.
[0056] The county-level heterogeneity quantification module is used to perform K-means++ clustering based on county-level geographical features and meteorological statistical features to classify county-level scenarios, and to obtain county-specific factor weight vectors using SHAP value analysis.
[0057] The adaptive feature selection module is used to select core features and remove redundant features based on factor weight vectors, and generate a county-specific feature subset.
[0058] The hybrid model integration module is used to build LSTM, XGBoost, and GPR model libraries, dynamically allocate model weights and output initial prediction values through the AdaBoost algorithm;
[0059] The scenario optimization and correction module is used to apply specific corrections based on different county-level scenarios and output the final short-term photovoltaic power prediction results.
[0060] Furthermore,
[0061] The county-level heterogeneity quantification module uses the distance-weighted probability method to select the initial centroid of K-means++.
[0062] The beneficial effects of this invention are as follows:
[0063] 1) By combining K-means++ clustering with SHAP value analysis, the interpretability of county-level geographical heterogeneity was quantified, which solved the problem of uneven accuracy caused by the "one-size-fits-all" modeling of existing methods, and enabled the factor influence mechanism of each county to be accurately characterized.
[0064] 2) An adaptive feature selection strategy is adopted, which dynamically generates a unique feature subset based on quantified factor weights. This avoids feature redundancy and strengthens the contribution of core factors, thus meeting the modeling needs of limited-dimensional data from May to September.
[0065] 3) Construct a multi-model dynamic integration framework, and realize the county-level adaptive allocation of model weights through the AdaBoost algorithm. Combined with the summer and autumn scene-specific correction, it effectively improves the prediction accuracy of complex scenarios such as high irradiance and cloudy and rainy weather. Compared with the traditional single LSTM and XGBoost models, the prediction MAPE of this method is significantly reduced in all three types of county-level scenarios, and the stability is significantly improved in fluctuating scenarios such as high irradiance and cloudy and rainy weather, which can meet the grid-connected scheduling requirements of distributed photovoltaic power generation.
[0066] 4) The method is designed entirely based on existing meteorological and power generation data from May to September, without requiring additional data collection costs. It is highly feasible for engineering implementation and can provide accurate data support for distributed photovoltaic scheduling and energy storage configuration in Gansu during the summer and autumn seasons. Attached Figure Description
[0067] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 This is a flowchart of the method of the present invention;
[0069] Figure 2 This is a schematic diagram of the county-level clustering results of the present invention;
[0070] Figure 3 This is a diagram of the model integration architecture of the present invention;
[0071] Figure 4 This is a diagram illustrating the prediction results of the present invention. Detailed Implementation
[0072] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0073] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0074] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0075] Example 1
[0076] This embodiment provides a feature engineering processing method, including the following steps:
[0077] First, data preprocessing is performed to construct time features. In this step, time information in the original data is extracted and transformed to generate multidimensional time features.
[0078] Specifically, it includes:
[0079] Hourly features: Using the 24 hours of a day as a periodic feature, hourly information is extracted from the original timestamp and converted into a value from 0 to 23. This representation can capture intraday variation patterns in the data.
[0080] Day-order feature: Calculates the day of the year (1-365 / 366) of the current date, used to represent seasonal variation. Day-order feature helps models understand long-term seasonal trends.
[0081] Solar altitude angle: Calculated based on geographical location (latitude and longitude) and time, the solar altitude angle directly reflects the physical characteristics of solar radiation intensity. The solar altitude angle θ is calculated using the following formula:
[0082] ;
[0083] in, The latitude of the observation point. The solar declination, It is the hour angle.
[0084] The solar altitude angle varies between 0° and 90°, and is negative when the sun is below the horizon.
[0085] Next, derived meteorological features are constructed: Based on the original meteorological data, the following derived features are calculated:
[0086] Direct-to-Diffuse Ratio (DDR): The ratio of direct sunlight to diffused radiation. The DDR reflects the relative intensity of direct sunlight and atmospheric diffused light.
[0087] The calculation formula is: ;in, This refers to direct radiation irradiance. This refers to the diffuse radiation irradiance.
[0088] The ratio is higher in sunny weather and lower in cloudy or overcast weather.
[0089] Scattered radiation percentage: Calculates the percentage of scattered radiation in the total radiation;
[0090] Percentage of diffuse radiation ;in, This refers to the diffuse radiation irradiance. Direct radiation irradiance;
[0091] This feature can effectively distinguish radiation characteristics under different weather conditions.
[0092] Temperature-to-humidity ratio: The ratio of temperature to relative humidity.
[0093] The temperature-humidity ratio (THR) is calculated as follows: Where T is temperature and HR is relative humidity;
[0094] This feature comprehensively reflects the dryness and humidity of the air, and is of great significance for predicting the efficiency of solar power generation.
[0095] The next step is dataset partitioning; after data processing, a standard dataset is generated, which is then partitioned chronologically to ensure the effectiveness of model training and evaluation.
[0096] Training set: Data from May to July was selected as the training set, accounting for approximately 70% of the standard dataset. The training set was used for learning and optimizing model parameters.
[0097] Validation set: Data from August was selected as the validation set, which accounts for approximately 20% of the standard dataset. The validation set is used for model hyperparameter tuning and to prevent overfitting.
[0098] Test set: Data from September was selected as the test set, which accounts for approximately 10% of the standard dataset. The test set is used to evaluate the generalization performance of the final model.
[0099] This method of dividing the time series ensures that the model can learn seasonal variation patterns while avoiding data leakage. By dividing the dataset according to time sequence, rather than random sampling, it better meets the prediction needs of real-world applications.
[0100] Through the feature engineering processes described above, the raw data is transformed into a more predictive feature set. Temporal features capture periodic variations, while derived meteorological features provide richer physical information. These features together constitute a comprehensive feature space, effectively improving the accuracy and robustness of subsequent prediction models.
[0101] Example 2
[0102] This embodiment uses a scene classification method based on clustering features, which includes the following steps:
[0103] First, clustering features were collected; data including latitude, longitude, terrain type, and meteorological statistics from May to September were collected.
[0104] Meteorological statistical characteristics specifically include average total radiation, average temperature, average humidity, and average air pressure. These data are collected from meteorological stations or extracted from meteorological databases to ensure accuracy and representativeness. Multiple sampling points are used for each region during data collection to ensure the data comprehensively reflects the region's geographical and climatic characteristics.
[0105] Next, data preprocessing is performed; the collected raw data is cleaned and standardized. First, outliers and missing values are removed, and missing data is supplemented using nearest neighbor interpolation. Then, the feature data are normalized to allow for effective comparison of features with different dimensions. For the qualitative feature of terrain type, one-hot encoding is used to convert it into a numerical feature.
[0106] The next step is cluster analysis. The K-means clustering algorithm is used, with K=3 clusters, to perform cluster analysis on the processed feature data. Euclidean distance is used as the similarity metric during clustering, and the algorithm iteratively optimizes to minimize intra-cluster distance and maximize inter-cluster distance.
[0107] The initial cluster centers were selected using the K-means++ method to improve clustering performance and convergence speed.
[0108] Secondly, clustering results analysis and scene classification; based on the clustering results, the region is divided into three typical scene types: Hexi Corridor type, Loess Plateau type and river valley basin type.
[0109] The characteristics of the Hexi Corridor type of landscape are: located at higher latitudes and lower longitudes, with terrain mainly consisting of plains and deserts, higher average total radiation from May to September, relatively higher average temperature, lower average humidity, and lower average air pressure. This type of region is typically distributed in the Hexi Corridor area of Gansu Province, characterized by a dry climate with little rainfall and abundant sunshine.
[0110] The Loess Plateau region is characterized by its mid-latitude and mid-longitude location, predominantly hilly and plateau terrain, moderate average total radiation from May to September, moderate average temperature, moderate average humidity, and relatively low average air pressure. This type of region is typically found in the Loess Plateau areas of Shaanxi and Gansu provinces, characterized by a semi-arid climate and distinct seasonal precipitation.
[0111] The characteristics of river valley basin type landscapes are: located at relatively low latitudes and high longitudes, with terrain dominated by basins and river valleys, low average total radiation from May to September, relatively high average temperature, high average humidity, and high average air pressure. These areas are typically distributed in the Sichuan Basin and surrounding river valleys, characterized by a humid climate and abundant rainfall.
[0112] Finally, validation and evaluation were conducted. The clustering results were evaluated using the silhouette coefficient and the Davies-Bouldin index to validate the clustering effect of K=3.
[0113] The silhouette coefficient reached 0.68, indicating good clustering results; the Davies-Bouldin index was 0.42, indicating significant inter-class differentiation. Furthermore, the clustering results were compared with actual geographical partitions, showing a consistency rate of over 85%, proving that this clustering method can effectively identify scene types with different geographical and climatic characteristics.
[0114] The above clustering analysis methods can effectively classify regions based on latitude, longitude, terrain type, and meteorological statistical characteristics, providing a scientific basis for regional planning, agricultural production, and energy layout. Compared with traditional single-feature classification methods, this method comprehensively considers multi-dimensional features, resulting in more accurate and reliable classification results that better reflect the region's natural geographical features and climate characteristics.
[0115] Example 3
[0116] Based on Example 1, this embodiment further elaborates on using the SHAP value analysis method to quantify the power contribution of each factor in different counties and generate factor weight vectors.
[0117] First, a baseline model is constructed. This model uses all time-related features (hours, day sequence, solar altitude angle) and derived meteorological features (direct radiation ratio, diffuse radiation ratio, temperature-humidity ratio) and original meteorological features (air pressure, direct radiation, diffuse radiation, total radiation, humidity, temperature) generated from the standard dataset in Example 1 as input features X, along with the actual power generation. As output labels.
[0118] An XGBoost regression model was trained for each county as a baseline model to explain the nonlinear relationship between features and power.
[0119] The model was trained using the training set from May to July, and the hyperparameters were optimized using the validation set from August through grid search. For example, the maximum tree depth was set to 6, the learning rate to 0.1, and the number of estimators to 300.
[0120] Next, SHAP values are calculated and factor contributions are quantified. For each trained XGBoost model in each county, a TreeExplainer is used to calculate the SHAP value of each feature in each sample. The SHAP value is based on the Shapley value in game theory, which can fairly allocate the contribution of each feature to the model prediction.
[0121] For a single predicted sample X, the SHAP value of its feature i satisfy:
[0122] ;
[0123] in, This is the model's predicted value for this sample. This is the mean of the predicted values for all samples.
[0124] To quantify the overall contribution of a feature at the county level, the average of the absolute values of the feature's SHAP values across all test set samples in that county is calculated and denoted as the feature's contribution score. :
[0125] ;
[0126] Where N is the total number of samples in the test set. The larger the value, the stronger the feature. The greater the impact, the greater the overall influence on the county's photovoltaic power forecast.
[0127] The next step is to generate factor weight vectors; and score the contribution of all features for each county. After normalization, the factor weight vector for the county is obtained. :
[0128] ;
[0129] Where n is the total number of features. This weight vector This intuitively reflects the importance of each feature in the photovoltaic power prediction of the county.
[0130] Taking a certain county (Loess Plateau type) as an example, the above calculations revealed that the weights of diffuse radiation ratio and temperature-humidity ratio were significantly higher than in other counties, while the weights of air pressure and direct radiation ratio were even higher in a certain region (Hexi Corridor type). These quantitative results are consistent with geographical characteristics and provide a quantitative basis for subsequent adaptive feature selection.
[0131] Example 4
[0132] This embodiment, based on embodiment 3, elaborates in detail the specific implementation of the 'weight ranking + redundancy removal' strategy based on factor weight vectors to generate county-specific feature subsets.
[0133] First, the core features are initially screened; for each county, the factor weight vector calculated in Example 2 is used... All features are sorted in descending order of their weight values. The number of core features to be retained is set to Top-K. The choice of K value needs to strike a balance between model accuracy and feature complexity. In this embodiment, experiments have verified that when K=5, i.e., retaining the top 5 features by weight, the model input can be simplified to the greatest extent while ensuring prediction accuracy.
[0134] These five features constitute the core feature set of the county. For example, for counties in the Loess Plateau region, the core feature set may include the proportion of diffuse radiation, temperature-humidity ratio, total radiation, humidity, and solar altitude angle.
[0135] Next, redundant features are removed; after initially determining the core feature set, it is necessary to check and remove redundant features.
[0136] Redundant features refer to those features that are highly linearly correlated with other features in the core feature set, providing repetitive information. The specific steps are as follows:
[0137] a. Calculate the core feature set The Pearson correlation coefficient between all pairs of features.
[0138] b. If the absolute value of the correlation coefficient of a pair of features is greater than a preset threshold (set to 0.85 in this embodiment), then the two features are considered to be highly redundant.
[0139] c. For feature pairs that are redundant, compare their weight values in the county, remove the feature with the lower weight value, and keep the feature with the higher weight value.
[0140] d. Repeat the above steps until the absolute value of the correlation coefficient between any two features in the core feature set does not exceed 0.85.
[0141] The next step is to generate county-specific feature subsets; after applying a "weighted sorting + redundancy removal" strategy, a final feature subset is generated for each county. This feature subset is adaptive to the geographical heterogeneity of the county, containing the core factors that contribute most to its power prediction while avoiding model overfitting and computational burden caused by redundant information.
[0142] For example, after this step, the specific feature subset for counties in the Loess Plateau region might be: {scattered radiation ratio, temperature-humidity ratio, total radiation, solar altitude angle}. The "humidity" feature in the original core feature set was successfully removed because its correlation coefficient with "temperature-humidity ratio" exceeded 0.85 and its weight was relatively low.
[0143] This adaptive selection mechanism ensures that subsequent hybrid model integration steps can be trained based on the most refined and relevant features, effectively improving the model's generalization ability and prediction accuracy, especially when dealing with limited-dimensional data from May to September, where the advantages are particularly obvious.
[0144] Example 5
[0145] In this embodiment, a photovoltaic power generation prediction correction method is described. The method includes specific correction types and correction function details, and integrates the AdaBoost algorithm for prediction.
[0146] First, the specific correction types involved in this method include three categories: county-wide high irradiance-temperature coupling correction, Loess Plateau-type county-wide diffuse radiation ratio correction, and Hexi Corridor-type county-wide pressure correlation correction. These correction types are specifically optimized for the photovoltaic power generation characteristics of different geographical regions to improve prediction accuracy.
[0147] For counties in the Loess Plateau region, the predicted values are adjusted using a scattering radiation proportion correction function.
[0148] The specific correction formula is as follows: ;
[0149] in, This is the revised forecast value for photovoltaic power generation. These are the original predicted values. This represents the proportion of diffuse radiation.
[0150] This revision takes into account the unique impact of scattered radiation on photovoltaic power generation in the Loess Plateau region. When the proportion of scattered radiation increases, the predicted value is appropriately increased to reflect the actual power generation situation.
[0151] For counties in the Hexi Corridor type, pressure correlation correction is used. The formula for calculating the pressure correlation correction coefficient is: ;in, For correction factor, The atmospheric pressure values are d and These are parameters fitted based on historical data. This correction considers the impact of air pressure variations in the Hexi Corridor region on photovoltaic power generation efficiency, adjusted using a linear relationship. The corrected forecast value is obtained by multiplying the original forecast value by a correction factor. get.
[0152] The county-wide high irradiance-temperature coupling correction compensates for the negative impact of temperature on photovoltaic module efficiency under high irradiance conditions. When the irradiance exceeds a certain threshold and the temperature is high, this correction mechanism reduces the predicted power value to reflect the actual efficiency reduction of photovoltaic modules under high-temperature environments.
[0153] In terms of predictive model construction, this method uses the AdaBoost algorithm for multi-model ensemble.
[0154] The specific steps are as follows:
[0155] Model training: Train the Long Short-Term Memory (LSTM) network model, the Extreme Gradient Boosting (XGBoost) model, and the Gaussian Process Regression (GPR) model respectively, using historical photovoltaic power generation data, meteorological data, etc. as input features;
[0156] Weight determination: Using the AdaBoost algorithm, the weight coefficients of each model are determined with the mean absolute percentage error (MAPE) on the validation set as the optimization objective. , and ,satisfy Constraints;
[0157] Integrated Prediction: Calculate the integrated prediction value based on the determined weighting coefficients. ,in, , and These are the predicted outputs of the three basic models, respectively.
[0158] Regional characteristic judgment: Based on the geographical characteristics of the target area for prediction, determine which type of special correction should be used;
[0159] Correction Application: Based on the judgment results, apply the corresponding correction function to the integrated predicted values. Make corrections to obtain the final prediction result. In a preferred embodiment, the AdaBoost algorithm uses an iterative approach to determine model weights. First, each sample is assigned the same initial weight. Then, in each iteration, the weights of samples with larger errors are increased, while the weights of samples with smaller errors are decreased, allowing the algorithm to focus more on samples that are difficult to predict.
[0160] In this way, the final determined model weights enable the ensemble model to obtain the minimum MAPE value on the validation set.
[0161] In practical applications, this method significantly improves the accuracy of photovoltaic power generation forecasts by combining the advantages of multiple prediction models and making specific adjustments for different regional characteristics. Test results show that compared with a single model, the prediction error of this method is reduced by more than 15% on average, and the improvement is even more significant under conditions of drastic weather changes.
[0162] The prediction effect of this embodiment can be referred to Figure 4 , Figure 4 The curves show the comparison between the actual power generation and the predicted power after AdaBoost integrated model and special correction over a certain period of time. It can be seen that the prediction results of this invention have a high consistency with the actual power generation trend and a good fit with fluctuations. It also maintains high prediction accuracy under high radiation and cloudy and rainy weather scenarios in summer and autumn.
[0163] Example 6
[0164] This embodiment discloses a short-term photovoltaic power prediction system adapted to the geographical heterogeneity of multiple counties. The system adopts a modular architecture design and mainly includes a data preprocessing module, a county heterogeneity quantification module, an adaptive feature selection module, a hybrid model integration module, and a scenario optimization and correction module.
[0165] During system operation, the data preprocessing module first collects meteorological data such as air pressure, direct radiation, diffuse radiation, total radiation, temperature, and humidity from multiple counties from May to September, as well as actual power generation data. This data undergoes time alignment, missing value imputation, and outlier removal. It then constructs temporal features including hourly, daily, and solar altitude angle features, as well as derived meteorological features such as direct radiation ratio, diffuse radiation proportion, and temperature-humidity ratio, generating a standard dataset that meets the model input requirements. Subsequently, the county heterogeneity quantification module performs K-means++ clustering based on county geographical features and meteorological statistical features. Each county is divided into three typical scenarios: Hexi Corridor type, Loess Plateau type, and river valley basin type. XGBoost combined with SHAP value analysis is used to quantify the contribution of each feature to power, generating county-specific factor weight vectors. An adaptive feature selection module sorts features in descending order and selects core features based on the factor weight vectors. Highly redundant and low-weight features are eliminated by calculating the Pearson correlation coefficient, generating a concise and targeted feature subset for each county. A hybrid model integration module trains LSTM, XGBoost, and GPR basic prediction models based on the specific feature subsets, aiming to minimize the mean absolute percentage error of the validation set. The AdaBoost algorithm dynamically allocates the weights of each model and completes model integration, outputting initial photovoltaic power prediction values. Finally, a scenario optimization and correction module applies differentiated corrections based on the county scenario type. A high irradiance-temperature coupling correction is uniformly applied to all counties; a diffuse radiation ratio correction is additionally applied to Loess Plateau type counties; a pressure correlation correction is additionally applied to Hexi Corridor type counties; and only a general coupling correction is applied to river valley basin type counties. The final output is a stable and reliable short-term photovoltaic power prediction result.
[0166] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0167] Furthermore, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
Claims
1. A short-term photovoltaic power prediction method adapted to the geographical heterogeneity of multiple counties. Its features are, Includes the following steps: S1: Data preprocessing; collect meteorological data and actual power generation data from multiple counties from May to September, and perform time alignment, missing value imputation, outlier removal and feature engineering on the meteorological data and actual power generation data to generate a standard dataset; S2: Quantification of county-level heterogeneity; K-means++ clustering is performed based on the geographical characteristics of counties and the statistical characteristics of meteorological data from May to September to divide each county into three typical scenarios; The SHAP value analysis method is then used to calculate the SHAP value of the meteorological features in the standard dataset. By taking the average value of the absolute SHAP value of the meteorological features on the test set, the power contribution of each meteorological feature and time feature in different counties is quantified. After normalization, the county-specific factor weight vector is obtained. S3: Adaptive feature selection; Based on the factor weight vector, sort the features of each county in descending order of weight, retain the Top-K core features, calculate the Pearson correlation coefficient between each pair of the core features, remove the redundant features with lower weights that have a correlation coefficient greater than a preset threshold, and then iterate until there are no highly redundant feature pairs, thereby generating a county-specific feature subset. S4: Hybrid model integration; Construct a basic model library of LSTM, XGBoost, and GPR, and use the AdaBoost algorithm to dynamically allocate model weights with the goal of minimizing the mean absolute fractional error of the validation set, thereby integrating the initial predicted values. S5: Summer and Autumn Scene Optimization; Apply specific corrections to different county-level scenes and output the final prediction results.
2. The short-term photovoltaic power prediction method adapted to the geographical heterogeneity of multiple counties as described in claim 1, Its features are, In step S1, the meteorological data includes air pressure, direct radiation, diffuse radiation, total radiation, humidity, and temperature. The standard dataset is divided into a training set, a validation set, and a test set in chronological order, with the ratio of the training set, the test set, and the validation set to the standard dataset being 7:2:
1. The time characteristics include hour, day sequence, and solar altitude angle; The formula for calculating the solar altitude angle is: ;in, The latitude of the observation point. The solar declination, It is the hour angle.
3. The short-term photovoltaic power prediction method adapted to the geographical heterogeneity of multiple counties as described in claim 1, Its features are, In step S2, the initial centroids of the K-means++ clustering are selected using a distance-weighted probability method. The probability of selecting a centroid is: ; Among them, the To select the probability, the For the sample The Euclidean distance to the nearest selected centroid, where j is the starting point of sample traversal, m is the total number of samples, and... For the sample; The SHAP value is calculated using a tree model interpreter, for a single feature. Contribution to predicted values ; Satisfying the formula: ; in, This is the model's average predicted value. The actual predicted value of the model; The three typical scenarios refer to the Hexi Corridor type, the Loess Plateau type, and the river valley basin type. The meteorological characteristics refer to the representative indicators extracted after statistical processing of the original meteorological data.
4. The short-term photovoltaic power prediction method adapted to the geographical heterogeneity of multiple counties as described in claim 1, Its features are, In step S3, the characteristics of each county include the meteorological characteristics, temporal characteristics, and derived meteorological characteristics of that county; The derived meteorological characteristics include the dispersion ratio. , proportion of diffuse radiation Temperature and humidity ratio (THR); The direct dispersion ratio ,in, This refers to direct radiation irradiance.
5. This refers to the diffuse radiation irradiance; The proportion of diffuse radiation ,in, This refers to the diffuse radiation irradiance. Direct radiation irradiance; The temperature and humidity ratio Where T is temperature and HR is relative humidity.
6. A short-term photovoltaic power prediction method adapted to the geographical heterogeneity of multiple counties, as described in claim 1. Its features are, In step S4, the AdaBoost algorithm determines the model weights by minimizing the mean absolute percentage error on the validation set, and integrates the initial prediction value calculation formula: ; Wherein, in the formula for calculating the initial predicted value, For the initial predicted value, For the predicted values of the LSTM model, For the predicted values of the XGBoost model, These are the predicted values from the GPR model; All model weights are dynamically assigned.
7. A short-term photovoltaic power prediction method adapted to the geographical heterogeneity of multiple counties, as described in claim 1. Its features are, In step S5, the specific corrections include county-wide high irradiance-temperature coupling correction, Loess Plateau county-wide diffuse radiation ratio correction, and Hexi Corridor county-wide pressure correlation correction.
8. A short-term photovoltaic power prediction method adapted to the geographical heterogeneity of multiple counties, as described in claim 6. Its features are, The valley basin type only needs to perform the county-wide high irradiance-temperature coupling correction; The formula for correcting the proportion of diffuse radiation in counties of the Loess Plateau: ; Among them, in the correction formula for the proportion of diffuse radiation in counties of the Loess Plateau, The revised final photovoltaic power forecast value, 0.2 is the initial predicted value, and 0.2 is a fixed correction factor. The proportion of diffuse radiation; For the counties in the Hexi Corridor type, a pressure correlation correction is used; the formula for calculating the pressure correlation correction coefficient is as follows: ;in, For correction factor, This is the atmospheric pressure value. and These are the parameters fitted based on historical data.
9. A short-term photovoltaic power prediction system adapted to the geographical heterogeneity of multiple counties. The method for short-term photovoltaic power prediction adapted to the geographical heterogeneity of multiple counties, as described in any one of claims 1 to 7, is employed. Its features are, include: The data preprocessing module is used to collect meteorological and power generation data from multiple counties from May to September, perform time alignment, missing value imputation, outlier removal, and feature engineering to generate a standard dataset. The county-level heterogeneity quantification module is used to perform K-means++ clustering based on county-level geographical features and meteorological statistical features to classify county-level scenarios, and to obtain county-specific factor weight vectors using SHAP value analysis. The adaptive feature selection module is used to select core features and remove redundant features based on factor weight vectors, and generate a county-specific feature subset. The hybrid model integration module is used to build LSTM, XGBoost, and GPR model libraries, dynamically allocate model weights and output initial prediction values through the AdaBoost algorithm; The scenario optimization and correction module is used to apply specific corrections based on different county-level scenarios and output the final short-term photovoltaic power prediction results.
10. The system according to claim 8, Its features are, The county-level heterogeneity quantification module uses the distance-weighted probability method to select the initial centroid of K-means++.