A photovoltaic power generation power cross-substation prediction method based on a self-attention mechanism

The photovoltaic power generation prediction method based on the self-attention mechanism across substations solves the problems of insufficient generalization ability and poor prediction accuracy under extreme weather conditions in cross-substation prediction. It achieves accurate prediction for new substations and high-precision prediction under extreme weather conditions, and is applicable to photovoltaic power generation and other solar energy utilization fields.

CN121072883BActive Publication Date: 2026-03-20DALANG (SHANGHAI) INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511258473.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2026-03-20
Estimated Expiration
2045-09-04

AI Technical Summary

Technical Problem

Existing technologies lack generalization ability in cross-substation photovoltaic power generation prediction, especially in terms of poor prediction accuracy for new substations and extreme weather conditions. They cannot effectively utilize data from similar substations to generate training samples adapted to new substations, and they lack the ability to capture the coupled effects of meteorological changes and equipment performance degradation.

Method used

A method for predicting photovoltaic power generation across substations based on a self-attention mechanism is adopted. By constructing a multi-source dataset, a spatiotemporal joint modeling model, and a cross-substation data augmentation mechanism, combined with dynamic adjustment under real-time weather warnings and quantile loss optimization, virtual training data is generated and the robustness of the model to extreme weather is improved.

Benefits of technology

It significantly improves the adaptability of cross-substation forecasting and the accuracy of forecasting under extreme weather conditions, and achieves accurate forecasting of photovoltaic power generation. It is applicable to energy output forecasting of various photovoltaic systems and other solar energy utilization fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121072883B_ABST
    Figure CN121072883B_ABST
Patent Text Reader

Abstract

The application provides a photovoltaic power cross-substation prediction method based on a self-attention mechanism, and belongs to the technical field of photovoltaic power prediction. The application comprises the following steps: constructing a multi-source data set, generating a device health index and fusing the device health index into a static feature vector, constructing a space-time joint modeling model containing a time attention head, a space attention head and a gated residual network, training in combination with a cross-substation data enhancement mechanism, dynamically adjusting model parameters in real-time weather warning and adopting a quantile loss function for optimization, and finally outputting a cross-substation prediction result. The application realizes accurate prediction of photovoltaic power across sub-stations, effectively improves the generalization ability to new sub-stations, and through dynamic adjustment under real-time weather warning and quantile loss optimization, the prediction accuracy in extreme weather scenarios is enhanced, and the application is suitable for power prediction of various photovoltaic systems and can also be applied to energy output prediction in other solar energy utilization fields besides photovoltaic power generation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of photovoltaic power generation prediction, in particular to a photovoltaic power generation power cross-substation prediction method based on a self-attention mechanism. BACKGROUND

[0002] In the field of photovoltaic power generation prediction, accurate prediction of photovoltaic power generation power is crucial for stable operation of the power grid, power market transactions, and energy storage scheduling. Currently, time series prediction methods are mainly divided into traditional statistical models (such as ARMA, ARIMA) and deep learning models (such as RNN, LSTM, GRU). The former relies on strict statistical assumptions and is not suitable for non-linear and non-stationary data. The latter can extract complex features, but still has technical bottlenecks in photovoltaic power generation prediction.

[0003] Existing technologies lack generalization ability in cross-substation prediction scenarios. Traditional models and conventional deep learning models rely on single substation historical data for training. When facing new substations (without historical data) or large differences in geography and equipment between substations, it is difficult to transfer the learned rules. Due to the lack of effective cross-substation feature correlation mechanism, it is not possible to generate training samples for new substations using similar substation data, resulting in a sharp drop in prediction accuracy.

[0004] At the same time, the prediction accuracy under extreme weather conditions is difficult to guarantee. Photovoltaic power generation is significantly affected by weather factors. Extreme weather such as thunderstorms and sandstorms can cause power fluctuations. Existing models lack sufficient weight adjustment for short-term high-frequency weather data, and lack special sample training for extreme scenarios and dynamic fusion of equipment state degradation, making it difficult to effectively capture the coupling effects of weather anomalies and equipment performance degradation, resulting in poor prediction robustness.

[0005] Therefore, there is an urgent need for a photovoltaic power generation power cross-substation prediction method that can effectively improve the cross-substation generalization ability and enhance the prediction accuracy under extreme weather conditions. SUMMARY

