Photovoltaic power prediction method, system and device based on dynamic correction and physical constraints
By using a dynamic correction and physical constraint method based on the Transformer model, the problem of lag and bias in photovoltaic power generation forecasting under sudden weather events is solved, achieving high-precision and reliable forecast results and supporting the stable operation of the power grid.
Patent Information
- Application Number
- CN202610200896.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-29
Smart Images

Figure CN122118676A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power prediction technology, and in particular to a photovoltaic power prediction method, system and equipment based on dynamic correction and physical constraints. Background Technology
[0002] Photovoltaic power generation forecasting is a key technology for ensuring the safe and stable operation of the power grid and promoting the efficient consumption of new energy sources. Existing forecasting methods can be mainly divided into two categories: one is the pure time-series extrapolation method based on historical data, such as the use of Long Short-Term Memory Network (LSTM) and Transformer models, which only extrapolates trends based on historical power data; the other is the physical model method based on numerical weather prediction (NWP), which attempts to establish a mapping relationship between meteorological conditions and power generation.
[0003] However, all of the aforementioned existing technologies have significant drawbacks. For pure time-series extrapolation methods, the model essentially learns the statistical patterns of historical data and cannot anticipate future weather changes. When sudden weather events occur (such as sudden midday overcast skies), the model predictions exhibit severe lag and persistent bias, resulting in poor robustness. For methods combining natural weather prediction (NWP), the prediction accuracy is severely limited by the quality of the NWP itself. General NWPs suffer from unavoidable systematic biases in complex terrain areas (such as mountainous and coastal regions), and the error patterns under different weather types are complex and varied. Existing technologies often employ fixed-parameter correction algorithms, which struggle to dynamically and adaptively correct such time- and space-varying forecast biases, leading to a significant reduction in the reliability of NWP predictions when they are not timely.
[0004] Furthermore, the outputs of existing prediction models often lack strict physical constraints, which may result in negative power or unreasonable predictions that exceed the actual installed capacity of power plants. This makes them impractical for actual power grid dispatching.
[0005] Therefore, existing technologies urgently need a prediction method that can deeply integrate historical observation and future forecast information, has dynamic adaptive deviation correction capabilities, and whose output results strictly conform to the physical laws of photovoltaic power generation and the requirements of grid dispatch, so as to improve the accuracy and reliability of power prediction under complex meteorological conditions. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the existing technology. To achieve the above objectives, a photovoltaic power prediction method, system, and device based on dynamic correction and physical constraints are adopted to solve the problems mentioned in the background technology.
[0007] Firstly, this invention provides a photovoltaic power prediction method based on dynamic correction and physical constraints, comprising the following steps:
[0008] Step S1, Data Acquisition and Processing: Acquire historical meteorological and power data of the target photovoltaic power station, as well as future numerical weather forecast data, and perform preprocessing. Step S2, Spatiotemporal Feature Fusion Step: Based on the geographical location of the power station and the predicted time, solar position parameters and time period features are added to the historical observation data and future numerical weather prediction data, respectively; Step S3, Initial Power Prediction Step: Input the historical observation data after feature fusion into the encoder of the Transformer model, input the future numerical weather forecast data after feature fusion into the decoder of the Transformer model, and output the preliminary power prediction sequence for the future period through the decoder; Step S4, Dynamic Deviation Correction Step: Based on the element deviation between numerical weather forecast data and observed meteorological data within the historical time window, and combined with the time decay weight, a correction weight is dynamically generated, and the preliminary power prediction sequence is weighted and corrected to obtain the corrected power sequence. Step S5, Physical constraint application step: Apply nonnegativity constraints and installed capacity upper limit constraints to the corrected power sequence to obtain the final power prediction result.
[0009] As a further aspect of the present invention: the Transformer model is an encoder-decoder architecture, wherein the encoder is used to encode the spatiotemporal features of historical observation sequences, and the decoder fuses the output features of the encoder with future weather forecast features through a cross-attention mechanism.
[0010] As a further aspect of the present invention, step S4 specifically includes the following steps: Calculate the deviation matrix E between the observed and forecast values of each meteorological element within the historical time window; Based on the time interval between each historical moment and the current prediction moment, a time decay weight is assigned to each deviation value in the deviation matrix E to form a weight matrix W; Based on the deviation matrix E and the weight matrix W, the weighted average deviation vector is calculated. The weighted average deviation vector is mapped to the main path correction weight.
[0011] As a further aspect of the present invention, the time decay weight decays exponentially with the backtracking of time.
[0012] As a further aspect of the present invention, step S4 specifically includes the following steps: A negative deviation enhancement coefficient is introduced to enhance the main path correction weight in order to address the negative deviation weather conditions where forecast values are generally higher than observed values.
[0013] As a further aspect of the present invention, step S5 specifically includes the following steps: The nonnegativity constraint is implemented using the Softplus function, and the upper limit constraint of the installed capacity is implemented using a piecewise function, ensuring that the final predicted value is not lower than zero and not higher than the rated installed capacity of the power plant.
[0014] As a further aspect of the present invention, step S3 specifically includes the following steps: The preliminary power prediction sequence for the future period consists of power values at 16 time points over the next 4 hours with a time resolution of 15 minutes.
[0015] As a further aspect of the present invention, it also includes a model training step, which uses a dataset containing historical observation sequences, future forecast sequences and corresponding true power labels to train the Transformer model and bias correction parameters, with the optimization objective being to minimize the mean absolute error between the predicted power and the true power.
[0016] Second aspect: A photovoltaic power generation prediction system for implementing the method described in any one aspect, the system comprising: The data preparation and processing module is used to acquire historical meteorological and power data of the target photovoltaic power station, as well as future numerical weather forecast data, and perform preprocessing. The feature engineering module is used to add solar position parameters and time period features to the historical observation data and future numerical weather prediction data, respectively, based on the power station's geographical location and prediction time. The core prediction and training module is used to execute the initial power prediction step, dynamic deviation correction step, physical constraint application step, and model training step. The data storage and service module is used to store raw data, feature data, model parameters, and prediction results. The visualization and human-computer interaction module is used to display prediction results and provide interactive control.
[0017] Third aspect: A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method described in any one of the first aspects.
[0018] Compared with the prior art, the present invention has the following technical advantages: The above-described technical solution acquires historical observation data (including meteorological and power data) from photovoltaic power plants, as well as future numerical weather prediction data. This data is then used to generate a preliminary power prediction sequence through a time-series prediction model (such as Transformer). The core innovation of this method lies in introducing a dynamic bias correction step: based on the deviation between weather forecasts and actual observations over a historical period, and combined with time decay factors, a correction weight is dynamically calculated to adjust and optimize the preliminary prediction sequence. Finally, the corrected prediction results are subject to dual physical constraints—non-negativity and an upper limit on installed capacity—ensuring that the final power prediction value conforms to both the physical laws of photovoltaic power generation and the practical requirements of grid dispatch, thus outputting an accurate and reliable power prediction result. This dynamic bias correction mechanism effectively mitigates the impact of systematic biases in numerical weather prediction on prediction accuracy, significantly improving the model's adaptability and prediction accuracy under complex and variable weather conditions. Simultaneously, the introduced dual physical constraints of non-negativity and an upper limit on capacity fundamentally eliminate the possibility of generating unreasonable prediction values (such as negative power or over-generation), making the prediction results more physically realistic and engineering-practical. Ultimately, this method can provide more reliable data support for grid dispatch, help reduce the assessment costs of photovoltaic power plants due to prediction errors, and improve the operational stability of the grid under a high proportion of new energy access. Attached Figure Description
[0019] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings: Figure 1 This is a schematic diagram illustrating the steps of the photovoltaic power prediction method according to an embodiment of this application; Figure 2 This is an overall prediction flowchart of an embodiment disclosed in this application; Figure 3 This is a schematic diagram of the structure of a dual-channel input Transformer prediction model according to an embodiment of this application. Figure 4 This is a schematic diagram of the complete model structure of the method disclosed in the embodiments of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Please refer to Figure 1 and Figure 2In this embodiment of the invention, a photovoltaic power prediction method based on dynamic correction and physical constraints includes the following steps: Step S1, Data Acquisition and Processing: Acquire historical meteorological and power data of the target photovoltaic power station, as well as future numerical weather forecast data, and perform preprocessing. Specifically, power prediction involves obtaining numerical weather forecasts and station meteorological observations from the power station; the weather forecast data and station observation data come from the weather forecast service provider and the station data acquisition and monitoring system, respectively.
[0022] S101. Weather forecast data parsing steps: Access the raw gridded data with a resolution of 0.1°×0.1° from the European Centre for Medium-Range Weather Forecasts (ECMWF) via API interface. Decode the raw NC format data according to the ECMWF's preset data format, and extract target meteorological elements, including but not limited to surface solar shortwave radiation (SSRD), 2-meter temperature (T2m), 2-meter relative humidity (RH2m), and 10-meter wind speed (WS10m). :
[0023] S102, Spatiotemporal interpolation step: Based on the geographical coordinates of the target power station, spatial interpolation is performed on the parsed grid data to match the power station data.
[0024] Let the coordinates of the target power station be... Its coordinates in the ECMWF grid are the coordinates of its four nearest neighbors. For any meteorological variable The location of the power station was obtained through bilinear interpolation, and the specific interpolation formula is as follows:
[0025] in, , Furthermore, time interpolation was performed based on ECMWF 1h resolution data, and the data resolution was increased to 15min through cubic spline interpolation to ensure that the interpolation curve is second-order continuous and differentiable, thereby maintaining the natural smoothness of meteorological element changes.
[0026] S103. Station Data Acquisition and Aggregation Steps: Acquire real-time data streams according to standard communication protocols, and obtain the power output of the power station in real time every 5 minutes through the station data acquisition and monitoring system. Including on-site meteorological monitoring data, which includes but is not limited to total horizontal irradiance (GHI), air temperature (T), relative humidity (RH), and wind speed (WS), as well as on-site observation data. Specifically, it includes:
[0027] S104. Data cleaning and correction steps for the station: The collected data sequence is processed for invalid and outlier values, including: identifying and removing null values and invalid data caused by communication interruption, detecting and filtering abnormal data points based on physical logic and statistical models, and repairing short-term missing data using interpolation methods. S105. Data Alignment and Output Steps: Align the cleaned observation data with timestamps as the reference to generate a complete data sequence that meets the prediction requirements.
[0028] Step S2, Spatiotemporal Feature Fusion Step: Based on the geographical location of the power station and the predicted time, solar position parameters and time period features are added to the historical observation data and future numerical weather prediction data, respectively; Specifically, based on the power station's geographical location and data time, spatiotemporal features are fused from numerical weather prediction data and historical observation data. Specifically, the spatiotemporal feature fusion includes the following sub-steps: S201. Add solar position parameters: Based on the power station's latitude and longitude coordinates and the predicted time, the solar altitude angle is calculated in real time. ), azimuth ( ) and zenith angle ( The position of the sun can be calculated using the following astronomical formula:
[0029]
[0030]
[0031]
[0032]
[0033] in, For measuring the latitude of the point, For solar declination, For the hour angle, If the function is a bivariate arctangent function, then the data is expanded as follows:
[0034]
[0035] S202. Time Feature Extraction: Extracting the month from the timestamp. ,day ,Hour and minutes Features, construct a complete feature vector.
[0036]
[0037]
[0038] Step S3, Initial Power Prediction Step: Input the historical observation data after feature fusion into the encoder of the Transformer model, input the future numerical weather forecast data after feature fusion into the decoder of the Transformer model, and output the preliminary power prediction sequence for the future period through the decoder; In this embodiment, the Transformer model is an encoder-decoder architecture. The encoder is used to encode the spatiotemporal features of historical observation sequences, and the decoder fuses the output features of the encoder with future weather forecast features through a cross-attention mechanism.
[0039] In this embodiment, step S3 specifically includes the following steps: The preliminary power prediction sequence for the future period consists of power values at 16 time points over the next 4 hours with a time resolution of 15 minutes.
[0040] Specifically, it uses a dual-channel input Transformer as the main body, combining bias correction and physical constraints to predict ultra-short-term photovoltaic power. The model structure is as follows: Figure 3 The network structure of Transformer is as follows: Figure 4 As shown, it consists of three parts: an encoder module, a decoder module, and an output layer; the Transformer network structure implementation includes: S301, Encoder: The encoder is responsible for processing historical observation sequences, including meteorological data from a historical day, along with corresponding solar angle parameters and temporal characteristics. Its input matrix is:
[0041] Projected to higher-dimensional space via linear embedding layer :
[0042] in, Furthermore, positional encoding is applied to the data overlay:
[0043]
[0044] The encoder stacks multiple coding layers, each containing multi-head attention and a feedforward neural network, and achieves deep feature mapping through residual connections and layer normalization.
[0045] S302, Decoder: The decoder receives processed future weather forecast data and, through a multi-head attention mechanism and encoding, generates future power prediction values from its output. Its core calculation formula is as follows:
[0046] in, , , These are the query, key, and value vectors, respectively.
[0047] The output layer maps the decoder output to a preliminary power prediction sequence for the next 16 time points. .
[0048] Step S4, Dynamic Deviation Correction Step: Based on the element deviation between numerical weather forecast data and observed meteorological data within the historical time window, and combined with the time decay weight, a correction weight is dynamically generated, and the preliminary power prediction sequence is weighted and corrected to obtain the corrected power sequence. In this embodiment, step S4 specifically includes the following steps: Calculate the deviation matrix E between the observed and forecast values of each meteorological element within the historical time window; Based on the time interval between each historical moment and the current prediction moment, a time decay weight is assigned to each deviation value in the deviation matrix E to form a weight matrix W; Based on the deviation matrix E and the weight matrix W, the weighted average deviation vector is calculated. The weighted average deviation vector is mapped to the main path correction weight.
[0049] In this embodiment, the time decay weight decays exponentially with the backtracking of time.
[0050] In this embodiment, step S4 further includes the following steps: A negative deviation enhancement coefficient is introduced to enhance the main path correction weight in order to address the negative deviation weather conditions where forecast values are generally higher than observed values.
[0051] Establish a dual-path correction network and adjust the Transformer output power value, specifically including: S401, Dynamic Deviation Calculation Unit, first calculates the deviation matrix between the weather forecast and the observed values. , A matrix is defined as:
[0052] in: Indicates the first The deviation vector at each time step Indicates the first Meteorological elements in the first The difference between the observed and predicted values at each time step; The length of the historical time window. Meteorological elements (such as radiation, temperature, humidity, wind speed, etc.).
[0053] An exponentially decaying weight function is introduced to obtain the time weight matrix based on the time interval. :
[0054] in, , For time intervals, This is a time decay strategy, based on the deviation. and weight Obtain the multi-source data bias vector ;
[0055] By Stacked along the timeline Then, the main path correction weight w is obtained through the feedforward layer. ; S402. Based on the characteristic that negative deviations are more prone to large errors, a negative deviation enhancement coefficient is introduced. To cope with extreme weather, enhanced correction weights are obtained. :
[0056] The final corrected output is as follows:
[0057] Step S5, Physical constraint application step: Apply nonnegativity constraints and installed capacity upper limit constraints to the corrected power sequence to obtain the final power prediction result.
[0058] In this embodiment, step S5 specifically includes the following steps: The nonnegativity constraint is implemented using the Softplus function, and the upper limit constraint of the installed capacity is implemented using a piecewise function, ensuring that the final predicted value is not lower than zero and not higher than the rated installed capacity of the power plant.
[0059] Specifically, a dual physical constraint guarantee system will be established, including: S501, Non-negativity constraint guarantee, using the Softplus activation function as the output constraint function:
[0060] in, For adjustable parameters, This indicates the variable that needs to be input for this physical constraint, which can ensure that the power prediction value is strictly non-negative while ensuring the stability of the model; S502, Output range constraint guarantee, based on photovoltaic power plant installed capacity. Setting an output upper limit and using a piecewise function to limit unreasonable overestimation;
[0061] The final model output P is obtained:
[0062] Step S6, Model Training Step: The Transformer model and bias correction parameters are trained using a dataset containing historical observation sequences, future forecast sequences, and corresponding true power labels. The optimization objective is to minimize the mean absolute error between the predicted power and the true power.
[0063] Specifically, this step aims to complete the parameter training and optimization process of the complex model described in S404, and its specific implementation method is as follows: S601. Construct the training dataset. Based on actual business needs and on-site conditions, define and generate the following five sets of training samples: Encoder input sequence Its dimensions are ; Decoder input sequence Its dimensions are ; Historical observation input data for the bias correction network are Its dimension can be represented as ; Historical forecast inputs for the bias correction network Its dimensions are ; Corresponding actual power label Its dimensions are .
[0064] in, This refers to the number of sample batches. Input the time step for the encoder. The input time step for the decoder, The time step of the historical weather input in the deviation network. This refers to the time step input for weather forecasts that deviate from historical timeframes. Input sample dimensions to the encoder. Input sample dimension to the decoder, Input sample dimensions for historical observations, Input sample dimensions for historical forecasts.
[0065] S602. Define the optimization objective of the model. The training process aims to minimize the mean absolute error (MAE), and this loss function... Defined by the following formula:
[0066] In the formula, This represents the model's predicted output for the target power.
[0067] S603, Execute the model training process. The optimizer iteratively updates the model parameters and employs a dynamic learning rate scheduling strategy. If the model fails to update to better parameters after exceeding a set patience value, the learning rate is reduced to 0.1 times, starting from [previous value]. The minimum value is To further ensure numerical stability during training, gradient pruning was applied during backpropagation.
[0068] Step S7, Online Prediction Inference Steps: Establish a complete online prediction process, including: S701. Based on the real-time data collected in S1, access and preprocess the latest observation data and forecast data simultaneously. S702, Feature Engineering Processing, will perform similar features extraction, standardization and spatiotemporal feature fusion as in S1; S703, using migration methods such as Docker, deploys the model to S6 to complete the training of the optimal model for forward inference. After passing through the Transformer network, bias correction system, and physical constraint guarantee mechanism, it generates a power prediction sequence for the next 4 hours, with an output dimension of [missing information]. .
[0069] Second aspect: A photovoltaic power generation prediction system for implementing the method described in any one aspect, the system comprising: like Figure 4 As shown in the diagram; 1. Data preparation and processing module, used to acquire historical meteorological and power data of the target photovoltaic power station, as well as future numerical weather forecast data, and perform preprocessing; Specifically, it includes a numerical weather prediction access and interpolation unit, responsible for data parsing, spatial and temporal interpolation; and a field observation data acquisition and cleaning unit, responsible for data aggregation and handling invalid and outlier values.
[0070] 2. Feature engineering module, used to add solar position parameters and time period features to the historical observation data and future numerical weather prediction data based on the power station's geographical location and prediction time; Specifically, it includes a solar position calculation unit for real-time calculation of solar geometric parameters and a time feature encoding unit for extracting and constructing time period feature vectors.
[0071] 3. The core prediction and training module is used to execute the initial power prediction step, the dynamic deviation correction step, the physical constraint application step, and the model training step. Specifically, a prediction model based on the Transformer architecture is used for ultra-short-term power prediction, which includes: a Transformer network with two input channels, a non-negativity constraint structure, and a capacity constraint structure. The algorithm training unit trains and updates the model based on system control information.
[0072] 4. Data storage and service module, used to store raw data, feature data, model parameters and prediction results; Specifically, the raw data and spatiotemporal features obtained in step S1 are classified and stored, as are the model parameters generated in step S6, the prediction results generated in step S7, and some calculated indicator data.
[0073] The visualization and human-computer interaction module is used to display prediction results and provide interactive control.
[0074] Specifically, it includes: Core Information Dashboard: Displays the current ultra-short-term power forecast results, accuracy, and key meteorological factors (such as irradiance, temperature, and wind speed) in the form of curves and dashboards.
[0075] Multi-dimensional data comparison view: Provides a "prediction-actual" comparison curve, which overlays the predicted values and actual observations over a historical period, and automatically calculates and displays key performance indicators such as root mean square error (RMSE) and accuracy to evaluate model accuracy.
[0076] Third aspect: A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method described in any one of the first aspects.
[0077] To verify the beneficial effects of the present invention, a detailed description is provided below in conjunction with specific embodiments and comparative experiments.
[0078] This experiment uses a historical dataset from an actual operating photovoltaic power station in Anhui Province, China. The dataset includes: Station observation data: derived from actual power output and meteorological monitoring data from the power plant's data acquisition and monitoring system. Numerical weather forecast data: gridded forecast data obtained from commercial meteorological service providers, spatiotemporally interpolated to the power plant location. The experiment selected several dates with different weather characteristics in mid-August as the test period to comprehensively evaluate the model performance.
[0079] To demonstrate the superiority of this invention, the model proposed in this invention is compared with two typical time series prediction models in the prior art: Comparison Model 1: A prediction model based on Long Short-Term Memory (LSTM) networks; Comparison Model 2: A prediction model based on the classic Transformer architecture, denoted as Transformer.
[0080] The evaluation index adopts the accuracy rate, a common assessment indicator in the ultra-short-term power forecasting business of power plants. This indicator is in percentage form. The higher the value, the higher the prediction accuracy, and the lower the assessment cost borne by the power plant due to the power prediction deviation.
[0081] As shown in the table below:
[0082] The experimental results above demonstrate that, compared with existing LSTM and Transformer models, the photovoltaic power generation prediction method based on physical constraints and bias correction provided in this invention significantly improves prediction accuracy, especially under complex weather conditions. Furthermore, the prediction results output by the model of this invention exhibit better reliability, providing more effective technical support for precise grid scheduling and economical power plant operation, reducing the assessment risks of power plants, and improving the stability of grid operation.
[0083] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention. The scope of the invention is defined by the appended claims and their equivalents, all of which should be included within the scope of protection of the invention.
Claims
1. A photovoltaic power prediction method based on dynamic correction and physical constraints, characterized in that, Includes the following steps: Step S1, Data Acquisition and Processing: Acquire historical meteorological and power data of the target photovoltaic power station, as well as future numerical weather forecast data, and perform preprocessing. Step S2, Spatiotemporal Feature Fusion Step: Based on the geographical location of the power station and the predicted time, solar position parameters and time period features are added to the historical observation data and future numerical weather prediction data, respectively; Step S3, Initial Power Prediction Step: Input the historical observation data after feature fusion into the encoder of the Transformer model, input the future numerical weather forecast data after feature fusion into the decoder of the Transformer model, and output the preliminary power prediction sequence for the future period through the decoder; Step S4, Dynamic Deviation Correction Step: Based on the element deviation between numerical weather forecast data and observed meteorological data within the historical time window, and combined with the time decay weight, a correction weight is dynamically generated, and the preliminary power prediction sequence is weighted and corrected to obtain the corrected power sequence. Step S5, Physical constraint application step: Apply nonnegativity constraints and installed capacity upper limit constraints to the corrected power sequence to obtain the final power prediction result.
2. The photovoltaic power prediction method based on dynamic correction and physical constraints according to claim 1, characterized in that, The Transformer model is an encoder-decoder architecture. The encoder is used to encode the spatiotemporal features of historical observation sequences, and the decoder fuses the output features of the encoder with future weather forecast features through a cross-attention mechanism.
3. The photovoltaic power prediction method based on dynamic correction and physical constraints according to claim 1, characterized in that, The specific steps in step S4 include: Calculate the deviation matrix E between the observed and forecast values of each meteorological element within the historical time window; Based on the time interval between each historical moment and the current prediction moment, a time decay weight is assigned to each deviation value in the deviation matrix E to form a weight matrix W; Based on the deviation matrix E and the weight matrix W, the weighted average deviation vector is calculated. The weighted average deviation vector is mapped to the main path correction weight.
4. The photovoltaic power prediction method based on dynamic correction and physical constraints according to claim 3, characterized in that, The time decay weight decays exponentially with the backtracking of time.
5. The photovoltaic power prediction method based on dynamic correction and physical constraints according to claim 4, characterized in that, The specific steps in step S4 also include: A negative deviation enhancement coefficient is introduced to enhance the main path correction weight in order to address the negative deviation weather conditions where forecast values are generally higher than observed values.
6. The photovoltaic power prediction method based on dynamic correction and physical constraints according to claim 1, characterized in that, The specific steps in step S5 include: The nonnegativity constraint is implemented using the Softplus function, and the upper limit constraint of the installed capacity is implemented using a piecewise function, ensuring that the final predicted value is not lower than zero and not higher than the rated installed capacity of the power plant.
7. The photovoltaic power prediction method based on dynamic correction and physical constraints according to claim 1, characterized in that, The specific steps in step S3 include: The preliminary power prediction sequence for the future period consists of power values at 16 time points over the next 4 hours with a time resolution of 15 minutes.
8. The photovoltaic power prediction method based on dynamic correction and physical constraints according to claim 1, characterized in that, It also includes a model training step, which uses a dataset containing historical observation sequences, future forecast sequences and corresponding true power labels to train the Transformer model and bias correction parameters, with the optimization objective being to minimize the mean absolute error between the predicted power and the true power.
9. A photovoltaic power generation prediction system, characterized in that, The system for implementing the method as described in any one of claims 1-8 comprises: The data preparation and processing module is used to acquire historical meteorological and power data of the target photovoltaic power station, as well as future numerical weather forecast data, and perform preprocessing. The feature engineering module is used to add solar position parameters and time period features to the historical observation data and future numerical weather prediction data, respectively, based on the power station's geographical location and prediction time. The core prediction and training module is used to execute the initial power prediction step, dynamic deviation correction step, physical constraint application step, and model training step. The data storage and service module is used to store raw data, feature data, model parameters, and prediction results. The visualization and human-computer interaction module is used to display prediction results and provide interactive control.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-8.