Photovoltaic power prediction method of deep perception neural network
Through deep perception neural network combined with deep learning and self-attention mechanism, the problem of difficult to accurately predict the output power of photovoltaic power generation systems is solved, and higher prediction accuracy is achieved, supporting the stable operation of the power system and the development of renewable energy.
Patent Information
- Application Number
- CN202510172737.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-06-06
AI Technical Summary
The output power of the photovoltaic power generation system is affected by a variety of random, fluctuating, intermittent and nonlinear factors, making it difficult to accurately predict, affecting the safe and stable operation of the power system and the energy utilization efficiency.
Deep perception neural network is adopted, combined with deep learning strategies and self-attention mechanisms, and through the structure connected in series of encoder and decoder, the model's learning ability of photovoltaic power data is enhanced, thereby improving prediction accuracy.
It significantly improves the accuracy of photovoltaic power prediction, supports the safe and stable operation of the power system and the sustainable development of renewable energy.
Smart Images

Figure CN120106606A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of photovoltaic power prediction in machine learning, and in particular relates to a photovoltaic power prediction method of a deep perception neural network. Background Art
[0002] With the global emphasis on environmental protection and sustainable development, the development and utilization of renewable energy has become a consensus of the international community. In this context, solar energy, as the world's largest clean energy, has significant advantages such as renewable, pollution-free, and widely distributed. As one of the important ways to make full use of solar energy, the development of photovoltaic power generation is of great significance to promoting the transformation of energy structure and reducing greenhouse gas emissions. The output power of photovoltaic power generation systems is affected by many factors, including solar radiation intensity, ambient temperature, wind speed, humidity, and the performance of photovoltaic modules themselves. The changes in these factors are characterized by randomness, volatility, intermittency, and nonlinearity, making it difficult to accurately predict the output power of photovoltaic power generation systems. Therefore, studying how to improve the accuracy of photovoltaic power forecasting (PVPF) is of great significance to ensuring the safe and stable operation of power systems, optimizing power dispatching, and improving energy efficiency. Summary of the invention
[0003] The present invention discloses a photovoltaic power prediction method based on a deep perception neural network, which is applied to the prediction of wind speed data in wind power generation scenarios. The present invention integrates an efficient deep learning strategy with a self-attention mechanism to enhance the model's learning ability for photovoltaic power data, thereby improving the accuracy of the prediction.
[0004] A photovoltaic power prediction method based on a deep perception neural network comprises the following steps:
[0005] Step S1: Read photovoltaic power data and convert it into a two-dimensional photovoltaic power data matrix including a time dimension and a feature dimension;
[0006] Step S2: Passing the photovoltaic power data matrix through the input layer to obtain a first data representation of photovoltaic power data;
[0007] Step S3: The first data feature is passed through an encoder to obtain a second data representation of photovoltaic power data, wherein the encoder includes a deep residual neural network, a deep residual multilayer perceptron and a first gated attention network connected in series;
[0008] Step S4: The second data representation is passed through a decoder to obtain a third data representation of photovoltaic power data, wherein the decoder includes an improved first convolutional neural network, a second gated attention network and an improved second convolutional neural network connected in series;
[0009] Step S5: The third data representation is decoded to obtain a fourth data representation of photovoltaic power data.
[0010] The present invention integrates efficient deep learning strategies with self-attention mechanisms to enhance the model's learning ability for photovoltaic power data, thereby promoting the accuracy of prediction. Specifically, it uses an encoder composed of a deep residual neural network, a deep residual multi-layer perceptron, and a first gated attention network in series, a decoder composed of an improved first convolutional neural network, a gated attention network, and an improved second convolutional neural network in series, as well as an effective input layer and output layer to improve the accuracy of photovoltaic power prediction, providing strong support for the safe and stable operation of the power system and the sustainable development of renewable energy. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 This is a block diagram of the photovoltaic power prediction method based on the deep perception neural network of the present invention. DETAILED DESCRIPTION
[0012] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0013] The present invention discloses a photovoltaic power prediction method of a deep perception neural network, comprising: 1) first, reading photovoltaic power data and converting it into a two-dimensional photovoltaic power data matrix including a time dimension and a feature dimension; 2) secondly, passing the photovoltaic power data matrix through an input layer to obtain a first data representation of the photovoltaic power data; 3) further, passing the first data feature through an encoder to obtain a second data representation of the photovoltaic power data, wherein the encoder includes a deep residual neural network, a deep residual multilayer perceptron and a first gated attention network connected in series; 4) further, passing the second data representation through a decoder to obtain a third data representation of the photovoltaic power data, wherein the decoder includes an improved first convolutional neural network, a second gated attention network and an improved second convolutional neural network connected in series; 5) further, passing the third data representation through a decoder to obtain a fourth data representation of the photovoltaic power data. Experiments show that the proposed photovoltaic power prediction method of a deep perception neural network has superior performance.
[0014] like Figure 1 As shown, a photovoltaic power prediction method based on a deep perception neural network includes the following steps:
[0015] Step S1: Read photovoltaic power data and convert it into a two-dimensional photovoltaic power data matrix including a time dimension and a feature dimension;
[0016] Step S2: Passing the photovoltaic power data matrix through the input layer to obtain a first data representation of photovoltaic power data;
[0017] Step S3: The first data feature is passed through an encoder to obtain a second data representation of photovoltaic power data, wherein the encoder includes a deep residual neural network, a deep residual multilayer perceptron and a first gated attention network connected in series;
[0018] Step S4: The second data representation is passed through a decoder to obtain a third data representation of photovoltaic power data, wherein the decoder includes an improved first convolutional neural network, a second gated attention network and an improved second convolutional neural network connected in series;
[0019] Step S5: The third data representation is decoded to obtain a fourth data representation of photovoltaic power data.
[0020] Specific:
[0021] Step S1: Read (input) photovoltaic power data and convert it into a two-dimensional photovoltaic power data matrix including a time dimension and a feature dimension.
[0022] Read data from the power dataset and convert to a two-dimensional matrix X with time and feature dimensions.
[0023] Step S2: Passing the photovoltaic power data matrix through the input layer (MLP) to obtain a first data representation of the photovoltaic power data.
[0024] The photovoltaic power data matrix X is passed through the input layer to obtain the first data representation X of the photovoltaic power data. 1 , the specific expression is as follows:
[0025] X 1 =σ(W 1 X+B 1 )
[0026] Among them, W 1 and B 1 is a learnable parameter, X 1 is the result obtained by multi-layer perceptron learning, and σ(·) is the activation function.
[0027] Step S3: Pass the first data feature through an encoder to obtain a second data representation of photovoltaic power data, wherein the encoder includes a deep residual neural network, a deep residual multi-layer perceptron and a first gated attention network connected in series.
[0028] The first data feature X 1 The second data representation of photovoltaic power data is obtained through the encoder The encoder is composed of a deep residual neural network (Deep Resnet), a deep residual multi-layer perceptron (Deep ResMLP) and a first gated attention network (GatedAttention) in series; the specific description is as follows:
[0029] First, X 1 The processing flow of the deep residual neural network is as follows:
[0030] Step S31: The input data is processed by four parallel convolutional neural networks with different convolution kernels, and the results of each branch are added. The specific expression is as follows:
[0031] H 1 =σ(1DConv(X 1 )+3DConv(X 1 )+5DConv(X 1 )+7DConv(X 1 ))
[0032] Among them, 1DConv(·) is 1×1 convolution, 3DConv(·) is 3×3 convolution, 5DConv(·) is 5×5 convolution, and 7DConv(·) is 7×7 convolution;
[0033] Step S32: The obtained H 1 After two layers of separable convolutional neural network with residual connection, the specific expression is as follows:
[0034] H 2 =σ(DSConv(DSConv(H 1 ))+H 1 )
[0035] H 3 =σ(DSConv(DSConv(H 2 ))+H 2 )
[0036] Among them, DSConv(·) is the depth-wise separable convolution function;
[0037] Step S33: The H obtained by the two-layer separable convolutional neural network with residual connection 3 After 3×3 convolution, the final result of the deep residual convolutional neural network is obtained. The specific expression is as follows:
[0038] X 2 =3DConv(H 3 )
[0039] Among them, 3DConv(·) is a 3×3 convolutional neural network;
[0040] Secondly, X 2 The processing flow of the deep residual neural network is as follows:
[0041] Step S34: X 2The formula for the processing through the first sub-layer is as follows:
[0042] H 5 =Aff((MLP(Aff(X 2 ))))
[0043] Among them, MLP(·) is the multi-layer perceptron function, Aff(·) is the radiation function, and 2 The expression to be processed is:
[0044] Aff(X 2 )=Diag(α)X 2 +β
[0045] Where α and β are learnable parameters, Diag(·) is a diagonal function;
[0046] Step S35: The H obtained after the first sub-layer processing 5 After processing by the second sub-layer and pooling operation, the specific expression is as follows:
[0047] X 3 =Pool(Aff(MLP(GeLU(MLP(Aff(H 5 ))))))
[0048] Where GeLU(·) is the activation function and Pool(·) is the pooling operation function;
[0049] Furthermore, X 3 The processing flow after the first gated attention network is as follows:
[0050] Step S36: X 3 After three multi-layer perceptrons, the corresponding Q, K and V are obtained. The specific expressions are as follows:
[0051] Q = MLP(X 3 ),K=MLP(X 3 ),V=MLP(X 3 )
[0052] Step S37: Use the attention mechanism to process Q, K and V. The specific expression is as follows:
[0053] H 6 =Relu 2 (QK T +B)V
[0054] Among them, B is the bias matrix, K T is the transpose of K, Relu 2 (QK+B) is the correction linear unit function for QK T+B squares the solution value, Relu 2 (·) is the square of the corrected linear unit function;
[0055] Step S37: In order to enhance the learning ability of the attention network, a gating mechanism is introduced into the network, and the expression is as follows:
[0056]
[0057] in, It is the final output of the gated attention network and also the value of the second data representation.
[0058] Step S4: The second data representation is passed through a decoder to obtain a third data representation of photovoltaic power data, wherein the decoder includes an improved first convolutional neural network (ICNN), a second gated attention network (GatedAttention) and an improved second convolutional neural network (ICNN) connected in series.
[0059] The second data characterizes The third data representation of photovoltaic power data is obtained through the decoder The decoder is composed of an improved first convolutional neural network, a second gated attention network, and an improved second convolutional neural network in series, as described below:
[0060] first, The processing flow of the improved first convolutional neural network is as follows:
[0061]
[0062] Among them, DWConv(·) is a deep level convolutional neural network function, and ConvFFN(·) is a feed-forward convolutional neural network;
[0063] Secondly, H 7 The processing flow after the second gated attention network is as follows:
[0064] Step S41: H 7 After three multi-layer perceptrons, the corresponding Q′, K′ and V′ are obtained, and their specific expressions are as follows:
[0065] Q′=MLP(H 7 ),K′=MLP(H 7 ),V′=MLP(H 7 )
[0066] Step S42: Use the attention mechanism to process Q′, K′ and V′. The specific expression is as follows:
[0067] H 8 =Relu2 (Q′K′ T +B′)V′
[0068] Among them, B' is the bias matrix, K' T is the transpose of K′, Relu 2 (Q′K′+B′) is the correction linear unit function for Q′K′ T +B′ to solve the square of the value, Relu 2 (·) is the square of the corrected linear unit function;
[0069] Step S43: In order to enhance the learning ability of the attention network, a gating mechanism is introduced into the network, and its expression is as follows:
[0070] X 4 =σ(H 7 )+σ(MLP(H 8 ))
[0071] Among them, X 4 It is the final output of the gated attention network and also the value of the second data representation;
[0072] Finally, X 4 The processing flow of the improved second convolutional neural network (MLP) is as follows:
[0073]
[0074] Among them, DWConv(·) is a deep level convolutional neural network function, and ConvFFN(·) is a feed-forward convolutional neural network.
[0075]
[0076] The above table is a comparison chart of the effects of the present invention and other classical methods. In order to verify the superiority of the proposed photovoltaic power prediction method of a deep perception neural network, the invention and the classical Transformer, Autoformer, Informer, FEDformer, Reformer, Flowformer, Flashformer, iTransformer, LSTM and GRU are used to predict the data collected from two different photovoltaic power stations in Hebei Province, and the MAE, MAPE and time are used to evaluate their effects. It can be seen from the above table that compared with other classical algorithms, the prediction effect of the present invention is better.
Claims
1. A photovoltaic power prediction method based on a deep perception neural network, characterized in that The steps include: Step S1: Read photovoltaic power data and convert it into a two-dimensional photovoltaic power data matrix including a time dimension and a feature dimension; Step S2: Passing the photovoltaic power data matrix through the input layer to obtain a first data representation of photovoltaic power data; Step S3: The first data feature is passed through an encoder to obtain a second data representation of photovoltaic power data, wherein the encoder includes a deep residual neural network, a deep residual multilayer perceptron and a first gated attention network connected in series; Step S4: The second data representation is passed through a decoder to obtain a third data representation of photovoltaic power data, wherein the decoder includes an improved first convolutional neural network, a second gated attention network and an improved second convolutional neural network connected in series; Step S5: The third data representation is decoded to obtain a fourth data representation of photovoltaic power data.
2. The photovoltaic power prediction method of a deep perception neural network according to claim 1 is characterized in that: In the above step S1, data is read from the power data set and converted into a two-dimensional matrix X including a time dimension and a feature dimension.
3. The photovoltaic power prediction method of a deep perception neural network according to claim 2 is characterized in that: In the above step S2, the photovoltaic power data matrix X is passed through the input layer to obtain the first data representation X1 of the photovoltaic power data. The specific expression is as follows: X1=σ(W1X+B1) Among them, W1 and B1 are learnable parameters, X1 is the result obtained by multi-layer perceptron learning, and σ(·) is the activation function.
4. The photovoltaic power prediction method of a deep perception neural network according to claim 3 is characterized in that: In the above step S3, the first data feature X1 is passed through the encoder to obtain the second data representation of the photovoltaic power data The encoder is composed of a deep residual neural network, a deep residual multi-layer perceptron and a first gated attention network in series; the specific description is as follows: First, the processing flow of X1 through the deep residual neural network is as follows: Step S31: The input data is processed by four parallel convolutional neural networks with different convolution kernels, and the results of each branch are added. The specific expression is as follows: H1=σ(1DConv(X1)+3DConv(X1)+5DConv(X1)+7DConv(X1)) Among them, 1DConv(·) is 1×1 convolution, 3DConv(·) is 3×3 convolution, 5DConv(·) is 5×5 convolution, and 7DConv(·) is 7×7 convolution; Step S32: The obtained H1 is passed through a two-layer separable convolutional neural network with residual connections. The specific expression is as follows: H2=σ(DSConv(DSConv(H1))+H1) H3=σ(DSConv(DSConv(H2))+H2) Among them, DSConv(·) is the depth-wise separable convolution function; Step S33: H3 obtained by the two-layer separable convolutional neural network with residual connection is subjected to 3×3 convolution to obtain the final result of the deep residual convolutional neural network. The specific expression is as follows: X2=3DConv(H3) Among them, 3DConv(·) is a 3×3 convolutional neural network; Secondly, the processing flow of X2 through the deep residual neural network is as follows: Step S34: The formula of the process of X2 passing through the first sub-layer is as follows: H5=Aff((MLP(Aff(X2)))) Among them, MLP(·) is the multi-layer perceptron function, Aff(·) is the radiation function, and the expression for processing X2 is: Aff(X2)=Diag(α)X2+β Where α and β are learnable parameters, Diag(·) is a diagonal function; Step S35: H5 obtained after being processed by the first sub-layer is processed by the second sub-layer and the pooling operation. The specific expression is as follows: X3=Pool(Aff(MLP(GeLU(MLP(Aff(H5)))))) Where GeLU(·) is the activation function and Pool(·) is the pooling operation function; Furthermore, the processing flow of X3 after the first gated attention network is as follows: Step S36: X3 passes through three multi-layer perceptrons to obtain the corresponding Q, K and V. The specific expressions are as follows: Q=MLP(X3),K=MLP(X3),V=MLP(X3) Step S37: Use the attention mechanism to process Q, K and V. The specific expression is as follows: H6=Relu 2 (QK T +B)V Among them, B is the bias matrix, K T is the transpose of K, Relu 2 (QK+B) is the correction linear unit function for QK T +B squares the solution value, Relu 2 (·) is the square of the corrected linear unit function; Step S37: In order to enhance the learning ability of the attention network, a gating mechanism is introduced into the network, and the expression is as follows: in, It is the final output of the gated attention network and also the value of the second data representation.
5. The photovoltaic power prediction method of a deep perception neural network according to claim 4 is characterized in that: In the above step S4, the second data is represented The third data representation of photovoltaic power data is obtained through the decoder The decoder is composed of an improved first convolutional neural network, a second gated attention network, and an improved second convolutional neural network in series, as described below: first, The processing flow of the improved first convolutional neural network is as follows: Among them, DWConv(·) is a deep level convolutional neural network function, and ConvFFN(·) is a feed-forward convolutional neural network; Secondly, the processing flow of H7 after the second gated attention network is as follows: Step S41: H7 is passed through three multi-layer perceptrons to obtain the corresponding Q', K' and V', the specific expressions of which are as follows: Q′=MLP(H7), K′=MLP(H7), V′=MLP(H7) Step S42: Use the attention mechanism to process Q′, K′ and V′. The specific expression is as follows: H8=Relu 2 (Q′K′ T +B′)V′ Among them, B' is the bias matrix, K' T is the transpose of K′, Relu 2 (Q′K′+B′) is the correction linear unit function for Q′K′ T +B′ to solve the square of the value, Relu 2 (·) is the square of the corrected linear unit function; Step S43: In order to enhance the learning ability of the attention network, a gating mechanism is introduced into the network, and its expression is as follows: X4=σ(H7)+σ(MLP(H8)) Among them, X4 is the final output of the gated attention network and is also the value represented by the second data; Finally, the processing flow of X4's improved second convolutional neural network is as follows: Among them, DWConv(·) is a deep level convolutional neural network function, and ConvFFN(·) is a feed-forward convolutional neural network.