[0006] To overcome the shortcomings of existing technologies, the present application provides a photovoltaic power generation power cross-substation prediction method based on a self-attention mechanism, which solves the problem of insufficient generalization ability for new substations and poor prediction accuracy under extreme weather conditions in existing technologies, realizes accurate prediction of photovoltaic power generation power across substations, effectively improves the generalization ability for new substations, and enhances the prediction accuracy under extreme weather conditions through dynamic adjustment under real-time weather warning and quantile loss optimization. It is suitable for power prediction of various photovoltaic systems and can also be applied to energy output prediction in other solar energy utilization fields other than photovoltaic power generation.

[0007] To achieve the above-mentioned purposes, the present application provides the following solutions:

[0008] A photovoltaic power cross-substation prediction method based on a self-attention mechanism, comprising the following steps:

[0009] A multi-source data set is constructed, which includes multi-substation historical power generation, meteorological data, static parameters, equipment operating state data, and real-time meteorological warning signals.

[0010] The equipment operating state data is subjected to degradation factor calculation to generate an equipment health index, which is fused with the static parameters into a time-varying static feature vector, and an extreme weather sample pool is constructed.

[0011] An improved self-attention mechanism is used to construct a spatio-temporal joint modeling model, which includes a time attention head, a spatial attention head, and a gated residual network, and the spatial attention head calculates the spatial correlation between sub-stations through a latitude and longitude Gaussian kernel function.

[0012] The multi-source data set, the time-varying static feature vector, and the extreme weather sample pool are input into the spatio-temporal joint modeling model, which is trained in combination with a cross-substation data enhancement mechanism that selects reference sub-stations through a similarity atlas and generates virtual training data.

[0013] During the training process, when the real-time meteorological warning signal is activated, the weight of the short-term high-frequency meteorological data and the non-linear processing intensity of the gated residual network are dynamically adjusted, and a quantile loss function is used to optimize the spatio-temporal joint modeling model.

[0014] The data of the sub-station to be predicted is input into the trained spatio-temporal joint modeling model, and the cross-substation photovoltaic power prediction result is output.

[0015] Preferably, the construction of the multi-source data set includes collecting the historical power generation, meteorological data, static parameters, equipment operating state data, and real-time meteorological warning signals of multiple sub-stations, wherein the meteorological data includes total horizontal irradiance, direct normal irradiance, diffuse horizontal irradiance, and beam horizontal irradiance, the static parameters include latitude and longitude and installed capacity, and the equipment operating state data includes component temperature and inverter efficiency.

[0016] The collected data is cleaned to remove night data and abnormal data with a deviation between actual power and theoretical value.

[0017] The cleaned data is normalized, and the formula is:

[0018] ;

[0019] wherein, is the normalized data, is the original data, is the minimum value in the original data, is the maximum value in the original data.

[0020] Preferably, the degradation factor calculation on the equipment operation state data generates an equipment health index, which is fused with static parameters into a time-varying static feature vector, and an extreme weather sample pool is constructed, including:

[0021] Based on the equipment operation state data, a degradation factor is calculated through a linear regression model;

[0022] The real-time efficiency of the equipment is calculated based on the degradation factor, and the real-time efficiency of the equipment is converted into a health index;

[0023] The health index is fused with static parameters through feature splicing into a time-varying static feature vector;

[0024] The power and meteorological sequence corresponding to the extreme weather in the historical data are screened, the extreme weather including thunderstorm, sandstorm, and an extreme weather sample pool is constructed.

[0025] Preferably, the degradation factor is calculated based on the equipment operation state data through a linear regression model, and the expression is:

[0026] ;

[0027] Wherein, is the degradation factor; is the initial efficiency of the equipment, taking the average efficiency of the first month of the equipment operation; is the actual efficiency of the equipment running after 24 hours;

[0028] The expression for calculating the real-time efficiency of the equipment based on the degradation factor is:

[0029] ;

[0030] The expression for converting the real-time efficiency of the equipment into a health index is:

[0031] ;

[0032] Wherein, is the health index, and the value range is 0-1.

[0033] Preferably, the health index is fused with static parameters through feature splicing into a time-varying static feature vector, and the expression is:

[0034] ;

[0035] Wherein, is the time-varying static feature vector; is a static parameter vector, containing latitude, longitude and installed capacity.

[0036] Preferably, the improved self-attention mechanism-based spatio-temporal joint modeling model is constructed, comprising:

[0037] A time attention head is constructed to calculate time dependence by using scaled dot-product attention, specifically, attention weights are calculated by using a query matrix, a key matrix and a value matrix, and the formula is:

[0038] ;

[0039] wherein, the query matrix is, the key matrix is, the value matrix is, the dimension of the key vector is;

[0040] A space attention head is constructed to calculate the spatial correlation degree weight based on the spherical distance of two sub-stations, and the formula is:

[0041] ;

