Small-area photovoltaic power prediction method and terminal based on double-layer directed graph

By constructing static and dynamic graph convolutional recurrent models of double-layer directed graphs and combining historical and meteorological data of photovoltaic sites, the problem of low accuracy in photovoltaic power prediction in small areas is solved, and accurate predictions at different time scales are achieved.

CN118690162BActive Publication Date: 2025-10-21STATE GRID FUJIAN ELECTRIC POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410693048.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-10-21
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

Existing photovoltaic power prediction methods have low accuracy in scenarios with small spatial scales and fail to effectively consider spatiotemporal correlations.

Method used

A two-layer directed graph-based method is adopted to construct a static directed graph and a dynamic graph convolutional loop model. The historical data and meteorological data of photovoltaic sites are combined to capture spatial and temporal characteristics, and the dynamic graph convolutional loop model is obtained for prediction.

Benefits of technology

It achieves accurate prediction of photovoltaic power in small-area distributed photovoltaic systems, improving prediction accuracy and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690162B_ABST
    Figure CN118690162B_ABST
Patent Text Reader

Abstract

The application discloses a small-area photovoltaic power prediction method and terminal based on a double-layer directed graph, and the method comprises the following steps: acquiring historical data of different photovoltaic sites and meteorological data corresponding to the historical data; constructing a static directed graph based on the correlation between the historical data and the meteorological data; determining dynamic characteristics between the photovoltaic sites based on the historical data and the meteorological data; constructing a dynamic graph at each time step according to the dynamic characteristics; fusing the dynamic graph and the static directed graph to obtain a dynamic graph convolution cycle model; and performing power prediction on a region containing the photovoltaic sites based on the dynamic graph convolution cycle model. The application can be applied to a scenario with a small spatial scale, and a photovoltaic power prediction result with higher accuracy can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart grids, and in particular to a small-area photovoltaic power prediction method and terminal based on a double-layer directed graph. Background Art

[0002] Distributed photovoltaic technology is rapidly developing, and its penetration in distribution networks is increasing. Distributed photovoltaic units have small individual capacities, but are numerous, resulting in high penetration and density in certain areas. However, photovoltaic power generation is significantly affected by weather, exhibiting randomness and uncertainty. The integration of large-scale distributed photovoltaics can lead to voltage fluctuations and power flow variations in low-voltage distribution networks, potentially impacting the new power system. Therefore, to ensure orderly source and load regulation in low-voltage distribution networks and ensure safe and stable system operation, it is particularly important to forecast the output of small-area photovoltaic clusters.

[0003] Currently, most photovoltaic power prediction methods utilize machine learning and deep learning algorithms. These algorithms can perform in-depth data analysis and establish deep mapping relationships between data, resulting in superior prediction results. However, current distributed photovoltaic prediction methods based on graph convolutional neural networks (GCNNs) are primarily targeted at scenarios with large spatial scales and may not be applicable to smaller ones. Furthermore, some distributed photovoltaic prediction methods fail to account for the spatiotemporal correlations of changes, resulting in low prediction accuracy. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a small-area photovoltaic power prediction method and terminal based on a double-layer directed graph, which can be applied to scenarios with smaller spatial scales and obtain photovoltaic power prediction results with higher accuracy.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0006] A small-area photovoltaic power prediction method based on a double-layer directed graph includes:

[0007] Obtaining historical data of different photovoltaic sites and meteorological data corresponding to the historical data;

[0008] constructing a static directed graph based on the correlation between the historical data and the meteorological data;

[0009] determining dynamic characteristics between the photovoltaic sites based on the historical data and the meteorological data;

[0010] Constructing a dynamic graph at each time step according to the dynamic features;

[0011] Fusing the dynamic graph with the static directed graph to obtain a dynamic graph convolutional cycle model;

[0012] Power prediction is performed on the area containing the photovoltaic site based on the dynamic graph convolution cycle model.

[0013] In order to solve the above technical problems, another technical solution adopted by the present invention is:

[0014] A small-area photovoltaic power prediction terminal based on a double-layer directed graph includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the various steps of the above-mentioned small-area photovoltaic power prediction method based on the double-layer directed graph.

[0015] The beneficial effects of the present invention are as follows: historical data and corresponding meteorological data of different photovoltaic sites are obtained, and a static directed graph is constructed based on the correlation between the historical data and the meteorological data, so that the static directed graph can not only take into account the spatial characteristics between different photovoltaic sites, but also capture the influencing factors between different meteorological data. At the same time, dynamic features between photovoltaic sites are extracted based on historical data and meteorological data, and a dynamic graph is constructed at each time step based on the dynamic features, thereby making up for the lack of time dynamic characteristics of the static directed graph. Finally, the static directed graph and the dynamic graph are fused to obtain a dynamic graph convolution cycle model, thereby effectively mining the dynamic correlation between different photovoltaic sites to achieve accurate prediction of the power of small-area distributed photovoltaics on different time scales. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a method for predicting photovoltaic power in a small area based on a double-layer directed graph provided by an embodiment of the present invention;

