Distributed photovoltaic output prediction method and system based on double-domain adaptive graph neural network

Through dual-domain adaptive graph neural network, combining graph attention and local-global graph neural network, integrating static and dynamic adjacency matrices, and using BiGRU-Att model to predict distributed photovoltaic output, it solves the problem of spatial correlation capture in the existing technology. Insufficient problems are solved and the prediction accuracy and flexibility are improved.

CN118798432APending Publication Date: 2024-10-18SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410957632.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing distributed photovoltaic output prediction methods have poor flexibility and scalability in capturing the spatial correlation between devices, resulting in low accuracy. The traditional graph convolution network uses a static adjacency matrix and cannot effectively capture the spatial correlation caused by cloud movement. Spatial characteristics change.

Method used

A method based on dual-domain adaptive graph neural network is used to capture the spatial features on both sides of the dawn and dusk line through the graph attention neural network, and combined with the local-global graph neural network to use static distance and dynamic adaptive adjacency matrix to fuse spatial features, BiGRU- The Att model makes predictions and captures richer temporal and spatial correlations.

Benefits of technology

It improves the accuracy of distributed photovoltaic output prediction, can better capture the spatial correlation changes caused by cloud movement, improves the flexibility and scalability of prediction, and solves the problem of insufficient spatial feature extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798432A_ABST
    Figure CN118798432A_ABST
Patent Text Reader

Abstract

The invention relates to a distributed photovoltaic output prediction method, which constructs a graph structure through longitude and latitude data, and extracts space-time correlation for prediction by depending on distributed photovoltaic output data. A graph attention network (GAT) serves as an inner-layer graph neural network and is used for capturing attention weights among nodes; the local-global graph neural network is used as an outer network, a dynamic adaptive adjacency matrix is used to extract global spatial correlation, and a static distance adjacency matrix is used to extract local spatial correlation. The inner layer and the outer layer are combined to better capture changes of spatial correlation caused by cloud movement. In addition, the Bi-GRU is used for extracting time correlation of distributed photovoltaic output, and prediction is carried out according to weight and each time slice of the Bi-GRU in combination with an attention mechanism. Compared with the prior art, the distributed photovoltaic output prediction method can effectively solve the problem of low precision caused by insufficient spatial feature extraction of the existing distributed photovoltaic output prediction method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of photovoltaic output prediction, and in particular to a distributed photovoltaic output prediction method based on a dual-domain adaptive graph neural network. Background Art

[0002] The output data of distributed photovoltaic equipment has typical non-Euclidean characteristics, which makes it difficult for traditional data processing methods to effectively capture its intrinsic spatial and temporal dependencies. However, the emergence of graph neural networks (GNNs) provides a new idea for modeling such data. GNNs have shown excellent capabilities in modeling non-Euclidean spatial dependencies between nodes, especially graph convolutional networks (GCNs), which, as one of the representative methods of GNNs, have been widely used in various graph-based tasks such as classification and clustering.

[0003] However, existing studies often characterize spatial correlation based on physical adjacency, only considering the local spatial correlation between directly adjacent or second-order adjacent nodes, while ignoring the global spatial correlation. Although the hybrid method based on graph convolutional network (GCN) and recurrent neural network (RNN) has significantly improved the prediction performance, it still has some limitations. GCN uses the Laplacian matrix of the graph to calculate and update the feature information of all nodes in the graph. However, due to the movement of clouds, the spatial features between distributed photovoltaic devices change over time. The traditional GCN method uses a static adjacency matrix to represent the connection between nodes, which leads to poor flexibility and scalability in capturing the spatial correlation of distributed photovoltaic devices. The existing distributed photovoltaic output prediction method does not extract enough spatial features, resulting in low accuracy. Summary of the invention

