An algorithm and system based on a wind-solar power joint prediction model

By constructing a joint wind and solar power prediction model, combining physical models and neural networks, and dynamically adjusting weights, the error problem in wind and solar power prediction under complex meteorological conditions was solved, improving prediction accuracy and robustness.

CN120509442BActive Publication Date: 2026-05-15NANJING ZHONGHUI ELECTRIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING ZHONGHUI ELECTRIC TECH CO LTD
Filing Date
2025-06-03
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing wind and solar power prediction methods have large errors under complex weather conditions and cannot effectively capture the spatiotemporal coupling characteristics of wind and solar resources. Traditional hybrid models cannot dynamically adapt to changes in model performance under different scenarios.

Method used

A physical model based on photovoltaic and wind power generation is constructed. Combined with small-scale numerical weather prediction data, CNN-LSTM and TCN-GRU networks are used to predict power. The weights are dynamically adjusted through an attention mechanism, and the prediction results of the physical model and the neural network are integrated.

Benefits of technology

It improves the accuracy and robustness of wind and solar power prediction, especially under extreme weather conditions, reducing prediction errors and adapting to changes in model performance in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509442B_ABST
    Figure CN120509442B_ABST
Patent Text Reader

Abstract

The application discloses a kind of algorithm and system based on wind and light power joint prediction model, and the application relates to new energy power system technical field, and the application obtains the predicted power of physical model by combining the output of small-scale numerical weather prediction model in initialization stage, adopts CNN-LSTM to predict photovoltaic power in stable stage, TCN-GRU predicts wind power, and the similarity score of time series feature vector and spatial feature vector is calculated by attention mechanism, the weight of both is dynamically adjusted, the predicted result after weighting is fused to obtain the predicted power of neural network layer, the weight proportion of physical model and neural network layer is dynamically determined based on prediction error, and the final wind and light power prediction value is generated.The application constructs the collaborative mechanism of physical model and neural network, and improves the accuracy of wind and light power joint prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new energy power system technology, specifically to an algorithm and system based on a joint wind and solar power prediction model. Background Technology

[0002] With the popularization of wind and solar power generation technologies, accurate and real-time wind and solar power forecasting has become crucial to ensuring the stable operation of the power grid. However, in existing technologies, traditional forecasting methods have significant limitations.

[0003] First, a single model is difficult to cope with complex meteorological conditions. Physical models can make predictions for newly built stations without historical data, but they rely on mesoscale weather forecast data and are not responsive enough to small-scale local meteorological changes. In particular, the prediction error increases under extreme weather conditions. Although neural network models can handle nonlinear data, they require a large amount of historical data. The lack of data leads to large prediction errors in the early stages of newly built stations.

[0004] Secondly, existing methods ignore the spatiotemporal coupling characteristics of wind and solar resources. Meteorological elements within wind and solar power stations have strong spatiotemporal correlations, while traditional methods mostly model single stations without integrating spatiotemporal coupling features. For example, when a typhoon passes through a coastal area, sudden changes in wind speed and cloud movement simultaneously affect wind and solar power. Traditional models cannot capture such correlations, leading to a significant increase in prediction errors.

[0005] In addition, traditional hybrid models often employ fixed weights or simple error weighting strategies, which cannot dynamically adapt to changes in model performance under different scenarios. Therefore, there is an urgent need for a new prediction method that integrates physical laws with data-driven and spatiotemporal features. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides an algorithm and system based on a joint wind and solar power prediction model, which solves the problems of large prediction errors of single models, insufficient model generalization, and inadequate spatiotemporal feature processing.

[0007] To achieve the above objectives, the present invention provides the following technical solution: an algorithm based on a joint wind and solar power prediction model, comprising:

[0008] S1. Construct the first-layer physical model: Based on the principle of photovoltaic power generation, establish a photovoltaic model, combine the irradiance and temperature data output by the small-scale numerical weather prediction model to predict photovoltaic power, and based on the Betz limit model of wind power generation, combine the wind speed and wind direction data output by the small-scale numerical weather prediction model to predict wind power. Add the two to obtain the wind power prediction value of the physical model.

[0009] S2. Construct the second neural network layer: Use a CNN-LSTM network to predict photovoltaic power and a TCN-GRU network to predict wind power. Calculate the similarity score between the temporal feature vector and the spatial feature vector through an attention mechanism. Dynamically adjust the weights of CNN-LSTM and TCN-GRU based on the similarity score. Fuse the weighted prediction results to obtain the power prediction value of the neural network layer.