[0017] Figure 2 A schematic diagram of a historical data layer provided by an embodiment of the present invention;

[0018] Figure 3 A schematic diagram of a meteorological data layer provided by an embodiment of the present invention;

[0019] Figure 4 A schematic diagram of a two-layer directed graph provided by an embodiment of the present invention;

[0020] Figure 5 A schematic diagram of the first maximum mutual information coefficient between adjacent photovoltaic sites provided by an embodiment of the present invention;

[0021] Figure 6 A schematic diagram of the architecture of a dynamic graph convolutional loop model provided by an embodiment of the present invention;

[0022] Figure 7 This embodiment of the present invention provides output data for four photovoltaic sites in a small area over three days.

[0023] Figure 8 A schematic structural diagram of a small-area photovoltaic power prediction terminal based on a double-layer directed graph provided by an embodiment of the present invention;

[0024] Description of labels:

[0025] 100. A small-area photovoltaic power prediction terminal based on a double-layer directed graph; 101. Memory; 102. Processor. DETAILED DESCRIPTION

[0026] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following description is given in conjunction with the embodiments and accompanying drawings.

[0027] An embodiment of the present invention provides a small-area photovoltaic power prediction method based on a double-layer directed graph, which is characterized by comprising:

[0028] Obtaining historical data of different photovoltaic sites and meteorological data corresponding to the historical data;

[0029] constructing a static directed graph based on the correlation between the historical data and the meteorological data;

[0030] determining dynamic characteristics between the photovoltaic sites based on the historical data and the meteorological data;

[0031] Constructing a dynamic graph at each time step according to the dynamic features;

[0032] Fusing the dynamic graph with the static directed graph to obtain a dynamic graph convolutional cycle model;

[0033] Power prediction is performed on the area containing the photovoltaic site based on the dynamic graph convolution cycle model.

[0034] As can be seen from the above description, the beneficial effects of the present invention are: obtaining historical data and corresponding meteorological data of different photovoltaic sites, and constructing a static directed graph based on the correlation between historical data and meteorological data, so that the static directed graph can not only take into account the spatial characteristics between different photovoltaic sites, but also capture the influencing factors between different meteorological data. At the same time, based on the historical data and meteorological data, the dynamic characteristics between photovoltaic sites are extracted, and a dynamic graph at each time step is constructed based on the dynamic characteristics, thereby making up for the lack of time dynamic characteristics of the static directed graph. Finally, the static directed graph and the dynamic graph are fused to obtain a dynamic graph convolution cycle model, thereby effectively mining the dynamic correlation between different photovoltaic sites to achieve accurate prediction of the power of small-area distributed photovoltaics on different time scales.

[0035] Furthermore, constructing a static directed graph based on the correlation between the historical data and the meteorological data includes:

[0036] generating a historical data layer based on the correlation between the historical data of different photovoltaic sites;

[0037] generating a meteorological data layer based on correlations between different types of meteorological data;

[0038] Based on the correlation between the historical data and the meteorological data, a static directed graph is constructed according to the historical data layer and the meteorological data layer.

[0039] As can be seen from the above description, because historical data from different PV sites influence each other, a historical data layer is generated based on the correlation of historical data from different PV sites to account for the power influencing factors between different PV sites. Different types of meteorological data also influence each other, so a meteorological data layer is generated based on the correlation between their meteorological data to account for the influencing factors of different meteorological data. Furthermore, because meteorological data from a PV site affects the power output data of the current site, a static directed graph is constructed based on the historical data layer and the meteorological data layer. This static directed graph comprehensively reflects the influence relationships between historical data and meteorological data, between different historical data, and between different meteorological data.

[0040] Furthermore, the step of constructing a static directed graph based on the historical data layer and the meteorological data layer based on the correlation between the historical data and the meteorological data includes:

[0041] Calculating a first maximum mutual information coefficient between the historical data and the meteorological data;

[0042] Constructing a two-layer directed graph according to the historical data layer and the meteorological data layer based on the first maximum mutual information coefficient;

[0043] A static directed graph at each time step is constructed based on the two-layer directed graph.

[0044] As can be seen from the above description, the maximum mutual information coefficient effectively measures the degree of correlation between two characteristic variables. By connecting each node between the historical data layer and the meteorological data layer based on the first maximum mutual information coefficient between the historical data and the meteorological data, a two-layer directed graph is formed. This fully considers the multiple factors influencing PV power data, thereby improving the accuracy of subsequent forecasts.

