Multi-station space-time correlation photovoltaic output probability prediction method and system based on interpretable deep learning
Through a multi-field space-time correlation photovoltaic output probability prediction method based on interpretable deep learning, the photovoltaic output prediction model is solved by using K-mean clustering and non-parametric core density estimation, combined with the bidirectional gating cycle unit model and the neural population dynamic optimization algorithm. The problem of interpretability and computational efficiency improves the accuracy and reliability of predictions.
Patent Information
- Application Number
- CN202411702919.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2024-12-27
AI Technical Summary
The existing photovoltaic output prediction model lacks internal mechanism and predictive results, resulting in limited decision-making reliability, and traditional non-parametric core density estimation is high in calculation cost and insufficient accuracy and reliability during large-scale data processing.
Using a multi-site spatio-time correlation photovoltaic output probability prediction method based on interpretable deep learning, data preprocessing, K-mean clustering and non-parametric core density estimation are carried out by collecting photovoltaic site historical data, combining the bidirectional gating cycle unit model and Neural population dynamic optimization algorithm is used to construct a multi-site joint input matrix to perform photovoltaic output certainty and probability prediction.
It improves the accuracy and reliability of photovoltaic output prediction, reduces the impact of noise, provides more accurate probability prediction results, and provides reliable data support for power scheduling and photovoltaic power generation planning.
Smart Images