[0010] S3. Based on the prediction error, dynamically determine the weight ratio of the physical model and the neural network layer, and generate the final wind and solar power prediction result by weighted fusion of the two outputs.

[0011] As a further aspect of the present invention, the small-scale meteorological data is generated by downscaling the mesoscale data using a WRF model, and the local meteorological parameters of photovoltaic and wind farms are updated hourly.

[0012] As a further embodiment of the present invention, the temporal feature vector is the output of the last hidden layer of the GRU network, and the spatial feature vector is the output of the last hidden layer of the LSTM network.

[0013] As a further aspect of the present invention, the LSTM network and the GRU network have the same hidden layer dimension, and the dimension difference is eliminated by linear transformation to reduce the computational load of edge computing devices.

[0014] As a further aspect of the present invention, the specific steps for dynamically adjusting the weights of CNN-LSTM and TCN-GRU based on similarity scores are as follows:

[0015] Obtain the temporal feature vector Htcn from the TCN-GRU output and the spatial feature vector Hcnn from the CNN-LSTM output.

[0016] The correlation between two feature vectors is calculated using the formulas stcn=Htcn×Ws×Hcnn and scnn=Hcnn×Ws×Htcn, where Ws is the trainable weight matrix.

[0017] The similarity score is converted into weights using softmax, ensuring that Qtcn + Qcnn = 1, where Qtcn = exp(stcn) / (exp(stcn) + exp(scnn)), Qtcn represents the contribution of temporal features to the current prediction, and Qcnn represents the contribution of spatial features to the current prediction.

[0018] As a further aspect of the present invention, during the initialization phase, the weights of the physical model are 0.8-0.9 and the weights of the neural network layer are 0.1-0.2. During the stable operation phase, the weights are dynamically adjusted according to the prediction error MAE.

[0019] As a further aspect of the present invention, the specific steps for dynamically adjusting the weights based on the prediction error MAE are as follows:

[0020] The moving average absolute error (MAE) of the physical model and neural network layers is calculated daily, with a window of 7 days. The specific formula is as follows:

[0021] , Where M is the number of samples;

[0022] According to the formula Calculate the weight proportions of the physical model, where W 物理 ∈[0.2,0.8], W 神经 =1-W 物理 .

[0023] As a further aspect of the present invention, if the prediction error exceeds the threshold for three consecutive times, the edge server is triggered to collect the latest 100 data points, perform incremental learning on the neural network layer, fine-tune the parameters, and verify the error of the new model. If the RMSE drops below 10%, it is synchronized to the cloud.

[0024] As a further aspect of the present invention, a transfer learning strategy is adopted, which retains the pre-trained physical model formula and the basic parameters of the neural network, and only updates the local weights related to the current error. At the same time, the cloud needs to store historical valid model versions, so that if the edge fails again, it can quickly roll back to the most recently successfully synchronized version.

[0025] A system based on a joint wind and solar power prediction model includes: a physical model module, a neural network module, a dynamic weight module, and a data interface module;

[0026] The physical model module establishes a photovoltaic power generation model based on the principle of photovoltaic power generation. It combines the irradiance and temperature data output by the small-scale numerical weather prediction model to predict photovoltaic power. Based on the Betz limit model of wind power generation, it combines the wind speed and wind direction data output by the small-scale numerical weather prediction model to predict wind power. The two are added together to obtain the wind power prediction value of the physical model.

[0027] The neural network module uses a CNN-LSTM network to predict photovoltaic power and a TCN-GRU network to predict wind power. It calculates the similarity score between the temporal feature vector and the spatial feature vector through an attention mechanism, dynamically adjusts the weights of CNN-LSTM and TCN-GRU based on the similarity score, and fuses the weighted prediction results to obtain the power prediction value of the neural network layer.

[0028] The dynamic weighting module dynamically determines the weight ratio of the physical model and the neural network layer based on the prediction error, and generates the final wind and solar power prediction result by weighted fusion of the two outputs.

[0029] The data interface module supports real-time interaction with meteorological databases, SCADA systems, and power grid dispatching platforms.

[0030] This invention provides an algorithm and system based on a joint wind and solar power prediction model, which has the following advantages compared with the prior art:

[0031] (1) The present invention constructs a collaborative mechanism between physical model and neural network. In the stage of building a new station, the physical model provides initial prediction based on meteorological data, avoiding the increase in error caused by insufficient training of traditional neural network. As the operating data accumulates, the neural network optimizes the prediction through online learning. The dynamic weight mechanism ensures that the model maintains optimal performance at different stages.

[0032] (2) The present invention constructs a dual-channel architecture based on TCN-GRU and CNN-LSTM. The TCN-GRU channel captures the long-term and short-term dependencies of time-series data such as wind speed and temperature, while the CNN-LSTM channel extracts spatial features such as cloud cover distribution and terrain influence. The two are dynamically weighted through an attention mechanism, which effectively solves the problem of spatiotemporal feature fragmentation in traditional models and improves the prediction robustness in extreme scenarios. Attached Figure Description

[0033] Figure 1 This is a flowchart of the steps of the present invention;

[0034] Figure 2 This is the system principle block diagram of the present invention. Detailed Implementation

[0035] 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.

[0036] like Figure 1 This invention provides an algorithm based on a joint wind and solar power prediction model, comprising:

[0037] S1. Construct the first-layer physical model: Based on the principle of photovoltaic power generation, establish a photovoltaic model, combine the irradiance and temperature data output by the small-scale numerical weather prediction model to predict photovoltaic power, and based on the Betz limit model of wind power generation, combine the wind speed and wind direction data output by the small-scale numerical weather prediction model to predict wind power. Add the two to obtain the wind power prediction value of the physical model.

[0038] The physical model is built on fundamental physical principles and can run without historical power data. It is suitable for scenarios where there is insufficient training data in the early stages of a newly built power station. For example, in the first month of a new photovoltaic power station in the Gobi Desert, there is no historical output data. The photovoltaic model only needs meteorological data such as irradiance and temperature to predict the power, with the error controlled within 15%. In contrast, the data-dependent LSTM model has an error exceeding 30% due to insufficient training samples.

[0039] Meanwhile, since the output of the physical model conforms to the energy conversion law, it is easier for grid dispatchers to understand and verify. For example, in the low-temperature environment of winter, the photovoltaic model calculates the photovoltaic power attenuation through the temperature coefficient. If the result is consistent with the actual measurement, it will provide clear physical parameter adjustment basis for operation and maintenance personnel.

[0040] The specific reasons for combining the photovoltaic model with the Betz limiting model are as follows:

[0041] The photovoltaic model focuses on photovoltaic power, which is dominated by irradiance, while the Betz limit model focuses on wind power, which is dominated by wind speed. The combination of the two forms a unified wind and solar joint prediction framework, avoiding the fragmentation of traditional methods that model wind power or photovoltaic power independently.

[0042] The output of the physical model serves as the input to the neural network layer, such as predicted power and error data, forming a two-layer model structure of physical foundation and data optimization. In the later stable operation phase, the neural network learns to correct the prediction error of the physical model, such as the power deviation caused by the overestimation of irradiance in the photovoltaic model, so that the final prediction error can be effectively reduced compared to a single physical model.

[0043] The small-scale meteorological data is generated by downscaling the mesoscale data using the WRF model, and the local meteorological parameters of the photovoltaic and wind farms, such as wind speed and irradiance, are updated hourly.

[0044] Mesoscale meteorological data typically has a resolution of 10-20km, making it unable to capture local micro-meteorological features such as valley winds and urban heat island effects. Meanwhile, mesoscale models have long update cycles and are difficult to respond to sudden weather events such as thunderstorms and short-term strong winds. For example, in a photovoltaic power station area, a sudden thunderstorm occurred in the afternoon during the summer. The mesoscale model failed to predict the cloud movement, while the small-scale WRF model effectively reduced the prediction error of the photovoltaic model by updating the irradiance data every hour.

[0045] However, directly acquiring small-scale meteorological data is constrained by reality. On the one hand, for some remote areas lacking sufficient meteorological stations, such as deserts and mountains, high-resolution data cannot be directly obtained. On the other hand, although drones or mobile meteorological stations can acquire small-scale data, they are costly and cannot achieve hourly rolling updates, making it difficult to meet the needs of real-time forecasting. Therefore, the WRF model is used to achieve low-cost downscaling through numerical calculations, generating regional meteorological data with a resolution of ≤1km, and incorporating parameters such as topography and vegetation to correct the systematic bias of mesoscale data.