[0045] Furthermore, the step of constructing a two-layer directed graph according to the historical data layer and the meteorological data layer based on the first maximum mutual information coefficient is specifically as follows:

[0046]

[0047] Among them, A i,j represents the static adjacency matrix of the two-layer directed graph, n represents the number of photovoltaic sites, m represents the number of types of meteorological data, a1 represents the correlation in the historical data layer, a2 represents the correlation in the meteorological data layer, and m represents the first maximum mutual information coefficient between historical data and meteorological data.

[0048] From the above description, it can be seen that the two-layer directed graph not only reflects the correlation of historical data of different photovoltaic sites, but also reflects the correlation between different meteorological data and the correlation between historical data and meteorological data. This allows the two-layer directed graph to include the correlation of all features, thereby improving the accuracy of subsequent data prediction.

[0049] Furthermore, constructing a static directed graph at each time step based on the two-layer directed graph includes:

[0050] Creating a fixed-size time window, wherein the time window moves on a time series according to a preset time step, wherein the time series includes sampling times of the historical data and the meteorological data;

[0051] Whenever the time window moves one time step, a target sampling time included in the time window is determined, and target historical data and target meteorological data corresponding to the target sampling time are obtained; and based on the target historical data and the target meteorological data, a second maximum mutual information coefficient of power between adjacent photovoltaic sites at the time step is calculated based on the two-layer directed graph;

[0052] A static directed graph is constructed according to the second maximum mutual information coefficient at each time step.

[0053] From the above description, it can be seen that the correlation between adjacent photovoltaic sites changes due to changes in meteorological data at a certain moment. Therefore, the second maximum mutual information coefficient of adjacent photovoltaic sites is time-varying. Therefore, a corresponding static directed graph is constructed based on the second maximum mutual information data at each time step to better capture the dynamic changes in the correlation between different sites.

[0054] Furthermore, the determining of the dynamic characteristics between the photovoltaic sites based on the historical data and the meteorological data includes:

[0055] Get the preset hypernetwork;

[0056] The historical data and meteorological data at each time step and the hidden layer state of the super network at the previous time step are input into the super network for feature learning to obtain the dynamic features between the photovoltaic sites at each time step.

[0057] From the above description, we can see that the hypernetwork can capture the dynamic characteristics between different nodes more clearly and accurately, thereby improving the prediction accuracy of subsequent models.

[0058] Furthermore, the historical data and meteorological data at each time step and the hidden layer state of the super network at the previous time step are input into the super network for feature learning, and the dynamic features between the photovoltaic sites are obtained as follows:

[0059] X t =P t ∪W t ∪H t-1 ;

[0060] Among them, X t represents the dynamic characteristics of time step t, P t represents the historical data of time step t, W t represents the meteorological data of time step t, H t-1 represents the hidden layer state at time step t-1.

[0061] From the above description, it can be seen that the hypernetwork is based on the features learned in each previous time step, combined with the historical data and meteorological data input at the current time step to update the features learned at the current time step, thereby realizing dynamic association between the previous and next time steps.

[0062] Furthermore, constructing a dynamic graph at each time step according to the dynamic features includes:

[0063] Inputting the dynamic features into the graph convolution module of the hypernetwork to obtain a dynamic filter tensor;

[0064] Multiplying the dynamic filter tensor with the preset embedding matrix of the static random initialized node through a broadcast mechanism to obtain a first dynamic filter embedded in the source node and a second dynamic filter embedded in the target node;

[0065] Calculating a dynamic adjacency matrix at each time step according to the correlation between the source node and the target node based on the first dynamic filter and the second dynamic filter;

[0066] A dynamic graph is constructed based on the dynamic adjacency matrix.

[0067] As can be seen from the above description, inputting dynamic features into the graph convolution module of the hypernetwork effectively utilizes message passing between nodes, making the generation of dynamic graphs more efficient and fully utilizing dynamic features. Furthermore, the first and second dynamic filters based on the hypernetwork can implicitly learn the time-varying features between historical data of different photovoltaic sites, effectively supplementing the time-varying features of the static directed graph.

[0068] Furthermore, the step of fusing the dynamic graph with the static directed graph to obtain a dynamic graph convolutional cycle model includes:

[0069] The dynamic graph convolution module is obtained by performing weighted summation on the graph convolution results of the dynamic graph and the static directed graph at each time step through a preset dynamic graph convolution recurrent network;

[0070] The matrix multiplication of the gated recurrent unit in the dynamic graph convolutional recurrent network is replaced by the dynamic graph convolution module to obtain a dynamic graph convolutional recurrent model.

