Photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM

The combination of dynamic feature extraction and the CNN-BILSTM model solves the problem of predicting the complexity and volatility of photovoltaic power generation data, and achieves higher prediction accuracy and robustness.

CN119357578APending Publication Date: 2025-01-24STATE GRID FUJIAN ELECTRIC POWER CO LTD +1

Patent Information

Application Number
CN202411356181.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Existing photovoltaic power prediction methods are difficult to effectively process the complexity and volatility of photovoltaic power generation data, resulting in low prediction accuracy and neglecting the identification and processing of abnormal fluctuations.

Method used

A photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM is used to classify weather types through K-means clustering, screen abnormal fluctuating weather, calculate moving averages and Bollinger Bands indicators, and use them as input data for prediction.

Benefits of technology

It improves the prediction accuracy of photovoltaic power generation, can effectively capture and utilize potential information in power generation trend characteristics, and improves the accuracy and robustness of forecast results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357578A_ABST
    Figure CN119357578A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM, and the method comprises the steps: S1, collecting photovoltaic power historical data, carrying out the secondary clustering of the photovoltaic power historical data through K-means clustering, determining the optimal number of clusters according to a contour coefficient, and determining the dynamic features of the photovoltaic power historical data; s2, performing data preprocessing on the screened photovoltaic power historical data and meteorological influence factor data, and dividing the data into a training set and a test set; and S3, establishing a BOLL-CNN-BiLSTM model, calculating SMA and BOLL dynamic characteristic indexes of the preprocessed photovoltaic power historical data, and inputting the SMA and BOLL dynamic characteristic indexes and the meteorological influence factor data as input data into the CNN-BiLSTM model for training and prediction. According to the invention, through deep analysis and modeling of photovoltaic power related data, the prediction capability of photovoltaic power generation is optimized, and the stability and controllability of a power grid operation system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of energy management, and in particular relates to a photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM. Background Art

[0002] Due to the excessive use of fossil fuels, energy crises and environmental pollution are increasing. As the demand for traditional energy grows, people are increasingly demanding energy conservation and sustainable development. Therefore, how to rationally utilize renewable energy is an important driving force for the completion of global energy transformation. In the context of global energy structure transformation and sustainable development, photovoltaic power generation, as a clean and renewable energy form, is becoming increasingly important. With the rapid expansion of photovoltaic power generation, how to effectively predict its output power has become the focus of the industry.

[0003] Photovoltaic power generation, as a new energy power generation technology, is mainly divided into two forms: centralized and distributed. Among them, distributed photovoltaic has the advantages of high energy utilization, low environmental pollution, flexible local consumption, and low abandonment rate, and has been strongly supported by the country. Compared with traditional power generation methods, although photovoltaic technology has many advantages, there are still some problems. For example, due to the very complex historical data of photovoltaic power generation, many data points, and a wide coverage, the cost of photovoltaic data statistics is very high and the efficiency is not ideal, which limits the development of photovoltaic technology. At the same time, photovoltaic power generation has strong randomness and volatility, and its output power is affected by many factors, including solar radiation, ambient temperature, cloud cover, etc., which makes photovoltaic prediction a challenging task. The strong intermittent and random nature of photovoltaic power generation has a great impact on power system planning and power supply quality, and this impact will become more prominent as the photovoltaic grid-connected capacity increases. Therefore, in the face of a high proportion of distributed photovoltaic access to the grid, accurately predicting the short-term power generation of distributed photovoltaics is of great significance to the operation and dispatch of the grid.

[0004] There are three main methods for short-term photovoltaic power forecasting: traditional mathematical statistics, machine learning, and deep learning. The commonly used traditional mathematical statistics method model principle is clear, simple, and efficient, and can reflect the time series of input data, but it is not suitable for the prediction of photovoltaic historical data with strong volatility and nonlinearity. The commonly used machine learning algorithm model can take into account the nonlinear relationship between various influencing factors and photovoltaic power generation, but ignores the time series dependence of photovoltaic historical data itself, resulting in a decrease in prediction accuracy and destroying the integrity of the time series data.