Figure CN119209530A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent prediction of photovoltaic power generation, and in particular to a method and system for predicting the probability of photovoltaic output with spatiotemporal correlation of multiple sites based on explainable deep learning. Background Art
[0002] Photovoltaic energy has the characteristics of randomness and volatility. When a high proportion of photovoltaic power is connected to the grid, the safe and stable operation of the power system faces new challenges. Therefore, improving the timeliness and accuracy of photovoltaic output forecasting and providing rich decision-making information have become key issues that need to be solved in the field of photovoltaic power generation.
[0003] Artificial intelligence technologies (such as deep learning and machine learning) have shown significant application potential in the field of photovoltaic output forecasting. By effectively integrating multiple input information, artificial intelligence technologies can significantly improve forecasting accuracy. Common artificial intelligence models include artificial neural networks (ANN), graph convolutional neural networks (GCN), gated recurrent units (GRU), and bidirectional gated recurrent units (BiGRU). By training a large amount of historical data, the model can automatically identify the key features that affect photovoltaic power generation and achieve efficient photovoltaic output forecasting.
[0004] However, the current model lacks interpretability in terms of internal mechanisms and prediction results, which limits the reliability of decisions based on artificial intelligence models. In the same region, the photovoltaic outputs of adjacent photovoltaic power stations under similar weather conditions are often strongly correlated. Therefore, considering the spatiotemporal correlation of photovoltaic stations can help improve the accuracy of photovoltaic output prediction. To this end, the use of interpretable artificial intelligence models to extract the spatiotemporal information of stations for photovoltaic output prediction has become a hot topic in current research.
[0005] In addition, the probability prediction method is implemented through probability distribution prediction and Bayesian theory, which is mainly divided into parametric prediction method and non-parametric prediction method. The parametric prediction method first assumes that the prediction target conforms to a certain distribution, and then fits the parameters of the distribution model according to historical data to obtain a specific distribution function. The non-parametric prediction method does not assume any prior distribution, and commonly used methods include kernel density estimation, quantile regression and Bayesian theory. Considering that photovoltaic power generation is significantly affected by weather conditions, the use of probability prediction can effectively quantify uncertainty, thereby helping decision makers better understand and respond to possible power generation fluctuations and provide richer information for decision-making. However, the traditional non-parametric kernel density estimation has a high computational cost when processing large-scale data sets, and the accuracy and reliability of its probability prediction results are often insufficient on data sets involving different modes. Summary of the invention
[0006] Purpose of the invention: To propose a probability prediction method for photovoltaic output of multiple stations with spatiotemporal correlation based on interpretable deep learning, and further propose a system for implementing the above method, which uses a photovoltaic output prediction model to complete the deterministic prediction of photovoltaic output within a predetermined period in the future, and uses a probability prediction method to quantify the uncertainty of photovoltaic output. Based on data classification, kernel density estimation modeling is performed separately for each type, which can reduce the impact of noise, enhance the robustness of the model, and provide more accurate probability prediction, thereby effectively solving the above problems existing in the prior art.
[0007] First, a method for predicting the probability of photovoltaic output with spatiotemporal correlation of multiple stations based on interpretable deep learning is proposed. The method includes the following steps:
[0008] Collect the historical data of photovoltaic output of each photovoltaic station in the target area, splice the photovoltaic output attribute value representation from the historical data of photovoltaic output, and construct a two-dimensional matrix of photovoltaic station group output;
[0009] The photovoltaic power station group output two-dimensional matrix is used as a data preprocessing object, and missing value interpolation and outlier removal operations are performed on it;
[0010] The column vectors in the photovoltaic power plant group output two-dimensional matrix after data preprocessing are used as correlation test objects, and the column vectors whose correlation values meet the predetermined threshold conditions are selected to form the photovoltaic power plant group output two-dimensional matrix after the test;
[0011] The two-dimensional matrix of photovoltaic power station group output after inspection is input into K-means clustering for automatic classification, and the probability distribution function corresponding to each type of photovoltaic output historical data after classification is fitted using non-parametric kernel density estimation method;
[0012] The two-dimensional matrix of the output of the photovoltaic station group after inspection is divided into a training set and a test set according to a predetermined ratio, and the input data and output data containing the spatiotemporal correlation information of the photovoltaic stations are sorted out to construct a multi-site joint input matrix;
[0013] A bidirectional gated recurrent unit is selected as the initial photovoltaic output prediction model; the multi-site joint input matrix and output data are sent to the bidirectional gated recurrent unit for training, and a neural population dynamic optimization algorithm is used to optimize the learning rate and hidden layer neuron number hyperparameters of the initial photovoltaic output prediction model to obtain the optimal photovoltaic output prediction model of the training set, and the model is applied to the test set;
[0014] Using the optimal photovoltaic output prediction model to complete a deterministic prediction of photovoltaic output within a future predetermined period, output a deterministic prediction result, and evaluate the deterministic prediction result;
[0015] The K-means clustering method is used to automatically classify the deterministic prediction results, and the probability prediction results are calculated in combination with the probability distribution function corresponding to the above-mentioned photovoltaic output historical data, and the probability prediction results are evaluated.
[0016] In a further embodiment of the first aspect, the column vectors in the two-dimensional matrix of the photovoltaic power generation group after data preprocessing are used as correlation test objects, and the column vectors whose correlation values meet the predetermined threshold conditions are selected, and the calculation formula is as follows:
[0017]
[0018]
[0019] Where, ρ is the Spearman rank correlation coefficient between column vectors in the two-dimensional matrix of the photovoltaic power station group output; count is the number of elements in each column vector; , Respectively represent the rank of the j-th value in column vector m and column vector o; is the difference in rank between the corresponding values of the column vector.
[0020] In a further embodiment of the first aspect, the output two-dimensional matrix of the photovoltaic power plant group after inspection is input into K-means clustering for automatic classification, specifically including:
[0021] According to the meteorological data of the photovoltaic stations in the target area, the photovoltaic output level is divided into three levels: high output level in clear weather, medium output level in cloudy weather, and low output level in rainy weather; the corresponding cluster number K is set to 3;
[0022] Three initial cluster centers are randomly selected, the distance between each PV output data point and the initial cluster center is calculated, and it is assigned to the nearest center. The corresponding mathematical expression is as follows:
[0023]
[0024]
[0025] In the formula, Represents photovoltaic output data point To cluster center distance, k=1,2,3; Assign clusters to each PV output data point;
[0026] Recalculate the center point of each cluster, repeat the allocation and update steps until the cluster center no longer changes or the maximum number of iterations is reached, and output the center of each cluster and the cluster allocation of data points at this time; the cluster center update expression is as follows:
[0027]
[0028] In the formula, is the updated k-th photovoltaic output data cluster center; represents the kth photovoltaic output data cluster divided; Representation Cluster The number of PV output data points in .
[0029] In a further embodiment of the first aspect, a nonparametric kernel density estimation method is used to fit the probability distribution function corresponding to each type of photovoltaic output historical data after classification, specifically including:
[0030] Apply a Gaussian kernel function to each PV output data point , describing the weight of each data point in the probability density estimate:
[0031]
[0032] In the formula, P represents the photovoltaic output variable;
[0033] Calculate the contribution of each PV output data point to the entire data range :
[0034]
[0035] In the formula, h represents the bandwidth parameter, which determines the smoothness of the kernel function; represents the ith photovoltaic output data point;
[0036] Accumulate the contribution of all kernel functions to obtain the probability density function of photovoltaic output data :
[0037]
[0038] In the formula, n represents the sample size.
[0039] In a further embodiment of the first aspect, the multi-site joint input matrix is constructed according to the number of photovoltaic stations M and the prediction step step, the prediction time is time t, the prediction step is step, and the number of historical data time points k is used. At this time, the multi-site joint input matrix input is in the form of:
[0040] .
[0041] In a further embodiment of the first aspect, evaluating the deterministic prediction result specifically includes:
[0042] The quantitative indicators RMSE and MAE are used to measure the prediction error from different perspectives, and the deterministic prediction results of the optimal photovoltaic output prediction model are evaluated in combination with the comparative evaluation framework CNEI; among them:
[0043] The root mean square error RMSE is calculated as follows:
[0044]
[0045] The mean absolute error MAE is calculated as follows:
[0046]
[0047] The calculation formula of the comparative evaluation framework CNEI is as follows:
[0048]
[0049] In the formula, n is the sample size; represents the model prediction value, is the actual observed value; Indicates the RMSE index value of a photovoltaic station; Indicates the maximum value of RMSE index in the station group; Indicates the MAE index value of a photovoltaic station; Indicates the maximum value of MAE index in the station group; It represents the evaluation index value of the deterministic prediction result of a photovoltaic station. The smaller the value, the better the prediction effect of the photovoltaic output prediction model.
[0050] In a further embodiment of the first aspect, the probability prediction result is evaluated using the prediction interval average bandwidth PINAW, the prediction interval coverage PICP, the continuous hierarchical probability score CRPS, and the probability integral transform PIT:
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057] In the formula, n is the sample size; represents the model prediction value, is the actual observed value; , Respectively represent the upper and lower boundary values at the i-th predicted value; Represents a Boolean value. When the true value falls within the upper and lower bounds of the prediction interval at a predetermined confidence level, The value is 1, otherwise it is 0; represents the cumulative distribution function of the photovoltaic output variable; is the Heaviside function; is the probability density function of photovoltaic output data;
[0058] Under the predetermined coverage rate, the smaller the PINAW index value, the better the prediction performance of the photovoltaic output prediction model; under the predetermined prediction interval bandwidth, the larger the PICP index value, the higher the prediction accuracy of the photovoltaic output prediction model; the smaller the CRPS index value, the better the comprehensive prediction performance of the photovoltaic output prediction model; if the PIT index value of the probability prediction result obeys a uniform distribution between 0 and 1, the probability prediction result is reliable.
[0059] In a further embodiment of the first aspect, a neural population dynamic optimization algorithm is used to optimize the learning rate and hidden layer neuron number hyperparameters of the initial photovoltaic output prediction model, specifically including:
[0060] The optimal hyperparameters of the photovoltaic output prediction model are used as attractors, and the individuals in the population represent the hyperparameters of the photovoltaic output prediction model. The hyperparameter constraint condition set is used as the solution space, and the optimization is performed with the goal of minimizing the error between the model prediction value and the actual observation value.
[0061] The attractor trend, i.e. the trend towards the optimal model hyperparameters, is calculated using the following expression:
[0062]
[0063] In the formula, represents the attractor trend; b is the scaling factor of the optimal hyperparameter of the PV output prediction model; is a random number in the interval [0,1]; for The g-th attractor in , q is the number of random attractors; Indicates interference from external input; is a Gaussian noise vector with zero mean and covariance (U – L), where U is the peak value of the hyperparameter combination of all PV output prediction models, and L is the minimum boundary of the hyperparameter combination of all PV output prediction models.
[0064] According to a second aspect of the present invention, a multi-station spatiotemporal correlation photovoltaic output probability prediction system is proposed, which includes a data acquisition module, a first data processing module, a second data processing module, a third data processing module, a fourth data processing module, a model training module, a first result output module, and a second result output module.
[0065] The data acquisition module is used to collect the historical data of photovoltaic output of each photovoltaic station in the target area, splice the photovoltaic output attribute value representation from the historical data of photovoltaic output, and construct a two-dimensional matrix of the photovoltaic station group output;
[0066] The first data processing module is used to use the photovoltaic power plant group output two-dimensional matrix as a data preprocessing object, and perform missing value interpolation and outlier removal operations on it;
[0067] The second data processing module is used to use the column vectors in the photovoltaic power plant group output two-dimensional matrix after data preprocessing as the correlation test object, select the column vectors whose correlation values meet the predetermined threshold conditions, and form the photovoltaic power plant group output two-dimensional matrix after the test;
[0068] The third data processing module is used to input the two-dimensional matrix of photovoltaic station group output after inspection into K-means clustering for automatic classification, and use the non-parametric kernel density estimation method to fit the probability distribution function corresponding to each type of photovoltaic output historical data after classification;
[0069] The fourth data processing module is used to divide the two-dimensional matrix of the photovoltaic station group output after the inspection into a training set and a test set according to a predetermined ratio, and sort out the input data and output data containing the spatiotemporal correlation information of the photovoltaic stations, and construct a multi-site joint input matrix;
[0070] The model training module selects a bidirectional gated recurrent unit as the initial photovoltaic output prediction model, sends the multi-site joint input matrix and output data to the bidirectional gated recurrent unit for training, uses a neural population dynamic optimization algorithm to optimize the learning rate and hidden layer neuron number hyperparameters of the bidirectional gated recurrent unit, obtains the optimal photovoltaic output prediction model of the training set, and applies it to the test set;
[0071] The first result output module uses the optimal photovoltaic output prediction model to complete the deterministic prediction of photovoltaic output within a future predetermined period, outputs the deterministic prediction result, and evaluates the deterministic prediction result;
[0072] The second result output module automatically classifies the deterministic prediction results using the K-means clustering method, calculates the probability prediction results in combination with the probability distribution function corresponding to the above-mentioned photovoltaic output historical data, and evaluates the probability prediction results.
[0073] By utilizing the above-mentioned multi-station spatiotemporal correlation photovoltaic output probability prediction system, the multi-station spatiotemporal correlation photovoltaic output probability prediction method based on interpretable deep learning as disclosed in the first aspect and its further embodiments can be automatically executed.
[0074] According to a third aspect of the present invention, a computer-readable storage medium is provided, which stores at least one executable instruction. When the executable instruction is executed on an electronic device, the electronic device executes the multi-station spatiotemporal correlation photovoltaic output probability prediction method based on interpretable deep learning as disclosed in the first aspect and its further embodiments.
[0075] Compared with the prior art, the present invention has the following beneficial effects:
[0076] (1) The present invention conducts interpretability analysis from the perspective of model input, verifies the spatiotemporal feature extraction capability of the bidirectional gated recurrent unit model, and increases the reliability of the model's deterministic prediction results.
[0077] (2) The probability prediction method of K-means clustering coupled with non-parametric kernel density estimation is used to obtain the probability distribution corresponding to each deterministic prediction result. The result is more reliable and accurate than the traditional path.
[0078] (3) The neural population dynamic optimization algorithm is used to optimize the hyperparameters of the photovoltaic output prediction model, which can accurately predict the photovoltaic output of multiple stations, thereby providing reliable data support for power dispatching and photovoltaic power generation planning.
[0079] (4) A comprehensive comparative evaluation framework is proposed to solve the mutual exclusion phenomenon of evaluation indicators in the deterministic prediction effect evaluation part of the PV output prediction model, comprehensively and objectively evaluate the performance of the prediction model, and provide guidance for the selection and optimization of the PV output prediction model.
[0080] In summary, the multi-station spatiotemporal correlation photovoltaic output probability prediction method proposed in the present invention is helpful to improve the accuracy and reliability of photovoltaic output prediction, and provide strong support for the safe and stable operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 Flow chart of the method for predicting photovoltaic output probability with spatiotemporal correlation of multiple stations in an embodiment.
[0082] Figure 2 1 is a structural diagram of a gated recurrent unit and a bidirectional gated recurrent unit model in the embodiments.
[0083] Figure 3 Schematic diagram of the spatial distribution of photovoltaic power stations in the embodiment.
[0084] Figure 4It is a heat map of the Spearman correlation coefficient of the photovoltaic station output sequence in the embodiment.
[0085] Figure 5 Bar chart of Shapley interpretability analysis of the deterministic forecast results for one station at one time step. DETAILED DESCRIPTION
[0086] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features known in the art are not described.
[0087] See also Figure 1 This embodiment discloses a method for predicting the probability of photovoltaic output with spatiotemporal correlation of multiple stations based on interpretable deep learning, and the steps are as follows:
[0088] Step 1: Collect the historical photovoltaic output data of each photovoltaic station in the target area, splice the photovoltaic output attribute value representation from the photovoltaic output historical data, and construct a two-dimensional matrix of the photovoltaic station group output.
[0089] Step 2: Take the PV plant cluster output two-dimensional matrix as the data preprocessing object, and perform missing value interpolation and outlier removal operations on it.
[0090] Step 3: After the data preprocessing, the column vectors in the 2D matrix of the photovoltaic power generation group are used as the correlation test object. The strong correlation between the column vectors means that there is a strong spatial correlation between the historical data sequences of the photovoltaic power generation of the corresponding stations. The column vectors whose correlation values meet the predetermined threshold conditions are selected to form the 2D matrix of the photovoltaic power generation group after the test.
[0091] This embodiment uses the Spearman correlation test. The Spearman test does not require the data to conform to a normal distribution or have a linear relationship. The correlation coefficient range is [-1, 1]. The absolute value of the correlation coefficient is used to determine the strength of the correlation between data sequences. 0.3, 0.6, and 0.9 are taken as the correlation thresholds at each level. The details are as follows:
[0092]
[0093]
[0094] Where, ρ is the Spearman rank correlation coefficient between column vectors in the two-dimensional matrix of the photovoltaic power station group output; count is the number of elements in each column vector; , Respectively represent the rank of the j-th value in column vector m and column vector o; is the difference in rank between the corresponding values of the column vector.
[0095] by Figure 3 Take the photovoltaic power station group shown in the figure as an example. Figure 3 The white circle in the middle is the station location, and the rest is a graphical display of the dem digital elevation. The color transition from white to black represents the elevation from low to high, that is, the higher the gray value, the higher the current altitude. The regional photovoltaic station output matrix is constructed to perform Spearman correlation calculations. The corresponding results are as follows Figure 4 The Spearman correlation coefficient between column vectors is above 0.92, indicating that there is a strong spatial correlation between photovoltaic stations in this region.
[0096] Step 4: Based on the two-dimensional matrix of the output of the photovoltaic power plant group after inspection, the K-means clustering method is used for automatic classification, and the probability distribution function corresponding to the historical data of various photovoltaic outputs after classification is fitted using the non-parametric kernel density estimation method.
[0097] During the implementation of K-means clustering, the number of clusters K is first set to 3, that is, according to the characteristics and changing rules of photovoltaic output data, photovoltaic output is divided into 3 different types, which correspond to the output mode in clear weather, with high and stable output levels; in cloudy or slightly overcast conditions, the output level is medium and the fluctuation is relatively large; in extreme weather conditions, such as rainy days or heavily overcast days, the output level is low. K initial cluster centers are randomly selected, the distance between each photovoltaic output data point and the cluster center is calculated, and it is assigned to the nearest center. Then, the center point of each cluster is recalculated, and the allocation and update steps are repeated until the cluster center no longer changes or the maximum number of iterations is reached. Finally, the center of each cluster and the cluster assignment of the data point are output. The corresponding mathematical expression is as follows:
[0098]
[0099]
[0100]
[0101] In the formula, Represents photovoltaic output data point To cluster center distance, k=1,2,3; Assign clusters to each PV output data point; is the kth photovoltaic output data cluster divided, Cluster The number of PV output data points in .
[0102] In the implementation process of non-parametric kernel density estimation, the Gaussian kernel function is first selected for calculation, and the kernel function is applied to each photovoltaic output data point to describe the weight of each data point in the probability density estimation, and its contribution in the entire data range is calculated. The contribution of all kernel functions is accumulated to obtain the estimation of the probability density function of photovoltaic output data. Finally, the estimation result is optimized by adjusting the bandwidth parameter to balance the deviation and variance, so as to obtain a more accurate density estimate. The specific process is as follows:
[0103]
[0104]
[0105]
[0106] In the formula, P represents the photovoltaic output variable; is the contribution of each PV output data point in the entire data range; h represents the bandwidth parameter, which determines the smoothness of the kernel function; Represents the i-th photovoltaic output data point; accumulate the contributions of all kernel functions to obtain the probability density function of photovoltaic output data .
[0107] Step 5: Divide the tested PV plant cluster output two-dimensional matrix into training set and test set according to a predetermined ratio, sort out the input data and output data containing the spatiotemporal correlation information of the PV plants, and construct a multi-site joint input matrix.
[0108] The multi-site joint input matrix is constructed based on the number of photovoltaic stations M and the prediction step step. The prediction time is time t, the prediction step is step, and the number of historical data moments is k. At this time, the multi-site joint input matrix input is in the following form:
[0109]
[0110] In this embodiment, firstly, the two-dimensional matrix of regional photovoltaic station output is divided into training set and test set according to the ratio of 8:2, and the past 7 historical output data of 10 photovoltaic stations are selected to predict the photovoltaic output data of the next moment. Then, the corresponding photovoltaic station joint input matrix is:
[0111]
[0112] Step 6: Select the bidirectional gated recurrent unit as the initial photovoltaic output prediction model. The bidirectional gated recurrent unit is an improved recurrent neural network (RNN) architecture that combines the advantages of the gated recurrent unit (GRU) and increases the ability to process sequence data. The working principle of the bidirectional gated recurrent unit is to process sequence data through two independent GRU networks. Each time point outputs the information before and after the current point in the sequence, which can better capture contextual information.
[0113] Update Gate:
[0114]
[0115] Reset the gate:
[0116]
[0117] Candidate hidden states:
[0118]
[0119] Hide status updates:
[0120]
[0121] Bidirectional output merging:
[0122]
[0123] In the formula, represents the hidden state at time t, represents the candidate hidden state at time t, W, , are their respective weight parameters, is the input, Represents the Sigmoid function, t and t-1 are the current moment and the previous moment.
[0124] The multi-site joint input matrix and output data are sent to the bidirectional gated recurrent unit for training. The learning rate and hidden layer neuron number hyperparameters of the initial photovoltaic output prediction model are optimized using the neural population dynamic optimization algorithm to obtain the optimal photovoltaic output prediction model of the training set, which is then applied to the test set.
[0125] During the implementation of the neural population dynamic optimization algorithm, the attractor trend strategy and coupled interference strategy are used to simulate the neural population dynamics. The attractor trend strategy drives the neural population towards the optimal decision; the coupled interference strategy deviates from the attractor by coupling with other neural populations; the information projection strategy realizes the transition from the attractor trend strategy to the coupled interference strategy. The coupled interference strategy assumes that the interaction between neural populations occurs through additive or diffusion coupling, and the information projection strategy uses a matrix containing adjacency and communication strength to represent the communication subspace of information projection between neural populations. The optimal hyperparameters of the photovoltaic output prediction model are used as attractors, and the population individuals represent the hyperparameters of the prediction model. The set of hyperparameter constraints is used as the solution space, and the optimization is performed with the goal of minimizing the error between the predicted photovoltaic output value and the actual value. The details are as follows:
[0126] Pop={X1, X2, …,X num} represents the neuron population, which is a combination of several hyperparameters of the photovoltaic output prediction model, and num represents the number of individuals in the population. S ) represents the individuals in the population, and s represents the number of hyperparameters.
[0127] (1) Random initialization:
[0128]
[0129] In the formula, Corresponding to each PV output prediction model hyperparameter, , They represent the upper and lower bounds of the hyperparameter range respectively. According to the characteristics of photovoltaic output data, the learning rate and hidden layer neuron optimization interval distribution are specified as [0.001, 0.01] and [50, 200].
[0130] (2) Attractor trend strategy:
[0131]
[0132] In the formula, represents the attractor trend, b is the scaling factor of the optimal hyperparameter of the photovoltaic output prediction model, is a random number in the interval [0,1], for The g-th attractor in represents the interference from external input, is a Gaussian noise vector with zero mean and covariance (U – L), where U is the peak value of all neural states (i.e., the hyperparameter combination of the PV output prediction model), and L is the minimum boundary of all neural states. Based on this, the attractor trend can be calculated, that is, the trend close to the optimal model hyperparameters.
[0133] The attractor trend strategy first sorts all neural states, the top neural states are regarded as attractors and are not affected by the attractor, then randomly assigns an attractor to the other neural states, and finally calculates the attractor trend.
[0134] (3) Coupling interference strategy:
[0135]
[0136]
[0137]
[0138] a2 and a3 represent random numbers in [0, 0.5]; is the average of the sum of the neural states of other neural populations and is the input of the neural population in additive coupling; is the sum of the differences between the neural state and the neural states of other neural groups, and is the input of the neural group in diffusion coupling; scale represents the proportional factor of the coupling interference, It means that a neural population is affected by another neural population through two types of coupling, and the perturbation of the other neural population causes the neural population to deviate from the effect of the attractor.
[0139] (4) Information projection strategy
[0140] The information exchange and interaction between neural groups occurs through the communication subspace. The algorithm uses a matrix representing adjacency and communication strength to present the communication subspace of information projection between neural groups. In the attractor trend, the information transmission between the attractor and another neural state of the neural group is through a 1×s adjacency matrix A attract,i and a 1×s communication intensity matrix B attract,i The formula used is as follows:
[0141]
[0142]
[0143] The values in are binary random values, is a random value in the range [0, 1], is a random value in the range [0, 1], FE is the number of function evaluations, is the maximum number of evaluations.
[0144] Ultimately, the neural state of each neural population is affected by attractors and the neural states of other neural populations. Updated as follows:
[0145]
[0146] Step 7: Use the optimal photovoltaic output prediction model to complete the deterministic prediction of photovoltaic output within the future scheduled period, output the deterministic prediction results, and use the quantitative indicators RMSE, MAE, R 2 And the comprehensive comparative evaluation framework CNEI (Comprehensive Normalized Error Indicator) is proposed to evaluate the deterministic prediction results.
[0147] The root mean square error RMSE is calculated as follows:
[0148]
[0149] The mean absolute error MAE is calculated as follows:
[0150]
[0151] Coefficient of determination The calculation formula is as follows:
[0152]
[0153] In the formula, n is the sample size; represents the model prediction value, is the actual observed value.
[0154] Photovoltaic output is closely related to weather conditions and has the characteristics of randomness and volatility. RMSE and MAE measure prediction errors from different perspectives. RMSE is more sensitive to outliers, while MAE is more robust. There may be mutual exclusion of indicators with different comparison results. This paper proposes a comprehensive comparative evaluation framework to more comprehensively analyze and evaluate the prediction error of photovoltaic output. In the photovoltaic output prediction example, the specific CNEI used is as follows:
[0155]
[0156] Indicates the RMSE index value of a photovoltaic station; Indicates the maximum value of RMSE index in the station group; Indicates the MAE index value of a photovoltaic station; Indicates the maximum value of MAE index in the station group; It represents the evaluation index value of the deterministic prediction result of a photovoltaic station. The smaller the value, the better the prediction effect of the photovoltaic output prediction model.
[0157] The evaluation index values of the deterministic prediction results of the photovoltaic power station group are shown in Table 1 (taking single-step prediction as an example):
[0158] Table 1 Evaluation results of deterministic prediction effect of each station in single-step prediction
[0159] Station RMSE MAE <![CDATA[R 2 ]]> CNEI Station 1 0.1725 0.0722 0.9805 1.800 Station 2 0.1613 0.0788 0.9817 1.819 Station 3 0.1654 0.0704 0.9825 1.740 Station 4 0.1733 0.0737 0.9796 1.822 Station 5 0.1814 0.0738 0.9791 1.867 Station 6 0.1859 0.0828 0.9762 2.000 Station 7 0.1619 0.0704 0.9832 1.721 Station 8 0.1705 0.0701 0.9806 1.764 Station 9 0.1633 0.0720 0.9831 1.748 Station 10 0.1728 0.0780 0.9820 1.872
[0160] Taking Station 2 and Station 3 as examples, in the RMSE index results, Station 2 has a smaller index value and better prediction effect, while the MAE index is better for Station 4. Therefore, it is impossible to determine the station that is more suitable for the PV output deterministic prediction model, that is, the index is mutually exclusive. The CNEI results show that the CNEI index value of Station 3 is better, so the PV output prediction model is more suitable for Station 3.
[0161] Step 8: Based on the K-means clustering and non-parametric kernel density estimation results of the overall data set, the deterministic prediction results output by the optimal PV output prediction model are automatically classified, and the probability prediction results are calculated by combining the probability distribution function corresponding to the historical PV output data. The quantitative indicators PINAW (prediction interval average bandwidth), PICP (prediction interval coverage), CRPS (continuous graded probability score), and PIT (probability integral transform) are used to evaluate the PV output probability prediction results in terms of probability prediction coverage, bandwidth, and reliability.
[0162]
[0163]
[0164]
[0165]
[0166]
[0167]
[0168] In the formula, n is the sample size; represents the model prediction value, is the actual observed value; , Respectively represent the upper and lower boundary values at the i-th predicted value; Represents a Boolean value. When the true value falls within the upper and lower bounds of the prediction interval at a predetermined confidence level, The value is 1, otherwise it is 0; represents the cumulative distribution function of the photovoltaic output variable; is the Heaviside function; is the probability density function of photovoltaic output data.
[0169] Among the evaluation indicators, under a certain coverage rate, the smaller the PINAW index value, the better the model prediction performance; under a certain prediction interval bandwidth, the larger the PICP index value, the higher the model prediction accuracy; the smaller the CRPS index value, the better the comprehensive performance of probability prediction; if the PIT index value of the probability prediction result obeys a uniform distribution between 0 and 1, the probability prediction result is reliable.
[0170] The evaluation index values of the probability prediction results of the photovoltaic power station group are shown in Table 2 (taking single-step prediction as an example):
[0171] Table 2 Evaluation index of probability prediction results of each station in single-step prediction
[0172] Station CRPS PICP PINAW Station 1 0.1569 0.9952 0.3589 Station 2 0.1535 0.9973 0.3762 Station 3 0.1513 0.9954 0.3625 Station 4 0.1739 0.9971 0.4265 Station 5 0.1888 0.9979 0.4737 Station 6 0.1504 0.9915 0.3515 Station 7 0.1579 0.9963 0.3841 Station 8 0.1650 0.9967 0.3988 Station 9 0.1617 0.9969 0.3923 Station 10 0.1596 0.9967 0.3718
[0173] Step 9: Use Shapley and interpretation analysis methods to explain the model prediction mechanism from the perspective of model input, as well as the impact of site spatiotemporal information on prediction results, to increase the reliability of prediction results.
[0174] The Shapley sum interpretation analysis method calculates the contribution of each feature to the model prediction results by assigning feature importance values, and assigns a SHAP value to each feature. The calculation of the SHAP value takes into account all possible combinations and orders of the features. The SHAP value represents the contribution of the feature in a specific prediction, thus providing an accurate measure of the feature contribution. The Shapley sum interpretation analysis method is used to analyze the influence of each photovoltaic site on the time and space scales of the prediction object in the deterministic prediction process of the photovoltaic output prediction model.
[0175] As attached Figure 5 As shown in the figure, taking the Shapley interpretability analysis bar chart of the deterministic prediction results of station 1 under 1 step length as an example, the historical 4 moments of station 9 and the historical 7 moments of station 8 have a significant impact on its prediction effect. That is, the model uses the connection between spatial stations on the time scale to make predictions during the prediction process. The historical output data of spatially adjacent stations have a greater impact on the prediction effect of the predicted station. In the prediction process, making full use of the spatiotemporal correlation contained in the joint input matrix is helpful to improve the prediction accuracy.
[0176] The present embodiment also discloses a multi-station spatiotemporal correlation photovoltaic output probability prediction system, which consists of eight modules: a data acquisition module, a first data processing module, a second data processing module, a third data processing module, a fourth data processing module, a model training module, a first result output module, and a second result output module.
[0177] The data acquisition module is used to collect the photovoltaic output historical data of each photovoltaic station in the target area, splice the photovoltaic output attribute value representation from the photovoltaic output historical data, and construct the photovoltaic station group output two-dimensional matrix. The first data processing module is used to use the photovoltaic station group output two-dimensional matrix as the data preprocessing object, and perform missing value interpolation and outlier removal operations on it. The second data processing module is used to use the column vectors in the photovoltaic station group output two-dimensional matrix after the data preprocessing as the correlation test object, select the column vectors whose correlation values meet the predetermined threshold conditions, and form the photovoltaic station group output two-dimensional matrix after the test. The third data processing module is used to input the photovoltaic station group output two-dimensional matrix after the test into K-means clustering for automatic classification, and use the non-parametric kernel density estimation method to fit the probability distribution function corresponding to each type of photovoltaic output historical data after classification. The fourth data processing module is used to divide the photovoltaic station group output two-dimensional matrix after the test into training sets and test sets according to a predetermined ratio, and sort out the input data and output data containing the spatiotemporal correlation information of the photovoltaic station, and construct a multi-site joint input matrix. The model training module selects a bidirectional gated recurrent unit as the initial photovoltaic output prediction model, sends the multi-site joint input matrix and output data to the bidirectional gated recurrent unit for training, and uses the neural population dynamic optimization algorithm to optimize the learning rate and hidden layer neuron number hyperparameters of the bidirectional gated recurrent unit to obtain the optimal photovoltaic output prediction model for the training set and apply it to the test set. The first result output module uses the optimal photovoltaic output prediction model to complete the deterministic prediction of photovoltaic output within the future scheduled period, outputs the deterministic prediction results, and evaluates the deterministic prediction results. The second result output module uses the K-means clustering method to automatically classify the deterministic prediction results, calculates the probability prediction results based on the probability distribution function corresponding to the above-mentioned photovoltaic output historical data, and evaluates the probability prediction results.
[0178] The prediction system can automatically execute the multi-station spatiotemporal correlation photovoltaic output probability prediction method based on interpretable deep learning as disclosed in the above embodiment. The specific process is not described here.
[0179] The multi-station spatiotemporal correlation photovoltaic output probability prediction method based on interpretable deep learning disclosed in the above embodiment can be written into a set of executable instructions for its operation logic in the actual application process, and the executable instructions are written into the storage medium and run on the above electronic device. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or device.
[0180] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes may be made to it in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A method for predicting photovoltaic output probability of multiple stations with spatiotemporal correlation based on interpretable deep learning, characterized in that: The steps include: Collect the historical data of photovoltaic output of each photovoltaic station in the target area, splice the photovoltaic output attribute value representation from the historical data of photovoltaic output, and construct a two-dimensional matrix of photovoltaic station group output; The photovoltaic power station group output two-dimensional matrix is used as a data preprocessing object, and missing value interpolation and outlier removal operations are performed on it; The column vectors in the photovoltaic power plant group output two-dimensional matrix after data preprocessing are used as correlation test objects, and the column vectors whose correlation values meet the predetermined threshold conditions are selected to form the photovoltaic power plant group output two-dimensional matrix after the test; The two-dimensional matrix of photovoltaic power station group output after inspection is input into K-means clustering for automatic classification, and the probability distribution function corresponding to each type of photovoltaic output historical data after classification is fitted using non-parametric kernel density estimation method; The two-dimensional matrix of the output of the photovoltaic station group after inspection is divided into a training set and a test set according to a predetermined ratio, and the input data and output data containing the spatiotemporal correlation information of the photovoltaic stations are sorted out to construct a multi-site joint input matrix; A bidirectional gated recurrent unit is selected as the initial photovoltaic output prediction model; the multi-site joint input matrix and output data are sent to the bidirectional gated recurrent unit for training, and a neural population dynamic optimization algorithm is used to optimize the learning rate and hidden layer neuron number hyperparameters of the initial photovoltaic output prediction model to obtain the optimal photovoltaic output prediction model of the training set, and the model is applied to the test set; Using the optimal photovoltaic output prediction model to complete a deterministic prediction of photovoltaic output within a future predetermined period, output a deterministic prediction result, and evaluate the deterministic prediction result; The K-means clustering method is used to automatically classify the deterministic prediction results, and the probability prediction results are calculated in combination with the probability distribution function corresponding to the above-mentioned photovoltaic output historical data, and the probability prediction results are evaluated.
2. According to claim 1, a method for predicting photovoltaic output probability of multiple stations with spatiotemporal correlation based on interpretable deep learning is characterized in that: The column vectors in the two-dimensional matrix of the photovoltaic power generation group after data preprocessing are used as the correlation test object, and the column vectors whose correlation values meet the predetermined threshold conditions are selected. The calculation formula is as follows: Where, ρ is the Spearman rank correlation coefficient between column vectors in the two-dimensional matrix of the photovoltaic power station group output; count is the number of elements in each column vector; , Respectively represent the rank of the j-th value in column vector m and column vector o; is the difference in rank between the corresponding values of the column vector.
3. According to claim 1, a method for predicting photovoltaic output probability of multiple stations with spatiotemporal correlation based on interpretable deep learning is characterized in that: The output two-dimensional matrix of the photovoltaic power plant group after inspection is input into K-means clustering for automatic classification, specifically including: According to the meteorological data of the photovoltaic stations in the target area, the photovoltaic output level is divided into three levels: corresponding to the high output level in clear weather, the medium output level in cloudy weather, and the low output level in rainy weather; the corresponding cluster number K is set to 3; Three initial cluster centers are randomly selected, the distance between each PV output data point and the initial cluster center is calculated, and it is assigned to the nearest center. The corresponding mathematical expression is as follows: In the formula, Indicates photovoltaic output data point To cluster center distance, k=1,2,3; Assign clusters to each PV output data point; Recalculate the center point of each cluster, repeat the allocation and update steps until the cluster center no longer changes or the maximum number of iterations is reached, and output the center of each cluster and the cluster allocation of data points at this time; the cluster center update expression is as follows: In the formula, is the updated k-th photovoltaic output data cluster center; represents the kth photovoltaic output data cluster divided; Representation Cluster The number of PV output data points in .
4. According to claim 3, a method for predicting photovoltaic output probability of multiple stations with spatiotemporal correlation based on interpretable deep learning is characterized in that: The non-parametric kernel density estimation method is used to fit the probability distribution function corresponding to each type of photovoltaic output historical data after classification, specifically including: Apply a Gaussian kernel function to each PV output data point , describing the weight of each data point in the probability density estimate: In the formula, P represents the photovoltaic output variable; Calculate the contribution of each PV output data point to the entire data range : In the formula, h represents the bandwidth parameter, which determines the smoothness of the kernel function; represents the ith photovoltaic output data point; Accumulate the contribution of all kernel functions to obtain the probability density function of photovoltaic output data : In the formula, n represents the sample size.
5. According to claim 4, a method for predicting photovoltaic output probability of multiple stations with spatiotemporal correlation based on interpretable deep learning is characterized in that: The multi-site joint input matrix is constructed based on the number of photovoltaic stations M and the prediction step step. The prediction time is time t, the prediction step is step, and the number of historical data moments is k. At this time, the multi-site joint input matrix input is in the following form: 。 6. According to claim 4, a method for predicting photovoltaic output probability of multiple stations with spatiotemporal correlation based on interpretable deep learning is characterized in that: The deterministic prediction result is evaluated, specifically including: The quantitative indicators RMSE and MAE are used to measure the prediction error from different perspectives, and the deterministic prediction results of the optimal photovoltaic output prediction model are evaluated in combination with the comparative evaluation framework CNEI; among them: The root mean square error RMSE is calculated as follows: The mean absolute error MAE is calculated as follows: The calculation formula of the comparative evaluation framework CNEI is as follows: In the formula, n is the sample size; represents the model prediction value, is the actual observed value; Indicates the RMSE index value of a photovoltaic station; Indicates the maximum value of RMSE index in the station group; Indicates the MAE index value of a photovoltaic station; Indicates the maximum value of MAE index in the station group; It represents the evaluation index value of the deterministic prediction result of a photovoltaic station. The smaller the value, the better the prediction effect of the photovoltaic output prediction model.
7. The method for predicting photovoltaic output probability of multiple stations with spatiotemporal correlation based on interpretable deep learning according to claim 6 is characterized in that: The probability prediction results are evaluated using the prediction interval average bandwidth PINAW, prediction interval coverage PICP, continuous graded probability score CRPS, and probability integral transform PIT: In the formula, n is the sample size; represents the model prediction value, is the actual observed value; , Respectively represent the upper and lower boundary values at the i-th predicted value; Represents a Boolean value. When the true value falls within the upper and lower bounds of the prediction interval at a predetermined confidence level, The value is 1, otherwise it is 0; represents the cumulative distribution function of the photovoltaic output variable; is the Heaviside function; is the probability density function of photovoltaic output data; Under the predetermined coverage rate, the smaller the PINAW index value, the better the prediction performance of the photovoltaic output prediction model; under the predetermined prediction interval bandwidth, the larger the PICP index value, the higher the prediction accuracy of the photovoltaic output prediction model; the smaller the CRPS index value, the better the comprehensive prediction performance of the photovoltaic output prediction model; if the PIT index value of the probability prediction result obeys a uniform distribution between 0 and 1, the probability prediction result is reliable.
8. The method for predicting photovoltaic output probability of multiple stations with spatiotemporal correlation based on interpretable deep learning according to claim 7 is characterized in that: The neural population dynamic optimization algorithm is used to optimize the learning rate and hidden layer neuron number hyperparameters of the initial photovoltaic output prediction model, including: The optimal hyperparameters of the photovoltaic output prediction model are used as attractors, and the individuals in the population represent the hyperparameters of the photovoltaic output prediction model. The hyperparameter constraint condition set is used as the solution space, and the optimization is performed with the goal of minimizing the error between the model prediction value and the actual observation value. The attractor trend, i.e. the trend towards the optimal model hyperparameters, is calculated using the following expression: In the formula, represents the attractor trend; b is the scaling factor of the optimal hyperparameter of the PV output prediction model; is a random number in the interval [0,1]; for The g-th attractor in , q is the number of random attractors; Indicates interference from external input; is a Gaussian noise vector with zero mean and covariance (U – L), where U = (U1, U2, …, U s ) is the peak value of the hyperparameter combination of all PV output prediction models, L = (L1,L2, …, L s ) is the minimum boundary of the hyperparameter combination of all PV output prediction models.
9. A multi-station spatiotemporal correlation photovoltaic output probability prediction system, used to execute the multi-station spatiotemporal correlation photovoltaic output probability prediction method based on interpretable deep learning as described in any one of claims 1 to 8; characterized in that: The multi-station spatiotemporal correlation photovoltaic output probability prediction system includes: Data acquisition module; the data acquisition module is used to collect the photovoltaic output historical data of each photovoltaic station in the target area, splice the photovoltaic output attribute value representation from the photovoltaic output historical data, and construct a two-dimensional matrix of the photovoltaic station group output; The first data processing module is used to use the photovoltaic power station group output two-dimensional matrix as a data preprocessing object, and perform missing value interpolation and outlier removal operations on it; The second data processing module is used to use the column vectors in the photovoltaic power plant group output two-dimensional matrix after data preprocessing as the correlation test object, select the column vectors whose correlation values meet the predetermined threshold conditions, and form the photovoltaic power plant group output two-dimensional matrix after the test; The third data processing module is used to input the two-dimensional matrix of photovoltaic station group output after inspection into K-means clustering for automatic classification, and use the non-parametric kernel density estimation method to fit the probability distribution function corresponding to each type of photovoltaic output historical data after classification; The fourth data processing module is used to divide the output two-dimensional matrix of the photovoltaic station group after inspection into a training set and a test set according to a predetermined ratio, and sort out the input data and output data containing the spatiotemporal correlation information of the photovoltaic station, and construct a multi-site joint input matrix; Model training module; the model training module selects a bidirectional gated recurrent unit as the initial photovoltaic output prediction model, sends the multi-site joint input matrix and output data to the bidirectional gated recurrent unit for training, uses a neural population dynamic optimization algorithm to optimize the learning rate and hidden layer neuron number hyperparameters of the bidirectional gated recurrent unit, obtains the optimal photovoltaic output prediction model of the training set, and applies it to the test set; A first result output module; the first result output module uses the optimal photovoltaic output prediction model to complete the deterministic prediction of photovoltaic output within a future predetermined period, outputs the deterministic prediction result, and evaluates the deterministic prediction result; The second result output module: The second result output module uses the K-means clustering method to automatically classify the deterministic prediction results, calculates the probability prediction results based on the probability distribution function corresponding to the above-mentioned photovoltaic output historical data, and evaluates the probability prediction results.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction, and when the executable instruction is executed on the electronic device, the electronic device executes the multi-station spatiotemporal correlation photovoltaic output probability prediction method based on interpretable deep learning as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Photovoltaic power ultra-short-term probability prediction method based on wavelet decomposition and optimized deep belief network
CN114492964A
Photovoltaic power interval probability prediction method based on deep learning fusion model
CN115115125A
Method, device and system for evaluating power generation characteristics of distributed photovoltaic power station
CN115456440A
Photovoltaic power station active power optimal distribution method based on TCN and error function
CN116154875A
CNN-BiLSTM-SE-based wide-area photovoltaic station power ultra-short-term prediction method and device
CN118920453A
Cited By
Torque distribution method of distributed driving electric vehicle based on INPDOA
CN119556577A
Shared energy storage and power transmission line cooperative configuration method
CN120262481A
Photovoltaic output hybrid probability interval prediction method and system based on parallel deep learning architecture
CN120297774A
Collaborative management method for fishing and light complementation of photovoltaic station
CN120725371A
Ultra-short-term photovoltaic output prediction method based on bimodal weather typing
CN120833075A