[0071] As can be seen from the above description, the dynamic graph convolution module can better capture spatial information in the data. At the same time, it combines the characteristics of convolutional neural networks, making it able to effectively process the characteristics of spatiotemporal data. Compared with traditional matrix multiplication in gated recurrent units, applying dynamic graph convolution to spatiotemporal data can better capture local features and global relationships in the data, thereby improving model performance.

[0072] Another embodiment of the present invention provides a small-area photovoltaic power prediction terminal based on a double-layer directed graph, comprising a memory, a processor, and a computer program stored on the memory and running on the processor. When the processor executes the computer program, it implements the various steps of the above-mentioned small-area photovoltaic power prediction method based on a double-layer directed graph.

[0073] As can be seen from the above description, the beneficial effects of the present invention are: obtaining historical data and corresponding meteorological data of different photovoltaic sites, and constructing a static directed graph based on the correlation between historical data and meteorological data, so that the static directed graph can not only take into account the spatial characteristics between different photovoltaic sites, but also capture the influencing factors between different meteorological data. At the same time, based on the historical data and meteorological data, the dynamic characteristics between photovoltaic sites are extracted, and a dynamic graph at each time step is constructed based on the dynamic characteristics, thereby making up for the lack of time dynamic characteristics of the static directed graph. Finally, the static directed graph and the dynamic graph are fused to obtain a dynamic graph convolution cycle model, thereby effectively mining the dynamic correlation between different photovoltaic sites to achieve accurate prediction of the power of small-area distributed photovoltaics on different time scales.

[0074] The embodiments of the present invention provide a small-area photovoltaic power prediction method and terminal based on a double-layer directed graph, which can be applied to distributed photovoltaic power prediction scenarios with a small spatial scale, and can effectively improve the accuracy of photovoltaic power prediction in a small area with multiple nodes. The following is an illustration of the method using a specific embodiment:

[0075] Please refer to Figures 1 to 7 , embodiment 1 of the present invention is:

[0076] A small-area photovoltaic power prediction method based on a double-layer directed graph includes:

[0077] S1. Obtain historical data of different photovoltaic sites and meteorological data corresponding to the historical data.

[0078] In some embodiments, the historical data refers to the historical output data of a photovoltaic site. The meteorological data may be NWP data. Historical data and corresponding meteorological data for different photovoltaic sites within a small area of ​​a substation are obtained within a certain time period according to a preset sampling period. Specifically, the historical output data and corresponding meteorological data obtained from 29 rooftop photovoltaic sites within a preset area of ​​substation A from January 1, 2022 to September 31, 2022 may be obtained, with the sampling interval between each historical output data being 15 minutes.

[0079] S2. Constructing a static directed graph based on the correlation between the historical data and the meteorological data.

[0080] Specifically, step S2 includes:

[0081] S21 . Generate a historical data layer based on the correlation between the historical data of different photovoltaic sites.

[0082] In some embodiments, as Figure 2 As shown, in the historical data layer, the historical data of different photovoltaic sites are used as nodes, and the correlation between the historical data of different photovoltaic sites is used as directed edges to generate the historical data layer.

[0083] S22. Generate a meteorological data layer based on the correlation between different types of meteorological data.

[0084] In some embodiments, meteorological data may include ground pressure, temperature, rainfall, longitudinal wind speed, latitudinal wind speed, net solar radiation intensity, total solar radiation intensity, etc. Figure 3 As shown, in the meteorological data layer, different types of meteorological data are used as nodes, and the correlations between different types of meteorological data are used as directed edges to generate the meteorological data layer.

[0085] In some embodiments, the correlation between historical data of different photovoltaic sites and the correlation between different types of meteorological data can be obtained by calculating the maximum mutual information coefficient, so the weight of the directed edges in the historical data layer and the meteorological data layer is the calculated maximum mutual information coefficient.

[0086] S23. Based on the correlation between the historical data and the meteorological data, construct a static directed graph according to the historical data layer and the meteorological data layer.

[0087] Specifically, step S23 includes:

[0088] S231. Calculate a first maximum mutual information coefficient between the historical data and the meteorological data.

[0089] The step S231 is specifically as follows:

[0090]

[0091] Where I(X,Y) represents the mutual information value, MIC(X,Y) represents the maximum mutual information coefficient, X represents historical data, Y represents meteorological data, P(X,Y) represents the random distribution of variables X and Y, P(X) and P(Y) represent the marginal distributions of variables X and Y, respectively, and B represents the upper limit of the grid resolution.

[0092] S232: Construct a two-layer directed graph based on the historical data layer and the meteorological data layer based on the first maximum mutual information coefficient, such as Figure 4 shown.

[0093] The step S232 is specifically as follows:

[0094]

[0095] Among them, A i,j represents the static adjacency matrix of the two-layer directed graph, n represents the number of photovoltaic sites, m represents the number of types of meteorological data, a1 represents the correlation in the historical data layer, a2 represents the correlation in the meteorological data layer, and m represents the first maximum mutual information coefficient between historical data and meteorological data.