[0042] wherein, the spatial weight of the sub-station and the sub-station ; the spherical distance of the two sub-stations is km; the average distance of the sub-stations in the region is km;

[0043] A gated residual network is integrated to process the input features by using a gated linear unit and layer normalization, and the formula is:

[0044] ;

[0045] wherein, the input feature at the moment is, the gated residual network is; , the network weight and the bias are respectively, the gated linear unit is, the layer normalization operation is;

[0046] Finally, the time attention head, the space attention head and the gated residual network are integrated to form a spatio-temporal joint modeling model for simultaneously capturing time dependence and spatial correlation.

[0047] Preferably, the multi-source data set, the time-varying static feature vector and the extreme weather sample pool are input into the spatio-temporal joint modeling model, and a cross-sub-station data enhancement mechanism is combined for training, comprising:

[0048] Randomly select 70% of the sub-stations from the multi-source data set as the basic subset, and divide each sub-station data into a training set and a test set according to time, wherein the training set is the first three weeks of data per month, and the test set is the remaining week data per month;

[0049] For a new sub-station without historical data, calculate the feature similarity of the new sub-station with the basic subset, and the formula is:

[0050] ;

[0051] wherein, is the similarity of the new sub-station to the basic subset sub-station , is the static feature vector of the new sub-station, is the static feature vector of the basic subset sub-station;

[0052] Extract the historical power generation and weather data sequence of the reference sub-station, perform feature alignment through an improved self-attention mechanism, generate virtual training data matching the geographical and climate features of the new sub-station, and combine the virtual training data with the existing real data of the new sub-station in a ratio of 2:1.

[0053] Finally, combine the training set of the multi-source data set, the time-varying static feature vector, the extreme weather sample pool, and the virtual training data as the model input, input it into the spatio-temporal joint modeling model, and use the gradient descent method to iteratively update the model parameters until the prediction error of the model on the test set converges.

[0054] Preferably, during the training process, when the real-time weather warning signal is activated, the weight of the model to the short-term high-frequency weather data and the non-linear processing strength of the gated residual network are dynamically adjusted, including:

[0055] Real-time monitoring of the real-time weather warning signal, and starting the dynamic adjustment mechanism when the warning signal is activated;

[0056] Adjusting the weight of the model to the short-term high-frequency weather data through a variable selection network, and the formula is:

[0057] ;

[0058] wherein, is the weight of the t th short-term high-frequency weather feature at the moment, k is the short-term high-frequency weather data, is the feature summary, M is the enhancement coefficient, and the value is 1.2~1.5, and GRN is the gated residual network; β

[0059] ​​Finally, the nonlinear activation function of the gated residual network is adjusted, replacing the exponential linear unit ELU with LeakyReLU. The function expression is as follows:

[0060] ;

[0061] in, x These are the feature values ​​input to the activation function.

[0062] Preferably, the expression for optimizing the spatiotemporal joint modeling model using the quantile loss function is:

[0063] ;

[0064] in, For quantile loss, These are quantiles, with values ​​of 0.1, 0.5, and 0.9. This represents the actual power generation capacity. To predict power.

[0065] Preferably, the output of the cross-substation photovoltaic power generation prediction result includes:

[0066] The spatiotemporal joint modeling model outputs 10-minute, 20-minute, and 30-minute forward prediction values, which are calculated using a prediction formula:

[0067] ;

[0068] in, for Predicted power at time, Prediction step size, with values ​​of 10, 20, and 30 minutes; For the completed spatiotemporal joint modeling function, It is a time-varying static feature vector. for The input sequence at time t, The spatial weights between the substation to be predicted and the reference substation are used to output the predicted value of photovoltaic power generation across substations.

[0069] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0070] (1) By constructing a cross-substation data augmentation mechanism, the present invention selects reference substations based on feature similarity and generates virtual training data, effectively solving the prediction bottleneck caused by the lack of historical data for new substations, significantly improving the model's generalization ability to substations with different geographical environments and equipment parameters, realizing the adaptability of cross-substation prediction, applicable to power prediction of various photovoltaic systems, and can also be applied to energy output prediction in other solar energy utilization fields besides photovoltaic power generation.

[0071] (2) The application enhances the capturing ability of the model to the coupling influence of meteorological mutation and device performance attenuation by constructing an extreme weather sample pool, combining short-term high-frequency meteorological data weight dynamic adjustment under real-time meteorological warning, gate residual network optimization, and adopting quantile loss function, and greatly improves the prediction accuracy and robustness under extreme weather.

