Short-term photovoltaic generating capacity prediction method

By constructing a hybrid model of CNN-GRU-SE and IPSO-GRU components, and combining weather images and meteorological data, the accuracy problem of photovoltaic power generation forecasting is solved, and the stability and efficiency of short-term power generation forecasting are improved. This model is applicable to power generation forecasting for photovoltaic power plants and power systems.

CN121507680APending Publication Date: 2026-02-10JINQIANMAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511325777.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing photovoltaic power generation prediction methods suffer from problems such as limited data characteristics and insufficient model generalization ability, resulting in the randomness and volatility of power generation having a significant impact on the stability of the power grid system, making it difficult to accurately predict short-term photovoltaic power generation.

Method used

A hybrid attention-based model is constructed, consisting of CNN-GRU-SE and IPSO-GRU components. It combines weather image data and meteorological data collected by an all-sky imager. The CNN module extracts image features, the GRU network captures temporal features, the SE module implements the channel attention mechanism, and the IPSO optimization algorithm is used to optimize model parameters and improve prediction accuracy.

Benefits of technology

It improves the accuracy of photovoltaic power generation forecasting, reduces the impact of power generation randomness and volatility on the power grid system, enhances the stability and efficiency of the model, and is applicable to power generation forecasting for photovoltaic power plants and power systems. It helps system operators plan and manage loads and reduce costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121507680A_ABST
    Figure CN121507680A_ABST
Patent Text Reader

Abstract

The invention discloses a short-term photovoltaic generating capacity prediction method. The method comprises the following steps: constructing an attention-based hybrid model consisting of a CNN-GRU-SE component for processing weather image data and an IPSO-GRU component for processing meteorological data and based on IPSO optimization; training and testing the attention-based hybrid model by adopting a training data set; and acquiring meteorological data and weather image data of the photovoltaic power plant at the current moment, and predicting the short-term power generation power of the photovoltaic power plant in the next period of time through the trained attention-based hybrid model. According to the method, the spatial feature extraction capability of the convolutional neural network and the time sequence feature prediction capability of the GRU are fused, so that space and time modes can be effectively learned from input data, and the performance is improved compared with that of a single model.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present application is a divisional application of the original application with the application number: 202410600529.0 and the filing date: May 15, 2024, and the original application has the theme of "a short-term photovoltaic power generation prediction method and device". TECHNICAL FIELD

[0002] The present application relates to the technical field of photovoltaic power generation, in particular to a short-term photovoltaic power generation prediction method. BACKGROUND

[0003] Solar photovoltaic power generation refers to the power generation technology of converting solar energy into electric energy by using photovoltaic modules. Solar photovoltaic power generation is a novel and promising comprehensive energy utilization method, which has the advantages of low environmental pollution, no air and water resource pollution, no noise pollution, site adaptation, low installation cost, etc. Accurate prediction of the power generated in the photovoltaic power generation process can greatly reduce the influence of the randomness and volatility of power generation on the stability of the power grid system, which is beneficial to the balanced operation and optimal scheduling, and reduces the operation cost. However, photovoltaic power generation will be affected by many factors, such as season, weather, global solar radiation, wind speed, etc., and large fluctuations are easy to occur under different weather conditions, and photovoltaic power generation has the characteristics of randomness, volatility and intermittency. Photovoltaic power generation prediction is a complex task. Since short-term solar photovoltaic power generation prediction is an important aspect of optimizing the operation and control of renewable energy systems and power markets, the demand for short-term solar photovoltaic power generation prediction and its effective use in renewable energy applications has increased in many cities.

[0004] Although there are many photovoltaic power generation prediction methods at present, most of them are based on traditional recurrent neural networks and their variant models, and there are problems such as single data features and insufficient model generalization ability. Therefore, how to more accurately predict the short-term power generation of solar photovoltaic power generation and reduce the influence of the randomness and volatility of power generation on the stability of the power grid system has become a technical problem that needs to be solved in the field. SUMMARY

[0005] In view of the above problems, the present application provides a short-term photovoltaic power generation prediction method and device to improve the accuracy of the short-term power generation prediction of solar photovoltaic power generation and reduce the influence of the randomness and volatility of power generation on the stability of the power grid system.

[0006] To achieve the above purpose, a short-term photovoltaic power generation prediction method is provided, which comprises the following steps:

[0007] constructing an attention-based hybrid model composed of a CNN-GRU-SE component for processing weather image data and an IPSO-GRU component based on IPSO optimization for processing meteorological data, wherein the weather image data is image data collected by an all-sky imager, and the meteorological data includes any one or more of temperature, humidity, wind speed, and solar radiation;

