Photovoltaic power generation power prediction method, system, device and medium
By using an LSTM-CNN & BP combined neural network model to perform correlation analysis and clustering on the data of factors affecting photovoltaic power generation, spatial and temporal features are extracted, solving the problem of low accuracy in existing photovoltaic power generation prediction models and achieving higher prediction accuracy and generalization performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
- Filing Date
- 2022-10-20
- Publication Date
- 2026-04-24
AI Technical Summary
Existing photovoltaic power generation prediction models have low prediction accuracy and cannot be effectively applied to the randomness and volatility of photovoltaic power generation. In particular, since photovoltaic power generation is affected by many factors, prediction models that extract spatial and temporal features using single convolutional neural networks (CNN) and long short-term memory neural networks (LSTM) have reduced prediction accuracy.
An LSTM-CNN & BP combined neural network model is adopted. Correlation analysis and clustering are performed on the data of the components affecting photovoltaic power generation. Spatial and temporal features are extracted by the LSTM-CNN neural network and prediction is performed by the BP neural network. Training and test sets are constructed, and the final photovoltaic power generation prediction results are output.
It improves the accuracy and generalization performance of photovoltaic power generation prediction, reduces the prediction error of neural network models, fully considers the impact of climate and weather on photovoltaic power generation, and enhances prediction performance.
Smart Images

