Photovoltaic power generation power prediction method and device

By introducing a bidirectional deep network structure into the photovoltaic power generation prediction model, including a bidirectional time convolution layer, a bidirectional gating cycle unit and a global attention model, the shortcomings of the existing photovoltaic power generation prediction model in real-time data processing and adaptive adjustment are solved. , achieving higher prediction accuracy and better generalization capabilities.

CN119518724APending Publication Date: 2025-02-25XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY

Patent Information

Application Number
CN202411567983.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing photovoltaic power generation prediction models are insufficient in real-time data processing and model adaptive adjustment, and the prediction accuracy is not high. Especially when dealing with complex and sudden environmental factors, the prediction results may be largely biased.

Method used

Using a photovoltaic power generation prediction method based on a bidirectional deep network, long-term dependencies are captured through bidirectional time convolutional layer, bidirectional gated cyclic unit captures context dependencies, and optimizes the weight of time steps through the global attention model to generate more accurate Photovoltaic power prediction sequence.

Benefits of technology

It improves the accuracy and generalization ability of photovoltaic power generation prediction, can handle complex and sudden environmental factors more accurately, and reduces the dependence on a large amount of historical data and high-performance computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119518724A_ABST
    Figure CN119518724A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of new energy and power systems, and discloses a photovoltaic generation power prediction method and device, and the method comprises the steps: collecting the historical meteorological data and generation power data of a photovoltaic power station according to a preset sampling interval; constructing a photovoltaic power generation prediction model based on the bidirectional deep network; training the training set through the constructed photovoltaic power generation prediction model; performing photovoltaic power generation prediction by adopting a single-step prediction or multi-step prediction mode to generate a continuous photovoltaic power generation power sequence; and predicting the photovoltaic power generation power through the generated photovoltaic power generation power prediction sequence. According to the method, the problems of insufficient real-time data processing and model adaptive adjustment and low prediction precision of photovoltaic power generation prediction are overcome, and the method does not depend on a large amount of historical data and high-performance computing resources. When the photovoltaic data information is captured, bidirectional information capture is considered, and more accurate prediction can be carried out when complex and sudden environmental factors are processed in practical application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of new energy and electric power systems, and specifically relates to a photovoltaic power generation power prediction method and device. Background Art

[0002] Photovoltaic (PV) technology is widely used to supplement thermal power generation. The more accurate the PV power generation forecast is, the more reliable the grid operation is. Therefore, developing a high-quality PV power forecasting method is the key to solving this problem.

[0003] Photovoltaic power generation prediction is highly adaptable to time series prediction tasks in artificial intelligence. In the research of deep learning prediction models, the recurrent neural network (RNN) model has received widespread attention since its birth. Its variants, long short-term memory network (LSTM) and gated recurrent unit network (GRU), are good at capturing and processing long-term dependencies of data with their gating mechanisms, making them suitable for cyclic data. Compared with LSTM, GRU has fewer parameters and faster calculation time. In the current deep learning photovoltaic power generation prediction model, although it shows relatively excellent prediction accuracy and adaptability, it still has certain limitations. For example, existing models often rely on a large amount of historical data and high-performance computing resources, and only consider one-way information capture when capturing photovoltaic data information, but do not fully capture photovoltaic data information, which makes them face the challenges of data scarcity and excessive computational overhead in practical applications. In addition, with the dynamic changes in weather, seasons and light conditions, the generalization ability of the model needs to be improved, especially when dealing with complex and sudden environmental factors, the prediction results may have large deviations.

[0004] The Chinese patent publication number is CN117993553A, and the name is a patent application for a method and device for predicting the power generation of a centralized photovoltaic power station. The method includes: obtaining the original photovoltaic power generation data set of the photovoltaic power station; performing a data processing on the data of the original photovoltaic power generation data set to obtain an indirect data set; performing a secondary data processing on the data in each of the data sets to generate a sample data set; constructing a training set using the sample data set to train the photovoltaic power generation prediction model to obtain the optimal photovoltaic power generation prediction model; using the optimal photovoltaic power generation prediction model to predict the photovoltaic power generation of the photovoltaic power station. The method of this patent application relies on a large amount of historical data and high-performance computing resources, and is not suitable for processing complex and sudden environmental factors. Summary of the invention

