Photovoltaic power generation prediction method based on deep learning
By building a deep learning model and improving optimizer, the problem of prediction difficulty of photovoltaic power generation system is solved, and accurate power prediction and efficient management of photovoltaic power generation system are achieved.
Patent Information
- Application Number
- CN202510159844.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-06-03
AI Technical Summary
The performance and efficiency of photovoltaic power generation systems are affected by a variety of factors, including weather conditions, equipment aging, dust coverage, etc., which leads to increased prediction difficulty and affects the efficient operation and optimization management of the system.
The photovoltaic power generation prediction method based on deep learning is adopted, and the BiTCN-BiLSTM-MultiHeadAttention model is constructed by collecting historical photovoltaic power data and meteorological data, and the optimizer in the model is replaced by the improved crown porcupine optimizer to form a photovoltaic power generation prediction model and perform real-time photovoltaic power prediction.
Accurate power prediction of photovoltaic power generation system is achieved, efficient operation and optimization management capabilities of the system are improved, and can adapt to changes in different weather and equipment status.
Smart Images

Figure CN120090172A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation, and particularly to a photovoltaic power generation prediction method based on deep learning. Background Art
[0002] With the continuous growth of global energy demand and the strengthening of environmental protection awareness, photovoltaic power generation, as a clean and renewable energy form, has received extensive attention and application. The photovoltaic power generation system converts sunlight into electric energy, which can not only meet the energy demand but also reduce greenhouse gas emissions, and is one of the key ways to achieve sustainable development. However, the performance and efficiency of the photovoltaic power generation system are affected by various factors, including weather conditions, equipment aging, dust coverage, etc. In order to ensure the efficient operation and optimized management of the photovoltaic power generation system, the prediction of photovoltaic power generation is crucial.
[0003] Therefore, a photovoltaic power generation prediction method based on deep learning is designed to provide another technical solution to the above technical problems. Summary of the Invention
[0004] Based on this, it is necessary to provide a photovoltaic power generation prediction method based on deep learning to solve the technical problems proposed in the above background art.
[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0006] A photovoltaic power generation prediction method based on deep learning, the steps are as follows:
[0007] S1: Collect historical photovoltaic power data and meteorological data to form a historical photovoltaic dataset;
[0008] S2: Construct a BiTCN-BiLSTM-MultiHeadAttention model;
[0009] S3: Improve the Crown Porcupine optimizer, and replace the optimizer in the BiTCN-BiLSTM-MultiHeadAttention model with the improved Crown Porcupine optimizer to form a photovoltaic power generation prediction model;
[0010] S4: Train the photovoltaic power generation prediction model with the training set in the historical photovoltaic dataset and test it with the validation set;
[0011] S5: Perform real-time photovoltaic power prediction through the trained photovoltaic power generation prediction model.
[0012] As a preferred embodiment of the photovoltaic power generation prediction method based on deep learning provided by the present invention, in the step S1, the historical photovoltaic data set is divided into a training set and a validation set according to 6:4.
[0013] As a preferred embodiment of the photovoltaic power generation prediction method based on deep learning provided by the present invention, in the step S2, a BiTCN-BiLSTM-MultiHeadAttention model is constructed, and the steps are as follows:
[0014] A. Construct a BiTCN layer;
[0015] B. Add a bidirectional long short-term memory layer after the BiTCN layer to construct a BiLSTM layer;
[0016] C. Add a multi-head attention mechanism after the BiLSTM layer to construct a MultiHeadAttention layer.
[0017] As a preferred embodiment of the photovoltaic power generation prediction method based on deep learning provided by the present invention, in the step A, the BiTCN layer is constructed, and the steps are as follows:
[0018] A1: Form a TCN through a one-dimensional convolutional layer, a batch normalization layer, and a residual connection;
[0019] A2: Stack a series of TCNs to form a BiTCN module.
[0020] As a preferred embodiment of the photovoltaic power generation prediction method based on deep learning provided by the present invention, the expression of the one-dimensional convolutional layer is as follows:
[0021]
[0022] Among them, x(τ) is the input data, and h(τ) is the convolution kernel;
[0023] The expression of the residual connection is as follows:
[0024] y(t) = x(τ) + F(x(τ));
[0025] Among them, x(τ) is the input data, and F(x(τ)) is the output of the convolution operation.
[0026] As a preferred embodiment of the photovoltaic power generation prediction method based on deep learning provided by the present invention, in the step B, a bidirectional long short-term memory layer is added after the BiTCN layer to construct a BiLSTM layer, and the steps are as follows:
[0027] The BiLSTM layer is formed by adding a forward LSTM and a backward LSTM after the BiTCN layer.
[0028] As a preferred embodiment of the photovoltaic power generation prediction method based on deep learning provided by the present invention, in the step S3, the crown porcupine optimizer is improved as follows:
[0029] Use the Bernoulli mapping relationship to project the obtained values into the chaotic variable space, and then map the generated chaotic values into the algorithm initial space through linear transformation.
[0030] As a preferred embodiment of the photovoltaic power generation prediction method based on deep learning provided by the present invention, whether to perform iterative optimization on the trained photovoltaic power generation prediction model is selected by verifying whether the verification result of the validation set is correct;
[0031] If the verification result of the validation set is correct, there is no need to perform iterative optimization on the trained photovoltaic power generation prediction model, and the real-time photovoltaic power prediction can be directly carried out according to the input of the collected existing real-time data through the trained photovoltaic power generation prediction model;
[0032] If the verification result of the validation set is incorrect, it is necessary to perform iterative optimization on the trained photovoltaic power generation prediction model through a regression tree model, and the real-time photovoltaic power prediction is carried out according to the input of the collected existing real-time data through the photovoltaic power generation prediction model completed by iterative optimization.
[0033] As a preferred embodiment of the photovoltaic power generation prediction method based on deep learning provided by the present invention, the regression tree model has the following expression:
[0034]
[0035] Among them, n is the number of trees, f t is a function in the function space R, is the predicted value of the regression tree, x i is the i-th input data, and R is the set of all possible regression tree models;
[0036] The iterative process has the following expression
[0037]
[0038] As a preferred embodiment of the photovoltaic power generation prediction method based on deep learning provided by the present invention, the collection of existing real-time data is carried out as follows:
[0039] 1), Collect photovoltaic power generation data and perform preprocessing;
[0040] 2) Perform feature extraction on the preprocessed data in step 1) as follows:
[0041] 21) Establish a data set, which contains multiple sub - data sets for which features are to be extracted;
[0042] 22) Extract the first keyword and the second keyword from the data set, and use the first keyword and the second keyword as initial conditions to search the sub - data sets;
[0043] 23) Extract the sub - data sets in which the first keyword or the second keyword is searched and matched;
[0044] 3) Input the extracted feature values into the photovoltaic power generation prediction model for real - time photovoltaic power prediction.
[0045] It can be seen without doubt that through the above - mentioned technical solution of this application, the technical problems to be solved by this application can surely be solved.
[0046] Meanwhile, through the above - mentioned technical solution, the present invention has at least the following beneficial effects:
[0047] A photovoltaic power generation prediction method based on deep learning provided by the present invention forms a photovoltaic power generation prediction model by constructing a BiTCN - BiLSTM - MultiHeadAttention model and replacing the optimizer in the BiTCN - BiLSTM - MultiHeadAttention model with a CPO optimizer, and then performs power prediction on photovoltaic power generation in real time through the photovoltaic power generation prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following - described drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0049] Figure 1 It is a schematic diagram of the chaotic Bernoulli mapping of the present invention;
[0050] Figure 2 It is a flow chart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] In order to make the purpose, technical solutions and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0052] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0053] It should be noted that, without conflict, the embodiments in the present invention and the features and technical solutions in the embodiments may be combined with each other.
[0054] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0055] Refer to Figure 1 - Figure 2 , a photovoltaic power generation prediction method based on deep learning.
[0056] Collect historical photovoltaic power data and meteorological data (such as temperature, humidity, light intensity, etc.). Specifically, historical photovoltaic power data can be obtained through a photovoltaic power station monitoring system, a power grid company, etc. At the same time, meteorological data can be collected through public meteorological databases of institutions such as meteorological stations, NASA, and NOAA; form a historical photovoltaic data set, and divide it into a training set and a validation set according to 6:4;
[0057] Construct a BiTCN-BiLSTM-MultiHeadAttention model, the steps are as follows:
[0058] A. Construct a BiTCN layer, the steps are as follows:
[0059] A1: Form a TCN (Temporal Convolutional Network) through a one-dimensional convolutional layer, a batch normalization layer, and a residual connection;
[0060] The expression of the one-dimensional convolutional layer is:
[0061]
[0062] Among them, x(τ) is the input data, h(τ) is the convolution kernel (kernel). In the TCN, the input data is convolved through a sliding window to extract local features.
[0063] The expression of the residual connection is as follows:
[0064] y(t) = x(τ) + F(x(τ))
[0065] Among them, x(τ) is the input data, and F(x(τ)) is the output of the convolution operation. The residual connection adds the input data to the output of the convolution operation to capture the long-term dependence relationship in time series data.
[0066] A2: Stack a series of TCNs to form a BiTCN module.
[0067] B. Add a bidirectional long short-term memory layer after the BiTCN layer to construct a BiLSTM layer; used to capture long-term dependencies in the sequence; the steps are as follows:
[0068] Form a BiLSTM layer by adding a forward LSTM and a backward LSTM after the BiTCN layer.
[0069] LSTM cell: Consists of several main parts: forget gate, input gate, output gate, and cell state.
[0070] Forget gate: Determines which information should be forgotten and which should be retained in the cell state.
[0071] Input gate: Determines which information in the newly input data is worth updating to the cell state.
[0072] Output gate: Determines the information that the next hidden state should contain.
[0073] Assume the input at time t is x t , the hidden state is h t , and the cell state is c t , then the update of the LSTM can be described as:
[0074] Forget gate, the expression is as follows:
[0075] f t = σ(W f ·[h t-1 , x t +b f );
[0076] where f t is the activation vector of the forget gate, σ is the sigmoid function, W f is the weight, and b f is the bias.
[0077] Input gate, the expression is:
[0078] i t = σ(W f ·[h t-1 , x t +b i );
[0079]
[0080] where i t is the activation vector of the input gate, is the candidate unit state.
[0081] The unit state is updated with the expression:
[0082]
[0083] where ⊙ represents element-wise multiplication.
[0084] The input gate has the expression:
[0085] o t = σ(W o · [h t-1 , x t + b o );
[0086] h t = o t ⊙ tanh(c t ).
[0087] C. Add a multi-head attention mechanism after the BiLSTM layer to construct a MultiHeadAttention layer, so as to enhance the model's attention to key time points, and then pay attention to the sequence data from different perspectives to extract important features at different levels;
[0088] D. Multiple BiTCN-BiLSTM-MultiHeadAttention models can be stacked as needed, and one or more fully connected layers are added to generate the final photovoltaic power prediction.
[0089] Construct the Crested Porcupine Optimizer (CPO), and replace the optimizer in the BiTCN-BiLSTM-MultiHeadAttention model with the Crested Porcupine Optimizer to form a photovoltaic power generation prediction model.
[0090] The steps to construct the Crested Porcupine Optimizer are as follows:
[0091] 1. Initialize the population: Randomly generate a certain number of individuals and initialize the positions of these individuals to random positions in the search space.
[0092] 2. Calculate the fitness of individuals: Calculate the fitness of each individual according to the value of the objective function. Individuals with high fitness indicate that their positions are safer.
[0093] 3. Select individuals: Select individuals according to their fitness, and select individuals with high fitness to enter the next generation population.
[0094] 4. Crossover and mutation: Perform crossover and mutation operations on the selected individuals to generate new individuals.
[0095] 5. Update the population: Add the new individuals to the population and eliminate the individuals with low fitness.
[0096] 6. Repeat steps 2 - 5 until the termination condition is reached.
[0097] The Crest Porcupine Optimizer is improved by the chaotic Bernoulli map, and the steps are as follows:
[0098] Use the Bernoulli map relationship to project the obtained values into the chaotic variable space, and then map the generated chaotic values into the initial space of the algorithm through linear transformation. The specific expression of the Bernoulli map is:
[0099]
[0100] where the parameter β is a constant, the value of β is 0.518, and the initial value z 0 is 0.326.
[0101] By using the chaotic Bernoulli map, the algorithm can generate more diverse and uniformly distributed solutions in the initialization stage. It can improve the coverage rate of the algorithm in the search space, thus helping to find better global solutions and reducing the risk of falling into local optima at the same time.
[0102] In the standard CPO algorithm, the initialization of the population is usually carried out by random generation, which means that the starting search points of the algorithm are randomly scattered in the search space. Although this method is simple and easy to implement, it may lead to non - uniform initial distribution of the population, thus affecting the global search ability and convergence speed of the algorithm.
[0103] The Bernoulli map belongs to a kind of chaotic map and is often used to generate chaotic sequences. It has characteristics such as non - linearity, ergodicity, and randomness. Replacing the random number initialization of the population in the optimization field will affect the whole process of the algorithm and can obtain better optimization effects than random numbers [Ge Chang, Qian Suqin. Unmanned vehicle path planning based on improved sparrow search algorithm [J]. Journal of Navigation and Positioning, 2022, 10(06): 107 - 111. DOI: 10.16547 / j.cnki.10 - 1096.20220614].
[0104] In addition, research by SAITO A et al. has shown that the ergodic uniformity and convergence rate of the Bernoulli map are suitable for use as chaotic population initialization. Through reasonable experimental settings, it has been proven that the Bernoulli map can be used to generate the initial population of optimization algorithms [SAITO A, YAMAGUCHI A. Pseudorandom number generation using chaotic true orbits of the Bernoulli map[J / OL]. Chaos: An Interdisciplinary Journal of Nonlinear Science, 2016, 26(6): 063122. DOI: 10.1063 / 1.4954023]. The distribution of the Bernoulli map chaotic sequence is as follows Figure 1 shown (horizontal axis (chaotic value): The horizontal axis represents the chaotic values generated by the Bernoulli map, ranging from 0 to 1. These values are generated according to specific chaotic mapping rules, with the aim of generating a series of seemingly random but actually deterministic numerical values within the [0, 1] interval. Vertical axis (frequency): The vertical axis represents the relative frequency of each value in the generated chaotic sequence. Here, the frequency is normalized, with a maximum value of 1, which means the chart shows the proportion of the frequency of each value, rather than the absolute number. Distribution characteristics: The bar distribution in the figure shows that the values of the chaotic sequence do not have an obvious concentration trend and seem to be evenly distributed within the [0, 1] interval, which conforms to the expected characteristics of the chaotic sequence. Uniformity: An ideal chaotic sequence should be approximately uniformly distributed within the [0, 1] interval. Although the frequency of values in some intervals is slightly higher, there is no obvious regular deviation, indicating that this chaotic sequence has good randomness and coverage and is suitable for population initialization in optimization algorithms.
[0105] Train the photovoltaic power generation prediction model using the training set in the historical photovoltaic dataset, and test it using the validation set. At the same time, the hyperparameters of the CPO, such as population size, number of iterations, inertia weight, etc., can be adjusted according to the test results;
[0106] The steps for training the photovoltaic power generation prediction model are as follows:
[0107] Determine the initial learning rate at the start of model training, which is 0.001 - 0.01, specifically 0.005;
[0108] Set the decay rate to 0.95;
[0109] Determine the total number of iterations T, specifically 20 - 100;
[0110] During the training process, the learning rate is updated according to the current iteration number t and the decay rate, and the expression is:
[0111] \text{Learning rate}=\text{Initial learning rate}\times(\text{Decay rate})^{(t / T)}
[0112] The code is as follows:
[0113]
[0114] By verifying whether the verification result of the validation set is correct, it is decided whether to iteratively optimize the trained photovoltaic power prediction model. If the verification result of the validation set is correct, there is no need to iteratively optimize the trained photovoltaic power prediction model, and the real-time photovoltaic power prediction can be directly carried out according to the input of the collected existing real-time data through the trained photovoltaic power prediction model;
[0115] If the verification result of the validation set is incorrect, the trained photovoltaic power prediction model needs to be iteratively optimized through the regression tree model. The regression tree model is expressed as follows:
[0116]
[0117] Among them, n is the number of trees, f t is a function in the function space R, is the predicted value of the regression tree, x i is the i-th input data, R is the set of all possible regression tree models, and each iteration does not affect the model, that is, the original model remains unchanged, and a new function is added to the model. One function corresponds to one tree, and the newly generated tree fits the residuals of the previous prediction;
[0118] The iteration process is expressed as follows
[0119]
[0120] When the first tree f 1 (x i ) is trained by the regression tree model, for the places not well trained by the first tree, the second tree f 2 (x i ) is used for training. Similarly, for the places not well trained by the second tree, the third tree f 3 (x i ) is used for training, and so on, until the training is completed through f k (x i ) trees.
[0121] For example, the distance from point A to point B is 100 meters. The first tree is established, and the predicted distance is 90 meters. The initial residual value is 100 - 90 = 10 meters. Then, the residual of 10 meters is used to establish the second tree. Suppose the predicted value of the second tree is 4 meters. At this time, the residual is 10 - 4 = 6 meters. Then, the residual of 6 is used to establish the third tree, and its predicted value is 2 meters. At this time, the residual is 6 - 2 = 4 meters. And so on, continuously constructing trees until the residual of the k-th tree is 0, and the cumulative sum of the total predicted values is 100 meters. When establishing the k-th tree, the previous ones from the 1st, 2nd, 3rd to the (k - 1)-th are known, while the k-th tree is unknown, and the k-th tree is solved through training.
[0122] Data augmentation is performed on the photovoltaic power generation prediction model by scaling or outlier insertion of time series data. Furthermore, it is possible to simulate meteorological conditions and photovoltaic output under different intensities through the scaling of time series data, helping the model learn consistency in various situations, and enhancing the model's ability to handle abnormal situations through outlier insertion.
[0123] The steps for data augmentation of the photovoltaic power generation prediction model through the scaling of time series data are as follows:
[0124] Step 1: Determine that the scaling factor range is 0.8 - 1.2, so as to be able to simulate a 20% change in both the upper and lower levels of meteorological conditions and photovoltaic output intensity. Specifically, it can be 1.1.
[0125] Step 2: Generate a random scaling factor for each sample. For each sample (i.e., meteorological and photovoltaic data at each time point) in the dataset, generate a random scaling factor. This scaling factor should be randomly drawn from the range determined in Step 1 as follows:
[0126] # Assume we have 100 samples, and each sample is a vector
[0127] num_samples = 100
[0128] samples = np.random.rand(num_samples, num_features) # Assume num_features is the number of features
[0129] # Determine the scaling factor range
[0130] scale_factor_min = 0.8
[0131] scale_factor_max = 1.2
[0132] # Generate a random scaling factor for each sample
[0133] scale_factors = np.random.uniform(scale_factor_min, scale_factor_max, num_samples)
[0134] Step 3: Apply the generated random scaling factors to each sample, specifically by matrix multiplication, as follows:
[0135] scaled_samples = samples * scale_factors[:, np.newaxis]
[0136] Among them, the operation of scale_factors[:, np.newaxis] is to convert the scaling factors from a one-dimensional array to a two-dimensional column vector so that matrix multiplication can be performed with the sample matrix.
[0137] Step 4: Verify the model
[0138] After training the photovoltaic power generation prediction model, use the unscaled data for verification to evaluate the performance of the photovoltaic power generation prediction model on unseen data.
[0139] Perform data augmentation on the photovoltaic power generation prediction model by outlier insertion, as follows:
[0140] ①: Define the outliers as the values that exceed the mean of the data plus or minus three standard deviations;
[0141] ②: Calculate the mean and standard deviation of the dataset for determining outliers. The code is as follows:
[0142] Assume data is a two-dimensional array containing multiple samples, where each row is a sample
[0143] mean = np.mean(data, axis = 0)
[0144] std = np.std(data, axis = 0)
[0145] ③: Randomly select the data points to be replaced with outliers. At this time, the number of selected data points should be very small to avoid overly affecting the distribution of the dataset. The code is as follows:
[0146] num_samples = data.shape[0]
[0147] num_anomalies = int(num_samples * 0.01) # Assume we select 1% of the data points as outliers
[0148] # Randomly select data point indices
[0149] anomaly_indices = np.random.choice(num_samples, num_anomalies, replace=False)
[0150] ④: Generate outliers for the selected data points. The code is as follows:
[0151] # Generate outliers
[0152] anomaly_values = np.random.uniform(mean - 3*std, mean + 3*std, size=(num_anomalies, data.shape[1]))
[0153] ⑤: Replace the outliers in the original data. The code is as follows:
[0154] # Replace outliers
[0155] for i, index in enumerate(anomaly_indices):
[0156] data[index] = anomaly_values[i]
[0157] ⑥: Use the augmented dataset to train the model; the process should include cross-validation to ensure that the model still performs well after outlier insertion. The code is as follows:
[0158] # Replace outliers
[0159] for i, index in enumerate(anomaly_indices):
[0160] data[index] = anomaly_values[i]
[0161] ⑦: After model training, use the dataset without outlier insertion to evaluate the performance of the model to ensure that the model can handle normal data.
[0162] Then, through iterative optimization of the completed photovoltaic power prediction model, perform real-time photovoltaic power prediction based on the collected existing real-time data input.
[0163] Collect existing real-time data. The steps are as follows:
[0164] 1) Collect photovoltaic power generation data and perform preprocessing. The collected data includes, but is not limited to, meteorological data, equipment status data, power generation data, etc. Key data includes, but is not limited to, meteorological information such as solar irradiance, temperature, humidity, wind speed, wind direction, air pressure, as well as the current, voltage, power, etc. of the equipment. The steps are as follows:
[0165] Clean the collected photovoltaic power generation data, and at the same time check whether there is any missing data after cleaning; correct the verified data and perform filtering after correction, and then update the data.
[0166] 11) For the preprocessed data, perform data augmentation through time series. Specifically, random jittering, scaling, translation, etc. can be performed through time series. The expression is as follows:
[0167] New data = Original data × (1 + Random jitter ratio)
[0168] Among them, the random jitter ratio is a small random floating-point number.
[0169] 2) Extract features from the data preprocessed in step 1). The steps are as follows:
[0170] 21) Establish a data set, where the data set contains multiple sub-data sets to be feature-extracted;
[0171] 22) Extract the first keyword and the second keyword in the data set, and use the first keyword and the second keyword as initial conditions to search the sub-data sets;
[0172] 23) Extract the first keyword or the second keyword that is searched and matched in each sub-data set;
[0173] 3) Input the extracted feature values into the photovoltaic power generation prediction model for real-time photovoltaic power prediction.
[0174] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the present invention to the specific embodiments described. Obviously, according to the content of this specification, many modifications and changes can be made. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and utilize the present invention well. The present invention is only limited by the claims and their full scope and equivalents.
Claims
1. A photovoltaic power generation prediction method based on deep learning, characterized in that: Here are the steps: S1: Collect historical photovoltaic power data and meteorological data to form a historical photovoltaic data set; S2: Build the BiTCN-BiLSTM-MultiHeadAttention model; S3: Improve the crown porcupine optimizer and replace the optimizer in the BiTCN-BiLSTM-MultiHeadAttention model with the improved crown porcupine optimizer to form a photovoltaic power generation prediction model; S4: The photovoltaic power generation prediction model is trained using the training set in the historical photovoltaic data set and tested using the validation set; S5: Real-time photovoltaic power prediction is performed through the trained photovoltaic power generation prediction model.
2. The photovoltaic power generation prediction method based on deep learning according to claim 1, characterized in that: In step S1, the historical photovoltaic data set is divided into a training set and a validation set according to a ratio of 6:
4.
3. The photovoltaic power generation prediction method based on deep learning according to claim 1, characterized in that: In step S2, the BiTCN-BiLSTM-MultiHeadAttention model is constructed as follows: A. Construct BiTCN layer; B. Add a bidirectional long short-term memory layer after the BiTCN layer to construct a BiLSTM layer; C. Add a multi-head attention mechanism after the BiLSTM layer to build a MultiHeadAttention layer.
4. The photovoltaic power generation prediction method based on deep learning according to claim 3 is characterized in that: In step A, the BiTCN layer is constructed as follows: A1: TCN is formed through one-dimensional convolutional layers, batch normalization layers and residual connections; A2: Stack a series of TCNs to form a BiTCN module.
5. The photovoltaic power generation prediction method based on deep learning according to claim 3, characterized in that: The expression of the one-dimensional convolutional layer is as follows: Among them, x(τ) is the input data, h(τ) is the convolution kernel; The residual connection expression is as follows: y(t)=x(τ)+F(x(τ)); Where x(τ) is the input data and F(x(τ) is the output of the convolution operation.
6. The photovoltaic power generation prediction method based on deep learning according to claim 3 is characterized in that: In step B, a bidirectional long short-term memory layer is added after the BiTCN layer to construct a BiLSTM layer. The steps are as follows: The BiLSTM layer is formed by adding a forward LSTM and a backward LSTM after the BiTCN layer.
7. The photovoltaic power generation prediction method based on deep learning according to claim 1, characterized in that: In the S3 step, the crown porcupine optimizer is improved, and the steps are as follows: The obtained values are projected into the chaotic variable space using the Bernoulli mapping relationship, and then the generated chaotic values are mapped into the initial space of the algorithm through linear transformation.
8. The photovoltaic power generation prediction method based on deep learning according to claim 1, characterized in that: By checking whether the verification results of the verification set are correct, it is determined whether it is necessary to iteratively optimize the trained photovoltaic power generation prediction model; If the verification result of the verification set is correct, there is no need to iteratively optimize the trained photovoltaic power generation prediction model. The trained photovoltaic power generation prediction model can be directly used to perform real-time photovoltaic power prediction based on the collected existing real-time data input; If the verification result of the verification set is incorrect, the trained photovoltaic power generation prediction model needs to be iteratively optimized through the regression tree model. The photovoltaic power generation prediction model completed through iterative optimization can perform real-time photovoltaic power prediction based on the collected existing real-time data input.
9. The photovoltaic power generation prediction method based on deep learning according to claim 8, characterized in that: The regression tree model is expressed as follows: Where n is the number of trees, f t is a function in the function space R, is the predicted value of the regression tree, x i is the i-th data input, and R is the set of all possible regression tree models; The iterative process is expressed as follows 10. The photovoltaic power generation prediction method based on deep learning according to claim 8, characterized in that: To collect existing real-time data, follow these steps: 1) Collect photovoltaic power generation data and pre-process it; 2) Perform feature extraction on the data preprocessed in step 1), the steps are as follows: 21) Establishing a data set, wherein the data set includes multiple sub-data sets to be feature extracted; 22) Extract the first keyword and the second keyword from the data set, and use the first keyword and the second keyword as initial conditions to search the sub-data set; 23) Search each sub-data set for matching the first keyword or the second keyword and extract; 3) Input the extracted characteristic values into the photovoltaic power generation prediction model for real-time photovoltaic power prediction.
Citation Information
Cited By
Photovoltaic power prediction method of VMD-ATGCN based on multi-strategy optimization and related equipment
CN121279833A
Photovoltaic power ultra-short-term prediction method, system, equipment and medium
CN121997298A
A photovoltaic power ultra-short-term prediction method, system, device and medium
CN121997298B