Photovoltaic power prediction method based on rain amount self-adaptive mechanism and time-frequency fusion

The photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion utilizes Clayton-Copula and Gaussian-Copula functions to screen meteorological features, and combines enhanced Fourier mixture model and gated network to solve the prediction problem of distributed photovoltaic power generation under extreme weather conditions, achieving higher prediction accuracy and stability.

CN122118663APending Publication Date: 2026-05-29WUHAN UNIV +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2026-01-27
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

The output of distributed photovoltaic power generation is intermittent and uncertain. Especially under extreme weather conditions, existing prediction models are unable to accurately predict photovoltaic power, which poses a challenge to the safe and stable operation of the power grid.

Method used

A photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion is adopted. Key meteorological features are screened by Clayton-Copula and Gaussian-Copula functions, and feature enhancement and gating network fusion are combined with enhanced Fourier mixture model to dynamically adjust weights to improve prediction accuracy.

Benefits of technology

It significantly improves the accuracy and stability of photovoltaic power prediction, especially in extreme weather conditions where it can adaptively respond to rainfall disturbances, thus enhancing the model's robustness and multi-scale time series feature modeling capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122118663A_ABST
    Figure CN122118663A_ABST
Patent Text Reader

Abstract

The application discloses a photovoltaic power prediction method based on a rain amount self-adaptive mechanism and time-frequency fusion, relates to the photovoltaic prediction technical field, and comprises the following steps: step S1: acquiring meteorological data and performing pretreatment; jointly using a Clayton-Copula function and a Gaussian-Copula function to screen key influence features from the meteorological data; step S2: using an enhanced Fourier hybrid model to perform feature enhancement on the key influence features, including frequency domain conversion, frequency band self-adaptive enhancement, phase correction and inverse Fourier transform recovery time domain signal operations on the key influence features, so as to obtain enhanced key influence features; step S3: performing feature fusion on time domain features and frequency domain features in the enhanced key influence features, including operations of a gating network, feature weight calculation and weighted fusion on the time domain features and the frequency domain features, so as to obtain fused key influence features; and step S4: performing power prediction on the fused key influence features, and mapping to a target variable through a full connection layer to output a final predicted photovoltaic power value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic forecasting technology, and in particular to a photovoltaic power forecasting method based on rainfall adaptive mechanism and time-frequency fusion. Background Technology

[0002] Driven by the low-carbon transformation of the energy structure, distributed photovoltaic (PV) power generation has achieved rapid development and is widely used in various application scenarios such as residential rooftops, industrial parks, and microgrids. However, its output is characterized by significant intermittency and uncertainty, which can easily lead to problems such as voltage anomalies, power fluctuations, and reverse power flows, thus posing challenges to the safe and stable operation of the distribution network. Therefore, improving the accuracy of short-term power forecasting for distributed PV has become one of the key technical paths to ensure flexible grid dispatch and reliable operation.

[0003] Because the output of distributed photovoltaic (PV) power generation is highly sensitive to local meteorological conditions, factors such as solar irradiance, temperature, and rainfall are the main driving variables causing its power fluctuations, with rainfall having a particularly significant impact. These meteorological variables exhibit complex, nonlinear, and often asymmetric interactions with PV output, especially under extreme weather conditions. This results in PV power time series exhibiting high dimensionality, strong nonstationarity, and multi-scale time series characteristics, posing a severe challenge to traditional prediction models. Summary of the Invention

[0004] In view of the above-mentioned prior art, the present invention provides a photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion, which mainly solves the technical problems existing in the background art.

[0005] To achieve the above objectives, the technical solution of this invention is implemented as follows: In a first aspect, the present invention provides a photovoltaic power prediction method based on a rainfall adaptive mechanism and time-frequency fusion, the method comprising the following steps: Step S1: Acquire meteorological data and preprocess it, and use the Clayton-Copula function and Gaussian-Copula function together to screen out key influencing features from the meteorological data; Step S2: Use an enhanced Fourier mixture model to enhance the key impact features, including frequency domain transformation, frequency band adaptive enhancement, phase correction, and inverse Fourier transform to recover the time domain signal, to obtain the enhanced key impact features; Step S3: Perform feature fusion on the time-domain features and frequency-domain features in the enhanced key impact features, including gating the time-domain features and frequency-domain features through a gating network, calculating feature weights, and performing weighted fusion operations to obtain the fused key impact features; Step S4: Perform power prediction on the key impact features after fusion, and map the fully connected layer to the target variable to output the final predicted photovoltaic power value.

[0006] As a preferred embodiment of the present invention, step S1, which combines the Clayton-Copula function and the Gaussian-Copula function to screen out key influencing features from meteorological data, specifically includes: The correlation matrix between meteorological data and power output is calculated using the Gaussian-Copula function. Based on the correlation matrix, the correlation strength index between each meteorological factor and photovoltaic power output is calculated. Then, based on the preset correlation threshold, the first set of key meteorological features that have a stable and significant correlation with photovoltaic power output under normal or normal meteorological conditions is selected. The lower tail dependency relationship between meteorological data and photovoltaic power output is analyzed by Clayton-Copula function to obtain the lower tail dependency parameter between meteorological data and photovoltaic power output. The part of the dependency parameter in step S2 that is greater than the preset threshold is filtered out to select the second type of feature subset that has a stable and significant correlation with photovoltaic power output under extreme conditions of low light and heavy rainfall. The first set of key meteorological features and the second set of key features are combined to obtain the set of key impact features.

