Photovoltaic power prediction method based on multi-task neural network and physical constraint
By combining multi-task neural networks with physical constraints, the problem of insufficient accuracy and robustness of photovoltaic power generation prediction models under complex weather conditions was solved, achieving high-precision joint prediction of photovoltaic power generation and battery temperature, thus improving the model's adaptability and prediction performance.
Patent Information
- Application Number
- CN202511166897.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-12-02
AI Technical Summary
Existing photovoltaic power generation prediction models are unable to effectively integrate physical processes and dynamic meteorological characteristics, resulting in insufficient prediction accuracy and robustness, especially under complex meteorological conditions.
A multi-task neural network is constructed, combining astronomical and meteorological data, physical models, and deep learning methods. Through data-driven feature extraction, physical constraint, and spatiotemporal inference modules, high-precision joint prediction of photovoltaic power generation and battery temperature is achieved. The model performance is optimized by using a weighted coordination loss function.
It improves the accuracy and consistency of photovoltaic power generation forecasts, enhances the real-time adaptability and robustness of the model, and significantly improves the forecast accuracy and generalization ability to adapt to different geographical regions and climatic conditions.
Smart Images

Figure BDA0005556860670000021 
Figure BDA0005556860670000035 
Figure BDA0005556860670000038
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy prediction technology, specifically to a photovoltaic power prediction method based on multi-task neural networks and physical constraints. Background Technology
[0002] With the intensification of global climate change and the advancement of carbon neutrality goals, countries are accelerating the transformation of their energy systems and promoting the replacement of fossil fuels with renewable energy. Photovoltaic power generation, as one of the core technologies of clean energy, has provided crucial support for optimizing the energy structure through its rapid development. However, photovoltaic power generation is characterized by significant intermittency and volatility, with its output power highly dependent on meteorological conditions such as irradiance and temperature. This poses a severe challenge to the stable operation of power systems and grid dispatch. Therefore, high-precision photovoltaic power generation forecasting has become a key technological requirement for achieving efficient energy utilization and ensuring grid security.
[0003] Traditional statistical and shallow machine learning methods struggle to model nonlinear physical processes in photovoltaic (PV) systems, such as spectral mismatch and heat loss. While deep learning excels in feature extraction, its model characteristics lack physical interpretability. Furthermore, existing models often employ static parameters to handle dynamic influencing factors (such as module fouling and surface albedo), limiting prediction accuracy and robustness. Hybrid deep learning models (such as CNN-LSTM and GRU-MLP), while integrating the advantages of different network structures, often focus on data-driven feature extraction, lacking deep integration with the physical model. For example, key physical processes like effective irradiance calculation and battery temperature modeling are typically simplified to fixed formulas without dynamic optimization through trainable weights. Moreover, existing methods often model PV power and battery temperature independently, failing to improve prediction accuracy and robustness through joint optimization. For instance, PV power prediction and battery temperature modeling are often separated, ignoring their strong correlation in the physical processes.
[0004] To address the aforementioned problems, there is an urgent need for a photovoltaic power prediction technology that integrates astronomical algorithms, physical models, and deep learning to resolve the contradictions arising from multi-source data fusion, physical constraint embedding, and insufficient dynamic adaptability. This invention constructs a multi-task neural network (MTNN) and combines astronomical and meteorological data, physical models, and deep learning methods to achieve high-precision and highly consistent photovoltaic power prediction, providing a reliable solution for the operation of photovoltaic power plants under complex meteorological conditions. Summary of the Invention
[0005] To address the problems of existing technologies, this paper proposes a photovoltaic power prediction method based on multi-task neural networks and physical constraints. By integrating physical models and data-driven models, it achieves high-precision joint prediction of photovoltaic power generation and battery temperature.
[0006] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:
[0007] Step 1: Obtain the metadata, historical numerical weather forecast data, and historical power generation data of the target photovoltaic power station, and use the missing value imputation and outlier handling for model training and validation;
[0008] Step 2: Based on the latitude, longitude, and time of the photovoltaic power station, calculate the solar zenith angle, azimuth angle, and altitude angle, and combine irradiance transpose, solar spectrum characterization variables, and atmospheric precipitable water to estimate astronomical and meteorological factors, thereby achieving data augmentation of the original dataset;
[0009] Step 3: Construct a data-driven feature extraction (DFE) module based on a convolutional neural network. Use historical meteorological data, power generation data, and the enhanced data from Step 2 as inputs for the 24 hours prior to the current time, totaling 96 time steps. Dynamically estimate the spectral mismatch correction factor, pollution factor, and surface albedo, and output hidden features.
[0010] Step 4: Construct a custom neural network module (PCB) based on physical constraints, calculate the temperature of photovoltaic cells based on the energy balance method, define parameters such as heat exchange coefficient as trainable weights in the physical constraint module, and integrate module efficiency-related parameters;
[0011] Step 5: Construct a temporal-space reasoning module (TIB) based on residual linking gated loop units to realize temporal reasoning of photovoltaic power generation;
[0012] Step 6: Utilize a multi-level network structure consisting of a Data-Driven Feature Extraction (DFE) module, a Physical Constraint (PCB) module, and a Spatiotemporal Inference (TIB) module to achieve end-to-end modeling from raw data input to final prediction output;
[0013] Step 7: Define the weight coordination loss function and update the parameters of the DFE, PCB and TIB modules synchronously through end-to-end training;
[0014] Step 8: The model uses numerical weather forecast data for 16 time steps, ranging from 15 minutes to 4 hours in advance, to predict photovoltaic power generation and module cell temperature.
[0015] Preferably, in step 2, when the solar altitude angle is less than 90 degrees, the sun is below the horizon and the photovoltaic output is zero. The following formula is used to perform data augmentation based on the solar altitude angle, which improves the model's ability to learn the zero-output characteristics of photovoltaic power generation at night, while ensuring the continuity of the characteristic curve during the day.
[0016]
[0017] in It is the solar altitude angle.
[0018] Preferably, in step 3, historical photovoltaic power generation is first inserted after each feature to reconstruct historical data, so that in the reconstructed data, each feature is closely related to the historical photovoltaic power generation, as shown in the following formula.
[0019] X′ t =[X t ;Y],for eacht∈{1,2,…,T} (2)
[0020] Furthermore, the input data is processed through a multi-layer convolutional neural network. This network consists of a convolutional layer with a kernel size of (4,2) and a stride of (1,2) using the ReLU activation function, followed by a max pooling layer with a pooling window size of (4,1) and a stride of (4,1); then a convolutional layer with a kernel size of (4,1) using the ELU activation function and a corresponding max pooling layer; and finally a convolutional layer with a kernel size of (6,1) using the linear activation function. The output is flattened into a one-dimensional vector. This vector is then passed through a fully connected layer to generate seven key parameters, and expanded to 16 time steps using the RepeatVector mechanism to maintain the same dimension for subsequent fusion modeling.
[0021] Preferably, the effective irradiance calculated in step 4 consists of direct radiation, scattered radiation, and ground-reflected radiation received by the photovoltaic module surface, taking into account the mismatch between the photovoltaic module's absorption spectrum and the irradiated photovoltaic, the surface dirt of the module, and the reflection of the incident light, as shown in the following formula.
[0022]
[0023] In the above formula, This is a spectral mismatch correction factor. As a contaminant correction factor for photovoltaic array surfaces, The incident light reflection correction factor is shown in equation (4).
[0024]
[0025] I b The component of direct irradiance on the inclined plane where the photovoltaic module is located is calculated as shown in equation (5); The diffuse irradiance of the sky is shown in equation (6); The ground reflected irradiance is shown in equation (7).
[0026]
[0027] In the above formula, The data-driven feature extraction module constructed in step 3 uses enhanced historical data for dynamic calculation during the model prediction process. Its calculation process can be represented by the following formula:
[0028]
[0029] in, This is an estimate of the spectral mismatch correction factor. This represents an estimated value of ground reflectivity. This is an estimated value for the fouling correction factor on the photovoltaic array surface. These are estimates of the coefficients and empirical correction terms of the isotropic sky total internal reflection model. This is an estimate of the incident light reflection correction factor. DEF(...) represents the data-driven feature extraction module constructed in step 6, which uses the feature matrix X′ reconstructed in step 3 as input.
[0030] Furthermore, after estimating the effective irradiance on the surface of the photovoltaic module, the temperature of the photovoltaic module cell is calculated in step 4 based on the energy balance method, as shown in equations (9)-(10):
[0031]
[0032] in, T represents the photovoltaic module cell temperature estimated by the model. a Indicates ambient temperature. This indicates the amount of irradiance absorbed by the photovoltaic cell. This represents the fraction of irradiance absorbed by a photovoltaic cell. Indicates the normal operating temperature of the battery (NOCT). This indicates the efficiency of photovoltaic modules under NOCT. This indicates the temperature coefficient of a photovoltaic module. It is the heat exchange coefficient of the total surface area of the photovoltaic module, which is determined by wind speed (S). w The two constant terms determine the result.
[0033]
[0034] The constant in the formula, i.e. As trainable weights in the module constructed in step 4, they are determined using training data during model training, and their update process can be represented by the following formula.
[0035]
[0036] in, This represents the current value of the i-th trainable parameter at the t-th iteration, including: the temperature coefficient of the photovoltaic module. Efficiency of photovoltaic modules under NOCT Attenuation coefficient Normal operating battery temperature Two constant terms in the formula for the heat exchange coefficient of the total surface area of a photovoltaic module α l The learning rate controls the step size for parameter updates; Represents the overall loss function For parameter w i The gradient at the current iteration t. Each parameter w is denoted by gradient descent. i Update along its negative gradient direction to obtain the new parameter values for the next iteration (t+1).
[0037] Preferably, step 5 employs a multi-layer recurrent neural network structure combining a gated recurrent unit (GRU) and a residual connection mechanism to process the input numerical weather prediction (NWP) data and extract time-dependent features. This network receives the outputs of the modules constructed in steps 3 and 4, as well as meteorological data for the next 4 hours, broken down into 15-minute intervals. Time-series feature extraction is achieved through the following steps:
[0038] The first GRU layer contains 128 hidden units, and each GRU unit outputs sequential data to preserve the output at all time steps. A Dropout layer with a dropout rate of 0.5 is then applied to prevent overfitting. Next, a fully connected layer maps the input to a 128-dimensional vector, and a tanh activation function is used for a non-linear transformation to obtain residual terms. These residual terms are then added to the output of the first GRU layer to form the hidden state after residual enhancement.
[0039] The second-layer GRU further processes the output after residual enhancement, with 64 hidden units. It also retains the output of all time steps and connects to a Dropout layer (dropout rate 0.5). Based on this, a second-level residual connection is introduced. The output of the previous layer is mapped to a 64-dimensional vector using a fully connected layer and then directly added to the current GRU output to obtain the hidden state after the second-layer residual enhancement.
[0040] The third-layer GRU continues to process the output of the previous layer, with 32 hidden units. After the output undergoes a Dropout operation, a residual connection is introduced again. That is, the output of the previous layer is mapped to a 32-dimensional vector through a fully connected layer. After linear activation, it is added to the current GRU output to obtain the final temporal feature.
[0041] In the output section, a dual-path prediction structure is designed:
[0042] The first path: extract features from it, and output 16-step prediction results through a fully connected layer;
[0043] The second approach is to directly perform a fully connected transformation on the original meteorological data for the next 4 hours, in 15-minute increments, and output another single-value prediction result.
[0044] The two outputs are then concatenated along the feature dimension, and finally a fully connected layer is used to generate the final photovoltaic power prediction output.
[0045] As a preferred embodiment, to achieve coordinated optimization of the two prediction tasks of photovoltaic power generation and module cell temperature, this invention proposes a weight-coordinated loss function, denoted as:
[0046] L all =λ1L T +λ2L P (13)
[0047] Among them, L P L represents the mean square error (MSE) of the photovoltaic power generation forecasting task. T λ1 and λ2 represent the loss term for the component temperature prediction task, which is also based on MSE to measure the model's prediction accuracy for component temperature; λ1 and λ2 are adjustable weight coefficients used to balance the gradient contributions of the two tasks during backpropagation, ensuring that the two have a reasonable optimization priority during joint training.
[0048] By designing this composite loss function, the model can simultaneously optimize two related but different output objectives—photovoltaic power generation and module cell temperature—during backpropagation, avoiding a single task dominating the training process and thus improving overall prediction performance. Furthermore, this loss function supports dynamic adjustment based on specific application scenarios.
[0049] Furthermore, this loss function is closely integrated with the multi-task neural network architecture, forming a feedback loop between the feature extraction module (DFE), the physical constraint modeling module (PCB), and the temporal inference module (TIB). This enables the parameter updates of each sub-module to more effectively serve the final photovoltaic power prediction task, thereby improving the model's generalization ability and physical consistency.
[0050] Compared with the prior art, the beneficial effects and advantages of the present invention are as follows:
[0051] (1) This invention integrates numerical weather prediction data, power plant information system data, and high-precision meteorological parameters generated by astronomical algorithms to construct a dataset containing multiple information sources. At the same time, it embeds key physical laws such as the energy balance model of photovoltaic systems and effective irradiance calculation into the neural network architecture, and achieves deep integration of physical laws and data-driven methods through trainable weights, thereby improving the accuracy and physical consistency of prediction results.
[0052] (2) This invention utilizes deep neural networks to predict key dynamic parameters such as spectral mismatch correction factor and fouling factor in real time, replacing traditional static empirical formulas. This method can not only adapt to complex meteorological conditions and changes in power plant operating status, but also improve the model's response speed and accuracy to emergencies, enhancing the model's real-time adaptability and robustness.
[0053] (3) This invention employs a multi-task learning framework to jointly model the photovoltaic power prediction and module cell temperature prediction tasks, and performs collaborative optimization through weight-coordinated loss functions. This design fully utilizes the strong correlation between photovoltaic power and module cell temperature, significantly improving the overall prediction accuracy and robustness, and enabling the model to exhibit stronger adaptability and generalization ability under different geographical regions, climatic conditions, and power plant configurations. Experimental results show that the multi-task neural network (MTNN) method proposed in this invention has significantly superior performance under complex meteorological conditions.
[0054] (4) Experimental results show that, compared with other benchmark models, the model of this invention improves prediction accuracy by 0.15% to 1.43% and prediction precision by 0.31% to 2.84%, indicating higher prediction accuracy. Furthermore, the proposed model also performs well in error metrics, with error reductions ranging from 4.63% to 38.59%. Particularly noteworthy are the significant improvements in key error metrics such as root mean square error (RMSE) and mean absolute error (MAE), which are reduced by 38.59% and 31.76% respectively compared to multilayer perceptrons (MLPs). Attached Figure Description
[0055] Figure 1 This is a schematic diagram of the architecture and data flow of the proposed multi-task neural network;
[0056] Figure 2 This is a schematic diagram of the overall structure and data flow of the data-based feature extraction module;
[0057] Figure 3 This is a schematic diagram of the overall structure and data flow of the feature extraction module based on physical constraints.
[0058] Figure 4 This is a schematic diagram of the architecture of the constructed temporal reasoning module;
[0059] Figure 5 It is a comparison of the residuals and probability density distributions of photovoltaic power prediction results from different models;
[0060] Figure 6 This is a comparison of photovoltaic power prediction indicators of different models at different time steps.
[0061] Figure 7This is a comparison of the photovoltaic power prediction performance of different models under different multi-task modes;
[0062] Figure 8 This describes the performance of the proposed method using different loss function weights in a multi-task mode; Detailed Implementation
[0063] To verify the effectiveness of the proposed method, this study used data collected by the SCADA system at a photovoltaic power station in southeastern coastal China as experimental data. The dataset has a time resolution of 15 minutes, covering data from June 1, 2022 to March 30, 2024, including the power generation of the entire power station and the cell temperature of a photovoltaic module within the station. The geographical coordinates of the power station are 30°50′N, 120°42′E, with an installed capacity of 84.3 MWp, a photovoltaic array tilt angle of approximately 20°, and an azimuth angle of 180° (due south). The original dataset includes photovoltaic power, module temperature, horizontal global irradiance, direct irradiance, and diffuse irradiance. Based on this, the original data was preprocessed and enhanced using the proposed method. A summary of the statistical information for each data item is shown in Table 1. The experimental data was divided into training, validation, and test sets, corresponding to time ranges of June 2022 to February 2023, March 2023, and April 2023 to March 2024, respectively.
[0064] Table 1 Summary of statistical information for each data item in the dataset.
[0065]
[0066]
[0067] The proposed multi-task neural network (MTNN) architecture is as follows: Figure 1As shown, the architecture consists of three main modules: Data-Driven Feature Extraction (DFE), Physical Constraints (PCB), and Temporal Inference (TIB). At time t, the model uses power plant measurement data from the previous t-96 steps (each step is 15 minutes apart) as input, combined with meteorological data (represented by solid black arrows) and meteorological data from the subsequent t+16 steps (represented by solid red arrows) to predict the photovoltaic (PV) output and module cell temperature for the next t+16 steps. During forward propagation, DFE extracts power generation-related features from historical measurement data and meteorological data. In addition, it dynamically estimates the physical model parameters as described in Equation (8). Subsequently, PCB participates in network training by using parameters as trainable weights as described in Equation (9), and uses the physical model as the forward propagation function to output key physical quantities such as effective irradiance and module cell temperature. Finally, the temporal inference module captures the temporal dependence between historical data and predicted physical quantities, extracts temporal features, integrates all feature information, and finally outputs the prediction results of photovoltaic power generation. During backpropagation, the model achieves collaborative training of the weights of each sub-module in the two tasks through a weight coordination loss function consisting of two parts, thereby enabling feature extraction and parameter estimation to better serve the photovoltaic power generation prediction task. To achieve collaborative optimization of the two tasks, the weight coordination loss function of the entire network is designed as described in Equation (13).
[0068] The overall structure of the constructed data-based feature extraction module is as follows: Figure 2 As shown. First, the module performs processing on each feature f i The historical data is then reconstructed by inserting the photovoltaic power value y at the corresponding time point, ensuring that each feature is closely correlated with the target value in the reconstructed data. The hidden state is computed through the following operations: the first convolution operation uses a kernel of size (4,2) and a stride of (1,2), followed by a max pooling operation of size (4,1) and stride of (4,1). This allows the model to extract the relationship between each feature and hourly power output. Subsequently, convolution and max pooling operations of sizes (4,1) and (6,1) compress the features to daily resolution. Finally, the hidden state is obtained by outputting the extracted hidden features and dynamic estimates of the parameters through two fully connected layers. These are then reshaped and repeated before being incorporated into subsequent network structures.
[0069] The constructed physical constraint-based feature extraction module, such as Figure 3As shown, the goal of PCB is to combine physical knowledge with a data-driven model to improve the model's predictive power and generalization performance. Constraints introduced based on physical laws ensure that the model output is consistent with actual physical laws, thereby enhancing its adaptability in complex scenarios. PCB uses parameters dynamically estimated by a front-end data-driven feature extraction module, combined with meteorological data from 16 subsequent time steps, and incorporates a physical model. This enables the module to accurately predict key physical quantities such as effective irradiance and module cell temperature. Furthermore, module cell temperature is used as the output of the entire neural network. These physical quantities not only reflect the current operating status of the photovoltaic power plant but also provide a crucial foundation for subsequent power generation prediction.
[0070] The structure of the constructed temporal reasoning module is as follows: Figure 4 This module takes the output of the previous module and meteorological data from the next 16 steps as input, and performs photovoltaic power prediction through a GRU network containing three residual blocks with different activation functions. The first residual block uses the tanh activation function to map the residuals to a symmetric space and enhances the nonlinear representation of the features. Simultaneously, the latter two residual blocks use linear activation functions to scale the residuals, thereby enhancing the adaptability of the residual connections. A dropout layer is introduced after each GRU network to enhance the model's generalization ability. Furthermore, this module utilizes future meteorological data to perform an additional round of photovoltaic power prediction through a multilayer perceptron (MLP) network, serving as a residual connection for the entire network. This design effectively mitigates the gradient vanishing problem that may be caused by deep networks. Finally, the two prediction results are concatenated and passed through a fully connected layer to generate the final photovoltaic power prediction result.
[0071] To compare with the proposed method, three structurally similar and widely used models in the literature—Multilayer Perceptron (MLP), Long Short-Term Memory (LSTM), and Convolutional Neural Network-Long Short-Term Memory (CNN-LSTM)—were selected as benchmark models. For the different models, the photovoltaic power output was a normalized value, while the proposed model calculates the module cell temperature through a mechanism equation and outputs it as the raw value. Therefore, during the comparison, the output of all models was uniformly set to the raw module cell temperature to ensure fairness and consistency of the results. All models were initialized, trained, and validated under 15 different random number seeds to demonstrate the generality of the results. The performance of different models on the test set is shown in Table 2.
[0072] Table 2 shows the detailed performance of different models in predicting photovoltaic power generation on the test set.
[0073]
[0074] Compared with other models, the proposed model improves prediction accuracy by 0.15% to 1.43%, and in R...2 The performance metrics improved by 0.31% to 2.84%, reflecting a higher level of prediction accuracy. Furthermore, the proposed model significantly outperformed other models in terms of error metrics, with error reductions ranging from 4.63% to 38.59%. Notably, the improvements in MAE and NRMSE were particularly significant, reducing errors by 38.59% and 31.76% respectively compared to MLP. Moreover, in repeated experiments initialized with different random numbers, the proposed model exhibited the least fluctuation across all metrics, indicating improved stability.
[0075] Although the proposed model does not show a significant improvement in statistical metrics compared to LSTM and CNN-LSTM, overall metrics alone are insufficient to accurately assess the actual performance of the model. Therefore, a detailed analysis of the prediction residuals of each model was conducted. Figure 5 The diagram shows a scatter plot of the actual photovoltaic power values and the predicted residuals of the four models, as well as the distribution of KDE contour lines at level 4.
[0076] The proposed model's residuals are mainly concentrated around 0, showing a small overall prediction error, a compact scatter distribution, and robust stability, indicating improved prediction performance. However, a slight negative bias is noticeable. In contrast, the LSTM model's residuals show greater fluctuations and positive bias when photovoltaic output is high. The residuals of the MLP and CNN-LSTM models exhibit some degree of asymmetry, with negative bias and weak stability in the high-output region.
[0077] Comparison of different prediction time steps, such as Figure 6 As shown in the figure, the results demonstrate the performance comparison of the model in 16 prediction steps. The proposed model exhibits significant performance stability across different prediction step sizes, with the smallest decrease in prediction performance as the time step size increases. In contrast, the prediction performance of both LSTM and CNN-LSTM models decreases with increasing step size. Ultimately, CNN-LSTM outperforms LSTM. On the other hand, due to the inherent limitations of its network structure (inability to effectively capture temporal features), the prediction performance of the MLP model varies relatively consistently with step size, but it is significantly inferior to other models at all time steps.
[0078] Based on the above comparative analysis, the proposed model is significantly superior to other benchmark models in terms of statistical indicators, error distribution characteristics, and the ability to model time series characteristics.
[0079] In multi-task learning, the weight settings of the loss functions for different tasks directly affect the balance and emphasis among tasks, thus significantly impacting the overall model performance. To explore the specific impact of weight settings on model performance, this section provides a preliminary analysis of the performance of the proposed model and the baseline model in the photovoltaic power generation prediction task. Specifically, this section examines three different task settings:
[0080] Case 1: Single-task learning, the model is only trained to output the photovoltaic power generation prediction result.
[0081] Case 2: Multi-task learning, where the model is trained to output photovoltaic power generation and module cell temperature simultaneously, and the weights of the loss function for each task are equally distributed.
[0082] Case 3: Multi-task learning, with different weights for the loss function of each task. Given the significant differences in the order of magnitude of the objective functions and the different focuses of this study, the weights are set to λ1 = 0.01 and λ2 = 0.01.
[0083] The prediction results of different models for photovoltaic power and photovoltaic module cell temperature in each case are as follows: Figure 7 As shown. Overall, the proposed model demonstrates excellent performance across all task settings, while the multilayer perceptron (MLP) performs relatively weakly. In single-task learning, the proposed model achieves the highest R-value. 2 The mean squared error (MAE) metric is best achieved by the Convolutional Neural Network-Long Short-Term Memory (CNN-LSTM) model. In multi-task learning, the performance of LSTM and CNN-LSTM models significantly degrades on photovoltaic (PV) output prediction tasks when both tasks use the same loss weights. However, after adjusting the loss weights, their performance recovers to the level of single-task learning. This difference can be attributed to the order-of-magnitude difference between the normalized power and the original module cell temperature, leading to an imbalance in the optimization process and neglecting the smaller-scale task, thus affecting gradient updates and shared parameter learning. MLPs are not subject to this limitation due to their inherent simplicity, stable gradient updates, and independent learning of task features. However, this characteristic also limits their performance.
[0084] like Figure 8 As shown, the performance of the proposed model under different component battery temperature loss weight settings is further analyzed. The results show that even when the weights of the loss function change, the model's performance remains stable and robust. This indicates that the model has good adaptability and efficiency in handling multiple tasks. Its design allows for the effective sharing and utilization of features while successfully decoupling different tasks, enabling the model to optimize multiple tasks simultaneously without relying on specific weight assignments. This demonstrates the robustness and generalization ability of the proposed model in multi-task learning.
[0085] To evaluate the impact of different modules on the effectiveness of photovoltaic power generation prediction models, this section compares and analyzes the prediction performance of the following model combinations through ablation experiments: the base model (using only TIB, i.e., the baseline model), the model including TIB and DFE (baseline + A), the model including TIB and PCB (baseline + B), and the integrated model combining TIB, DFE, and PCB (baseline + A + B). Table 2 shows the specific performance of each model combination.
[0086] Table 3 shows the ablation experiment results on the test set.
[0087]
[0088] The introduction of DEF significantly improved model performance, increasing the AC value to 96.97% and R². 2 The value increased to 0.976, while the MAE and NRMSE values decreased to 1.17MW and 0.038, respectively. This indicates that DEF can effectively capture complex nonlinear relationships, thus significantly optimizing the model's predictive ability. After introducing PCB, the model performance did not show a significant difference compared to the baseline +A model. However, introducing physical laws not only improved prediction accuracy but also ensured the physical consistency of the results. Simultaneously introducing DEF and PCB blocks optimized the model performance, thus verifying the effectiveness of their synergistic effect. In conclusion, the ablation experiments show that both data-driven blocks and physical constraint blocks are crucial for performance improvement, and their combination is the most effective way to maximize model performance.
[0089] This invention proposes an ultra-short-term photovoltaic power prediction method based on multi-task neural networks and physical constraints. Addressing the challenge of traditional prediction models failing to simultaneously consider physical laws and dynamic meteorological characteristics, this method deeply integrates a data-driven feature extraction module, a physical constraint module, and a time inference module to construct a multi-task neural network framework that incorporates physical information. This enables high-precision site-level predictions of photovoltaic power on 4-hour and 15-minute timescales. Experimental results validate the effectiveness and superiority of this invention, particularly demonstrating high prediction accuracy and stability under complex and variable weather conditions.
[0090] The present invention has been described in detail above with reference to the embodiments, but the content described is only a preferred embodiment of the present invention and should not be considered as limiting the scope of the present invention. All equivalent changes and improvements made in accordance with the scope of the present invention should still fall within the patent coverage of the present invention.
Claims
1. A photovoltaic power prediction method based on multi-task neural networks and physical constraints, characterized in that... Includes the following steps: Step 1: Obtain the metadata, historical numerical weather forecast data, and historical power generation data of the target photovoltaic power station, and use the missing value imputation and outlier handling for model training and validation; Step 2: Based on the latitude, longitude, and time of the photovoltaic power station, calculate the solar zenith angle, azimuth angle, and altitude angle, and combine irradiance transpose, solar spectrum characterization variables, and atmospheric precipitable water to estimate astronomical and meteorological factors, thereby achieving data augmentation of the original dataset; Step 3: Construct a data-driven feature extraction (DFE) module based on a convolutional neural network. Use historical meteorological data, power generation data, and the enhanced data from Step 2 as inputs for the 24 hours prior to the current time, totaling 96 time steps. Dynamically estimate the spectral mismatch correction factor, pollution factor, and surface albedo, and output hidden features. Step 4: Construct a custom neural network module (PCB) based on physical constraints, calculate the temperature of photovoltaic cells based on the energy balance method, define the heat exchange coefficient parameter as a trainable weight in the physical constraint module, and integrate the module efficiency-related parameters; Step 5: Construct a temporal-space reasoning module (TIB) based on residual linking gated loop units to realize temporal reasoning of photovoltaic power generation; Step 6: Utilize a multi-level network structure consisting of a Data-Driven Feature Extraction (DFE) module, a Physical Constraint (PCB) module, and a Spatiotemporal Inference (TIB) module to achieve end-to-end modeling from raw data input to final prediction output; Step 7: Define the weight coordination loss function and synchronously update the parameters of the DFE, PCB, and TIB modules through end-to-end training. Step 8: The model uses numerical weather forecast data for 16 time steps, ranging from 15 minutes to 4 hours in advance, to predict photovoltaic power generation and module temperature.
2. The photovoltaic power prediction method based on multi-task neural network and physical constraints according to claim 1, characterized in that: In step 2, when the solar altitude angle is less than 90 degrees, the sun is below the horizon, and the photovoltaic output is zero. The following formula is used to perform data augmentation based on the solar altitude angle, which improves the model's ability to learn the zero output characteristics of photovoltaic power generation at night, while ensuring the continuity of the characteristic curve during the day. in It is the solar altitude angle.
3. The photovoltaic power prediction method based on multi-task neural network and physical constraints according to claim 1, characterized in that: In step 3, historical photovoltaic power generation is first inserted after each feature to reconstruct historical data, so that in the reconstructed data, each feature is closely related to the historical photovoltaic power generation, as shown in the following formula: X′ t =[X t ;Y t ],for each t∈{1,2,…,T} (2) Among them, X t It is the observation value of feature X at time step t; Y t The measured value of photovoltaic power generation at time t. This is achieved by using the original feature X... t With photovoltaic power generation Y t Horizontal concatenation is performed to construct the enhanced feature vector X. t ′.
4. The photovoltaic power prediction method based on multi-task neural network and physical constraints according to claim 3, characterized in that: The input data is processed by a multi-layer convolutional neural network. This network consists of a convolutional layer with a kernel size of (4,2) and a stride of (1,2) using the ReLU activation function, followed by a max pooling layer with a pooling window size of (4,1) and a stride of (4,1); then a convolutional layer with a kernel size of (4,1) using the ELU activation function and a corresponding max pooling layer; and finally a convolutional layer with a kernel size of (6,1) using the linear activation function. The output is flattened into a one-dimensional vector. This vector is then passed through a fully connected layer to generate seven key parameters, and expanded to 16 time steps using the RepeatVector mechanism to maintain the same dimension for subsequent fusion modeling.
5. The photovoltaic power prediction method based on multi-task neural network and physical constraints according to claim 1, characterized in that: In step 4, the effective irradiance is calculated based on the direct radiation, scattered radiation, and ground-reflected radiation received by the photovoltaic module surface. The mismatch between the photovoltaic module's absorption spectrum and the irradiated photovoltaic system, the level of dirt on the module surface, and the reflection of incident light are also considered, as shown in the following formula: In the above formula, This is a spectral mismatch correction factor. As a contaminant correction factor for photovoltaic array surfaces, I is the incident light reflection correction factor, as shown in equation (4); b The component of direct irradiance on the inclined plane where the photovoltaic module is located is calculated as shown in equation (5); The diffuse irradiance of the sky is shown in equation (6); The ground reflected irradiance is shown in equation (7): In formulas (4), (5), (6) and (7), The data-driven feature extraction module constructed in step 3 uses enhanced historical data for dynamic calculation during the model prediction process. Its calculation process can be represented by the following formula: in, This is an estimate of the spectral mismatch correction factor. This represents an estimated value of ground reflectivity. This is an estimated value for the fouling correction factor on the photovoltaic array surface. These are estimates of the coefficients and empirical correction terms of the isotropic sky total internal reflection model. This is an estimate of the incident light reflection correction factor. DEF(...) represents the data-driven feature extraction module constructed in step 6, which uses the feature matrix X′ reconstructed in step 3 as input.
6. The photovoltaic power prediction method based on multi-task neural network and physical constraints according to claim 5, characterized in that: After estimating the effective irradiance on the surface of the photovoltaic module, the cell temperature of the photovoltaic module is calculated based on the energy balance method, as shown in equations (9) and (10): in, T represents the photovoltaic module cell temperature estimated by the model. a Indicates ambient temperature. This indicates the amount of irradiance absorbed by the photovoltaic cell. This represents the fraction of irradiance absorbed by a photovoltaic cell. Indicates the normal operating temperature of the battery (NOCT). This indicates the efficiency of photovoltaic modules under NOCT. Indicates the temperature coefficient of a photovoltaic module. It is the heat exchange coefficient of the total surface area of the photovoltaic module, which is determined by wind speed (S). w The two constant terms determine the result. The constant in the formula, i.e. As trainable weights in the module constructed in step 4, they are determined using training data during model training, and their update process can be expressed by the following formula: in, This represents the current value of the i-th trainable parameter at the t-th iteration, including: the temperature coefficient of the photovoltaic module. Efficiency of photovoltaic modules under NOCT Attenuation coefficient Normal operating battery temperature Two constant terms in the formula for the heat exchange coefficient of the total surface area of a photovoltaic module α l The learning rate controls the step size for parameter updates; Represents the overall loss function For parameter w i The gradient at the current iteration t. Each parameter w is denoted by gradient descent. i Update along its negative gradient direction to obtain the new parameter values for the next iteration (t+1).
7. The photovoltaic power prediction method based on multi-task neural network and physical constraints according to claim 1, characterized in that: In step 5, a multi-layer recurrent neural network structure combining gated recurrent units (GRUs) and residual connection mechanisms is used to process the input numerical weather prediction (NWP) data and extract time-dependent features. The network receives the outputs of the modules constructed in steps 3 and 4, as well as meteorological data every 15 minutes for the next 4 hours, and extracts time-series features through the following steps: The first GRU layer contains 128 hidden units, and the GRU units output sequential data to retain the output of all time steps. Then, a Dropout layer with a dropout rate of 0.5 is connected to prevent overfitting. Next, a fully connected layer maps the input to a 128-dimensional vector and performs a non-linear transformation using the tanh activation function to obtain the residual term. This residual term is added to the output of the first GRU layer to form the hidden state after the first residual enhancement. The second-layer GRU further processes the output after residual enhancement, with 64 hidden units. It also retains the output of all time steps and connects to a Dropout layer (dropout rate 0.5). On this basis, a second-level residual connection is introduced. The output of the previous layer is mapped to a 64-dimensional vector using a fully connected layer and then directly added to the current GRU output to obtain the hidden state after the second-layer residual enhancement. The third-layer GRU continues to process the output of the previous layer, with 32 hidden units. After the output undergoes a Dropout operation, a residual connection is introduced again. That is, the output of the previous layer is mapped to a 32-dimensional vector through a fully connected layer. After linear activation, it is added to the current GRU output to obtain the final temporal feature.
8. The photovoltaic power prediction method based on multi-task neural network and physical constraints according to claim 7, characterized in that: In the output section, a dual-path prediction structure is designed: The first path: extract features from it, and output 16-step prediction results through a fully connected layer; The second approach: directly perform a fully connected transformation on the original meteorological data for the next 4 hours, 15 minutes at a time, and output another single-value prediction result; The two outputs are then concatenated along the feature dimension, and finally a fully connected layer is used to generate the final photovoltaic power prediction output.
9. The photovoltaic power prediction method based on multi-task neural network and physical constraints according to claim 1, characterized in that: In step 7, a weight-coordinated loss function is used to achieve coordinated optimization of the two prediction tasks: photovoltaic power generation and battery temperature. This function is denoted as: L all =λ1L T +λ2L P (13) Among them, L P L represents the mean square error (MSE) of the photovoltaic power generation forecasting task. T λ1 and λ2 represent the loss term for the battery temperature prediction task, which is also based on MSE to measure the model's prediction accuracy for component temperature; λ1 and λ2 are adjustable weight coefficients used to balance the gradient contributions of the two tasks during backpropagation, ensuring that they have a reasonable optimization priority during joint training.
Citation Information
Cited By
Photovoltaic power prediction method based on stationary satellite neural network model
CN121724219A