[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a distributed photovoltaic output prediction method based on a dual-domain adaptive graph neural network.

[0005] The purpose of the present invention can be achieved by the following technical solutions:

[0006] The present invention provides a distributed photovoltaic output prediction method based on a dual-domain adaptive graph neural network, comprising the following steps:

[0007] S1. Obtain historical output data of distributed photovoltaic sites, pre-process the historical output data, and construct data containing a graph structure according to the spatial geographic location information of the distributed photovoltaic sites;

[0008] S2. Use the graph attention neural network as the inner network, input the data containing the graph structure into the inner network, capture the spatial features on both sides of the terminator through the inner network, and output a set of new node feature vectors;

[0009] S3, using the local-global graph neural network as the outer network, inputting the output of the inner network into the outer network, extracting the local spatial correlation through the static distance adjacency matrix of the outer network, extracting the global spatial correlation through the dynamic adaptive adjacency matrix, and fusing the global and local spatial features as the output of the outer network;

[0010] S4: The BiGRU-Att model predicts the output of the outer network to obtain the prediction result of distributed photovoltaic output.

[0011] The preprocessing includes: data cleaning, format conversion and normalization of historical output data.

[0012] The spatial geographic location information includes longitude and latitude coordinates.

[0013] The dynamic adaptive adjacency matrix of the local-global graph neural network is fused with the static distance adjacency matrix.

[0014] The local-global graph neural network is expanded into a multi-layer structure.

[0015] The BiGRU-Att model includes a bidirectional gated recurrent unit and Attention.

[0016] The bidirectional gated recurrent unit includes connections with opposite timing to extend the unidirectional GRU network, which consists of two sub-networks with opposite propagation orders; Attention is applied to the output of each time step in the Bi-GRU to obtain global temporal correlation and long-term dependency.

[0017] In a second aspect, the present invention provides a computer program product, comprising a computer program / instruction, which implements any of the above-mentioned methods when executed by a processor.

[0018] Specifically, the computer program product includes a distributed photovoltaic output prediction system based on a dual-domain adaptive graph neural network, including:

[0019] The data acquisition module is used to obtain the historical output data of the distributed photovoltaic sites, pre-process the historical output data, and construct data containing a graph structure according to the spatial geographic location information of the distributed photovoltaic sites;

[0020] The inner network processing module is used to use the graph attention neural network as the inner network, input the data containing the graph structure into the inner network, capture the spatial features on both sides of the terminator through the inner network, and output a set of new node feature vectors;

[0021] The outer network processing module is used to use the local-global graph neural network as the outer network, input the output of the inner network into the outer network, extract the local spatial correlation through the static distance adjacency matrix of the outer network, extract the global spatial correlation through the dynamic adaptive adjacency matrix, and fuse the global and local spatial features as the output of the outer network;

[0022] The prediction module is used to predict the output of the outer network using the BiGRU-Att model to obtain the prediction result of distributed photovoltaic output.

[0023] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a program stored in the memory, wherein the processor implements any of the above-described methods when executing the program.

[0024] In a fourth aspect, the present invention provides a storage medium having a program stored thereon, wherein the program implements any of the above-described methods when executed.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] 1. The present invention proposes a method for distributed photovoltaic output prediction, which improves the prediction accuracy by utilizing the spatial correlation between distributed photovoltaic output data.

[0027] 2. The present invention uses a local-global graph neural network as the outer layer, extracts local spatial correlations using a static distance adjacency matrix, and extracts global spatial correlations using a dynamic adaptive adjacency matrix, and combines the two to better capture changes in spatial correlations caused by cloud movement.

[0028] 3. The present invention uses a bidirectional time series model and an outer graph neural network to capture richer temporal and spatial correlations for distributed photovoltaic output forecasting, which can effectively solve the problem of low accuracy caused by insufficient spatial feature extraction in existing distributed photovoltaic output forecasting methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a flow chart of the steps of the present invention;

[0030] Figure 2 It is a schematic diagram of the structure of the method of the present invention;

[0031] Figure 3 This is a trend chart of distributed photovoltaic output on both sides of the terminator. DETAILED DESCRIPTION

[0032] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0033] Example

[0034] This embodiment provides a distributed photovoltaic output prediction method based on a dual-domain adaptive graph neural network. Figure 1 As shown, this is achieved through the following steps:

[0035] Step 1: Obtain the historical output data of each distributed photovoltaic site in the specified area, and pre-process the collected data, including data cleaning, format conversion and normalization. Figure 2 As shown, first of all, the purpose of data cleaning is to remove outliers, missing values ​​and duplicate values ​​in the original data to ensure the accuracy and completeness of the data. Outliers may be abnormal data points caused by equipment failure, data transmission errors or other reasons, which will have a negative impact on subsequent analysis and processing. Therefore, appropriate methods, such as statistical outlier detection algorithms, are needed to identify and remove these outliers. Missing values ​​may be caused by data acquisition equipment failure, data transmission interruption or incomplete data records. For missing values, interpolation, filling or deletion can be used to process them. Duplicate values ​​may be caused by repeated recording of data acquisition equipment or repeated sending during data transmission. For duplicate values, deduplication processing is required to ensure that each data point is calculated only once.

[0036] Format conversion is the process of converting data into a format suitable for subsequent analysis and processing.

[0037] Normalization is to convert the output value into a uniform dimension range for better comparison and analysis. Normalization can be performed by maximum and minimum normalization, standard deviation normalization, or fractional ratio normalization. Maximum and minimum normalization is to linearly transform the original data into the range of [0,1]; standard deviation normalization is to convert the original data into the form of a standard normal distribution; fractional ratio normalization is to scale the fractional part of the original data. Choosing an appropriate normalization method requires considering factors such as the distribution characteristics of the data, the needs of subsequent analysis, and the complexity of calculation.

[0038] After completing the data preprocessing, a graph structure can be constructed based on the spatial geographic location information of each distributed photovoltaic site. In the graph structure, each node represents a photovoltaic site, and the edges between nodes represent the spatial relationship between sites. The weight of the edge can be determined based on the distance between sites, output correlation, or other indicators. For example, if the distance between two sites is close and the output correlation is high, the weight of the edge between them can be set to a larger value; conversely, if the distance between two sites is far or the output correlation is low, the weight of the edge between them can be set to a smaller value. Through such a graph structure representation, the spatial relationship and output characteristics between distributed photovoltaic sites can be better understood and analyzed.

[0039] Step 2: For nodes that are far apart, the impact of cloud movement on each other is relatively small. In most cases, the difference in output between two distributed photovoltaic devices that are far apart may be more due to the difference in irradiance caused by the rotation of the earth. From a large range, the parallel lines of the twilight line divide all nodes. Under clear sky conditions, there is a significant difference in the output of photovoltaic devices on both sides of the twilight line. Assuming that the irradiance of photovoltaic devices in the same partition is basically the same (excluding special factors of the equipment), such as Figure 3 As shown, it can be considered that the output data of photovoltaic devices in the same area are the same, while the data between different output areas show a step-by-step proportional relationship. Therefore, this embodiment uses the attention mechanism of GAT to calculate the attention coefficient between the distributed photovoltaic device node and the adjacent node as the first-layer spatial feature extractor to capture the spatial correlation on both sides of the twilight line. For a vertex and any neighboring node, the calculation process is as follows:

[0040]

[0041] Where N i Indicates V i The first-order neighborhood set of ij Yes V i and V j The final attention coefficient between .

[0042] In order to further improve the generalization ability of the attention mechanism, this embodiment additionally adopts a multi-head attention mechanism. Specifically, P groups of independent attention mechanisms are executed, and the output results of these P groups are averaged to obtain the final output result. The calculation process is as follows:

[0043]

[0044] Based on the above calculation process, all vertices on the graph are iterated and a set of new node feature vectors are output as follows:

[0045]

[0046] H is the output of the inner graph neural network after extracting spatial features.

[0047] In step 3, the outer GNN captures and fuses global and local spatial features.

[0048] (1) Dynamic adaptive adjacency matrix captures global features

[0049] The construction of the dynamic adaptive adjacency matrix adopts a combination of time embedding and node embedding. The node embedding dimension is N*D, where N is the number of distributed photovoltaic devices, that is, the number of nodes, and D is the embedding dimension. The time embedding dimension is T*D, where T is the window size, and the time embedding dimension size is consistent with the node embedding dimension. The combination of time embedding and node embedding forms a representation of the node, and its transposition and multiplication form an N*N matrix, which represents the dynamic adaptive adjacency matrix reflecting the spatial relationship.

