Photovoltaic power station cluster power prediction method based on space-time correlation
Through the spatiotemporal correlation analysis of the GAT-Transformer model, the problems of complex spatiotemporal relationships and spatial correlations in the power prediction of photovoltaic power plants are solved, high-precision and real-time power prediction are achieved, and the efficiency of energy management and grid scheduling is improved.
Patent Information
- Application Number
- CN202410996097.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-12
AI Technical Summary
The existing power prediction methods for photovoltaic power plants are difficult to fully capture the complex relationships in time and space, ignore spatial correlation, and lack generalization capabilities, so they cannot dynamically adapt to meteorological changes, resulting in insufficient prediction accuracy and real-time response capabilities, affecting power grid scheduling and energy management.
The spatial and temporal correlation analysis method based on the GAT-Transformer model is adopted, and the spatial and temporal characteristics of the photovoltaic power station cluster are extracted to dynamically predict the power output by constructing an adjacency matrix and multi-head attention mechanism, combining graph attention and position coding.
It improves the accuracy and real-time power prediction of photovoltaic power station clusters, enhances the generalization ability and adaptability of the model, can better reflect meteorological changes, and improves energy management and scheduling efficiency.
Smart Images

Figure CN118941112A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photovoltaic power station power prediction, and more specifically to a photovoltaic power station cluster power prediction method based on time-space correlation. Background Art
[0002] As the global demand for renewable energy grows, the construction and operation of photovoltaic power station clusters has become one of the important energy supply methods. However, the power generation of photovoltaic power stations is affected by many factors, including but not limited to light intensity, temperature, cloud cover, geographical location, etc. These factors show high variability at different time and space scales. Accurately predicting the power output of photovoltaic power station clusters is crucial for grid scheduling, energy management and maximizing economic benefits.
[0003] Traditional power forecasting methods often rely on statistical or simple physical models, such as time series analysis (such as ARIMA model), regression analysis, etc. These methods have limited capabilities in dealing with complex nonlinear relationships and high-dimensional data, and it is difficult to fully capture the complex interactions between all variables that affect photovoltaic output, resulting in limited prediction accuracy.
[0004] In addition, early prediction models often focused on the power prediction of a single photovoltaic power station, ignoring the possible spatial correlation between adjacent or nearby photovoltaic power stations. This correlation comes from common climate conditions, geographical location, and grid connection. Ignoring this will reduce the stability and accuracy of the overall prediction system.
[0005] At the same time, some models are relatively static in feature selection and processing, and fail to dynamically adapt to changes in meteorological conditions, especially to rapidly changing weather systems (such as short-term cloud cover), resulting in large deviations between the prediction results and the actual situation. Faced with photovoltaic power station clusters of different geographical environments and different sizes, some existing prediction models have insufficient generalization capabilities and require a large amount of data retraining and adjustment under specific scenarios, which limits their widespread promotion in practical applications.
[0006] In addition, some forecasting systems have a low update frequency and are unable to quickly respond to and adjust to real-time meteorological data. Especially under extreme or rapidly changing weather conditions, the lack of real-time forecasting capabilities may lead to difficulties in power dispatching and affect the safe and stable operation of the power grid.
[0007] Therefore, how to design a photovoltaic power station cluster power prediction method that can comprehensively consider spatiotemporal characteristics, dynamically adapt to meteorological changes, have strong generalization and real-time prediction capabilities, improve prediction accuracy and practicality, and optimize energy configuration and scheduling efficiency is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0008] In view of this, the present invention provides a photovoltaic power station cluster power prediction method based on spatiotemporal correlation, which can extract the power spatial characteristics between each power station in the spatial dimension, extract the time series characteristics of historical power data in the time dimension, and comprehensively use the spatiotemporal correlation to improve the accuracy of photovoltaic cluster power prediction and improve the utilization efficiency of photovoltaic new energy.
[0009] In order to achieve the above object, the present invention adopts the following technical solution:
[0010] A photovoltaic power station cluster power prediction method based on spatiotemporal correlation includes the following steps:
[0011] S1. Conduct correlation analysis on meteorological characteristics in numerical weather forecast and output power of photovoltaic power station to determine characteristic variables that affect photovoltaic power prediction;
[0012] S2, defining each photovoltaic site in the photovoltaic power station as a node, calculating the similarity between each node based on the characteristic variable and the output power of the photovoltaic power station, and constructing an adjacency matrix;
[0013] S3. Input the adjacency matrix into the optimized GAT-Transformer model to obtain a photovoltaic power station cluster power prediction result; the GAT-Transformer model includes: a GAT module and a Transformer module.
[0014] Among them, in S1, the characteristic variables are irradiance parameters, including: horizontal solar irradiance, vertical solar irradiance and scattered irradiance.
[0015] Furthermore, in S2, the elements in the adjacency matrix are determined by the Pearson correlation coefficient.
[0016] Furthermore, the S3 includes:
[0017] S31, extracting spatial feature information of nodes through a GAT module based on the adjacency matrix;
[0018] S32, performing a dimensionality reduction operation on the spatial feature information through a Transformer module, and extracting temporal features and long-range dependency relationships from the spatial feature information by combining a multi-head attention mechanism and position encoding;
[0019] S33. Using the output layer of the feedforward neural network in the Transformer module, the time series features and long-range dependencies are processed, mapped to dimensions and formats that match the target output, and the future power output value of the photovoltaic power station cluster is output.
[0020] Furthermore, the S31 includes:
[0021] S311, performing a linear transformation on the adjacency matrix through a linear transformation layer in the GAT module graph attention layer; the linear transformation layer is:
[0022] h i =W·x i
[0023] Among them, h i is the input feature vector of node i after linear transformation in the linear layer, W is the weight matrix, x i is the input feature of node i;
[0024] S312. Combine the graph attention mechanism to assign different attention weights to each node, including:
[0025] Calculate the attention score:
[0026] e ij =LeakyReLU(a T ·|h i ||h j |)
[0027] Among them, h i 、h j are the input feature vectors of node i and node j after linear transformation in the linear layer, and a T is the attention vector, LeakyReLU is the activation function;
[0028] Perform a normalized mask operation on the attention score and calculate the attention weight:
[0029]
[0030] The attention weights are used to perform weighted summation on the neighbor node features to obtain the node spatial features:
[0031]
[0032] Among them, N(i) is the set of neighbor nodes of node i, and σ is the activation function.
[0033] Furthermore, in S32, the multi-head attention mechanism can focus on different parts of the input sequence in parallel in different representation spaces, and the number of attention heads is specified by the num_heads parameter;
[0034] The attention score at each time step is:
[0035]
[0036] Where (Q, K, V) is the matrix generated by linear transformation of the input sequence, Q is the query vector, K is the key vector, and V is the value vector; d k is the dimension of the key vector, k t is the transposed vector of the key vector.
[0037] Furthermore, in S32, the position coding is used to introduce the order information of the sequence, and the position coding vector generated by the position coding is added to the input vector so that the model can recognize elements at different positions;
[0038] The position encoding is:
[0039]
[0040] Among them, pos is the position index, indicating the position in the sequence; i is the dimension index, indicating the i-th dimension of the position encoding vector; d model is the hidden state dimension of the Transformer model.
[0041] Furthermore, in S32, the output layer of the feedforward neural network is a multi-layer perceptron network, which is expressed as:
[0042] FFN(x)=max(0,xW1+b1)W2+b2
[0043] Among them, W1 and W2 are weight matrices, b1 and b2 are biases, and max(0,:) is the value calling the ReLU activation function.
[0044] Furthermore, in S3, the GAT-Transformer model optimization includes:
[0045] Perform forward propagation based on the training data set, output the predicted value through the GAT module and the Transformer module in turn, and define the loss function;
[0046] Perform back propagation, calculate the gradient of the loss function, and update the model parameters;
[0047] The Adam optimizer and cosine annealing strategy are used to adjust the model parameters of the updated model to obtain the optimized GAT-Transformer model.
[0048] Furthermore, the loss function is a composite loss function:
[0049] Loss = MSE + α·R(ω)
[0050]
[0051] Where MSE is the mean square error, R(ω) is the regularization term, and α is the regularization strength hyperparameter; yi is the true value of the i-th sample, is the predicted value of the i-th sample, and N is the total number of samples.
[0052] It can be seen from the above technical solution that compared with the prior art, the technical solution of the present invention has the following advantages:
[0053] Beneficial effects:
[0054] 1. This method combines time series analysis (Transformer module) and spatial relationship modeling (GAT module), which can simultaneously capture the complex temporal and spatial correlations of photovoltaic power station clusters. The Transformer module on the time series can effectively handle the temporal dependence of power data, while the GAT module processes the mutual influence between nodes (PV sites) through the graph structure, ensuring the sensitivity of the model to changes in geographical distribution and environmental factors.
[0055] 2. Through correlation analysis, the meteorological characteristics that are truly influential in photovoltaic power prediction are screened out, which can better reflect the dynamic changes in photovoltaic power station power output, reduce the interference of irrelevant factors, and improve the accuracy of model prediction.
[0056] 3. Construct an adjacency matrix and use it as model input. This method provides a flexible graph structure expression and is easy to adapt to PV power plant clusters of different sizes and layouts. As the number or complexity of power plants increases, the model application can be easily expanded by simply adjusting the adjacency matrix without significantly modifying the model structure.
[0057] 4. The GAT module in the optimized GAT-Transformer model adaptively learns the importance of nodes through the graph attention mechanism, assigns different weights to different nodes and edges, and effectively extracts the spatial feature information of the nodes.
[0058] 5. The Transformer module uses a multi-head attention mechanism to process sequence data, avoiding the gradient vanishing problem of traditional RNN and accelerating the model training process. At the same time, combined with adaptive learning rate strategies such as the Adam optimizer, the learning rate is effectively managed, which not only accelerates the convergence process, but also improves the generalization ability of the model on unseen data. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0060] Figure 1 A flow chart of a photovoltaic power station cluster power prediction method based on spatiotemporal correlation provided by an embodiment of the present invention;
[0061] Figure 2 A flow chart of obtaining a photovoltaic power station cluster power prediction result provided by an embodiment of the present invention;
[0062] Figure 3 A structural framework diagram of a GAT module provided in an embodiment of the present invention;
[0063] Figure 4 A structural framework diagram of the Transformer module provided in an embodiment of the present invention;
[0064] Figure 5 A schematic diagram of the GAT-Transformer model optimization process provided by an embodiment of the present invention;
[0065] Figure 6 This is a comparison chart of the prediction effects of different models provided in an embodiment of the present invention.
[0066] Figure 7 A schematic diagram of prediction results of a power station provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0068] like Figure 1 As shown, this embodiment provides a photovoltaic power station cluster power prediction method based on spatiotemporal correlation, comprising the following steps:
[0069] S1. Conduct correlation analysis on meteorological characteristics in numerical weather forecast and output power of photovoltaic power station to determine characteristic variables that affect photovoltaic power prediction;
[0070] S2, defining each photovoltaic site in the photovoltaic power station as a node, calculating the similarity between each node based on the characteristic variable and the output power of the photovoltaic power station, and constructing an adjacency matrix;
[0071] S3. Input the adjacency matrix into the optimized GAT-Transformer model to obtain a photovoltaic power station cluster power prediction result; the GAT-Transformer model includes: a GAT module and a Transformer module.
[0072] This method achieves high-precision and efficient prediction of the power of photovoltaic power station clusters through comprehensive processing of spatiotemporal characteristics, combining efficient model structure with optimization algorithm, while maintaining the flexibility, scalability and certain interpretability of the model, providing strong support for photovoltaic energy management and scheduling.
[0073] The above steps and related features are further described in detail below:
[0074] In photovoltaic power forecasting, choosing appropriate input features is crucial to the accuracy of the model. The output power of photovoltaic systems is highly dependent on environmental conditions, so meteorological information is a key factor in the accuracy of photovoltaic power forecasting. At present, the data forecasting method that considers future meteorological factors is to combine the characteristic variables in NWP with power data as the input of the model to improve the prediction accuracy.
[0075] In this embodiment S1, correlation analysis is performed on meteorological characteristics in numerical weather forecasts and output power of photovoltaic power stations to determine characteristic variables that affect photovoltaic power prediction, specifically including:
[0076] Obtain numerical weather forecast data within a certain period and the actual output power records of the photovoltaic power station in the corresponding period. Subsequently, the Pearson correlation coefficient or mutual information is used to evaluate the correlation between meteorological parameters such as horizontal solar irradiance, vertical solar irradiance, and scattered irradiance and the output power of the photovoltaic power station. Based on the significance test (such as P value threshold setting), the meteorological characteristic variables that are strongly correlated with power prediction are screened out, and weakly correlated or irrelevant variables are eliminated, so as to construct a streamlined and effective feature set, providing a key information basis for subsequent model input.
[0077] The characteristic variables determined in this step are irradiance parameters, including: horizontal solar irradiance, vertical solar irradiance and diffuse irradiance.
[0078] In this embodiment S2, each photovoltaic site in the photovoltaic power station is defined as a node, and the similarity between each node is calculated based on the characteristic variable and the output power of the photovoltaic power station to construct an adjacency matrix. The adjacency matrix is a data structure used to represent a graph. The role of the adjacency matrix in Graph Attention Networks (GAT) is very important.
[0079] Specifically include:
[0080] For each photovoltaic site, the corresponding horizontal and vertical solar irradiance and diffuse irradiance are extracted, together with the site's instant output power, to form a multidimensional feature vector. The similarity or distance between the feature vectors of each two nodes is calculated using cosine similarity, Euclidean distance or Pearson coefficient.
[0081] The Pearson coefficient ranges from -1 to 1, with values close to 1 indicating a strong positive correlation, values close to -1 indicating a strong negative correlation, and values close to 0 indicating no significant linear relationship.
[0082] The specific operation is as follows: For any two photovoltaic sites i and j, first calculate the Pearson correlation coefficient of their respective feature vectors (including horizontal solar irradiance, vertical solar irradiance, diffuse irradiance and instantaneous output power). This coefficient can reveal the consistency of the change trend of meteorological conditions and power output between sites, thus providing a fine measure of the mutual influence of photovoltaic power stations in space. All calculated Pearson correlation coefficients are appropriately transformed (such as standardized to the [0,1] interval or binarized according to the threshold) and used to fill the non-diagonal elements of the adjacency matrix.
[0083] According to the preset threshold or direct conversion rule, the similarity is quantified into elements in the adjacency matrix. The off-diagonal elements of the adjacency matrix represent the strength of association between nodes, and the diagonal elements are usually set to 1 to reflect the spatial dependency structure between photovoltaic sites, laying the foundation for the subsequent graph neural network analysis.
[0084] like Figure 2 As shown, this embodiment S3 includes:
[0085] like Figure 3 As shown, S31, based on the adjacency matrix, extracting the spatial feature information of the node through the GAT module;
[0086] like Figure 4 As shown, S32, the spatial feature information is subjected to dimensionality reduction operation through the Transformer module, and the temporal features and long-range dependency relationships of the spatial feature information are extracted by combining the multi-head attention mechanism and position encoding;
[0087] S33. Using the output layer of the feedforward neural network in the Transformer module, the time series features and long-range dependencies are processed, mapped to dimensions and formats that match the target output, and the future power output value of the photovoltaic power station cluster is output.
[0088] S31, including:
[0089] S311, performing a linear transformation on the adjacency matrix through a linear transformation layer in the GAT module graph attention layer; the linear transformation layer is:
[0090] h i =W·x i
[0091] Among them, h i is the input feature vector of node i after linear transformation in the linear layer, W is the weight matrix, x i is the input feature of node i;
[0092] S312. Combine the graph attention mechanism to assign different attention weights to each node, including:
[0093] Calculate the attention score:
[0094] e ij =LeakyReLU(a T ·|h i ||h j |)
[0095] Among them, h i 、h j are the input feature vectors of node i and node j after linear transformation in the linear layer, and a T is the attention vector, LeakyReLU is the activation function;
[0096] Perform a normalized mask operation on the attention score and calculate the attention weight:
[0097]
[0098] The attention weights are used to perform weighted summation on the neighbor node features to obtain the node spatial features:
[0099]
[0100] Among them, N(i) is the set of neighbor nodes of node i, and σ is the activation function.
[0101] In this step, the linear transformation layer in the graph attention layer of GAT is applied to perform a linear transformation on the original feature vector of each node (by multiplying it with the weight matrix). The purpose is to map the input features to a new feature space, which is conducive to subsequent feature differentiation and pattern capture. Next, the graph attention mechanism is used to calculate the attention score of each node in the graph to its neighboring nodes. This process is based on the linear transformation features between nodes and the specifically designed attention vectors. The activation function enhances the discrimination power and the normalization ensures that the sum of the weights is 1. The resulting attention weight reflects the relative importance between nodes. Finally, the features of the neighboring nodes are weighted and summed according to these weights. The generated node spatial features integrate the local neighborhood information and enhance the spatial understanding and expression ability of the model, which is crucial for grasping the interaction between sites in the photovoltaic power station cluster.
[0102] Through GAT's advanced feature processing, it not only enhances the model's ability to express individual node features, but also promotes the effective modeling of dependencies between nodes, providing a more accurate and detailed spatial feature representation for photovoltaic power station cluster power prediction.
[0103] In step S32, it mainly introduces how to integrate the multi-head attention mechanism and position encoding technology into the model, and uses the feedforward neural network output layer to further process information to enhance the model's expressiveness and understanding of sequence data.
[0104] In S32, the multi-head attention mechanism can focus on different parts of the input sequence in different representation spaces in parallel, and the number of attention heads is specified by the num_heads parameter;
[0105] The attention score at each time step is:
[0106]
[0107] Where (Q, K, V) is the matrix generated by linear transformation of the input sequence, Q is the query vector, K is the key vector, and V is the value vector; d k is the dimension of the key vector, k t is the transposed vector of the key vector.
[0108] In S32, position coding is used to introduce the order information of the sequence, and the position coding vector generated by the position coding is added to the input vector so that the model can recognize elements at different positions;
[0109] The position encoding is:
[0110]
[0111] Among them, pos is the position index, indicating the position in the sequence; i is the dimension index, indicating the i-th dimension of the position encoding vector; d model is the hidden state dimension of the Transformer model.
[0112] In S32, the output layer of the feedforward neural network is a multi-layer perceptron network, which is expressed as:
[0113] FFN(x)=max(0,xW1+b1)W2+b2
[0114] Among them, W1 and W2 are weight matrices, b1 and b2 are biases, and max(0,:) is the value calling the ReLU activation function.
[0115] The Multi-Head Attention mechanism processes the information of the input sequence in parallel by dividing the attention mechanism into multiple parallel "heads", each of which independently focuses on different parts of the input in different representation subspaces. This increases the scope and diversity of the model's attention, and the num_heads parameter defines the number of parallel attention heads. The attention score is obtained by calculating the dot product of the query vector (Q), key vector (K), and value vector (V), where Q, K, and V are generated by linear transformation of the input sequence. This mechanism allows the model to extract features of the input sequence from different angles, improving learning efficiency and expression ability.
[0116] In order to enable the model to understand the position information of elements in the sequence, S32 introduced position encoding. The vector designed here is generated according to the index of each position in the sequence and added to the input feature vector. This encoding method provides the model with a direct signal about the position of the element by using specific sine and cosine functions in different dimensions, so that the model can distinguish input elements at different positions, even if their features may be similar.
[0117] As a processing step after multi-head attention and position encoding, the model uses a multi-layer perceptron (MLP) as the output layer. This layer performs nonlinear transformations on the previously obtained feature representations through a series of linear transformations (defined by weight matrices W1 and W2 and bias terms b1 and b2) and ReLU activation functions to learn more complex patterns and feature combinations. This helps the model to deeply process and abstract information before the final output, improving the accuracy of prediction or classification.
[0118] It builds a powerful feature extraction and sequence understanding framework by integrating multi-head attention mechanism, position encoding and a carefully designed feedforward neural network output layer, which is suitable for various sequence data processing tasks such as natural language processing and time series analysis.
[0119] like Figure 5 As shown, in this embodiment S3, the GAT-Transformer model is optimized during the training process, the length of the model training set accounts for 80% of the total data length, the test set accounts for 20% of the total data length, the input of the model is the historical 24 hours of power data of each power station and the irradiance information of the next 4 hours, the output of the model is the photovoltaic power of the next 4 hours, and the data resolution is 15 minutes.
[0120] Specifically include:
[0121] Perform forward propagation based on the training data set, output the predicted value through the GAT module and the Transformer module in turn, and define the loss function;
[0122] Perform back propagation, calculate the gradient of the loss function, and update the model parameters;
[0123] The Adam optimizer and cosine annealing strategy are used to adjust the model parameters of the updated model to obtain the optimized GAT-Transformer model.
[0124] The loss function is a composite loss function:
[0125] Loss = MSE + α·R(ω)
[0126]
[0127] Where MSE is the mean square error, R(ω) is the regularization term, and α is the regularization strength hyperparameter; y i is the true value of the i-th sample, is the predicted value of the i-th sample, and N is the total number of samples.
[0128] This paper implements a photovoltaic power station cluster power prediction method based on spatiotemporal correlation. By analyzing the correlation between meteorological characteristics and photovoltaic power, it accurately locates the key meteorological parameters that affect the prediction (such as different types of irradiance), ensuring the pertinence and effectiveness of the prediction model input. Subsequently, the adjacency matrix is constructed using the Pearson correlation coefficient, which reflects the spatial correlation between photovoltaic sites and lays the foundation for subsequent graph attention network (GAT) processing.
[0129] The GAT-Transformer hybrid architecture is formed by combining the Graph Attention Network (GAT) and the Transformer model. The GAT module focuses on extracting spatial feature information between nodes, dynamically assigning different weights to different nodes through the graph attention mechanism, and effectively capturing local spatial dependencies. The Transformer module not only processes time series data in parallel through a multi-head attention mechanism to capture long-term dependencies, but also ensures that the temporal characteristics of sequence information are preserved through position encoding, thereby enhancing the model's sensitivity to dynamic changes in time series. In the Transformer module, the use of the Feedforward Neural Network (FFN) further refines the temporal features and long-range dependencies, improves the model's expressiveness through nonlinear transformations, ensures that the predicted output matches the dimension and format of the actual power value, and improves the accuracy and practicality of the prediction.
[0130] During the model optimization process, the GAT-Transformer model was carefully tuned by using the Adam optimizer and cosine annealing strategy to ensure the efficiency and stability of the model training process. The prediction error and model complexity were balanced through the composite loss function (combining the mean square error and the regularization term), which enhanced the generalization ability of the model and reduced the risk of overfitting.
[0131] It achieves high-precision prediction of the power of photovoltaic power station clusters, effectively integrates temporal and spatial characteristics, improves the model's adaptability to complex scenarios and prediction effects, and provides a powerful decision-making support tool for photovoltaic energy management and scheduling.
[0132] In addition, in order to verify the superiority of capturing the correlation in the time dimension and the spatial dimension in terms of prediction accuracy, the performance of the GAT-Transformer model in this embodiment is compared with the GAT model and the GCN-Transformer model in photovoltaic cluster prediction.
[0133] like Figure 6 As shown in the figure, the comparison of the prediction accuracy of the GAT-Transformer model proposed in this embodiment with other models, the curves in the figure represent the sum of the power values of all photovoltaic power stations in the area. Through image comparison and analysis, it can be found that the GAT-Transformer model in this embodiment can perform well regardless of sunny weather or rainy weather, and shows better robustness and accuracy than the GAT and GCN-Transformer models.
[0134] like Figure 7 As shown in the figure, the GAT-Transformer model also performs well in the prediction of a single site. Taking the prediction result of a certain site in the station group as an example, the model can also show good prediction accuracy and can achieve precise adjustment and prediction of the photovoltaic power output of a certain site in the station group.
[0135] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0136] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A photovoltaic power station cluster power prediction method based on spatiotemporal correlation, characterized in that: The following steps are involved: S1. Conduct correlation analysis on meteorological characteristics in numerical weather forecast and output power of photovoltaic power station to determine characteristic variables that affect photovoltaic power prediction; S2, defining each photovoltaic site in the photovoltaic power station as a node, calculating the similarity between each node based on the characteristic variable and the output power of the photovoltaic power station, and constructing an adjacency matrix; S3. Input the adjacency matrix into the optimized GAT-Transformer model to obtain a photovoltaic power station cluster power prediction result; the GAT-Transformer model includes: a GAT module and a Transformer module.
2. A photovoltaic power station cluster power prediction method based on spatiotemporal correlation according to claim 1, characterized in that: In S1, the characteristic variables are irradiance parameters, including: horizontal solar irradiance, vertical solar irradiance and diffuse irradiance.
3. The photovoltaic power station cluster power prediction method based on spatiotemporal correlation according to claim 1 is characterized in that: In S2, the elements in the adjacency matrix are determined by the Pearson correlation coefficient.
4. The photovoltaic power station cluster power prediction method based on spatiotemporal correlation according to claim 1, characterized in that: The S3 includes: S31, extracting spatial feature information of nodes through a GAT module based on the adjacency matrix; S32, performing a dimensionality reduction operation on the spatial feature information through a Transformer module, and extracting temporal features and long-range dependency relationships from the spatial feature information in combination with a multi-head attention mechanism and position encoding; S33. Using the output layer of the feedforward neural network in the Transformer module, the time series features and long-range dependencies are processed, mapped to dimensions and formats that match the target output, and the future power output value of the photovoltaic power station cluster is output.
5. A photovoltaic power station cluster power prediction method based on spatiotemporal correlation according to claim 4, characterized in that: The S31 includes: S311, performing a linear transformation on the adjacency matrix through a linear transformation layer in the GAT module graph attention layer; the linear transformation layer is: h i =W·x i Among them, h i is the input feature vector of node i after linear transformation in the linear layer, W is the weight matrix, x i is the input feature of node i; S312. Combine the graph attention mechanism to assign different attention weights to each node, including: Calculate the attention score: have been ij =LeakyReLU(a T h i ||h j |) Among them, h i 、h j are the input feature vectors of node i and node j after linear transformation in the linear layer, and a T is the attention vector, LeakyReLU is the activation function; Perform a normalized mask operation on the attention score and calculate the attention weight: The attention weights are used to perform weighted summation on the neighbor node features to obtain the node spatial features: Among them, N(i) is the set of neighbor nodes of node i, and σ is the activation function.
6. A photovoltaic power station cluster power prediction method based on spatiotemporal correlation according to claim 5, characterized in that: In S32, the multi-head attention mechanism can focus on different parts of the input sequence in parallel in different representation spaces, and the number of attention heads is specified by the num_heads parameter; The attention score at each time step is: Where (Q, K, V) is the matrix generated by linear transformation of the input sequence, Q is the query vector, K is the key vector, and V is the value vector; d k is the dimension of the key vector, k t is the transposed vector of the key vector.
7. The photovoltaic power station cluster power prediction method based on spatiotemporal correlation according to claim 5, characterized in that: In S32, the position coding is used to introduce the order information of the sequence, and the position coding vector generated by the position coding is added to the input vector so that the model can recognize elements at different positions; The position encoding is: Among them, pos is the position index, indicating the position in the sequence; i is the dimension index, indicating the i-th dimension of the position encoding vector; d model is the hidden state dimension of the Transformer model.
8. The photovoltaic power station cluster power prediction method based on spatiotemporal correlation according to claim 5, characterized in that: In S32, the output layer of the feedforward neural network is a multi-layer perceptron network, which is expressed as: FFN(x)=max(0,xW1+b1)W2+b2 Among them, W1 and W2 are weight matrices, b1 and b2 are biases, and max(0,:) is the value calling the ReLU activation function.
9. The photovoltaic power station cluster power prediction method based on spatiotemporal correlation according to claim 1, characterized in that: In S3, the GAT-Transformer model optimization includes: Perform forward propagation based on the training data set, output the predicted value through the GAT module and the Transformer module in turn, and define the loss function; Perform back propagation, calculate the gradient of the loss function, and update the model parameters; The Adam optimizer and cosine annealing strategy are used to adjust the model parameters of the updated model to obtain the optimized GAT-Transformer model.
10. A photovoltaic power station cluster power prediction method based on spatiotemporal correlation according to claim 9, characterized in that: The loss function is a composite loss function: Loss = MSE + α·R(ω) Where MSE is the mean square error, R(ω) is the regularization term, and α is the regularization strength hyperparameter; y i is the true value of the i-th sample, is the predicted value of the i-th sample, and N is the total number of samples.
Citation Information
Cited By
Multi-station photovoltaic power generation power prediction method and system based on graph attention network
CN119358776A
Foundation cloud picture-based cluster photovoltaic power prediction method and device
CN119539198A
A Cluster Photovoltaic Power Prediction Method and Device Based on Ground-Based Cloud Images
CN119539198B
Method and device for predicting wind-solar combined power and electronic equipment
CN119765287A
Simulation method and device for newly added grid connection of photovoltaic energy storage system and medium
CN120280996A
