A photovoltaic power station power generation power ultra-short-term prediction method and system considering snow cover caused capacity loss
By combining image recognition and Transformer models, the problem of accurate quantification and high precision in predicting photovoltaic power generation under snow-covered weather was solved, enabling stable power generation of photovoltaic power plants under extreme weather conditions and providing data support for grid dispatch and operation and maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-30
- Publication Date
- 2026-04-10
AI Technical Summary
Existing photovoltaic power generation prediction technologies cannot accurately quantify capacity loss under snow cover conditions, and it is difficult to achieve high-precision prediction under small sample conditions, resulting in large prediction errors and failing to meet the requirements for safe and stable operation of the power grid.
The snow-covered area is identified by image recognition technology, and the available installed capacity is predicted by combining the centroid extrapolation method. A unit photovoltaic power generation prediction model based on Transformer is constructed, and the total power generation is obtained by combining the prediction results of the two methods.
It enables accurate quantification of capacity loss and high-precision power generation prediction under snow-covered weather, provides reliable ultra-short-term output reference, provides data support for grid dispatch and photovoltaic power plant operation and maintenance, and reduces the impact of extreme weather on photovoltaic output.
Smart Images

Figure CN121618443B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a photovoltaic power plant power generation power ultra-short-term prediction method and system considering snow cover caused capacity loss, belonging to the photovoltaic power generation power prediction technical field. BACKGROUND
[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute prior art.
[0003] Under the background of global energy structure transformation, photovoltaic power generation as the core renewable energy, its randomness and volatility of output pose a significant challenge to the safe and stable operation of the power grid, and accurate ultra-short-term power prediction has become a key support for new energy consumption and power grid dispatching. Current photovoltaic power prediction technology has made some progress in conventional weather scenarios through model improvement, feature engineering or hybrid modeling, but all existing technologies have not touched the core pain point under extreme snow weather, and there are common defects such as lack of scene adaptation, lack of small sample adaptation, and lack of deep feature mining, which are difficult to meet the actual engineering needs.
[0004] Existing technologies generally take fixed installed capacity as a prerequisite, focus on the power law of conventional weather such as sunny, cloudy, and rainy, completely ignore the damage of snow cover to the effective generating area of photovoltaic panels, and after coupling with solar radiation fluctuations, the power prediction error is significantly increased. Even if some documents mention snow melting optimization or weather classification, they are only used for model hyperparameter adjustment or conventional weather division, and do not involve snow cover area identification and available capacity accounting, and cannot quantify the essential impact of snow cover on power generation capacity. At the same time, the regional and sudden nature of snow weather results in small image sample size and high labeling cost, and existing deep learning methods (such as U-Net cloud map segmentation) that rely on massive data are difficult to implement, and conventional time series models (such as LSTM, basic Transformer) are not optimized for small sample scenarios and have poor generalization ability. In addition, although the existing Transformer type model can extract time series features, the embedding layer design is simple, mostly single value embedding or position embedding, and does not finely represent the intraday periodicity and strong dependence on weather of photovoltaic power generation, which cannot fully utilize the time series modeling ability of the model, resulting in limited unit power prediction accuracy.
[0005] These defects are not local defects of a single technical link, but the existing technology does not start from the physical nature of the snow-covered scene to build a solution. The conventional method either focuses on the precision improvement of the general scene or is limited to the optimization of a single technical link. It is neither accurate to quantify the capacity loss caused by snow cover, nor difficult to predict stably under small sample conditions, nor can it realize the coordinated adaptation of capacity change and unit power prediction. Therefore, the existing technology is completely ineffective in the snow-covered scene, and an integrated method that takes into account the accurate quantification of snow-covered capacity, small sample adaptation and high-precision prediction of unit power is urgently needed to fill the technical gap in photovoltaic power prediction in extreme snow weather, and to provide reliable support for safe operation of power grid and operation and maintenance of photovoltaic power station. SUMMARY
[0006] In view of the deficiencies of the prior art, the present application provides a photovoltaic power station power generation power ultra-short term prediction method and system considering capacity loss caused by snow cover, a available power generation capacity prediction method based on image recognition is constructed, which can calculate the available power generation capacity of the photovoltaic power station by identifying the snow-covered area, then based on the linear extrapolation method to predict the change of available power generation capacity in the future 4 hours, at the same time, a unit photovoltaic power generation power prediction method based on Transformer is constructed to improve the prediction accuracy of unit power generation power; Finally, the total power generation power of the photovoltaic power station at present is obtained by multiplying the available power generation capacity and the unit power generation power prediction value. This method can effectively adapt to the strong volatility and small sample characteristics of the snow-covered scene, and the prediction performance is better than that of the traditional time series prediction model, which can provide reliable ultra-short term output reference for power grid dispatching and data support for photovoltaic power station operation and maintenance strategy making, significantly reduce the influence of snow weather on photovoltaic output stability, and ensure the safe and efficient operation of power system in extreme weather.
[0007] The technical scheme of the present application is as follows:
[0008] A photovoltaic power station power generation power ultra-short term prediction method considering capacity loss caused by snow cover, comprising:
[0009] 1) Data collection and processing; collect historical power generation data of photovoltaic stations, synchronous meteorological data and snow-covered photovoltaic panel image data; meteorological data specifically includes temperature, irradiance, rainfall, wind speed, surface pressure, direct irradiance and scattered irradiance, Gaussian normalization processing and Pearson correlation analysis are performed on the meteorological data, and the key factors with strong correlation with power generation are screened out: irradiance, temperature, direct irradiance and scattered irradiance, redundant information is removed, and the model calculation complexity is reduced; the actual power generation data of the photovoltaic station is divided by the rated installed capacity of the station to obtain the power generation per unit installed capacity, realizing the unification of the data scale of photovoltaic stations with different capacities and eliminating the interference of installed capacity difference on model training; the image data is sequentially subjected to interactive segmentation, grayscale, median filtering, binarization and splicing processing, the snow-covered area and the non-snow-covered area are identified, the pixel ratio of the snow-covered area to the total photovoltaic panel area is counted, and the effective power generation area ratio is obtained by quantifying the ratio;
[0010] Preferably, the image interactive segmentation is an image processing technology combining manual interaction and algorithm automation, aiming to realize accurate target extraction in complex scenes. Its core principle is to effectively separate the foreground and background specified by the user through the interactive information provided by the user. These interactive information can be used to build optimization models, such as graph cut algorithm based on graph theory or segmentation method based on probability graph model. In addition, interactive image segmentation also has important applications in the field of matting, providing efficient and flexible technical support for image editing and visual effects.
[0011] The image interactive segmentation algorithm used by the present application is GrabCut algorithm, which is an interactive image segmentation algorithm based on Gaussian Mixture Model (GMM) and graph theory, used to extract foreground and background from images. It aims to improve the traditional graph cut method and has higher iterative optimization capability.
[0012] The basic principle of the algorithm is to model the image as a weighted undirected graph, with pixels as nodes and edge weights representing the similarity between pixels; secondly, Gaussian Mixture Model is used to describe the color distribution of foreground and background; finally, the maximum flow / minimum cut algorithm is used to optimize the segmentation result.
[0013] Specific algorithm steps:
[0014] 1-1, initialize the rectangular box, the inside of the box is the foreground, i.e. the target to be segmented, and the outside of the box is the background; all pixels are initialized to four types of labels, including GC_BGD (determined background) = 0, GC_FGD (determined foreground) = 1, GC_PR_BGD (possibly background) = 2 and GC_PR_FGD (possibly foreground) = 3;
[0015] 1-2, respectively fitting Gaussian Mixture Model (GMM) for each foreground and background pixel, namely:
[0016] (1)
[0017] (2)
[0018] In the above formula, K is the number of Gaussian components of GMM, π k is the weight of the kth Gaussian component, N (x | μ k ,∑ k ) is a normal distribution, μ k is the mean, and ∑ k is the covariance matrix;
[0019] 1-3, construct the energy function, GrabCut realizes the segmentation of foreground and background by minimizing the following energy function:
[0020] E(L,θ, z) = U (L,θ, z) + V (L,z)(3)
[0021] Where L represents the label of each pixel (foreground / background), θ represents the parameters of Gaussian Mixture Model, z represents the image pixel value, U (L,θ, z) represents the data item, V (L,z) is used to measure the cost of pixels belonging to foreground or background, represents the smoothing term, which is used to measure the similarity between adjacent pixels;
[0022] The data term U (L,θ, z) in formula (3) represents the cost of a certain pixel belonging to foreground or background:
[0023] U (L i ,θ, z i ) = -logP(z i | L i ,θ)(4)
[0024] In the formula, P(z i | L i ,θ) is the probability density of pixel value z i in the Gaussian Mixture Model;
[0025] The smoothing term V (L,z) in formula (3) is used to measure the boundary information between pixels, encouraging adjacent pixels to have similar labels:
[0026] (5)
[0027] Where, is the set of adjacent pixels, is the color difference between pixel i and pixel j, is a coefficient for adjusting the color difference, and γ is a weight of a smoothing term, and [L i ≠ L j is an indicator function, which takes a value of 1 when the label of pixel i is different from that of pixel j (L i ≠ L j ), and a value of 0 otherwise.
[0028] Graph cut optimization and iterative update; graph cut optimization: after modeling the image as an undirected graph, the energy function E(L, θ, z) is optimized by the max-flow / min-cut algorithm to segment the foreground and background; iterative update: 1) update the label L of the pixel (based on graph cut); 2) update the parameters θ of the GMM (re-estimate the color distribution of the foreground and background); 3) repeat the above steps until the energy function converges.
[0029] Grayscale processing is an important step in image preprocessing, which aims to convert color images into grayscale images, thereby reducing the data dimension and highlighting the brightness information in the image. Each pixel value in a grayscale image only represents the brightness intensity, which is usually achieved by weighted synthesis of the values of red, green and blue color channels; grayscale processing can significantly reduce the computational complexity and lay the foundation for subsequent image processing operations (such as edge detection or segmentation).
[0030] To generate a grayscale image that is more consistent with human visual perception, the present application uses the weighted average method to calculate the grayscale value, and the specific calculation formula is as follows:
[0031] Gray = 0.299·R + 0.587·G + 0.114·B (6)
[0032] In formula (6), R, G and B are the pixel values of the red, green and blue channels respectively, and the coefficients are selected according to the sensitivity of the human eye to color.
[0033] Median filtering is a common image denoising technique, widely used for smoothing images and preserving edge details. Its basic principle is to replace the current pixel value with the median value in the pixel neighborhood, thereby effectively removing salt and pepper noise and abrupt points, while avoiding the blurring effect caused by linear methods such as Gaussian filtering. Median filtering performs particularly well in processing images containing high-frequency noise, and is an important tool in the image preprocessing stage.
[0034] The core idea is to sort the pixel neighborhood and use the median to replace the center pixel value, thereby reducing the impact of noise on the image while preserving edge information as much as possible. Specifically, for each pixel in the image, all pixel values within a window (such as 3x3) centered on the pixel are extracted; these pixel values are sorted in ascending order; the sorted median (i.e. the value at the middle position) is used to replace the current pixel value.
[0035] Binarization is a method that transforms a grayscale image into a binary image containing only two pixel values (usually 0 and 255). Its core idea is to classify pixels into foreground and background categories based on a set threshold; common methods include global thresholding (such as the Otsu algorithm) and adaptive thresholding. Binarization can significantly simplify image structure and is widely used in pattern recognition, object detection, and image segmentation.
[0036] This invention introduces a global thresholding method, which uses a fixed threshold T to binarize the entire image. T can be set manually or automatically through an optimization algorithm. A typical algorithm for this method is the Otsu algorithm, a global thresholding segmentation method whose core idea is to maximize the inter-class variance. To find the optimal threshold T * The formula is as follows:
[0037] (7)
[0038] in: The weights (pixel count percentages) of the two types of pixels are determined separately. These are the average grayscale values of the two types of pixels. It is the average gray value of the entire image;
[0039] Otsu's algorithm finds the threshold T that minimizes the inter-class variance by iterating through all possible thresholds T. Maximum threshold:
[0040] (8).
[0041] Image stitching seamlessly combines four interactively segmented and selected valid photovoltaic panel images to form a complete image of the target photovoltaic panel area. It is primarily used to expand the field of view or construct panoramic views. Its implementation principle includes the detection and matching of image feature points, estimation of the homography matrix, and image alignment and fusion. Key steps lie in accurately aligning the images and handling the edge transitions of the stitched areas to ensure a natural and smooth final result. Image stitching technology is commonly used in panoramic photography, drone aerial photography, and map building.
[0042] The aforementioned technologies complement each other, forming a complete process from basic image processing to advanced applications. Interactive image segmentation often combines preprocessing methods such as grayscale processing, median filtering, and binarization to optimize segmentation results, while image stitching can be used to integrate segmentation results, thereby achieving more accurate image processing and analysis in complex scenes.
[0043] 2) Design indicators for snow-covered scene identification and available capacity calculation; construct an available installed capacity prediction model based on the centroid extrapolation method, and use small sample snow-covered area ratio data to extrapolate and predict the available installed capacity for the next 4 hours.
[0044] Preferably, the total number of pixels in all photovoltaic panel areas of the target photovoltaic panel region image after stitching is first counted; then, snow-covered areas are identified through binarization processing, and the number of white pixels is counted as the snow-covered area based on the image processing results; based on the pixel ratio of the snow-covered area to the total area, the effective power generation area of the photovoltaic panel to the total area of the target photovoltaic panel can be calculated. Based on the rated installed capacity, the actual available installed capacity under snow cover conditions can then be calculated. This enables precise quantification of capacity loss caused by snow cover;
[0045] (9)
[0046] In the formula, C represents the total rated installed capacity; It is the area ratio of the effective power generation area, specifically referring to the effective power generation area S of the photovoltaic panels under snow cover conditions. e The ratio of the total area S to the total area S; where S e =SS c S c This represents the actual snow-covered area of the photovoltaic panels; however, direct calculation using image analysis can only obtain the area S of the snow pixels in the image. w At the same time, it can also indirectly obtain the pixel area S of the black image. b =SS w The result can be obtained through calculation using the formula. ;
[0047] (10)
[0048] In the formula, Focus on the total area of the photovoltaic panels in the image;
[0049] Given the limited availability of snow-covered image data, it is impossible to use deep learning to predict the effective installed capacity under snow cover. To address this problem, this invention proposes using a centroid extrapolation method to predict the area ratio using a small amount of data. Subsequently, the predicted effective installed capacity under snow cover was calculated using formula (9). The basic principle of centroid extrapolation is to calculate the centroid position of existing data points and extrapolate it in some way to predict their future position or state. In time series data analysis, centroid extrapolation can be used to predict future data points, especially for linear or simple nonlinear trends. In time series forecasting, it is assumed that there is a series of observations y1, y2, ..., y...n The corresponding time points are t1, t2, …, t n The centroid position is:
[0050] (11)
[0051] To extrapolate, the trend of centroid change (e.g. rate of change) can be calculated first, and then the future value is predicted: , is the rate of change and can be obtained by calculating the growth rate or trend of historical data;
[0052] Centroid extrapolation is often used for trend prediction and object trajectory prediction. Trend prediction estimates future trends by the centroid position of data. Object trajectory prediction predicts the future possible position of an object by calculating the position centroid of the object in the past period of time.
[0053] The basic implementation steps of the centroid extrapolation method are:
[0054] 2-1, Data preparation: construct a time series data set by taking the time and area ratio data set as (x, y) coordinates;
[0055] 2-2, Calculate the centroid: for the data in a time period, the centroid (i.e. the weighted average of time and area ratio) can be calculated; the calculation of the centroid can be based on the following formula: the centroid coordinate point is (x ), where x i is the time, y i is the area ratio, and n is the number of data points;
[0056] 2-3, Calculate the rate of change of the centroid: based on the centroid position of the previous period of time, calculate the rate of change of the centroid (i.e. the slope); if the data shows a linear trend, the rate of change of the centroid can be calculated by simple linear regression; if the centroid change shows a nonlinear trend, use the sliding window local linear fitting method to calculate the rate of change: take the current data point as the center, set a sliding window of 3-5 data points, for each window, fit the local linear trend by least squares method to get the rate of change of the centroid in the window;
[0057] 2-4, Extrapolate prediction: according to the rate of change of the centroid, extrapolate the future centroid position to get the predicted area ratio , and then estimate by formula (9).
[0058] 3) Constructing a Transformer-based unit photovoltaic power prediction model, inputting meteorological features, historical power data and normalized timestamp features into a multi-dimensional embedding layer, mining time series dependence and meteorological dependence through an encoder-decoder architecture and self-attention mechanism, and predicting unit photovoltaic power ; the available installed capacity prediction model of step 2) and the unit photovoltaic power prediction model of step 3) constitute a double-module collaborative prediction model, according to the prediction results of the two models, multiplying the unit photovoltaic power and the predicted effective installed capacity to obtain the photovoltaic power in the snow-covered scene, which is the total power generation prediction result;
[0059] Preferably, I. Transformer is a deep learning model designed by Vaswani et al. for processing sequence data. This model discards traditional recurrent neural networks (RNN) and convolutional neural networks (CNN), and instead uses a self-attention mechanism to achieve parallel processing of input data and efficiently capture long-range dependencies. Transformer includes embedding layers, encoders and decoders, where both encoders and decoders use multi-head self-attention to focus on different parts of the sequence, and the main architecture is shown in Figure 1. This architecture exhibits more accurate modeling capabilities for the volatility and uncertainty present in photovoltaic power prediction tasks.
[0060] The embedding layer of the Transformer includes value embedding layer, position embedding layer and time embedding layer, which aims to provide a more rich and multi-dimensional representation for input data, especially suitable for processing data with time and sequence structure, such as time series prediction tasks. Among them include meteorological data, time feature data and historical photovoltaic power, as shown in Figure 2.
[0061] The value embedding layer is based on a one-dimensional convolutional neural network, which has the advantage of efficiently extracting local features from the input sequence while maintaining the integrity of the time information, and accelerating the training process through parameter sharing and parallel computing. Value embedding uses Kaiming initialization to ensure stable training convergence, which is suitable for time series prediction tasks that need to capture short-term dependencies and process periodic data; this part of the local features mainly includes data features that affect photovoltaic power (core meteorological features selected by Pearson correlation analysis, mainly irradiance, supplemented by temperature, direct irradiance and scattered irradiance) and historical photovoltaic power data, note that Gaussian normalization is required when inputting to prevent gradient explosion or gradient vanishing.
[0062] The position embedding layer is used to add data position information to the input sequence. The Transformer model itself does not contain any built-in time and order concept. The role of position encoding is to enable the model to distinguish the relative or absolute position of elements in the sequence, which is particularly important for processing time series data. Specifically, position encoding is constructed by sine and cosine functions, where the wavelength increases exponentially with the dimension, as shown in the following formula:
[0063] (12)
[0064] (13)
[0065] In the formula: P s is the position index of the meteorological sequence input; d is the dimension of the position vector; i is the vector dimension; P E (P s ,2i) and P E (P s ,2i+1) are the position encoding formulas at even or odd positions of the meteorological sequence position index, respectively.
[0066] The time embedding layer is specifically used to decompose and encode the original timestamp into a multi-period normalized feature vector containing the number of days within the year, the number of days within the month, the number of days within the week, and the number of hours within a day, and convert it into a high-dimensional vector representation. The purpose is to provide the model with time context labels about the input data, enhancing the model's understanding of time series data to capture periodic and seasonal patterns, and ultimately improving the model's prediction ability. Considering the original time feature labels, the specific construction method is as follows: for a certain time dimension (such as seconds, minutes, hours, etc.), its value range is (for example, the value range of seconds is [0, 59]), and the corresponding normalized feature value can be calculated by the following formula:
[0067] (14)
[0068] where x is the original time dimension value (such as 2 hours), a is the minimum value of the time dimension (usually 0 or 1), and b is the maximum value of the time dimension. Formula (14) normalizes x to the interval [-0.5, 0.5].
[0069] The time feature labeling method used in the present application maps a single timestamp to a feature vector, such as the time level division into the number of days within the year, the number of days within the month, the number of days within the week, and the number of hours within a day. In the overall framework diagram, the time label feature vector M is a time label feature vector M corresponding to each timestamp, that is, M = [y m , y w , y d , y h], the subscript letters in M correspond to the time characteristic information, respectively representing month, week, day, and hour; in addition, each characteristic value is attributed to the [-0.5, 0.5] value range, which is mainly to simulate the time symmetry periodicity characteristics and improve the model learning ability. For example, the photovoltaic power curve of a day is roughly similar to a Gaussian distribution, with the highest value in the daytime marked as 0 and the lowest value at night as positive or negative 0.5, showing a symmetrical shape. All data characteristics at each time point together form a vector as the data label of the time point, and the value embedding layer and the position embedding layer together form the embedding layer data input into the Transformer model. All data characteristics at each time point include: screened key meteorological characteristics (irradiance, temperature, direct irradiance, and scattered irradiance), historical unit power generation data, and normalized time characteristic vectors.
[0070] The core structure of the encoder and the decoder is the self-attention mechanism, which is also the core design kernel of the Transformer model. It is worth emphasizing that the masked self-attention mechanism used in the decoder strictly limits the model to only obtain time series information before the position when predicting the output of the position, thereby effectively simulating the sequential processing logic of the traditional sequence model and ensuring that the prediction process conforms to the inherent characteristics of time series data. The calculation method of the above self-attention mechanism is as follows:
[0071] (15)
[0072] In the formula, Attention(·) represents the self-attention calculation function; Q, K, and V represent the query vector matrix, the key vector matrix, and the value vector matrix, respectively; T represents transposition; d K is the dimension size of the key vector; and softmax(·) represents the normalization function.
[0073] Multi-head attention enables the model to jointly focus on different subspaces of information from different positions. Then, the model obtains more data characteristic information. If there is only one attention, the average value will suppress this case, and formula (16) is the principle of the multi-head attention mechanism:
[0074] (16)
[0075] and
[0076] The encoder includes a multi-head attention mechanism, a residual normalization layer, a forward propagation layer, and a residual normalization layer; the decoder uses a masked self-attention mechanism, a residual normalization layer, an attention mechanism, a residual normalization layer, a forward propagation layer, a residual normalization layer, and a normalization / fully connected layer.
[0077] Residual Normalization Layer combines Residual Connection and Layer Normalization, which is a key component in deep neural networks for stabilizing and accelerating training. During forward propagation, the input first passes through a sublayer such as self-attention mechanism or feed-forward layer, then the output after the sublayer is added to the original input to form a residual connection, and finally it is processed by layer normalization. This structure not only helps to alleviate the problem of gradient vanishing, but also enables the network to learn more complex function mappings while maintaining the stability of gradients. Specifically, its formula can be expressed as:
[0078] LayerNorm(x+Sublayer(x)) (17)
[0079] where x is the input, Sublayer(x) represents the output after passing through the sublayer (such as self-attention layer or feed-forward layer), and LayerNorm represents the layer normalization operation.
[0080] Layer normalization normalizes the features of each sample to ensure they have zero mean and unit variance. The formula of layer normalization is as follows:
[0081] (18)
[0082] where: and are the mean and variance of x, is a very small constant for numerical stability, and γ and β are learnable parameters to scale and shift the normalized values.
[0083] Feed-forward layer is a core fully connected neural network component in Transformer architecture, which acts on each position of the sequence independently and parameter-shared; the typical structure of this layer includes two linear transformations, with a nonlinear activation function (commonly ReLU function) embedded in between, and its core function is to transform and strengthen the input features, thereby improving the feature representation ability of the model. It is worth noting that although the data at each position is transformed by the same weight matrix, the entire transformation process is executed in parallel and independently, which can effectively improve the capacity and representation flexibility of the model while preserving the inherent structure information of the sequence. Its formula can be expressed as:
[0084] FFN(x) = max(0, xW1+b1)W2+b2(19)
[0085] where x is the input, W1 and b1 are the weight matrix and bias of the first linear transformation; W2 and b2 are the weight matrix and bias of the second linear transformation; max(0, ·) represents the ReLU activation function.
[0086] According to the description of the basic architecture of the Transformer, we get Figure 3 Unit photovoltaic power prediction overall framework. In this figure, the input model data includes irradiance, historical unit photovoltaic power and time feature labels, and the unit photovoltaic power model is trained. The specific modeling steps are as follows:
[0087] 1. After inputting the relevant meteorological factors, a normalization module is constructed;
[0088] 2. A multi-head attention mechanism is constructed and initialized, including initial weights and biases;
[0089] 3. An embedding layer is constructed, including a value embedding layer, a position embedding layer and a time embedding layer;
[0090] 4. A residual normalization layer is constructed;
[0091] 5. A forward propagation layer is constructed, and a residual normalization layer is again passed through to achieve stable model training;
[0092] During the training and prediction process, rolling prediction is required, predicting one future power time point every four historical data points; the above construction process is the entire process of the Transformer model encoder.
[0093] 4) Prediction result analysis; multiple different evaluation indicators (such as mean absolute error (MAE), root mean square error (RMSE)) are used to verify the performance of the unit photovoltaic power prediction model and the available installed capacity prediction model; through different lead time and random time point tests, the stability and generalization ability of the model under the snow cover scenario are verified;
[0094] Preferably, the lead time range is 10min-60min.
[0095] 5) Construction of snow cover scenario photovoltaic output guarantee support framework; based on accurate prediction results, quantify the photovoltaic power fluctuation amplitude and capacity loss degree caused by snow cover, provide super short-term output reference for power grid dispatching, reduce the impact of power sudden change on power supply and demand balance, and provide data support for photovoltaic station operation and maintenance strategy making, reduce unplanned power generation loss.
[0096] A photovoltaic power station power generation power super short-term prediction system considering snow cover caused capacity loss, comprising:
[0097] The data acquisition and processing module synchronously acquires historical power generation data of a photovoltaic station, meteorological data and image data of a snow-covered photovoltaic panel, performs Gaussian normalization processing and Pearson correlation analysis on the meteorological data to automatically screen key influencing factors, performs installed capacity normalization conversion on the power generation data to unify the data scale, and automatically completes interactive segmentation, grayscale processing, median filter denoising, binary segmentation and image stitching according to a preset process, accurately counts the pixel ratio of the snow-covered area and the total area of the photovoltaic panel, and outputs standardized data for calling by a subsequent module.
[0098] The available installed capacity prediction module constructs an effective photovoltaic panel power generation area ratio index based on the image processing result, calculates the available installed capacity by combining the rated installed capacity, adopts a centroid extrapolation algorithm to receive small sample data of the snow-covered area ratio, automatically calculates the data centroid and the change rate, extrapolates to predict the available installed capacity in the next 4 hours, and outputs a dynamic capacity prediction sequence.
[0099] The unit photovoltaic power prediction module constructs an independent prediction unit based on a Transformer architecture, receives key meteorological features, historical power data and normalized timestamp features, completes feature fusion through a multi-dimensional embedding layer, uses an encoder-decoder architecture and a self-attention mechanism to mine time series and meteorological dependencies, and outputs a unit photovoltaic power prediction result.
[0100] The dual-module fusion prediction module receives the unit photovoltaic power prediction result and the available installed capacity prediction sequence, fuses the two results through multiplication, generates a total power generation prediction value of the photovoltaic power station under the snow-covered condition, and outputs to the evaluation module.
[0101] The model prediction effect evaluation module is configured to use mean absolute error (MAE) and root mean square error (RMSE) as core evaluation indexes to carry out two-dimensional performance verification. On the one hand, the unit photovoltaic power prediction model is compared with mainstream time series models such as FAN_Transformer and Informer, and the numerical accuracy of the available installed capacity prediction model is verified. On the other hand, a multi-scenario test scheme is designed, gradient advanced prediction of 10min-60min is covered, random time points are selected for testing, and the running stability and generalization adaptation ability of the model under the snow-covered special scene are verified.
[0102] The snow-covered scene photovoltaic output guarantee support module is configured to quantize the amplitude of photovoltaic power fluctuation and the scale of capacity loss caused by snow cover based on the accurate prediction results output by the model; provide high-credibility ultra-short-term output data support for the power grid dispatching center, help formulate targeted dispatching strategies, and weaken the disturbance of power mutation on the balance between power supply and demand of the power grid; and provide a quantitative basis for photovoltaic station operation and maintenance decision-making, assist in optimizing snow melting arrangement and other operation and maintenance schemes, minimize unplanned power generation loss, and guarantee the stable and reliable output of photovoltaic systems in extreme snow weather.
[0103] A computer-readable storage medium has a program stored thereon, and the program, when executed by a processor, implements the steps in the method for ultra-short-term prediction of photovoltaic power station power generation capacity loss caused by snow cover according to the first aspect of the application.
[0104] An electronic device includes a memory, a processor, and a program stored on the memory and executable on the processor, and the processor implements the steps in the method for ultra-short-term prediction of photovoltaic power station power generation capacity loss caused by snow cover according to the first aspect of the application when executing the program.
[0105] The beneficial effects of the present application are:
[0106] The present application provides a method for ultra-short-term prediction of photovoltaic power station power generation capacity loss caused by snow cover, to improve the accuracy and practical applicability of photovoltaic power prediction under snow cover conditions and solve the problems of large prediction error and poor adaptability of existing technologies in extreme snow scenarios. First, the snow-covered area ratio of photovoltaic panels is accurately calculated through interactive image recognition technology, and then the available installed capacity is dynamically predicted under small sample conditions based on the centroid extrapolation method, breaking through the dependence of existing deep learning image detection methods on massive data and high computing power, and effectively quantifying the capacity loss caused by snow cover. Then, a Transformer model with a multi-dimensional embedding layer is constructed, and the timestamp features, weather data, and historical power data are fused and input, fully exploiting the time sequence dependence and weather dependence of photovoltaic power generation. Compared with existing models such as LSTM and Informer, the prediction accuracy of unit power generation is significantly improved. Next, a dual-module collaborative architecture is used to multiply the prediction results of unit power and available capacity to obtain the total power, accurately capturing the strong volatility of power during the snow cover and snow melting process, and solving the defects of existing models that ignore the feature variation of snow cover samples and are difficult to adapt to small sample scenarios. Finally, this method does not require complex computing power support, and the prediction results can provide reliable ultra-short-term output reference for power grid dispatching and data support for photovoltaic station operation and maintenance, balancing prediction accuracy and engineering practicality, and filling the technical gap in photovoltaic power prediction under snow cover conditions. BRIEF DESCRIPTION OF DRAWINGS
[0107] Figure 1The figure of the Transformer architecture of the present application;
[0108] Figure 2 The figure of the embedding layer design of the present application;
[0109] Figure 3 The figure of the overall steps of the Transformer modeling of the present application;
[0110] Figure 4 The figure of the overall research route of the present application;
[0111] Figure 5 The figure of the image processing flow of the snow-covered photovoltaic panel of the present application;
[0112] Figure 6 The figure of the unit photoelectric power prediction curve of the present application;
[0113] Figure 7 The figure of the performance comparison between models when the evaluation index is the mean absolute error (MAE);
[0114] Figure 8 The figure of the performance comparison between models when the evaluation index is the root mean square error (RMSE);
[0115] Figure 9 The figure of the unit photoelectric power prediction comparison of the six-point random model of the present application;
[0116] Figure 10 The figure of the evaluation index comparison experiment of the six-point random prediction model when the evaluation index is the mean absolute error (MAE);
[0117] Figure 11 The figure of the evaluation index comparison experiment of the six-point random prediction model when the evaluation index is the root mean square error (RMSE);
[0118] Figure 12 The figure of the installed capacity prediction experiment under the snow-covered condition of the present application;
[0119] Figure 13 The figure of the comparison of the photoelectric power experiments under the snow-covered condition of the present application;
[0120] Figure 14 The scatter plot comparison figure of the photoelectric power prediction effect under the snow-covered condition of the present application;
[0121] Figure 15 The comparison figure of the photoelectric power prediction evaluation under the snow-covered condition of the present application. DETAILED DESCRIPTION
[0122] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0123] It is to be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, steps, operations, elements, components, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof.
[0124] Embodiment 1
[0125] A photovoltaic power station power generation power ultra-short-term prediction method considering capacity loss caused by snow cover, as shown in Figure 4 , comprises:
[0126] 1) Data collection and processing; in the construction of the photovoltaic prediction model, data collection and preprocessing is the core link to ensure the performance of the prediction model, especially in extreme weather conditions, the comprehensiveness, accuracy and consistency of the data have a decisive role on the reliability of the prediction results.
[0127] Three types of core data are collected, aiming to provide multi-dimensional and scenario-based basic support for the prediction model: first, historical power generation data of photovoltaic power stations, as the core basic data reflecting the power generation law, providing sample support for unit power generation prediction model training; second, synchronous weather data, covering key weather indicators related to photovoltaic power generation, used to mine the internal relationship between weather conditions and power generation; third, snow-covered photovoltaic panel image data, specially used to capture the impact of snow cover on the effective generating area of photovoltaic panels, providing direct basis for available installed capacity accounting.
[0128] Data preprocessing is carried out according to the type of data, and the core target is to improve data quality, extract key information, and adapt to model requirements: weather data specifically includes temperature, irradiance, rainfall, wind speed, surface pressure, direct irradiance and scattered irradiance, Gaussian normalization processing and Pearson correlation analysis are carried out on the weather data, and the key factors with strong correlation with power generation are selected: irradiance, temperature, direct irradiance and scattered irradiance, redundant information is removed, and the model calculation complexity is reduced; the power generation data is normalized by installed capacity: the actual power generation data of the photovoltaic power station is divided by the rated installed capacity of the station, and the power generation per unit installed capacity is obtained, realizing the unification of data scale of photovoltaic power stations with different capacities, and eliminating the interference of installed capacity difference on model training; the image data is sequentially processed by interactive segmentation, grayscale, median filtering, binarization and splicing, as shown in Figure 5 , the snow-covered area and the non-snow-covered area are identified, the pixel ratio of the snow-covered area and the total photovoltaic panel area is counted, and the effective generating area ratio is obtained by quantifying the ratio, laying a data foundation for subsequent accounting and prediction of available installed capacity.
[0129] Image interactive segmentation is an image processing technique that combines human interaction with algorithm automation, aiming to achieve precise target extraction in complex scenes. Its core principle is to effectively separate the user-specified foreground from the background using interactive information provided by the user. These interactive information can be used to build optimization models, such as graph-based graph cut algorithms or segmentation methods based on probabilistic graph models. In addition, interactive image segmentation also has important applications in the field of matting, providing efficient and flexible technical support for image editing and visual effects.
[0130] The image interactive segmentation algorithm used in this invention is the GrabCut algorithm, which is an interactive image segmentation algorithm based on Gaussian Mixture Model (GMM) and graph theory, used to extract foreground and background from images. It aims to improve the traditional graph cut method and has more efficient iterative optimization capabilities.
[0131] The basic principle of this algorithm is to model the image as a weighted undirected graph, with pixels as nodes and edge weights representing the similarity between pixels; secondly, use Gaussian Mixture Model to describe the color distribution of foreground and background; finally, use the maximum flow / minimum cut algorithm to optimize the segmentation result.
[0132] Specific algorithm steps:
[0133] 1-1, initialize the rectangular box, the inside of the box is the foreground, i.e. the target to be segmented, and the outside of the box is the background; all pixels are initialized to four types of labels, including GC_BGD (determined background) = 0, GC_FGD (determined foreground) = 1, GC_PR_BGD (possibly background) = 2 and GC_PR_FGD (possibly foreground) = 3.
[0134] 1-2, fit Gaussian Mixture Model (GMM) for each foreground and background pixel, i.e.:
[0135] (1)
[0136] (2)
[0137] In the above formula, K is the number of Gaussian components of GMM, π k is the weight of the kth Gaussian component, N (x | μ k ,∑ k ) is the normal distribution, μ k is the mean, and ∑ k is the covariance matrix.
[0138] 1-3, construct the energy function, GrabCut realizes the segmentation of foreground and background by minimizing the following energy function:
[0139] E(L,θ, z) = U (L,θ, z) + V (L,z)(3)
[0140] where L denotes the label (foreground / background) of each pixel, θ denotes the parameters of the Gaussian Mixture Model, z denotes the image pixel value, U (L,θ, z) denotes the data term, V (L,z) is used to measure the cost of a pixel belonging to foreground or background, and V (L,z) denotes the smooth term, which is used to measure the similarity between adjacent pixels.
[0141] The data term U (L,θ, z) in formula (3) represents the cost of a certain pixel belonging to foreground or background:
[0142] U (L i ,θ, z i ) = -logP(z i | L i ,θ)(4)
[0143] In formula (4), P(z i | L i ,θ) is the probability density of the pixel value z i in the Gaussian Mixture Model.
[0144] The smooth term V (L,z) in formula (3) is used to measure the boundary information between pixels, and encourages adjacent pixels to have similar labels:
[0145] (5)
[0146] where is the set of adjacent pixels, is the color difference between pixel i and pixel j, is the coefficient for adjusting the color difference, γ is the weight of the smooth term, and [L i ≠L j ] is an indicator function that takes the value 1 when the labels of pixel i and pixel j are different (L i ≠L j ), and 0 otherwise.
[0147] Graph cut optimization and iterative update; Graph cut optimization: after modeling the image as an undirected graph, the energy function E(L,θ, z) is optimized by the maximum flow / minimum cut algorithm to segment the foreground and background; Iterative update: 1) update the label L of the pixel (based on graph cut); 2) update the parameters θ of the GMM (re-estimate the color distribution of the foreground and background); 3) repeat the above steps until the energy function converges.
[0148] Gray-scale processing is an important step in image preprocessing, which aims to convert color images into grayscale images, thereby reducing data dimensionality and highlighting brightness information in the image. Each pixel value in a grayscale image represents only the intensity of brightness, usually achieved by weighted synthesis of the values of the red, green, and blue color channels; grayscale processing can significantly reduce computational complexity and lay the foundation for subsequent image processing operations such as edge detection or segmentation.
[0149] To generate a grayscale image that is more consistent with human visual perception, the present application uses a weighted average method to calculate the grayscale value, and the specific calculation formula is as follows:
[0150] Gray = 0.299·R + 0.587·G + 0.114·B (6)
[0151] In formula (6), R, G, and B are the pixel values of the red, green, and blue channels, respectively, and the coefficients are selected based on the sensitivity of the human eye to color.
[0152] Median filtering is a common image denoising technique, widely used for smoothing images while preserving edge details. Its basic principle is to replace the current pixel value with the median value within the pixel neighborhood, effectively removing salt and pepper noise and abrupt changes, while avoiding the blurring effect caused by linear methods such as Gaussian filtering. Median filtering performs particularly well in handling images with high-frequency noise, making it an important tool in the image preprocessing stage.
[0153] The core idea is to sort the pixel neighborhood and replace the center pixel value with the median, thereby reducing the impact of noise on the image while preserving edge information as much as possible. Specifically, for each pixel in the image, all pixel values within a window (e.g., 3x3) centered on that pixel are extracted; these pixel values are sorted in ascending order; the sorted median value (i.e., the value at the middle position) is used to replace the current pixel value.
[0154] Binaryzation is a method of converting a grayscale image into a binary image containing only two pixel values (usually 0 and 255). Its core idea is to divide pixels into foreground and background based on a set threshold; common methods include global thresholding (such as Otsu algorithm) and adaptive thresholding. Binaryzation can significantly simplify image structure and is widely used in pattern recognition, object detection, and image segmentation.
[0155] The present application introduces a global thresholding method, which uses a fixed threshold T to binarize the entire image; the way T is set can be manually selected or automatically determined by some optimization algorithm. A typical algorithm for this method is the Otsu algorithm, which is a global thresholding segmentation method. Its core idea is to find the optimal threshold T by maximizing the inter-class variance * ; the formula is as follows,
[0156] (7)
[0157] wherein: the weight (pixel quantity proportion) of the two types of pixel points respectively, the average gray value of the two types of pixels respectively, is the average gray value of the entire image.
[0158] The Otsu algorithm finds the threshold value that can maximize the inter-class variance by traversing all possible thresholds T:
[0159] (8).
[0160] Image stitching is to seamlessly stitch the four effective photovoltaic panel images screened out after interactive segmentation to form a complete target photovoltaic panel region image, which is mainly used to expand the image field of view or construct a panoramic image; its implementation principle includes image feature point detection and matching, homography matrix estimation, and image alignment and fusion. The key step is to accurately align the images and handle the edge transition of the stitching area, so that the final result is natural and smooth. Image stitching technology is commonly used in fields such as panoramic photography, unmanned aerial photography, and map construction.
[0161] The above technologies complement each other and together form a complete set of processes from basic image processing to high-level applications. Interactive image segmentation often combines gray processing, median filtering, and binarization and other preprocessing methods to optimize the segmentation effect, while image stitching can be used to integrate the segmentation results, thereby achieving more accurate image processing and analysis in complex scenes.
[0162] 2) Design snow-covered scene recognition and available capacity calculation indicators; based on the centroid extrapolation method, build a available installed capacity prediction model, use small sample snow-covered area ratio data to extrapolate and predict the available installed capacity in the next 4 hours;
[0163] First, count the total number of pixels of all photovoltaic panel regions in the target photovoltaic panel region image after stitching is completed; then, identify the snow-covered area through binarization processing, based on the image processing result, count the number of white pixels as the snow-covered area; based on the pixel proportion of the snow-covered area and the total area, the area ratio of the effective generating area of the photovoltaic panel to the total area of the target photovoltaic panel can be calculated , combined with the rated installed capacity, to calculate the real available installed capacity under the condition of snow cover , to accurately quantify the capacity loss caused by snow cover;
[0164] (9)
[0165] In the formula, C is the total rated installed capacity; is the area ratio of the effective power generation area, specifically refers to the effective power generation area S of the photovoltaic panel under the snow cover e is the ratio of the total area S; wherein, S e =S-S c , S c represents the actual snow-covered area of the photovoltaic panel; but using image analysis to directly calculate can only get the area S of the snow ground pixels in the image w , and the black image pixel area S b =S-S w can also be indirectly obtained ;
[0166] (10)
[0167] In the formula, is the total area of the photovoltaic panel in the image;
[0168] Considering that the snow-covered image data is less, which leads to the inability to use deep learning to predict the effective installed capacity under the snow cover . To solve this problem, the application proposes to use the centroid extrapolation method to predict the predicted area ratio using a small amount of data; then, the predicted effective installed capacity under the snow cover is calculated by formula (9) ; the basic principle of centroid extrapolation is to calculate the centroid position based on the existing data points, and to predict the future position or state by some way. In time series data analysis, centroid extrapolation can be used to predict future data points, especially for linear or simple nonlinear trends. In time series prediction, suppose there are a series of observation values y1, y2, …, y n , the corresponding time points are t1, t2, …, t n , and the centroid position is:
[0169] (11)
[0170] In order to extrapolate, the trend of the centroid change (such as the change rate) can be calculated first, and then the future value is predicted: , is the change rate and can be obtained by calculating the growth rate or trend of the historical data;
[0171] Centroid extrapolation is often used for trend prediction and object trajectory prediction. Trend prediction estimates future trends through the centroid position of data. Object trajectory prediction predicts the future possible position of the object by calculating the centroid position of the object in the past period of time.
[0172] The basic implementation steps of the centroid extrapolation method are:
[0173] 2-1, Data preparation: Construct a time series dataset by taking the time and area ratio dataset as (x, y) coordinates;
[0174] 2-2, Calculate the centroid: For the data in a time period, the centroid (i.e., the weighted average of time and area ratio) can be calculated; the calculation of the centroid can be based on the following formula: the centroid coordinate point is (x ), where x i is the time, y i is the area ratio, and n is the number of data points;
[0175] 2-3, Calculate the centroid change rate: Based on the centroid position of the previous period, calculate the change rate of the centroid (i.e., the slope); if the data shows a linear trend, the change rate of the centroid can be calculated by simple linear regression; if the centroid change shows a nonlinear trend, use the sliding window local linear fitting method to calculate the change rate: set a sliding window of 3-5 data points centered on the current data point, and fit the local linear trend for each window by least squares method to obtain the centroid change rate in the window;
[0176] 2-4, Extrapolation prediction: According to the change rate of the centroid, extrapolate the future centroid position to obtain the predicted area ratio , and then estimate by formula (9).
[0177] 3) Construct a unit photovoltaic power prediction model based on Transformer, input meteorological features, historical power data and normalized timestamp features into multi-dimensional embedding layer, mine time series dependence and meteorological dependence through encoder-decoder architecture and self-attention mechanism, and predict the unit photovoltaic power ; the available installed capacity prediction model of step 2) and the unit photovoltaic power prediction model of step 3) constitute a double-module collaborative prediction model, according to the prediction results of the two models, multiply the unit photovoltaic power and the predicted effective installed capacity to obtain the photovoltaic power in the snow-covered scene, which is the total power generation prediction result;
[0178] Transformer is a deep learning model designed by Vaswani et al. for processing sequential data. This model abandons traditional recurrent neural networks (RNN) and convolutional neural networks (CNN), instead adopting a self-attention mechanism to achieve parallel processing of input data and efficiently capture long-range dependencies. Transformer includes an embedding layer, an encoder, and a decoder, where both the encoder and the decoder use multi-head self-attention to focus on different parts of the sequence, as shown in the main architecture of Figure 1 This architecture exhibits more accurate modeling capabilities for the volatility and uncertainty present in photovoltaic power prediction tasks.
[0179] The embedding layer of Transformer includes a value embedding layer, a position embedding layer, and a time embedding layer, aiming to provide a more rich and multi-dimensional representation for input data, especially suitable for processing data with time and sequence structure, such as time series prediction tasks. This includes meteorological data, time feature data, and historical photovoltaic power, as shown in Figure 2
[0180] The value embedding layer is based on a one-dimensional convolutional neural network, which has the advantage of efficiently extracting local features from input sequences while maintaining the integrity of time information, and accelerating the training process through parameter sharing and parallel computation. Value embedding uses Kaiming initialization to ensure stable training convergence, which is suitable for time series prediction tasks that need to capture short-term dependencies and process periodic data; this part of local features mainly includes data features that affect photovoltaic power (core meteorological features selected by Pearson correlation analysis, mainly irradiance, supplemented by temperature, direct irradiance, and scattered irradiance) and historical photovoltaic power data, note that Gaussian normalization is required when inputting to prevent gradient explosion or gradient vanishing.
[0181] The position embedding layer is used to add data position information to the input sequence. The Transformer model itself does not contain any built-in time and order concept, and the role of position encoding is to enable the model to distinguish the relative or absolute position of elements in the sequence, which is particularly important for processing time series data. Specifically, position encoding is constructed through sine and cosine functions, where the wavelength increases exponentially with the dimension, as shown in the following formula:
[0182] (12)
[0183] (13)
[0184] In the formula, P s is the position index of the meteorological sequence input; d is the dimension of the position vector; i is the vector dimension; PE (P s ,2i) and P E (P s ,2i+1) are position encoding formulas at even or odd positions of the weather sequence position index, respectively.
[0185] The time embedding layer is specially used to decompose and encode the original timestamp into a multi-period normalized feature vector containing the number of days within a year, the number of days within a month, the number of days within a week, the number of hours within a day, etc. into a high-dimensional vector representation, aiming to provide the model with time context labels about the input data, enhancing the model's understanding of time series data to capture periodic and seasonal patterns, and ultimately improving the model's prediction ability. Considering the original time feature labels, the specific construction method is as follows: for a certain time dimension (such as seconds, minutes, hours, etc.), its value range is (for example, the value range of seconds is [0, 59]), and the corresponding normalized feature value can be calculated by the following formula:
[0186] (14)
[0187] where x is the original time dimension value (such as 2 hours), a is the minimum value of the time dimension (usually 0 or 1), and b is the maximum value of the time dimension. Formula (14) normalizes x to the interval [-0.5, 0.5].
[0188] The time feature labeling method used in the present application will map a single timestamp to a feature vector, such as dividing the time level into the number of days within a year, the number of days within a month, the number of days within a week, and the number of hours within a day. In the overall framework diagram, the time label feature vector M, i.e. each timestamp corresponds to a time label feature vector M = [y m , y w , y d , y h ], the subscript letters in M correspond to time feature information, representing month, week, day, and hour, respectively. In addition, each feature value is between -0.5 and 0.5, which is mainly to simulate the symmetric periodicity of time and improve the model's learning ability. For example, the photovoltaic power curve of a day is roughly similar to a Gaussian distribution, with the highest value in the daytime marked as 0 and the lowest value at night as ±0.5, showing a symmetric shape. All data features at each time are combined to form a vector as the data label of that time, and the embedding layer data input into the Transformer model is composed of the value embedding layer and the position embedding layer. All data features at each time include: screened key meteorological features (irradiance, temperature, direct irradiance, and scattered irradiance), historical unit power generation data, and normalized time feature vectors.
[0189] The core structure of the encoder and the decoder is the self-attention mechanism, which is also the core design kernel of the Transformer model. It is worth emphasizing that the masked self-attention mechanism used in the decoder strictly limits the model to only obtain the time sequence information before the position when predicting the output of the position, thereby effectively simulating the sequential processing logic of the traditional sequence model, ensuring that the prediction process conforms to the inherent characteristics of the time sequence data. The calculation method of the above self-attention mechanism is as follows:
[0190] (15)
[0191] In the formula, Attention(·) represents the self-attention calculation function; Q, K and V represent the query vector matrix, the key vector matrix and the value vector matrix respectively; T represents transposition; d K is the dimension size of the key vector; and softmax(·) represents the normalization function.
[0192] Multi-head attention enables the model to jointly focus on different subspaces of information from different positions of different representations. Then, the model obtains more data feature information. If there is only one attention, the average value will suppress this case. Formula (16) is the principle of the multi-head attention mechanism:
[0193] (16)
[0194] , , and are weight parameter matrices.
[0195] The encoder includes a multi-head attention mechanism, a residual normalization layer, a forward propagation layer, and a residual normalization layer. The decoder uses a masked self-attention mechanism, a residual normalization layer, an attention mechanism, a residual normalization layer, a forward propagation layer, a residual normalization layer, and a normalization / fully connected layer.
[0196] The residual normalization layer (Residual Normalization Layer) combines residual connection (Residual Connection) and layer normalization (Layer Normalization) and is a key component in deep neural networks for stabilizing and accelerating training. In the forward propagation process, the input is first passed through a sub-layer such as a self-attention mechanism or a forward propagation layer, then the output after the sub-layer is added to the original input to form a residual connection, and finally the layer normalization is performed. This structure not only helps to alleviate the problem of gradient disappearance, but also enables the network to learn more complex function mappings while maintaining the stability of the gradient. Specifically, its formula can be expressed as:
[0197] LayerNorm(x+Sublayer(x)) (17)
[0198] where x is the input, Sublayer(x) represents the output after passing through a sublayer (such as a self-attention layer or a feed-forward layer), and LayerNorm represents the layer normalization operation.
[0199] Layer normalization normalizes the features of each sample to ensure that they have zero mean and unit variance. The formula for layer normalization is as follows:
[0200] (18)
[0201] where: and are the mean and variance of x, respectively, is a very small constant for numerical stability, and γ and β are learnable parameters for scaling and shifting the normalized values.
[0202] The feed-forward layer is a core fully connected neural network component in the Transformer architecture, which acts on each position of the sequence independently and shares parameters; the typical structure of this layer includes two linear transformations, with a nonlinear activation function (commonly ReLU) embedded in between. The core function is to perform deep transformation and reinforcement on the input features, thereby improving the feature representation ability of the model. It is worth noting that although the data at each position is transformed by the same weight matrix, the entire transformation process is performed in parallel and independently, which can effectively improve the capacity and representation flexibility of the model while preserving the inherent structure information of the sequence. Its formula can be expressed as:
[0203] FFN(x) = max(0, xW1+b1)W2+b2(19)
[0204] where x is the input, W1 and b1 are the weight matrix and bias of the first linear transformation; W2 and b2 are the weight matrix and bias of the second linear transformation; max(0, ·) represents the ReLU activation function.
[0205] According to the description of the basic architecture of the Transformer, we get Figure 3 The overall framework of unit photovoltaic power prediction. In this figure, the input model data includes irradiance, historical unit photovoltaic power, and time feature labels, and the unit photovoltaic power model is trained. The specific modeling steps are as follows:
[0206] 1. After inputting the relevant meteorological factors, construct a normalization module;
[0207] 2. Construct and initialize the multi-head attention mechanism, including the initial weights and biases.
[0208] 3. Build an embedding layer, including a value embedding layer, a position embedding layer, and a time embedding layer;
[0209] 4. Build a residual normalization layer;
[0210] 5. Build a forward propagation layer, and again pass through the residual normalization layer to achieve model stability for training;
[0211] During the training and prediction process, rolling prediction is required, predicting one future power time point for every four historical data points; the above construction process is the entire process of the Transformer model encoder.
[0212] 4) Prediction result analysis; use multiple different evaluation indicators (such as mean absolute error (MAE), root mean square error (RMSE)) to verify the performance of the unit photovoltaic power prediction model and the available installed capacity prediction model; through different lead prediction lengths (10min-60min) and random time point tests, verify the stability and generalization ability of the model in the snow-covered scene.
[0213] 5) Build a snow-covered scene photovoltaic output guarantee support framework; based on accurate prediction results, quantify the photovoltaic power fluctuation amplitude and capacity loss degree caused by snow cover, provide ultra-short-term output reference for grid dispatching, reduce the impact of power sudden changes on grid supply and demand balance, and provide data support for photovoltaic station operation and maintenance strategy formulation, reduce unplanned power generation loss.
[0214] This embodiment selects examples to analyze the prediction model.
[0215] Select the measured data of the photovoltaic device on the top of a certain university ERC building for example analysis, the data set covers photovoltaic power data, synchronous weather data and snow-covered photovoltaic panel image data, through unified time resolution, linear interpolation and screening of snowfall-snow-melting complete process data, etc. Processing ensures the effectiveness and scene representativeness of the data. The machine configuration and model key parameters used in the experiment are optimized and set, providing stable support for model training and prediction.
[0216] The experimental design adopts the logic of "first benchmark verification, then scene adaptation", first compares the Transformer unit photovoltaic power prediction model with FAN_Transformer, Informer, LSTM and other mainstream time series prediction models in normal weather scenarios, and then carries out available installed capacity prediction and total power prediction verification in snow-covered scenes. The selection of comparison models covers different architecture types, which can fully verify the advantages of the proposed model in time series dependence and weather dependence mining; the test scene includes 10min-60min gradient lead prediction and random time point test, which fully tests the stability and generalization ability of the model.
[0217] The unit power prediction results of FIGS. 6-11 show that the proposed Transformer model can effectively capture the periodicity and meteorological correlation of photovoltaic power generation by virtue of multi-dimensional embedding layers (value embedding, position embedding, and time embedding) and an encoder-decoder architecture, and the prediction errors (MAE and RMSE) are significantly lower than those of the comparative models, and the performance is better in the scene of severe data fluctuation and meteorological mutation. The available installed capacity prediction results of FIG. 12 show that the centroid extrapolation method can effectively deal with the small sample problem of the snow-covered image, realize reliable prediction of the available installed capacity in the next 4 hours, and verify the practicability of the method in the small sample scene. Figures 13-15 The snow-covered total power prediction results show that through the dual-module collaborative architecture of unit power prediction and available capacity prediction, the proposed method has a higher fitting degree of the prediction curve to the actual power, and even in long-term advanced prediction, the discrete degree of the scatter points is significantly lower than that of the comparative models, which can accurately capture the low output characteristics of power caused by snow cover.
[0218] The example analysis fully verifies that the proposed method: the Transformer model exhibits better time series and meteorological feature mining capability in unit power prediction, the centroid extrapolation method solves the small sample prediction problem in the snow-covered scene, the dual-module collaborative architecture effectively adapts to the strong volatility of photovoltaic power under snow-covered conditions, and the overall prediction accuracy and scene adaptability are far superior to existing comparative models, providing a reliable solution for photovoltaic power prediction under snow-covered conditions.
[0219] Embodiment 2
[0220] A photovoltaic power station power generation power ultra-short-term prediction system considering snow cover caused capacity loss, comprising:
[0221] A data acquisition and processing module: synchronously acquires historical power generation data, meteorological data, and snow-covered state photovoltaic panel image data of a photovoltaic station; performs Gaussian normalization processing and Pearson correlation analysis on the meteorological data to automatically screen key influence factors; performs installed capacity normalization conversion on the power generation data to unify the data scale; automatically completes interactive segmentation, grayscale processing, median filter denoising, binary segmentation, and image splicing according to a preset process, accurately counts the pixel ratio of the snow-covered area and the total area of the photovoltaic panel, and outputs standardized data for calling by subsequent modules.
[0222] An available installed capacity prediction module: based on the image processing results, an effective photovoltaic panel area ratio index is constructed, the available installed capacity is calculated in combination with the rated installed capacity, the centroid extrapolation algorithm is adopted, the snow-covered area ratio small sample data is received, the data centroid and the change rate are automatically calculated, the available installed capacity in the next 4 hours is extrapolated and predicted, and a dynamic capacity prediction sequence is output.
[0223] Unit power prediction module: an independent prediction unit is constructed based on a Transformer architecture, receives key meteorological features, historical power data and normalized timestamp features, completes feature fusion through a multi-dimensional embedding layer, uses an encoder-decoder architecture and a self-attention mechanism to mine time series and meteorological dependencies, and outputs unit power prediction results.
[0224] Dual-module fusion prediction module: receives unit power prediction results and available installed capacity prediction sequences, completes fusion of the two results through multiplication operation, generates total power prediction values of a photovoltaic power station under a snow-covered condition, and outputs to an evaluation module.
[0225] Model prediction effect evaluation module: configured to take mean absolute error (MAE) and root mean square error (RMSE) as core evaluation indexes to carry out two-dimensional performance verification; on one hand, the unit power prediction model is horizontally benchmarked with mainstream time series models such as FAN_Transformer and Informer, and the numerical accuracy of the available installed capacity prediction model is verified; on the other hand, a multi-scenario test scheme is designed, gradient advanced prediction of 10min-60min is covered, and random time points are selected for testing, and the system verifies the running stability and generalization adaptation ability of the model under the snow-covered special scene.
[0226] Snow-covered scene photovoltaic output guarantee support module: configured to quantify the photovoltaic power fluctuation amplitude and capacity loss scale caused by snow cover based on the accurate prediction results output by the model; provide high-credibility ultra-short-term output data support for the grid dispatching center, help to develop targeted dispatching strategies, and weaken the disturbance of power mutation on the balance between supply and demand of the power grid; provide quantitative basis for photovoltaic station operation and maintenance decision, assist in optimizing snow melting arrangement and other operation and maintenance schemes, maximize the reduction of unplanned power generation loss, and guarantee the stable and reliable output of photovoltaic systems under extreme snow weather.
[0227] Embodiment 3
[0228] A computer readable storage medium having a program stored thereon, the program being executed by a processor to implement the steps of the method for ultra-short-term prediction of power generation of a photovoltaic power station considering capacity loss caused by snow cover according to the embodiment 1 of the present application.
[0229] Embodiment 4
[0230] An electronic device comprising a memory, a processor, and a program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for ultra-short-term prediction of power generation of a photovoltaic power station considering capacity loss caused by snow cover according to the first aspect of the present application when executing the program.
[0231] The above describes the specific embodiments of the present application in combination with the drawings, but is not a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications or variations made by those skilled in the art on the basis of the technical solutions of the present application without creative labor are still within the protection scope of the present application.
Claims
1. A method for ultra-short-term forecasting of photovoltaic power generation considering capacity loss due to snow cover, characterized in that, The steps include the following: 1) Data collection and processing; collecting historical power generation data of photovoltaic power plants, synchronous meteorological data, and snow-covered photovoltaic panel image data; 2) Design indicators for snow-covered scene identification and available capacity calculation; construct an available installed capacity prediction model based on the centroid extrapolation method, and use small sample snow-covered area ratio data to extrapolate and predict future available installed capacity. 3) Construct a unit photoelectric power prediction model based on Transformer, input meteorological features, historical power data and normalized timestamp features into a multi-dimensional embedding layer, and mine temporal dependence and meteorological dependence through encoder-decoder architecture and self-attention mechanism; Predicting unit photoelectric power The available installed capacity prediction model in step 2) and the unit photovoltaic power prediction model in step 3) are combined into a dual-module collaborative prediction model. Based on the prediction results of the two models, the unit photovoltaic power is... With predicted effective installed capacity Multiply to obtain the photoelectric power in the snow-covered scene. , which represents the predicted total power generation; 4) Prediction result analysis; The performance of the unit photoelectric power prediction model and the available installed capacity prediction model were verified by using different evaluation indicators; The stability and generalization ability of the model in the snow-covered scenario were verified by testing with different lead prediction durations and random time points. 5) Based on the prediction results, the amplitude of photovoltaic power fluctuation and the degree of capacity loss caused by snow cover are quantified to provide ultra-short-term output reference for grid dispatch.
2. The ultra-short-term power generation prediction method for photovoltaic power plants considering capacity loss due to snow cover as described in claim 1, characterized in that, In step 1), the meteorological data specifically includes temperature, irradiance, rainfall, wind speed, surface pressure, direct irradiance, and diffuse irradiance. Gaussian normalization and Pearson correlation analysis are performed on the meteorological data to identify key factors strongly correlated with power generation: irradiance, temperature, direct irradiance, and diffuse irradiance. Power generation data is normalized using installed capacity: the actual power generation of the photovoltaic power station is divided by the station's rated installed capacity to obtain the power generation per unit installed capacity. Image data is then processed through interactive segmentation, grayscale conversion, median filtering, binarization, and stitching to identify snow-covered and non-snow-covered areas. The pixel ratio of snow-covered areas to the total photovoltaic panel area is calculated, and the effective power generation area ratio is obtained by quantifying the ratio.
3. The ultra-short-term power generation prediction method for photovoltaic power plants considering capacity loss due to snow cover as described in claim 2, characterized in that, In step 1), the interactive image segmentation separates the foreground and background specified by the user using the interactive information provided by the user; the GrabCut algorithm is used to extract the foreground and background from the image; this algorithm models the image as a weighted undirected graph, with pixels as nodes of the graph and the weights of the edges representing the similarity between pixels; A Gaussian mixture model is used to describe the color distribution of the foreground and background; finally, the maximum flow / minimum cut algorithm is used to optimize the segmentation results. Specific algorithm steps: 1-1. Initialize the bounding box. The area inside the box is the foreground, i.e. the target to be segmented, and the area outside the box is the background. All pixels are initialized with four types of labels, including GC_BGD (determines the background) = 0, GC_FGD (determines the foreground) = 1, GC_PR_BGD (may be the background) = 2 and GC_PR_FGD (may be the foreground) = 3. 1-2. Fit a Gaussian Mixture Model (GMM) to each foreground and background pixel respectively, i.e.: (1) (2) In the above formula, K is the Gaussian component number of the GMM, and π k The weight of the k-th Gaussian component is N(x | μ). k ,∑ k ) is a normal distribution, μ k It is the mean, ∑ k It is the covariance matrix; 1-3. Construct an energy function to achieve foreground and background segmentation by minimizing the following energy function: E(L,θ, z) = U (L,θ, z) + V (L,z)(3) Where L represents the label of each pixel, θ represents the parameters of the Gaussian mixture model, z represents the image pixel value, U(L,θ,z) represents the data term, V(L,z) is used to measure the cost of a pixel belonging to the foreground or background, represents the smoothing term, and is used to measure the similarity between adjacent pixels. In formula (3), the data term U (L,θ, z) represents the cost of a pixel belonging to the foreground or background: U (L i ,θ, with i ) = -logP(z i | L i ,θ)(4) In the formula, P(z) i | L i ,θ) is the pixel value z i Probability density in Gaussian mixture models; In formula (3), the smoothing term V(L,z) is used to measure the boundary information between pixels, encouraging adjacent pixels to have similar labels: (5) in, It is a set of adjacent pixels. It is the color difference between pixel i and pixel j. It is a coefficient used to adjust color differences, γ is the weight of the smoothing term, [L i ≠L j ] is an indicator function, indicating that when the labels of pixel i and pixel j are different (L i ≠L j When the condition is met, the indicator function takes the value 1; otherwise, it takes the value 0. Grayscale conversion is the process of converting a color image into a grayscale image. In a grayscale image, each pixel value represents only the brightness intensity, and this is achieved by weighted synthesis of the values of the red, green, and blue channels. The grayscale value is calculated using the weighted average method, and the specific calculation formula is shown below: Gray=0.299·R + 0.587·G + 0.114·B (6) In equation (6), R, G, and B are the pixel values of the red, green, and blue channels, respectively; Median filtering is used to smooth images and preserve edge details by replacing the current pixel value with the median value within the pixel's neighborhood. Specifically, for each pixel in the image, all pixel values within a window centered on that pixel are extracted; these pixel values are sorted in ascending order; and the median of the sorted values is used to replace the current pixel value. Binarization transforms a grayscale image into a binary image containing only two pixel values. Based on a set threshold, pixels are divided into foreground and background categories. Methods include global thresholding or adaptive thresholding. This invention introduces a global thresholding method, which uses a fixed threshold T to binarize the entire image; specifically, it utilizes the Otsu algorithm to maximize the inter-class variance. To find the optimal threshold T * The formula is as follows: (7) in: The weights (pixel count percentages) of the two types of pixels are determined separately. These are the average grayscale values of the two types of pixels. It is the average gray value of the entire image; Otsu's algorithm finds the threshold T that minimizes the inter-class variance by iterating through all possible thresholds T. Maximum threshold: (8); Image stitching is the process of seamlessly stitching together the valid photovoltaic panel images that have been interactively segmented and filtered to form a complete image of the target photovoltaic panel area, which can be used to expand the image field of view or to construct a panoramic view.
4. The ultra-short-term power generation prediction method for photovoltaic power plants considering capacity loss due to snow cover as described in claim 1, characterized in that, In step 2), firstly, the total number of pixels in all photovoltaic panel areas in the target photovoltaic panel area image after stitching is counted; then, the snow-covered area is identified through binarization processing, and based on the image processing results, the number of white pixels is counted as the snow-covered area. Based on the pixel ratio of snow-covered area to total area, the ratio of the effective power generation area of the photovoltaic panel to the total area of the target photovoltaic panel is calculated. Based on the rated installed capacity, the actual available installed capacity under snow cover conditions can then be calculated. ; (9) In the formula, C represents the total rated installed capacity; It is the area ratio of the effective power generation area, specifically referring to the effective power generation area S of the photovoltaic panels under snow cover conditions. e The ratio of the total area S to the total area S; where S e =SS c S c This represents the actual snow-covered area of the photovoltaic panel; however, direct calculation using image analysis only yields the area S of the snow pixels in the image. w This also indirectly yields the pixel area S of the black image. b =SS w After calculation using the formula, we obtain... ; (10) In the formula, Focus on the total area of the photovoltaic panels in the image; The predicted area ratio is obtained by using the centroid extrapolation method with a small amount of data. Subsequently, the predicted effective installed capacity under snow cover was calculated using formula (9). In time series forecasting, assume there is a series of observations y1, y2, ..., y3. n The corresponding time points are t1, t2, ...,t n Its center of mass is located at: (11) First calculate the trend of the centroid's change, then predict the future value: , It is the rate of change and is obtained by calculating the growth rate or trend of historical data; Basic implementation steps of the centroid extrapolation method: 2-1. Data Preparation: Using the time and area ratio datasets as (x, y) coordinates, construct a time series dataset; 2-2. Calculate the centroid: For data within a time period, calculate the centroid; the centroid calculation is based on the following formula: the centroid coordinates are ( ), where x i It is time, y i It is the area ratio, and n is the number of data points; 2-3. Calculate the rate of change of the centroid: Based on the position of the centroid over a previous period, calculate the rate of change of the centroid, i.e., the slope. If the data shows a linear trend, calculate the rate of change of the centroid through linear regression. If the centroid shows a non-linear trend, use the sliding window local linear fitting method to calculate the rate of change: With the current data point as the center, set a sliding window of 3-5 data points, and fit the local linear trend of the data in each window using the least squares method to obtain the rate of change of the centroid within the window. 2-4. Extrapolation Prediction: Based on the rate of change of the centroid, extrapolate the future position of the centroid to obtain the predicted area ratio. Then, the result is estimated using formula (9). .
5. The ultra-short-term power generation prediction method for photovoltaic power plants considering capacity loss due to snow cover as described in claim 1, characterized in that, In step 3), the Transformer includes an embedding layer, an encoder, and a decoder, where both the encoder and decoder utilize multi-head self-attention to focus on different parts of the sequence; The Transformer's embedding layers include value embedding layers, position embedding layers, and time embedding layers; The value embedding layer is built on a one-dimensional convolutional neural network to extract local features from the input sequence. The value embedding uses Kaiming initialization to ensure training convergence and is suitable for time series prediction tasks that need to capture short-term dependencies and process periodic data. This part of the local features includes irradiance, temperature, direct irradiance, diffuse irradiance and historical photoelectric power data, which are Gaussian normalized at the input. The location embedding layer is used to add data location information to the input sequence. The location encoding is constructed using sine and cosine functions, where the wavelength increases exponentially with the dimension, as shown in the following equation: (12) (13) In the formula: P s d is the location index of the meteorological sequence input; d is the dimension of the location vector; i is the vector dimension; P E (P s ,2i) and P E (P s ,2i+1) are the position coding formulas for even or odd positions of the meteorological sequence position index; The time embedding layer decomposes and encodes the original timestamp into a multi-period standardized feature vector containing the number of days within the year, month, week, and day, and converts it into a high-dimensional vector representation. This provides the model with a temporal context label for the input data. Considering the original time feature label, the construction method is as follows: for a certain time dimension, the corresponding standardized feature value is calculated using the following formula: (14) Where x is the original time dimension value, a is the minimum value of the time dimension, and b is the maximum value of the time dimension. Formula (14) standardizes x to the interval [-0.5, 0.5]. The time feature marking method used maps a single timestamp to a feature vector, and the time level is divided into the number of days in the year, the number of days in the month, the number of days in the week, and the number of hours in the day; that is, each timestamp corresponds to a time mark feature vector M=[y m ,y w , y d , y h In M, the subscript letters correspond to time feature information, representing month, week, day, and hour respectively; the value of each feature is categorized into values between [-0.5, 0.5]. All data features at each moment are combined to form a vector as the data label for that moment, which, together with the value embedding layer and the location embedding layer, forms the embedding layer data input into the Transformer model. All data features at each moment include: filtered meteorological features, historical unit power generation data, and normalized time feature vector; Both the encoder and decoder share a core self-attention mechanism. The decoder employs a masked self-attention mechanism, which restricts the model to only acquiring temporal information preceding that position when predicting the output at a certain location. The calculation method for this self-attention mechanism is as follows: (15) In the formula, Attention(·) represents the self-attention calculation function; Q, K, and V represent the query vector matrix, key vector matrix, and value vector matrix, respectively; T represents the transpose; d K The dimension of the key vector; softmax(·) represents the normalization function; Multi-head attention enables the model to focus on subspaces at different locations from information from different representations. Equation (16) illustrates the principle of the multi-head attention mechanism: (16) in , , and It is a weight parameter matrix; The encoder includes a multi-head attention mechanism, a residual normalization layer, a forward propagation layer, and a residual normalization layer; the decoder uses a masked self-attention mechanism, a residual normalization layer, an attention mechanism, a residual normalization layer, a forward propagation layer, a residual normalization layer, and a normalization / fully connected layer. The residual normalization layer combines residual connections and layer normalization. During forward propagation, the input first passes through a sub-layer, such as a self-attention mechanism or a forward propagation layer. Then, the output of the sub-layer is added to the original input to form a residual connection. Finally, it undergoes layer normalization. Specifically, its formula can be expressed as: LayerNorm(x+Sublayer(x)) (17) Where x is the input, Sublayer(x) represents the output after passing through the sublayer, and LayerNorm represents the layer normalization operation; Layer normalization normalizes the features of each sample. The formula for layer normalization is as follows: (18) in: and These are the mean and variance of x, respectively. It is a very small constant used for numerical stability, and γ and β are learnable parameters used for scaling and offset normalized values; The forward propagation layer acts on each position of the sequence independently and with shared parameters; the structure of this layer includes two linear transformations with a non-linear activation function embedded in between, as expressed in the formula: FFN(x) = max(0, xW1+b1)W2+b2(19) Where x is the input, W1 and b1 are the weight matrices and biases of the first linear transformation; W2 and b2 are the weight matrices and biases of the second linear transformation; max(0,·) represents the ReLU activation function; During training and prediction, rolling prediction is required, predicting a future power time point every four historical data points; the above construction process is the entire process of the Transformer model encoder.
6. The ultra-short-term power generation prediction method for photovoltaic power plants considering capacity loss due to snow cover as described in claim 1, characterized in that, In step 4), the advance prediction duration ranges from 10 min to 60 min.
7. A photovoltaic power generation power prediction system that considers capacity loss caused by snow cover, characterized in that, include: Data acquisition and processing module: synchronously acquires historical power generation data of photovoltaic power plants, meteorological data, and image data of photovoltaic panels under snow cover; performs Gaussian normalization and Pearson correlation analysis on meteorological data to screen key influencing factors; The installed capacity is normalized and converted to a uniform data scale for power generation data; interactive segmentation, grayscale processing, median filtering and noise reduction, binarization and image stitching are completed for image data according to a preset process; the pixel ratio of snow-covered area to total photovoltaic panel area is calculated; and standardized data is output for subsequent modules to call. Available installed capacity prediction module: Based on image processing results, construct the effective power generation area ratio index of photovoltaic panels, calculate the available installed capacity in combination with the rated installed capacity, adopt the centroid extrapolation algorithm, receive small sample data of snow-covered area ratio, calculate the data centroid and rate of change, extrapolate and predict the available installed capacity in the future, and output dynamic capacity prediction sequence. Unit photoelectric power prediction module: Based on the Transformer architecture, an independent prediction unit is built. It receives key meteorological features, historical power data and normalized timestamp features, completes feature fusion through multi-dimensional embedding layers, and uses encoder-decoder architecture and self-attention mechanism to mine the time series and meteorological dependencies, and outputs the unit photoelectric power prediction results. Dual-module fusion prediction module: Receives the unit photovoltaic power prediction result and the available installed capacity prediction sequence, and completes the fusion of the two results through multiplication to generate the total power generation prediction value of the photovoltaic power station under snow cover conditions, and outputs it to the evaluation module; Model prediction performance evaluation module: It is configured to conduct two-dimensional performance verification with mean absolute error and root mean square error as the core evaluation indicators. On the one hand, it benchmarks the unit photoelectric power prediction model with other mainstream time series models, and verifies the numerical accuracy of the available installed capacity prediction model. On the other hand, it designs a multi-scenario test scheme, and conducts tests by covering gradient lead prediction from 10 min to 60 min and selecting random time points to verify the model's operational stability and generalization adaptability in the special snow-covered scenario.
8. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, implements the steps in the ultra-short-term power generation prediction method for a photovoltaic power plant considering capacity loss due to snow cover as described in claim 1.
9. An electronic device, characterized in that, It includes a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the ultra-short-term power generation prediction method for a photovoltaic power plant considering capacity loss due to snow cover as described in claim 1.
Citation Information
Patent Citations
Photovoltaic power prediction method and device based on snowfall weather
CN117498310A
Optical power prediction method and system considering photovoltaic panel snow covering
CN119231526A