[0096] In some embodiments, the influence relationship between some data nodes is unidirectional. For example, the total solar radiation intensity and photovoltaic output in meteorological data are two variables with different physical properties. The total solar radiation intensity can determine the photovoltaic output, but the photovoltaic output cannot in turn affect the total solar radiation intensity; meteorological data can affect the photovoltaic output data, but the photovoltaic output data cannot affect the meteorological data. Therefore, directed edges are used in the two-layer directed graph to clarify the causal relationship between the input variables.

[0097] S233: Construct a static directed graph at each time step based on the double-layer directed graph.

[0098] Specifically, the step S233 includes:

[0099] S2331. Create a time window of a fixed size, where the time window moves on a time series according to a preset time step, where the time series includes sampling times of the historical data and the meteorological data.

[0100] S2332. Whenever the time window moves one time step, the target sampling time contained in the time window is determined, and the target historical data and target meteorological data corresponding to the target sampling time are obtained. According to the target historical data and the target meteorological data, the second maximum mutual information coefficient of the power between adjacent photovoltaic sites at the time step is calculated based on the two-layer directed graph.

[0101] In some embodiments, the second maximum mutual information data at each time step is as follows: Figure 5 shown.

[0102] S2333: Construct a static directed graph according to the second maximum mutual information coefficient at each time step.

[0103] S3. Determine dynamic characteristics between the photovoltaic sites based on the historical data and the meteorological data.

[0104] Specifically, step S3 includes:

[0105] S31. Obtain a preset super network.

[0106] S32: Inputting historical data and meteorological data at each time step and the hidden layer state of the super network at the previous time step into the super network for feature learning to obtain dynamic features between the photovoltaic sites at each time step.

[0107] The step S32 is specifically as follows:

[0108] X t =P t ∪W t ∪H t-1 ;

[0109] Among them, X t represents the dynamic characteristics of time step t, P t represents the historical data of time step t, W t represents the meteorological data of time step t, H t-1 represents the hidden layer state at time step t-1.

[0110] It should be noted that That is, the batch size of the dynamic features of time step t is B, the node size is N, and the input feature dimension is D in .

[0111] S4. Construct a dynamic graph at each time step according to the dynamic features.

[0112] Specifically, step S4 includes:

[0113] S41. Input the dynamic features into the graph convolution module of the hypernetwork to obtain a dynamic filter tensor.

[0114] In some embodiments, step S41 is specifically as follows:

[0115] F t =Θ *G (X t ,A);

[0116] Among them, Θ *G Represents a dynamic graph convolution operation; A represents a predefined adjacency matrix; F t represents the dynamic filter tensor,

[0117] In some embodiments, the dynamic graph convolution cycle model of the present invention includes a decoder and an encoder, and the graph convolution module of the above-mentioned hypernetwork is applied to the decoder and the encoder respectively, so as to capture the dynamic information of historical data at different time steps.

[0118] S42: Multiply the dynamic filter tensor and the preset embedding matrix of the static random initialization node through a broadcast mechanism to obtain a first dynamic filter embedded in the source node and a second dynamic filter embedded in the target node.

[0119] In some embodiments, step S42 is specifically as follows:

[0120]

[0121] in, represents the first dynamic filter, represents the second dynamic filter, τ represents the activation function tanh, σ represents the activation function sigmoid, F1 t represents the dynamic filter tensor of the source node, represents the dynamic filter tensor of the target node, ⊙ represents the Hadamard product, E1 and E2 represent the embedding matrices of the static randomly initialized nodes of the source node and the target node respectively, E∈R B×D .

[0122] S43. Based on the first dynamic filter and the second dynamic filter, calculate a dynamic adjacency matrix at each time step according to the correlation between the source node and the target node.

[0123] In some embodiments, step S43 is specifically as follows:

[0124]

[0125] Among them, A t represents the dynamic adjacency matrix at time step t, A t ∈R B×N×N .

[0126] S44. Construct a dynamic graph based on the dynamic adjacency matrix.

[0127] S5. Fusing the dynamic graph with the static directed graph to obtain a dynamic graph convolutional cycle model.

[0128] Specifically, step S5 includes:

[0129] S51. Perform weighted summation on the graph convolution results of the dynamic graph and the static directed graph at each time step through a preset dynamic graph convolution recurrent network to obtain a dynamic graph convolution module.

[0130] In some embodiments, a graph convolution module in a dynamic graph convolutional recurrent network performs a graph convolution operation on a dynamic graph and a static directed graph to obtain a graph convolution result.

[0131] In some embodiments, step S51 is specifically as follows:

[0132]