[0005] With the development of deep learning, the bidirectional long short-term memory neural network (BiLSTM) came into being. It consists of two layers of forward and reverse networks, which can simultaneously consider the contextual information in both the forward and backward directions, effectively improving the modeling ability of sequence data, thereby improving the accuracy of model prediction. The existing method usually combines multiple single models to form a combined prediction model, and better predicts photovoltaic power generation by combining the advantages of different models. In order to further improve the prediction performance of the model, many algorithms also choose to improve the input data of the model by decomposing historical data. However, due to the strong volatility and instability of photovoltaic power generation data, even after decomposition, it may still lead to poor prediction results, and adding auxiliary information such as environmental factors increases the cost of prediction.

[0006] The Chinese patent with the publication number CN115689008A discloses a CNN-BiLSTM short-term photovoltaic power prediction method based on ensemble empirical mode decomposition, including: 1. Collecting historical data and screening out sudden change weather and non-sudden change weather sample data; 2. For different weather types, using ensemble empirical mode decomposition method to decompose historical photovoltaic power station hourly power data into a series of component sequences with different frequencies but relatively stable; 3. Building a convolutional neural network CNN and constructing a CNN-BiLSTM model; 4. Using the gray wolf optimization algorithm GWO to determine the hyperparameters of the CNN-BiLSTM model, and using the trained model to perform short-term photovoltaic power prediction. The invention lacks K-means secondary clustering and silhouette coefficient analysis, which makes it impossible to effectively divide different weather types and their impact on photovoltaic power generation, thereby ignoring the identification and processing of abnormal fluctuation weather; and lacks the introduction of moving average and Bollinger band indicators to study the fluctuation trend of photovoltaic power generation under sudden change weather, which may cause the model to fail to effectively capture and utilize the effective potential information in the power generation trend characteristics, thereby affecting the accuracy and robustness of the prediction results. Summary of the invention

[0007] The purpose of the present invention is to provide a photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM to solve the problems mentioned in the above background technology.

[0008] To achieve the above object, the present invention provides a photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM, comprising the following steps:

[0009] S1: Collect historical photovoltaic power data, perform secondary clustering on the historical photovoltaic power data through K-means clustering, determine the optimal number of clusters based on the silhouette coefficient, divide the weather types, screen abnormal and fluctuating weather, and determine the dynamic characteristics of the historical photovoltaic power data.

[0010] S2: Preprocess the screened photovoltaic power historical data and meteorological influencing factor data, and divide them into training set and test set.

[0011] S3: Establish a BOLL-CNN-BiLSTM model, calculate the SMA and BOLL dynamic characteristic indicators of the preprocessed photovoltaic power historical data, and perform normalization processing. The SMA and BOLL dynamic characteristic indicators of the normalized photovoltaic power historical data and the meteorological influencing factor data are input into the CNN-BiLSTM model for training and prediction, and the predicted photovoltaic power data is denormalized to output the final prediction result.

[0012] Preferably, the step S1 specifically comprises:

[0013] First, K-means clustering is performed on the collected photovoltaic power historical data with the whole day as the time scale. According to the fluctuation characteristics of the power generation curve, it is divided into three weather types with similar dynamic characteristics, namely sunny, sunny to cloudy, and rainy. Corresponding sample labels are established for the collected photovoltaic power historical data according to different weather types.

[0014] Then, the fluctuation trend of the historical data of photovoltaic power under sudden weather changes is analyzed with hours as the time scale, and the historical days whose clustering results are consistent with the abnormal fluctuating weather types are screened to determine the dynamic characteristics of the historical data of photovoltaic power.

[0015] Preferably, the step S2 is specifically:

[0016] For the historical data of photovoltaic power and meteorological influencing factors, the data collection points during abnormal periods are first eliminated, and then the Pearson coefficient is used to screen the strongly correlated meteorological influencing factors to obtain the effective meteorological influencing factor data after dimensionality reduction.