[0007] As a preferred embodiment of the present invention, step S1 further includes, in order to reasonably reduce the predicted value of photovoltaic power when the rainfall intensity is high, adaptive weighting of key influencing features is performed through a rainfall adaptive attention mechanism, as follows: Rain pressure is calculated based on rainfall and lower tail dependency parameters. The rain pressure is mapped to a weight mask using the sigmoid function. The weight mask is then incorporated into an attention mechanism to calculate its attention score. The weights are dynamically adjusted under different rainfall conditions based on the attention score.

[0008] As a preferred embodiment of the present invention, the specific process of performing frequency domain conversion, adaptive frequency band enhancement, and phase correction on key influencing features in step S2 is as follows: The amplitude and phase of the frequency domain signal are obtained by using the fast Fourier transform to analyze the time series of key influencing features. Based on the typical spectral characteristics of photovoltaic power sequences, frequency domain signals are divided into frequency bands. For each frequency band, the mean and standard deviation of the amplitude of all frequency components within that band are calculated. Then, an adaptive threshold is calculated based on the mean and standard deviation. For critical frequency components whose amplitude exceeds the adaptive threshold, learnable weights are used to amplify and enhance them. To avoid time-domain waveform distortion or loss of timing information caused by adjusting the amplitude, a trainable phase correction parameter is set for the frequency band where the key frequency components are located to correct the original phase information.

[0009] In a preferred embodiment of the present invention, after completing the amplitude adaptive enhancement and phase correction in the frequency domain in step S2, the time domain signal is recovered through inverse Fourier transform to obtain the enhanced key influence features, specifically including: The frequency domain signal after amplitude adaptive enhancement and phase correction is converted back to the time domain by inverse Fourier transform to obtain the initially enhanced time domain signal. From the original input signal, specific high-frequency components are separated by high-pass filtering to obtain the high-frequency residual signal; The enhanced time-domain signal is synthesized with the high-frequency residual signal to obtain the enhanced key influence features.

[0010] As a preferred embodiment of the present invention, step S3 involves processing the time-domain features and frequency-domain features using a gated network, including: The time-domain feature tensor and the frequency-domain feature tensor to be fused are concatenated to generate joint features, which are then input into a gating network. The gating network consists of at least a linear projection layer and a sigmoid activation function. The fully connected layer performs a linear transformation on the joint features and obtains a scalar gating value. The scalar gating value is then mapped to a closed interval of 0 to 1 by the sigmoid function to obtain a dynamic gating weight value. As a preferred embodiment of the present invention, the dynamic gating weight value obtained after the control network processing in step S3 is used to perform feature weight calculation and weighted fusion operation on the time domain features and frequency domain features to obtain the fused key influencing features, as follows: Two sets of learnable scaling and translation parameters are introduced. For time-domain features, the corresponding weight coefficients are calculated as the product of a dynamic gating weight value and a learnable scaling parameter, and then added to the learnable bias parameter. For frequency-domain features, the weight coefficients are calculated in the same way as those for time-domain features. The weighting coefficients of the time-domain features and the weighting coefficients of the frequency-domain features are weighted and fused to obtain the fused key influence features.

[0011] Secondly, the present invention also provides a photovoltaic power prediction model based on a rainfall adaptive mechanism and time-frequency fusion, the model comprising: The input layer is used to input meteorological data and time-series data and perform preprocessing. The feature selection layer is used to filter out key impact features from meteorological data using the Clayton-Copula and Gaussian-Copula functions. Information Enhancement Layer: The enhanced Fourier mixture model is used to enhance the key impact features, including frequency domain transformation, frequency band adaptive enhancement, phase correction, and inverse Fourier transform to recover the time domain signal, to obtain the enhanced key impact features. The spatiotemporal fusion layer is used to fuse the temporal and frequency domain features in the enhanced key impact features. This includes passing the temporal and frequency domain features through a gating network, calculating feature weights, and performing a weighted fusion operation to obtain the fused key impact features. The output layer is used to predict the power of key impact features after fusion, and the fully connected layer maps it to the target variable, outputting the final predicted photovoltaic power value.

[0012] The beneficial effects of this invention are as follows: This method effectively addresses the technical problems of insufficient accuracy and poor robustness of traditional photovoltaic power prediction models under complex meteorological conditions by integrating a rainfall adaptive mechanism with time-frequency co-modeling. Specifically, it constructs a dual Copula feature selection framework to accurately identify key influencing factors under extreme weather conditions. Then, based on a dynamic attention mechanism for rainfall intensity, the model can adaptively focus on periods of rainfall disturbance. An enhanced Fourier mixture module is used to decouple multi-scale features in the time series, strengthening the representation ability of periodic patterns and high-frequency fluctuations. Finally, a gated fusion mechanism achieves optimal synergy of time-frequency features. This method significantly improves the model's response to sudden weather events such as rainfall and its ability to model multi-scale time series features, demonstrating higher prediction accuracy and stability under various meteorological scenarios. Attached Figure Description

[0013] Figure 1 A schematic diagram illustrating the steps of a photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion provided by the present invention; Figure 2 A schematic diagram of the structure of a photovoltaic power prediction model based on rainfall adaptive mechanism and time-frequency fusion provided by the present invention; Figure 3 A three-dimensional interactive correlation coefficient matrix plot; Figure 4 A scatter plot showing the lower tail dependency of POAI and POWER; Figure 5 Image showing the prediction results for sunny day scenarios from different models; Figure 6 Image showing the prediction results for rainy scenes from different models; Figure 7 Plots showing prediction results for different model mutation scenarios; Figure 8 The image shows the predicted results of the ablation experiment under a clear sky. Figure 9This is a diagram showing the predicted results of the ablation experiment under rainy conditions. Figure 10 This is a graph showing the predicted results of ablation experiments with sudden mutation scenarios. Detailed Implementation

[0014] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. In the following description, the expression "some embodiments" refers to a subset of all possible embodiments; however, it should be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.