[0046] S2. Constructing the second layer of neural network optimization: After the physical model is running stably, historical weather data, actual power data and physical model prediction error data are collected to construct a training set. A CNN-LSTM network is used to predict photovoltaic power, and a TCN-GRU network is used to predict wind power. The similarity score between the temporal feature vector and the spatial feature vector is calculated through the attention mechanism. The weights of CNN-LSTM and TCN-GRU are dynamically adjusted based on the similarity score. The weighted prediction results are then fused to obtain the power prediction value of the neural network layer.

[0047] Select the regional cloud cover distribution map and irradiance heat map as the input to the CNN-LSTM network;

[0048] The nonlinear effect of cloud cover on photovoltaic power is mainly reflected in the thickness and type of cloud layer. Dense cumulus clouds may block more than 80% of the direct solar irradiance, causing a sharp drop in photovoltaic power. On the other hand, light and thin altocumulus or stratus clouds may increase the total radiation reaching the photovoltaic panel through scattering effect, forming a cloud gain phenomenon, which makes the power increase instead of decrease. This complex nonlinear relationship originates from the combined effect of cloud layer absorption, reflection and scattering of solar radiation.

[0049] CNN's convolutional kernels can automatically extract local features of cloud distribution, such as small cloud clusters and cloud boundaries, and form a hierarchical representation from small clouds to cloud layers and then to cloud systems through multiple convolutions. The spatial patterns of cloud distribution have similarities in different locations. CNN's shared weight mechanism can efficiently identify such patterns and reduce the number of parameters.

[0050] The spatial distribution characteristics of irradiance refer to the non-uniform distribution of solar radiation intensity at different spatial locations due to factors such as topography, atmospheric composition, and obstructions. This distribution difference may be significant at small or large scales, such as valleys and ridges in mountainous areas, urban centers and suburbs, and coastal and inland areas.

[0051] Different resolutions of heatmaps can reflect irradiance changes at different scales, such as 1km×1km and 500m×500m. CNNs capture microscopic and macroscopic features simultaneously through multi-scale convolutional kernels. In addition, CNNs can implicitly model the radiative transfer process by learning the relationship between historical irradiance heatmaps and power.

[0052] After obtaining the regional cloud cover distribution map and irradiance heat map, preliminary preprocessing can be performed. For example, Gaussian filtering can be used to suppress Gaussian noise in the cloud cover map, median filtering can be used to remove salt-and-pepper noise in the irradiance heat map, and histogram equalization or adaptive histogram equalization can be used to improve the details of low-contrast images.

[0053] The specific process for predicting photovoltaic power using CNN-LSTM is as follows:

[0054] CNN extracts feature maps from two-dimensional spatial input (such as a 500m×500m cloud distribution map), such as a 32-channel, 20×20 pixel feature matrix. The feature vector of each spatial location contains information such as cloud density and irradiance gradient of that region.

[0055] The CNN feature maps from N consecutive time steps are concatenated along the time dimension to form an input sequence of shape [time step, spatial feature dimension]. For example, if N=12, corresponding to the past hour, with each time step lasting 5 minutes, the 32-channel feature maps from the 12 time steps are flattened into a 12×(32×20×20) sequence, which is then used as the input to the LSTM.

[0056] LSTM selectively memorizes the spatial features of each time step through the synergistic effect of the forget gate, input gate, and output gate. That is, the forget gate discards outdated spatial features, such as cloud features that have moved out of the photovoltaic power station range; the input gate updates the spatial features of the current time, such as the location and density of newly formed cumulus clouds; and the output gate generates a hidden state containing spatiotemporal information.

[0057] The final hidden state of the LSTM (containing spatiotemporal features over N time steps) is compressed to the photovoltaic power dimension through a fully connected layer;

[0058] Wind power is essentially a time series data with strong time correlation. Its current output is inherently related to the power value at historical moments. This correlation stems from the following factors:

[0059] Atmospheric flow has inertia, and wind speed will not change drastically in a short period of time. Therefore, historical power can reflect the trend of current wind speed, such as continuous strong winds or calm wind conditions.

[0060] The grid's ability to absorb wind power may limit real-time power output, while historical power can indirectly reflect the grid load or the regulation needs of energy storage systems.

[0061] Wind speed is the core driving factor that determines wind power output. Its relationship with power follows the nonlinear law of the wind turbine power curve: when the wind speed is lower than the cut-in wind speed, the wind turbine cannot generate electricity due to insufficient speed, and the power is 0. In the range from the cut-in wind speed to the rated wind speed, the power increases exponentially with the cube of the wind speed. If the wind speed exceeds the cut-out wind speed, the wind turbine will shut down in an emergency to protect the equipment, and the power will return to zero. In addition, the turbulence intensity of the wind speed will affect the aerodynamic efficiency of the wind turbine, resulting in short-term power fluctuations.