[0005] In order to overcome the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a photovoltaic power generation prediction method and device, by providing a photovoltaic power generation prediction method based on a bidirectional deep network. The problems existing in the prior art of insufficient capture of photovoltaic data information, the generalization ability of the prediction model, and the inaccurate photovoltaic prediction are solved.

[0006] To achieve the above object, the technical solution adopted by the present invention is: In a first aspect, the present invention provides a photovoltaic power generation power prediction method, comprising the following steps: Collect historical meteorological data and power generation data of the photovoltaic power station according to the preset sampling interval; By constructing a bidirectional temporal convolutional layer, the long-term dependencies in the photovoltaic power input time series are captured and extracted, while ensuring the extraction of local features. The bidirectional gated recurrent unit is used to capture the contextual dependencies in the time series and extract the nonlinear time-varying characteristics of photovoltaic power generation. The bidirectional gated recurrent unit is optimized through the global attention model to dynamically adjust the weight of the time step. At each time step, the global attention model infers a variable-length alignment weight vector based on the current target state and all source states, and calculates the global context vector based on the variable-length alignment vector as the weighted average of all source states. The training set is trained using the constructed photovoltaic power generation prediction model; Use single-step prediction or multi-step prediction mode to predict photovoltaic power generation and generate a continuous photovoltaic power sequence; The photovoltaic power generation power is predicted by the generated photovoltaic power generation prediction sequence.

[0007] Optionally, synchronize weather data and power generation data using timestamps:

[0008] in, It's in time The time alignment error between the photovoltaic power generation data and the meteorological data is It's at the time The photovoltaic power generation data timestamp on It's at the time The weather data timestamp on the .

[0009] Optionally, the missing values ​​of the collected photovoltaic power generation data are filled with an interpolation algorithm:

[0010] in, is the value after filling the photovoltaic power generation data. is the known value before the current missing value, is the known value after the current missing value, is the number of missing values.

[0011] Optionally, the temporal convolution operation of the bidirectional temporal convolutional network adopts the formula:

[0012]

[0013]

[0014] In the formula, is the output after convolution of photovoltaic data, is the weight of the convolution kernel, is the time step of the photovoltaic data input sequence, is the width of the convolution kernel, and Respectively represent the output of the forward and backward convolution on the photovoltaic dataset, represents the convolution operation, is the size of the convolution window.

[0015] Optionally, a bidirectional gated recurrent unit adopts the formula:

[0016]

[0017]

[0018] In the formula, It is a traditional GRU network calculation process. and are the state and weight of the current forward hidden layer, , are the backward hidden layer state and weight at that time, It's time The offset of the hidden layer state at .

[0019] Optionally, the number of hidden layer units of the bidirectional gated recurrent unit is set to 64, the number of network layers is set to 2, the Dropout ratio is set to 0.3, the learning rate is set to 0.001, and the optimizer uses the Adam optimizer.

[0020] In a second aspect, the present invention provides a photovoltaic power generation power prediction system, comprising: A data acquisition module is used to collect historical meteorological data and power generation data of the photovoltaic power station according to a preset sampling interval; The model building module is used to capture and extract the long-term dependencies in the photovoltaic power input time series by constructing a bidirectional temporal convolutional layer, while ensuring the extraction of local features; use a bidirectional gated recurrent unit to capture the contextual dependencies in the time series and extract the nonlinear time-varying characteristics of photovoltaic power generation; optimize the bidirectional gated recurrent unit through the global attention model to dynamically adjust the weight of the time step. At each time step, the global attention model infers a variable-length alignment weight vector based on the current target state and all source states, and calculates the global context vector based on the variable-length alignment vector as the weighted average of all source states; A model training module is used to train the training set using the constructed photovoltaic power generation prediction model; A prediction sequence generation module is used to predict photovoltaic power generation using a single-step prediction or a multi-step prediction mode to generate a continuous photovoltaic power generation sequence; The power prediction module is used to predict the photovoltaic power generation power through the generated photovoltaic power generation power prediction sequence.

[0021] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the photovoltaic power generation prediction method is implemented when the processor executes the computer program.