[0072] (3) The application realizes the collaborative capture of time dependence and spatial correlation of photovoltaic power generation power by fusing multi-source data sets and time-varying static feature vectors, and constructing a space-time joint modeling model containing time and space attention heads, improves the overall accuracy of 10-minute, 20-minute and 30-minute advance prediction, and provides reliable support for efficient scheduling of photovoltaic clusters. BRIEF DESCRIPTION OF DRAWINGS

[0073] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0074] Figure 1 The flowchart of the photovoltaic power generation power cross-substation prediction method based on the self-attention mechanism of the present application;

[0075] Figure 2 The principle flowchart of the photovoltaic power generation power cross-substation prediction method based on the self-attention mechanism of the present application. DETAILED DESCRIPTION

[0076] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0077] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0078] Embodiment 1

[0079] As shown in Figure 1 and Figure 2 The present embodiment provides a photovoltaic power generation power cross-substation prediction method based on a self-attention mechanism, comprising the following steps:

[0080] Step 100: Construct a multi-source data set including multi-substation historical power generation, meteorological data, static parameters, equipment operation state data and real-time meteorological warning signals.

[0081] The construction of the multi-source data set includes: collecting historical power generation, meteorological data, static parameters, equipment operation state data and real-time meteorological warning signals of the multi-substation; the meteorological data includes clear sky total horizontal irradiance GHI, direct normal irradiance DNI, diffuse horizontal irradiance DHI and beam horizontal irradiance BHI, and the sampling frequency is 10 minutes / time. The static parameters include longitude and latitude, installed capacity, the equipment operation state data includes component temperature and inverter efficiency, and the real-time meteorological warning signals include thunderstorm, sandstorm and other extreme weather warning information.

[0082] The collected data is cleaned, and night data with a solar elevation angle <80° is removed. Abnormal values are filtered through physical rules. When the actual power and the theoretical calculation value deviate by >50% and the irradiance is normal, it is determined as abnormal data and removed. The cleaned data is subjected to Min-Max normalization processing, and the formula is:

[0083] ;

[0084] wherein, is the normalized data, is the original data, is the minimum value in the original data, is the maximum value in the original data. In this embodiment, the normalized data range is mapped to [0, 1] to facilitate unified processing of the model.

[0085] Step 200: Degradation factor calculation is performed on the equipment operation state data to generate an equipment health index, which is fused with the static parameters into a time-varying static feature vector, and an extreme weather sample pool is constructed.

[0086] In the above step 200, further comprising:

[0087] Based on the equipment operation state data, a degradation factor is calculated by a linear regression model to reflect the inverter efficiency decay trend, and the specific expression is:

[0088] ;

[0089] wherein, is the degradation factor; is the initial efficiency of the equipment, which is the average efficiency of the first month of operation of the equipment; is the actual efficiency of the equipment after running for a certain period of time.

[0090] calculating equipment real-time efficiency based on the degradation factor, and converting the equipment real-time efficiency into a health index;

[0091] Further, the expression for calculating the equipment real-time efficiency based on the degradation factor is:

[0092] ;

[0093] The expression for converting the equipment real-time efficiency into a health index is:

[0094] ;

[0095] wherein, the health index, with a value range of 0-1.

[0096] The expression for fusing the health index and static parameters into a time-varying static feature vector through feature splicing is:

[0097] ;

[0098] wherein, the time-varying static feature vector; the static parameter vector, including latitude, longitude and installed capacity, to realize dynamic integration of equipment state and geographical attributes.

[0099] Screening power and meteorological sequences corresponding to extreme weather (thunderstorm, sandstorm) in historical data to construct an extreme weather sample pool. Each sample contains time series data from 1 hour before the weather occurs to 1 hour after the weather ends, forming an independent sample set for model special training to enhance the adaptability to extreme scenarios.

[0100] Step 300: Constructing a spatio-temporal joint modeling model based on an improved self-attention mechanism, the spatio-temporal joint modeling model including a time attention head, a space attention head and a gated residual network, the space attention head calculating the spatial correlation between sub-stations through a latitude-longitude Gaussian kernel function;

[0101] Specifically, the spatio-temporal joint modeling model includes a time attention head, a space attention head and a gated residual network (GRN), and the specific construction method is as follows:

[0102] The time attention head is constructed, and the scaled dot-product attention is used to calculate the time dependence, specifically by calculating the attention weight through a query matrix, a key matrix and a value matrix, and the formula is:

[0103] ;

[0104] wherein, the query matrix, the key matrix, the value matrix, is the dimension of the key vector, the model is focused on the historical time step that is critical to the prediction by this formula.

[0105] The spatial attention head is constructed, and the spatial correlation weight is calculated based on the spherical distance between two substations, i.e., the spatial correlation between substations is calculated based on the latitude and longitude Gaussian kernel function, and the formula is:

[0106] ;

[0107] wherein, is the spatial weight of the substation and the substation ; is the spherical distance between two substations, with the unit of km; is the average distance of substations in the region, with the unit of km; the closer the distance between substations, the higher the weight, and the spatial feature transmission is enhanced.

[0108] The gated residual network is integrated, the input features are processed through the gated linear unit and layer normalization, and the formula is:

[0109] ;

[0110] wherein, is the input feature at the moment, is the gated residual network; , are the network weight and bias respectively, is the gated linear unit, which is used to dynamically filter important features; is the layer normalization operation, which is used to alleviate the gradient vanishing problem.

[0111] Finally, the time attention head, the spatial attention head and the gated residual network are integrated to form a spatio-temporal joint modeling model, which is used to capture the time dependence and spatial correlation at the same time.

[0112] Step 400: input the multi-source data set, time-varying static feature vector and extreme weather sample pool into the spatio-temporal joint modeling model, and train it in combination with the cross-substation data enhancement mechanism, which selects reference substations through the similarity atlas and generates virtual training data;

[0113] Further comprising:

[0114] Randomly select 70% of the substations from the multi-source data set as the basic set, and divide each substation data into training set and test set according to time, the training set is the first three weeks of each month, and the test set is the remaining weeks of each month.

[0115] For new sub-sites without historical data, reference sub-sites are selected based on feature similarity. The feature similarity between the new sub-site and the base subset is calculated using the following formula:

[0116] ;

[0117] in, For the new sub-site With basic subset subsite similarity, This represents the static feature vector of the new substation. The static feature vectors of the base subset of substations are used; the three substations with the highest similarity are selected, and their historical power and meteorological sequences are aligned through an improved self-attention mechanism to generate virtual training data that matches the geographical and climatic characteristics of the new substations. The virtual training data is combined with the existing real data of the new substations in a 2:1 ratio.

[0118] Finally, the training set of the multi-source dataset, the time-varying static feature vector, the extreme weather sample pool, and the virtual training data are merged into the model input and fed into the spatiotemporal joint modeling model. The model parameters are iteratively updated using the gradient descent method. The learning rate is initially set to 0.001 and decreases by 10% every 5 epochs until the root mean square error (RMSE) of the model on the test set converges, i.e., the fluctuation is <0.001 for 3 consecutive epochs.

[0119] Step 500: During the training process, when the real-time weather warning signal is activated, the model's weights on short-term high-frequency meteorological data and the nonlinear processing intensity of the gated residual network are dynamically adjusted. At the same time, the quantile loss function is used to optimize the spatiotemporal joint modeling model.

[0120] Furthermore, weather warning signals are monitored in real time during training, and a dynamic adjustment mechanism is activated when a warning is triggered (e.g., thunderstorms are expected within the next hour).

[0121] The model's weights for short-term high-frequency meteorological data (such as 1-minute GHI and sudden wind speed values) are adjusted using a variable selection network, as shown in the formula:

[0122] ;

[0123] in, for t Time of the first k Weights of short-term high-frequency meteorological features This is short-term, high-frequency meteorological data. M For feature review, β To enhance the response to meteorological abrupt changes, the coefficient is set to 1.2 to 1.5. GRN is a gated residual network.

[0124] Adjust the activation function of the GRN, replacing the original exponential linear unit ELU with LeakyReLU. The function expression is as follows:

[0125] ;

[0126] in, x The feature values ​​input to the activation function are used to avoid the "death" of neurons caused by negative inputs and to improve the model's ability to handle extreme values.

[0127] Simultaneously, the quantile loss function is used to optimize the model, as expressed in:

[0128] ;

[0129] in, For quantile loss, These are quantiles, with values ​​of 0.1, 0.5, and 0.9. This represents the actual power generation capacity. To predict power, multiquantile modeling is used to enhance the robustness of predictions under extreme weather conditions.

[0130] Step 600: Input the data of the substation to be predicted into the trained spatiotemporal joint modeling model, and output the prediction results of photovoltaic power generation across substations.

[0131] Furthermore, the real-time data of the substation to be predicted is input into the trained model. This real-time data includes time-varying static feature vectors and the current meteorological sequence. The model outputs 10-minute, 20-minute, and 30-minute advance predictions, specifically calculated using the prediction formula:

[0132] ;

[0133] in, for Predicted power at time, Prediction step size, with values ​​of 10, 20, and 30 minutes; For the completed spatiotemporal joint modeling function, It is a time-varying static feature vector. for The input sequence at time t, The spatial weights between the substation to be predicted and the reference substation are used to output the predicted value of photovoltaic power generation across substations.

