A deep learning photovoltaic power generation long-term prediction method fusing domain knowledge
By constructing a refined classification module for meteorological characteristics and introducing theoretical modeling based on photovoltaic physical mechanisms, the problem of the disconnect between the mechanization of meteorological factor modeling and physical laws in long-term photovoltaic power generation forecasting has been solved. This has enabled high-precision long-term photovoltaic power generation forecasting and improved the ability to capture long-term trends and physical consistency.
Patent Information
- Application Number
- CN202511358912.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-09-23
AI Technical Summary
In existing long-term photovoltaic power generation forecasting technologies, the mechanized processing of meteorological factors for continuous meteorological variables and discrete weather events ignores the differences in physical semantics, resulting in a disconnect from physical laws, insufficient capture of long-term dependencies, insufficient ability of shallow networks to model long-term trends, a separation between data-driven approaches and physical mechanisms, and difficulties in cross-disciplinary collaborative feature alignment and integration of non-differentiable physical models.
A refined meteorological feature classification module is constructed to generate discrete weather category labels. The embedded representation is spliced with continuous meteorological features, and the Fusionformer model is used for prediction. The theoretical power model of photovoltaic physical mechanism is introduced, and the final prediction result is generated through weighted fusion.
It improves the accuracy and physical consistency of long-term photovoltaic power generation forecasts, enhances the ability to capture sudden changes and long-term trends, and provides high-precision grid dispatch support.
Smart Images