[0022] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the photovoltaic power generation power prediction method is implemented.

[0023] In a fifth aspect, the present invention provides a computer program product comprising a computer-readable medium, wherein the computer-readable medium contains a computer-readable program code, and the program code executes the photovoltaic power generation power prediction method.

[0024] Compared with the prior art, the present invention has the following beneficial effects: The photovoltaic power generation prediction method of the present invention provides a photovoltaic power generation prediction method based on a bidirectional deep network, which overcomes the problems of photovoltaic power generation prediction in the prior art in terms of real-time data processing and model adaptive adjustment, and low prediction accuracy, and does not rely on a large amount of historical data and high-performance computing resources. When capturing photovoltaic data information, bidirectional information capture is considered, and more accurate predictions can be made in practical applications when facing complex and sudden environmental factors.

[0025] Furthermore, a photovoltaic power prediction method of the present invention combines a bidirectional temporal convolutional network, a bidirectional gated recurrent unit and a global attention mechanism, which can improve the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are for illustration purposes only and are not intended to limit the scope of the present disclosure in any way.

[0027] In the attached picture: Figure 1 This is a schematic diagram of the photovoltaic power generation power prediction method according to Embodiment 1 of the present invention; Figure 2 This is a comparative experiment between the single-step photovoltaic power generation prediction model of Example 2 of the present invention and the traditional photovoltaic power generation prediction model; Figure 3 This is a comparative experiment between the multi-step photovoltaic power generation prediction model of Example 2 of the present invention and the traditional photovoltaic power generation prediction model. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0030] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The present application may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined. The present invention is described in detail below with reference to the accompanying drawings.

[0031] like Figure 1 As shown, a photovoltaic power generation power prediction method of the present invention comprises the following steps: Collect historical meteorological data and power generation data of the photovoltaic power station according to the preset sampling interval; By constructing a bidirectional temporal convolutional layer, the long-term dependencies in the photovoltaic power input time series are captured and extracted, while ensuring the extraction of local features. The bidirectional gated recurrent unit is used to capture the contextual dependencies in the time series and extract the nonlinear time-varying characteristics of photovoltaic power generation. The bidirectional gated recurrent unit is optimized through the global attention model to dynamically adjust the weight of the time step. At each time step, the global attention model infers a variable-length alignment weight vector based on the current target state and all source states, and calculates the global context vector based on the variable-length alignment vector as the weighted average of all source states. The training set is trained using the constructed photovoltaic power generation prediction model; Use single-step prediction or multi-step prediction mode to predict photovoltaic power generation and generate a continuous photovoltaic power sequence; The photovoltaic power generation power is predicted by the generated photovoltaic power generation prediction sequence.

[0032] Example 1 In order to solve the above technical problems, the photovoltaic power generation prediction method based on a bidirectional deep network of the present invention comprises the following steps in sequence: S1: Collect historical meteorological data and power generation data of the photovoltaic power station according to the preset sampling interval; S2: preprocessing the collected power generation related data and dividing it into training sets; S3: Construct a photovoltaic power generation prediction model based on a bidirectional deep network; S4: Start training the training set using the constructed prediction model; S5: Use single-step and three-step prediction modes to predict photovoltaic power generation and generate continuous photovoltaic power generation sequences S6: Apply the generated photovoltaic power generation power prediction sequence results to the actual photovoltaic power generation scenario.

[0033] Furthermore, the photovoltaic power generation related data in step S1 include: using high-precision meteorological sensors (radiometers, temperature and humidity sensors) to collect actual photovoltaic power generation data of the power meter, meteorological information (temperature, humidity, solar radiation), power generation device status, etc., where the data sampling interval is single step (30min) and three steps (1.5h). To ensure the consistency of meteorological data and power generation data, the data is synchronized using timestamps.

[0034]

[0035] in, It's in time The time alignment error between the photovoltaic power generation data and the meteorological data is It's at the time The photovoltaic power generation data timestamp on It's at the time The weather data timestamp on the .

[0036] Fuse multi-sensor data to improve data accuracy.

[0037]

[0038] in, and is the weight of the sensor.

[0039] Furthermore, in step S2, the data is preprocessed, including missing value processing, outlier detection, data normalization and data partitioning of photovoltaic data.