[0017] The abnormally processed photovoltaic power historical data and effective meteorological influencing factor data are normalized and divided into training set and test set.

[0018] Preferably, the calculation formula of the SMA dynamic characteristic index in step S3 is specifically:

[0019]

[0020] In the formula, is the moving average indicator of the photovoltaic power historical data of the previous n days before the i-th day; p k is the historical fluctuation value data of photovoltaic power in the n days before the i-th day; n represents the number of nodes in the time window scale; n is the number of historical days of photovoltaic power generation; k∈[i-n+1,i].

[0021] The calculation formula of BOLL dynamic characteristic indicator is as follows:

[0022]

[0023] In the formula, is the standard deviation of the photovoltaic power historical data of the previous n days before the i-th day; BOLL UP , BOLL DN They represent the upper and lower lines of the Bollinger Bands indicator respectively; α is the adjustment parameter of the bandwidth range between the upper and lower lines of the Bollinger Bands indicator.

[0024] Preferably, the convolution calculation process in the CNN-BiLSTM model in step S3 is specifically as follows:

[0025]

[0026] In the formula, K represents the convolution kernel, and its length, width and depth are represented by i, j and n respectively; I represents the input of the neuron; o represents the local output of the neuron; b n represents the threshold of the convolution kernel; l, m, and n represent the three dimensions of the output matrix respectively.

[0027] On the other hand, the present invention provides a photovoltaic power prediction system based on dynamic feature extraction and CNN-BiLSTM, including a data acquisition and clustering module, a data preprocessing module and a photovoltaic power prediction module.

[0028] The data collection and clustering module is used to collect historical photovoltaic power data, perform secondary clustering on the historical photovoltaic power data through K-means clustering, determine the optimal number of clusters based on the silhouette coefficient, divide the weather types, screen abnormal and fluctuating weather, and determine the dynamic characteristics of the historical photovoltaic power data.

[0029] The data preprocessing module is used to preprocess the screened photovoltaic power historical data and meteorological influencing factor data, and divide them into training sets and test sets.

[0030] The photovoltaic power prediction module is used to establish a BOLL-CNN-BiLSTM model, calculate the SMA and BOLL dynamic characteristic indicators of the preprocessed photovoltaic power historical data, and perform normalization processing. The SMA and BOLL dynamic characteristic indicators of the normalized photovoltaic power historical data and the meteorological influencing factor data are input into the CNN-BiLSTM model for training and prediction, and the predicted photovoltaic power data is denormalized to output the final prediction result.

[0031] On the other hand, the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM as described in any embodiment of the present invention is implemented.

[0032] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM as described in any embodiment of the present invention is implemented.

[0033] Compared with the prior art, the present invention has the following technical effects:

[0034] The present invention proposes a photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM, and uses the K-means secondary clustering cluster results to study the fluctuation trend of photovoltaic power generation under sudden weather changes, thereby improving the prediction accuracy of photovoltaic power generation. By introducing moving average and Bollinger Band indicators to characterize and extract photovoltaic power generation trend characteristics, the effective potential information contained therein can be integrated into the algorithm model input data. At the same time, the method described in the present invention extracts nonlinear local features between multidimensional input data by integrating the advantages of CNN and BiLSTM neural networks, and outputs photovoltaic power generation power prediction results after bidirectional feature extraction of time series data, which provides theoretical support for the study of short-term photovoltaic power prediction problems in distributed photovoltaic power stations. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is an overall flow chart of the photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM described in the present invention;

[0036] Figure 2 It is a schematic diagram of photovoltaic power curves for three types of long-term weather types described in the present invention;

[0037] Figure 3 It is a schematic diagram of silhouette coefficients of different numbers of clusters according to the present invention;

[0038] Figure 4 It is a schematic diagram of photovoltaic power curves of five types of short-term weather types described in the present invention;

[0039] Figure 5 It is the LSTM neural network structure diagram of the present invention;

