Distributed photovoltaic power collaborative prediction method and system based on graph structure network
Through the composite model and whale optimization algorithm based on graph-structured networks, the problems of incomplete feature extraction and failure to consider synergistic relationships in distributed photovoltaic power station power prediction are solved, achieving higher prediction accuracy and system management efficiency.
Patent Information
- Application Number
- CN202410754289.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-06
AI Technical Summary
Existing distributed photovoltaic power station power prediction methods cannot dig deep into deep features. The performance of the network model is affected by network parameters, and the collaborative relationship between multiple distributed photovoltaic power stations is not considered, resulting in poor accuracy and reliability of collaborative prediction.
A composite model based on graph structure network is used, combined with GCN, CNN and LSTM networks, and the whale optimization algorithm is used to optimize hyperparameters, capture the spatial dependence between climate influencing factors and photovoltaic sites, extract short-term and long-term time features, and improve prediction performance.
It improves the accuracy and reliability of power collaborative prediction of distributed photovoltaic power stations, optimizes energy management and dispatching efficiency, and provides more accurate and stable power output prediction.
Smart Images

Figure CN118611052A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distributed photovoltaic power collaborative prediction, and in particular to a distributed photovoltaic power collaborative prediction method and system based on a graph structure network. Background Art
[0002] As a renewable energy source, solar energy has the advantages of strong renewable capacity, clean and environmentally friendly, rich resources, and convenient development and utilization. Photovoltaic power generation has the characteristics of randomness and discontinuity, and has a greater impact on the power grid when it is connected to the grid. Predicting photovoltaic power generation can improve the predictability of power output, which can not only ensure the reliability of grid dispatching information, but also help grid dispatching to make reasonable planning, which is of great significance to promoting the healthy and stable development of the photovoltaic power generation industry.
[0003] At present, the photovoltaic prediction methods of a single photovoltaic power station have been rapidly developed, including prediction methods such as statistical methods, deep learning methods, neural network model methods, etc. On this basis, the collaborative prediction methods of photovoltaic power of centralized and distributed photovoltaic power stations are also constantly improving. Compared with centralized photovoltaic power stations or single sites, distributed photovoltaic power stations have the characteristics of decentralized installation, small capacity, low data collection and communication security and reliability, which also determines that the distributed photovoltaic power station power prediction system needs to adopt a technical solution different from the existing centralized photovoltaic power station power prediction system. The existing distributed photovoltaic power station power prediction methods mostly use deep learning and neural network models. However, the photovoltaic power station data features extracted by the existing methods are imperfect and cannot deeply explore the deep features of distributed photovoltaic power; the network model performance is affected by the network parameters, and the existing model parameters mostly use default values, resulting in poor model prediction performance; the collaborative relationship between multiple distributed photovoltaic power stations is not considered in the prediction process, which ultimately makes the accuracy and reliability of distributed photovoltaic power collaborative prediction poor. Summary of the invention
[0004] To address the deficiencies of the above-mentioned prior art, the present invention provides a distributed photovoltaic power collaborative prediction method and system based on a graph structure network. Through the complex construction of multiple different types of network layers (including graph structure network GCN, convolutional neural network network CNN, and long short-term memory network LSTM), a distributed photovoltaic power collaborative prediction model is constructed, and the whale optimization algorithm is used to optimize the hyperparameters of the constructed model to improve the model prediction performance; by analyzing the climate influencing factors affecting the distributed photovoltaic collaborative power prediction, the historical data of the climate influencing factors are combined with the photovoltaic power historical data and input into the constructed collaborative prediction model, so as to capture the dynamic characteristics of each photovoltaic site time series data that changes with time over a long period of time, the spatial dependence between all photovoltaic sites, and the fluctuation of the time series data of all photovoltaic sites in a short period of time, that is, the short-term time characteristics, so as to more comprehensively understand and predict the power output of distributed photovoltaic power stations and improve the accuracy and reliability of collaborative prediction.
[0005] In a first aspect, the present invention provides a distributed photovoltaic power collaborative prediction method based on a graph structure network.
[0006] A distributed photovoltaic power collaborative prediction method based on a graph structure network, comprising:
[0007] Obtaining historical data of all sites of the distributed photovoltaic power station; the historical data includes historical data of climate influencing factors and historical power data;
[0008] Perform data preprocessing on historical data to obtain historical time series data for each site;
[0009] The historical time series data of all sites are input into the distributed photovoltaic power collaborative prediction model. The model is composed of a multi-layer CNN, GCN, and LSTM network, and is divided into two parallel branches. Branch one is a parallel CNN and GCN network, which respectively extracts the short-term time features and inter-site spatial features of the input data; Branch two is a plurality of parallel LSTM networks, which respectively extract the long-term time features of the data of each site; The outputs of the CNN and GCN networks are spliced together, and then spliced with the output of each LSTM network respectively, and then spliced after the corresponding fully connected layer to output the actual power prediction value of each site.
[0010] According to a further technical solution, the climate influencing factors include radiation intensity, temperature, air pressure, and humidity; and the power includes actual power and rated power.
[0011] A further technical solution, the screening of climate influencing factors, includes:
[0012] Obtain historical data of various climate factors and power at each site of distributed photovoltaic power stations;
[0013] Normalize the acquired historical data;
[0014] The Spearman correlation analysis method was used to calculate the correlation between different climate factor data and actual power data at different sites, and the climate influencing factors were screened based on the correlation.
[0015] According to a further technical solution, the multiple climate factors include radiation intensity, temperature, air pressure, humidity, precipitation, and wind speed.
[0016] A further technical solution is to pre-process the historical data, including:
[0017] The historical data of each site is sliced using sliding windows, abnormal data is eliminated, standardized, and converted to a time format to obtain historical time series data.
[0018] Further technical solutions include building a distributed photovoltaic power collaborative prediction model and using the whale optimization algorithm to optimize the model hyperparameters, including:
[0019] Initialize the number of whales and the maximum number of iterations, and randomly initialize a group of whales to represent a set of model hyperparameters;
[0020] Calculate the fitness of each whale, determine the position of the current optimal whale, train the model and return the loss value of the model on the test data set; the loss value is calculated based on the predicted power and the actual power, with the root mean square error, mean absolute error and determination coefficient as indicators;
[0021] By randomly searching in the search space, the whale position is updated based on the fitness, and the next iteration of training is performed based on the updated position;
[0022] The training iterations are continued until the maximum number of iterations is reached, at which time the optimal hyperparameter combination is obtained and assigned to the prediction model.
[0023] In a second aspect, the present invention provides a distributed photovoltaic power collaborative prediction system based on a graph structure network.
[0024] A distributed photovoltaic power collaborative prediction system based on a graph structure network, comprising:
[0025] A data acquisition module is used to acquire historical data of all sites of a distributed photovoltaic power station; the historical data includes historical data of climate influencing factors and historical power data;
[0026] The data preprocessing module is used to preprocess the historical data and obtain the historical time series data of each site;
[0027] The distributed photovoltaic power collaborative prediction module is used to input the historical time series data of all sites into the distributed photovoltaic power collaborative prediction model. The model is composed of a multi-layer CNN, GCN, and LSTM network, and is divided into two parallel branches. Branch one is a parallel CNN and GCN network, which respectively extracts the short-term time features and inter-site spatial features of the input data; branch two is a plurality of parallel LSTM networks, which respectively extract the long-term time features of the data of each site; the outputs of the CNN and GCN networks are spliced, and then spliced with the output of each LSTM network respectively, and then spliced after the corresponding fully connected layer to output the actual power prediction value of each site.
[0028] In a third aspect, the present disclosure further provides an electronic device, comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the steps of the method described in the first aspect are completed.
[0029] In a fourth aspect, the present disclosure further provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps of the method described in the first aspect.
[0030] One or more of the above technical solutions have the following beneficial effects:
[0031] 1. The present invention provides a distributed photovoltaic power collaborative prediction method and system based on a graph structure network. Through the complex construction of multiple different types of network layers (including graph structure network GCN, convolutional neural network network CNN, long short-term memory network LSTM), a distributed photovoltaic power collaborative prediction model is constructed, and the whale optimization algorithm is used to optimize the hyperparameters of the constructed model to improve the model prediction performance; by analyzing the climate influencing factors affecting the distributed photovoltaic collaborative power prediction, the historical data of the climate influencing factors are combined with the photovoltaic power historical data. Input into the constructed collaborative prediction model, the dynamic characteristics of each photovoltaic site time series data that change with time over a long period of time, the spatial dependence between each photovoltaic site, and the fluctuation of the time series data of all photovoltaic sites in a short period of time, that is, the short-term time characteristics (or local characteristics), a more comprehensive understanding and prediction of the power output of distributed photovoltaic power stations, and improve the accuracy and reliability of collaborative prediction.
[0032] 2. The present invention introduces a graph structure network GCN, which is used to process the spatial relationship in the distributed photovoltaic system. Traditional prediction methods often ignore the spatial correlation between different photovoltaic power stations, or only use simplified mathematical models for processing, which cannot accurately capture the complex spatial dependencies between different photovoltaic power stations. For this reason, the present invention uses GCN to model the complex connections and interactions between photovoltaic power stations / units, which can more accurately reflect the mutual influence between different units and effectively improve the accuracy of prediction; at the same time, the present invention also introduces a CNN network, which is used to extract local features of the data center, and the convolutional layer in the network is used to identify short-term patterns in time series data (i.e., fluctuations in a short period of time), which are spliced with spatial features to form data structure features, and then combined with the long-term time series features of each power station to achieve accurate prediction of power coordination of distributed photovoltaic power stations.
[0033] 3. The model constructed by the present invention focuses on collaborative prediction. It can integrate the data of multiple distributed photovoltaic power generation units (i.e. photovoltaic power stations) to make collective predictions, which can not only improve the prediction accuracy of a single unit, but also optimize the energy management and scheduling efficiency of the entire system. In practical applications, this collaborative prediction can provide more accurate and stable power output predictions for power grid operations, helping to reduce the risks caused by power fluctuations. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0035] Figure 1 This is an overall flow chart of a distributed photovoltaic power collaborative prediction method based on a graph structure network according to an embodiment of the present invention;
[0036] Figure 2 Schematic diagram of the correlation analysis results between humidity and actual power at different sites in an embodiment of the present invention;
[0037] Figure 3 It is a structural schematic diagram of a distributed photovoltaic power collaborative prediction model in an embodiment of the present invention;
[0038] Figure 4 Schematic diagram for comparing different model evaluation indicators in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] It should be noted that the following detailed descriptions are exemplary only, are intended to describe specific embodiments, are intended to provide further explanation of the present invention, and are not intended to limit exemplary embodiments according to the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those of ordinary skill in the art to which the present invention belongs. In addition, it should also be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0040] Embodiment 1
[0041] This embodiment provides a distributed photovoltaic power collaborative prediction method based on a graph structure network. By fully capturing the spatial correlation and time series characteristics between each photovoltaic site, high-precision photovoltaic power collaborative prediction is achieved, thereby enhancing the operating efficiency and reliability of the integrated energy system. This method not only considers the impact of climate factors on photovoltaic power, but also improves the accuracy and robustness of the prediction through a distributed prediction model, which helps to optimize the energy distribution and scheduling of the power grid. The distributed photovoltaic power collaborative prediction method proposed in this embodiment, such as Figure 1 As shown, the specific steps include:
[0042] Obtaining historical data of all sites of the distributed photovoltaic power station; the historical data includes historical data of climate influencing factors and historical power data;
[0043] Perform data preprocessing on historical data to obtain historical time series data for each site;
[0044] The historical time series data of all sites are input into the distributed photovoltaic power collaborative prediction model. The model is composed of a multi-layer CNN, GCN, and LSTM network, and is divided into two parallel branches. Branch one is a parallel CNN and GCN network, which respectively extracts the short-term time features and inter-site spatial features of the input data; Branch two is a plurality of parallel LSTM networks, which respectively extract the long-term time features of the data of each site; The outputs of the CNN and GCN networks are spliced together, and then spliced with the output of each LSTM network respectively, and then spliced after the corresponding fully connected layer to output the actual power prediction value of each site.
[0045] The following content introduces the distributed photovoltaic power collaborative prediction method based on graph structure network proposed in this embodiment in more detail.
[0046] Step S1, obtain the historical data of all sites of the distributed photovoltaic power station. The historical data obtained refers to the time series data before the prediction time, and the historical data includes the historical data of climate influencing factors and the historical data of power, wherein the climate influencing factors include radiation intensity (including total radiation, direct radiation, scattered radiation, etc.), temperature, humidity, air pressure, etc., and the power includes actual power and rated power, etc. In this embodiment, the sliding window method of the time series is adopted, and the historical data of the past 20 time points are used to predict the photovoltaic power generation power at the next time point, which can be expressed as:
[0047] X(t)=[X(t-20),X(t-19),...,X(t-1)]
[0048] Y(t)=X(t+1):
[0049] In the above formula, X(t) represents the data at time point t, which is a time window containing the past 20 time points. X(ti) represents the observed value at time point ti, where i ranges from 1 to 20. Y(t) represents the target data at time point t, that is, the value of the next time point to be predicted.
[0050] Furthermore, this embodiment considers the impact of different climate factors on photovoltaic power prediction, and selects multiple climate factors with the greatest impact. Specifically, considering that radiation intensity, temperature, humidity, air pressure, wind speed, etc. have a certain degree of impact on photovoltaic synergy power, in order to improve the accuracy of photovoltaic power prediction, this embodiment first analyzes and screens out the most important climate factors that affect photovoltaic power prediction. The screening method includes:
[0051] Step S1.1, obtaining historical data of various climate factors and power of each site of the distributed photovoltaic power station; wherein the various climate factors include total radiation, direct radiation, scattered radiation, temperature, air pressure, humidity, precipitation, wind speed, etc., and the power includes actual power and rated power.
[0052] Step S1.2: normalize the acquired historical data.
[0053] Step S1.3, using the Spearman correlation analysis method, calculate the correlation between different climate factor data and actual power data at different sites, and obtain climate influencing factors based on the correlation. Among them, Spearman correlation analysis is used to evaluate the monotonic relationship between two variables, not a linear relationship. The calculated Spearman correlation coefficient can help understand the degree of association between variables, rather than the linear correlation between them. In this embodiment, the data analysis is completed using the Spearman correlation, and its calculation formula is:
[0054]
[0055] In the above formula, ρ represents the Pearson correlation coefficient, x i and i represent the observed values of two variables, and represent the means of the two variables.
[0056] In the above Spearman correlation analysis, the rank of each variable is calculated first, and then the Spearman rank correlation coefficient between these ranks is calculated. The value range of the Spearman rank correlation coefficient is -1 to 1, 0 means no correlation, positive value means positive correlation, and negative value means negative correlation. Taking humidity as an example, Figure 2 As shown, the correlation between humidity and actual power at different sites is analyzed through correlation.
[0057] The correlation between different climate factors and actual power at different sites is calculated in the above manner, and the climate factors are screened according to the correlation. The climate factors most relevant to actual power are selected as climate influencing factors, including radiation intensity, temperature, humidity, and air pressure, laying the foundation for subsequent coordinated and accurate prediction of photovoltaic power.
[0058] Step S2: preprocess the historical data to obtain the historical time series data of each site. Specifically, preprocess the historical data, including: performing sliding window data slicing, abnormal data removal, standardization processing and time format conversion on the historical data of each site in turn to obtain the historical time series data.
[0059] First, the historical data of each site is sliced in a sliding window to generate historical time series data. That is, the size of the sliding window is set to N, and the historical data is sliced in a sliding window to generate a data sample sequence of length N for the subsequent model application. In this embodiment, the historical data is obtained and preprocessed, and the preprocessed data is divided into a training set and a test set for the subsequent training and testing of the model.
[0060] Secondly, the historical time series data is subjected to abnormal data elimination. In this embodiment, the quartile detection method is used to identify and eliminate abnormal data to ensure the stability and accuracy of the training data.
[0061] Specifically, quartile is a form of quantile in statistics, which arranges a set of data from small to large and divides it into four equal parts, where each equal part contains 25% of the data. For example, quartile includes three key points: the first quartile (Q1), which is the 25% value in the data set; the second quartile (Q2), which is the 50% value in the data set, that is, the middle value of the data; the third quartile (Q3), which is the 75% value in the data set; the gap between the third quartile and the first quartile is also called the interquartile range (IQR). The interquartile range IQR is a measure of statistical dispersion, that is, the distribution of the middle 50% of the data, and its calculation formula is: IQR = Q3-Q1. Using quartiles to detect abnormal data, the formula is:
[0062] x i >Q3+k(IQR)||x i <Q1-k(IQR);
[0063] In the above formula, k is a set constant, which is a coefficient, and x i Represents the i-th data in the time series data.
[0064] The above formula is used to detect abnormal data, and data points lower than Q1-k (IQR) or higher than Q3+k (IQR) are regarded as abnormal values and deleted.
[0065] After that, the historical time series data is subjected to Z-score standardization. That is, the data sample sequence after sliding window slicing is subjected to Z-score standardization so that the data features present a standard normal distribution, improving the robustness and generalization ability of the model. The formula is:
[0066]
[0067] In the above formula, μ is the mean and σ is the standard deviation.
[0068] Finally, the time format conversion is performed on the time series data after the above processing, that is, the time column in the data set is converted to the date and time format of Pandas (i.e., Pandas function), and the time features such as year, month, week number, date, hour and minute are extracted from the date and time format to enrich the time dynamic information in the data.
[0069] Step S3: input the historical time series data of all sites into the distributed photovoltaic power collaborative prediction model, and output the actual power prediction values of multiple sites.
[0070] Specifically, first, a distributed photovoltaic power collaborative prediction model is built. Considering that the existing prediction models often extract incomplete features of photovoltaic power station data and do not consider the collaborative relationship between multiple distributed photovoltaic power stations, in order to further improve the prediction accuracy of the prediction model, this embodiment improves the power prediction model and uses a variety of different types of networks: graph convolutional network GCN, convolutional neural network CNN and long short-term memory network for complex construction, so as to construct a distributed photovoltaic power collaborative prediction model.
[0071] like Figure 3 As shown in the figure, the distributed photovoltaic power collaborative prediction model is composed of multiple layers of CNN, GCN, and LSTM networks. The model is divided into two parallel branches. Branch one is a parallel CNN and GCN network, which extracts the short-term time features and inter-site spatial features of the input data respectively; branch two is a plurality of parallel LSTM networks, which extract the long-term time features of each site data respectively. Among them, the inter-site spatial features extracted and output by GCN are spliced with the short-term time features extracted and output by the CNN layer to integrate the graph structure information and spatial features and construct the data structure features. This fusion strategy enables the model to take into account the relationship between nodes and local spatial information at the same time, so as to better capture the structural characteristics of the data.
[0072] In this embodiment, the graph convolution network GCN layer uses two GCN Layer1 layers to perform graph convolution operations. Each GCN Layer1 layer maps the input features to a new feature space through linear transformation to capture the interactions between power stations. Through the GCN layer, the features are weighted and aggregated using the normalized adjacency matrix to achieve effective encoding of graph structure information; by stacking multiple GCN layers, deeper spatial features are learned to provide strong support for subsequent prediction tasks.
[0073] In GCN, the propagation between layers is as follows:
[0074]
[0075] In the above formula, A is the adjacency matrix, is the adjacency matrix A of the undirected graph G plus self-connection, and I is the identity matrix; represents the degree matrix, H is the feature of each layer, l represents the number of layers, W (1) represents the weight matrix of the lth layer; σ is the nonlinear activation function, the formula is: f(x) = max(0,x), x is the input data.
[0076] On the basis of the above, a fully connected layer is used to map the features to the prediction dimension to achieve feature conversion and extraction, laying the foundation for the final prediction. Furthermore, a pooling layer can be set to reduce overfitting.
[0077] Further, the data is input to the CNN layer, local features are extracted through convolution operations, the dimensions are reduced through pooling operations, and multiple convolution layers are used to gradually extract higher-level feature representations, and finally a fully connected layer or other layers are used to perform output predictions. Taking the multivariate time series data input in this embodiment as an example, multi-channel convolution is used to simultaneously process the features of different variables, each channel corresponds to a feature dimension, and each convolution operation is performed on the time dimension, that is, a sliding window operation is performed along the direction of the time step; then the dimension of the time series data is reduced through pooling operations (maximum pooling or average pooling), and the extracted data features are output.
[0078] Furthermore, the historical time series data of each site is input into the corresponding parallel LSTM network, and the LSTM network extracts the long-term time features of the data of each site. The LSTM network includes:
[0079] Input gate: i t =σ(W i [x t ,h t-1 ]+b i );
[0080] Forget gate: f t =σ(W f [x t ,h t-1 ]+b f );
[0081] Output gate: o t =σ(W o [x t ,h t-1 ]+b o );
[0082] Candidate cell state: c′ t =tanh(W c [x t ,h t-1 ]+b c );
[0083] Cell state: c t =f t *c t-1 +i t *c′ t ;
[0084] Hidden state: h t =o t *tanh(c t );
[0085] Among them, σ represents the sigmoid function, it 、f t , o t Corresponding to the switch states of the input gate, forget gate and output gate, x t is the value of the input sequence at the current moment, h t-1 represents the output of the previous time step, W and b represent the weight matrix and bias vector respectively, and tanh represents the hyperbolic tangent function.
[0086] More complete and comprehensive spatiotemporal information can be extracted in the above manner, thereby enhancing the model's ability to model data and enabling it to better capture the dynamic changes in the data.
[0087] Afterwards, the data structure features are concatenated with the output of each LSTM to further integrate the time series information and spatial features. After that, they are processed by the corresponding fully connected layer and Dropout layer to enhance the generalization ability and stability of the model and reduce the risk of overfitting. The output results are concatenated and finally the actual power prediction values of multiple sites are output.
[0088] In this embodiment, power coordination prediction is performed for 5 distributed photovoltaic power stations. m -t n-1 The historical time series data of is input into the distributed photovoltaic power prediction model. In this model, the parallel CNN and GCN of branch one respectively extract the short-term time features and inter-site spatial features of the input data; each LSTM of branch two respectively extracts each site t m -t n-1 The long-term time characteristics of the historical time series data, such as the input data of the first branch LSTM is the first photovoltaic power station site t m -t n-1 The historical time series data at the moment is used to extract the long-term time features of the data. The input data of the second branch LSTM is the second photovoltaic power station site t m -t n-1 The historical time series data at the moment, extract the long-term time characteristics of the data, ..., and so on, and finally output each site t n The actual power forecast value at the moment.
[0089] Furthermore, considering the network model hyperparameters such as learning rate, hidden layer dimension, dropout value, etc., the default values of 0.01, 64, 0.1, etc. are usually used. The default values may not necessarily enable the network model to achieve optimal performance. Therefore, the model hyperparameters need to be set according to the specific situation of the data to ensure its optimal performance. To this end, for the above-mentioned distributed photovoltaic power collaborative prediction model, this embodiment uses the whale optimization algorithm to optimize the model hyperparameters. The whale optimization algorithm is an automatic parameter adjustment algorithm that can automatically help find the optimal hyperparameters of the model. This embodiment uses the whale optimization algorithm to optimize the model hyperparameters, which specifically includes the following steps:
[0090] First, initialize the number of whales and the maximum number of iterations, and randomly initialize to generate a group of whales, which represents a set of model hyperparameters; the model hyperparameters include the number of hidden units hidden_size of the LSTM layer, the dropout ratio p (used for regularization to prevent overfitting), the dropout value, the learning rate I (used to adjust the step size during model training), etc.
[0091] Secondly, the fitness of each whale is calculated through a preset function to determine the position of the current optimal whale, so as to train the model and return the loss value of the model on the test set; the loss value is calculated based on the predicted power and the actual power, with the root mean square error, mean absolute error and coefficient of determination as indicators. In this step, the model is trained with the current hyperparameters and the loss value is returned. The lower the loss value, the higher the fitness.
[0092] Then, by randomly searching in the search space, the whale position is updated based on the fitness, and the next iteration of training is performed based on the updated position. In this step, each whale moves in the search space, trying to imitate the position of the leading whale (i.e., the best solution), that is: the whale first randomly explores in the search space and tries to find a better solution. Once a better solution is found, the whale will conduct a local search in the area to refine the quality of the solution. If the position of a whale (i.e., the hyperparameter combination) leads to a lower loss value than the current leading whale, then the whale will become the new leading whale, that is, the position of the best solution is updated. In addition, after each position update, it is necessary to ensure that the hyperparameter value remains within the preset range to ensure the stability and effectiveness of the model training.
[0093] Finally, the training iteration is continued until the maximum number of iterations is reached. That is, when the maximum number of iterations is reached or the quality of the solution reaches the preset threshold, the algorithm terminates. At this time, the hyperparameter combination with the lowest test loss is output, and the optimal hyperparameter combination is obtained and assigned to the prediction model. In addition, a graph showing the change in loss value with the number of iterations is drawn to show the convergence process of the algorithm. Finally, a prediction model is established based on the obtained optimal hyperparameter combination, and distributed photovoltaic power prediction is performed based on the model.
[0094] In this embodiment, the whale optimization algorithm is used to optimize the hyperparameters of the constructed model, and the optimal solution is effectively searched in the complex hyperparameter space by simulating the social behavior and predation strategy of whales. Through the whale algorithm, the optimal solution can be effectively searched in a global range, thereby improving the prediction performance of the model.
[0095] Furthermore, the constructed data training set and test set are used to train and test the model. During the model training process, the following indicators are used to evaluate its performance and calculate the loss value based on the power prediction value and the actual power value. The indicators include:
[0096] (1) Root mean square error (RMSE): RMSE is an indicator that measures the difference between the model's predicted value and the actual value. It is calculated by taking the square root of the average of the squares of the difference between the predicted value and the actual value. The lower the RMSE, the smaller the deviation between the model's predicted result and the true value, and the better the prediction performance. A smaller RMSE value indicates that the model fits the data more accurately. The formula for calculating the root mean square error is:
[0097]
[0098] In the above formula, y i is the true value, is the predicted value.
[0099] (2) Mean absolute error (MAE): MAE is the average of the absolute errors between the predicted value and the actual value. It is used to measure the average error between the predicted value and the actual value. Its advantage is that it is not sensitive to outliers, so it can better reflect the robustness of the model. The smaller the MAE value, the stronger the prediction ability of the model. The calculation formula of the mean absolute error is:
[0100] (3) Coefficient of determination (R-squared): The coefficient of determination is a statistic that measures the proportion of the variance of the target variable explained by the independent variable in the model and measures the goodness of fit of the model to the observed data. Its value range is between 0 and 1. The closer the R-squared is to 1, the better the model fits the data, and vice versa. The calculation formula for the coefficient of determination is:
[0101] R 2 =1-(SSR / SST);
[0102] In the above formula, SST (total sum of squares) represents the total sum of squares, and SSR (regression sum of squares) represents the regression sum of squares.
[0103] Using the above indicators to evaluate model performance to train the model can effectively help verify the role of the proposed data processing method and feature engineering in improving model performance. By introducing the above indicators, the effectiveness and superiority of the proposed method can be objectively evaluated and proved.
[0104] Finally, in order to verify the superiority of the method proposed in this embodiment, the root mean square error RMSE, mean absolute error MAE and determination coefficient R 2 The value is used as an indicator to evaluate the prediction performance of this embodiment and other traditional prediction models (such as a single LSTM model, CNN model or other deep learning models, etc.). The power prediction of different models is performed using the same test set, and the evaluation indicators of different models are compared, such as Figure 4 As shown, it is obvious that the performance of the distributed photovoltaic power collaborative prediction model proposed in this embodiment is better.
[0105] Embodiment 2
[0106] This embodiment provides a distributed photovoltaic power collaborative prediction system based on a graph structure network, including:
[0107] A data acquisition module is used to acquire historical data of all sites of a distributed photovoltaic power station; the historical data includes historical data of climate influencing factors and historical power data;
[0108] The data preprocessing module is used to preprocess the historical data and obtain the historical time series data of each site;
[0109] The distributed photovoltaic power collaborative prediction module is used to input the historical time series data of all sites into the distributed photovoltaic power collaborative prediction model. The model is composed of a multi-layer CNN, GCN, and LSTM network, and is divided into two parallel branches. Branch one is a parallel CNN and GCN network, which respectively extracts the short-term time features and inter-site spatial features of the input data; branch two is a plurality of parallel LSTM networks, which respectively extract the long-term time features of the data of each site; the outputs of the CNN and GCN networks are spliced, and then spliced with the output of each LSTM network respectively, and then spliced after the corresponding fully connected layer to output the actual power prediction value of each site.
[0110] Embodiment 3
[0111] This embodiment provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the distributed photovoltaic power collaborative prediction method based on a graph structure network as described above are completed.
[0112] Embodiment 4
[0113] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps in the distributed photovoltaic power collaborative prediction method based on a graph structure network as described above are completed.
[0114] The steps involved in the above embodiments 2 to 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0115] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0116] The above description is only a preferred embodiment of the present invention. Although the specific implementation mode of the present invention is described in conjunction with the accompanying drawings, it is not a limitation of the protection scope of the present invention. Those skilled in the art should understand that on the basis of the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative work are still within the protection scope of the present invention.
Claims
1. A distributed photovoltaic power collaborative prediction method based on graph structure network, Its characteristics are: include: Obtaining historical data of all sites of the distributed photovoltaic power station; the historical data includes historical data of climate influencing factors and historical power data; Perform data preprocessing on historical data to obtain historical time series data for each site; The historical time series data of all sites are input into the distributed photovoltaic power collaborative prediction model. The model is composed of a multi-layer CNN, GCN, and LSTM network, and is divided into two parallel branches. Branch one is a parallel CNN and GCN network, which respectively extracts the short-term time characteristics of the input data and the spatial characteristics between sites; Branch 2 consists of multiple parallel LSTM networks, which extract the long-term temporal features of each site data; After the outputs of the CNN and GCN networks are spliced, they are spliced with the outputs of each LSTM network respectively, and then spliced again after passing through the corresponding fully connected layers to output the actual power prediction value of each site.
2. The distributed photovoltaic power collaborative prediction method based on a graph structure network as claimed in claim 1, Its characteristics are: The climate influencing factors include radiation intensity, temperature, air pressure, and humidity; the power includes actual power and rated power.
3. The distributed photovoltaic power collaborative prediction method based on a graph structure network as claimed in claim 1, Its characteristics are: The screening of climate influencing factors includes: Obtain historical data of various climate factors and power at each site of distributed photovoltaic power stations; Normalize the acquired historical data; The Spearman correlation analysis method was used to calculate the correlation between different climate factor data and actual power data at different sites, and the climate influencing factors were screened based on the correlation.
4. The distributed photovoltaic power collaborative prediction method based on a graph structure network as claimed in claim 3, Its characteristics are: The various climate factors include radiation intensity, temperature, air pressure, humidity, precipitation, and wind speed.
5. The distributed photovoltaic power collaborative prediction method based on graph structure network according to claim 1, Its characteristics are: Perform data preprocessing on historical data, including: The historical data of each site is sliced using sliding windows, abnormal data is eliminated, standardized, and converted to a time format to obtain historical time series data.
6. The distributed photovoltaic power collaborative prediction method based on a graph structure network according to claim 1, Its characteristics are: Construct a distributed photovoltaic power collaborative prediction model and use the whale optimization algorithm to optimize the model hyperparameters, including: Initialize the number of whales and the maximum number of iterations, and randomly initialize a group of whales to represent a set of model hyperparameters; Calculate the fitness of each whale, determine the position of the current optimal whale, train the model and return the loss value of the model on the test data set; the loss value is calculated based on the predicted power and the actual power, with the root mean square error, mean absolute error and determination coefficient as indicators; By randomly searching in the search space, the whale position is updated based on the fitness, and the next iteration of training is performed based on the updated position; The training iterations are continued until the maximum number of iterations is reached, at which time the optimal hyperparameter combination is obtained and assigned to the prediction model.
7. A distributed photovoltaic power collaborative prediction system based on graph structure network, Its characteristics are: include: A data acquisition module is used to acquire historical data of all sites of a distributed photovoltaic power station; the historical data includes historical data of climate influencing factors and historical power data; The data preprocessing module is used to preprocess the historical data and obtain the historical time series data of each site; The distributed photovoltaic power collaborative prediction module is used to input the historical time series data of all sites into the distributed photovoltaic power collaborative prediction model. The model is composed of a multi-layer CNN, GCN, and LSTM network and is divided into two parallel branches. Branch one is a parallel CNN and GCN network, which respectively extracts the short-term time characteristics of the input data and the spatial characteristics between sites; Branch 2 consists of multiple parallel LSTM networks, which extract the long-term temporal features of each site data; After the outputs of the CNN and GCN networks are spliced, they are spliced with the outputs of each LSTM network respectively, and then spliced again after passing through the corresponding fully connected layers to output the actual power prediction value of each site.
8. The distributed photovoltaic power collaborative prediction system based on graph structure network as claimed in claim 7, Its characteristics are: The climate influencing factors include radiation intensity, temperature, air pressure, and humidity; the power includes actual power and rated power.
9. An electronic device, Its characteristics are: The method comprises a memory and a processor and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of a distributed photovoltaic power collaborative prediction method based on a graph structure network as described in any one of claims 1 to 6 are completed.
10. A computer-readable storage medium, Its characteristics are: Used to store computer instructions, which, when executed by a processor, complete the steps of a distributed photovoltaic power collaborative prediction method based on a graph structure network as described in any one of claims 1-6.
Citation Information
Cited By
A method for improving the spatial resolution of distributed optical fiber sensing systems
CN119760431A
Power plant relay protection setting value optimization method and system based on optimization algorithm
CN119813079A
A power plant relay protection setting optimization method and system based on optimization algorithm
CN119813079B
Generating capacity prediction method of photovoltaic power generation system
CN120474010A
Photovoltaic power forecasting method and apparatus, electronic device, and storage medium
WO2026170342A1