[0050] First, randomly initialize an embedding learnable node for all nodes E node Each row of represents the embedding of each node, and d1 is the hidden dimension of the node embedding. Then, this paper uses a learnable time-varying embedding Explicitly introduce time-varying information. Similar to E time Each row of represents the embedding at each time step t, and d2 is the hidden dimension of the time-varying embedding. In order to maintain the consistency of the dimensions of subsequent operations, this embodiment sets d=d1=d2 by default, and the dynamic spatial dependency relationship between each pair of nodes i-th and j-th is calculated as follows:

[0051]

[0052] Among them, {·,·} represents the inner product, and λ represents the important weight of each information item.

[0053] (2) Static distance adjacency matrix captures local features

[0054] The former is used to globally perceive the dynamic movement of the cloud, and the latter uses GCN to strengthen the local spatial correlation between devices. Together, they capture the changes in spatial correlation caused by the cloud. Specifically, the formula for capturing local spatial correlation using a static distance adjacency matrix graph neural network is as follows:

[0055]

[0056] in I∈R N×N represents the adjacency matrix of graph G, H (l) represents the output of the l-th layer, W (l)is the weight parameter matrix of the l-th layer.

[0057] The graph neural network constructed with static distance adjacency matrix and dynamic adaptive adjacency matrix is ​​extended to multi-layer structure.

[0058] The dynamic adjacency matrix is ​​fused with the static distance adjacency matrix. The adaptive dynamic adjacency matrix generation method combines time embedding and node embedding. Through the gating module, different importance weights are adaptively assigned to balance the interaction between different information items. The geographic adjacency matrix is ​​added to the generation formula of the dynamic adaptive adjacency matrix to strengthen the influence between similar nodes. Based on the concept of GCNII multi-layer graph neural network, the graph neural network constructed by the static distance adjacency matrix and the dynamic adaptive adjacency matrix is ​​extended to a multi-layer structure. Formally, the (l+1)th layer of the graph neural network is defined as follows:

[0059]

[0060] where W∈R d×C×F , b∈R d×F , use the softmax function to transform the matrix A adapt Normalize, A dis represents the static distance adjacency matrix, A adapt represents the dynamic adaptive adjacency matrix, W represents the weight parameter, H (0) Represents the output of the graph attention network.

[0061] Step 4: Combine the time series model BiGRU-Att with the graph neural network for prediction.

[0062] BiGRU-Att consists of two parts: Bidirectional Gated Recurrent Unit (Bi-GRU) and Attention.

[0063] Among them, the bidirectional gated recurrent unit (Bi-GRU) introduces a connection with reverse timing to expand the unidirectional GRU network, which consists of two sub-networks with reverse propagation order. The output value of the network can be expressed as follows:

[0064]

[0065] in represents the output value of the forward propagation, Represents the output value of the backpropagation.

[0066] First, BiGRU is used in combination with the spatial features of distributed photovoltaic output data extracted by graph neural network to analyze the contextual information of time series data and explore the potential causal relationship in distributed photovoltaic data. The expression is as follows:

[0067] z(t)=σ(g1([X(t) ,h (t-1) ])||g2([X (t) ,h (t-1) ]); Θ z ) (10)

[0068] r (t) =σ(g1([X (t) ,h (t-1) ])||g2([X (t) ,h (t-1) ]); Θ r ) (11)

[0069] c t =tanh(g1([X (t) ,r (t) ⊙h (t-1) ])||g2([X (t) ,r (t) ⊙h (t-1) ]); Θ c ) (12)

[0070] h (t) =z (t) ⊙h (t-1) +(1-z (t) )⊙c t (13)

[0071]

[0072] Where X (t) and h (t) represents the input and output at time step t, {·,·} represents the concatenation operation, and z (t) and r (t) Represent the reset gate and update gate at time step t respectively. g1, g2 represent the gates with learnable parameters Θ z , Θ r and θ c The spatial correlation module of . W and b are learnable parameters in the linear transformation (MLP).

[0073] Then, the attention mechanism is applied to the output of each time step in Bi-GRU to obtain global temporal correlation and long-term dependency. In order to explore the weight of the correlation between different factors in the time series, Bahdanalu et al. proposed an attention mechanism, the core idea of ​​which is to extract the core information significantly related to the target and highlight the key factors affecting the target. In essence, it is an automatic weighting scheme, and the expression is as follows:

[0074]