[0040] Figure 6 This is the BiLSTM neural network structure diagram described in the present invention. DETAILED DESCRIPTION

[0041] In order to make the objectives, technical solutions and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in combination with specific embodiments of the present application and with reference to the accompanying drawings.

[0042] Embodiment 1

[0043] This embodiment provides a photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM. Figure 1 As shown, the following steps are included:

[0044] S1: Collect historical photovoltaic power data, perform secondary clustering on the historical photovoltaic power data through K-means clustering, determine the optimal number of clusters based on the silhouette coefficient, divide the weather types, screen abnormal fluctuating weather, and determine the dynamic characteristics of the historical photovoltaic power data. It should be noted that this embodiment first divides the fluctuating days and stable days through a clustering, and then performs secondary clustering on the fluctuating days, and uses the obtained fluctuation trend characteristics as a reference factor for the subsequent selection of dynamic feature indicators. At the same time, the short-term trend characteristics of the fluctuating days are richer and more suitable for the method described in this embodiment.

[0045] As a preferred implementation of this embodiment, step S1 is specifically as follows:

[0046] First, K-means clustering is performed on the collected photovoltaic power historical data with the whole day as the time scale. According to the fluctuation characteristics of the power generation curve, it is divided into three weather types with similar dynamic characteristics, namely sunny, sunny to cloudy, and rainy. Corresponding sample labels are established for the collected photovoltaic power historical data according to different weather types, which can effectively improve the accuracy and efficiency of the prediction model.

[0047] Photovoltaic output is mainly related to solar irradiance. Different weather types will cause different solar irradiation times on photovoltaic power generation units, which will further lead to different photovoltaic dynamic characteristics, which will have a great impact on the prediction results. Considering the characteristics of photovoltaic power generation, the prediction of photovoltaic power at night lacks practical significance. Therefore, the photovoltaic historical power data from 8:00 to 19:00 can be selected for clustering. The clustering results can be found in Figure 2 As shown in the figure, three weather type labels are divided according to the fluctuation characteristics of the photovoltaic power generation curve: (a) sunny (b) sunny to cloudy (c) rainy day. Under the same weather conditions, the photovoltaic power generation curve will show similar characteristics. When clustering on a full-day time scale, the overall fluctuation of stable weather (a) can be divided by the noon time period, showing a significant trend of overall increase before noon and overall decrease after noon; while the fluctuation trend of mutation weather (b) (c) is more random and has more mutation times.

[0048] The description of the dynamic characteristics of long-term time series data of sudden weather is more complex. Therefore, in order to further improve the research accuracy, the fluctuation trend of photovoltaic power historical data of sudden weather is analyzed with hours as the time scale, and the historical days whose clustering cluster results meet the abnormal fluctuation weather type are screened, thereby determining the dynamic characteristics of photovoltaic power historical data. Specifically, the dynamic characteristic change trend of short-term series data is analyzed with a two-hour scale, and historical days with rich trend characteristics in various weather types are screened. The data collection accuracy interval is 5 minutes, and there are 24 photovoltaic power valid data points in 2 hours. The secondary clustering results refer to Figure 3 As shown. Figure 3 It can be seen that when the number of clusters is 5, the silhouette coefficient value is closest to 1, so the most suitable number of clusters for the sudden weather clustering of the photovoltaic historical power data set is 5. Figure 4 As shown in the figure, the five short-term trend types can be described as: (b) short-term decline (c) short-term rise (d) decline and rise (e) small power and stable (f) large power and stable. Therefore, short-term series are easier to quantify the dynamic trend of photovoltaic power, and the input of fluctuation characteristics will help improve the accuracy of prediction model training.

[0049] S2: Preprocess the screened photovoltaic power historical data and meteorological influencing factor data and divide them into training set and test set.

[0050] As a preferred implementation of this embodiment, step S2 is specifically as follows:

[0051] For the historical data of photovoltaic power and meteorological influencing factors, the data collection points during abnormal periods are first eliminated, and then the Pearson coefficient is used to screen the strongly correlated meteorological influencing factors to obtain the effective meteorological influencing factor data after dimensionality reduction.

[0052] Specifically, a Pearson correlation analysis is performed on the historical data of photovoltaic power and the data of various meteorological influencing factors to calculate the correlation coefficient matrix. The Pearson coefficient value range is between -1 and 1. A value close to 1 or -1 indicates a strong correlation, and a value close to 0 indicates no correlation. Refer to Table 1, which is a Pearson coefficient table of selected meteorological influencing factor data including wind speed, wind direction, ambient temperature and humidity, global horizontal irradiance, diffuse horizontal irradiance, global tilted irradiance, and diffuse tilted irradiance. The absolute value of the Pearson coefficient can be set to 0-0.3 for weak correlation, 0.3-0.6 for medium correlation, and greater than 0.6 for strong correlation. The specific screening data is shown in the table.

[0053] Table 1 Pearson coefficient of various meteorological factors

[0054]

[0055] According to the correlation analysis results in Table 1, global horizontal irradiance, global tilted irradiance, diffuse tilted irradiance, diffuse horizontal irradiance, wind speed and ambient temperature can be selected as the six effective meteorological factors affecting photovoltaic power generation.

[0056] The abnormally processed photovoltaic power historical data and effective meteorological influencing factor data are normalized and divided into training set and test set.

[0057] S3: Establish a BOLL-CNN-BiLSTM model, calculate the SMA and BOLL dynamic characteristic indicators of the preprocessed photovoltaic power historical data, and perform normalization processing, and input the SMA and BOLL dynamic characteristic indicators of the normalized photovoltaic power historical data and the meteorological influencing factor data into the CNN-BiLSTM model for training and prediction, and denormalize the predicted photovoltaic power data to output the final prediction result. Specifically, the meteorological influencing factor data can be selected from global horizontal irradiance, global tilted irradiance, scattered horizontal irradiance, scattered tilted irradiance, wind speed and ambient temperature, etc.

[0058] The fluctuation of photovoltaic power generation is the main reason for the uncertainty of photovoltaic power generation. In order to improve the accuracy of photovoltaic power generation prediction, this embodiment deeply mines the laws of dynamic data, finds the main factors affecting the fluctuation of photovoltaic power generation, and quantifies the dynamic trends of fluctuation data with different forms, so as to effectively improve the accuracy of photovoltaic power generation prediction in abnormal weather. To this end, two dynamic characteristic parameters are defined, namely Bollinger Bands and Moving Average Lines to analyze the form of fluctuation data to reflect the dynamic characteristics of photovoltaic power generation corresponding to different forms.

[0059] As a preferred implementation of this embodiment, the calculation formula of the SMA dynamic characteristic index in step S3 is specifically:

[0060]

[0061] In the formula, is the moving average indicator of the photovoltaic power historical data of the previous n days before the i-th day; p k is the historical fluctuation value data of photovoltaic power in the n days before the i-th day; n represents the number of nodes in the time window scale; n is the number of historical days of photovoltaic power generation; k∈[i-n+1,i].

[0062] The Bollinger Bands indicator (BOLL) is a band-shaped technical indicator composed of three tracks. The upper track and the lower track can be regarded as the pressure line and support line of dynamic data respectively. Based on the standard deviation principle in statistics, the channel formed by the two lines specifies the confidence interval for the normal fluctuation of time series data. The middle track can be regarded as the average line of dynamic data, capturing the overall movement trend of time series data. This embodiment uses SMA to construct the middle track to eliminate interference factors in the original data sequence to grasp the overall trend of the data sequence.

[0063] The calculation formula of BOLL dynamic characteristic indicator is as follows:

[0064]

[0065] In the formula, is the standard deviation of the photovoltaic power historical data of the previous n days before the i-th day; BOLL UP , BOLL DN They represent the upper and lower lines of the Bollinger Bands indicator respectively; α is the adjustment parameter of the bandwidth range between the upper and lower lines of the Bollinger Bands indicator.