[0062] While temperature has a less direct impact on wind power output than wind speed, it indirectly affects power generation efficiency through the following pathways:

[0063] According to the wind power formula, the power is directly proportional to the air density. However, as the temperature rises, the air density decreases, resulting in a decrease in wind power at the same wind speed.

[0064] Based on the temperature sensitivity of equipment performance, it is known that low temperature environment may lead to increased lubricating oil viscosity, reduced flexibility of mechanical parts, and the wind turbine need to consume more energy to maintain operation, and may even trigger anti-icing programs, such as blade heating, reducing power generation efficiency. On the other hand, high temperature environment may trigger generator overheat protection, resulting in power reduction.

[0065] Therefore, historical power, temperature, and wind speed are selected as inputs to the temporal convolutional network (TCN), and key features affecting wind power prediction are extracted through the TCN.

[0066] TCN achieves an exponentially growing receptive field by expanding causal convolution, which can efficiently capture long-term and short-term dependencies in historical data. For example, when the expansion rate is set to 1, 2, 4, 8 and the convolution kernel size is 3, TCN can cover the first 15 time steps. Assuming the sampling interval is 5 minutes, it can cover 75 minutes of data, which is suitable for the daily and seasonal fluctuations that are common in wind power data.

[0067] Convolutional layers with different dilation rates can extract multi-scale features in parallel. For small dilation rates, they can capture short-term fluctuations at the minute level, such as sudden changes in wind speed caused by turbulence, while for large dilation rates, they can capture long-term trends at the hour level, such as the diurnal variation of sea and land breezes.

[0068] Causal convolution ensures that the output at the current moment depends only on historical data and does not cause leakage of future information. This conforms to the causal logic of real-time wind power prediction. For example, when predicting the power at time t, TCN only uses historical power, temperature, and wind speed data from t-1 onwards to avoid data crossing errors.

[0069] After obtaining historical power, temperature, and wind speed, they need to be preprocessed. For example, a fast density peak algorithm based on KNN can be used to remove data points that deviate from the historical distribution by 3σ. Bayesian inference methods can be used to impute missing values ​​by combining the spatiotemporal correlation of meteorological data.

[0070] The specific process for predicting wind power using TCN-GRU is as follows:

[0071] Historical power P, temperature T, and wind speed V are concatenated into a two-dimensional matrix [time step size, variable dimension] according to time steps, which is used as the input of TCN. If there are N time steps, the dimension is N×3.

[0072] To adapt to the convolution operation of TCN, the two-dimensional matrix is ​​expanded into a three-dimensional tensor of [time step, variable dimension, 1] to increase the channel dimension, and the scale of each variable is ensured to be consistent through standardization, such as power being normalized to [0,1], and temperature and wind speed being normalized to [-1,1].

[0073] TCN uses a shared convolution kernel, such as a 3×1 convolution kernel, for three variables, sliding only in the time dimension to extract temporal commonalities across variables. For example, when wind speed increases suddenly, power usually rises synchronously, and temperature may fluctuate due to changes in atmospheric flow. The shared kernel can capture the coordinated changes of the three.

[0074] Separate feature scales through convolutional layers with different dilation rates: In the bottom layer convolution, local features are extracted from the [P,T,V] vector at each time step to form short-term fluctuation features, and an N×64 feature matrix is ​​output, such as calculating the wind speed change rate and temperature gradient within 10 minutes.

[0075] In the middle layer convolution, spanning 2 to 4 time steps, approximately 10 to 20 minutes, the mid-term trend is captured, and an N×64 feature matrix is ​​output. If the wind speed is greater than 10 m / s for 3 consecutive time steps, it can be inferred that the power is close to the rated value.

[0076] In high-level convolution, covering 8 to 16 time steps, approximately between 40 minutes and 1.5 hours, long-term dependencies are extracted, and an N×64 feature matrix is ​​output. For example, if the nighttime temperature is consistently below 0°C, it can be further inferred that the wind turbine may be icing. Based on the possibility of icing, low-temperature warning features for power limitation can be further derived.

[0077] The feature maps output by each convolutional layer are concatenated along the channel dimension. If each layer outputs 64 channels, then the three variables have a total of 192 channels. Non-linearity is introduced through the ReLU activation function, enabling the model to learn the coupling relationship between variables.

