Method for predicting regional photovoltaic generating capacity
By combining meteorological data and photovoltaic panel defect data, a prediction model of full-connection layer and residual connection is constructed, which solves the problem of low prediction accuracy of photovoltaic power generation and achieves more accurate power generation prediction.
Patent Information
- Application Number
- CN202510554680.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-15
AI Technical Summary
The existing photovoltaic power generation prediction methods rely on meteorological data and fail to effectively integrate photovoltaic panel defect information, resulting in low prediction accuracy.
Combining meteorological data and photovoltaic panel defect data, a regional photovoltaic power generation prediction model is constructed through feature extraction and feature fusion, and power generation prediction is carried out using full connection layers, batch normalization and residual connection.
It has improved the accuracy and practical application value of photovoltaic power generation forecasting, and comprehensively quantified the impact of photovoltaic panel defects on power generation performance.
Smart Images

Figure CN120494164A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for predicting regional photovoltaic power generation, and belongs to the technical field of regional power generation data prediction. Background Art
[0002] Photovoltaic power generation, a clean, renewable energy source, has been widely adopted worldwide in recent years. With the cost of solar panels decreasing and their efficiency increasing year by year, photovoltaic power generation has become a crucial component of the global energy transition. However, a core challenge of photovoltaic power generation is the volatility and uncertainty of its power generation. Because photovoltaic systems rely on the intensity of solar radiation, factors such as weather conditions, geographic location, and seasonal variations directly affect the power generation efficiency of photovoltaic power plants. Therefore, accurately predicting photovoltaic power generation to optimize scheduling, reduce energy storage costs, and improve grid stability has become a key research topic.
[0003] Common existing methods for predicting photovoltaic power generation primarily rely on machine learning models based on physical models. These methods select features of meteorological factors influencing photovoltaic power generation and employ machine learning algorithms such as support vector machines (SVMs) and random forests (RFs) to predict photovoltaic power generation in a specific region. While these machine learning algorithms have been shown to effectively handle nonlinear relationships, their performance often depends on the quality of feature selection and training data. Without sufficient data support, these methods are prone to overfitting, resulting in reduced prediction accuracy. Furthermore, in practical applications, photovoltaic power generation prediction relies not only on meteorological data but also on multiple data sources, such as equipment status and photovoltaic panel defect information. Existing photovoltaic power generation prediction methods face significant technical bottlenecks in fusing multiple feature data to form feature vectors and then predicting power generation, resulting in low prediction accuracy. Summary of the Invention
[0004] The technical problem to be solved by the present invention is: how to accurately predict the photovoltaic power generation in a region.
[0005] To solve the above technical problems, the present invention proposes a technical solution: a method for predicting regional photovoltaic power generation, comprising the following steps:
[0006] Step 1: Establish a regional power generation prediction model, as shown in the following formula (1):
[0007]
[0008] In formula (1), is the regional photovoltaic power generation predicted by the regional power generation prediction model; W out is the output layer weight matrix, B outis the bias term of the output layer, R final is the final hidden feature obtained after multiple stacking; R i is the output of the i-th layer residual connection; W i is the weight matrix of the residual connection of the i-th layer, B i is the bias term of the residual connection of the i-th layer; μ and The mean and standard deviation of the input sequence of the regional power generation forecast model are input respectively, γ and β are learning parameters; R i-1 is the output after the residual connection of the i-1th layer; R1 is the output after the residual connection of the first layer; A1 is the normalized feature The value after nonlinear mapping; is the output of the batch normalization layer; Z1 is the output of the fully connected layer; B1 is the bias term of the fully connected layer; W1 is the weight matrix of the fully connected layer; χ i is the input sequence of the regional power generation prediction model;
[0009] Step 2: In chronological order and first collection frequency To collect n historical photovoltaic panel images and n historical meteorological data of the photovoltaic power generation area to be predicted and form a historical image set A and a historical meteorological data set B respectively, as shown in the following equations (2) and (3); the historical meteorological data includes the light, temperature, humidity and precipitation of the photovoltaic power generation area to be predicted at historical moments;
[0010] A={a1, a2, ..., a n} (2)
[0011] In formula (2), a1, a2, ... to a n They are the first historical photovoltaic panel image, the second historical photovoltaic panel image to the nth historical photovoltaic panel image collected;
[0012]
[0013] In formula (3), b1, b2, ... to b n They are the first historical meteorological data, the second historical meteorological data to the nth historical meteorological data collected; are respectively the light, temperature, humidity and precipitation in the first historical meteorological data; are respectively the light intensity, temperature, humidity and precipitation in the second historical meteorological data; are respectively the light intensity, temperature, humidity and precipitation in the nth historical meteorological data;
[0014] Step 3: Preprocess the first historical photovoltaic panel image a1 and extract features from the preprocessed first historical photovoltaic panel image a1 to obtain first historical defect statistical feature data of the first historical photovoltaic panel image a1. Defect statistical characteristic data includes total defect area A total , average defect area A mean , Maximum defect area A max , number of defects N defect and the center of mass coordinate A (x,y) ;
[0015] Repeat the above content to obtain the second historical photovoltaic panel image a2 to the nth historical photovoltaic panel image a n Second historical defect statistical feature data Statistics characteristic data of historical defects up to the nth The arrive Collected to form historical defect statistical feature data set A Q , as shown in the following formula (4),
[0016]
[0017] In formula (4), The first historical defect statistical feature data are Total defect area, average defect area, maximum defect area, number of defects and centroid coordinates in; The second historical defect statistical feature data are Total defect area, average defect area, maximum defect area, number of defects and centroid coordinates in;
[0018] They are the nth historical defect statistical feature data Total defect area, average defect area, maximum defect area, number of defects and centroid coordinates in;
[0019] Step 4: Place the Combined with b1 to form the first historical photovoltaic power generation prediction feature χ1, the Combined with b2 to form the second historical photovoltaic power generation prediction feature χ2, repeat the above until the With the b n Splicing is performed to form the nth historical photovoltaic power generation prediction feature χ n; n historical photovoltaic power generation prediction features are divided into a training set, a validation set, and a test set according to experience, and the historical photovoltaic power generation prediction features in the training set, the validation set, and the test set are substituted into the regional power generation prediction model for model training to obtain a trained regional power generation prediction model; the trained regional power generation prediction model uses the photovoltaic power generation prediction features formed by splicing meteorological data and defect statistical feature data as input, and uses the photovoltaic power generation prediction value of the photovoltaic power generation area to be predicted as output;
[0020] Step 5: Real-time acquisition of real-time photovoltaic panel images a in the photovoltaic power generation prediction area s and real-time weather data s ; The real-time photovoltaic panel image a is processed by the content of step 3 s Perform feature extraction to form real-time defect statistical feature data The With the b s Splicing to form the real-time photovoltaic power generation prediction feature χ s , the χ s The trained regional power generation prediction model is input to obtain a photovoltaic power generation prediction value for the photovoltaic power generation area to be predicted.
[0021] Furthermore, the specific contents of the pre-processing in step 3 are as follows:
[0022] Step 3.1: For the first historical photovoltaic panel image with a height of H and a width of W Perform data discretization to obtain a H×W first historical image data first matrix As shown in the following formula (5),
[0023]
[0024] In formula (5), arrive The first historical photovoltaic panel images are The pixel values corresponding to the coordinates (1,1), (1,2) to (1,W); arrive The first historical photovoltaic panel images are The pixel values corresponding to the coordinates (2,1) to (2,W); arrive The first historical photovoltaic panel images are The pixel values corresponding to the mid-coordinates (H,1), (H,2) to (H,W);
[0025] Step 3.2: Use the following formula (6) to calculate the All data in the Gaussian filter are filtered.
[0026]
[0027] In formula (6), This is the first historical photovoltaic panel image The pixel value corresponding to the coordinate (x+i1,y+j1); This is the first historical photovoltaic panel image The coordinates are the pixel values after Gaussian filtering at (x, y); G(i1, j1) is a convolution kernel of size (2k+1)×(2k+1) generated based on a two-dimensional Gaussian distribution;
[0028] Collect all the data after Gaussian filtering to get a H×W first historical image data second matrix As shown in the following formula (7),
[0029]
[0030] In formula (7), arrive The first historical photovoltaic panel images are The pixel values at the coordinates (1,1), (1,2) to (1,W) after Gaussian filtering; arrive The first historical photovoltaic panel images are The pixel values between the coordinates (2,1) and (2,W) after Gaussian filtering; arrive The first historical photovoltaic panel images are The pixel values after Gaussian filtering at the mid-coordinates (H,1), (H,2) to (H,W);
[0031] Step 3.3: All the data in are substituted into the following formula (8) for normalization:
[0032]
[0033] In formula (8), This is the first historical photovoltaic panel image The middle coordinate is the pixel value after Gaussian filtering at (x, y); This is the first historical photovoltaic panel image The middle coordinate is the normalized pixel value of (x, y); is the second matrix of the first historical image data The smallest coordinate value in ; is the second matrix of the first historical image data The largest coordinate value in ;
[0034] Collect all the normalized data to get a H×W first historical image data third matrix As shown in the following formula (9),
[0035]
[0036] In formula (9), arrive The first historical photovoltaic panel images are The normalized pixel values at the coordinates (1,1), (1,2) to (1,W); arrive The first historical photovoltaic panel images are The normalized pixel values between the coordinates (2,1) and (2,W); arrive The first historical photovoltaic panel images are Normalized pixel values from the mid-coordinates (H,1), (H,2) to (H,W);
[0037] Step 3.4: Repeat steps 3.1 to 3.3 for the second historical photovoltaic panel image To the nth historical photovoltaic panel image All are preprocessed to obtain the second historical image data third matrix of size H×W To the third matrix of nth historical image data
[0038] Furthermore, the specific content of the feature extraction in step 3 is as follows:
[0039] Step 3.5: Transform the first historical image data into a third matrix of size H×W The channel attention mechanism is used to extract three times and obtain the size of The first historical image low-level feature map Size The first historical image mid-level feature map and size The first historical image high-level feature map Among them, W cov is the number of convolution kernels in the channel attention mechanism; C1, C2, and C3 are respectively the first, second, and third channel numbers selected when performing feature extraction according to the channel attention mechanism;
[0040] Step 3.6: described and stated Substitute into the following formula (10) to perform feature fusion and obtain the size of The first historical image comprehensive feature map
[0041]
[0042] In formula (10), and are the low, medium and high-level feature maps of the first historical image, respectively. Upsample(·) and Downsample(·) are upsampling and downsampling operations, respectively. FusionBlock(·) is a double-layer convolution operation.
[0043] Step 3.7: Combine the first historical image into a comprehensive feature map The first historical image segmentation mask is formed by decoding and segmenting according to the following formula (11):
[0044]
[0045] In formula (11), is the pixel value of the first historical comprehensive feature map at the coordinate (i, j), c is the category channel, C = 2, that is, defective and non-defective categories, The first historical comprehensive feature map The pixel value at coordinate (x, y) after bilinear interpolation, P 1 (x, y, c) is the first historical photovoltaic panel image The probability that the coordinate (x, y) belongs to category c, is the first historical image segmentation mask;
[0046] The first historical image segmentation mask is a matrix of size H×W, as shown in the following formula (14):
[0047]
[0048] In formula (12), arrive The first historical photovoltaic panel images are The classification labels on the coordinates (1,1), (1,2) to (1,W), arrive The first historical photovoltaic panel images are Classification labels on the median coordinates (2,1) to (2,W); arrive The first historical photovoltaic panel images are The classification labels on the coordinates (H, 1), (H, 2) to (H, W); the first historical image segmentation mask The values of all classification labels in are 0 or 1; if it is 0, it means that there is no defect at the coordinate corresponding to the classification label; if it is 1, it means that there is a defect at the coordinate corresponding to the classification label;
[0049] The first historical image segmentation mask is obtained by the following formula (13): Perform feature extraction to obtain the first historical defect statistical feature data of the first historical photovoltaic panel image a1
[0050]
[0051] In formula (13), is the number of pixels in the defective area of the first historical photovoltaic panel image, O is the number of interconnected defective areas in the first historical photovoltaic panel image, is the segmentation mask of the first historical photovoltaic panel image, is the centroid coordinate of the first historical photovoltaic panel image, is the number of defects in the first historical photovoltaic panel image, is the maximum defect area of the first historical photovoltaic panel image, is the average defect area of the first historical photovoltaic panel image, is the total defect area of the first historical photovoltaic panel image;
[0052] Step 3.8: Repeat steps 3.5 to 3.7 for the second historical photovoltaic panel image a2 to the nth historical photovoltaic panel image a n Perform feature extraction to obtain the second historical defect statistical feature data Statistics characteristic data of historical defects up to the nth
[0053] Furthermore, the model training process in step 4 is as follows:
[0054] Step 4.1: Through the forward propagation and back propagation process of the following formula (14), the model parameters are continuously adjusted so that the model can learn the mapping relationship from input features to target outputs.
[0055]
[0056] In formula (14), N is the number of training samples, Y i is the actual power generation, is the power generation predicted by the model, χ i is the i-th historical photovoltaic power generation prediction feature after integrating historical meteorological data and photovoltaic panel defect characteristics, is the loss value, is the gradient of the loss with respect to the weight matrix W1, and η is the learning rate;
[0057] Step 4.2: Evaluate the performance of the model on the test set by the following formula (15) to measure its generalization ability and prediction accuracy,
[0058]
[0059] In formula (15), N is the number of training samples, Y i is the actual power generation, is the power generation predicted by the model, is the average value of actual power generation, MSE is the mean square error between the predicted value and the true value, and MAE is the mean absolute error between the predicted value and the true value. is the coefficient of determination, which is used to measure the goodness of fit of the model. The closer the value is to 1, the better the model performance;
[0060] Step 4.3: Repeat steps 4.1 and 4.2, and train multiple times until the validation set loss no longer decreases significantly, indicating that the model has converged.
[0061] The beneficial effects of the present invention are as follows: The proposed power generation prediction method combines meteorological data with photovoltaic panel defect data to construct a more comprehensive prediction model. Key features (such as total defect area, average defect area, maximum defect area, number of defects, and distribution centroid) are extracted through defect detection and integrated with ambient meteorological data before being input into the network for prediction. Compared to traditional prediction methods that rely solely on meteorological data, this method more comprehensively quantifies the impact of photovoltaic panel defects on power generation performance, significantly improving the accuracy and practical application value of power generation predictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a flow chart of the method for predicting regional photovoltaic power generation of the present invention. DETAILED DESCRIPTION
[0063] The following further describes a method for predicting regional photovoltaic power generation according to the present invention in conjunction with the accompanying drawings and specific embodiments.
[0064] Example
[0065] In this embodiment, a method for predicting regional photovoltaic power generation is provided. Figure 1 As shown, the following steps are included:
[0066] Step 1: Establish a regional power generation prediction model, which includes multiple layers of repeated operations such as full connection layer, batch normalization, activation function, and residual connection, and finally generates the power generation of photovoltaic panels through the output layer, as shown in the following formula (1):
[0067]
[0068] In formula (1), is the regional photovoltaic power generation predicted by the regional power generation prediction model; W out is the output layer weight matrix, B out is the bias term of the output layer, R final is the final hidden feature obtained after multiple stacking; R i is the output of the i-th layer residual connection; W i is the weight matrix of the residual connection of the i-th layer, B i is the bias term of the residual connection of the i-th layer; μ and The mean and standard deviation of the input sequence of the regional power generation forecast model are input respectively, γ and β are learning parameters; R i-1 is the output after the residual connection of the i-1th layer; R1 is the output after the residual connection of the first layer; A1 is the normalized feature The value after nonlinear mapping; is the output of the batch normalization layer; Z1 is the output of the fully connected layer; B1 is the bias term of the fully connected layer; W1 is the weight matrix of the fully connected layer; χ i is the input sequence of the regional power generation prediction model;
[0069] Step 2: In chronological order and first collection frequency To collect n historical photovoltaic panel images and n historical meteorological data of the photovoltaic power generation area to be predicted and form a historical image set A and a historical meteorological data set B respectively, as shown in the following equations (2) and (3); the historical meteorological data includes the light, temperature, humidity and precipitation of the photovoltaic power generation area to be predicted at historical moments;
[0070] A={a1, a2, ..., a n} (2)
[0071] In formula (2), a1, a2, ... to a n They are the first historical photovoltaic panel image, the second historical photovoltaic panel image to the nth historical photovoltaic panel image collected;
[0072]
[0073] In formula (3), b1, b2, ... to b n They are the first historical meteorological data, the second historical meteorological data to the nth historical meteorological data collected; are respectively the light, temperature, humidity and precipitation in the first historical meteorological data; are respectively the light intensity, temperature, humidity and precipitation in the second historical meteorological data; are respectively the light intensity, temperature, humidity and precipitation in the nth historical meteorological data;
[0074] Step 3: Preprocess the first historical photovoltaic panel image a1 and extract features from the preprocessed first historical photovoltaic panel image a1 to obtain first historical defect statistical feature data of the first historical photovoltaic panel image a1. Defect statistical characteristic data includes total defect area A total , average defect area A mean , Maximum defect area A max , number of defects N defect and the center of mass coordinate A (x,y) ;
[0075] The specific contents of preprocessing and feature extraction are as follows:
[0076] Step 3.1: For the first historical photovoltaic panel image with a height of H and a width of W Perform data discretization to obtain a H×W first historical image data first matrix As shown in the following formula (5),
[0077]
[0078] In formula (5), arrive The first historical photovoltaic panel images are The pixel values corresponding to the coordinates (1,1), (1,2) to (1,W); arrive The first historical photovoltaic panel images are The pixel values corresponding to the coordinates (2,1) to (2,W); arrive The first historical photovoltaic panel images are The pixel values corresponding to the mid-coordinates (H,1), (H,2) to (H,W);
[0079] Step 3.2: Use the following formula (6) to calculate the All data in the Gaussian filter are filtered.
[0080]
[0081] In formula (6), This is the first historical photovoltaic panel image The pixel value corresponding to the coordinate (x+i1,y+j1); This is the first historical photovoltaic panel image The coordinates are the pixel values after Gaussian filtering at (x, y); G(i1, j1) is a convolution kernel of size (2k+1)×(2k+1) generated based on a two-dimensional Gaussian distribution;
[0082] Collect all the data after Gaussian filtering to get a H×W first historical image data second matrix As shown in the following formula (7),
[0083]
[0084] In formula (7), arrive The first historical photovoltaic panel images are The pixel values at the coordinates (1,1), (1,2) to (1,W) after Gaussian filtering; arrive The first historical photovoltaic panel images are The pixel values between the coordinates (2,1) and (2,W) after Gaussian filtering; arrive The first historical photovoltaic panel images are The pixel values after Gaussian filtering at the mid-coordinates (H,1), (H,2) to (H,W);
[0085] Step 3.3: All the data in are substituted into the following formula (8) for normalization:
[0086]
[0087] In formula (8), This is the first historical photovoltaic panel image The middle coordinate is the pixel value after Gaussian filtering at (x, y); This is the first historical photovoltaic panel image The middle coordinate is the normalized pixel value of (x, y); is the second matrix of the first historical image data The smallest coordinate value in ; is the second matrix of the first historical image data The largest coordinate value in ;
[0088] Collect all the normalized data to get a H×W first historical image data third matrix As shown in the following formula (9),
[0089]
[0090] In formula (9), arrive The first historical photovoltaic panel images are The normalized pixel values at the coordinates (1,1), (1,2) to (1,W); arrive The first historical photovoltaic panel images are The normalized pixel values between the coordinates (2,1) and (2,W); arrive The first historical photovoltaic panel images are Normalized pixel values from the mid-coordinates (H,1), (H,2) to (H,W);
[0091] Step 3.4: Repeat steps 3.1 to 3.3 for the second historical photovoltaic panel image To the nth historical photovoltaic panel image All are preprocessed to obtain the second historical image data third matrix of size H×W To the third matrix of nth historical image data
[0092] Step 3.5: Transform the first historical image data into a third matrix of size H×W Through the channel attention mechanism, three extractions are performed respectively to obtain the size of The first historical image low-level feature map Size The first historical image mid-level feature map and size The first historical image high-level feature map Among them, W cov is the number of convolution kernels in the channel attention mechanism; C1, C2, and C3 are respectively the first, second, and third channel numbers selected when performing feature extraction according to the channel attention mechanism;
[0093] Step 3.6: described and stated Substitute into the following formula (10) to perform feature fusion and obtain the size of The first historical image comprehensive feature map
[0094]
[0095] In formula (10), and are the low-level, mid-level, and high-level feature maps of the first historical image, respectively. Upsample(·) and Downsample(·) are upsampling and downsampling operations, respectively. FusionBlock(·) is a two-layer ConvBNSiLU convolution operation. The specific contents of the ConvBNSiLU are as follows:
[0096]
[0097] Where X is the input feature map, W and B are the convolution kernel and bias, μ and are the mean and standard deviation, γ and β are learnable parameters, and σ(·) is the sigmoid function;
[0098] Step 3.7: Combine the first historical image into a comprehensive feature map The first historical image segmentation mask is formed by decoding and segmenting according to the following formula (11):
[0099]
[0100] In formula (11), is the pixel value of the first historical comprehensive feature map at the coordinate (i, j), c is the category channel, C = 2, that is, defective and non-defective categories, The first historical comprehensive feature map The pixel value at coordinate (x, y) after bilinear interpolation, P 1 (x, y, c) is the first historical photovoltaic panel image The probability that the coordinate (x, y) belongs to category c, is the first historical image segmentation mask;
[0101] The first historical image segmentation mask is a matrix of size H×W, as shown in the following formula (14):
[0102]
[0103] In formula (12), arrive The first historical photovoltaic panel images are The classification labels on the coordinates (1,1), (1,2) to (1,W), arrive The first historical photovoltaic panel images are Classification labels on the median coordinates (2,1) to (2,W); arrive The first historical photovoltaic panel images are The classification labels on the coordinates (H, 1), (H, 2) to (H, W); the first historical image segmentation mask The values of all classification labels in are 0 or 1; if it is 0, it means that there is no defect at the coordinate corresponding to the classification label; if it is 1, it means that there is a defect at the coordinate corresponding to the classification label;
[0104] The first historical image segmentation mask is obtained by the following formula (13): Perform feature extraction to obtain the first historical defect statistical feature data of the first historical photovoltaic panel image a1
[0105]
[0106] In formula (13), is the number of pixels in the defective area of the first historical photovoltaic panel image, O is the number of interconnected defective areas in the first historical photovoltaic panel image, is the segmentation mask of the first historical photovoltaic panel image, is the centroid coordinate of the first historical photovoltaic panel image, is the number of defects in the first historical photovoltaic panel image, is the maximum defect area of the first historical photovoltaic panel image, is the average defect area of the first historical photovoltaic panel image, is the total defect area of the first historical photovoltaic panel image;
[0107] Step 3.8: Repeat steps 3.5 to 3.7 for the second historical photovoltaic panel image a2 to the nth historical photovoltaic panel image a n Perform feature extraction to obtain the second historical defect statistical feature data Statistics characteristic data of historical defects up to the nth
[0108] The arrive Collected to form historical defect statistical feature data set A Q , as shown in the following formula (4),
[0109]
[0110] In formula (4), The first historical defect statistical feature data are Total defect area, average defect area, maximum defect area, number of defects and centroid coordinates in; The second historical defect statistical feature data are Total defect area, average defect area, maximum defect area, number of defects and centroid coordinates in;
[0111] They are the nth historical defect statistical feature data Total defect area, average defect area, maximum defect area, number of defects and centroid coordinates in;
[0112] Step 4: Place the Combined with b1 to form the first historical photovoltaic power generation prediction feature χ1, the Combined with b2 to form the second historical photovoltaic power generation prediction feature χ2, repeat the above until the With the b n Splicing is performed to form the nth historical photovoltaic power generation prediction feature χ n ; n historical photovoltaic power generation prediction features are divided into a training set, a validation set, and a test set according to experience, and the historical photovoltaic power generation prediction features in the training set, the validation set, and the test set are substituted into the regional power generation prediction model for model training to obtain a trained regional power generation prediction model; the trained regional power generation prediction model uses the photovoltaic power generation prediction features formed by splicing meteorological data and defect statistical feature data as input, and uses the photovoltaic power generation prediction value of the photovoltaic power generation area to be predicted as output;
[0113] The model training process is as follows:
[0114] Step 4.1: Through the forward propagation and back propagation process of the following formula (14), the model parameters are continuously adjusted so that the model can learn the mapping relationship from input features to target outputs.
[0115]
[0116] In formula (14), N is the number of training samples, Y i is the actual power generation, is the power generation predicted by the model, χ i is the i-th historical photovoltaic power generation prediction feature after integrating historical meteorological data and photovoltaic panel defect characteristics, is the loss value, is the gradient of the loss with respect to the weight matrix W1, and η is the learning rate;
[0117] Step 4.2: Evaluate the performance of the model on the test set by the following formula (15) to measure its generalization ability and prediction accuracy,
[0118]
[0119] In formula (15), N is the number of training samples, Y iis the actual power generation, is the power generation predicted by the model, is the average value of actual power generation, MSE is the mean square error between the predicted value and the true value, and MAE is the mean absolute error between the predicted value and the true value. is the coefficient of determination, which is used to measure the goodness of fit of the model. The closer the value is to 1, the better the model performance;
[0120] Step 4.3: Repeat steps 4.1 and 4.2, and train multiple times until the validation set loss no longer decreases significantly, indicating that the model has converged.
[0121] Step 5: Real-time acquisition of real-time photovoltaic panel images a in the photovoltaic power generation prediction area s and real-time weather data s ; The real-time photovoltaic panel image a is processed by the content of step 3 s Perform feature extraction to form real-time defect statistical feature data The With the b s Splicing to form the real-time photovoltaic power generation prediction feature χ s , the χ s The trained regional power generation prediction model is input to obtain a photovoltaic power generation prediction value for the photovoltaic power generation area to be predicted.
Claims
1. A method for predicting regional photovoltaic power generation, characterized by: The following steps are involved: Step 1: Establish a regional power generation prediction model, as shown in the following formula (1): In formula (1), is the regional photovoltaic power generation predicted by the regional power generation prediction model; W out is the output layer weight matrix, B out is the bias term of the output layer, R final It is the final hidden feature obtained after multiple stacking; R i is the output after the residual connection of the i-th layer; W i is the weight matrix of the residual connection of the i-th layer, B i is the bias term of the residual connection of the i-th layer; μ and The mean and standard deviation of the input sequence of the regional power generation forecast model are input respectively, γ and β are learning parameters; R i-1 is the output after the residual connection of the i-1th layer; R1 is the output after the residual connection of the first layer; A1 is the normalized feature The value after nonlinear mapping; is the output of the batch normalization layer; Z1 is the output of the fully connected layer; B1 is the bias term of the fully connected layer; W1 is the weight matrix of the fully connected layer; χ i is the input sequence of the regional power generation prediction model; Step 2: In chronological order and first collection frequency To collect n historical photovoltaic panel images and n historical meteorological data of the photovoltaic power generation area to be predicted and form a historical image set A and a historical meteorological data set B respectively, as shown in the following equations (2) and (3); the historical meteorological data includes the light, temperature, humidity and precipitation of the photovoltaic power generation area to be predicted at historical moments; <h2 style=";text-align:left;direction:ltr">A = {a1, a2,..., a<h2 style=";text-align:left;direction:ltr"> n <h2 style=";text-align:left;direction:ltr">} (2) In formula (2), a1, a2, ... to a n They are the first historical photovoltaic panel image, the second historical photovoltaic panel image to the nth historical photovoltaic panel image collected; In formula (3), b1, b2, ... to b n They are the first historical meteorological data, the second historical meteorological data to the nth historical meteorological data collected; are respectively the light, temperature, humidity and precipitation in the first historical meteorological data; are respectively the light intensity, temperature, humidity and precipitation in the second historical meteorological data; are respectively the light intensity, temperature, humidity and precipitation in the nth historical meteorological data; Step 3: Preprocess the first historical photovoltaic panel image a1 and extract features from the preprocessed first historical photovoltaic panel image a1 to obtain first historical defect statistical feature data of the first historical photovoltaic panel image a1. Defect statistical characteristic data includes total defect area A total , average defect area A mean , Maximum defect area A max , number of defects N defect and the center of mass coordinate A (x,y) ; Repeat the above content to obtain the second historical photovoltaic panel image a2 to the nth historical photovoltaic panel image a n Second historical defect statistical feature data Statistics characteristic data of historical defects up to the nth The arrive Collected to form historical defect statistical feature data set A Q , as shown in the following formula (4), In formula (4), The first historical defect statistical feature data are Total defect area, average defect area, maximum defect area, number of defects and centroid coordinates in; The second historical defect statistical feature data are Total defect area, average defect area, maximum defect area, number of defects and centroid coordinates in; They are the nth historical defect statistical feature data Total defect area, average defect area, maximum defect area, number of defects and centroid coordinates in; Step 4: Place the Combined with b1 to form the first historical photovoltaic power generation prediction feature χ1, the Combined with b2 to form the second historical photovoltaic power generation prediction feature χ2, repeat the above until the With the b n Splicing is performed to form the nth historical photovoltaic power generation prediction feature χ n ; n historical photovoltaic power generation prediction features are divided into a training set, a validation set, and a test set according to experience, and the historical photovoltaic power generation prediction features in the training set, the validation set, and the test set are substituted into the regional power generation prediction model for model training to obtain a trained regional power generation prediction model; the trained regional power generation prediction model uses the photovoltaic power generation prediction features formed by splicing meteorological data and defect statistical feature data as input, and uses the photovoltaic power generation prediction value of the photovoltaic power generation area to be predicted as output; Step 5: Real-time acquisition of real-time photovoltaic panel images a in the photovoltaic power generation prediction area s and real-time weather data s ; The real-time photovoltaic panel image a is processed by the content of step 3 s Perform feature extraction to form real-time defect statistical feature data The With the b s Splicing to form the real-time photovoltaic power generation prediction feature χ s , the χ s The trained regional power generation prediction model is input to obtain a photovoltaic power generation prediction value for the photovoltaic power generation area to be predicted.
2. The method for predicting regional photovoltaic power generation according to claim 1, characterized in that: The specific contents of the pre-processing in step 3 are as follows: Step 3.1: For the first historical photovoltaic panel image with a height of H and a width of W Perform data discretization to obtain a H×W first historical image data first matrix As shown in the following formula (5), In formula (5), arrive The first historical photovoltaic panel images are The pixel values corresponding to the coordinates (1,1), (1,2) to (1,W); arrive The first historical photovoltaic panel images are The pixel values corresponding to the coordinates (2,1) to (2,W); arrive The first historical photovoltaic panel images are The pixel values corresponding to the mid-coordinates (H,1), (H,2) to (H,W); Step 3.2: Use the following formula (6) to calculate the All data in the Gaussian filter are filtered. In formula (6), This is the first historical photovoltaic panel image The pixel value corresponding to the coordinate (x+i1,y+j1); This is the first historical photovoltaic panel image The coordinates are the pixel values after Gaussian filtering at (x, y); G(i1, j1) is a convolution kernel of size (2k+1)×(2k+1) generated based on a two-dimensional Gaussian distribution; Collect all the data after Gaussian filtering to get a H×W first historical image data second matrix As shown in the following formula (7), In formula (7), arrive The first historical photovoltaic panel images are The pixel values at the coordinates (1,1), (1,2) to (1,W) after Gaussian filtering; arrive The first historical photovoltaic panel images are The pixel values between the coordinates (2,1) and (2,W) after Gaussian filtering; arrive The first historical photovoltaic panel images are The pixel values after Gaussian filtering at the mid-coordinates (H,1), (H,2) to (H,W); Step 3.3: All the data in are substituted into the following formula (8) for normalization: In formula (8), This is the first historical photovoltaic panel image The middle coordinate is the pixel value after Gaussian filtering at (x, y); This is the first historical photovoltaic panel image The middle coordinate is the normalized pixel value of (x, y); is the second matrix of the first historical image data The smallest coordinate value in ; is the second matrix of the first historical image data The largest coordinate value in ; Collect all the normalized data to get a H×W first historical image data third matrix As shown in the following formula (9), In formula (9), arrive The first historical photovoltaic panel images are The normalized pixel values at the coordinates (1,1), (1,2) to (1,W); arrive The first historical photovoltaic panel images are The normalized pixel values between the coordinates (2,1) and (2,W); arrive The first historical photovoltaic panel images are Normalized pixel values from the mid-coordinates (H,1), (H,2) to (H,W); Step 3.4: Repeat steps 3.1 to 3.3 for the second historical photovoltaic panel image To the nth historical photovoltaic panel image All are preprocessed to obtain the second historical image data third matrix of size H×W To the third matrix of nth historical image data 3. The method for predicting regional photovoltaic power generation according to claim 1 or 2, characterized in that: The specific content of the feature extraction in step 3 is as follows: Step 3.5: Transform the first historical image data into a third matrix of size H×W Through the channel attention mechanism, three extractions are performed respectively to obtain the size of The first historical image low-level feature map Size The first historical image mid-level feature map and size The first historical image high-level feature map Among them, W cov is the number of convolution kernels in the channel attention mechanism; C1, C2, and C3 are respectively the first, second, and third channel numbers selected when performing feature extraction according to the channel attention mechanism; Step 3.6: described and stated Substitute into the following formula (10) to perform feature fusion and obtain the size of The first historical image comprehensive feature map In formula (10), and are the low, medium and high-level feature maps of the first historical image, respectively. Upsample(·) and Downsample(·) are upsampling and downsampling operations, respectively. FusionBlock(·) is a double-layer convolution operation. Step 3.7: Combine the first historical image into a comprehensive feature map The first historical image segmentation mask is formed by decoding and segmenting according to the following formula (11): In formula (11), is the pixel value of the first historical comprehensive feature map at the coordinate (i, j), c is the category channel, C = 2, that is, defective and non-defective categories, The first historical comprehensive feature map The pixel value at coordinate (x, y) after bilinear interpolation, P 1 (x, y, c) is the first historical photovoltaic panel image The probability that the coordinate (x, y) belongs to category c, is the first historical image segmentation mask; The first historical image segmentation mask is a matrix of size H×W, as shown in the following formula (14): In formula (12), arrive The first historical photovoltaic panel images are The classification labels on the coordinates (1,1), (1,2) to (1,W), arrive The first historical photovoltaic panel images are Classification labels on the median coordinates (2,1) to (2,W); arrive The first historical photovoltaic panel images are The classification labels on the coordinates (H, 1), (H, 2) to (H, W); the first historical image segmentation mask The values of all classification labels in are 0 or 1; if it is 0, it means that there is no defect at the coordinate corresponding to the classification label; if it is 1, it means that there is a defect at the coordinate corresponding to the classification label; The first historical image segmentation mask is obtained by the following formula (13): Perform feature extraction to obtain the first historical defect statistical feature data of the first historical photovoltaic panel image a1 In formula (13), is the number of pixels in the defective area of the first historical photovoltaic panel image, O is the number of interconnected defective areas in the first historical photovoltaic panel image, is the segmentation mask of the first historical photovoltaic panel image, is the centroid coordinate of the first historical photovoltaic panel image, is the number of defects in the first historical photovoltaic panel image, is the maximum defect area of the first historical photovoltaic panel image, is the average defect area of the first historical photovoltaic panel image, is the total defect area of the first historical photovoltaic panel image; Step 3.8: Repeat steps 3.5 to 3.7 for the second historical photovoltaic panel image a2 to the nth historical photovoltaic panel image a n Perform feature extraction to obtain the second historical defect statistical feature data Statistics characteristic data of historical defects up to the nth 4. The method for predicting regional photovoltaic power generation according to claim 1, characterized in that: The model training process in step 4 is as follows: Step 4.1: Through the forward propagation and back propagation process of the following formula (14), the model parameters are continuously adjusted so that the model can learn the mapping relationship from input features to target outputs. In formula (14), N is the number of training samples, Y i is the actual power generation, is the power generation predicted by the model, χ i is the i-th historical photovoltaic power generation prediction feature after integrating historical meteorological data and photovoltaic panel defect characteristics, is the loss value, is the gradient of the loss with respect to the weight matrix W1, and η is the learning rate; Step 4.2: Evaluate the performance of the model on the test set by the following formula (15) to measure its generalization ability and prediction accuracy, In formula (15), N is the number of training samples, Y i is the actual power generation, is the power generation predicted by the model, is the average value of actual power generation, MSE is the mean square error between the predicted value and the true value, and MAE is the mean absolute error between the predicted value and the true value. is the coefficient of determination, which is used to measure the goodness of fit of the model. The closer the value is to 1, the better the model performance; Step 4.3: Repeat steps 4.1 and 4.2, and train multiple times until the validation set loss no longer decreases significantly, indicating that the model has converged.