[0066] Convolutional layer and pooling layer are two important components of CNN. Their alternating appearance helps to deeply explore the features of input data. In addition, CNN structure usually also contains a fully connected layer. In order to effectively reduce the dimension of input features, speed up the convergence speed of CNN network and avoid overfitting problems, the pooling layer is usually placed after the convolutional layer. Through convolution and pooling operations, convolutional neural network can learn higher-level feature representation, thereby achieving accurate prediction of complex data. The specific convolution calculation process is:

[0067]

[0068] In the formula, K represents the convolution kernel, and its length, width and depth are represented by i, j and n respectively; I represents the input of the neuron; o represents the local output of the neuron; b u represents the threshold of the convolution kernel; l, m, and n represent the three dimensions of the output matrix respectively.

[0069] Recurrent neural networks (RNNs) generally have the problem of vanishing gradients. Although they have been successfully applied to solve time series prediction problems in many fields, during the training process, as the time steps increase, the network's gradient will gradually decrease, resulting in the inability to effectively propagate information from earlier time steps to subsequent time steps. This problem limits the network's ability to model long-term dependencies, also known as the long-term dependency problem. The key to solving this problem is to introduce linear connections and gating units into LSTM neural networks.

[0070] See also Figure 5As shown in the figure, it is the structure of LSTM neural network, where h t-1 、h t 、h t+1 Represent the encoded hidden state vectors at different times, and x t-1 、x t 、x t+1 represents the time series input at each moment. In this structure, σ represents the sigmoid function and tanh represents the hyperbolic tangent function. In the LSTM recurrent unit, the hidden layer is mainly composed of four key structures: input gate, output gate, forget gate and cell state. The core of the LSTM recurrent unit is the cell state, and the three gating units that control the flow of the cell state are responsible for the input gate, output gate and forget gate. By cooperating with the cell state, the state information is maintained, updated and transmitted.

[0071] When using traditional unidirectional neural networks to predict photovoltaic power, training is usually carried out from front to back in chronological order. However, this method cannot fully tap the potential information in the photovoltaic power time series, so there are great limitations in the prediction accuracy and data utilization of the model. In contrast, the bidirectional long short-term memory network has the characteristics of mining the intrinsic relationship between the photovoltaic power data at the current moment and the past and future data, because it can perform forward propagation and backward propagation at the same time. Therefore, the use of a bidirectional long short-term memory network can better improve the prediction accuracy and data utilization. For a structural diagram of the BiLSTM network model, see Figure 6 Compared with the traditional unidirectional LSTM neural network structure, the bidirectional recurrent neural network structure of the BiLSTM network can better utilize the local and global information in the time series, thereby improving the model's feature extraction ability and prediction accuracy. Compared with the unidirectional LSTM neural network, this structure overcomes the disadvantage of insufficient data information.

[0072] The CNN-BiLSTM model consists of a convolutional neural network (CNN) and a bidirectional long short-term memory (BiLSTM) network. The introduction of the CNN model enables the predicted value to better track the actual photovoltaic power generation, and can also reduce the uncertainty of the prediction results through its powerful feature extraction capabilities. The BiLSTM network can learn long-term dependencies in the sequence and can make up for the shortcomings of the convolutional neural network (CNN) in this regard. It is difficult to extract the temporal correlation and change law of features simultaneously when CNN and BiLSTM are used separately. The introduction of SMA and BOLL dynamic feature indicators provides more effective data input of meteorological influencing factors for the prediction model.

[0073] As a preferred implementation of this embodiment, the main structural parameters and network structure of the CNN-BiLSTM model used in this embodiment can be specifically set as follows: the number of convolution layers is 1, the number of convolution kernels is 64, the pooling window size is 3, the number of training rounds epochs is 300, the learning rate is 0.001, the batch training size is 24, and the forgetting rate is 0.5. The above parameters are selected to reduce the calculation amount and training time of the CNN-BiLSTM model as much as possible while ensuring the accuracy of the model.