[0078] The TCN ultimately outputs a feature matrix [N,C], where N is the time step and C is the feature dimension. It is divided into N feature vectors in chronological order, forming the input sequence [N,C] of the GRU.

[0079] The feature vector sequence [f1,f2,...,fN] output by TCN is input into GRU in sequence. Each time step ft contains short-term fluctuations in wind speed, medium-term trends in temperature, and long-term patterns in power.

[0080] When a sudden drop in temperature is detected, the gate enhancement memory weights for the low-temperature, high-air-density characteristics are updated to suppress irrelevant short-term power fluctuation characteristics.

[0081] If the wind speed is above the cut-out wind speed, the reset door clears the previous normal operating characteristics and focuses on the shutdown protection mode;

[0082] The hidden state ht of GRU is not a simple accumulation of features, but a dynamic fusion of physical relationships between variables through a gating mechanism. For example, when the wind speed is near the rated value and the temperature is low, ht strengthens the correlation between high air density and power potential, predicting power slightly higher than the rated value. In addition, it learns the importance of variable features through training data. For example, in low wind speed scenarios, GRU automatically increases the weight of temperature features, and in high wind speed scenarios, it focuses on the saturation characteristics of wind speed and power.

[0083] The final wind power prediction value and the feature vector of the final hidden state are obtained by training the GRU model.

[0084] Wind and solar power generation is affected by both temporal and spatial characteristics. Temporal characteristics include fluctuations in wind speed over time, while spatial characteristics include the regional distribution of irradiance. However, the dominant factors differ significantly across different scenarios.

[0085] At night or when there is no sunlight, the photovoltaic power is 0, and the wind power is determined only by the time-series characteristics (wind speed changes), at which time TCN-GRU dominates;

[0086] When the weather is sunny with localized clouds, the photovoltaic power is significantly affected by spatial characteristics (cloud distribution), and CNN-LSTM dominates in this situation.

[0087] During complex weather transition phases, such as when wind speeds rise after sunrise, temporal and spatial characteristics work together, requiring a dynamic balance of their weights.

[0088] The attention mechanism automatically determines which feature is more critical, the temporal feature extracted by TCN-GRU or the spatial feature extracted by CNN-LSTM, thus avoiding feature mismatch caused by fixed weights.

[0089] The specific steps to implement dynamic weight adjustment are as follows:

[0090] TCN-GRU outputs a temporal feature vector Htcn, while CNN-LSTM outputs a spatial feature vector Hcnn.

[0091] The dot product similarity is used to measure the correlation between two feature vectors. The specific formula is: stcn=Htcn×Ws×Hcnn, scnn=Hcnn×Ws×Htcn, where Ws is a trainable weight matrix used to enhance the response of key features.

[0092] The similarity score is converted into weights using softmax to ensure that Qtcn + Qcnn = 1, where Qtcn = exp(stcn) / (exp(stcn) + exp(scnn)), Qtcn represents the contribution of temporal features to the current prediction, such as the proportion of wind speed change to wind power, and Qcnn represents the contribution of spatial features to the current prediction, such as the proportion of irradiance distribution to photovoltaic power.

[0093] Wind power is predicted using the formula Pwind=Qtcn×Pwind_tcn+Qcnn×Pwind_cnn, where Pwind_tcn represents the wind power predicted by TCN-GRU and Pwind_cnn represents the photovoltaic power predicted by CNN-LSTM.

[0094] S3. Based on the prediction error, dynamically adjust the weight ratio of the physical model and the neural network layer, and output the final wind and solar power prediction result.

[0095] During the initialization phase, the physical model weights W 物理 Set the values ​​to 0.8-0.9, and the weights of the neural network layers to 1-W. 物理 ;

[0096] Due to insufficient historical data for newly built stations, the physical model, based on meteorological physical laws, can provide reliable initial predictions without training and is given a large weight. The neural network layer, due to insufficient data, is initially used only as an auxiliary correction to avoid overfitting.

[0097] During the stable operation phase, the moving average absolute error (MAE) between the physical model and the neural network layers is calculated daily, with a window of 7 days, according to the formula... , Calculate the physical model MAE and the neural network layer MAE, where M is the number of samples;

[0098] MAE can intuitively reflect the model prediction bias, the sliding window can smooth short-term fluctuations, avoid the influence of a single outlier, and can continuously monitor error changes, providing data support for weight adjustment.