[0015] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention can be practiced without one or more of these details. In other instances, certain technical features well-known in the art have not been described in order to avoid obscuring the invention.

[0016] It should be understood that the present invention can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein. Rather, providing these embodiments will make the disclosure thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Furthermore, the terminology used herein is intended only to describe particular embodiments and is not intended to limit the invention. When used herein, the singular forms “a,” “an,” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “compose” and / or “comprising,” when used in this specification, identify the presence of the stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups. When used herein, the term “and / or” includes any and all combinations of the associated listed items.

[0017] It should also be noted that when an element is referred to as being "fixed to" another element, it can be directly attached to the other element or there may be an intervening element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or there may be an intervening element. The terms "vertical," "horizontal," "inner," "outer," "left," "right," and similar expressions used herein are for illustrative purposes only and do not represent the only possible implementation.

[0018] To fully understand this invention, a detailed structure will be presented in the following description to illustrate the technical solution proposed by this invention. Optional embodiments of the invention are described in detail below; however, in addition to these detailed descriptions, the invention may have other embodiments.

[0019] Firstly, this invention provides a photovoltaic power prediction method based on a rainfall adaptive mechanism and time-frequency fusion, please refer to the appendix. Figure 1 The method includes the following steps: Step S1: Acquire meteorological data and preprocess it, then use the Clayton-Copula and Gaussian-Copula functions together to filter out key influencing features from the meteorological data.

[0020] As a preferred embodiment of the present invention, step S1, which combines the Clayton-Copula function and the Gaussian-Copula function to screen out key influencing features from meteorological data, specifically includes: The correlation matrix between meteorological data and power output is calculated using the Gaussian-Copula function. Based on the correlation matrix, the correlation strength index between each meteorological factor and photovoltaic power output is calculated. Then, based on the preset correlation threshold, the first set of key meteorological features that have a stable and significant correlation with photovoltaic power output under normal or normal meteorological conditions is selected. In this embodiment, its Gaussian-Copula mathematical expression is as follows:

[0021] in, It is the inverse cumulative distribution function (CDF) of the standard normal distribution. The mean is 0, and the covariance matrix is The CDF of a multivariate normal distribution is used to describe the correlation between variables. , All are standard uniformly distributed variables. This refers to the number of key meteorological features.

[0022] The lower tail dependency relationship between meteorological data and photovoltaic power output is analyzed by Clayton-Copula function to obtain the lower tail dependency parameter between meteorological data and photovoltaic power output. The part of the dependency parameter in step S2 that is greater than the preset threshold is filtered out to select the second type of feature subset that has a stable and significant correlation with photovoltaic power output under extreme conditions of low light and heavy rainfall. In this embodiment, its Clayton-Copula mathematical expression is as follows:

[0023] in, It depends on the parameter, and >0, , All are standard uniformly distributed variables.

[0024] The first set of key meteorological features and the second set of key features are combined to obtain the set of key impact features.

[0025] In this embodiment, a Gaussian–Clayton dual Copula feature screening framework is constructed to characterize the asymmetric nonlinear dependence between meteorological variables and photovoltaic power under extreme weather conditions. At the same time, it effectively makes up for the lack of adaptability of traditional linear correlation analysis in scenarios such as low light and heavy rainfall.

[0026] As a preferred embodiment of the present invention, step S1 further includes, in order to reasonably reduce the predicted value of photovoltaic power when the rainfall intensity is high, adaptive weighting of key influencing features is performed through a rainfall adaptive attention mechanism, as follows: Rain pressure is calculated based on rainfall and lower tail dependency parameters. The rain pressure is mapped to a weight mask using the sigmoid function. The weight mask is then incorporated into an attention mechanism to calculate its attention score. The weights are dynamically adjusted under different rainfall conditions based on the attention score.

[0027] In this embodiment, Rainfall-Aware Attention (RAA) is an improved attention mechanism used for adaptively weighting rainfall features in photovoltaic power prediction tasks. This mechanism dynamically adjusts the attention distribution to enhance the contribution of time steps with greater rainfall impact to the prediction results. The core idea is to introduce a dynamic mask driven by rainfall features, which is used to adjust the attention weights, such as... Figure 1 As shown, the calculation process is as follows: (1) Structural rain pressure characteristics: Based on rainfall Lower tail dependency parameters derived from Copula Define a simplified rain pressure ( t ):

[0028] Among them, the index Adjustable rainfall enhances sensitivity to attention weighting.

[0029] (2) Normalized construction of rainfall mask

[0030] Use the sigmoid function to map the rain pressure proxy to a weight mask. :

[0031] in, This is the scaling factor, which defaults to 1. This is an empirical threshold.

[0032] (3) Incorporate the weight mask Mr into the attention mechanism: Attention score adjusted by rainfall-adaptive attention mechanism:

[0033] This rainfall-adaptive mechanism dynamically adjusts the attention weights based on different rainfall levels, enabling it to adapt to changes and improve the model's robustness. Combined with rainfall information, it allows the model to reasonably reduce the predicted photovoltaic power when rainfall intensity is high. Furthermore, this mechanism only adds lightweight masking calculations to the standard attention calculation, without significantly increasing computational costs.

[0034] Step S2: Use an enhanced Fourier mixture model to enhance the key impact features, including frequency domain transformation, frequency band adaptive enhancement, phase correction, and inverse Fourier transform to recover the time domain signal, to obtain the enhanced key impact features.