[0040] Further, step S2 includes the following steps: S201, fill in the missing values ​​of the collected photovoltaic power generation data using an interpolation algorithm.

[0041]

[0042] in, is the value after filling the photovoltaic power generation data. is the known value before the current missing value, is the known value after the current missing value, is the number of missing values.

[0043] S202, normalize the interpolated photovoltaic power generation data. In this study, Normalize the data.

[0044]

[0045] in, is the normalized photovoltaic power generation data, is the original photovoltaic power generation data, and Respectively represent the maximum and minimum values ​​in the photovoltaic data series.

[0046] S203, dividing the processed photovoltaic power generation data into a training set and a test set. In the present invention, the first 80% of the data set is used as the training set of the model, and the last 20% is used as the test set.

[0047] The purpose of data preprocessing is to standardize the original input data in order to eliminate the differences between different dimensions and ensure the stability and efficiency of model training. Through data preprocessing, the data scale can be balanced, the magnitude differences between photovoltaic data features can be eliminated, and the invention can be ensured to pay fair attention to each feature related to photovoltaic power generation and avoid the deviation of model prediction caused by magnitude differences. After normalizing the photovoltaic power generation data, the model can converge faster and reduce the training time. The normalization of photovoltaic data avoids the sensitivity of the model to data with large fluctuations, thereby enhancing the generalization ability of the model.

[0048] Further, step S3 includes the following steps: S301, construct a bidirectional temporal convolutional layer to capture the local features of the time series.

[0049] S302. Use a bidirectional gated recurrent unit (BiGRU) to process temporal dependencies.

[0050] S303. Optimize the bidirectional gated recurrent unit through the global attention mechanism to dynamically adjust the weight of the time step.

[0051] The bidirectional temporal convolutional network is used to extract the long-term dependencies in the photovoltaic power input time series, while ensuring the extraction of local features and avoiding the gradient vanishing problem that occurs in the calculation process of the recurrent neural network (RNN).

[0052] The temporal convolution operation uses the following formula:

[0053]

[0054]

[0055] In the formula, is the output after convolution of photovoltaic data, is the weight of the convolution kernel, is the time step of the photovoltaic data input sequence, is the width of the convolution kernel, and Respectively represent the output of the forward and backward convolution on the photovoltaic dataset, represents the convolution operation, is the size of the convolution window.

[0056] Bidirectional temporal convolutional network (BiTCN) has a longer receptive field than recurrent neural network (RNN), and can effectively handle the long-term dependency between meteorological data and historical data in photovoltaic power generation. Bidirectional temporal convolutional network can simultaneously consider the forward and backward convolution results at each time step of the time series. This bidirectional structure improves the feature extraction capability of complex time series data. Through the all-round convolution processing of the time series, the model can more accurately identify the periodicity and trend characteristics, thereby improving the accuracy of the prediction. Through the smooth convolution operation, the impact of noise on the model is effectively reduced, and the stability of the prediction is improved.

[0057] The bidirectional gated recurrent unit is used to further capture the contextual dependencies in the time series and can extract the nonlinear time-varying characteristics of photovoltaic power generation. In the present invention, in order to fully consider the information laws of both the positive and negative sides of the data, the bidirectional gated recurrent unit is composed of a bidirectional recurrent neural network with forward propagation and backward propagation. Compared with the unidirectional GRU, the bidirectional gated recurrent unit takes into account the changing laws of the data, and there is no connection between the forward hidden layer and the backward hidden layer. Therefore, the bidirectional gated recurrent unit can better mine the sequence characteristics of the data. The formula is as follows:

[0058]

[0059]

[0060] In the formula, It is a traditional GRU network calculation process. and are the state and weight of the current forward hidden layer, , are the backward hidden layer state and weight at that time respectively. It's time The offset of the hidden layer state at .

[0061] The bidirectional GRU is able to process historical and future information simultaneously, enabling the model to more comprehensively understand the temporal variations in PV power generation.

[0062] Compared with traditional RNN, GRU effectively avoids the gradient vanishing problem in long-term dependent sequences through the gating mechanism, and enhances the model's ability to process long-sequence data of photovoltaic power generation.