[0099] According to the formula Calculate the weight proportions of the physical model, where W 物理 ∈[0.2,0.8], to prevent over-guidance by a single model;

[0100] As can be seen from the above formula, the model with smaller error will receive higher weight, reflecting the principle of "the better gets more". Adding 0.01 to the denominator is to avoid numerical instability when MAE is 0.

[0101] According to formula P 预测 =W物理 ×P 物理 +W 神经 ×P 神经 The final predicted power is obtained, where P 物理 For the output of the physical model, P 神经 For the output of the neural network layer;

[0102] If the prediction error exceeds the threshold for three consecutive predictions, such as RMSE greater than 15%, the following process is triggered:

[0103] The edge server collects the latest 100 data points, performs incremental learning on the neural network layer, fine-tunes the parameters, and verifies the error of the new model. If the RMSE drops below 10%, it is synchronized to the cloud.

[0104] A single error may be caused by data noise, but three consecutive errors exceeding the limit indicate a systematic bias in the model.

[0105] The latest 100 data points contain current weather patterns and are more relevant than the full historical data. For example, typhoon data from 3 years ago is not relevant to the current season. At the same time, the 100 data points are adapted to the storage limitations of the edge device, avoiding the latency issues of full data transmission.

[0106] Fine-tuning only the attention mechanism parameters of the neural network, such as the dilation factor of TCN-GRU and the convolution kernel weights of CNN-LSTM, instead of training the entire model, can effectively reduce the amount of computation.

[0107] To avoid overfitting, a transfer learning strategy is adopted, which retains the pre-trained physical model formula and the basic parameters of the neural network, and only updates the local weights that are relevant to the current error.

[0108] To ensure that incremental learning does not introduce new errors, such as misjudging the wind turbine's cut-off wind speed as normal operation, 10% is a safe threshold, which corresponds to the acceptable range of the power grid's reserve capacity. Local verification is performed at the edge before synchronization to the cloud to avoid invalid updates that consume bandwidth.

[0109] The model parameters corrected at the edge are synchronized to the cloud for reference by other wind farms. For example, multiple wind farms in the same area can share thunderstorm response parameters.

[0110] The cloud stores historical valid model versions. If the edge device fails again, it can be quickly rolled back to the most recently successfully synchronized version.

[0111] like Figure 2 The present invention provides a system based on a joint wind and solar power prediction model, comprising: a physical model module, a neural network module, a dynamic weight module, and a data interface module;

[0112] The physical model module establishes a photovoltaic power generation model based on the principle of photovoltaic power generation. It combines the irradiance and temperature data output by the small-scale numerical weather prediction model to predict photovoltaic power. Based on the Betz limit model of wind power generation, it combines the wind speed and wind direction data output by the small-scale numerical weather prediction model to predict wind power. The two are added together to obtain the wind power prediction value of the physical model.

[0113] The neural network module uses a CNN-LSTM network to predict photovoltaic power and a TCN-GRU network to predict wind power. It calculates the similarity score between the temporal feature vector and the spatial feature vector through an attention mechanism, dynamically adjusts the weights of CNN-LSTM and TCN-GRU based on the similarity score, and fuses the weighted prediction results to obtain the power prediction value of the neural network layer.

[0114] The dynamic weighting module dynamically determines the weight ratio of the physical model and the neural network layer based on the prediction error, and generates the final wind and solar power prediction result by weighted fusion of the two outputs.

[0115] The data interface module supports real-time interaction with meteorological databases, SCADA systems, and power grid dispatching platforms.

[0116] Some of the data in the above formulas are numerical calculations with dimensions removed, and the contents not described in detail in this specification are all prior art known to those skilled in the art.