[0074] In order to verify the effectiveness and superiority of the method provided in this embodiment, some specific cases are provided below:

[0075] The data from 8:00-19:00 every day with a time resolution of 5 minutes is selected as the effective historical daily data of photovoltaic power. The proportion of the training set is 0.8, and the data of the first 90 days closest to the test set is selected as the training set.

[0076] In order to study the influence of dynamic feature extraction index on the prediction accuracy of the model, the experiment was divided into two groups according to whether the index parameters were added in the input data: in the first group, no dynamic feature index was added, and the input data was only meteorological factors and effective historical data of photovoltaic power; in the second group, SMA and BOLL dynamic feature indexes were added. The prediction results were taken as the average of 15 experiments.

[0077] In the first group of prediction models, the combined prediction effect of CNN-LSTM is significantly improved compared with single CNN and LSTM, with RMSE reduced by 51.7% and 74.9%, and MAE reduced by 69.9% and 82.9% respectively; CNN-BiLSTM reduces MAE and RMSE by 41.9% and 31.2% respectively compared with the CNN-LSTM model. It can be concluded that the combined model selected in this example has the best prediction accuracy. Compared with the original prediction model corresponding to the first group, the prediction errors of the second group of models have been improved to varying degrees. Therefore, incorporating dynamic feature indicators to capture the fluctuation trend characteristics of photovoltaic power generation makes the effective information density input into the neural network higher, which is conducive to improving the prediction accuracy.

[0078] Embodiment 2

[0079] Accordingly, this embodiment provides a photovoltaic power prediction system based on dynamic feature extraction and CNN-BiLSTM, including a data acquisition and clustering module, a data preprocessing module and a photovoltaic power prediction module.

[0080] The data collection and clustering module is used to collect photovoltaic power historical data, perform secondary clustering on the photovoltaic power historical data through K-means clustering, determine the optimal number of clusters according to the silhouette coefficient, classify weather types, screen abnormal and fluctuating weather, and determine the dynamic characteristics of photovoltaic power historical data. This module is used to implement the function of step S1 in Example 1 and will not be repeated here.

[0081] The data preprocessing module is used to preprocess the screened photovoltaic power historical data and meteorological influencing factor data and divide them into a training set and a test set. This module is used to implement the function of step S2 in the first embodiment and will not be described in detail here.

[0082] The photovoltaic power prediction module is used to establish a BOLL-CNN-BiLSTM model, calculate the SMA and BOLL dynamic characteristic indicators of the preprocessed photovoltaic power historical data, and perform normalization processing. The SMA and BOLL dynamic characteristic indicators of the normalized photovoltaic power historical data and the meteorological influencing factor data are input as input data into the CNN-BiLSTM model for training and prediction, and the predicted photovoltaic power data is denormalized to output the final prediction result. This module is used to implement the function of step S3 in Example 1, which will not be repeated here.

[0083] Embodiment 3

[0084] This embodiment provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM as described in any embodiment of the present invention when executing the computer program.

[0085] Embodiment 4

[0086] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM as described in any embodiment of the present invention is implemented.

[0087] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0088] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0089] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0090] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.

[0091] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM, characterized in that: The following steps are involved: S1: Collect historical photovoltaic power data, perform secondary clustering on the historical photovoltaic power data through K-means clustering, determine the optimal number of clusters based on the silhouette coefficient, divide the weather types, screen abnormal and fluctuating weather, and determine the dynamic characteristics of the historical photovoltaic power data; S2: preprocess the screened photovoltaic power historical data and meteorological influencing factor data, and divide them into training set and test set; S3: Establish a BOLL-CNN-BiLSTM model, calculate the SMA and BOLL dynamic characteristic indicators of the preprocessed photovoltaic power historical data, and perform normalization processing. The SMA and BOLL dynamic characteristic indicators of the normalized photovoltaic power historical data and the meteorological influencing factor data are input into the CNN-BiLSTM model for training and prediction, and the predicted photovoltaic power data is denormalized to output the final prediction result.