[0063] By introducing a bidirectional structure, the model's accuracy in photovoltaic power generation prediction is significantly improved, especially in the case of irregular fluctuations (such as under different weather conditions).

[0064] Furthermore, a bidirectional gated recurrent unit network optimized based on the global attention model is adopted.

[0065] Further, step S301 includes the following steps: Use temporal convolution (1D convolution) operation to extract local features in time series. Use two convolution operations at the same time, one for forward feature extraction and the other for backward feature extraction.

[0066] Forward convolution operation:

[0067] Inverse convolution operation:

[0068] Bidirectional convolution output:

[0069] in, is the input photovoltaic power generation data at time point The forward hidden state on represents the result obtained by the forward convolution operation, Is a forward convolution operation function, is the input photovoltaic power generation data at time point The forward hidden state on represents the result obtained by the backward convolution operation, is a backward convolution operation function. is the photovoltaic power generation data at the time point of the bidirectional temporal convolutional network The final output on is the forward convolution at time point The output on is the backward convolution at time point The output on Indicates time point Input PV power generation data.

[0070] Design a 5-layer BiTCN structure, each layer includes forward and backward convolution operations, The BiTCN output of the layer:

[0071] in, Photovoltaic power generation data is Layer BiTCN Network Time Point The output on Photovoltaic power generation data is Layer BiTCN Time Point The hidden state output on and Respectively represent The convolution kernel and bias term of the layer.

[0072] Use pooling layers to reduce feature dimensions and computational complexity

[0073] in, It's at the time The output result after the maximum pooling operation is: Max pooling operation, It is a bidirectional convolutional network (BiTCN) at time point The output on .

[0074] The photovoltaic power generation data output by the pooling layer is flattened and further processed by the fully connected layer.

[0075]

[0076] in, and denote the weight and bias of the fully connected layer respectively.

[0077] Linear activation is used to generate the final PV power prediction results.

[0078]

[0079] in, is the model at time point The predicted output on is the activation function, is the linear output of the model (the original output without activation function processing).

[0080] Further, step S302 includes the following steps: The gated recurrent unit (GRU) processes the photovoltaic power generation data using the following formula: Reset the gate:

[0081] Update Gate:

[0082] Candidate Activation:

[0083] Final activation:

[0084] in, , , is the weight matrix, , , is the bias term, is the sigmoid activation function, is the hyperbolic tangent activation function, is element-wise multiplication.

[0085] In the case of photovoltaic power generation data, the reset gate determines whether historical meteorological data (temperature or light intensity of the previous day) should still be considered at the current moment. The update gate is used to determine whether the current meteorological conditions (current light intensity or temperature) should mainly rely on historical information or focus more on the current new data changes.

[0086] The forward GRU processes the sequence of photovoltaic power generation data from the starting point to the end point of the time series.

[0087]

[0088] in, is the forward GRU at time step The hidden state of is a forward gated recurrent unit, is the time step The input data on .

[0089] Reverse GRU processes the sequence of photovoltaic power generation data from the end point to the starting point of the time series

[0090] in, is the backward GRU at time step The hidden state of is a backward gated recurrent unit, is the time step The input data on .

[0091] Bidirectional GRU output, concatenate the outputs of the forward and backward GRU to get the final bidirectional GRU representation.

[0092]

[0093] in, is a bidirectional GRU at time step The final hidden state of is the forward GRU at time step The hidden state of is the backward GRU at time step The hidden state of .

[0094] Further, step S303 includes the following steps: The global attention model is used to derive the context vector By comparing the current target hidden state With each source hidden state , get a variable length alignment vector , whose size is equal to the number of time steps on the source side:

[0095] Attention weight calculation:

[0096] in, is the query matrix, is the key matrix, is the value matrix, is the dimension of the key, Operations are used to calculate attention weights.

[0097] Global weighted sum:

[0098] in, It is for The attention weights for time steps, is the corresponding value vector, It is the contextual representation of the weighted photovoltaic power generation data.