[0117] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. An algorithm based on a joint wind and solar power prediction model, characterized in that, include: S1. Construct the first-layer physical model: Based on the principle of photovoltaic power generation, establish a photovoltaic model, combine the irradiance and temperature data output by the small-scale numerical weather prediction model to predict photovoltaic power, and based on the Betz limit model of wind power generation, combine the wind speed and wind direction data output by the small-scale numerical weather prediction model to predict wind power. Add the two to obtain the wind power prediction value of the physical model. S2. Constructing the second neural network layer: A CNN-LSTM network is used to predict photovoltaic power, and a TCN-GRU network is used to predict wind power. The similarity score between the temporal feature vector and the spatial feature vector is calculated using an attention mechanism. The weights of CNN-LSTM and TCN-GRU are dynamically adjusted based on the similarity score. The weighted prediction results are then fused to obtain the power prediction value of the neural network layer. Specifically, the operation of dynamically adjusting the weights of CNN-LSTM and TCN-GRU based on the similarity score is as follows: Obtain the TCN-GRU output temporal feature vector Htcn, and then... - The LSTM outputs a spatial feature vector Hcnn; the correlation between the two feature vectors is calculated according to the formula stcn=Htcn×Ws×Hcnn, scnn=Hcnn×Ws×Htcn, where Ws is a trainable weight matrix; the similarity score is converted into weights through softmax to ensure Qtcn+Qcnn=1, where Qtcn=exp(stcn) / (exp(stcn)+exp(scnn)), Qtcn represents the contribution of temporal features to the current prediction, and Qcnn represents the contribution of spatial features to the current prediction; S3. Based on the prediction error, dynamically determine the weight ratio of the physical model and the neural network layer, and generate the final joint prediction result of wind and solar power by weighted fusion of the two outputs.

2. The algorithm based on a joint wind and solar power prediction model according to claim 1, characterized in that, The small-scale meteorological data is generated by downscaling the mesoscale data using the WRF model, and the local meteorological parameters of photovoltaic and wind farms are updated hourly.

3. The algorithm based on a joint wind and solar power prediction model according to claim 1, characterized in that, The temporal feature vector is the output of the last hidden layer of the GRU network, and the spatial feature vector is the output of the last hidden layer of the LSTM network.

4. The algorithm based on a joint wind and solar power prediction model according to claim 1, characterized in that, The LSTM network and the GRU network have the same hidden layer dimension. The dimension difference is eliminated by linear transformation to reduce the computational load of edge computing devices.

5. The algorithm based on a joint wind and solar power prediction model according to claim 1, characterized in that, During the initialization phase, the weights of the physical model are 0.8-0.9, and the weights of the neural network layers are 0.1-0.

2. During the stable operation phase, the weights are dynamically adjusted based on the prediction error MAE.

6. The algorithm based on a joint wind and solar power prediction model according to claim 5, characterized in that, The specific steps for dynamically adjusting weights based on the prediction error MAE are as follows: The moving average absolute error (MAE) of the physical model and neural network layers is calculated daily, with a window of 7 days. The specific formula is as follows: Where M is the number of samples; According to the formula Calculate the weight proportions of the physical model, where W 物理 ∈[0.2,0.8], W 神经 =1-W 物理 .

7. The algorithm based on a joint wind and solar power prediction model according to claim 1, characterized in that, If the prediction error exceeds the threshold for three consecutive times, the edge server is triggered to collect the latest 100 data points, perform incremental learning on the neural network layer, fine-tune the parameters, and verify the error of the new model. If the RMSE drops below 10%, it is synchronized to the cloud.

8. The algorithm based on a joint wind and solar power prediction model according to claim 1, characterized in that, The transfer learning strategy is adopted to retain the pre-trained physical model formula and the basic parameters of the neural network, and only update the local weights related to the current error. At the same time, the cloud needs to store historical effective model versions so that if the edge fails again, it can quickly roll back to the most recently successfully synchronized version.

9. A system based on a joint wind and solar power prediction model, used to execute the algorithm based on a joint wind and solar power prediction model as described in claims 1-8, characterized in that, include: Physical model module, neural network module, dynamic weight module, data interface module; The physical model module establishes a photovoltaic power generation model based on the principle of photovoltaic power generation. It combines the irradiance and temperature data output by the small-scale numerical weather prediction model to predict photovoltaic power. Based on the Betz limit model of wind power generation, it combines the wind speed and wind direction data output by the small-scale numerical weather prediction model to predict wind power. The two are added together to obtain the wind power prediction value of the physical model. The neural network module uses a CNN-LSTM network to predict photovoltaic power and a TCN-GRU network to predict wind power. It calculates the similarity score between the temporal feature vector and the spatial feature vector through an attention mechanism, dynamically adjusts the weights of CNN-LSTM and TCN-GRU based on the similarity score, and fuses the weighted prediction results to obtain the power prediction value of the neural network layer. The dynamic weighting module dynamically determines the weight ratio of the physical model and the neural network layer based on the prediction error, and generates the final wind and solar power prediction result by weighted fusion of the two outputs. The data interface module supports real-time interaction with meteorological databases, SCADA systems, and power grid dispatching platforms.