[0035] In some embodiments, time series data in photovoltaic power prediction often exhibit periodicity and non-stationarity, and are influenced by factors such as weather and seasons. This results in significant fluctuations in the data in the time domain, making direct modeling difficult. The Fourier Transform (FT) is an effective signal processing method that can transform time series data from the time domain to the frequency domain, extracting their main periodic components and thus enhancing the model's understanding of photovoltaic power variation trends. Enhanced Fourier Mix (EFM) is a feature transformation method that combines time-domain and frequency-domain information. Its core idea is to use the Fast Fourier Transform (FFT) to map the input sequence to the frequency domain, perform adaptive processing on different frequency bands, and selectively enhance or suppress certain frequency components through a learnable gating mechanism, thereby improving the model's ability to model multi-scale time dependencies.

[0036] As a preferred embodiment of the present invention, the specific process of performing frequency domain conversion, adaptive frequency band enhancement, and phase correction on key influencing features in step S2 is as follows: The amplitude and phase of the frequency domain signal are obtained by using the fast Fourier transform to analyze the time series of key influencing features. Based on the typical spectral characteristics of photovoltaic power sequences, frequency domain signals are divided into frequency bands. For each frequency band, the mean and standard deviation of the amplitude of all frequency components within that band are calculated. Then, an adaptive threshold is calculated based on the mean and standard deviation. For critical frequency components whose amplitude exceeds the adaptive threshold, learnable weights are used to amplify and enhance them. To avoid time-domain waveform distortion or loss of timing information caused by adjusting the amplitude, a trainable phase correction parameter is set for the frequency band where the key frequency components are located to correct the original phase information.

[0037] For example, the frequency domain transformation specifically involves: first, processing the input time series... Perform a Fast Fourier Transform to convert it to a frequency domain representation:

[0038] in, It is the frequency domain representation of the input data. The amplitude of the signal can be obtained by performing a Fast Fourier Transform (FFT). and phase This is used for subsequent frequency band analysis and enhancement processing.

[0039] The frequency band adaptive enhancement specifically involves the following: different frequency components contribute differently to photovoltaic power prediction. Therefore, the frequency domain signal is divided into three frequency bands: low frequency (long-term trend), mid frequency (periodic change), and high frequency (short-term fluctuation), and adaptive enhancement is applied to each band. To scientifically divide the frequency bands, this invention sets the frequency boundary ratios to [0, 0.2], (0.2, 0.6], and (0.6, 1.0] based on empirical spectrum analysis results. This setting has been verified to have good distinguishing ability in actual data spectrum. Let the input sequence length be... The frequency range is Set two frequency boundaries. =0.2, =0.6 to divide the frequency bands. In order to remove noise in different frequency bands and enhance key features, an adaptive threshold is calculated in each frequency band. :

[0040] in, and They represent the first The mean and standard deviation of each frequency band, These are trainable parameters used to control the denoising intensity.

[0041] For frequency components exceeding a threshold, the enhanced Fourier mixture method employs learnable weights. Enhancement:

[0042] in, It is also a trainable parameter, which allows the model to adaptively adjust on different tasks and datasets.

[0043] In traditional Fast Fourier Transform (FFT) processing, directly modifying the amplitude can lead to the loss of temporal information. Therefore, the Enhanced Fourier Mixture method further optimizes the spectrum through a phase correction mechanism:

[0044] in, It is the original phase. These are trainable parameters. This phase correction mechanism ensures that the temporal structure is maintained during frequency domain enhancement, thereby avoiding information loss.

[0045] In a preferred embodiment of the present invention, after completing the amplitude adaptive enhancement and phase correction in the frequency domain in step S2, the time domain signal is recovered through inverse Fourier transform to obtain the enhanced key influence features, specifically including: The frequency domain signal after amplitude adaptive enhancement and phase correction is converted back to the time domain by inverse Fourier transform to obtain the initially enhanced time domain signal. From the original input signal, specific high-frequency components are separated by high-pass filtering to obtain the high-frequency residual signal; The enhanced time-domain signal is synthesized with the high-frequency residual signal to obtain the enhanced key influence features.

[0046] For example, after frequency enhancement and phase correction, the processed spectrum is transformed back to the time domain using inverse Fourier transform (IFFT):

[0047] Furthermore, the enhanced Fourier mixture method preserves high-frequency residual information to enhance the model's sensitivity to short-term peak fluctuations.

[0048] in, It is a high-frequency residual signal. It is a hyperparameter used to control the enhancement strength.

[0049] Step S3: Perform feature fusion on the time-domain features and frequency-domain features in the enhanced key impact features, including gating the time-domain features and frequency-domain features through a gating network, calculating feature weights, and performing weighted fusion operations to obtain the fused key impact features.

[0050] In some embodiments, traditional power prediction methods primarily focus on time-domain feature extraction, such as using attention mechanisms to model the time-series dependence of power. However, photovoltaic power signals also possess significant frequency-domain characteristics, and periodic fluctuations can be better characterized by Fourier transforms. Therefore, modeling with a single feature domain suffers from information gaps and struggles to fully capture the multi-scale characteristics of the data. To address this issue, this paper proposes a Cross-Domain Fusion (CDF) method, which combines time-domain attention features and frequency-domain Fourier features, utilizing a gate network (GT) to achieve adaptive fusion, thereby improving the accuracy of photovoltaic power prediction.

[0051] As a preferred embodiment of the present invention, step S3 involves processing the time-domain features and frequency-domain features using a gated network, including: The time-domain feature tensor and the frequency-domain feature tensor to be fused are concatenated to generate joint features, which are then input into a gating network. The gating network consists of at least a linear projection layer and a sigmoid activation function. The fully connected layer performs a linear transformation on the joint features and obtains a scalar gating value. The scalar gating value is then mapped to a closed interval of 0 to 1 by the sigmoid function to obtain a dynamic gating weight value. For example, since the importance of time-domain and frequency-domain features varies in different scenarios, this invention employs a gating mechanism to dynamically adjust their contributions. The calculation formula for the gating network is as follows:

[0052] Among them, gating weights This reflects the relative importance of time-domain and frequency-domain information in the current sample. For temporal attention features, For frequency domain Fourier features, , For learnable parameters, This is the Sigmoid activation function, used to restrict the weights to the range [0,1].

[0053] As a preferred embodiment of the present invention, the dynamic gating weight value obtained after the control network processing in step S3 is used to perform feature weight calculation and weighted fusion operation on the time domain features and frequency domain features to obtain the fused key influencing features, as follows: Two sets of learnable scaling and translation parameters are introduced. For time-domain features, the corresponding weight coefficients are calculated as the product of a dynamic gating weight value and a learnable scaling parameter, and then added to the learnable bias parameter. For frequency-domain features, the weight coefficients are calculated in the same way as those for time-domain features. The weighting coefficients of the time-domain features and the weighting coefficients of the frequency-domain features are weighted and fused to obtain the fused key influence features.

[0054] For example, the feature weights are calculated as follows: The weight calculations in the time and frequency domains are further refined and defined as follows:

[0055] in, , All are learnable scaling parameters. , For biasable learnable parameters, The weights are normalized; these weights are used to adjust the importance of time-domain and frequency-domain features.

[0056] Then, a weighted fusion strategy is used to combine time-domain and frequency-domain features:

[0057] And further adjustments are made through a fully connected layer:

[0058] in, The weight parameters of the fully connected layer are learnable parameters of the model, used to process the fused cross-domain features. Perform a linear transformation to adapt the mapping relationship between the feature dimension and the prediction target; These are the bias parameters for the fully connected layer, and also the learnable parameters for the model. They are used to add an offset after the feature linear transformation to optimize the model's fitting ability.

[0059] Step S4: Perform power prediction on the key impact features after fusion, and map the fully connected layer to the target variable to output the final predicted photovoltaic power value.

[0060] Secondly, this invention also provides a photovoltaic power prediction model based on a rainfall adaptive mechanism and time-frequency fusion, which can be applied to the above-mentioned prediction method, such as... Figure 2 As shown, the model includes: The input layer is used to input meteorological data and time-series data and perform preprocessing. The feature selection layer is used to filter out key impact features from meteorological data using the Clayton-Copula and Gaussian-Copula functions. Information Enhancement Layer: The enhanced Fourier mixture model is used to enhance the key impact features, including frequency domain transformation, frequency band adaptive enhancement, phase correction, and inverse Fourier transform to recover the time domain signal, to obtain the enhanced key impact features. The spatiotemporal fusion layer is used to fuse the temporal and frequency domain features in the enhanced key impact features. This includes passing the temporal and frequency domain features through a gating network, calculating feature weights, and performing a weighted fusion operation to obtain the fused key impact features. The output layer is used to predict the power of key impact features after fusion, and the fully connected layer maps it to the target variable, outputting the final predicted photovoltaic power value.

[0061] In this embodiment, the prediction model mainly includes the following key steps: (1) Input layer The model's input includes multiple photovoltaic power-related features, meteorological data, and time-series data. The input data shape is set as follows:

[0062] in, For time steps, The number of input features.

[0063] (2) Feature enhancement based on the formula:

[0064] in, These are Clayton-Copula dependency parameters.

[0065] The purpose of this feature enhancement is to amplify the contribution of key features, prevent their impact on power prediction from being weakened, and ensure that they have stronger expressive power during feature fusion.

[0066] (3) Stacked Enhanced Encoder After feature augmentation, the data is sequentially passed through a stacked augmentation encoder EEB. Output features. A comprehensive understanding of the timing characteristics of photovoltaic power can be expressed as follows:

[0067] (4) Spatiotemporal aggregation Enhance encoder output It is still a time series representation. In order to obtain the final global features, this paper uses global average pooling to aggregate spatiotemporal information:

[0068] Global pooling layers can not only reduce computational complexity and avoid fully connected layers from processing high-dimensional time series, but also enhance global information extraction, enabling models to make predictions based on long-term trends.

[0069] (5) Output layer Ultimately, global features By mapping to the target variable through a fully connected layer, the final predicted photovoltaic power value is output. .

[0070]

[0071] For model training, this invention uses dynamic learning rate decay and early stopping mechanisms, and employs the Huber loss function to reduce the impact of outliers on model training. The prediction results are then denormalized to output the final predicted photovoltaic power value.

[0072] In this embodiment, the experimental data comes from historical power data of distributed photovoltaic power stations from November 2021 to September 2023, as well as relevant weather data (planar azimuth irradiance and temperature, air pressure, rainfall, cloud cover, incident radiation amplitude, and wind speed at two monitoring points), with a time granularity of 15 minutes. Based on the WMO weather coding standard, the data is divided into three scenarios: Clear skies (WWC=0): Periods with no rainfall and cloud cover <30%; Rainy / overcast scenario (WWC=1): Periods of continuous rainfall or cloud cover >70%; Sudden change scenario (WWC=2): Transitional period in which the rainfall intensity changes by more than 5 mm / h within 1 hour.

[0073] For example, the model proposed in this invention is developed based on the TensorFlow 2.10.0 and Keras framework deep learning environment, and is programmed using Python 3.12. The computer configuration used to train the model is as follows: AMD Ryzen 9 7945HX (with Radeon Graphics 32 CPUs 2.5GHz), 16 GB of memory, and NVIDIA GeForce RTX 4060 GPU.

[0074] For example, this invention uses the following evaluation metrics to quantify the performance of the proposed model. Mean Absolute Error (MAE): MAE is the average of the absolute errors between the predicted and actual values. A smaller MAE indicates better performance of the prediction model, and MAE is more sensitive to samples with larger biases. The formula is as follows:

[0075] in, It is the first The actual value of each sample That is the corresponding predicted value. This indicates the size of the input set.

[0076] Root Mean Squared Error (RMSE): RMSE represents the square root of the mean squared difference between the model's predicted values ​​and the actual values. The lower the RMSE, the better the model.

[0077]

[0078] R² (R-Squared): R² is a statistic that measures how well a model fits the observed data. R² ∈ [0,1], and the closer it is to 1, the better the model fits. Its formula is as follows:

[0079] in, It is the average of the actual values.

[0080] For example, this invention uses the Copula method to model the dependency structure of photovoltaic system variables and compares the applicability of different Gaussian-Copula and Clayton-Copula methods. First, data processing is performed, converting timestamps into sine and cosine transforms of hours and months. Negative values ​​are set to NaN, and linear interpolation is used for padding, with forward and backward padding to ensure data integrity. Since the Copula method requires data to follow a uniform distribution between [0,1], we use MinMaxScaler for normalization and calculate pseudo-observations. Then, Gaussian-Copula and Clayton-Copula are used for modeling.

[0081] Copula's parameters are fitted using maximum likelihood estimation (MLE), and the correlation matrix and Kendall / Spearman correlation coefficient are calculated to assess the relationship between variables.

[0082] The Gaussian-Copula fitting method is used to fit the joint distribution of features, and the covariance matrix is ​​calculated. Finally, a three-dimensional interactive correlation coefficient matrix is ​​plotted using the covariance matrix to highlight highly correlated features, such as... Figure 3 As shown in Table 1, POAI and IR are highly correlated with POWER. The specific values ​​of the correlation coefficients for each feature are shown in Table 1.