[0099] At each time step , the model is based on the current target state and all source states Infer a variable-length alignment weight vector. Then, according to Calculate the global context vector As the weighted average of all source states. GlobalAttention is a mechanism used to strengthen the model's attention to different parts of the input sequence. In the BiGRU model, the global attention mechanism can help the model better focus on the most relevant parts of the input sequence, thereby improving the performance and generalization of the model. At each time step, the global attention mechanism calculates a weight vector that represents the model's attention to each part of the input sequence, and then applies these weights to the feature representation of the BiGRU output. By weighting the features at all positions, the model can focus more specifically on important time domain features, improving the model's perception of the time domain features of abnormal power consumption sequences.

[0100] Further, step S4 includes the following steps: The preprocessed photovoltaic power generation data and meteorological data are divided into training sets and test sets, where the training set accounts for 80% of the entire data set and the test set accounts for 20% of the entire data set.

[0101] BiTCN Hyperparameter Settings The convolution layer depth, convolution kernel size, and dilation factor are set to 3, 3, and 2, respectively. BiGRU hyperparameter settings: The number of hidden layer units, the number of network layers, the Dropput ratio, and the learning rate are set to 64, 2, 0.3, and 0.001, respectively, and the optimizer uses the Adam optimizer.

[0102] Global Attention Mechanism (GAM) hyperparameter settings: the number of attention heads and attention layers are set to 4 and 1 respectively.

[0103] Other hyperparameter settings: Batch_size, Epochs, and regularization parameters are set to 64, 100, and 0.001, respectively.

[0104] Furthermore, the loss function of the model can measure the difference between the predicted value and the true value, and the loss function used in the present invention is the mean square error (MSE).

[0105]

[0106] in, is the sample size, It is The true value of the samples, is the predicted value of the model.

[0107] MSE can directly reflect the deviation between the model prediction value and the actual value, and better guide the optimization of the model.

[0108] By optimizing the MSE by gradient descent, the model can gradually adjust the weight parameters to reduce the prediction error.

[0109] The adaptive learning rate optimization algorithm can automatically adjust the learning rate of each parameter to accelerate training and improve model performance. The Adam optimizer used in the present invention is as follows:

[0110]

[0111]

[0112]

[0113]

[0114] in, and are the mean and variance of the gradient, and is the momentum decay rate, is a small constant to prevent division by zero.

[0115] A regularization term is added to the loss function by random dropout ( ) Randomly discard some neurons during the training process so that the network only uses some neurons in each training iteration.

[0116]

[0117] The regularization term avoids overfitting of the neural network to the training data and improves the generalization ability of the model.

[0118] Adam dynamically adjusts the learning rate according to the gradient information, which can improve the training efficiency and avoid falling into the local optimum.

[0119] Further, step S5 includes the following steps: Single-step prediction mode: predicts the photovoltaic power generation value of one time step in the future at one time. Usually used for short-term prediction, the prediction result is used for power generation scheduling or control in the next time step.

[0120] Input: Input a fixed length historical data sequence, such as the past Meteorological data and power generation data for time steps: ,in, Include time step Meteorological characteristics and photovoltaic power generation capacity.

[0121] Output: Prediction of the next time step Photovoltaic power generation , the model processes the input historical sequence and generates a single-step prediction result: .

[0122] Multi-step prediction mode: Multi-step prediction means that the model predicts the power generation of multiple time steps at one time. It is suitable for medium- and long-term predictions, such as predicting the power generation in the next few hours or days.

[0123] Input: Same as single-step prediction, input the past A data sequence of time steps: .

[0124] Output: Predict the power generation for multiple time steps in the future at one time: ,In this mode, the model can directly predict the results of multiple time steps through a forward propagation process.

[0125] Further, step S6 includes the following steps: Short-term dispatch: predict the power generation in the next one to several hours to provide a decision basis for short-term dispatch. According to the prediction results, adjust the operating status of the photovoltaic components. For example, during peak power generation, the output of the backup power supply can be appropriately reduced to make full use of photovoltaic energy. Medium- and long-term dispatch: predict the power generation in the next few days or a week to help formulate medium- and long-term grid dispatch strategies.

[0126] Charging management: When it is predicted that the future power generation will be high, the energy storage system can be scheduled to charge in advance so that it can be discharged when the power generation decreases. Discharge plan: During the period when the power generation is predicted to be insufficient, the energy storage system can be discharged to supplement the grid load and ensure grid stability.

