Photo-thermal DNI prediction method based on multi-dimensional prediction deviation correction
Through the adaptive threshold method and three-dimensional fusion BiGRU-Attention, PINN, and KAN optimization algorithms, the problem of low photothermal DNI prediction accuracy is solved, and high-precision prediction under different weather conditions is achieved.
Patent Information
- Application Number
- CN202510851749.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-24
AI Technical Summary
The existing photothermal DNI prediction methods have the problem of low prediction accuracy, especially when facing sharp changes in atmospheric state, the accuracy of the traditional methods is insufficient.
Adaptive threshold method is used for data cleaning, combined with K-means clustering and three-dimensional fusion BiGRU-Attention, PINN, and KAN optimization algorithms, short-term solar direct normal radiation prediction of photothermal power stations and error correction is performed.
By optimizing data cleaning and multi-dimensional forecasting methods, the accuracy of photothermal DNI prediction is improved, especially the prediction accuracy under different weather conditions.
Smart Images

Figure CN120373148A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of solar thermal DNI prediction, and particularly relates to a solar thermal DNI prediction method based on multi-dimensional forecast deviation correction. Background Art
[0002] In a new power system, the inherent randomness and volatility of wind power and photovoltaic power generation pose challenges to the system frequency and voltage stability during large-scale grid connection. Compared with traditional wind power and photovoltaic power generation technologies, solar thermal power generation technology exhibits flexible regulation performance comparable to that of conventional energy units, enabling "homogeneous consumption of renewable energy", and thus becoming a key technical pillar to support the grid connection of a high proportion of renewable energy. With its excellent peak shaving ability and energy storage compatibility, the development prospect of solar thermal power plants is particularly broad and is expected to become an important part of the power market.
[0003] In solar thermal power prediction, the most influential factor on solar thermal power is the Direct Normal Irradiance (DNI). Traditional DNI prediction technologies mainly include numerical weather prediction method and time series analysis method. The numerical weather prediction method relies on the accurate simulation and forward-looking prediction of atmospheric conditions. However, when facing a sharp change in the atmospheric state, this method often shows low prediction accuracy. On the other hand, the time series analysis method relies on historical data of meteorology and solar irradiance, and establishes the connection between historical radiation data and current data through statistical methods to estimate DNI. This method can identify the change characteristics, trends and laws of DNI from time series data, so as to effectively predict its future trend. However, the time series analysis method mainly focuses on the time series itself and often ignores the influence of external factors, which may lead to large prediction deviations when the environment changes significantly. Summary of the Invention
[0004] Object of the Invention: The technical problem to be solved by the present invention is to provide a solar thermal DNI prediction method based on multi-dimensional forecast deviation correction in view of the deficiencies of the prior art. This method solves the problem of low prediction accuracy existing in the existing solar thermal DNI prediction methods.
[0005] The method of the present invention specifically includes the following steps: Step 1, perform cleaning and preprocessing operations on DNI time series data through an adaptive threshold method; Step 2, expand the dimensions of meteorological factors, perform K-means clustering on DNI time series data, and identify typical days under different weather types; Step 3: Based on the three-dimensional fusion of the Bidirectional Gated Recurrent Unit-Attention (BiGRU-Attention), Physics-informed neural network (PINN), Kolmogorov-Arnold Networks (KAN) optimization algorithm, and error correction, perform short-term solar direct normal irradiance prediction for solar thermal power plants.
[0006] Step 1 includes: Step 1-1: Collect historical DNI time series data and corresponding meteorological data, including temperature, air pressure, and cloud cover; Step 1-2: Preprocess the historical DNI time series data, calculate the standard score Z-Score, set a threshold according to the distribution of historical standard scores Z-Score; and verify and adjust the threshold through iteration, delete data higher than the threshold, and denote the preprocessed DNI time series data as ; Step 1-3: Input the DNI time series data into the variational mode decomposition (VMD) algorithm for mode decomposition to obtain the DNI decomposition signal , representing the s-th sub-signal, where s represents the total number of sub-signals; Step 1-4: Input the DNI decomposition signal individually into the adaptive adjustment model for sub-signal feature extraction.
[0007] In Step 1-4, the adaptive adjustment model performs the following steps: Step 1-4-1: Extract extreme values: For each sub-signal imf, calculate and extract the maximum value , the minimum value and all extreme points. All extreme points form a set , representing the n-th extreme point extracted, where n represents the total number of extreme points; Step 1-4-2: Calculate the coefficient of variation: According to the mutation event of DNI, calculate the coefficient of variation : , where represents the mutation value of DNI, is the average value of the historical DNI time series data; Step 1-4-3, calculate the dynamic window width : , where represents the adaptive coefficient; Step 1-4-4, screen the extreme points: For each extreme point, calculate the Euclidean distance between the extreme point and the nearest neighbor extreme point. If the Euclidean distance is greater than the dynamic window width , satisfying , then retain the extreme point and count it as a valid extreme point , where represents the k-th extreme point and the (k + 1)-th extreme point of the Euclidean distance; otherwise, discard the extreme point; finally, retain all the extreme points that meet the conditions to obtain the set of valid extreme points , represents the f-th valid extreme point; Step 1-4-5, feature enhancement, including the following steps: Step 1-4-5-1, respectively use the moving weighted average method and the Holt linear trend method to calculate the moving average or exponential smoothing of the DNI time series data: The formula of the moving weighted average method is: , The formula of the Holt linear trend method is: , where represents the moving weighted average value at time t, used to predict future values, represents the weight, used to assign different weights to the observed values at different time points, represents the observed value of DNI at time i, used to calculate the weighted average, represents the smoothing level value at time t, represents the level smoothing coefficient, usually taking values in (0, 1), and in this invention, it takes the value of 0.5, is the smoothing level value at time t - 1, is the smoothing trend value at time t - 1; represents the observed value of DNI at time t.
[0008] Step 1-4-5-2, use the Fourier transform to extract the seasonal component and add meteorological data as auxiliary features; Use the discrete Fourier transform DFT: , where, is the Fourier coefficient of the k-th frequency component, is the n-th data point of the time series, N is the length of the time series, k is the frequency index, ranging from 0 to N - 1; From the results of the Fourier transform, select the low-frequency components representing seasonal variations, and convert the selected seasonal components back to the time domain using the inverse Fourier transform IFFT: ; Step 1 - 4 - 6, dealing with outliers: Use the interquartile range IQR and Z-score methods to detect and remove outliers: , , where, and represent outliers, represents the average value of DNI, represents the standard deviation of DNI; represents the median of the DNI values, represents the interquartile range of the DNI values, referring to the middle 50% range from the first quartile to the third quartile; Step 1 - 4 - 7, multi-scale analysis: Use the wavelet transform method to perform multi-scale decomposition on the DNI signal: , where represents the wavelet transform coefficient, referring to the characteristics of the signal at scale a and position b, is the complex conjugate of the wavelet function, a is the scale parameter, controlling the stretching of the wavelet function, b is the translation parameter, controlling the position of the wavelet function on the time axis, represents the function of t for the DNI variation; d is the integral symbol.
[0009] The present invention also provides an electronic device, including a processor and a memory, where the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the method.
[0010] The present invention also provides a storage medium, storing a computer program or instruction, and when the computer program or instruction runs on a computer, it executes the steps of the method.
[0011] The present invention inputs historical meteorological factor data into an adaptive selection model for deviation correction and data preprocessing, constructs a feature matrix, obtains typical weather days through the K-means clustering method as the input data of the solar thermal DNI prediction model, and designs a short-term solar direct normal irradiance prediction model for solar thermal power plants based on a three-dimensional fusion BiGRU-Attention+PINN+KAN optimization algorithm and error correction, which can effectively improve the prediction accuracy of solar thermal DNI under different weather conditions.
[0012] The present invention has the following beneficial effects: First, optimize the preprocessing steps of data cleaning. The present invention screens and removes outliers by designing an adaptive threshold model, introduces other meteorological factors for the conventional DNI sequence through feature enhancement, and conducts multi-scale analysis, making the preprocessed data more characteristic and operable.
[0013] Second, the clustering method is optimized. The present invention designs a feature matrix for K-means clustering operation, introduces multi-dimensional factors, realizes the extraction of typical weather days, and plays the role of multi-dimensional forecasting.
[0014] Third, the three dimensions of the prediction model jointly predict to further improve the accuracy. The present invention designs a three-dimensional prediction model, which has greatly improved the prediction accuracy compared with the traditional single model. The methods of BiGRU-Attention, PINN, and KAN are respectively used for three-dimensional prediction, and the results are corrected for errors to obtain more accurate prediction results. Description of the Drawings
[0015] Figure 1 is the technical route flowchart of the three steps of the method of the present invention.
[0016] Figure 2 is the rainy weather clustering heat map obtained by K-means clustering in the method of the present invention.
[0017] Figure 3 is the cloudy weather clustering heat map obtained by K-means clustering in the method of the present invention.
[0018] Figure 4 is the sunny weather clustering heat map obtained by K-means clustering in the method of the present invention.
[0019] Figure 5 is the schematic diagram of the GRU structure of the method of the present invention.
[0020] Figure 6 is the schematic diagram of the BiGRU structure of the method of the present invention.
[0021] Figure 7 is the parameter setting diagram of the model training algorithm of the present invention.
[0022] Figure 8 It is a schematic diagram of the prediction result for a typical sunny day in the present invention.
[0023] Figure 9 It is a schematic diagram of the prediction result for a typical cloudy day in the present invention.
[0024] Figure 10 It is a schematic diagram of the prediction result for a typical day with complex weather in the present invention.
[0025] Figure 11 It is a schematic diagram for evaluating the parameters of the prediction result of the present invention. Detailed implementation manners
[0026] The following further specifically describes the present invention in conjunction with the accompanying drawings and detailed implementation manners, and the above and / or other advantages of the present invention will become clearer.
[0027] An embodiment of the present invention provides a method for predicting the direct normal irradiance (DNI) of solar thermal based on multi-dimensional forecast deviation correction, including the following steps: As Figure 1 shown is the technical route flowchart of the three main steps of the present invention (NWP refers to Numerical Weather Prediction, numerical weather prediction).
[0028] Step 1, perform cleaning and preprocessing operations on the DNI time series data through an adaptive threshold method; Step 1-1, collect historical DNI time series data and corresponding various meteorological data, such as temperature, air pressure, cloud amount, etc.; Step 1-2, preprocess the historical DNI time series data, calculate the Z-Score, and according to the distribution of the historical Z-Score, find the Z-Score value corresponding to the selected percentile as the dynamic threshold. In the present invention, the selected threshold is 95%, and the threshold verification and adjustment are carried out through iteration. Denote the preprocessed DNI time series data as ; Step 1-3, input the DNI time series data into the VMD modal decomposition algorithm for modal decomposition to obtain the DNI decomposition signal ; Step 1-4, input the DNI decomposition signal alone into the adaptive adjustment model for sub-signal feature extraction to reduce the interference of the small fluctuations contained in the sub-signal and enhance the system robustness; Among them, one of the main innovations of the present invention is the pole adaptive selection model in Step 1-4, which is used to process the Sub-signal. This model can filter out the interference of the small fluctuations contained in the sub-signal and perform multi-dimensional and multi-scale analysis on DNI by integrating multiple factors such as season and weather. Its operation process is as follows: Step 1-4-1, Extract extreme values: For each sub-signal imf, calculate and extract the maximum value , minimum value and all extreme points. All extreme points form a set , representing the nth extracted extreme point, where n represents the total number of extreme points; Step 1-4-2, Calculate the coefficient of variation: According to the mutation event of DNI, calculate the coefficient of variation (Variance Coefficient): , where, represents the mutation value of DNI, which can generally be approximately equal to its standard deviation , is the average value of the historical DNI time series data.
[0029] Step 1-4-3, Calculate the dynamic window width: Dynamically adjust the window width according to the coefficient of variation of the DNI time series data. When the data volatility is large, the window width should be increased accordingly to reduce misjudgment; when the volatility is small, the window width is reduced to more accurately identify the poles. Define an adaptive coefficient . Since the data volatility is small within each step and more accurate identification of data characteristics is required, choosing a smaller window width can capture the detailed characteristics in the data. Set the range of to . According to the coefficient of variation and the adaptive coefficient , calculate the dynamic window width .
[0030] The dynamic window width The calculation formula is: ; Step 1-4-4, Screen poles: For each extreme point, calculate the Euclidean distance between the extreme point and the nearest neighbor pole. If the Euclidean distance is greater than the dynamic window width , satisfying , then retain the extreme point and count it as a valid pole , where represents the kth extreme point and the (k + 1)th extreme point The Euclidean distance; otherwise, discard the extreme point; finally, retain all the extreme points that meet the conditions to obtain the set of valid extreme points , represents the f-th valid extreme point; Step 1-4-5, Feature Enhancement: By introducing additional relevant features, the complexity of DNI changes can be better captured, which specifically includes the following steps: Step 1-4-5-1, Calculate the moving average or exponential smoothing of the time series data of DNI to capture the long-term trend, and use the moving weighted average method and the Holt linear trend method respectively.
[0031] The formula for the moving weighted average method is: , The formula for the Holt linear trend method is: , where represents the moving weighted average value at time t, which is used to predict future values, represents the weight, which is used to assign different weights to the observed values at different time points, represents the observed value of DNI at time i, which is used to calculate the weighted average, represents the smoothing level value at time t, represents the level smoothing coefficient, usually taking values in (0,1), and the value taken in the present invention is 0.5, is the smoothing level value at time t-1, is the smoothing trend value at time t-1; Step 1-4-5-2, Use the Fourier transform to extract the seasonal component, and add meteorological data such as cloud cover, humidity, and temperature as auxiliary features; Use the discrete Fourier transform DFT: , where, is the Fourier coefficient of the k-th frequency component, is the n-th data point of the time series, N is the length of the time series, and k is the frequency index, ranging from 0 to N-1; From the results of the Fourier transform, select the low-frequency components representing seasonal changes. Since the subsequent DNI prediction is on an ultra-short-term scale, the seasonal threshold is set to 1 / 12, that is, the daily acquisition step is 2h. Those lower than this threshold are daily seasonal factors, and vice versa are the influences of other meteorological factors.
[0032] Convert the selected seasonal component back to the time domain using the inverse Fourier transform (IFFT): ; Step 1-4-6, Handling outliers: Use the IQR (Interquartile Range) and Z-score methods to detect and replace outliers. Removing outliers can reduce their impact on pole identification and prediction model training: , ; Step 1-4-7, Multi-scale analysis: Use the wavelet transform method to perform multi-scale decomposition on the DNI signal. Signals at different time scales may contain different information, and multi-scale analysis helps to identify this information.
[0033] Perform multi-scale decomposition on the DNI signal using the wavelet transform method: ; Step 1-4-8, Ensemble learning: Combine multiple prediction models, such as random forest and gradient boosting. Ensemble learning can reduce the bias and variance of a single model by combining the prediction results of multiple models, improving the accuracy of prediction.
[0034] Random forest: ; Gradient boosting: ; Through the comprehensive application of the above technical points and methods, the performance of the pole adaptive selection model in DNI prediction can be significantly improved. By implementing the present invention, an algorithm that can accurately identify extreme mutation meteorological environments from historical DNI time series data can be obtained. By processing the sub-signals output by the VMD model through a multi-scale pole adaptive model that integrates multi-dimensional factors, the interference of small fluctuations within the sub-signals is greatly reduced, realizing the automatic identification of mutation meteorological environments based on DNI historical data, and greatly improving the accuracy of complete identification of mutation meteorological environments.
[0035] Step 2, Fusion analysis of DNI time series data based on K-means clustering and dimension expansion of meteorological factors, and identification of typical days for different weather conditions; Step 2-1, Expand the dimensions and perform weighted analysis on meteorological factors, and construct a feature matrix in combination with derivative features, Among them, one of the main innovation points of the present invention is the dimension expansion and weighted analysis of meteorological factors in Step 2-1, and the construction of a feature matrix. Its operation process is as follows: Step 2-1-1, Dimension expansion and weighted analysis of meteorological factors, and construction of a feature matrix; Step 2-1-1, collect basic meteorological data including cloud cover, pressure, temperature, humidity, wind speed, etc.
[0036] Step 2-1-2, perform data preprocessing, use interpolation and mean filling to handle missing values, and convert data with different dimensions to the same scale, perform normalization operation using Min-Max: ; Step 2-1-3, calculate derivative features, use the difference method to calculate the change rates of cloud cover, pressure, temperature, humidity, and wind speed respectively , where, represents the change value, represents the value corresponding to the later time point, divide by the time interval to obtain the change rate of meteorological data; Step 2-1-4, obtain the influence coefficients of various meteorological data on the solar thermal DNI through Pearson correlation analysis, and perform weighted analysis: , where, r represents the correlation coefficient, represents the value of different meteorological data (wind speed, pressure, temperature, cloud cover, humidity) at time i, represents the average value of the whole group of data, represents the DNI data at time i, represents the average value of the DNI data of the whole group of data, from which the influence coefficients of different meteorological factors on DNI can be obtained; Step 2-1-5, arrange the processed features in columns to form a matrix X: ; where refers to the original values of different meteorological factors within a certain step length (the step length taken in the present invention is 5 minutes), refers to the change rate of meteorological data, refers to the solar thermal DNI correlation coefficient of meteorological data in Pearson analysis, specifically expressed as: , where, respectively refer to the data of wind speed, pressure, temperature, cloud cover, and humidity at time i; , where , , , , respectively refer to the change rate values of wind speed, air pressure, temperature, cloud cover, and humidity at time point i; , where , , , , respectively refer to the correlation coefficients of wind speed with DNI, air pressure with DNI, temperature with DNI, cloud cover with DNI, and humidity with DNI; Through the above steps, the original meteorological data can be converted into a multi-dimensional feature matrix rich in information, providing an effective input for subsequent K-means clustering analysis.
[0037] Step 2-2: Take matrix X as the input, perform K-means clustering to identify typical days under different weather types. First, several clusters of typical weather are obtained, as shown in Figure 2 , Figure 3 , Figure 4 respectively. Then, typical days under different weather types are selected, namely sunny day on July 25th, cloudy day on October 26th, and complex weather day on December 24th; The specific steps are as follows: Step 2-2-1: Perform K-means clustering; In this embodiment, K-means clustering is used to identify typical days under different weather types.
[0038] The goal of using the K-means algorithm is to minimize the following objective function: , where K represents the number of clusters, is the value of the within-cluster sum of squares (WCSS), is the th cluster, is the th cluster center, is the jth data point and the square of the Euclidean distance between the cluster center ; K-means clustering includes the following steps: Step 2-2-1-1: Initialization: Randomly select Q data points as the initial cluster centers: ; where Indicates the initial clustering center of the th cluster, and represents the first data point in the th cluster; Among them, represents the Euclidean distance between the j-th data point and the clustering center of the th cluster; represents the Euclidean distance between the j-th data point and the clustering center of the q-th cluster; Step 2-2-1-3, recalculate the clustering center of each cluster; Step 2-2-1-4, iteration: Repeat steps 2-2-1-2 to 2-2-1-3 until the condition is met. The condition means that the clustering center no longer changes significantly, that is, the fluctuation is within the threshold of 0.01, or the maximum number of iterations is reached. Set the maximum number of iterations to 100;
[0039] In step 2-2-1-3, the following formula is used to recalculate the clustering center of each cluster: .
[0040] Step 3, short-term solar direct normal radiation prediction of a solar thermal power station based on a three-dimensional fusion BiGRU-Attention+PINN+KAN optimization algorithm and error correction; Step 3-1, use the gated recurrent unit GRU as the underlying core network and optimize it to a bidirectional gated recurrent unit BiGRU-Attention with an attention mechanism;
[0041] As Figure 5 shown is the schematic diagram of the GRU model structure designed by the present invention. Among them, and are the update gate and the reset gate respectively; is the hidden state at time t; is the hidden state at time t-1; is the sigmoid activation function; is the input of the gated recurrent unit GRU at time t; is the hyperbolic tangent function. The forward propagation expression is obtained from the structural diagram of the gated recurrent unit (GRU): , , , , , where are the weight parameters; is the output of the GRU network at time step t; are the bias parameters; is the candidate hidden state; is the element-wise multiplication of matrices; is the output layer weight; As Figure 6 shown in the schematic diagram of the BiGRU model designed by the present invention, the information transmission of the bidirectional gated recurrent unit (BiGRU) is divided into two directions: forward and backward. The output vector transformed from the forward input data is combined with the output vector transformed from the backward input data to obtain the final output vector. The hidden layer state of the bidirectional gated recurrent unit (BiGRU) is expressed as: , , , where is the operation process of the GRU network; , respectively represent the weight and state of the forward hidden layer at time step t; , respectively represent the weight and state of the backward hidden layer at time step t; is the bias of the hidden layer state at time step t; When introducing the attention mechanism, let the output of the bidirectional gated recurrent unit (BiGRU) be , where is the concatenation result of the forward output and the backward output of the bidirectional gated recurrent unit (BiGRU) at the t-th time step; First, calculate the attention weights for each time step: , , where represents the scoring function added to the attention model, and are the learning parameters, is a weight variable, and T represents matrix transpose. Attention weights representing time step t; Calculate the weighted output c: ; Use this result c as the input quantity for the subsequent network for further operations.
[0042] Step 3-2: Use the output quantity c of Step 3-1 as the input and input it into the Physics-Informed Neural Network (PINN) for optimization.
[0043] Step 3-3: Use the output result of Step 3-2 as the input and input it into the Knowledge-Augmented Network (KAN) for further optimization to obtain a preliminary prediction value.
[0044] Step 3-4: Calculate the error sequence from the preliminary prediction value, use the Bidirectional Gated Recurrent Unit (BiGRU) to predict the error sequence, and perform an arithmetic sum of the predicted error sequence and the preliminary prediction result to obtain the final prediction result.
[0045] Among them, one of the main innovations of the present invention is to construct a three-dimensional integrated BiGRU-Attention+PINN+KAN optimization algorithm. Using the traditional BiGRU bidirectional gated recurrent unit as the underlying network, the Physics-Informed Neural Network (PINN) and the Knowledge-Augmented Network (KAN) are input in sequence, so that the prediction result is further improved. The specific operations of each module are as follows: Physics-Informed Neural Network (PINN): The Physics-Informed Neural Network (PINN) is a machine learning model that combines deep learning and physics knowledge. Different from traditional data-driven neural networks, PINN uses physical laws to guide the model during the learning process, thereby improving the generalization ability of the model. The main implementation steps of Step 3-2 are as follows: Step 3-2-1: Construct a neural network framework; Construct a neural network containing physical information , where are the parameters of the network, is the predicted physical quantity, and are the spatial variable and the time variable respectively; the neural network can receive the weighted output c from Step 3-1 and incorporate geographical location factors and cloud cover, temperature, and meteorological data; Step 3-2-2: Integrate physical laws; Incorporate the law of conservation of energy, the radiative transfer equation, and the atmospheric radiation model, and express them in the form of partial differential equations. Among them, the law of conservation of energy is expressed as: ; Among them represents the rate of change of energy density, is the divergence of the energy flux, indicating the net amount of energy flux entering or leaving a volume element.
[0046] The radiative transfer equation describes the propagation of radiation in a medium, including absorption, emission, and scattering processes, and is expressed as: ; Among them, represents the radiation intensity, represents the starting angle, is the radiation angle, s is the distance along the propagation direction, is the absorption coefficient, B is the blackbody radiation intensity, is the scattering phase function, indicating the scattered light intensity in the scattering angle direction, is the solid angle element; I is Irradiation; The atmospheric radiation model is used to describe the radiation transmission process in the atmosphere and is expressed as: , Among them, z represents the vertical height, represents the absorption coefficient, represents the scattering coefficient, represents the scattering phase function, represents the scattering angle, represents the scattering intensity, represents the atmospheric emission intensity at height z; Step 3-2-3, define the loss function; Let the partial differential equations regarding the radiative transfer equation and the atmospheric radiation model in Step 3-2-2 be expressed as: , Among them, L is an operator containing derivative operations.
[0047] Take the residuals of the partial differential equations in Step 3-2-2 as part of the loss function, and define the data loss, physical damage, and regularization terms respectively; the loss function L is a weighted combination of the data loss and the residuals loss of the partial differential equation (Partial Differential Equation, abbreviated as PDE).
[0048] Let the original GRU loss function be the mean square error ; PDE residuals loss is expressed as: , , Among them, is the weight coefficient that balances the data loss and the PDE residual loss. Due to the need for physical constraints, the value in this embodiment is 0.6.
[0049] Step 3-2-5: Train the network. Use the loss function with physical information to train the neural network, and optimize the data loss and the physical loss to obtain the optimized prediction result.
[0050] First, perform forward propagation to calculate the network output and the PDE residual ; Then, obtain the loss function through weighted combination ; Finally, perform backpropagation to calculate the gradient of the network parameters and update the network parameters according to the gradient descent method , and the expression is: , where represents the learning rate, represents the gradient of the network parameters , represents updating the network parameters using the right-hand side formula to obtain the preliminary predicted DNI sequence.
[0051] In Step 3-3, the Knowledge-Aware Network (KAN) is a knowledge-enhanced neural network architecture that optimizes the training results of the model by integrating prior knowledge. Its main implementation steps are as follows: Step 3-3-1: Extract knowledge. Extract relevant knowledge that affects the prediction of DNI time series data from existing empirical formulas or prior knowledge, such as weather conditions, seasonal variations, and daily solar radiation change patterns, and encode the relevant knowledge into an operable mathematical form, such as the form of prior probability distribution and the secondary main loss function.
[0052] Step 3-3-2: Knowledge embedding. Let the original GRU loss function be the mean squared error , and modify the loss function after fusing knowledge to: , Take the residual of the partial differential equation in Step 3-2-2 as part of the loss function, where is the loss term related to knowledge, is the weight coefficient that balances the data loss and the knowledge loss, is defined as: ; Among them, is the output of the model being trained at the i-th sample point, is the output of the prior knowledge model in the GRU network at time i; The prediction result is: , Among them, is the output of the GRU network, is the weight for adjusting the influence of knowledge. Thus, a further prediction result is obtained.
[0053] In terms of parameter settings, the present invention divides a total of 16,000 sets of valid experimental data into a training set and a test set, and the division ratio is 80% for training and 20% for testing. The input features of the present invention are based on a 5-minute time step, and the direct normal irradiance (DNI) and meteorological data within the previous 2 hours are used to predict the DNI value for the next 5 minutes. During the model training process, the Adam optimization algorithm is used to update the network weights. The hyperparameters of the model are optimized through a grid search method, and finally it is determined that the network structure includes a hidden layer, which contains 50 neurons. From the change of the loss function and the learning rate, it can be seen that both the training and validation losses show a downward trend and finally tend to be stable, and the two curves almost completely coincide. This indicates that under the current parameter configuration, the model shows good performance after 50 iterations. Therefore, all data (including the test set) is used for model training, and the training is terminated after 50 iterations to obtain the final training model with 50 training rounds. The adjusted model parameter settings are as Figure 7 shown.
[0054] As Figure 8 , Figure 9 , Figure 10 shown, they are respectively the three-dimensional model prediction diagrams of typical sunny days, cloudy days, and complex weather days of the present invention, as well as the prediction diagrams after error correction, and the comparison with the true DNI values. It can be seen from the figure that when only using the three-dimensional model prediction, there is a certain systematic error, but after error correction, this problem can be better reduced and the prediction accuracy is improved. Figure 11 is the parameter evaluation after model training,
[0055] The present invention provides a method for predicting the DNI of solar thermal based on multi-dimensional forecast deviation correction. There are many methods and ways to specifically implement this technical solution. The above is only the preferred implementation manner of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Each component not clearly defined in this embodiment can be implemented by existing technologies.
Claims
1. A method for predicting DNI of solar thermal based on multi-dimensional forecast deviation correction, characterized in that, It includes the following steps: Step 1, perform cleaning and preprocessing operations on DNI time series data through an adaptive threshold method; Step 2, expand the dimensions of meteorological factors, perform K-means clustering on DNI time series data, and identify typical days under different weather types; Step 3, based on a three-dimensional fusion of a bidirectional gated recurrent unit with an attention mechanism BiGRU-Attention, a physics-informed neural network PINN, a Kolmogorov-Arnold network KAN optimization algorithm, and error correction for short-term solar direct normal irradiance prediction of a solar thermal power plant.
2. The method according to claim 1, characterized in that, Step 1 includes: Step 1-1, collect historical DNI time series data and corresponding meteorological data, including temperature, pressure, and cloud cover; Step 1-2: Preprocess the historical DNI time series data, calculate the standard score Z-Score, set a threshold according to the distribution of the historical standard score Z-Score, and perform threshold verification and adjustment through iteration. Delete the data higher than the threshold, and record the preprocessed DNI time series data as ; Step 1-3, input the DNI time series data into the variational mode decomposition (VMD) algorithm for mode decomposition to obtain the DNI decomposed signal , where represents the sth sub-signal, and s represents the total number of sub-signals; Steps 1-4, decompose the DNI signal and separately input it into the adaptive adjustment model for sub-signal feature extraction.
3. The method according to claim 2, wherein In Step 1-4, the adaptive adjustment model performs the following steps: Step 1-4-1, Extract extreme values: For each sub-signal imf, calculate and extract the maximum value , the minimum value and all extreme points. All extreme points form a set , represents the nth extracted extreme point, where n represents the total number of extreme points; Step 1-4-2, calculate the coefficient of variation; Calculate the coefficient of variation based on the mutation events of DNI : , Among them, represents the mutation value of DNI, which is the average value of the historical DNI time series data; Step 1-4-3, calculate the dynamic window width : , Among them represents an adaptive coefficient; Step 1-4-4, screen extreme points; For each extreme point, calculate the Euclidean distance between the extreme point and the nearest neighbor extreme point. If the Euclidean distance is greater than the dynamic window width , satisfying , then retain the extreme point and count it as a valid extreme point , where represents the k-th extreme point and the (k + 1)-th extreme point 's Euclidean distance; otherwise, discard the extreme point; finally, retain all extreme points that meet the conditions to obtain the set of valid extreme points , represents the f-th valid extreme point; Step 1-4-5, feature enhancement, including the following steps: Step 1-4-5-1, respectively use the moving weighted average method and the Holt linear trend method to calculate the moving average or exponential smoothing of DNI time series data: The formula for the moving weighted average method is: , The formula for the Holt linear trend method is: , wherein represents the moving weighted average at time t, which is used to predict future values, represents the weight, which is used to assign different weights to the observed values at different time points, represents the observed value of DNI at time i, which is used to calculate the weighted average, represents the smoothing level value at time t, represents the level smoothing coefficient, is the smoothing level value at time t-1, is the smoothing trend value at time t-1; represents the observed value of DNI at time t; Step 1-4-5-2, use Fourier transform to extract seasonal components and add meteorological data as auxiliary features; Use the discrete Fourier transform DFT; , Among them, is the Fourier coefficient of the k-th frequency component, is the n-th data point of the time series, N is the length of the time series, and k is the frequency index, ranging from 0 to N - 1; From the results of the Fourier transform, select the low-frequency components representing seasonal changes, and convert the selected seasonal components back to the time domain using the inverse Fourier transform IFFT; ; Step 1-4-6, handle outliers: use the interquartile range IQR and Z-score methods to detect and remove outliers; , , Among them, and represent outliers, represents the average DNI, represents the standard deviation of DNI; represents the median of the DNI value, represents the interquartile range of the DNI value; Step 1-4-7, multi-scale analysis: use the wavelet transform method to perform multi-scale decomposition on the DNI signal; , Among them represents the wavelet transform coefficient, which refers to the characteristics of the signal at scale a and position b. is the complex conjugate of the wavelet function. a is the scale parameter that controls the dilation of the wavelet function, and b is the translation parameter. represents the function of t for the change in DNI; d is the integral symbol.
4. The method according to claim 3, characterized in that, Step 2 includes: Step 2-1, expand the dimensions of meteorological factors and perform weighted analysis, and construct a feature matrix in combination with derived features, including the following steps: Step 2-1-1, collect meteorological data including cloud cover, pressure, temperature, humidity, and wind speed; Step 2-1-2, perform data preprocessing, use interpolation and mean filling to handle missing values, and convert data with different dimensions to the same scale, and perform normalization using Min-Max; , Among them, represents the normalized value, represents the data at the m-th row and n-th column in the original data; Step 2-1-3, calculate the derivative features, and use the difference method to calculate the change rates of cloud amount, air pressure, temperature, humidity, and wind speed respectively , where represents the change value, represents the value corresponding to the later time point, and divide by the time interval to obtain the change rate of meteorological data; Step 2-1-4, obtain the influence coefficients of each meteorological data on solar thermal DNI through Pearson correlation analysis and perform weighted analysis; , where r represents the correlation coefficient, represents the value of different meteorological data at time i, represents the average value of the entire set of data, represents the DNI data at time i, represents the average value of the DNI data of the entire set of data; Step 2-1-5, arrange the processed features in columns to form matrix X; , wherein refers to the original values of different meteorological factors within the step length, refers to the change rate of meteorological data, refers to the correlation coefficient of light and heat DNI in the Pearson analysis of meteorological data, specifically expressed as: , Among them, respectively refer to the data of wind speed, air pressure, temperature, cloud cover, and humidity at time i; , Among them , , , , respectively refer to the numerical values of the change rate of wind speed, the change rate of air pressure, the change rate of temperature, the change rate of cloud cover, and the change rate of humidity at the i-th time point; , Among them , , , , respectively refer to the correlation coefficients of wind speed and DNI, air pressure and DNI, temperature and DNI, cloud cover and DNI, and humidity and DNI; Step 2-2, use matrix X as the input, perform K-means clustering, and identify typical days under different weather types, including the following steps: Step 2-2-1, perform K-means clustering: The goal of using the K-means algorithm is to minimize the following objective function: , Among them, K represents the number of clusters, is the value of the within-cluster sum of squares, is the th cluster, is the cluster center of the th cluster, is the square of the Euclidean distance between the th data point and the cluster center; K-means clustering includes the following steps: Step 2-2-1-1, initialization: Randomly select Q data points as the initial cluster centers; ; wherein represents the initial clustering center of the th cluster, represents the first data point in the th cluster; Step 2-2-1-2, assignment: For each data point, calculate the distance between the data point and each cluster center, and assign the data point to the cluster represented by the nearest cluster center; ; Among them, represents the Euclidean distance between the j-th data point and the cluster center of the i-th cluster; represents the Euclidean distance between the j-th data point and the cluster center of the q-th cluster ; Step 2-2-1-3: Recalculate the clustering center of each cluster. Step 2-2-1-4: Iteration: Repeat Step 2-2-1-2 to Step 2-2-1-3 until the condition is satisfied. Step 2-2-1-5: Analyze the data points in each cluster, determine the weather type represented by each cluster, and in each cluster, select the data point closest to the cluster center as the typical day.
5. The method according to claim 4, characterized in that In Step 2-2-1-3, the following formula is used to recalculate the clustering center of each cluster: 。 6. The method according to claim 5, wherein Step 3 includes: Step 3-1: Use the gated recurrent unit GRU as the underlying core network and optimize it to a bidirectional gated recurrent unit with attention mechanism BiGRU-Attention. and are the update gate and the reset gate respectively; is the hidden state at time t; is the hidden state at time t - 1; is the sigmoid activation function; is the input of the gated recurrent unit GRU at time t; is the hyperbolic tangent function, and the forward propagation expression is obtained from the structure diagram of the gated recurrent unit GRU: , , , , , Among them, is the weight parameter; is the output of the GRU network at time t; is the bias parameter; is the candidate hidden state; is the element-wise multiplication of matrices; is the output layer weight; The information transmission of the Bidirectional Gated Recurrent Unit (BiGRU) is divided into two directions: forward and backward. The output vector converted from the forward input data is combined with the output vector converted from the backward input data to obtain the final output vector. The hidden layer state of the BiGRU The expression is: , , , Among them, is the operation process of the GRU network; , respectively represent the weights and states of the forward hidden layer at time t; , respectively represent the weights and states of the backward hidden layer at time t; is the bias of the hidden layer state at time t; When introducing the attention mechanism, let the output of the bidirectional gated recurrent unit BiGRU be , where is the concatenation result of the forward output and backward output of the bidirectional gated recurrent unit BiGRU at the t-th time step; First, calculate the attention weight of each time step: , , wherein represents the score function of the attention model added and are learning parameters is a weight variable, T represents matrix transpose represents the attention weight at time step t Calculate the weighted output c: ; Step 3-2: Take the output c of Step 3-1 as the input and input it into the physics-informed neural network PINN for optimization. Step 3-3: Take the output result of Step 3-2 as the input and input it into the knowledge-augmented network KAN for further optimization to obtain the preliminary prediction value. Step 3-4: Obtain the error sequence from the preliminary prediction value, use the bidirectional gated recurrent unit BiGRU to predict the error sequence, and perform an arithmetic sum of the predicted error sequence and the preliminary prediction result to obtain the final prediction result.
7. The method according to claim 6, wherein Step 3-2 includes: Step 3-2-1, construct a neural network framework: construct a neural network containing physical information , where are the parameters of the network, is the predicted physical quantity, and are the spatial variable and the temporal variable respectively; the neural network can receive the weighted output c from Step 3-1, and incorporate geographical location factors and cloud cover, temperature, and meteorological data; Step 3-2-2: Integrate physical laws; Incorporate the law of conservation of energy, the radiative transfer equation, and the atmospheric radiation model, and express them in the form of partial differential equations. Among them, the law of conservation of energy is expressed as: , wherein represents the change rate of the energy density, is the divergence of the energy flux; The radiative transfer equation is expressed as: ; Among them, represents the radiation intensity, represents the starting angle, is the radiation angle, s is the distance along the propagation direction, is the absorption coefficient, B is the blackbody radiation intensity, is the scattering phase function, indicating the intensity of the scattered light in the direction of the scattering angle direction, is the solid angle element; I is Irradiation; The atmospheric radiation model is expressed as: , where z represents the vertical height, represents the absorption coefficient, represents the scattering coefficient, represents the scattering phase function, represents the scattering angle, represents the scattering intensity, represents the atmospheric emission intensity at height z; Step 3-2-3: Define the loss function; Let the partial differential equations regarding the radiative transfer equation and the atmospheric radiation model in Step 3-2-2 be expressed as: , where L is an operator containing derivative operations; Take the residuals of the partial differential equations in Step 3-2-2 as part of the loss function, and define the data loss, physical damage, and regularization term respectively; the loss function L is a weighted combination of the data loss and the residual loss of the partial differential equations. Let the original GRU loss function be the mean squared error , and the PDE residual loss is expressed as: , , Among them, is the weight coefficient; Step 3-2-5: Train the network: Train a neural network using a loss function with physical information, and optimize the data loss and physical loss to obtain an optimized prediction result. First, perform forward propagation to calculate the network output and the PDE residual ; Then, a loss function is obtained through weighted combination ; Finally, perform backpropagation to calculate the gradients of the network parameters and update the network parameters according to the gradient descent method. The expression is as follows: , Among them, represents the learning rate, represents the gradient of the network parameters , indicating that the right - hand side formula is used to update the network parameters, thereby obtaining the preliminary predicted DNI sequence.
8. The method according to claim 7, wherein Step 3-3 includes: Step 3-3-1: Extract knowledge: Extract the relevant knowledge affecting the prediction of DNI time series data and encode the relevant knowledge into an operable mathematical form. Step 3-3-2, Knowledge Embedding: Assume that the original GRU loss function is the mean squared error , and modify the loss function after integrating knowledge to be: , Among them, is the loss term related to knowledge, is the weight coefficient for balancing data loss and knowledge loss, is defined as: ; Among them, is the output of the model being trained at the i-th sample point, which is the output of the prior knowledge model in the GRU network at time i; Prediction result is as follows: , Among them, is the output of the GRU network, is the weight for adjusting the influence of knowledge.
9. An electronic device, characterized in that, It includes a processor and a memory. The memory stores program code. When the program code is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 8.
10. A storage medium, characterized in that, Stores a computer program or instruction. When the computer program or instruction runs on a computer, it executes the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Rail transit short-time passenger flow prediction method and system under station sealing condition
CN111832841A
Ultra-short-term photovoltaic power prediction method based on improved whale optimization algorithm
CN117318036A
Power prediction method fusing improved snow ablation optimization algorithm and CNN+KAN+LSTM + MSA hybrid model
CN119720116A
County-wide photovoltaic prediction method based on cluster division and data enhancement
WO2023201552A1
LSTM-SVR subway station temperature prediction method based on characteristic of multiple periods
WO2024077969A1
Cited By
DNI prediction method and device for photo-thermal power station
CN120562658A
Ultra-short-term DNI prediction method based on attention mechanism and reinforcement learning
CN122112605A
Ultra-short-term dni prediction method based on attention mechanism and reinforcement learning
CN122112605B