2. The photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM according to claim 1 is characterized in that: The step S1 is specifically as follows: First, the collected photovoltaic power historical data are clustered by K-means with the whole day as the time scale. According to the fluctuation characteristics of the power generation curve, they are divided into three weather types with similar dynamic characteristics, namely sunny, sunny to cloudy, and rainy. According to different weather types, corresponding sample labels are established for the collected photovoltaic power historical data. Then, the fluctuation trend of the historical data of photovoltaic power under sudden weather changes is analyzed with hours as the time scale, and the historical days whose clustering results are consistent with the abnormal fluctuating weather types are screened to determine the dynamic characteristics of the historical data of photovoltaic power.

3. The photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM according to claim 1 is characterized in that: The step S2 is specifically as follows: For the photovoltaic power historical data and meteorological influencing factor data, the data collection points during abnormal periods are first eliminated, and then the strongly correlated meteorological influencing factors are screened using the Pearson coefficient to obtain the effective meteorological influencing factor data after dimensionality reduction; The abnormally processed photovoltaic power historical data and effective meteorological influencing factor data are normalized and divided into training set and test set.

4. The photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM according to claim 1 is characterized in that: The calculation formula of the SMA dynamic characteristic index in step S3 is specifically: In the formula, is the moving average indicator of the photovoltaic power historical data of the previous n days before the i-th day; p k is the historical fluctuation value data of photovoltaic power in the previous n days of the i-th day; n represents the number of nodes in the time window scale; n is the number of days in the history of photovoltaic power generation; k∈[i-n+1,i]; The calculation formula of BOLL dynamic characteristic indicator is as follows: In the formula, is the standard deviation of the photovoltaic power historical data of the previous n days before the i-th day; BOLL UP , BOLL DN They represent the upper and lower lines of the Bollinger Bands indicator respectively; α is the adjustment parameter of the bandwidth range between the upper and lower lines of the Bollinger Bands indicator.

5. The photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM according to claim 1 is characterized in that: The convolution calculation process in the CNN-BiLSTM model in step S3 is specifically as follows: In the formula, K represents the convolution kernel, and its length, width and depth are represented by i, j and n respectively; I represents the input of the neuron; o represents the local output of the neuron; b n represents the threshold of the convolution kernel; l, m, and n represent the three dimensions of the output matrix respectively.

6. A photovoltaic power prediction system based on dynamic feature extraction and CNN-BiLSTM, characterized in that: It includes data acquisition and clustering module, data preprocessing module and photovoltaic power prediction module; The data collection and clustering module is used to collect photovoltaic power historical data, perform secondary clustering on photovoltaic power historical data through K-means clustering, determine the optimal number of clusters based on the silhouette coefficient, classify weather types, screen abnormal and fluctuating weather, and determine the dynamic characteristics of photovoltaic power historical data; A data preprocessing module is used to preprocess the screened photovoltaic power historical data and meteorological influencing factor data, and divide them into a training set and a test set; The photovoltaic power prediction module is used to establish a BOLL-CNN-BiLSTM model, calculate the SMA and BOLL dynamic characteristic indicators of the preprocessed photovoltaic power historical data, and perform normalization processing. The SMA and BOLL dynamic characteristic indicators of the normalized photovoltaic power historical data and the meteorological influencing factor data are input into the CNN-BiLSTM model for training and prediction, and the predicted photovoltaic power data is denormalized to output the final prediction result.

7. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the photovoltaic power prediction method based on dynamic feature extraction and CNN-BiLSTM as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • CNN-BiLSTM short-term photovoltaic power prediction method and system based on ensemble empirical mode decomposition

    CN115689008A

Cited By

  • Distributed photovoltaic power anomaly identification and prediction method based on neural network

    CN120892964A

  • Photovoltaic fluctuation adaptive power distribution network electric vehicle carrying capacity evaluation method and system

    CN122639029A