[0127] Example 2 The final photovoltaic power generation prediction value is generated through the output layer, and the model is evaluated using a variety of evaluation indicators. The present invention uses MAE (mean absolute error), RMSE (root mean square error), and R² (coefficient of determination) to evaluate the model. The smaller the value of MAE and RMSE, the better the model. 2 The larger the value, the better the model. Through a variety of evaluation indicators, the prediction performance of the model can be evaluated from different angles to ensure the reliability of the prediction results. By evaluating the model, it can be ensured that the model can be effectively deployed in actual photovoltaic power generation scenarios and provide reliable power prediction values.

[0128] The present invention and traditional photovoltaic power generation prediction models (LSTM, CNN-LSTM) were compared in single-step and multi-step (3-step) photovoltaic power generation prediction experiments under sunny conditions.

[0129] Table 1

[0130] In the single-step prediction comparison experiment, as shown in Table 1, the MAE value of the proposed method is reduced by 52.47% and 34.20% compared with LSTM and CNN-LSTM, respectively; the RMSE value is reduced by 73.15% and 49.30% compared with LSTM and CNN-LSTM, respectively; the R² value is increased by 10.01% and 3.19% compared with LSTM and CNN-LSTM, respectively.

[0131] Table 2

[0132] In the comparative experiment of multi-step prediction, as shown in Table 2, the MAE value of the proposed method is 50.12% lower than that of LSTM and CNN-LSTM, and the RMSE value is 60.24% lower than that of LSTM and CNN-LSTM, and the R² value is 17.62% higher than that of LSTM and CNN-LSTM, and 5.37% higher than that of LSTM and CNN-LSTM, respectively.

[0133] Example 3 Based on the photovoltaic power prediction method of embodiment 1, a photovoltaic power prediction system is disclosed, comprising: A data acquisition module is used to collect historical meteorological data and power generation data of the photovoltaic power station according to a preset sampling interval; The model building module is used to capture and extract the long-term dependencies in the photovoltaic power input time series by constructing a bidirectional temporal convolutional layer, while ensuring the extraction of local features; use a bidirectional gated recurrent unit to capture the contextual dependencies in the time series and extract the nonlinear time-varying characteristics of photovoltaic power generation; optimize the bidirectional gated recurrent unit through the global attention model to dynamically adjust the weight of the time step. At each time step, the global attention model infers a variable-length alignment weight vector based on the current target state and all source states, and calculates the global context vector based on the variable-length alignment vector as the weighted average of all source states; A model training module is used to train the training set using the constructed photovoltaic power generation prediction model; A prediction sequence generation module is used to predict photovoltaic power generation using a single-step prediction or a multi-step prediction mode to generate a continuous photovoltaic power generation sequence; The power prediction module is used to predict the photovoltaic power generation power through the generated photovoltaic power generation power prediction sequence.

[0134] Example 4 The purpose of this embodiment is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the photovoltaic power generation power prediction method is implemented when the processor executes the computer program.

[0135] Example 5 The purpose of this embodiment is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the photovoltaic power generation power prediction method is implemented.

[0136] Example 6 The purpose of this embodiment is to provide a computer program product including a computer-readable medium, on which a computer-readable program code is contained, and the program code executes the photovoltaic power generation power prediction method.

[0137] The steps involved in the devices of the above embodiments 3, 4, 5 and 6 correspond to those of the method embodiment 1. For the specific implementation methods, please refer to the relevant description part of embodiment 1.

[0138] It should be understood by those skilled in the art that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks. These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes. These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0139] Unless otherwise specified, the working modes or control modes involved in the above embodiments are all conventional working modes or control modes in the art.

[0140] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application. Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Other modifications or equivalent substitutions made to the technical solution of the present invention by ordinary technicians in the field should be included in the scope of the claims of the present invention as long as they do not depart from the spirit and scope of the technical solution of the present invention.

Claims