[0133] Among them, α, β, and γ represent the weights of different components respectively. represents the node weight matrix, D out represents the output feature dimension, K represents the length of the prediction sequence, and A s represents a static directed graph, H in 、H out Respectively represent the input node state and output node state of the graph convolutional network in the dynamic graph convolutional recurrent network, Indicates normalization of the generated dynamic adjacency matrix.

[0134] S52. Replace the matrix multiplication of the gated recurrent unit in the dynamic graph convolution recurrent network with the dynamic graph convolution module to obtain a dynamic graph convolution recurrent model.

[0135] In some embodiments, the control of the current input and the retention of information of the past state by the GRU (Gated Recurrent Unit) is completed through a gating mechanism, thereby realizing temporal feature extraction. The GRU contains an update gate and a reset gate. The larger the value of the update gate and the smaller the value of the reset gate, the less information of the previous state is retained. In order to make full use of the two-layer directed graph, the above-mentioned dynamic graph convolution module adopts a bidirectional graph convolution structure, thereby obtaining a dynamic graph convolution cycle model as shown in FIG. Figure 6 The dynamic graph convolution cycle model can be expressed as:

[0136]

[0137] Among them, X t and H t They represent the photovoltaic power sequence and output hidden state of the dynamic graph convolutional recurrent model at time step t, z (t) and r (t) They represent the update gate and reset gate at time step t, *G represents the dynamic graph convolution module, Θ z1 、Θ r1 、Θ h1 、Θ z2 、Θ r2 and Θ h2 They represent the learnable hyperparameters of different graph convolution modules.

[0138] S6. Perform power prediction for the area including the photovoltaic site based on the dynamic graph convolution cycle model.

[0139] like Figure 7 As shown, distributed photovoltaic power stations in a small area are geographically close and have similar meteorological characteristics. Therefore, although the capacities of adjacent photovoltaic panels in the area are different, their output curve change trends are highly similar, showing strong spatial correlation. Therefore, mining the spatial information of adjacent distributed photovoltaic sites can effectively improve the prediction performance. At the same time, due to atmospheric movement, the power change trends of adjacent photovoltaic panels are not exactly the same, but there is a sequence, that is, it has dynamic change characteristics. Therefore, considering the dynamic correlation between photovoltaic panels helps to improve the prediction effect. Based on the above analysis, it can be seen that adjacent photovoltaic users are more similar than scenes with larger spatial scales. Data with higher similarity show simpler correlations and are more conducive to dynamic graph mining. Therefore, based on the spatial correlation and dynamic change characteristics of the output data of photovoltaic panels in time, the present invention introduces these prior knowledge into the model to improve the prediction performance, so that the dynamic graph convolution cycle model can be applied to scenes with smaller spatial scales.

[0140] In this embodiment, it is verified through experiments that the dynamic graph convolution cycle model obtained from steps S1 to S5 of the present invention has a good effect on photovoltaic power prediction. The specific experimental process is as follows:

[0141] Step 1: Obtain the experimental dataset.

[0142] The historical output data and corresponding meteorological data for 29 rooftop PV systems in Area A, within a pre-set area, from January 1, 2022, to September 31, 2022, were obtained. The sampling interval between each historical output data point was 15 minutes. The resulting dataset contained both historical output data and meteorological data. The dataset was divided into training, validation, and test sets in a 6:2:2 ratio.

[0143] Step 2: Initialize the model parameters of the dynamic graph convolutional loop model.

[0144] The node embedding dimension ranges from 5 to 40, and the hidden state dimension ranges from 4 to 96. In each experiment, the other parameters are fixed and only one parameter is changed. Increasing the node embedding dimension and the hidden state dimension can reduce the mean absolute error (MAE). Increasing the node embedding dimension can provide sufficient knowledge for the model, but too high a dimension will lead to overfitting of the model and reduce the model performance. Therefore, selecting appropriate parameters can improve the prediction performance of the model. The model has the best parameters when the node embedding dimension and the hidden state dimension are 10 and 8 respectively. The GNN (graph neural network) output dimension in the model is 16, and the learning rate is 0.01. The appropriate GNN output dimension can improve the ability of dynamic graphs to extract spatiotemporal correlations. The learning rate in the model adopts a multi-step decay method, which gradually decreases in different segments within the interval, so that the model can converge quickly in the early stage of training, and the convergence effect is more significant in the later stage of training. The mean absolute error (MAE) and root mean square error (RMSE) are used to evaluate the performance of the prediction model.

[0145] Step 3: Set the comparison model.