[0083] Additionally, Clayton Copula uses parameters Quantify the tail dependency strength ( (When >0, there is a lower tail dependency), suitable for modeling the joint probability of extremely low-value events. First, Clayton Copula fitting is performed on all features to calculate the Clayton parameters. The calculation results for the parameters of Kendall's Tau and Spearman's Rho are shown in Table 2. Among them, the parameters of POAI's Clayton Copula are... =16.065, indicating that under low irradiance conditions, power and POAI still maintain a strong correlation. The lower tail dependence scatter plot of POAI and POWER is shown below. Figure 4 As shown.

[0084] Table 1 Gaussian-Copula Fitting Characteristics and Power Correlation Coefficients

[0085] The Gaussian-Copula correlation coefficient for WEATHER_RAINFALL is only 0.018, but that for Clayton Copula is much higher. The parameter is 0.717, indicating that there is a strong correlation between rainfall and power under cloudy and rainy weather. Using rainfall features as an attention mask can dynamically adjust the attention distribution and enhance the contribution of cloudy and rainy weather conditions to the prediction results.

[0086] In summary, POAI, WEATHER_IR, TMP, hour_sin, and WEATHER_RAINFALL were ultimately selected as the input features for the model.

[0087] Table 2 Clayton Copula Parameters, Kendall, Spearman

[0088] For example, this experiment is based on the following parameter configuration to ensure the fairness and reproducibility of the comparative experiment.

[0089] The prediction model is the RAA-EFM-EEB prediction model, with an input feature dimension of 5 (POAI, TMP, IR, RAINFALL, hour_sin). The core parameters of the model are shown in Table 3, and the training parameters are shown in Table 4. The training set, validation set, and test set are divided into an 8:1:1 ratio. MinMaxScaler is used to normalize the features and target variables. The normalization formula is as follows:

[0090] In the formula, This represents the maximum value of the input feature sequence. This is the minimum value of the input feature sequence.

[0091] Table 3 Model Parameter Table

[0092] Table 4 Model Training Parameters

[0093] For example, to comprehensively evaluate the prediction performance of the RAA-EFM-EEB prediction model proposed in this invention, four representative deep learning models were selected as comparison objects: the traditional time-series model LSTM, the frequency domain augmentation model FFT-LSTM, the attention-enhanced model standard Transformer, and the deep ensemble model TCN-LSTM. Under the same dataset, evaluation metrics, and training parameter configurations, photovoltaic power prediction experiments were conducted on each model. The performance evaluation metrics are shown in Table 5, and the typical daily prediction results for sunny, cloudy / rainy, and sudden change scenarios are shown in Table 5. Figure 5 , Figure 6 , Figure 7 As shown.

[0094] As shown in Table 5, the model of this invention outperforms other models in all three metrics: MAE, RMSE, and R², demonstrating significant advantages. The MAE of this model is 0.388kW, a 49.1% reduction compared to the traditional Transformer model, a 40.9% reduction compared to the frequency-enhanced FFT-LSTM, and significantly better than TCN-LSTM (0.937kW), with a reduction of 58.5%. The RMSE reaches 0.766kW, outperforming the second-best model, FFT-LSTM, by 22.7%, indicating that the method of this invention has outstanding ability to suppress extreme errors. The R² exceeds 0.985, a 1.9 percentage point improvement over LSTM, proving that the predicted results have a stronger linear correlation with the true values. The parameters of the above-mentioned comparative models are shown in Table 6.

[0095] Table 5 Evaluation metrics for the comparative models

[0096] Table 6 Core parameters of the comparison model

[0097] Analysis of the time series prediction curves shows that, under a sunny day scenario (WWC=0), the RAA-EFM-EEB prediction model of this invention can track the diurnal fluctuations of photovoltaic power relatively well. Figure 5 As shown; in rainy scenarios (WWC=1), the RAA-EFM-EEB prediction model of this invention exhibits unique advantages, such as Figure 6As shown, when there is continuous rainfall or cloud cover >70%, the RAA module uses dynamic masking to increase the attention weight of rainfall features, enabling the predicted value to quickly respond to the power drop within 15 minutes; for abrupt change scenarios (WWC=2), the rainfall intensity changes by more than 5 mm / h between 12:30 and 13:30, such as Figure 7 As shown, the prediction performance of the RAA-EFM-EEB prediction model of the present invention is still better than that of other comparative models.

[0098] From a model architecture perspective, traditional LSTM models are limited by gradient decay and static forgetting mechanisms. In long-sequence predictions of abrupt changes, the gradient propagation efficiency of historical meteorological features decreases exponentially with the step size. LSTM's forgetting gate uses a fixed sigmoid function, making it difficult to dynamically adjust the memory strength of abrupt features such as rainfall. While FFT-LSTM models introduce frequency domain information through Fourier transform, their fixed frequency band division and static weight allocation cannot adapt to the multi-scale dynamic characteristics of photovoltaic power. The main reason for the poor performance of the standard Transformer in abrupt change scenarios is that its self-attention mechanism does not consider the dynamic influence of meteorological factors. Furthermore, the TCN-LSTM model, relying on temporal convolutions with a fixed expansion coefficient, performs poorly when handling high-frequency perturbations.

[0099] By comparing the prediction performance of the RAA-EFM-EEB prediction model with other models, it can be found that the model proposed in this invention exhibits good generalization ability and robustness under various weather conditions, especially in complex meteorological scenarios.

[0100] For example, in order to verify the contribution of each key module in the proposed prediction model to the photovoltaic power prediction performance, the present invention designed a series of ablation experiments, removing each module in turn and observing the changes in model performance, and comparing the impact of different models.

[0101] Algorithm 1: Remove Rainfall Adaptive Mechanism (RAA): Remove the rainfall-driven attention branch, simplify the gating fusion mechanism, and retain only the frequency domain processing branch.

[0102] Algorithm 2: Remove Enhanced Fourier Mixture (EFM): Remove the frequency domain analysis branch, simplify the gating fusion mechanism, and retain only the time domain feature processing.

[0103] Algorithm 3: RAA-EFM-EEB complete model.

[0104] The evaluation indicators for the ablation experiment are shown in Table 7. Typical daily prediction results for sunny, rainy, and abrupt change scenarios are shown in Table 7. Figure 8 , Figure 9 , Figure 10 As shown.

[0105] Table 7 Evaluation Indicators for Ablation Experiments

[0106] The experimental results show that removing any module leads to a decline in model performance. The complete model outperforms the ablation-corrected version in all evaluation metrics, including MAE, RMSE, and MAPE. Removing the RAA module causes a systematic decline in model performance, with MAE significantly increasing from 0.388 kW to 1.067 kW, RMSE increasing from 0.766 kW to 1.484 kW, and the R² index decreasing by 3.7 percentage points to 0.948. This significant performance degradation reveals the core role of the RAA module in temporal feature extraction; its attention mechanism may effectively capture dynamic patterns of load changes by enhancing the model's sensitivity to key time points.

[0107] Although the removal of the EFM module had a relatively small impact on the model, it still led to a 26.5% increase in MAE (0.388 → 0.491 kW), a 40.6% increase in RMSE (0.766 → 1.077 kW), and a 1.3 percentage point decrease in R² to 0.972. This differentiated performance degradation indicates that the EFM module mainly functions in the optimization and reconstruction of the feature space. Its frequency domain analysis method may improve the model's ability to handle complex fluctuation patterns by decoupling the periodic and bursty components of the load signal. Notably, the complete model showed an additional 40.6% reduction in RMSE compared to the model without EFM, indicating a significant synergistic effect between EFM and RAA. The introduction of frequency domain features may have provided a more discriminative input representation for the attention mechanism.

[0108] From the perspective of error distribution characteristics, the increase in RMSE caused by removing the RAA module is significantly higher than the increase in MAE, indicating that this module is particularly effective in suppressing extreme errors. This phenomenon may stem from the attention mechanism's early identification ability of abnormal fluctuation patterns, effectively suppressing the cumulative propagation of errors over time by dynamically adjusting feature weights. In contrast, the removal of the EFM module leads to RMSE and MAE increases of different orders of magnitude, suggesting that its optimization effect is more reflected in improving the stability of feature representation rather than directly suppressing outliers.

[0109] The overall robustness of the model was fully validated through ablation experiments. Even in the suboptimal state of removing the EFM module, the model still maintains an R² value of 0.972. Experimental data further reveals that the RAA and EFM modules are functionally complementary: RAA mainly enhances the ability to model temporal dynamics, while EFM focuses on improving the completeness of feature engineering. The synergistic effect of the two enables the complete model to achieve an optimal balance in terms of MAE, RMSE, and R². This architectural design effectively solves the common problems of traditional time series models in complex load forecasting, such as limited feature representation and insufficient long-range dependency capture.

[0110] Thirdly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-mentioned photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion.

[0111] In this embodiment, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0112] Fourthly, embodiments of this application also provide an electronic device, including a processor and a memory, wherein the memory stores multiple instructions; the processor loads instructions from the memory to execute steps in any of the photovoltaic power prediction methods based on rainfall adaptive mechanism and time-frequency fusion provided in embodiments of this application.

[0113] Fifthly, embodiments of this application also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps in any of the photovoltaic power prediction methods based on rainfall adaptive mechanism and time-frequency fusion provided in embodiments of this application.

[0114] In this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be accomplished by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0115] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the photovoltaic power prediction methods based on rainfall adaptive mechanism and time-frequency fusion provided in embodiments of this application.