Figure CN120879570B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power generation technology, and more specifically to a deep learning method for long-term prediction of photovoltaic power generation that integrates domain knowledge. Background Technology
[0002] Photovoltaic power generation, as one of the core forms of clean and renewable energy, exhibits significant nonlinearity, periodicity, and abrupt changes in its output power, and is highly dependent on meteorological conditions and system characteristics. Accurate long-term power forecasting is crucial for grid security dispatch, energy trading, and power plant operation and maintenance, essentially constituting a complex meteorological-driven time series forecasting problem. Recent research has focused on a "decomposition-shallow fusion" framework, whose structure is based on a cascade of time series decomposition algorithms and shallow neural networks: first, the power generation sequence is decomposed into trend, seasonal, and residual components; then, parallel LSTM and CNN branches are used to model the time series features of each component separately; and finally, the meteorological data is standardized and directly concatenated into the input to obtain the final output prediction value. This process relies on publicly available datasets and uses MSE (Mean Sequence Equivalence) as the single optimization objective for hyperparameter tuning. However, this technology suffers from three significant drawbacks: First, the modeling of meteorological factors is mechanized, treating continuous meteorological variables and discrete weather events the same, merely splicing numerical values while ignoring physical semantic differences. This stems from the lack of a weather classification module, yet building a cross-regional generalized meteorological rule label library is costly. Second, there is a disconnect from physical laws; predicted values often exceed the theoretical power generation capacity boundary because the framework does not integrate a photovoltaic physical model, and non-standard parameters such as inverter efficiency curves make it difficult to embed physical constraints. Third, there is insufficient capture of long-term dependencies; shallow networks lack the ability to model long-term trends, and noise interference in the decomposition residuals is not effectively separated. Directly using deep Transformers faces the challenge of balancing computational complexity and frequency domain feature loss. The fundamental bottleneck lies in the separation between data-driven approaches and physical mechanisms; feature alignment and integration of non-differentiable physical models in interdisciplinary collaboration constitute the core obstacles to technological upgrades. Summary of the Invention
[0003] Purpose of the invention: The purpose of this invention is to provide a deep learning method for long-term prediction of photovoltaic power generation that integrates domain knowledge, thereby solving the problem of the disconnect between data-driven methods and physical laws in existing long-term prediction technologies for photovoltaic power generation.
[0004] Technical solution: The present invention provides a deep learning-based long-term photovoltaic power generation prediction method that integrates domain knowledge, comprising the following steps:
[0005] (1) Construct a meteorological feature fine classification module to classify the raw meteorological data and generate discrete weather category labels; the meteorological feature fine classification module includes a wind direction classification sub-module, a sky condition classification sub-module and a precipitation type classification sub-module;
[0006] (2) The discrete weather category labels are embedded and concatenated with the original continuous meteorological features to form an enhanced input sequence;
[0007] (3) Input the enhanced input sequence into the Fusionformer model to predict photovoltaic power generation; the Fusionformer model includes a local attention module, a frequency domain enhancement module, a global attention module, and a gated convolution mixer module;
[0008] (4) Introduce a theoretical power modeling module based on photovoltaic physical mechanism to calculate theoretical power generation based on photovoltaic system parameters and meteorological data;
[0009] (5) The output of the Fusionformer model is weighted and fused with the theoretical power generation to obtain the final prediction result.
[0010] Furthermore, in step (1), the wind direction classification submodule is used to discretize the continuous wind direction angle into eight wind direction labels according to the azimuth rules; the sky condition classification submodule combines the diffuse rate, irradiance fluctuation and sunrise and sunset information to classify the sky type; the precipitation type classification submodule constructs a rule tree based on the dew point temperature difference, air pressure change and humidity gradient to identify the precipitation pattern.
[0011] Furthermore, in step (2), the embedding representation is as follows: integer encoding is performed on various discrete weather labels to generate category indexes; each category index is mapped to a low-dimensional vector through an independent embedding layer; the low-dimensional vector is concatenated with the original continuous meteorological features to form a unified input sequence.
[0012] Furthermore, in step (3), the frequency domain enhancement module is as follows: the input sequence is subjected to Fourier transform and converted into a frequency domain representation; global features are extracted in the frequency domain using a multilayer perceptron; and the frequency domain features are mapped back to the time domain through inverse Fourier transform.
[0013] Furthermore, the gated convolution mixer module in step (3) is as follows: it applies dilated convolution and pointwise convolution in parallel to extract multi-scale features; and it introduces the gated linear unit (GLU) mechanism for feature selection and information filtering.
[0014] Furthermore, in step (4), the physical model chain calculation in the theoretical power modeling module is as follows: calculate the sun's position and determine day and night; calculate the tilt surface irradiance and incident angle correction; estimate the component temperature; calculate the DC power and the converted AC power.
[0015] Furthermore, in step (5), the weighted fusion is specifically as follows: the Fusionformer model results and the theoretical power generation are linearly weighted and summed according to preset weights.
[0016] Furthermore, it also includes post-processing and pruning operations on the prediction results of the Fusionformer model, specifically as follows: setting negative prediction results to zero; determining the nighttime period based on the solar altitude angle and setting the measured value to zero.
[0017] An electronic device according to the present invention includes a memory and a processor. The memory stores a computer program, and the processor executes the program to implement the steps of the method.
[0018] The present invention discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method.
[0019] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: This invention constructs an interpretable deep learning prediction method that integrates physical modeling. It transforms meteorological rules into embeddable weather semantic tags to assist the model in understanding the impact of weather on power generation; it designs a frequency-time domain joint attention architecture to enhance the ability to capture sudden changes and long-term trends; simultaneously, it constructs a physical model chain based on photovoltaic system parameters and site information to calculate theoretical power generation, and integrates this with the deep learning prediction results. This ensures accuracy while improving physical consistency and interpretability, providing high-precision long-term prediction support for power grid dispatch. Attached Figure Description
[0020] Figure 1 This is a flowchart of the present invention;
[0021] Figure 2 The weather classification and embedding process of this invention divides raw meteorological data into discrete weather categories according to meteorological rules;
[0022] Figure 3 This is a diagram illustrating the overall architecture of the deep learning model of this invention.
[0023] Figure 4 This is the frequency domain enhancement module of the present invention;
[0024] Figure 5 This is a schematic diagram of the gated convolution mixer module of the present invention;
[0025] Figure 6 This is the theoretical power modeling module of the present invention;
[0026] Figure 7 The curves representing the prediction results of this invention are shown, with the horizontal axis representing time (15-minute granularity, 5 days / 720 steps) and the vertical axis representing power generation (kW). Detailed Implementation
[0027] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0028] like Figure 1 As shown, this embodiment of the invention provides a deep learning-based long-term photovoltaic power generation prediction method that integrates domain knowledge, including the following steps:
[0029] (1) First, the raw meteorological data is subjected to refined classification of meteorological characteristics to generate discrete category features with physical meaning. The weather classification module proposed in this invention, such as... Figure 2 As shown, it includes three sub-modules: wind direction classification, sky condition classification, and precipitation type classification. The wind direction classification module uses numerical wind direction angles from meteorological data and discretizes them into eight wind direction azimuths using rules; the sky condition classification module combines diffuse rate, irradiance fluctuations, and sunrise and sunset information for classification; the precipitation type classification module uses dew point temperature difference, air pressure changes, humidity gradients, and other factors to construct a rule tree for classification.
[0030] (2) The three discrete labels—wind direction, sky conditions, and precipitation type—were processed using an embedding modeling method suitable for deep learning models. First, each label was converted into a unique category index using integer encoding, without participating in the standardization of continuous features. Then, an independent embedding layer was established for each label, mapping it to a low-dimensional learnable entity vector, which was then concatenated and fused with the original meteorological features during the model's forward propagation. The fused 28-dimensional feature sequence was used as the input to the deep learning prediction model, thereby improving the model's ability to model the relationship between weather conditions and photovoltaic power generation.
[0031] (3) The fused feature sequence from step (2) is input into the Fusionformer model proposed in this invention to model and predict long-term photovoltaic power generation. This model adopts a phased structural design, sequentially introducing a local attention mechanism, a global attention mechanism, a frequency domain information enhancement module, and a gated convolution mixer, such as... Figure 3 As shown, this approach balances the extraction of short-term fluctuations and long-term trend characteristics, thereby improving the modeling accuracy and stability of complex time series features.
[0032] In the local attention module, the 28-dimensional input sequence X obtained in (2) is sliced along the time dimension into several non-overlapping time slices. The processing procedure is as follows:
[0033] ;
[0034] in, Represents the input sequence;
[0035] After slicing, the Patch is embedded as a Patch Token using the Embedding operation, as follows:
[0036] ;
[0037] The `PatchEmbed(·)` operation transforms each patch from its original length `S` to a hidden dimension `D` through a trainable linear layer. A learnable global scalar is then concatenated into the embedded result to capture local information affected by rapid, short-term fluctuations, thus obtaining... Each variable contains N patches and a global scalar. Then, patch-wise self-attention is applied to calculate local attention, capturing temporal dependencies within the same variable. This process is as follows:
[0038] ;
[0039] in, Let l represent the l-th model block. Self-Attn(·) represents multi-head self-attention on the Patch Token, used to capture the dependency of the variable in the time dimension, thus enabling the model to learn the short-term dynamic features of the time series. LN(·) represents layer normalization to ensure stable training. After such calculation, the global scalar contains rich local fluctuation information, providing semantic support for subsequent global attention.
[0040] Global attention mechanisms operate at the sequence level, aiming to capture correlations between variables and global trends. To achieve this, each variable sequence in the input sequence X is first embedded as a Series Token, as follows:
[0041] ;
[0042] Similar to the PatchEmbed(·) operation, SeriesEmbed(·) uses a learnable linear layer to transform each sequence from its recall length L to its hidden dimension D. This embedding process ensures that the generated vectors contain information about the entire sequence, and the embeddings of multiple sequences are represented as follows:
[0043] ;
[0044] Where B represents the Batch Size and C represents the number of variables.
[0045] A frequency domain information enhancement mechanism is introduced to process the embedded sequence. This module, for example... Figure 4 As shown. First, the input sequence is decomposed in the frequency domain using Fourier transform, converting the time-domain signal into a frequency-domain representation. The process is as follows:
[0046] ;
[0047] Where f is the frequency variable, It is a time variable, and j is the imaginary unit. . The first integral term is the real part of H, denoted as H. The second integral term is the imaginary part of . , recorded as .
[0048] A frequency-domain multilayer perceptron is implemented by separately computing the real and imaginary parts of the frequency components. For complex inputs, given a complex weight matrix... Given the complex deviation B, the frequency domain MLP can be expressed as:
[0049] ;
[0050] in This is the final output. Indicates the first layer, H is the activation function, and H is the frequency domain representation of the Fourier transform.
[0051] After completing frequency domain learning, the global information and key patterns extracted in the frequency domain are remapped back to the time domain through inverse transform. The process is as follows:
[0052] ;
[0053] The inverse transform calculation process uses the frequency domain f as the integration variable. Therefore, the overall process of the frequency domain time learner can be summarized as follows:
[0054] ;
[0055] in, for The corresponding spectrum, is a complex weight matrix, and B is a complex bias. It is the output of the frequency domain multilayer perceptron, which is finally converted back to the time domain. This results in an enhanced global sequence embedding for long-term trend modeling across variables.
[0056] To bridge local and global information, this invention introduces a cross-attention mechanism. Using the global scalar in local attention as the query and the frequency-domain-enhanced global embedding as the key and value, the cross-attention mechanism completes the fusion modeling between the two types of features. The process is as follows:
[0057] ;
[0058] Here, Cross-Attn(·) represents the multi-head Cross-Attention between Patch Token and Series Token. The output of the cross-attention layer... This will be used as input to the next self-attention layer to further model the sequence.
[0059] This mechanism enables dynamic interaction of context: on the one hand, local tokens receive global semantic guidance, enhancing their contextual consistency; on the other hand, global tokens absorb fine-grained features of local information, improving the ability to identify key time periods.
[0060] In traditional Transformers, feedforward networks (FFNs) tend to perform local linear processing on each token, ignoring the cross-dependencies between multiple variables. Therefore, we introduce a gated convolutional mixer module to replace the original FFN, adapting to the modeling requirements after global embedding, such as... Figure 5 As shown.
[0061] The gated convolutional mixer consists of dilated convolutions and pointwise convolutions, extracting dependency features across different time ranges through multi-scale parallel modeling. Simultaneously, a gated logic unit (GLU) is introduced to enhance feature selection and information filtering capabilities, further strengthening the model's adaptability to multi-scale temporal structures.
[0062] The predicted results undergo further post-processing and trimming. First, the predicted values are checked hourly; if a value is less than zero, it is set to zero to eliminate physically impossible negative power output. Second, the solar altitude angle is calculated based on the station's latitude, longitude, and time information. For nighttime periods with a solar altitude angle less than or equal to 3, even if the predicted value is positive, it is set to zero to prevent physical violations such as positive power generation at night. This step yields the final deep learning model's predicted power generation.
[0063] (4) This invention introduces a theoretical power modeling module based on photovoltaic physical mechanisms, such as Figure 6 As shown, this module takes the target power plant's equipment parameter information (including photovoltaic module and inverter models and their key electrical performance parameters, series and parallel configuration), installation parameter information (including module tilt angle, azimuth angle, number of parallel modules per string, number of strings connected to each inverter), geographical location information (including site latitude and longitude, altitude and time zone), and predicted meteorological data (including irradiance, ambient temperature, wind speed, etc.) as inputs to construct a physical calculation model of the photovoltaic system.
[0064] Based on the established photovoltaic physical calculation model, this invention uses a physical model chain to calculate the theoretical power generation at each predicted time. Specifically, this includes: First, calculating solar position parameters based on geographical location and time information, and determining the day / night periods; second, converting the irradiance component in the predicted meteorological data to the tilt surface of the module to obtain the total power output (POA) of the array surface, and combining this with incident angle correction to obtain the effective irradiance; then, estimating the module cell temperature based on the module temperature model using ambient temperature and wind speed; next, calculating the DC output power at the maximum power point based on the module's electrical characteristic parameters and the estimated temperature, and mapping it to AC output power through an inverter model. Finally, forming a theoretical power generation sequence with a one-to-one correspondence between the obtained AC power and the time axis.
[0065] The obtained Fusionformer model prediction results are aligned with the obtained theoretical power generation sequence on the time axis and then fused according to a preset weight. In this embodiment, the weight is 0.5, that is, the theoretical power generation and the model prediction value each account for 50%. The fused result effectively improves the physical consistency and reliability of the prediction results and can be directly used for power grid dispatch and operation optimization.
[0066] This invention utilizes a PVOD dataset comprised of meteorological and power generation data from 10 photovoltaic power plants deployed in Hebei Province, China, for extensive experimental comparisons. To ensure the representativeness and generality of the results, three geographically non-adjacent photovoltaic power plants (site 1, site 4, and site 8) were selected as typical samples for result presentation. The experiment was designed to predict future sequences of different lengths using historical input sequences with 96 time steps. The comparison methods covered several mainstream models in recent years, and the evaluation metrics included mean squared error (MSE), mean absolute error (MAE), root mean square error (RMSE), and consistency index (IA), reflecting prediction accuracy and stability from different perspectives. As shown in Table 1, the deep learning-based long-term photovoltaic power generation prediction method DK_Fusionformer, which integrates domain knowledge, achieved excellent results at the selected sites and under different prediction step lengths, exhibiting lower MSE, MAE, and RMSE, and a higher consistency index (IA), indicating that this method has good accuracy and stability in long-term photovoltaic power generation prediction. Figure 7 The paper demonstrates the comparison between the predicted results of the DK_Fusionformer architecture with domain knowledge incorporation and the actual values for predicting the next 720 steps from a 96-step input sequence at site 1.
[0067] Table 1. Comparison of long-term prediction performance of DK-Fusionformer with other models on the PVOD dataset.
[0068] ;
[0069] Furthermore, to verify the effectiveness and generalization ability of the proposed Fusionformer model, comparative experiments were conducted on several public datasets from different fields, including the electricity load dataset ECL, the meteorological dataset Weather, the power transformer temperature monitoring datasets ETTh1 / ETTh2 and ETTm1 / ETTm2 (hourly and minute-level data, respectively), and the traffic flow dataset Traffic. The comparison methods covered several mainstream models in recent years, and the evaluation metrics used were MSE and MAE, respectively, to measure prediction accuracy and bias. As shown in Table 2, Fusionformer demonstrated superior prediction results across different datasets and prediction step sizes, with a low overall error, exhibiting good stability and generalization ability. From the statistics of "number of times it ranked first," it achieved 24 times in MSE and 24 times in MAE, outperforming the comparative models, indicating that this method has high effectiveness in cross-domain time series prediction tasks.
[0070] Table 2. Comparison of long-term prediction performance of Fusionformer with other models on public datasets.
[0071] .
Claims
1. A deep learning-based long-term prediction method for photovoltaic power generation that integrates domain knowledge, characterized in that, Includes the following steps: (1) Construct a meteorological feature fine classification module to classify the raw meteorological data and generate discrete weather category labels; the meteorological feature fine classification module includes a wind direction classification sub-module, a sky condition classification sub-module and a precipitation type classification sub-module; the wind direction classification sub-module is used to discretize the continuous wind direction angle into wind direction eight-directional labels according to the azimuth rules; The sky condition classification submodule combines diffuse rate, irradiance fluctuation and sunrise and sunset information to classify sky types; The precipitation type classification submodule uses a rule tree constructed based on dew point temperature difference, sudden pressure change, and humidity gradient to identify precipitation patterns. (2) The discrete weather category labels are embedded and concatenated with the original continuous meteorological features to form an enhanced input sequence. The specific embedding representation is as follows: the discrete weather category labels are encoded with integers to generate category indices; each category index is mapped to a low-dimensional vector through an independent embedding layer; the low-dimensional vector is concatenated with the original continuous meteorological features to form an enhanced input sequence. (3) The enhanced input sequence is input into the Fusionformer model to predict photovoltaic power generation. The Fusionformer model includes a local attention module, a frequency domain enhancement module, a global attention module, and a gated convolution mixer module. The frequency domain enhancement module is as follows: Fourier transform is performed on the input sequence to convert it into a frequency domain representation; a multilayer perceptron is used to extract global features in the frequency domain; the frequency domain features are mapped back to the time domain through inverse Fourier transform. The gated convolution mixer module is as follows: dilated convolution and pointwise convolution are used in parallel to extract multi-scale features; a gated linear unit (GLU) mechanism is introduced for feature selection and information filtering. (4) Introduce a theoretical power modeling module based on photovoltaic physical mechanism to calculate theoretical power generation based on photovoltaic system parameters and meteorological data; the physical model chain calculation in the theoretical power modeling module is as follows: calculate solar position parameters based on geographical location and time information and determine day and night periods; convert the irradiance component in the predicted meteorological data to the tilt surface of the module to obtain the total irradiance of the array surface, and obtain the effective irradiance by combining the incident angle correction; estimate the module cell temperature based on the module temperature model using ambient temperature and wind speed; Then, based on the electrical characteristic parameters of the components and the estimated temperature, the DC output power at the maximum power point is calculated and mapped to the AC output power through the inverter model; the obtained AC power is used to form a theoretical power generation sequence that corresponds one-to-one with the time axis. (5) The output of the Fusionformer model is weighted and fused with the theoretical power generation to obtain the final prediction result; it also includes post-processing and pruning the prediction result of the Fusionformer model, as follows: the negative prediction result is set to zero; the nighttime period is determined according to the solar altitude angle and the measured value is set to zero.
2. The deep learning-based long-term photovoltaic power generation prediction method integrating domain knowledge as described in claim 1, characterized in that, In step (5), the weighted fusion is as follows: the Fusionformer model results and the theoretical power generation are linearly weighted and summed according to preset weights.
3. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the program to implement the steps of the method according to any one of claims 1-2.
4. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-2.
Citation Information
Patent Citations
Solar power generation power prediction method and device, electronic equipment and storage medium
CN119944677A
Photovoltaic power parallel prediction method
CN120297479A
Weather classification-based adaptive TimeXer model photovoltaic power prediction method and system
CN120297480A