[0146] In order to verify the superiority of the performance of the dynamic graph convolution cycle model constructed by the present invention, two non-graph convolutional neural network algorithms and two graph convolutional neural network algorithms were simultaneously used in the experiment to predict the future output data of 29 photovoltaic sites in the above dataset. Among them, the non-graph convolutional neural network algorithms are: convolution sequence to sequence attention, CNN-Seq2Seq and convolution bidirectional long short-term memory network (CNN-BiLSTM), and the two graph convolutional neural network algorithms are: temporal graph convolutional network (TGCN) and spatio-temporal graph convolutional network (STGCN). Among them, the graph convolutional neural network algorithms all adopt the two-layer directed graph structure of the present invention; the TGCN model integrates GCN and GRU, its learning rate is selected as 0.0005, and 64 hidden units are set; STGCN consists of two gated sequential convolution layers and a spatial graph convolution module in the middle, and the graph convolution kernel size and time convolution kernel size are set to 3. The above four models are used as baseline models to compare their prediction performance with the dynamic graph convolutional loop model of the present invention.

[0147] Step 4, experimental results and analysis.

[0148] The evaluation indicators MAE and RMSE for the baseline model and the proposed model were calculated at various time scales. Table 1 shows a comparison of the prediction performance of the proposed model and the baseline model at four time scales: 15 minutes, 30 minutes, 1 hour, and 2 hours. This comparative analysis shows that the proposed model (DGCRN) exhibits smaller errors across different time scales and evaluation indicators, demonstrating good predictive effectiveness and adaptability.

[0149] Table 1 Comparison of prediction performance of different models

[0150]

[0151] In order to make the prediction effect of the model designed by the present invention more statistically significant compared with other models, two non-parametric test methods, Wilcoxon and Friedman, were used respectively. First, assume H1 (there is no significant difference in the prediction value between the model constructed by the present invention and other prediction models) and H2 (assuming that the prediction effect of the model constructed by the present invention is the same as that of all other prediction models); secondly, use the Friedman method to test all models and calculate the statistical probability p; finally, compare the statistical probability p with the confidence parameter a. If p < a, it means that the probability of the null hypothesis being true is extremely low, and the hypothesis is rejected. Otherwise, the hypothesis is established. The above test results are shown in Table 2.

[0152] Table 2 Wilcoxon and Friedman significance test results

[0153] Prediction Model Wilcoxon test Friedman test CNN-seq2seq 0.0078<0.05 CNN-BiLSTM 0.0078<0.05 0.0000<0.05 TGCN 0.0078<0.05 STGCN 0.0078<0.05

[0154] It can be seen from the test results in Table 2 that, when the confidence level is 95% (a is 0.05), the p values ​​obtained by the Wilcoxon test and the Friedman test are both less than a = 0.05, so the null hypotheses H1 and H2 are rejected. The model constructed in this embodiment has a very different effect from the other prediction models in Table 2, which shows that the method proposed in the present invention has a significant improvement in the prediction effect of the model.

[0155] Therefore, compared with various prediction models such as CNN-seq2seq, CNN-BiLSTM, TGCN and STGCN, the dynamic graph convolutional cycle model constructed by the present invention can accurately predict the short-term photovoltaic output in the substation area by deeply mining the spatiotemporal characteristics. Whether it is a single-step prediction or a multi-step prediction, the DGCRN prediction model of the present invention has advantages. The DGCRN prediction model of the present invention combines dynamic graphs with static graphs, and can extract the dynamic characteristics of spatiotemporal correlation. Compared with the prediction model that only considers static spatiotemporal correlation, dynamic spatiotemporal correlation is more conducive to capturing the dynamic changes of power.

[0156] Please refer to Figure 8 , the second embodiment of the present invention is:

[0157] A small-area photovoltaic power prediction terminal 100 based on a double-layer directed graph includes a memory 101, a processor 102, and a computer program stored on the memory 101 and running on the processor 102. When the processor 102 executes the computer program, it implements the various steps of the small-area photovoltaic power prediction method based on a double-layer directed graph described in Example 1.

[0158] In summary, the present invention provides a small-area photovoltaic power prediction method and terminal based on a double-layer directed graph, which obtains historical data and corresponding meteorological data of different photovoltaic sites, considers the correlation between different photovoltaic sites, different meteorological data, and the degree of correlation between meteorological data and historical data, and constructs a static directed graph by calculating the maximum mutual information coefficient between the correlation coefficients, thereby capturing the characteristics of the relevant data of different photovoltaic sites, so that the static directed graph can not only take into account the spatial characteristics between different photovoltaic sites, but also capture the influencing factors between different meteorological data. At the same time, the dynamic characteristics between photovoltaic sites are extracted based on historical data and meteorological data, and a dynamic graph is constructed at each time step based on the dynamic characteristics, thereby making up for the lack of time dynamic characteristics of the static directed graph. Finally, the static directed graph and the dynamic graph are fused to obtain a dynamic graph convolution cycle model, thereby effectively mining the dynamic correlation between different photovoltaic sites to achieve accurate prediction of the power of small-area distributed photovoltaics on different time scales.