1. A photovoltaic power generation power prediction method, characterized in that: The following steps are involved: Collect historical meteorological data and power generation data of the photovoltaic power station according to the preset sampling interval; By constructing a bidirectional temporal convolutional layer, the long-term dependencies in the photovoltaic power input time series are captured and extracted, while ensuring the extraction of local features. The bidirectional gated recurrent unit is used to capture the contextual dependencies in the time series and extract the nonlinear time-varying characteristics of photovoltaic power generation. The bidirectional gated recurrent unit is optimized through the global attention model to dynamically adjust the weight of the time step. At each time step, the global attention model infers a variable-length alignment weight vector based on the current target state and all source states, and calculates the global context vector based on the variable-length alignment vector as the weighted average of all source states. The training set is trained using the constructed photovoltaic power generation prediction model; Use single-step prediction or multi-step prediction mode to predict photovoltaic power generation and generate a continuous photovoltaic power sequence; The photovoltaic power generation power is predicted by the generated photovoltaic power generation prediction sequence.

2. A photovoltaic power generation prediction method according to claim 1, characterized in that: Synchronize weather data and power generation data using timestamps: in, It's in time The time alignment error between the photovoltaic power generation data and the meteorological data is It's at the time The photovoltaic power generation data timestamp on It's at the time The weather data timestamp on the .

3. According to the photovoltaic power prediction method of claim 1, the missing values ​​of the collected photovoltaic power data are filled with an interpolation algorithm: in, is the value after filling the photovoltaic power generation data. is the known value before the current missing value, is the known value after the current missing value, is the number of missing values.

4. A photovoltaic power generation prediction method according to claim 1, characterized in that: The temporal convolution operation of the bidirectional temporal convolutional network adopts the formula: In the formula, is the output after convolution of photovoltaic data, is the weight of the convolution kernel, is the time step of the photovoltaic data input sequence, is the width of the convolution kernel, and Respectively represent the output of the forward and backward convolution on the photovoltaic dataset, represents the convolution operation, is the size of the convolution window.

5. A photovoltaic power generation prediction method according to claim 1, characterized in that: The bidirectional gated recurrent unit uses the formula: In the formula, It is a traditional GRU network calculation process. and are the state and weight of the current forward hidden layer, , are the backward hidden layer state and weight at that time, It's time The offset of the hidden layer state at .

6. A photovoltaic power generation power prediction method according to claim 1, characterized in that: The number of hidden layer units of the bidirectional gated recurrent unit is set to 64, the number of network layers is set to 2, the Dropout ratio is set to 0.3, the learning rate is set to 0.001, and the optimizer uses the Adam optimizer.

7. A photovoltaic power generation power prediction system, characterized in that: include: A data acquisition module is used to collect historical meteorological data and power generation data of the photovoltaic power station according to a preset sampling interval; The model building module is used to capture and extract the long-term dependencies in the photovoltaic power input time series by constructing a bidirectional temporal convolutional layer, while ensuring the extraction of local features; use a bidirectional gated recurrent unit to capture the contextual dependencies in the time series and extract the nonlinear time-varying characteristics of photovoltaic power generation; optimize the bidirectional gated recurrent unit through the global attention model to dynamically adjust the weight of the time step. At each time step, the global attention model infers a variable-length alignment weight vector based on the current target state and all source states, and calculates the global context vector based on the variable-length alignment vector as the weighted average of all source states; A model training module is used to train the training set using the constructed photovoltaic power generation prediction model; A prediction sequence generation module is used to predict photovoltaic power generation using a single-step prediction or a multi-step prediction mode to generate a continuous photovoltaic power generation sequence; The power prediction module is used to predict the photovoltaic power generation power through the generated photovoltaic power generation power prediction sequence.

8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the photovoltaic power generation prediction method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the photovoltaic power generation power prediction method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer readable medium, characterized in that The computer-readable medium contains a computer-readable program code, and the program code executes the photovoltaic power prediction method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Centralized photovoltaic power station generation power prediction method and device

    CN117993553A

Cited By

  • Photovoltaic power prediction control method and system based on energy storage system

    CN119864880A

  • Convolutional bidirectional time sequence indicator diagram prediction method based on specific data driving

    CN120045924A

  • Electric energy regulation and control method and system of intelligent light, storage and charging integrated micro-grid system

    CN120433169A

  • Power grid regulation and control method and system based on deep learning and photovoltaic power prediction

    CN120511787A

  • Generation power prediction method and device

    CN120875628A