[0075] where H is the hidden state h output by the GRU layer at each time step i The matrix composed of. H=[h1,h2···h T ], T is the sequence length. The output vector r of the attention mechanism can be obtained by weighted summation of H, α represents the attention vector, ω represents the training parameter vector, and ω T represents its transpose.

[0076] Specifically, this embodiment also provides a distributed photovoltaic output prediction system based on a dual-domain adaptive graph neural network, including: a data acquisition module, used for step 1 of this embodiment; an inner network processing module, used for step 2 of this embodiment; an outer network processing module, used for step 3 of this embodiment; and a prediction module, used for step 4 of this embodiment.

[0077] In a third aspect, this embodiment provides an electronic device, including a memory, a processor, and a program stored in the memory, wherein the processor implements the method mentioned in the above embodiment when executing the program.

[0078] This embodiment provides a storage medium on which a program is stored, and when the program is executed, the method mentioned in the above embodiment is implemented. The storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0079] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A distributed photovoltaic output prediction method based on dual-domain adaptive graph neural network, characterized in that: The following steps are involved: S1. Obtain historical output data of distributed photovoltaic sites, pre-process the historical output data, and construct data containing a graph structure according to the spatial geographic location information of the distributed photovoltaic sites; S2. Use the graph attention neural network as the inner network, input the data containing the graph structure into the inner network, capture the spatial features on both sides of the terminator through the inner network, and output a set of new node feature vectors; S3, using the local-global graph neural network as the outer network, inputting the output of the inner network into the outer network, extracting the local spatial correlation through the static distance adjacency matrix of the outer network, extracting the global spatial correlation through the dynamic adaptive adjacency matrix, and fusing the global and local spatial features as the output of the outer network; S4: The BiGRU-Att model predicts the output of the outer network to obtain the prediction result of distributed photovoltaic output.

2. A distributed photovoltaic output prediction method based on dual-domain adaptive graph neural network according to claim 1, characterized in that: The preprocessing includes: data cleaning, format conversion and normalization of historical output data.

3. The distributed photovoltaic output prediction method based on dual-domain adaptive graph neural network according to claim 1 is characterized in that: The spatial geographic location information includes longitude and latitude coordinates.

4. The distributed photovoltaic output prediction method based on dual-domain adaptive graph neural network according to claim 1 is characterized in that: The dynamic adaptive adjacency matrix of the local-global graph neural network is fused with the static distance adjacency matrix.

5. A distributed photovoltaic output prediction method based on dual-domain adaptive graph neural network according to claim 4, characterized in that: The local-global graph neural network is expanded into a multi-layer structure.

6. The distributed photovoltaic output prediction method based on dual-domain adaptive graph neural network according to claim 1 is characterized in that: The BiGRU-Att model includes a bidirectional gated recurrent unit and Attention.

7. A distributed photovoltaic output prediction method based on dual-domain adaptive graph neural network according to claim 6, characterized in that: The bidirectional gated recurrent unit includes connections with opposite timing to extend the unidirectional GRU network, which consists of two sub-networks with opposite propagation orders; Attention is applied to the output of each time step in the Bi-GRU to obtain global temporal correlation and long-term dependency.

8. A distributed photovoltaic output prediction system based on dual-domain adaptive graph neural network, characterized in that: include: The data acquisition module is used to obtain the historical output data of the distributed photovoltaic sites, pre-process the historical output data, and construct data containing a graph structure according to the spatial geographic location information of the distributed photovoltaic sites; The inner network processing module is used to use the graph attention neural network as the inner network, input the data containing the graph structure into the inner network, capture the spatial features on both sides of the terminator through the inner network, and output a set of new node feature vectors; The outer network processing module is used to use the local-global graph neural network as the outer network, input the output of the inner network into the outer network, extract the local spatial correlation through the static distance adjacency matrix of the outer network, extract the global spatial correlation through the dynamic adaptive adjacency matrix, and fuse the global and local spatial features as the output of the outer network; The prediction module is used to predict the output of the outer network using the BiGRU-Att model to obtain the prediction result of distributed photovoltaic output.

9. An electronic device comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Reactive compensation optimization method and system based on AI

    CN120300823A

  • An AI-based reactive power compensation optimization method and system

    CN120300823B