[0159] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A small area photovoltaic power prediction method based on a double-layer directed graph, characterized in that: include: Obtaining historical data of different photovoltaic sites and meteorological data corresponding to the historical data; constructing a static directed graph based on the correlation between the historical data and the meteorological data; determining dynamic characteristics between the photovoltaic sites based on the historical data and the meteorological data; Constructing a dynamic graph at each time step according to the dynamic features; Fusing the dynamic graph with the static directed graph to obtain a dynamic graph convolutional cycle model; Performing power prediction for the area containing the photovoltaic site based on the dynamic graph convolution cycle model; The constructing of a static directed graph based on the correlation between the historical data and the meteorological data includes: generating a historical data layer based on the correlation between the historical data of different photovoltaic sites; generating a meteorological data layer based on correlations between different types of meteorological data; Based on the correlation between the historical data and the meteorological data, constructing a static directed graph according to the historical data layer and the meteorological data layer; The step of constructing a static directed graph based on the historical data layer and the meteorological data layer based on the correlation between the historical data and the meteorological data includes: Calculating a first maximum mutual information coefficient between the historical data and the meteorological data; Constructing a two-layer directed graph according to the historical data layer and the meteorological data layer based on the first maximum mutual information coefficient; Constructing a static directed graph at each time step based on the two-layer directed graph; The step of constructing a two-layer directed graph based on the historical data layer and the meteorological data layer based on the first maximum mutual information coefficient is as follows: ; in, A i,j Represents the static adjacency matrix of a two-layer directed graph, n represents the number of photovoltaic sites, m represents the number of types of meteorological data, Represents correlations in historical data layers, represents the correlation of the meteorological data layer, M represents the first maximum mutual information coefficient between historical data and meteorological data; The step of constructing a static directed graph at each time step based on the double-layer directed graph includes: Creating a fixed-size time window, wherein the time window moves on a time series according to a preset time step, wherein the time series includes sampling times of the historical data and the meteorological data; Whenever the time window moves one time step, a target sampling time included in the time window is determined, and target historical data and target meteorological data corresponding to the target sampling time are obtained; and based on the target historical data and the target meteorological data, a second maximum mutual information coefficient of power between adjacent photovoltaic sites at the time step is calculated based on the two-layer directed graph; Constructing a static directed graph according to the second maximum mutual information coefficient at each time step; Determining the dynamic characteristics between the photovoltaic sites based on the historical data and the meteorological data includes: Get the preset hypernetwork; The historical data and meteorological data at each time step and the hidden layer state of the super network at the previous time step are input into the super network for feature learning to obtain the dynamic features between the photovoltaic sites at each time step.

2. A small area photovoltaic power prediction method based on a double-layer directed graph according to claim 1, characterized in that: The historical data and meteorological data at each time step and the hidden layer state of the super network at the previous time step are input into the super network for feature learning, and the dynamic features between the photovoltaic sites are obtained as follows: ; in, X t represents the dynamic characteristics of time step t, P t represents the historical data of time step t, W t represents the meteorological data at time step t, H t-1 represents the hidden layer state at time step t-1.

3. The method for predicting photovoltaic power in a small area based on a double-layer directed graph according to claim 2, characterized in that: The constructing of a dynamic graph at each time step according to the dynamic features includes: Inputting the dynamic features into the graph convolution module of the hypernetwork to obtain a dynamic filter tensor; Multiplying the dynamic filter tensor with the preset embedding matrix of the static random initialized node through a broadcast mechanism to obtain a first dynamic filter embedded in the source node and a second dynamic filter embedded in the target node; Calculating a dynamic adjacency matrix at each time step according to the correlation between the source node and the target node based on the first dynamic filter and the second dynamic filter; A dynamic graph is constructed based on the dynamic adjacency matrix.

4. The method for predicting photovoltaic power in a small area based on a double-layer directed graph according to claim 1, characterized in that: The step of fusing the dynamic graph with the static directed graph to obtain a dynamic graph convolution cycle model includes: The dynamic graph convolution module is obtained by performing weighted summation on the graph convolution results of the dynamic graph and the static directed graph at each time step through a preset dynamic graph convolution recurrent network; The matrix multiplication of the gated recurrent unit in the dynamic graph convolutional recurrent network is replaced by the dynamic graph convolution module to obtain a dynamic graph convolutional recurrent model.

5. A small-area photovoltaic power prediction terminal based on a double-layer directed graph, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, each step of the small-area photovoltaic power prediction method based on a double-layer directed graph as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Multi-microgrid optimization coordinated operation control method based on double-layer directed graph

    CN114552664A

  • Photovoltaic power prediction method, device and equipment and readable storage medium

    CN117638924A