[0116] It should be noted that, through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0117] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. The scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion, characterized in that, The method includes the following steps: Step S1: Acquire meteorological data and preprocess it, and use the Clayton-Copula function and Gaussian-Copula function together to screen out key influencing features from the meteorological data; Step S2: Use an enhanced Fourier mixture model to enhance the key impact features, including frequency domain transformation, frequency band adaptive enhancement, phase correction, and inverse Fourier transform to recover the time domain signal, to obtain the enhanced key impact features; Step S3: Perform feature fusion on the time-domain features and frequency-domain features in the enhanced key impact features, including gating the time-domain features and frequency-domain features through a gating network, calculating feature weights, and performing weighted fusion operations to obtain the fused key impact features; Step S4: Perform power prediction on the key impact features after fusion, and map the fully connected layer to the target variable to output the final predicted photovoltaic power value.

2. The photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion according to claim 1, characterized in that, The step S1, which combines the Clayton-Copula and Gaussian-Copula functions to screen out key impact features from meteorological data, specifically includes: The correlation matrix between meteorological data and power output is calculated using the Gaussian-Copula function. Based on the correlation matrix, the correlation strength index between each meteorological factor and photovoltaic power output is calculated. Then, based on the preset correlation threshold, the first set of key meteorological features that have a stable and significant correlation with photovoltaic power output under normal or normal meteorological conditions is selected. The lower tail dependency relationship between meteorological data and photovoltaic power output is analyzed by Clayton-Copula function to obtain the lower tail dependency parameter between meteorological data and photovoltaic power output. The part of the dependency parameter in step S2 that is greater than the preset threshold is filtered out to select the second type of feature subset that has a stable and significant correlation with photovoltaic power output under extreme conditions of low light and heavy rainfall. The first set of key meteorological features and the second set of key features are combined to obtain the set of key impact features.

3. The photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion according to claim 2, characterized in that, Step S1 further includes, in order to reasonably reduce the predicted value of photovoltaic power when the rainfall intensity is high, adaptive weighting of key influencing features is performed through a rainfall adaptive attention mechanism, as follows: Rain pressure is calculated based on rainfall and lower tail dependency parameters. The rain pressure is mapped to a weight mask using the sigmoid function. The weight mask is then incorporated into an attention mechanism to calculate its attention score. The weights are dynamically adjusted under different rainfall conditions based on the attention score.

4. The photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion according to claim 3, characterized in that, The specific process of performing frequency domain transformation, adaptive frequency band enhancement, and phase correction on key influencing features in step S2 is as follows: The amplitude and phase of the frequency domain signal are obtained by using the fast Fourier transform to analyze the time series of key influencing features. Based on the typical spectral characteristics of photovoltaic power sequences, frequency domain signals are divided into frequency bands. For each frequency band, the mean and standard deviation of the amplitude of all frequency components within that band are calculated. Then, an adaptive threshold is calculated based on the mean and standard deviation. For critical frequency components whose amplitude exceeds the adaptive threshold, learnable weights are used to amplify and enhance them. To avoid time-domain waveform distortion or loss of timing information caused by adjusting the amplitude, a trainable phase correction parameter is set for the frequency band where the key frequency components are located to correct the original phase information.

5. The photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion according to claim 4, characterized in that, In step S2, after completing the amplitude adaptive enhancement and phase correction in the frequency domain, the time domain signal is recovered through inverse Fourier transform to obtain the enhanced key influence features, specifically including: The frequency domain signal after amplitude adaptive enhancement and phase correction is converted back to the time domain by inverse Fourier transform to obtain the initially enhanced time domain signal. From the original input signal, specific high-frequency components are separated by high-pass filtering to obtain the high-frequency residual signal; The enhanced time-domain signal is synthesized with the high-frequency residual signal to obtain the enhanced key influence features.

6. The photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion according to claim 5, characterized in that, Step S3 involves processing the time-domain and frequency-domain features using a gated network, including: The time-domain feature tensor and the frequency-domain feature tensor to be fused are concatenated to generate joint features, which are then input into a gating network. The gating network consists of at least a linear projection layer and a sigmoid activation function. The fully connected layer performs a linear transformation on the joint features and obtains a scalar gating value. The scalar gating value is then mapped to a closed interval of 0 to 1 by the sigmoid function to obtain a dynamic gating weight value.

7. The photovoltaic power prediction method based on rainfall adaptive mechanism and time-frequency fusion according to claim 6, characterized in that, The dynamic gating weight values ​​obtained after processing by the control network in step S3 are used to calculate feature weights and perform weighted fusion operations on the time-domain features and frequency-domain features to obtain the fused key influencing features, as follows: Two sets of learnable scaling and translation parameters are introduced. For time-domain features, the corresponding weight coefficients are calculated as the product of a dynamic gating weight value and a learnable scaling parameter, and then added to the learnable bias parameter. For frequency-domain features, the weight coefficients are calculated in the same way as those for time-domain features. The weighting coefficients of the time-domain features and the weighting coefficients of the frequency-domain features are weighted and fused to obtain the fused key influence features.

8. A photovoltaic power prediction model based on rainfall adaptive mechanism and time-frequency fusion, characterized in that, The model includes: The input layer is used to input meteorological data and time-series data and perform preprocessing. The feature selection layer is used to filter out key impact features from meteorological data using the Clayton-Copula and Gaussian-Copula functions. Information Enhancement Layer: The enhanced Fourier mixture model is used to enhance the key impact features, including frequency domain transformation, frequency band adaptive enhancement, phase correction, and inverse Fourier transform to recover the time domain signal, to obtain the enhanced key impact features. The spatiotemporal fusion layer is used to fuse the temporal and frequency domain features in the enhanced key impact features. This includes passing the temporal and frequency domain features through a gating network, calculating feature weights, and performing a weighted fusion operation to obtain the fused key impact features. The output layer is used to predict the power of key impact features after fusion, and the fully connected layer maps it to the target variable, outputting the final predicted photovoltaic power value.