[0134] To verify the technological advancements described above, the present invention will be further illustrated below through another specific embodiment.

[0135] Example 2

[0136] The embodiment adopts the annual operation data set of 188 photovoltaic sub-stations of a centralized photovoltaic system in a certain province in the verification process, which are geographically distributed across urban, suburban and industrial areas, with significant differences in installed capacity (0.5-5MW), system inclination changes up to ±15°, and complete coverage of typical application scenarios such as industrial and commercial roof (62%), residential photovoltaic carport (28%) and ground power station (10%), which adapt to the diversified sub-station layout of centralized photovoltaic systems.

[0137] Among them, the data set spans the whole year of 2020, with a collection interval of 10 minutes. Each piece of data contains four categories of features: multi-sub-station historical power generation (kW), meteorological data (including total horizontal irradiance, direct normal irradiance, diffuse horizontal irradiance, and beam horizontal irradiance), static parameters (latitude and longitude, installed capacity), and equipment operating status data (component temperature, inverter efficiency), as well as real-time meteorological warning signals (extreme weather identification such as thunderstorm and sandstorm).

[0138] It should be noted that the embodiment needs to exclude night data with solar elevation angle < 80°, and filter abnormal data through double physical rule verification (actual power and theoretical value deviation > 50% and normal irradiation), to ensure the reliability of the training set.

[0139] At the same time, the prediction method provided in embodiment 1 is used for experimental verification, and seven representative benchmark models are selected as performance comparison reference system in the specific implementation process, including: persistence model (Persistence) as the basic reference, traditional linear prediction model multivariate linear regression (MLR), feedforward neural network model multilayer perceptron (MLP), time series feature extraction model long short-term memory network (LSTM) and its variant gated recurrent unit (GRU), integrated learning model XGBoost (XGB) and gradient boosting regression (GBR). In terms of performance evaluation, the embodiment adopts a double evaluation index system: root mean square error (Root Mean Square Error, RMSE) is used to quantify the absolute accuracy of the prediction result, and forecast skill score (Forecast Skill Score, FSS) is used to measure the relative performance improvement relative to the benchmark model. Among them, RMSE measures the average squared error in prediction, and smaller RMSE value indicates higher prediction accuracy, and the formula is:

[0140] ;

[0141] Among them, is the total number of prediction samples, is the true power generation of the i-th sample, unit: kW; is the true power generation of the i-th sample, unit: kW; is the true power generation of the i-th sample, unit: kW; The predicted power generation of a sample in kW.

[0142] While the FSS can measure the improvement of the studied prediction over the reference persistence model, p represents the persistence model, whose formula is:

[0143] ;

[0144] where RMSE 模型 is the root mean square error of the current evaluation model, RMSE p is the root mean square error of the persistence model as the baseline model, and the larger the FSS value, the more significant the improvement of the current model over the baseline model.

[0145] The embodiment adopts a dual-scene verification framework to systematically evaluate the performance of the model: the first scene is for photovoltaic substations with available training data in a centralized photovoltaic system, and the second scene is for substations that have never been seen in the system (without training data). In terms of data division strategy, first, 70% of the substations are randomly selected from the entire data set as a basic subset, and the data of the subset is further subdivided in the time dimension: the data of the first three weeks of each month is used to construct the training set, and the data of the remaining weeks is used as the test set of the known substation scene. The remaining 30% of the substation data is used as an independent test set to evaluate the generalization ability of the model on a new substation, and the virtual training data of the new substation without historical data is generated by screening reference substations based on feature similarity. This hierarchical sampling method not only ensures the time sequence integrity of the training data, but also ensures the objectivity of the generalization test by strictly isolating the unknown substation data.

[0146] where the prediction performance results obtained in the first scene are shown in Table 1.

[0147] Table 1 Prediction performance when training data is available

[0148]

[0149] As shown in Table 1, the prediction performance of various models at different time scales of the centralized photovoltaic substation is compared, and the results show that the model of the application always performs best, and the prediction skill improves with the increase of the prediction length, and the RMSE in 10 minutes, 20 minutes and 30 minutes prediction is 0.065kW, 0.082kW and 0.089kW respectively, and the improvement rate of the benchmark model increases from 9.72% to 19.64%. The deep learning model is better than the traditional method, among which the performance of LSTM and GRU is close, and only GBR in the benchmark model performs well. It is worth noting that as the prediction time is extended from 10 minutes to 30 minutes, the RMSE of all models shows an upward trend, and the improvement rate of the model of the application also increases from 9.72% to 19.64%, which verifies the characteristics of increasing difficulty of prediction with time, and highlights the advantage of the application in capturing long-term features through spatio-temporal joint modeling. In contrast, traditional methods such as MLR and XGB perform poorly at all time scales, and the improvement rate is even negative, highlighting the superiority of the application in dealing with complex nonlinear problems such as power prediction of centralized photovoltaic substation.