Figure CN115545164B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic power generation technology, and specifically relates to a method, system, equipment and medium for predicting photovoltaic power generation. Background Technology
[0002] The increasing energy shortage has become a major global problem, and seeking and applying clean and renewable new energy sources has become key to solving the energy problem. Therefore, solar energy, which is abundant, pollution-free, safe, and reliable, has been widely used. However, due to the randomness and volatility of photovoltaic power generation, grid connection becomes difficult. Accurate photovoltaic power generation forecasting is of great significance for the development, utilization, and maintenance of the normal operation of the power system.
[0003] Currently, prediction models based on artificial neural networks have been widely and effectively applied to photovoltaic power generation prediction, meeting practical application needs. However, photovoltaic power generation is affected by many factors, such as temperature and humidity, sky clarity, and hardware factors, and photovoltaic power generation is characterized by nonlinearity and strong fluctuations. At the same time, since photovoltaic power generation has temporal and spatial characteristics, prediction models that use convolutional neural networks (CNN) and long short-term memory neural networks (LSTM) to extract spatial and temporal features have reduced prediction accuracy and cannot be well applied to photovoltaic power generation prediction. Summary of the Invention
[0004] In view of the technical problems existing in the prior art, the present invention provides a photovoltaic power generation prediction method, system, equipment and medium to solve the technical problem of low prediction accuracy of existing photovoltaic power generation prediction models.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] This invention discloses a method for predicting photovoltaic power generation, comprising:
[0007] Obtain data on the components that influence photovoltaic power generation;
[0008] Correlation analysis was performed on the data of the components affecting photovoltaic power generation to obtain the main influencing indicators of photovoltaic power generation.
[0009] Clustering was performed on the main influencing indicators of photovoltaic power generation to obtain clustering results for different weather types;
[0010] The clustering results of the different weather types are used as input to the pre-built photovoltaic power generation prediction model, and the photovoltaic power generation prediction results are output.
[0011] The pre-constructed photovoltaic power generation prediction model is an LSTM-CNN & BP combined neural network prediction model, which includes an LSTM-CNN neural network and a BP neural network.
[0012] Furthermore, the data on the components affecting photovoltaic power generation include sky clarity, atmospheric pressure, photovoltaic module efficiency, photovoltaic module temperature, solar azimuth angle, relative humidity, dry bulb temperature, wind speed, and wind direction.
[0013] Furthermore, the process of performing correlation analysis on the data of the constituent elements affecting photovoltaic power generation to obtain the main influencing indicators of photovoltaic power generation is as follows:
[0014] The Pearson correlation coefficient method was used to conduct correlation analysis on the data of the components affecting the photovoltaic power generation, and the data of the factors with high correlation with the photovoltaic power generation were determined, which is the main influencing index data of the photovoltaic power generation.
[0015] Furthermore, the process of clustering the main influencing indicators of photovoltaic power generation to obtain clustering results for different weather types is as follows:
[0016] The main influencing indicators of photovoltaic power generation are divided according to season, and the K-means clustering algorithm is used to cluster the main influencing indicators of photovoltaic power generation after seasonal division to obtain clustering results for different weather types.
[0017] Furthermore, the process of using the clustering results of different weather types as input to the pre-built photovoltaic power generation prediction model and outputting the photovoltaic power generation prediction result is as follows:
[0018] Based on the clustering results of the different weather types, a training set and a test set are constructed;
[0019] Construct an LSTM-CNN neural network and train it using the training set to obtain the trained LSTM-CNN neural network;
[0020] The test set is input into the trained LSTM-CNN neural network, and the first prediction result is output.
[0021] Construct a BP neural network and train the BP neural network with the training set to obtain the trained BP neural network;
[0022] The test set is input into the trained BP neural network, and the second prediction result is output.
[0023] The first prediction result and the second prediction result are superimposed and summed to output the photovoltaic power generation prediction result.
[0024] Furthermore, the LSTM-CNN neural network includes CNN network units and LSTM network units;
[0025] The CNN network unit comprises a convolutional layer, a pooling layer, a fully connected layer, and an output layer connected in sequence. The convolutional layer is used to extract local features. The pooling layer is used to select the output of the local features. The fully connected layer is used to integrate the local features output by the pooling layer to obtain global features. The output layer is used to output the global features.
[0026] The LSTM network unit includes a forget gate, an input gate, and an output gate connected in sequence; wherein, the input of the forget gate is connected to the output of the output layer; the forget gate is used to perform forgetting processing on the global features to obtain forgotten information; the input gate is used to update the cell state of the forgotten information to obtain updated information; the output gate filters the cell state according to the updated information and outputs a first prediction result.
[0027] Furthermore, the BP neural network includes an input layer, a hidden layer, and an output layer connected in sequence;
[0028] The signal processing principle of the hidden layer is as follows:
[0029]
[0030] Where H is the hidden layer output; f(*) is the activation function; w ih x represents the weights of the input layer neural unit i and the hidden layer neural unit h; i For the i-th input; θ i The hidden layer threshold is m; the output sample dimension is m.
[0031] The output processing principle of the output layer is as follows:
[0032] y = f(w) hj H+θ k )
[0033] k = 1, 2, 3...m
[0034] Among them, w hj θ represents the weights of the hidden and output layers; j represents the activation layer; θ represents the weights of the hidden and output layers. k is the output layer threshold; k is the output layer.
[0035] The present invention also provides a photovoltaic power generation prediction system, comprising:
[0036] The data acquisition module is used to acquire data on the components that influence photovoltaic power generation.
[0037] The correlation analysis module is used to perform correlation analysis on the data of the components affecting photovoltaic power generation to obtain the main influencing index data of photovoltaic power generation.
[0038] The clustering module is used to perform clustering processing on the main influencing index data of the photovoltaic power generation to obtain clustering results for different weather types;
[0039] The prediction output module is used to take the clustering results of the different weather types as input to the pre-built photovoltaic power generation prediction model and output the photovoltaic power generation prediction result.
[0040] The pre-constructed photovoltaic power generation prediction model is an LSTM-CNN & BP combined neural network prediction model, which includes an LSTM-CNN neural network and a BP neural network.
[0041] The present invention also provides a photovoltaic power generation prediction device, comprising:
[0042] Memory, used to store computer programs;
[0043] A processor is used to implement the steps of the photovoltaic power generation prediction method when executing the computer program.
[0044] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the photovoltaic power generation prediction method.
[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0046] This invention provides a method and system for predicting photovoltaic power generation. By performing correlation analysis and clustering on the data of factors influencing photovoltaic power generation, it can fully consider the impact of climate and weather on photovoltaic power generation, providing a foundation for using neural networks with different characteristics. The LSTM-CNN neural network is used to extract spatial and temporal features, effectively reducing the prediction error of the neural network model. At the same time, the BP neural network and the LSTM-CNN neural network are combined to make full use of the features of the two neural network models, effectively improving the accuracy and generalization performance of the prediction results.
[0047] Furthermore, by incorporating factors such as sky clarity, atmospheric pressure, photovoltaic module efficiency, photovoltaic module temperature, solar azimuth, relative humidity, dry-bulb temperature, wind speed, and wind direction as components influencing photovoltaic power generation, and by combining hardware and meteorological influences, the impact of these factors on photovoltaic power generation can be more accurately assessed, laying a reliable foundation for improving the model's prediction accuracy.
[0048] Furthermore, the data is categorized by season and clustered using the K-means clustering algorithm to obtain different weather types. Predictions are then made for different weather types in different seasons, fully considering the impact of climate and weather on photovoltaic power generation. This provides a foundation for using models with different characteristics to predict different types of weather.
[0049] Furthermore, CNN and LSTM network units are organically combined. CNN network units are used to extract spatial features, while LSTM network units are used to extract temporal features. By fully considering and combining the characteristics of meteorological factors, the error of the neural network model in predicting photovoltaic power generation is reduced, and the prediction performance is effectively improved. Attached Figure Description
[0050] Figure 1 This is a flowchart of the photovoltaic power generation prediction method described in the embodiment;
[0051] Figure 2 The graph shows the correlation analysis results of the Pearson correlation coefficient.
[0052] Figure 3 Clustering results for different weather types;
[0053] Figure 4 This is a schematic diagram of the CNN neural network structure in the embodiment;
[0054] Figure 5 This is a schematic diagram of the LSTM neural network structure in the embodiment;
[0055] Figure 6 This is a schematic diagram of the BP neural network structure in the embodiment;
[0056] Figure 7 This is a comparison chart of the prediction accuracy of four prediction methods applied to cluster 1 in the embodiment.
[0057] Figure 8 This is a comparison chart of the prediction accuracy of four prediction methods applied to cluster 2 in the embodiment.
[0058] Figure 9 This is a comparison chart of the prediction accuracy of four prediction methods applied to cluster 3 in the example.
[0059] Figure 10This is a comparison chart showing the prediction accuracy of four prediction methods applied to cluster 4 in the example. Detailed Implementation
[0060] To make the technical problems solved by the present invention, the technical solutions, and the beneficial effects clearer, the following specific embodiments provide a further detailed description of the present invention. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of the invention.
[0061] This invention provides a method for predicting photovoltaic power generation, comprising the following steps:
[0062] Step 1: Obtain data on the components affecting photovoltaic power generation; wherein, the data on the components affecting photovoltaic power generation includes sky clarity, atmospheric pressure, photovoltaic module efficiency, photovoltaic module temperature, solar azimuth angle, relative humidity, dry bulb temperature, wind speed and wind direction.
[0063] Step 2: Perform correlation analysis on the data of the components affecting photovoltaic power generation to obtain the main influencing index data of photovoltaic power generation; specifically, use the Pearson correlation coefficient method to perform correlation analysis on the data of the components affecting photovoltaic power generation to determine the influencing data that are highly correlated with photovoltaic power generation, that is, to obtain the main influencing index data of photovoltaic power generation.
[0064] Step 3: Perform clustering processing on the main influencing index data of photovoltaic power generation to obtain clustering results for different weather types; the clustering process is as follows:
[0065] The main influencing indicators of photovoltaic power generation are divided according to season, and the K-means clustering algorithm is used to cluster the main influencing indicators of photovoltaic power generation after seasonal division to obtain clustering results for different weather types.
[0066] Step 4: Use the clustering results of the different weather types as input to the pre-built photovoltaic power generation prediction model, and output the photovoltaic power generation prediction result; wherein, the pre-built photovoltaic power generation prediction model is an LSTM-CNN&BP combined neural network prediction model, which includes an LSTM-CNN neural network and a BP neural network.
[0067] In this invention, the LSTM-CNN neural network includes CNN network units and LSTM network units. The CNN network unit includes a convolutional layer, a pooling layer, a fully connected layer, and an output layer connected in sequence. The convolutional layer is used to extract local features. The pooling layer is used to select the output of the local features. The fully connected layer is used to integrate the local features output by the pooling layer to obtain global features. The output layer is used to output the global features. The LSTM network unit includes a forget gate, an input gate, and an output gate connected in sequence. The input of the forget gate is connected to the output of the output layer. The forget gate is used to perform forgetting processing on the global features to obtain forgotten information. The input gate is used to update the cell state based on the forgotten information to obtain updated information. The output gate filters the cell state based on the updated information and outputs a first prediction result.
[0068] The BP neural network comprises an input layer, a hidden layer, and an output layer connected in sequence; wherein, the signal processing principle of the hidden layer is as follows:
[0069]
[0070] Where H is the hidden layer output; f(*) is the activation function; w ih x represents the weights of the input layer neural unit i and the hidden layer neural unit h; i For the i-th input; θ i is the hidden layer threshold; m is the dimension of the output samples.
[0071] The output processing principle of the output layer is as follows:
[0072] y = f(w) hj H+θ k )
[0073] k = 1, 2, 3...m
[0074] Among them, w hj θ represents the weights of the hidden and output layers; j represents the activation layer; θ represents the weights of the hidden and output layers. k is the output layer threshold; k is the output layer.
[0075] In step 4 of this invention, the process of using the clustering results of different weather types as input to the pre-built photovoltaic power generation prediction model and outputting the photovoltaic power generation prediction result is as follows:
[0076] Based on the clustering results of the different weather types, training and test sets are constructed.
[0077] Construct an LSTM-CNN neural network and train it using the training set to obtain the trained LSTM-CNN neural network.
[0078] The test set is input into the trained LSTM-CNN neural network, and the first prediction result is output.
[0079] Construct a BP neural network and train the BP neural network using the training set to obtain the trained BP neural network.
[0080] The test set is input into the trained BP neural network, and the second prediction result is output.
[0081] The first prediction result and the second prediction result are superimposed and summed to output the photovoltaic power generation prediction result.
[0082] The photovoltaic power generation prediction method described in this invention predicts photovoltaic power generation based on a combined neural network, which effectively improves prediction performance compared to a single neural network prediction model. Specifically, the organic combination of LSTM-CNN neural network and BP neural network fully utilizes the characteristics of the two models, effectively improving prediction accuracy and generalization performance.
[0083] The present invention also provides a photovoltaic power generation prediction device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the photovoltaic power generation prediction method.
[0084] When the processor executes the computer program, it implements the steps of the above-mentioned photovoltaic power generation prediction method, such as: acquiring data on the influencing factors of photovoltaic power generation; performing correlation analysis on the data on the influencing factors of photovoltaic power generation to obtain data on the main influencing indicators of photovoltaic power generation; performing clustering processing on the data on the main influencing indicators of photovoltaic power generation to obtain clustering results for different weather types; using the clustering results for different weather types as input to a pre-constructed photovoltaic power generation prediction model, and outputting the photovoltaic power generation prediction result; wherein, the pre-constructed photovoltaic power generation prediction model is an LSTM-CNN&BP combined neural network prediction model, and the LSTM-CNN&BP combined neural network prediction model includes an LSTM-CNN neural network and a BP neural network.
[0085] Alternatively, when the processor executes the computer program, it implements the functions of each module in the above system, such as: a data acquisition module for acquiring data on the influencing factors of photovoltaic power generation; a correlation analysis module for performing correlation analysis on the data on the influencing factors of photovoltaic power generation to obtain data on the main influencing indicators of photovoltaic power generation; a clustering processing module for performing clustering processing on the data on the main influencing indicators of photovoltaic power generation to obtain clustering results for different weather types; and a prediction output module for using the clustering results for different weather types as input to a pre-built photovoltaic power generation prediction model and outputting the photovoltaic power generation prediction result; wherein, the pre-built photovoltaic power generation prediction model is an LSTM-CNN&BP combined neural network prediction model, which includes an LSTM-CNN neural network and a BP neural network.
[0086] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing preset functions, wherein the instruction segments describe the execution process of the computer program in the photovoltaic power generation prediction device. For example, the computer program can be divided into a data acquisition module, a correlation analysis module, a clustering module, and a prediction output module. The specific functions of each module are as follows: the data acquisition module is used to acquire data on the influencing factors of photovoltaic power generation; the correlation analysis module is used to perform correlation analysis on the data on the influencing factors of photovoltaic power generation to obtain the main influencing index data of photovoltaic power generation; the clustering module is used to perform clustering processing on the main influencing index data of photovoltaic power generation to obtain clustering results for different weather types; the prediction output module is used to take the clustering results of different weather types as input to a pre-built photovoltaic power generation prediction model and output the photovoltaic power generation prediction result; wherein, the pre-built photovoltaic power generation prediction model is an LSTM-CNN&BP combined neural network prediction model, which includes an LSTM-CNN neural network and a BP neural network.
[0087] The photovoltaic power generation prediction device can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The photovoltaic power generation prediction device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above are merely examples of photovoltaic power generation prediction devices and do not constitute a limitation on the photovoltaic power generation prediction device. It may include more components than described above, or combine certain components, or different components. For example, the photovoltaic power generation prediction device may also include input / output devices, network access devices, buses, etc.
[0088] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or any conventional processor. The processor is the control center of the photovoltaic power generation prediction equipment, connecting all parts of the equipment via various interfaces and lines.
[0089] The memory can be used to store the computer program and / or modules. The processor realizes various functions of the photovoltaic power generation prediction device by running or executing the computer program and / or modules stored in the memory and calling the data stored in the memory.
[0090] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback or image playback). The data storage area may store data created based on the use of the phone (such as audio data or a phonebook). Furthermore, the memory may include high-speed random access memory (RAM) and non-volatile memory, such as hard disks, RAM, plug-in hard disks, SmartMediaCards (SMC), Secure Digital (SD) cards, flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0091] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the photovoltaic power generation prediction method.
[0092] If the modules / units integrated in the photovoltaic power generation prediction system are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0093] Based on this understanding, the present invention can implement all or part of the processes in the above-described photovoltaic power generation prediction method by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-described photovoltaic power generation prediction method. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or a preset intermediate form, etc.
[0094] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0095] It should be noted that the content contained in the computer-readable storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.
[0096] Example
[0097] This study focuses on an energy station at a university; as shown in the attached document. Figure 1 As shown, this embodiment provides a photovoltaic power generation prediction method, including the following steps:
[0098] Step 1: Obtain data on the components affecting photovoltaic power generation; wherein, the components affecting photovoltaic power generation include sky clarity, atmospheric pressure, photovoltaic module efficiency, photovoltaic module temperature, solar azimuth angle, relative humidity, dry bulb temperature, wind speed and wind direction.
[0099] Step 2: Using the Pearson correlation coefficient method, perform correlation analysis on the data of the components affecting the photovoltaic power generation to determine the data of the factors that are highly correlated with the photovoltaic power generation, thus obtaining the main influencing index data of the photovoltaic power generation.
[0100] In this embodiment, the Pearson correlation coefficient method is a method that can use correlation for feature selection. Its basic idea is to measure the correlation between two variables by using a preset calculation formula so that the value representing their correlation is between -1 and 1.
[0101] The process of performing correlation analysis on the data of the components affecting photovoltaic power generation using the Pearson correlation coefficient method is as follows:
[0102] Step 21: Using a data standardization formula, standardize the data of the components affecting photovoltaic power generation to eliminate the influence of different feature dimensions, obtaining standardized sample data; wherein, the data standardization formula is:
[0103]
[0104] Among them, z * For the standardized data, z mean z is the arithmetic mean of the original data. std This represents the standard deviation of the original data.
[0105] Step 22: Construct the initial dataset based on n standardized sample data;
[0106] The initial dataset is as follows:
[0107] (x i ,y i ), i = 1, 2, ..., n
[0108] Where, x i Let y be the factor value for the i-th data point. i Let be the photovoltaic power generation power of the i-th data point.
[0109] Step 23: Using the Pearson correlation analysis formula, perform Pearson correlation analysis on the initial dataset to obtain the correlation coefficients of the influencing factors; wherein, the results of the Pearson correlation analysis are shown in the appendix. Figure 2 As shown; from the appendix Figure 2 As can be seen from the data, the correlation between each influencing factor and photovoltaic power generation is significant. The characteristic variables with a correlation greater than 0.4 are solar radiation, photovoltaic module efficiency, sky clarity, and photovoltaic module temperature. Therefore, the aforementioned solar radiation, photovoltaic module efficiency, sky clarity, and photovoltaic module temperature are the main influencing indicators of the selected photovoltaic power generation.
[0110] The Pearson correlation analysis formula is as follows:
[0111]
[0112] -1≤r≤1
[0113] Where r is the correlation coefficient; These are the average values of the factors.
[0114] Step 24: When the correlation coefficient of the influencing factor is less than 0.4, it is considered that the corresponding photovoltaic power generation power influencing factor data has a low correlation with photovoltaic power generation power, and the corresponding photovoltaic power generation power influencing factor data is discarded; when the correlation coefficient of the influencing factor is greater than or equal to 0.4, it is considered that the corresponding photovoltaic power generation power influencing factor data has a high correlation with photovoltaic power generation power, and the corresponding photovoltaic power generation power influencing factor data is output.
[0115] Step 3: Divide the main influencing index data of photovoltaic power generation according to season, and use the K-means clustering algorithm to cluster the main influencing index data of photovoltaic power generation according to season to obtain clustering results for different weather types.
[0116] In this embodiment, the K-means clustering algorithm performs clustering through iterative solutions, specifically by calculating the distance between samples and cluster centers as a similarity index; for example, taking a sample set X = {x i Let the sample set X be denoted as {i = 1, 2, ..., n}. Divide the sample set X into k subsets, i.e., k classes, and iteratively solve the problem to find the class that minimizes the distance from the center of its class to each sample.
[0117] Specifically, the process of using the K-means clustering algorithm to cluster the main influencing indicators of photovoltaic power generation by season and obtaining clustering results for different weather types includes the following steps:
[0118] Step 31: Randomly select k samples from the main influencing index data of photovoltaic power generation after seasonal division, and use them as the initial centroids;
[0119] Step 32: Using the Euclidean distance calculation formula, calculate the Euclidean distance from all samples to all initial centroids, and divide the samples into corresponding clusters according to the minimum Euclidean distance between the samples and the initial centroids.
[0120] The Euclidean distance calculation formula is as follows:
[0121]
[0122] Among them, J SSE For Euclidean distance; μ i For c i The cluster mean; c i The number of clusters.
[0123] Step 33: Calculate the mean of all clusters and select new centroids in sequence;
[0124] Step 34: Repeat steps 32 and 33 until the centroid no longer changes or changes within the allowable error range.
[0125] Step 35: Output the clustering results, i.e., obtain the clustering results for the different weather types, as shown in the appendix. Figure 3 As shown; from the appendix Figure 3 As can be seen from the data, the weather types in the clusters are sunny, cloudy, showers, and overcast.
[0126] Step 4: Based on the clustering results of the different weather types, construct the training set and the test set.
[0127] Step 5: Construct an LSTM-CNN neural network and train it using the training set to obtain a trained LSTM-CNN neural network; input the test set into the trained LSTM-CNN neural network and output the first prediction result.
[0128] Specifically, the LSTM-CNN neural network is set to three dimensions, and the LSTM-CNN neural network includes CNN network units and LSTM network units.
[0129] As attached Figure 4 As shown, the CNN network unit includes a convolutional layer, a pooling layer, a fully connected layer, and an output layer; wherein, the convolutional layer is used to extract local features; the pooling layer is used to select the output of the local features; the fully connected layer is used to integrate the local features output by the pooling layer to obtain global features; and the output layer is used to output the global features.
[0130] As attached Figure 5 As shown, the LSTM network unit includes a forget gate, an input gate, and an output gate connected in sequence; wherein, the input of the forget gate is connected to the output of the output layer; the forget gate is used to perform forgetting processing on the global features to obtain forgotten information; the input gate is used to update the cell state of the forgotten information to obtain updated information; the output gate filters the cell state according to the updated information and outputs a first prediction result.
[0131] The principle for calculating the degree of forgetting in the forgetting gate is as follows:
[0132] f t =sigmoid(b f +W f,h *ht-1 +W f,x *x t )
[0133] Among them, f t The degree of forgetting; t is the time step; x t The input for the previous time step; h t-1 This refers to the cell output at the previous time point; W f,h W represents the forgetting weight output at a given moment by the forgetting gate. f,x The forgetting weights are input to the forgetting gate; b f The forget gate bias is used; sigmoid(*) is the activation function.
[0134] The update principle of the input gate is as follows:
[0135]
[0136] in, Update the input gate; tanh(*) is the hyperbolic tangent activation function; b c W is the input gate bias vector; c,h W represents the weights of the input gate's output at the previous time step. c,x The weights are the input gate weights.
[0137] The filtering principle of the output gate is as follows:
[0138] o t =σ(b o +W o,h *h t-1 +W o,x *x t )
[0139] h t =o t *tanh(c t )
[0140] Among them, o t For output gate updates; σ(*) is the activation function; c t The output is updated after input gate; W o,h W represents the weights of the input to the output gate at the previous time step. o,x The output weights are the output weights of the output gate.
[0141] Step 6: Construct a BP neural network and train the BP neural network with the training set to obtain a trained BP neural network; input the test set into the trained BP neural network and output the second prediction result.
[0142] Backpropagation (BP) neural networks, as feedforward neural networks, possess strong learning and nonlinear capabilities, and are widely used in various prediction models; as shown in the attached figure. Figure 6 As shown, the BP neural network includes an input layer, a hidden layer, and an output layer connected in sequence. During forward propagation, samples are processed from the input layer, processed by the hidden layer, and then enter the output layer. Finally, the output layer processes and outputs the samples. The error between the actual output and the expected output is fed forward layer by layer. Each layer learns using the obtained error signal and corrects the weights of the neurons in each layer based on the error learning signal.
[0143] The signal processing principle of the hidden layer is as follows:
[0144]
[0145] Where H is the hidden layer output; f(*) is the activation function; w ih x represents the weights of the input layer neural unit i and the hidden layer neural unit h; i For the i-th input; θ i is the hidden layer threshold; m is the dimension of the output samples.
[0146] The output processing principle of the output layer is as follows:
[0147] y = f(w) hj H+θ k )
[0148] k = 1, 2, 3...m
[0149] Among them, w hj θ represents the weights of the hidden and output layers; j represents the activation layer; θ represents the weights of the hidden and output layers. k is the output layer threshold; k is the output layer.
[0150] Step 7: Sum the first prediction result and the second prediction result to obtain the photovoltaic power generation prediction result.
[0151] Test results
[0152] In this embodiment, photovoltaic power generation data collected from a university energy station were used for experimental testing.
[0153] To evaluate the prediction performance, the root mean square error (RMSE), mean absolute percentage error (MAPE), and mean absolute error (MAE) were selected as the main evaluation indicators for the model's prediction accuracy.
[0154] As attached Figure 7-10As shown, attached Figure 7-10 The comparison of the prediction accuracy of photovoltaic power generation at the university's energy station is presented. (See appendix...) Figure 7-10 As can be seen from the above, compared with the three prediction models—BP neural network, LSTM-CNN combined neural network, and Long Short-Term Memory neural network (LSTM)—the photovoltaic power prediction method based on LSTM-CNN & BP combined neural network in this embodiment has the smallest difference between the predicted and actual photovoltaic power values, with some values almost completely overlapping, and the highest stability. In this embodiment, the MAPE of the LSTM-CNN & BP prediction model are 0.47%, 2.51%, 2.25%, and 0.79%, respectively, which are the lowest compared to other methods, indicating higher prediction accuracy. Furthermore, from the attached... Figure 7-10 As can be seen, the prediction accuracy of the LSTM-CNN model is improved compared to the LSTM model, indicating that the prediction effect of using the LSTM-CNN combined neural network to extract spatiotemporal features is better than the prediction effect of using the CNN neural network alone to extract spatial features.
[0155] The descriptions of relevant parts in the photovoltaic power generation prediction system, equipment, and computer-readable storage medium provided in this embodiment can be found in the detailed description of the corresponding parts in the photovoltaic power generation prediction described in this embodiment, and will not be repeated here.
[0156] The photovoltaic power generation prediction method and system described in this invention effectively improves prediction performance compared to a single neural network prediction model. Specifically, in selecting influencing factors, a combination of hardware and meteorological influences is used to more accurately assess the impact of these factors on photovoltaic power generation, laying a reliable foundation for improving the model's prediction accuracy. Data is categorized by season and clustered using the K-means clustering algorithm to obtain different weather types. Predictions are then made for different weather types in different seasons, fully considering the impact of climate and weather on photovoltaic power generation, providing a basis for using models with different characteristics to predict different types. Photovoltaic power generation is closely related to meteorological characteristics, which are spatiotemporal. CNN is used to extract spatial features, and LSTM is used to extract temporal features. By fully considering and combining the characteristics of meteorological factors, CNN and LSTM are organically combined, reducing the error in the photovoltaic power generation prediction of the neural network model and effectively improving prediction performance. Furthermore, the organic combination of LSTM-CNN and BP neural networks fully utilizes the characteristics of both neural networks, solving the problems of low prediction accuracy and poor generalization performance inherent in single neural network models, further improving prediction performance.
[0157] The above embodiments are merely one of the implementation methods for achieving the technical solution of the present invention. The scope of protection claimed by the present invention is not limited to this embodiment, but also includes any variations, substitutions and other implementation methods that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention.
Claims
1. A method for predicting photovoltaic power generation, characterized in that, include: Obtain data on the components that influence photovoltaic power generation; Correlation analysis was performed on the data of the components affecting photovoltaic power generation to obtain the main influencing indicators of photovoltaic power generation. Clustering was performed on the main influencing indicators of photovoltaic power generation to obtain clustering results for different weather types; The clustering results of the different weather types are used as input to the pre-built photovoltaic power generation prediction model, and the photovoltaic power generation prediction results are output. The pre-constructed photovoltaic power generation prediction model is an LSTM-CNN & BP combined neural network prediction model, which includes an LSTM-CNN neural network and a BP neural network. The data on the components affecting photovoltaic power generation include sky clarity, atmospheric pressure, photovoltaic module efficiency, photovoltaic module temperature, solar azimuth, relative humidity, dry bulb temperature, wind speed, and wind direction. The process of using the clustering results of different weather types as input to a pre-built photovoltaic power generation prediction model and outputting the photovoltaic power generation prediction result is as follows: Based on the clustering results of the different weather types, a training set and a test set are constructed; Construct an LSTM-CNN neural network and train it using the training set to obtain the trained LSTM-CNN neural network; The test set is input into the trained LSTM-CNN neural network, and the first prediction result is output. Construct a BP neural network and train the BP neural network with the training set to obtain the trained BP neural network; The test set is input into the trained BP neural network, and the second prediction result is output. The first prediction result and the second prediction result are superimposed and summed to output the photovoltaic power generation prediction result; The process of clustering the main influencing indicators of photovoltaic power generation to obtain clustering results for different weather types is as follows: The main influencing indicators of photovoltaic power generation are divided according to season, and the K-means clustering algorithm is used to cluster the main influencing indicators of photovoltaic power generation after seasonal division to obtain clustering results for different weather types.
2. The photovoltaic power generation prediction method according to claim 1, characterized in that, The process of performing correlation analysis on the data of the components affecting photovoltaic power generation to obtain the main influencing indicators of photovoltaic power generation is as follows: The Pearson correlation coefficient method was used to conduct correlation analysis on the data of the components affecting the photovoltaic power generation, and the data of the factors with high correlation with the photovoltaic power generation were determined, which is the main influencing index data of the photovoltaic power generation.
3. The photovoltaic power generation prediction method according to claim 1, characterized in that, The LSTM-CNN neural network includes CNN network units and LSTM network units; The CNN network unit comprises a convolutional layer, a pooling layer, a fully connected layer, and an output layer connected in sequence. The convolutional layer is used to extract local features; the pooling layer is used to select the output of the local features; the fully connected layer is used to integrate the local features output by the pooling layer to obtain global features; and the output layer is used to output the global features. The LSTM network unit includes a forget gate, an input gate, and an output gate connected in sequence; wherein, the input of the forget gate is connected to the output of the output layer; the forget gate is used to perform forgetting processing on the global features to obtain forgotten information; the input gate is used to update the cell state of the forgotten information to obtain updated information; the output gate filters the cell state according to the updated information and outputs a first prediction result.
4. The photovoltaic power generation prediction method according to claim 1, characterized in that, The BP neural network includes an input layer, a hidden layer, and an output layer connected in sequence. The signal processing principle of the hidden layer is as follows: in, H For hidden layer output; f (*) represents the activation function; Input layer neural unit i With hidden layer neural units h The weights; x i For the first i One input; The hidden layer threshold; m To determine the dimension of the output samples; The output processing principle of the output layer is as follows: in, The weights are those of the hidden layer and the output layer; j For activation layer; The threshold value for the output layer; k This is the output layer.
5. A photovoltaic power generation prediction system, characterized in that, include: The data acquisition module is used to acquire data on the components that influence photovoltaic power generation. The correlation analysis module is used to perform correlation analysis on the data of the components affecting photovoltaic power generation to obtain the main influencing index data of photovoltaic power generation. The clustering module is used to perform clustering processing on the main influencing index data of the photovoltaic power generation to obtain clustering results for different weather types; The prediction output module is used to take the clustering results of the different weather types as input to the pre-built photovoltaic power generation prediction model and output the photovoltaic power generation prediction result. The pre-constructed photovoltaic power generation prediction model is an LSTM-CNN & BP combined neural network prediction model, which includes an LSTM-CNN neural network and a BP neural network. The data on the components affecting photovoltaic power generation include sky clarity, atmospheric pressure, photovoltaic module efficiency, photovoltaic module temperature, solar azimuth, relative humidity, dry bulb temperature, wind speed, and wind direction. The process of using the clustering results of different weather types as input to a pre-built photovoltaic power generation prediction model and outputting the photovoltaic power generation prediction result is as follows: Based on the clustering results of the different weather types, a training set and a test set are constructed; Construct an LSTM-CNN neural network and train it using the training set to obtain the trained LSTM-CNN neural network; The test set is input into the trained LSTM-CNN neural network, and the first prediction result is output. Construct a BP neural network and train the BP neural network with the training set to obtain the trained BP neural network; The test set is input into the trained BP neural network, and the second prediction result is output. The first prediction result and the second prediction result are superimposed and summed to output the photovoltaic power generation prediction result; The process of clustering the main influencing indicators of photovoltaic power generation to obtain clustering results for different weather types is as follows: The main influencing indicators of photovoltaic power generation are divided according to season, and the K-means clustering algorithm is used to cluster the main influencing indicators of photovoltaic power generation after seasonal division to obtain clustering results for different weather types.
6. A photovoltaic power generation prediction device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the photovoltaic power generation prediction method as described in any one of claims 1-4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the photovoltaic power generation prediction method as described in any one of claims 1-4.
Citation Information
Patent Citations
Method for predicating output power of photovoltaic power generation system based on BP (Back Propagation) neural network model
CN103218674A
Photovoltaic power prediction method, device and equipment and readable storage medium
CN111695601A
Photovoltaic power generation power short-term prediction method based on long-term and short-term memory network
CN112734073A
Photovoltaic power station generation power prediction method and system
CN113496311A
Short-term photovoltaic power prediction method
CN113627070A