[0008] collecting power generation data, meteorological data, and weather image data of the photovoltaic power plant, and pre-processing and feature selection are performed on the meteorological data and the weather image data to obtain a training data set;

[0009] training and testing the attention-based hybrid model using the training data set;

[0010] obtaining meteorological data and weather image data of the photovoltaic power plant at the current time, and predicting the short-term power generation of the photovoltaic power plant in the next period of time by using the trained attention-based hybrid model;

[0011] The CNN-GRU-SE component includes a CNN module, a GRU network, and an SE module.

[0012] The CNN module is a CNN module for extracting image features, including a convolutional layer using ReLU as an activation function, a batch normalization layer, a MaxPooling layer for reducing the dimension of data and highlighting the most important features, a Dropout layer, and a Flattern layer for converting multi-dimensional output to one-dimensional format.

[0013] The GRU network is used to arrange the features extracted by the CNN module as input to capture the internal dynamic change rules and time-dependent relationships of the data.

[0014] The SE module is used to explicitly determine the interdependence between different feature channels in the hybrid model to realize a channel-based attention mechanism.

[0015] To solve the above technical problems, another technical solution is provided:

[0016] A short-term photovoltaic power generation prediction device, comprising:

[0017] An attention-based hybrid model composed of a CNN-GRU-SE component for processing weather image data and an IPSO-GRU component based on IPSO optimization for processing meteorological data, wherein the weather image data is image data collected by an all-sky imager, and the meteorological data includes any one or more of temperature, humidity, wind speed, and solar radiation;

[0018] The data acquisition module is configured to acquire power generation data, meteorological data and weather image data of the photovoltaic power plant, and to preprocess and select features of the meteorological data and the weather image data to obtain a training data set.

[0019] The training module is configured to train and test the attention-based hybrid model by using the training data set.

[0020] The prediction module is configured to acquire meteorological data and weather image data of the photovoltaic power plant at a current time, and to predict short-term power generation of the photovoltaic power plant in a subsequent period of time by using the trained attention-based hybrid model.

[0021] The CNN-GRU-SE component includes a CNN module, a GRU network and an SE module.

[0022] The CNN module is a CNN module for extracting image features, and includes a convolutional layer using ReLU as an activation function, a batch normalization layer, a MaxPooling layer for reducing the dimension of data and highlighting the most important features, a Dropout layer, and a Flattern layer for converting multi-dimensional output into one-dimensional format.

[0023] The GRU network is a GRU neural network model, which is configured to arrange the features extracted by the CNN module as input to capture internal dynamic change rules and time-dependent relationships of data.

[0024] The SE module is configured to explicitly determine the interdependence between different feature channels in the hybrid model to realize a channel-based attention mechanism.

[0025] Different from the prior art, the CNN neural network can effectively extract the spatial features of the data set, and the GRU neural network has the ability to extract time features and can find the change rule of the photovoltaic power generation data. In the short-term photovoltaic power generation prediction method, the spatial feature extraction ability of the convolutional neural network and the time sequence feature prediction ability of the GRU are combined, so that the spatial and temporal patterns can be effectively learned from the input data, thereby improving the performance compared with a single model. The model can also benefit from using high-resolution images as input data, which can not only process the input image in more detail by increasing the convolutional layer, but also use a more dense data set to train the model. The model is widely applicable to accurate prediction of power generation of photovoltaic power plants and power systems, and can help system operators to plan and manage load and power generation, reduce cost and improve overall system efficiency.

[0026] The above summary related to the invention is only a summary of the technical solutions of the present application. In order to enable those skilled in the art to more clearly understand the technical solutions of the present application, and then can be implemented according to the content of the description and the drawings, and in order to let the above-mentioned purposes and other purposes, characteristics and advantages of the present application can be more easily understood, the following is described in conjunction with the specific embodiments of the present application and the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0027] The drawings are only used to show the principles, implementation manners, applications, characteristics and effects of the specific embodiments of the present application and other related contents, and cannot be considered as the limitation of the present application.

[0028] In the drawings of the specification:

[0029] Figure 1 Flow chart of the short-term photovoltaic power generation amount prediction method described in the specific embodiment;

[0030] Figure 2 Schematic diagram of the weather image data collected by the all-sky imager in the specific embodiment;

[0031] Figure 3 Module block diagram of the short-term photovoltaic power generation amount prediction device described in the specific embodiment;

[0032] Figure 4 Flow chart of the short-term photovoltaic power generation amount prediction method described in the specific embodiment;

[0033] Figure 5 Specific flow chart of the short-term photovoltaic power generation amount prediction method described in another specific embodiment;

[0034] The reference signs involved in the above drawings are explained as follows:

[0035] 300, short-term photovoltaic power generation amount prediction device; 301, hybrid model; 302, data acquisition module; 303, training module; 304, prediction module; DETAILED DESCRIPTION

[0036] In order to explain the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved of the present application in detail, the following is described in conjunction with the specific embodiments listed and the accompanying drawings. The embodiments described in this paper are only used to more clearly explain the technical solutions of the present application, therefore only as an example, and cannot limit the protection scope of the present application.

[0037] The term "embodiment" is mentioned in this document means that the specific features, structures or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in this application, as long as there is no technical contradiction or conflict, the technical features mentioned in each embodiment can be combined in any way to form a corresponding implementable technical solution.

[0038] Unless otherwise defined, the meaning of technical terms used in this document is the same as that generally understood by those skilled in the art to which the present application belongs; the use of related terms in this document is only for the purpose of describing specific embodiments, and is not intended to limit the present application.

[0039] In the description of the present application, the phrase "and / or" is a description of the logical relationship between the objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this document generally represents that the associated objects before and after are a "or" logical relationship.

[0040] In this application, such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual quantity, primary and secondary or order relationship between them.

[0041] In this application, without more limitation, the "includes", "contains", "has" or other similar open expressions used in the statement are intended to cover non-exclusive inclusion, and these expressions do not exclude the presence of other elements in the process, method or product including the described elements, so that the process, method or product including a series of elements can not only include those limited elements, but also include other elements not explicitly listed, or also include the elements inherent in such process, method or product.

[0042] As the same as the understanding in the "Guidelines for Examination", in this application, "greater than", "less than", "exceed" and other expressions are understood as not including the number; "above", "below", "within" and other expressions are understood as including the number. In addition, the meaning of "multiple" in the description of the embodiments of the present application is more than two (including two), and similar expressions related to "multiple" are also understood in this way, for example, "multiple groups", "multiple times" and the like, unless otherwise explicitly limited.

[0043] In the description of the embodiments of the present application, the spatially relative terms used, such as "central", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the specific embodiment or the drawing, and is only for the convenience of describing the specific embodiment of the present application or for the reader to understand, and does not indicate or imply that the indicated device or component must have a particular position, a particular orientation, or be constructed or operated in a particular orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.

[0044] Unless otherwise expressly specified or limited, the terms "mount", "connect", "connection", "fixed", "set", and the like used in the description of the embodiments of the present application should be interpreted broadly. For example, the "connection" can be a fixed connection, or a detachable connection, or an integral setting; it can be a mechanical connection, or an electrical connection, or a communication connection; it can be a direct connection, or an indirect connection through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art to which the present application belongs, the specific meaning of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0045] Please refer to Figures 1 to 5 The present embodiment provides a short-term photovoltaic power generation prediction method and a short-term photovoltaic power generation prediction device. The short-term photovoltaic power generation prediction method and device can be applied to short-term power generation prediction of a solar photovoltaic power plant. For example, the power generation power and the power generation capacity in the next 15 minutes or half an hour can be predicted.

[0046] Please refer to Figure 1 A short-term photovoltaic power generation prediction method, comprising the steps of:

[0047] S101, constructing an attention-based hybrid model composed of a CNN-GRU-SE component for processing weather image data and an IPSO-GRU component based on IPSO optimization for processing meteorological data;

[0048] S102, collecting power generation data, meteorological data and weather image data of the photovoltaic power plant, and pre-processing and feature selection of the meteorological data and the weather image data to obtain a training data set;

[0049] S103, training and testing the attention-based hybrid model using the training data set;

[0050] S104. Obtain the meteorological data and weather image data of the photovoltaic power plant at the current moment, and predict the short-term power generation of the photovoltaic power plant in the next period of time through the trained attention-based hybrid model.

[0051] In step S101, the weather image data is image data acquired by an all-sky imager, specifically hemispherical weather image data, and the meteorological data includes any one or more of temperature, humidity, wind speed, and solar radiation.

[0052] Furthermore, in step S101, the CNN-GRU-SE component includes a CNN module, a GRU network, and an SE module. The CNN module, used for extracting image features, includes a convolutional layer using ReLU as the activation function, a batch normalization layer, a MaxPooling layer for reducing data dimensionality and highlighting the most important features, a Dropout layer, and a Flattern layer for converting multidimensional output into a one-dimensional format. The GRU network is used to arrange the features extracted by the CNN module as input to capture the internal dynamic change rules and temporal relationships of the data. The SE module is used to clarify the interdependencies between different feature channels within the hybrid model to achieve a channel-based attention mechanism.

[0053] Building the CNN-GRU-SE component for processing weather image data includes the following steps:

[0054] A CNN module for extracting image features is constructed, and the CNN module includes the following:

[0055] A convolutional layer using 32 filters with a kernel size of (3*3) and ReLU as the activation function;

[0056] Batch normalization layers were added to enhance model stability and overall performance. By reducing internal covariate bias, the input distribution of network layers becomes more stable, thus accelerating training convergence. Sensitivity to initialization was reduced. Standardizing input data reduced the dependence on parameter initialization quality, improving the robustness of model training.

[0057] A 2x2 MaxPooling layer is used to reduce the dimensionality of the data and highlight the most important features. Pooling layers effectively reduce the size of the parameter matrix, thus reducing the number of parameters in the final connected layers. Simultaneously, pooling layers expand the receptive field of the convolutional layers, extracting more global network features.

[0058] A Dropout layer designed to prevent the model from overfitting;

[0059] A Flattern layer that converts multidimensional output into a one-dimensional format;

[0060] The GRU network construction also includes the following:

[0061] The GRU network is a good variant of LSTM. The calculation formula for the GRU network is as follows:

[0062] z t =σ(W z ·[h t-1 x t ]);

[0063] r t =σ(W r ·[h t-1 x t ]);

[0064]

[0065] Where, x t h represents the current state. t-1 Let z represent the previous hidden state, σ be the sigmoid activation function, and z be the z-axis. t It's an update gate, used to filter information, W z The retention process used to control the input of new and old information at time t, r t It's a reset door, used to filter information, W r Used to control the degree to which input information is retained at each position at time t-1. It is the state candidate set at the current moment.

[0066] In the proposed model, a two-layer GRU network structure arranges the features extracted by the CNN module and uses them as input, fully capturing the internal dynamic changes and temporal relationships of the data. The GRU network can capture the temporal dependencies and dynamic changes in a data sequence; that is, the data at a later time point depends on the data at previous time points. Assuming there are a total of i time steps, the GRU network at time step t... t The hidden state output is shown below:

[0067] h t =GRU(P t ,h' t-1 );

[0068] Where GRU() represents the entire forward computation process of the GRU architecture, P t It is the input of the second GRU layer at time step t, h' t-1 It is the output of the hidden state of the second GRU layer at the previous time step.

[0069] Furthermore, the attention-based SE module includes the following steps:

[0070] The SE module consists of three parts: squeeze operation, excitation operation, and scaling operation. Its purpose is to realize a channel-based attention mechanism by explicitly modeling the interdependencies between different feature channels.

[0071] The first step is the squeezing operation, which involves global pooling of the input features. Each feature channel is squeezed into a real number, called a channel descriptor, representing the statistical information of the corresponding channel. This is typically implemented using global average pooling, and the unweighted feature map U is summed and averaged to obtain a multi-dimensional vector Z, whose nth element z... n The calculation is as follows:

[0072]

[0073] Among them, z n H represents the nth element, and H and W represent the width and height of the feature map, respectively. n It is the feature vector of the nth channel in the input features. n (i, k) is u n The elements in the i-th row and k-th column.

[0074] The activation operation uses two fully connected (FC) layers to fully learn the descriptor of each channel and explore the relationships between different feature channels. Under the activation operation, each feature channel is dynamically weighted through a corresponding activation function. The characteristics of this process are as follows:

[0075]

[0076] Where σ and δ represent the sigmoid and ReLU activation functions, respectively, W1 and W2 are the weight parameters of the two FC layers, and s is a vector representing the weight of each channel in the feature map U.

[0077] Finally, the final output of the SE module is obtained through scaling operations, where the weight vector s and the unweighted input feature map U are multiplied according to their respective channels. The output of the nth channel is calculated as follows:

[0078]

[0079] in This is the final total output, s n It is the weight of the nth feature channel.

[0080] In the proposed model, a channel attention module based on the Squeeze-and-Excitation (SE) module is integrated with a CNN-GRU hybrid network to enhance the influence of important features and avoid feature redundancy. The SE module introduces a channel attention mechanism, allowing the neural network to focus more on features important to the current task. The SE module uses a weight matrix to assign different weights to different positions of the data from the perspective of the channel domain, thereby obtaining more important feature information.

[0081] Under squeezing and excitation operations, the weights of the GRU network's hidden state output at different time steps can be adaptively learned. For the output h of the GRU network at time step t... t The final result is obtained after weighting by the channel attention module.

[0082] Finally, the weighted hidden state outputs of the GRU network under different conditions are concatenated into a vector using the Flattern operation, represented as follows: The output layer takes a vector as input and uses the sigmoid activation function to calculate the power generation prediction result through a fully connected (FC) layer. The Flattern operation, also known as tensor flattening, outputs a flattened array, allowing the time steps to be concatenated into a vector. The output y of the attention-based CNN-GRU is shown below:

[0083]

[0084] In this embodiment, historical power generation data and meteorological data are collected and preprocessed according to the following steps:

[0085] Reducing the resolution of the acquired hemispherical high-resolution weather image data to 64*64 pixels reduces the memory requirements for image storage and allows for faster model training with less memory. Furthermore, converting the images to grayscale further reduces the memory required for image storage and simplifies the analysis of visual features used by the model for prediction. Although reducing the image resolution and converting to grayscale might seem to result in significant information loss, this did not significantly affect the model's prediction accuracy for future photovoltaic power generation. Even in these lower-resolution images, key details such as cloud cover extent, cloud location, and the direction and speed of cloud movement are preserved. This lower resolution allows the model to effectively predict energy generation by preserving key image features. Moreover, the lower-resolution images help minimize noise and irrelevant cloud details that could interfere with the model, allowing it to focus on the most relevant information. Therefore, by reducing the amount of data processed during training, training efficiency is improved, resulting in shorter training time and increased overall efficiency.

[0086] The collected meteorological data undergoes preprocessing to make it suitable for learning. This stage includes data normalization, most commonly data standardization, and splitting the data into training, validation, and test sets. Data normalization improves the model's learning efficiency in feature detection, while data splitting helps evaluate model performance and generalization ability across different datasets. Furthermore, the data in the database must be converted into time-series data sequences suitable for GRU network analysis. GRU networks can process data containing time-series information, remember previous input information during training, and handle data with dependencies. Therefore, in this embodiment, continuous time-series data should be collected, rather than discontinuous (single-point) data.

[0087] Collected poor data, such as data from equipment malfunctions, undergoes manual preprocessing to reduce the impact of data quality on prediction accuracy. Poor data mainly includes empty data points, zero data points, outlier step sizes, and continuous constant values. Different preprocessing methods are typically used for different types of poor data. During data preprocessing, isolated outliers are treated as individual bad data points.

[0088] The data was analyzed and filtered for features. Since a large amount of meteorological data was collected, some of it may not contribute much to the predicted variables and may only become noise affecting the prediction results. Therefore, the Pearson correlation coefficient was used to analyze the feature data with the strongest correlation to power generation and to exclude some feature values ​​with weak correlation that have almost no contribution to the prediction results.

[0089] A hybrid model was constructed, consisting of a CNN-GRU-SE component for processing weather imagery data and an IPSO-GRU component based on IPSO optimization for processing meteorological data, to predict the power output of a photovoltaic (PV) power plant. The model processes a series of hemispherical sky images and corresponding meteorological data on PV power generation over the previous 45 minutes, with the goal of predicting power generation 15 minutes after the last time point.

[0090] In one embodiment, the IPSO-GRU-based component includes the following:

[0091] An improved particle swarm optimization (IPSO) algorithm is used to optimize the parameters of the GRU network, including:

[0092] Initialize the particle population and determine parameters such as particle position, particle size, and particle boundary.

[0093] When particle position is used as network parameter, the loss function obtained by the neural network is used as particle fitness, and the mean square error between the true value and the predicted value is used as the training loss function.

[0094] Based on the current best fitness value of the individual in the current iteration or the historical best fitness value, save the position of the particle with the best fitness value.

[0095] The process involves multiple iterations, using the particle position with the best historical fitness as the initial weights for the GRU network.

[0096] The attention-based CNN-GRU model further includes the following steps:

[0097] The feature vectors output by the CNN-GRU-SE component and the feature vectors output by the IPSO-GRU component are combined side-by-side and then input into a fully connected layer for final prediction, resulting in the predicted data for photovoltaic power generation. The fully connected layer is a neural network layer (with multiple neural nodes) that connects the features after final feature merging, thus combining the features to obtain the final predicted value.

[0098] like Figure 3 As shown, in one embodiment, a short-term photovoltaic power generation prediction device 300 is provided, which includes an attention-based hybrid model 301, a data acquisition module 302, a training module 303, and a prediction module 304.

[0099] The attention-based hybrid model 301 consists of a CNN-GRU-SE component for processing weather image data and an IPSO-GRU component for processing meteorological data optimized by IPSO. The weather image data is image data acquired by an all-sky imager, and the meteorological data includes any one or more of temperature, humidity, wind speed, and solar radiation.

[0100] The data acquisition module 302 is used to collect power generation data, meteorological data, and weather image data from the photovoltaic power plant, and to preprocess and select features from the meteorological data and weather image data to obtain a training dataset. The training module 303 is used to train and test the attention-based hybrid model using the training dataset. The prediction module 304 is used to acquire the current meteorological data and weather image data of the photovoltaic power plant, and to predict the short-term power generation of the photovoltaic power plant in the coming period using the trained attention-based hybrid model.

[0101] The CNN-GRU-SE component comprises a CNN module, a GRU network, and an SE module. The CNN module, used for extracting image features, includes a convolutional layer using ReLU as the activation function, a batch normalization layer, a MaxPooling layer to reduce data dimensionality and highlight the most important features, a Dropout layer, and a Flattern layer to convert the multidimensional output into a one-dimensional format. The GRU network arranges the features extracted by the CNN module as input to capture the internal dynamic rules and temporal relationships of the data. The SE module defines the interdependencies between different feature channels within the hybrid model to implement a channel-based attention mechanism.

[0102] The SE module includes a squeezing operation, an excitation operation, and a scaling operation. The squeezing operation performs global pooling on the input features, squeezing each feature channel into a channel descriptor, which represents the statistical information of the corresponding feature channel. The excitation operation uses two fully connected (FC) layers to learn the channel descriptor for each feature channel and explores the relationships between different feature channels. Under the excitation operation, each feature channel is dynamically weighted through a corresponding activation function. The scaling operation obtains the final output of the SE module, in which the weight vector s and the unweighted input feature map U are multiplied according to their corresponding channels.

[0103] The output of the nth channel is calculated as follows:

[0104]

[0105] in This is the final total output, s n It is the weight of the nth feature channel;

[0106] Under the squeezing and excitation operations, the weights of the hidden state output of the GRU network at different time steps are adaptively learned. For the output h of the GRU network at time step t... t The final result is obtained after weighting by the channel attention module.

[0107] The weighted hidden state outputs of the GRU network under different conditions are concatenated into a vector using the Flattern operation, representing the following: The output layer takes a vector as input and uses the sigmoid activation function to calculate the power generation prediction result through the fully connected (FC) layer; the output y of CNN-GRU-SE is shown below:

[0108]

[0109] Where σ represents the sigmoid activation function, and W is the weight parameter of the FC layer. is the vector obtained by the Flattern operation, and b is the bias parameter.

[0110] The IPSO-GRU component is used to optimize the GRU network parameters using an improved particle swarm optimization algorithm, including the following steps:

[0111] Initialize the particle population, determine particle positions, particle sizes, and particle boundaries;

[0112] When the particle position is used as a network parameter, the loss function obtained by the neural network is used as the particle fitness, and the mean square error (MSE) between the true value and the predicted value is used as the training loss function.

[0113] Based on the current best fitness value of the individual in the current iteration or the historical best fitness value, save the position of the particle with the best fitness value.

[0114] The process involves multiple iterations, using the particle position with the best historical fitness as the initial weights for the GRU network.

[0115] The prediction module is also used to combine the feature vectors output by the CNN-GRU-SE component and the feature vectors output by the IPSO-GRU component in parallel, and then input them into the fully connected layer for final prediction to obtain the short-term power generation of the photovoltaic power plant in the next period of time.

[0116] The short-term photovoltaic power generation prediction method described above is applicable to occasions requiring photovoltaic power generation prediction. The following detailed embodiments illustrate this method:

[0117] Please refer to Figure 4 In one embodiment of this application, a short-term photovoltaic power generation prediction method includes the following steps:

[0118] S1. Collect power generation data and meteorological data from photovoltaic power stations, as well as hemispherical weather image data, and perform preprocessing and feature selection;

[0119] S2. Optimize the training and testing of the dataset using the constructed attention-based CNN-GRU model;

[0120] S3. Obtain relevant data from the current power plant and predict power generation.

[0121] Please refer to Figure 5 In another embodiment, a CNN-GRU photovoltaic power generation prediction method based on an attention mechanism includes the following steps:

[0122] A hybrid model was constructed, consisting of a CNN-GRU-SE component for processing weather imagery data and an IPSO-GRU component based on IPSO optimization for processing meteorological data, to predict the power output of a photovoltaic (PV) power plant. The model processes a series of hemispherical sky images and corresponding meteorological data on PV power generation over the previous 45 minutes, with the goal of predicting power generation 15 minutes after the last time point.

[0123] The construction of the CNN-GRU-SE component for processing weather image data further includes the following steps:

[0124] A CNN module for extracting image features is constructed, and the CNN module includes the following:

[0125] A convolutional layer using 32 filters with a kernel size of (3*3) and ReLU as the activation function;

[0126] A batch normalization layer was added to enhance the model's stability and overall performance;

[0127] A MaxPooling layer of size (2*2) is designed to reduce the dimensionality of the data and highlight the most important features;

[0128] A Dropout layer designed to prevent the model from overfitting;

[0129] A Flattern layer that converts multidimensional output into a one-dimensional format;

[0130] The GRU network construction also includes the following:

[0131] The GRU network is a good variant of LSTM. The calculation formula for the GRU network is as follows:

[0132] z t =σ(W z ·[h t-1 x t ]);

[0133] r t =σ(W r ·[h t-1 x t ]);

[0134]

[0135] Where, x t h represents the current state. t-1 Let z represent the previous hidden state, σ be the sigmoid activation function, and z be the z-axis. t It's an update gate, used to filter information, W zUsed to control the degree to which new and old information is retained at time t; r t It's a reset door, used to filter information, W r Used to control the degree to which input information is retained at each position at time t-1. It is the state candidate set at the current moment.

[0136] In the proposed model, a multi-layered GRU network arranges the features extracted by the CNN module and uses them as input, fully capturing the internal dynamic rules and temporal relationships of the data. Assuming there are a total of i time steps, the GRU network at time step t... t The hidden state output is shown below.

[0137] h t =GRU(P t ,h' t-1 );

[0138] Where GRU() represents the entire forward computation process of the GRU architecture, P t It is the input of the second GRU layer at time step t, h' t-1 It is the output of the hidden state of the second GRU layer at the previous time step.

[0139] Furthermore, the attention-based SE module includes the following steps:

[0140] The SE module consists of three parts: squeeze operation, excitation operation, and scaling operation. Its purpose is to realize a channel-based attention mechanism by explicitly modeling the interdependencies between different feature channels.

[0141] The first step is the squeezing operation, which involves global pooling of the input features. Each feature channel is squeezed into a real number, called a channel descriptor, representing the statistical information of the corresponding channel. This is typically implemented using global average pooling, and the unweighted feature map U is summed and averaged to obtain a multi-dimensional vector Z, whose nth element z... n The calculation is as follows:

[0142]

[0143] Among them, z n H represents the nth element, and H and W represent the width and height of the feature map, respectively. n It is the feature vector of the nth channel in the input features. n (i,k) is u n The elements in the i-th row and k-th column.

[0144] The activation operation uses two fully connected (FC) layers to fully learn the descriptor of each channel and explore the relationships between different feature channels. Under the activation operation, each feature channel is dynamically weighted through a corresponding activation function. The characteristics of this process are as follows:

[0145]

[0146] Where σ and δ represent the sigmoid and ReLU activation functions, respectively, W1 and W2 are the weight parameters of the two FC layers, and s is a vector representing the weight of each channel in the feature map U.

[0147] Finally, the final output of the SE module is obtained through scaling operations, where the weight vector s and the unweighted input feature map U are multiplied according to their respective channels. The output of the nth channel is calculated as follows:

[0148]

[0149] in, This is the final total output, s n It is the weight of the nth feature channel.

[0150] In the proposed model, a channel attention module based on the SE module is integrated with a CNN-GRU hybrid network to enhance the influence of important features and avoid feature redundancy. Under the squeezing and excitation operations, the weights of the GRU hidden state output at different time steps can be adaptively learned. For the output h of the GRU network at time step t... t The final result is obtained after weighting by the channel attention module.

[0151] Finally, the weighted hidden state outputs of GRU under different conditions are concatenated into a vector using the Flattern operation, represented as follows: The output layer takes a vector as input and uses the sigmoid activation function to calculate the power generation prediction result through an FC layer. The output y of CNN-GRU-SE is shown below:

[0152]

[0153] In this embodiment, historical power generation data and meteorological data are first collected, including hemispherical weather image data and meteorological data such as solar irradiance, temperature, relative humidity, and air pressure. A CNN-GRU based on an attention mechanism is used to process the weather images to obtain feature vectors based on the hemispherical weather images. Simultaneously, a GRU network is used to process meteorological data such as solar irradiance. Then, the data features are fused together for final power generation prediction. This invention, based on the combination of CNN and GRU, not only effectively learns spatial and temporal patterns from the input data, significantly improving performance, but also incorporates weather image data to mitigate the impact of data anomalies caused by facility failures, avoiding the poor robustness of models that rely solely on meteorological observation data in traditional methods.

[0154] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. A method for predicting short-term photovoltaic power generation, characterized in that, Includes the following steps: A hybrid attention-based model is constructed, consisting of a CNN-GRU-SE component for processing weather image data and an IPSO-GRU component based on IPSO optimization for processing meteorological data. Data on power generation from photovoltaic power plants, meteorological data, and weather image data are collected. The meteorological data and weather image data are preprocessed and feature-selected to obtain a training dataset. The attention-based hybrid model is trained and tested using the training dataset. The system acquires the current meteorological data and weather image data of the photovoltaic power plant, and uses the trained attention-based hybrid model to predict the short-term power generation of the photovoltaic power plant in the coming period. The CNN-GRU-SE component includes a CNN module, a GRU network, and an SE module. The CNN module for extracting image features includes a convolutional layer using ReLU as the activation function, a batch normalization layer, a MaxPooling layer for reducing the dimensionality of the data and highlighting the most important features, a Dropout layer, and a Flattern layer for converting multidimensional output into a one-dimensional format. The GRU network is used to arrange the features extracted by the CNN module and use them as input to capture the internal dynamic change rules and temporal relationships of the data; The SE module is used to clarify the interdependencies between different feature channels within the hybrid model in order to achieve a channel-based attention mechanism; The prediction of short-term power generation of a photovoltaic power plant over a given period using the trained attention-based hybrid model includes: The feature vectors output by the CNN-GRU-SE component and the feature vectors output by the IPSO-GRU component are combined side by side and then input into the fully connected layer for final prediction to obtain the short-term power generation of the photovoltaic power plant in the next period of time. The fully connected layer is a neural network layer with multiple neural nodes, used to combine features to obtain the final predicted value; The preprocessing and feature selection of the meteorological data and the weather image data includes the following steps: The resolution of the collected high-definition weather image data was reduced to 64x64 pixels and converted into grayscale images; The collected meteorological data was normalized and then divided into training, validation, and test sets. Manually remove unwanted data from the meteorological data and the weather image data; the unwanted data includes empty data points, zero data points, abnormal step size values, and continuous constant values. The processed meteorological data and weather image data are subjected to feature analysis and screening, and the feature data with the strongest correlation to power generation is identified using the Pearson correlation coefficient.

2. The short-term photovoltaic power generation prediction method according to claim 1, characterized in that, The SE module includes squeeze operation, excitation operation, and scaling operation; The squeezing operation is used to perform global pooling on the input features, so that each feature channel is squeezed into a channel descriptor, which is used to represent the statistical information of the corresponding feature channel; The activation operation uses two fully connected (FC) layers to learn the channel descriptor for each feature channel and explore the relationships between different feature channels. Under the activation operation, each feature channel is dynamically weighted through a corresponding activation function. The scaling operation is used to obtain the final output of the SE module, in which the weight vector s and the unweighted input feature map U are multiplied according to their corresponding channels. The output of the nth channel is calculated as follows: in This is the final total output, s n It is the weight of the nth feature channel, u n It is the feature vector of the nth channel in the input features; Under the squeezing and excitation operations, the weights of the hidden state output of the GRU network at different time steps are adaptively learned. For the output h of the GRU network at time step t... t The final result is obtained after weighting by the channel attention module. The weighted hidden state outputs of the GRU network under different conditions are concatenated into a vector using the Flattern operation, representing the result as follows: The output layer takes a vector as input and uses the sigmoid activation function to calculate the power generation prediction result through the fully connected (FC) layer; the output y of CNN-GRU-SE is shown below: Where σ represents the sigmoid activation function, and W is the weight parameter of the FC layer. is the vector obtained by the Flattern operation, and b is the bias parameter.

3. The short-term photovoltaic power generation prediction method according to claim 1, characterized in that, The GRU network is a good variant of LSTM, and the calculation formula for the GRU network is as follows: z t =σ(W z ·[h t-1 ,x t ]); r t =σ(W r ·[h t-1 ,x t ]); Where, x t h represents the current state. t-1 Let z represent the previous hidden state, σ be the sigmoid activation function, and z be the z-axis. t It's an update gate, used to filter information, using W. z To control the degree to which new and old information is retained at time t; r t It's a reset door, used to filter information, using W. r To control the degree to which input information is retained at each location at time t-1. It is the state candidate set at the current moment.

4. The short-term photovoltaic power generation prediction method according to claim 1, characterized in that, The IPSO-GRU component is used to optimize the GRU network parameters using an improved particle swarm optimization algorithm, including the following steps: Initialize the particle population, determine particle positions, particle sizes, and particle boundaries; When the particle position is used as a network parameter, the loss function obtained by the neural network is used as the particle fitness, and the mean square error between the true value and the predicted value (MSE) is used as the training loss function. Based on the current best fitness value of the individual in the current iteration or the historical best fitness value, save the position of the particle with the best fitness value. The process involves multiple iterations, using the particle position with the best historical fitness as the initial weights for the GRU network.