[0150] The prediction performance results obtained in the second scenario are shown in Table 2.

[0151] Table 2 Prediction performance when using unknown substation data for evaluation

[0152]

[0153] The generalization ability of each model for the photovoltaic substation not seen in the centralized photovoltaic system is evaluated, and the results are shown in Table 2. It can be seen that the model of the application performs best in 10 minutes, 20 minutes and 30 minutes prediction, and the improvement rate of the prediction skill compared with the benchmark model is 11.84%, 17.17% and 23.28% respectively. As the prediction time increases, the prediction accuracy of the model of the application continues to improve, and it shows the strongest generalization ability in 30 minutes prediction, while the traditional machine learning models (such as MLR, XGB) are even worse than the performance of the persistent benchmark model. Research shows that the generalization ability of traditional deep learning and machine learning models is limited when the substation environment or geographical location changes, which is due to their dependence on the pattern of data seen and the inability to capture complex relationships across substations. In contrast, the application optimizes through cross-substation data enhancement mechanism, spatio-temporal joint modeling and gated residual network, combines time-varying static feature vector to fuse device health and geographical attributes, and at the same time optimizes the weight of short-term high-frequency weather data in extreme weather, so that it can effectively capture the common rules and periodic characteristics across substation in centralized photovoltaic system, thus showing excellent generalization performance on unseen substation.

[0154] Therefore, the photovoltaic power cross-substation prediction method based on the self-attention mechanism solves the problems of insufficient generalization ability of the prior art to new sub-stations and poor prediction accuracy under extreme weather in cross-substation prediction, realizes accurate prediction of photovoltaic power across sub-stations, and effectively improves the generalization ability to new sub-stations. Meanwhile, through dynamic adjustment under real-time weather warning and quantile loss optimization, the prediction accuracy under extreme weather scenarios is enhanced.

[0155] The principles and implementation modes of the present application are described herein by applying specific examples, and the above examples are only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation modes and application ranges will be changed. In summary, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A method for predicting photovoltaic power generation across substations based on a self-attention mechanism, characterized in that, Includes the following steps: Construct a multi-source dataset, which includes historical power generation of multiple substations, meteorological data, static parameters, equipment operating status data, and real-time meteorological early warning signals; The degradation factor is calculated on the equipment operating status data to generate an equipment health index, which is then fused with static parameters to form a time-varying static feature vector, and an extreme weather sample pool is constructed. Specifically, it includes: Based on equipment operating status data, degradation factors are calculated using a linear regression model. The real-time efficiency of the device is calculated based on the degradation factor, and the real-time efficiency of the device is converted into a health index. The health index and static parameters are fused into a time-varying static feature vector through feature concatenation. Screen the power and meteorological sequences corresponding to extreme weather in historical data, including thunderstorms and sandstorms, and construct an extreme weather sample pool; A spatiotemporal joint modeling model is constructed based on an improved self-attention mechanism. This model includes a temporal attention head, a spatial attention head, and a gated residual network. The spatial attention head calculates the spatial correlation between substations using a latitude-longitude Gaussian kernel function. Specifically, it includes... Construct a temporal attention head and use scaled dot product attention to calculate temporal dependencies. Specifically, calculate the attention weights using the query matrix, key matrix, and value matrix, as shown in the formula: ; in, For querying the matrix, The key matrix, For value matrices, The dimension of the key vector; Construct a spatial attention head and calculate the spatial correlation weight based on the spherical distance between two substations, using the following formula: ; in, For sub-sites With sub-station Spatial weights; The spherical distance between the two substations is expressed in km. This represents the average distance between substations within the region, in km. The integrated gated residual network processes input features through gated linear units and layer normalization, as shown in the following formula: ; in, The input features at time t, For gated residual networks; , These are network weights and biases, respectively. For gated linear units, For layer normalization operation; Finally, the temporal attention head, spatial attention head and gated residual network are integrated to form a spatiotemporal joint modeling model, which is used to simultaneously capture temporal dependencies and spatial correlations. The multi-source dataset, time-varying static feature vector, and extreme weather sample pool are input into the spatiotemporal joint modeling model, and trained using a cross-substation data augmentation mechanism. This cross-substation data augmentation mechanism filters reference substations using a similarity graph and generates virtual training data. Specifically, it includes: 70% of the sub-stations are randomly selected from the multi-source dataset as the base subset. The data of each sub-station is divided into a training set and a test set according to time. The training set is the data of the first three weeks of each month, and the test set is the data of the remaining weeks of each month. For new sub-sites without historical data, calculate their feature similarity with the base subset using the following formula: ; in, For the new sub-site With basic subset subsite similarity, This represents the static feature vector of the new substation. It is the static feature vector of the basic subset of substations; Historical power generation and meteorological data sequences of reference substations are extracted, and feature alignment is performed through an improved self-attention mechanism to generate virtual training data that matches the geographical and climatic characteristics of the new substation. The virtual training data is combined with the existing real data of the new substation at a ratio of 2:

1. Finally, the training set of the multi-source dataset, the time-varying static feature vector, the extreme weather sample pool and the virtual training data are merged into the model input and fed into the spatiotemporal joint modeling model. The gradient descent method is used to iteratively update the model parameters until the prediction error of the model on the test set converges. During training, when real-time weather warning signals are activated, the weights of short-term high-frequency meteorological data and the nonlinear processing intensity of the gated residual network are dynamically adjusted. Simultaneously, the spatiotemporal joint modeling model is optimized using the quantile loss function. Specifically, this includes: Real-time monitoring of weather warning signals; when a warning signal is activated, a dynamic adjustment mechanism is initiated. The weights of short-term high-frequency meteorological data are adjusted using a variable selection network, and the formula is as follows: ; in, for t Time of the first k Weights of short-term high-frequency meteorological features This is short-term, high-frequency meteorological data. M For feature review, β The enhancement coefficient is set to a value of 1.2 to 1.5, and GRN is a gated residual network. Finally, the nonlinear activation function of the gated residual network is adjusted, replacing the exponential linear unit ELU with LeakyReLU. The function expression is as follows: ; in, x These are the feature values ​​input to the activation function; The expression for optimizing the spatiotemporal joint modeling model using the quantile loss function is as follows: ; in, For quantile loss, These are quantiles, with values ​​of 0.1, 0.5, and 0.

9. This represents the actual power generation capacity. To predict power; Input the data of the substation to be predicted into the trained spatiotemporal joint modeling model, and output the prediction results of photovoltaic power generation across substations.

2. The method for predicting photovoltaic power generation across substations based on a self-attention mechanism according to claim 1, characterized in that, The construction of the multi-source dataset includes: collecting historical power generation of multiple substations, meteorological static parameters, equipment operating status data, and real-time meteorological early warning signals; wherein, the meteorological data includes clear sky total horizontal irradiance, direct normal irradiance, diffuse horizontal irradiance, and beam horizontal irradiance, the static parameters include latitude and longitude and installed capacity, and the equipment operating status data includes component temperature and inverter efficiency. The collected data is cleaned to remove nighttime data and abnormal data that deviate from the theoretical value of actual power. The cleaned data is then normalized using the following formula: ; in, For the normalized data, The original data, The minimum value in the original data. This represents the maximum value in the original data.

3. The method for predicting photovoltaic power generation across substations based on a self-attention mechanism according to claim 1, characterized in that, The degradation factor, calculated using a linear regression model based on equipment operating status data, is expressed as follows: ; in, It is a degradation factor; The initial efficiency of the equipment is the average efficiency during the first month of operation. For equipment operation The actual efficiency of the Queen; The expression for the real-time efficiency of the device based on the degradation factor is: ; The real-time efficiency of the device is converted into a health index, expressed as follows: ; in, This is a health index, with a value ranging from 0 to 1.

4. The method for predicting photovoltaic power generation across substations based on a self-attention mechanism according to claim 3, characterized in that, The health index and static parameters are fused together using feature concatenation to form a time-varying static feature vector, expressed as: ; in, It is a time-varying static feature vector; It is a static parameter vector containing latitude and longitude and installed capacity.

5. The method for predicting photovoltaic power generation across substations based on a self-attention mechanism according to claim 1, characterized in that, The output cross-substation photovoltaic power generation prediction results include: The spatiotemporal joint modeling model outputs 10-minute, 20-minute, and 30-minute forward prediction values, which are calculated using a prediction formula: ; in, for Predicted power at time, Prediction step size, with values ​​of 10, 20, and 30 minutes; For the completed spatiotemporal joint modeling function, It is a time-varying static feature vector. for The input sequence at time t, The spatial weights between the substation to be predicted and the reference substation are used to output the predicted value of photovoltaic power generation across substations.

Citation Information

Patent Citations

  • Multi-weather scene photovoltaic power generation prediction method considering photovoltaic output oscillatory property

    CN118035806A

  • Wind power interval prediction method based on MODWT-Informer network

    CN118153754A