CN112507793B - Ultra-short term photovoltaic power prediction method - Google Patents

Ultra-short term photovoltaic power prediction method Download PDF

Info

Publication number
CN112507793B
CN112507793B CN202011225477.1A CN202011225477A CN112507793B CN 112507793 B CN112507793 B CN 112507793B CN 202011225477 A CN202011225477 A CN 202011225477A CN 112507793 B CN112507793 B CN 112507793B
Authority
CN
China
Prior art keywords
cloud
matrix
gray
points
clear sky
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011225477.1A
Other languages
Chinese (zh)
Other versions
CN112507793A (en
Inventor
余光正
汤波
陆柳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Electric Power University
Original Assignee
Shanghai Electric Power University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Electric Power University filed Critical Shanghai Electric Power University
Priority to CN202011225477.1A priority Critical patent/CN112507793B/en
Publication of CN112507793A publication Critical patent/CN112507793A/en
Application granted granted Critical
Publication of CN112507793B publication Critical patent/CN112507793B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/13Satellite images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/211Selection of the most significant subset of features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/247Aligning, centring, orientation detection or correction of the image by affine transforms, e.g. correction due to perspective effects; Quadrilaterals, e.g. trapezoids
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Abstract

The invention relates to an ultra-short term photovoltaic power prediction method, which uses a longitude and latitude correction method to correct a fish-eye cloud picture; rapidly extracting characteristic points from the ground cloud image sequence by adopting an HSV-SURF algorithm; rapidly matching and correcting the characteristic point pairs, and extracting and predicting cloud cluster motion trail; the cloud cluster is extracted in a refined mode by using an improved threshold segmentation method, and an irradiation coefficient for visually representing irradiance conditions at the next moment is provided; establishing an ultra-short-term photovoltaic power prediction model based on an improved IAM-CNN-LSTM hybrid neural network; initializing the weight of the hybrid neural network, and setting the maximum iteration times; building a convolutional neural network and inputting a feature matrix into a model; optimizing a network structure by using a control variable method; if the maximum iteration times are reached, iteration ends to output network parameters; and carrying out ultra-short-term power prediction by using the trained composite network, and obtaining the predicted power of the time point to be predicted. Compared with the prior art, the method has the advantages of improving the prediction precision and the like.

Description

Ultra-short term photovoltaic power prediction method
Technical Field
The invention relates to the technical field of ultra-short-term photovoltaic power prediction of a centralized photovoltaic power station, in particular to an ultra-short-term photovoltaic power prediction method.
Background
Along with the continuous improvement of solar energy development and utilization level, the proportion of the photovoltaic connected into the power grid is increased increasingly, and the grid connection of large-scale photovoltaic is easy to cause fluctuation of voltage, current and frequency of the power grid due to instability of output, so that the electric energy quality of the power grid is affected. In order to eliminate the adverse effects, it is important to improve the photovoltaic power prediction accuracy. Accurate centralized photovoltaic power prediction is an important means to improve the operational stability of the power system and the photovoltaic power consumption capability. The generated power of the centralized photovoltaic power station shows strong volatility and randomness due to the influence of a plurality of meteorological factors and environmental factors. And the distribution and movement change of the cloud and the difference of radiation attenuation caused by different characteristic clouds are the strong correlation influence factors causing uncertainty of photovoltaic power change.
The photovoltaic power generation power rapidly and severely fluctuates in minute scale due to the shielding of the solar radiation by the movable cloud cluster, and huge impact can be brought to the stability of a power grid. Traditional photovoltaic power prediction models based on historical power data of photovoltaic power stations and numerical weather forecast are limited by algorithm principles and data precision, and accurate prediction of minute-level power fluctuation caused by cloud cluster movement is difficult. Therefore, a photovoltaic power prediction method suitable for 'minute-scale' weather change needs to be further searched for aiming at traditional 'ultra-short term' prediction. In particular, in certain weather conditions such as cloudiness, the surface irradiance level is affected by the moving cloud and exhibits dramatic fluctuations within a minute time scale. At this time, however, irradiance fluctuations have little correlation with the historical irradiance data. In summary, the above phenomena present challenges to minute-scale meteorological feature extraction and prediction. The sky observer is currently the main stream equipment applied to minute-level photovoltaic prediction, and students at home and abroad use the sky observer to shoot clouds in the sky to obtain visual cloud characteristics, and on the basis, ultra-short-term photovoltaic power is predicted.
The prior art mainly adopts the following methods: extracting atmospheric radiation data through ground cloud image processing, and predicting irradiance by using a radial basis function neural network, wherein the method lacks of fine extraction and description on cloud clusters and movement thereof, ignores influence factors such as air temperature, aerosol concentration and the like, and causes larger prediction error; the prediction method combining numerical weather forecast and ground cloud image processing is adopted, so that the photovoltaic prediction precision is improved to a certain extent, but photovoltaic power mutation possibly caused by movement cloud clusters is ignored, and the power prediction precision under the weather type of multiple movement cloud clusters is required to be improved; through cluster analysis of sky image data, a surface illuminance mixed mapping model based on a deep learning method is established, but the method lacks a prediction mechanism for irradiance mutation, so that the prediction precision is lower under the condition of irradiance variation; in summary, photovoltaic power prediction based on ground cloud pictures has become a hotspot for domestic and foreign scholars to study in recent years, but there is a certain improvement space. Particularly, the ultra-short term photovoltaic power prediction accuracy can be improved on the basis of considering the aspects of motion cloud fine extraction and description, establishment of irradiance mutation prediction mechanism and the like. In the aspect of the prediction method, the prior art mainly adopts the following methods: the ultra-short-term photovoltaic power prediction method based on the variational modal decomposition combined with the deep echo state network mixed model is provided for predicting photovoltaic power, but the prediction steps and the network complexity are too high, so that the prediction efficiency under different scenes with multiple characteristic sample sets is required to be improved; a mixed model short-term load prediction method based on a Convolutional Neural Network (CNN) and a long-short-term memory network (LSTM) is adopted to improve prediction accuracy to a certain extent, but the method simply combines the CNN and the LSTM, destroys a characteristic matrix time structure, weakens inherent correlation among characteristic time sequences, and leads to poor overall prediction accuracy.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide an ultra-short-term photovoltaic power prediction method, which is used for realizing photovoltaic ultra-short-term prediction based on an improved neural network extracted from cloud image features, can further improve model prediction capability and is beneficial to improving coping capability for irradiance mutation.
The aim of the invention can be achieved by the following technical scheme:
an ultra-short term photovoltaic power prediction method, comprising the steps of:
s1: and (3) acquiring a satellite visible light fish-eye cloud picture, correcting the fish-eye cloud picture by adopting a longitude and latitude correction method, acquiring a corrected ground-based cloud picture sequence, and extracting color cloud picture feature points from the ground-based cloud picture sequence.
S2: and (3) obtaining characteristic point pairs by utilizing a FLANN algorithm matching step S1, filtering cloud image characteristic points by utilizing an improved IRANSAC algorithm to obtain a characteristic point set with bad points removed, and calculating a characteristic point coordinate transformation matrix by utilizing the cloud image characteristic point coordinate matching condition of adjacent time points to obtain a cloud cluster motion trail.
S3: and (3) carrying out segmentation and extraction on the cloud cluster, and utilizing an irradiation coefficient for intuitively representing the irradiance condition at the next moment to represent the irradiance level under the cloud layer distribution.
S4: and extracting historical meteorological data, constructing an input feature matrix, and establishing an ultra-short-term photovoltaic power prediction model based on the improved IAM-CNN-LSTM hybrid neural network.
S5: initializing the weight of the neural network and setting the maximum iteration times.
S6: and constructing a convolutional neural network, intercepting a feature input matrix by a sliding time window method from the feature matrix, and inputting CNN to perform feature extraction.
S7: inputting the time sequence characteristics extracted by the CNN into an improved Attention mechanism combining with a CRS algorithm, endowing transition characteristic vectors of a neural network model with different weights, inputting the transition characteristic vectors subjected to weight management into an LSTM layer according to time steps, outputting training results of an improved IAM-CNN-LSTM hybrid neural network, reading training loss curves and error curves, observing longitudinal distances of the training set and verification set loss curves in the convergence process, and intuitively evaluating the convergence performance of the network prediction results by combining absolute error conditions of the training set and the verification set.
S8: judging whether the current iteration number reaches the maximum iteration number, if so, ending the iteration, outputting the improved IAM-CNN-LSTM network parameter, otherwise, adding one to the iteration number, and turning to the step S4.
S9: and carrying out ultra-short-term photovoltaic power prediction by utilizing the improved IAM-CNN-LSTM network trained by the steps to obtain predicted power.
In the step S1, the HSV-SURF algorithm is adopted to rapidly extract the characteristic points of the color cloud image, and the specific steps include:
11 Extracting characteristic points of the color cloud picture by using a SURF algorithm;
12 HSV color space conversion is carried out on the extracted characteristic points of the color cloud picture, and a characteristic point coordinate transformation matrix is obtained;
13 Utilizing the Haar wavelet characteristics in the circular neighborhood of the statistical characteristic points and describing the characteristic points of the color cloud picture by combining the combined characteristics of HSV color information.
In step S2, the specific step of filtering the cloud image feature points by using the modified IRANSAC algorithm includes:
21 Eliminating the characteristic point matching pairs with the number of intersecting points greater than 3 with other matching pairs from the matching pair set by utilizing the FLANN algorithm;
22 Matching the remaining feature points according to the ratio (D) ij /D ij′ ) Incrementally sorting, forming a feature point matching pair set P, wherein D ij For the minimum value of Euclidean distance in the feature point matching, D ij′ The Euclidean distance is the rest point pairs;
23 Dividing the feature point matching pair set P into F in order 1 、F 2 、F 3 、F 4 Four parts, from F 1 Sequentially extracting 5 sample data, and solving the characteristic point coordinate transformation matrix M obtained in the step 12);
24 If F 1 If the error between the rest matching point pair and M is smaller than the appointed threshold T, judging that the matching point pair and the extracted sample are the same set;
25 Traversing F) by adopting a characteristic point coordinate transformation matrix M 1 Corresponding matching points in (a) and calculating a set F 1 The matching point pairs in the set satisfy the proportion S of the transformation matrix under the threshold value, the steps are repeated, and the transformation matrix of the characteristic point with the largest S is selected as M to be used as the final transformation matrix.
In step S3, an improved threshold segmentation method is adopted, multiple thresholds are set according to a historical clear sky picture matched with a current clear sky pixel to extract cloud clusters in a refined mode, and irradiance levels under cloud layer distribution are represented by irradiation coefficients visually representing irradiance conditions at the next moment. The specific content of refined cloud cluster extraction by adopting the improved threshold segmentation method is as follows:
firstly, carrying out cloud image inspection according to the gray level of a historical clear sky picture matched with a current clear sky pixel, and selecting cloud cluster data at all moments according with inspection and judgment bases, wherein the inspection and judgment bases are as follows:
(0.95×GRAY t )<GRAY history <(1.05×GRAY t )
wherein: GRAY history Removing the gray average value of the picture after the sun and the surrounding difficult-to-distinguish areas of the sun and the surrounding of the sun for the historical clear sky picture; GRAY t The gray average value of the background clear sky area at the moment t;
setting a thin cloud threshold and a thick cloud threshold, and further extracting thin cloud and thick cloud from cloud cluster data conforming to the inspection and discrimination basis:
311 Setting a portion of the solar peripheral area higher than the set thin cloud threshold as an extraction error area, and filling and replacing the extraction error area with black pixels;
312 Calculating GRAY values GRAY (x, y) of all pixel points, and selecting GRAY values of clear sky images matched with the cloud images at the moment in the clear sky image set, namely selecting a GRAY average value GRAY of the pictures after removing the sun and surrounding difficult-to-distinguish areas of the historical clear sky images history Gray mean value GRAY of clear sky area with background at moment t t The nearest historical clear sky image is compared with the historical clear sky image BASE (x, y), the gray difference D (x, y) between the image and the historical clear sky image is calculated, and the gray difference D (x, y) between the image and the historical clear sky image is compared with a set thick cloud threshold value to distinguish thick cloud pixel points;
313 Introduction of correction factor alpha 1 To the rest of the pixelsThe points are screened and corrected;
314 Using corrected grey-scale difference D 1 And (x, y) comparing with a set thin-cloud gray threshold value to distinguish and obtain thin-cloud pixel points.
The method for calculating the irradiation coefficient for intuitively representing the irradiance condition at the next moment comprises the following steps:
321 After the cloud image is analyzed by an HSV color model, extracting a V value representing the brightness of the image as a direct index for measuring the sky light intensity;
322 According to the gray level graph for distinguishing the thin cloud layer obtained by the improved threshold segmentation method, respectively setting the transmission coefficients of the thin cloud and the thick cloud, establishing a pixel dimension matrix of the picture, respectively assigning the transmission coefficients of the thin cloud and the thick cloud to the corresponding positions of the thin cloud pixel points and the thick cloud pixel points, respectively assigning 1 to the corresponding positions of the clear sky pixel points, and obtaining a transmission coefficient matrix S of the cloud graph at the moment n n And similarly obtaining a cloud picture transmission coefficient matrix S at time n+1 n+1
323 Extracting the pixel point V value of the best-matched all-sky image at the current moment and forming a target matrix V n The matrix order is the same as the picture pixel dimension matrix, in combination with step 322), an irradiance coefficient estimation model is built based on the collection of cloud layer features:
wherein: v ij Is a matrix V n Middle coordinate (i, j) pixel point V value, delta n And taking the ratio of the average V value of the clear sky pixels at the moment n to the average V value of the best-matched clear sky map as the clear sky correction coefficient.
In step S4, the expression of the ultra-short-term photovoltaic power prediction model based on the improved IAM-CNN-LSTM hybrid neural network is as follows:
P(t)=f 1 (P(t-θ),P(t-2θ),...)+E(t)
wherein: p (t) is the output power of the photovoltaic power station at the moment t; f (f) 1 (. Cndot.) is a time-dependent function of the output power of the photovoltaic power plant; θ is the predicted time scale; e (t) is the time error of t.
Further, the step S4 also comprises an optimization step of an ultra-short-term photovoltaic power prediction model based on the improved IAM-CNN-LSTM hybrid neural network, and the specific steps comprise:
a) Providing an improved Attention mechanism combined with a CRS algorithm to guide time sequence weight distribution; specifically:
a1 Providing a weight W of the attention layer;
a2 A) converting the weight W of the provided attention layer into a binary code W B Subset W i For attention weight, transmitting the subset to an LSTM neural network, and generating corresponding loss values in the LSTM neural network according to prediction errors in the network;
a3 According to W) B Selecting an optimal subset of attention weights W for loss conditions of (a) i B Andand repeatedly cycling the subset combinations thereof;
a4 Reconstructing a new attention weight W k B
b) And introducing a Targeted dropout algorithm into the LSTM network, and selectively rejecting neurons. Specifically:
b1 Pruning operation is carried out on LSTM network neurons according to the methods of weight pruning and unit pruning, and the calculation formula is as follows:
wherein: epsilon (W) c (θ)) is a network loss function, W c For the neural network model parameter matrix, argmax-k is a function of returning the largest k elements in all elements, w o For the weight matrix W, the o-th column vector, W io The ith row, the ith column element and the N of the weight matrix col ,N row Representing the number of columns and the number of rows of the parameter matrix respectively;
b2 Introducing a targeting proportion gamma and a deletion probability alpha, selecting the smallest gamma|theta| weights as candidate weights of Dropout, and then independently removing the weights in the candidate set with the deletion probability alpha.
Compared with the prior art, the ultra-short-term photovoltaic power prediction method provided by the invention at least has the following beneficial effects:
1. According to the method, the characteristic points of the color cloud image are extracted by considering the characteristic extraction of the image of the foundation cloud image, the HSV-SURF algorithm is provided, then the FLANN-IRANSAC algorithm is used for matching and correcting the characteristic point pairs, cloud clusters and the motion trail of the cloud clusters in the cloud image are extracted in a refined mode, and further the irradiation coefficient for intuitively representing irradiance conditions at the next moment is introduced, so that the coping capability for irradiance mutation is improved, and the model prediction capability is improved;
2. the invention provides an improved IAM-CNN-LSTM hybrid network prediction model, which provides an improved Attention mechanism combined with a CRS algorithm to fully extract the intrinsic information between historical feature sequences, and is combined with an improved targetted dropout algorithm to be beneficial to fitting and optimizing the hybrid model, so that the prediction precision can be further improved.
Drawings
FIG. 1 is a flow chart of an embodiment of a method for ultra-short term photovoltaic power prediction;
FIG. 2 is a schematic diagram of feature point detection in an embodiment;
FIG. 3 is a schematic diagram of a method for describing cloud image feature points in an embodiment;
FIG. 4 is a schematic diagram of an improved threshold segmentation method calculation flow in an embodiment;
fig. 5 is a schematic flow chart of an improved Attention mechanism combined with CRS in an embodiment.
Detailed Description
The invention will now be described in detail with reference to the drawings and specific examples. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments in accordance with the present disclosure. As used herein, the singular is also intended to include the plural unless the context clearly indicates otherwise, and furthermore, it is to be understood that the terms "comprises" and/or "comprising" when used in this specification are taken to specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
Examples
The invention relates to an ultra-short-term photovoltaic power prediction method, which is based on an improved neural network extracted from cloud image features, considers the characteristics of a foundation cloud image, introduces an irradiation coefficient representing irradiance mutation, establishes an improved neural network ultra-short-term photovoltaic power prediction model extracted from the cloud image features to realize photovoltaic ultra-short-term prediction, and can further improve model prediction capability.
The main principle of the improved neural network ultra-short term photovoltaic power prediction model based on cloud image feature extraction established by the invention is as follows:
in the aspect of the foundation cloud image, the general influence rule of cloud clusters on the illumination level can be intuitively reflected by using the foundation cloud image to extract the real-time illumination condition. In order to improve photovoltaic power prediction accuracy in complex abrupt weather, meteorological information needs to meet data integrity and instantaneity as much as possible. By observing the time sequence diagram set of the foundation cloud image, the cloud and local characteristics of the movable cloud cluster do not change greatly after the position of the cloud cluster moves in a macroscopic manner under the time change scale of 'minute level', and the cloud clusters in the cloud images at adjacent time points generally have high similarity in the local characteristics, so that the cloud clusters can be positioned quickly and accurately by using a characteristic point extraction algorithm. To meet the requirements of the rapidity of the minute-level power prediction, the method is improved based on a rapid improved algorithm of scale-invariant feature transform (cale-invariant feature transform, SIFT), namely an accelerated robust feature (Speeded Up Robust Features, SURF) algorithm. The conventional SURF algorithm converts color information of an image into a gray image for feature point detection and extraction, so that the extracted features are insufficient to describe the entire information of the feature points. In order to consider the rapidity and the high efficiency of a picture processing algorithm, the invention provides a SURF algorithm (HSV-SURF) which considers an HSV color space so as to extract and describe color cloud picture characteristics; and a FLANN-IRANSAC algorithm is provided for quick matching and correction, and cloud cluster motion trail is extracted and predicted; finally, an improved threshold segmentation method is adopted to extract cloud image cloud clusters in a refined mode, an irradiation coefficient for visually representing irradiance conditions at the next moment is provided, and the irradiation coefficient is used as one of input sequences of a prediction algorithm model.
In the aspect of a prediction algorithm, the CNN-LSTM hybrid model faces a feature matrix formed by relatively independent feature sequences, the spatial local correlation features of the CNN extracted data are fully utilized, and the LSTM can overcome the defect that the CNN is difficult to capture long-term dependency relationship in the sequence data. Because the characteristics used for predicting the photovoltaic power, such as temperature, irradiance, irradiation coefficient, cloud cover and the like, are relatively independent characteristic time sequences, the inherent connection among various characteristic time sequences is difficult to describe, and the related characteristics among the sequences and the long-term rule of the characteristic time sequences cannot be extracted simultaneously by using CNN or LSTM singly. The conventional CNN-LSTM network is formed by simply splicing CNN and LSTM, and the correlation between time sequences is easy to break, so that improvement is needed to be made on the basis of the conventional CNN-LSTM network to eliminate the defects.
The CNN-LSTM hybrid model faces a feature matrix formed by relatively independent feature sequences, the spatial local correlation features of the CNN extracted data are fully utilized, and the LSTM can overcome the defect that the CNN is difficult to capture long-term dependency relationship in the sequence data. Taking the photovoltaic power station period electric quantity prediction as an example, since the characteristics for predicting the photovoltaic electric quantity, such as temperature, irradiance, weather fluctuation variable and the like, are relatively independent characteristic time sequences, the inherent relation among various characteristic time sequences is difficult to describe. Aiming at the problems, the invention provides an improved IAM-CNN-LSTM hybrid neural network algorithm, which combines various characteristic sequences of a certain time period and the output electric quantity of a photovoltaic power station of the time period into a characteristic vector for describing the photovoltaic output electric quantity of the time period, and intercepts an input characteristic matrix by using a fixed time interval sliding window method. On the basis of the existing CNN-LSTM model, introducing an Attention mechanism combined with a CRS algorithm, and on the basis, providing a Dropout algorithm suppression model based on a pruning strategy to train and fit.
Based on the principle, the ultra-short-term photovoltaic power prediction method specifically comprises the following steps:
firstly, shooting a 180-degree wide-angle cloud picture by using an SRF-02 full-sky imager without a shielding arm by means of a fisheye lens, and correcting the fisheye cloud picture by using a longitude and latitude correction method, wherein the method is the prior art and is not repeated herein; secondly, aiming at a foundation cloud image sequence (the cloud images after distortion correction are sequentially arranged according to time), the HSV-SURF algorithm is provided for rapidly extracting the characteristic points of the color cloud images, and the specific operation is as follows:
11 Feature point extraction
The detection of the SURF operator is based on a scale space, and a Hessian matrix is used for extracting feature points. The Hessian matrix is the core of the SURF algorithm, and it is assumed that the function f (x, y), the Hessian matrix H is composed of the partial derivatives of the function:
the discriminant of the Hessian matrix is:
the value of the discriminant is the characteristic value of the H matrix, all points can be classified by using the sign of the judging result, and whether the point is an extreme point is judged according to the positive and negative of the discriminant value. In the SURF algorithm, the image pixel I (x, y) is used for replacing f (x, y), a second-order standard Gaussian function is selected as a filter, and a second-order partial derivative is calculated through convolution among specific kernels, so that three matrix elements of an H matrix can be calculated. The Hessian matrix for pixel point I (x, y) of scale k can be defined as:
L (X, t) is a representation of an image at different resolutions, and can be achieved by convolution of the Gaussian kernel G (t) with the image function at point X. g (t) is a gaussian function and t is a gaussian variance.
L(X,t)=G(t)×I(X)
Further solving may obtain an approximation of the Hessian matrix determinant for each pixel:
det(H)=D xx ×D yy -(0.9×D xy ) 2
as shown in fig. 2, taking a 3*3 filter as an example, one of the 9 pixels in the scale layer is compared with the other 8 pixels in the scale layer and the upper and lower two 9 pixels in the scale layer, and if the characteristic value of the pixel marked by the white hollow mark in the figure is larger than that of the surrounding pixels, the characteristic point of the region can be identified. And filtering out key points with weak energy and incorrectly positioned key points, and screening out final stable characteristic points.
12 Feature point color space conversion
The HSV color space is proposed according to the visual characteristics of colors, and is a color description method closest to the human perception mode of colors. Compared with the common RGB color space, the HSV color space can intuitively express the brightness, the tone and the vividness of the colors, and is convenient for comparing the colors. The HSV model has three parameters: hue (H: hue), saturation (S: saturation), brightness (V: value).
The specific steps of converting RGB space into HSV space are as follows:
a) Finding out the maximum value and the minimum value in the R, G, B three variables;
b) Calculating a brightness value according to a brightness principle;
c) Judging that if the maximum value is equal to the minimum value, the point is gray, and the saturation is 0;
d) If the maximum value is not equal to the minimum value, the saturation value is calculated from the brightness.
The specific calculation method for converting RGB space into HSV is as follows:
first, the R, G, B values are normalized to be in the range of [0,1], and three parameters of HSV are respectively:
V=max(R,G,B)
if H < 0, h=h+360. Thus, the above formula is calculated to satisfy the following conditions:
V∈[0,1],S∈[0,1],H∈[0,360]
finally, the values of the three HSV parameters need to be converted into the due data types (cloud image is set as 8-bit image), and the conversion mode is as follows:
V←255V,S←255S,H←H/2
13 Description of feature points
The HSV-SURF algorithm adopts a combined feature description method of the Haar wavelet features in the circular neighborhood of the statistical feature points and combining HSV color information.
As shown in fig. 3, the center point of the left graph is the position of the current feature point, each cell represents a pixel in the scale space where the neighborhood of the feature point is located, the arrow direction represents the gradient direction of the pixel, and the arrow length represents the gradient modulus value. It is weighted with gaussian windows (circular containing areas in the figure). The accumulated value of each gradient direction is plotted on each patch of 4*4 to form a seed point, each feature point consisting of four seed points, each seed point having 8 direction vectors, as shown in the right part of fig. 3.
To sum up, the original SURF feature point descriptor is a 64-dimensional vector, and three parameters of the HSV color space are added to the original SURF feature point descriptor to obtain a new feature point descriptor, which is shown in the following formula:
V HSV-SURF =(V 1 ,V 2 ,…,V 64 ,H,S,V)
wherein: v (V) 1 …V 64 Extracting all characteristic factors for Haar wavelet characteristics in the neighborhood of the characteristic points; h, S, V are parameters that embody HSV color information, respectively.
Step two, a matching method based on a fast nearest neighbor approximation search function library (Fast Approximate Nearest Neighbor Search Library or FLANN) is provided, and a modified random sampling coincidence algorithm (Improved Random Sample Consensus, IRANSAC) is used for fast matching and correcting characteristic point pairs (FLANN is the prior art). Firstly, a FLANN algorithm is utilized to match characteristic point pairs, and then an IRANSAC algorithm is utilized to filter the characteristic points of the cloud picture, so that a characteristic point set for further eliminating bad points is obtained. According to the cloud picture characteristic point coordinate matching condition of adjacent time points, the characteristic point coordinate transformation matrix is calculated, and the obtained transformation matrix pair t is used n-1 Transforming the angular coordinate of the cloud graph to obtain a coordinate at t n Coordinates corresponding to the moment cloud picture.
Analysis of t based on spatial scale invariance of images at front and rear moments n-1 The four coordinate points of the moment cloud picture pass through the transformation matrix at t n Extracting t from the numerical change condition of coordinates corresponding to the moment cloud picture n-1 To t n The movement direction and speed of the cloud cluster at the moment. Because the high air flow movement of the cloud cluster is stable, the moving speed and the moving direction of the cloud cluster can not be suddenly changed in a short time in normal weather, and the invention adopts the current time t n Cloud image and cloud images of 5 time nodes before current time, and t is predicted n+1 Cloud movement speed at time.
Wherein: lambda (lambda) t-i The influence factor of the speed to be pre-speed for the time t-i, v t-i The cloud movement speed at the time t-i.
21 Improved RANSAC algorithm
The purpose of the RANSAC algorithm is to find an optimal parameter matrix, so that the number of feature points meeting the matrix is the greatest:
in (x) n ,y n ) Representing the feature point position in the cloud picture at the moment n, (x) n+1 ,y n+1 ) Representing the position of the characteristic point in the cloud picture at the time of n+1.
The improved RANSAC algorithm comprises the following specific steps:
a) The method comprises the steps of eliminating characteristic point matching pairs with the number of intersecting points greater than 3 with other matching pairs from a matching pair set, wherein the number of intersecting points is an index for intuitively representing the alignment accuracy of the matching points.
B) The remaining feature point matching pairs are compared according to the ratio (D ij /D ij′ ) Incrementally ordered, forming a set of feature point matching pairs P (D ij Matching the minimum value of the Euclidean distance in the middle of the feature points; d (D) ij′ For the rest of the point versus euclidean distance).
C) Dividing the characteristic point matching pair set P into F in sequence 1 、F 2 、F 3 、F 4 Four parts, from F 1 Sequentially extracting 5 sample data and solving a transformation matrix M.
D) If F 1 The error between the remaining matching point pair and M is smaller than the default threshold T (0.6 is taken), and the matching point pair and the extracted sample (the extracted sample is 5 sample points extracted in the step C) are in a consistent set. If the matching point meets the error condition, judging that the matching point is consistent with the extracted sample, and reserving the matching point; if not, rejecting.
E) Traversing F with the resulting transformation matrix M 1 Corresponding matching points in (a) and calculating a set F 1 The matching point pairs in the set satisfy the proportion S of the transformation matrix under the threshold value, the steps are repeated, and the transformation matrix with the largest S is selected as M to be used as the final transformation matrix.
And the cloud image characteristic points are filtered by using an IRANSAC algorithm to obtain a characteristic point set for further eliminating dead points, so that the calculated amount is greatly reduced and the calculation speed is increased compared with the original RANSAC algorithm.
And thirdly, finely extracting cloud clusters by using an improved threshold segmentation method, and providing an irradiation coefficient for intuitively representing irradiance conditions at the next moment. The invention provides an improved threshold segmentation method, which is used for analyzing cloud pictures by means of historical clear sky picture gray levels matched with current clear sky pixels, and judging according to the following formula:
(0.95×GRAY t )<GRAY history <(1.05×GRAY t )
Wherein: GRAY history Removing the gray average value of the picture after the sun and the surrounding difficult-to-distinguish areas of the sun and the surrounding of the sun for the historical clear sky picture; GRAY t And the gray average value of the background clear sky area at the moment t.
Then, further extracting thin cloud and thick cloud based on the cloud cluster detection, wherein the thick cloud threshold and the thin cloud threshold can be deduced by a maximum inter-class variance method (Ostu), and the flow of the method is shown in fig. 4. The improved threshold segmentation method comprises the following specific steps:
a) The gray value in the sky around the sun is too high, the difficulty of preliminary distinguishing of clear sky pixel points and cloud cluster pixel points is increased, and the thick cloud threshold value is closer to white (the white gray value is 255), so that the confusion area can be distinguished as far as possible.
B) Calculating GRAY values GRAY (x, y) of all pixel points, and taking GRAY values of clear sky images matched with the cloud images at the moment from a clear sky image set, namely selecting GRAY on the basis of meeting the judging basis of the matching history clear sky images history With GRAY t The historical clear sky image is as close as possible and compared with the historical clear sky image BASE (x, y) to calculate the difference D (x, y). And comparing the gray level difference D (x, y) of the two with a set thick cloud threshold value to distinguish thick cloud pixel points. If the gray level difference D (x, y) of the two is larger than the set thick cloud threshold, the corresponding pixel points represent thick cloud pixel points, otherwise, the next step is carried out.
C) For the rest pixel points, when the aerosol concentration in the matched weather diagram is smallerWhen the aerosol concentration is large at the current moment, the clear sky pixel point and the thin cloud pixel point are easily mixed, and a correction factor alpha is introduced according to the situation 1 To improve cloud discrimination accuracy. I.e. passing the historical clear sky image BASE (x, y) through the correction factor alpha 1 Correction, subtracting BASE (x, y) from correction factor alpha from difference D (x, y) 1 And obtaining the corrected gray level difference value.
D) Using corrected grey-scale difference D 1 And (x, y) comparing with a set thin cloud threshold value to distinguish thin cloud pixel points. I.e. if the corrected gray level difference D 1 (x, y) is greater than the thin cloud threshold, the corresponding pixel points represent thin cloud pixel points, and if the corrected gray level difference D 1 And (x, y) is not greater than the thin cloud threshold, and the corresponding pixel points represent clear sky pixel points.
The irradiation coefficient provided by the patent can directly reflect the irradiance level under the cloud layer distribution, and the specific calculation method is as follows:
a) After the cloud image is analyzed by an HSV color model, a V value representing the brightness of the image is extracted and used as a direct index for measuring the sky light intensity.
B) According to the gray level graph for distinguishing thin cloud layer obtained by the improved threshold segmentation model, respectively setting the transmission coefficients of thin cloud and thick cloud, establishing a pixel dimension matrix (a multiplied by b) corresponding to a picture, respectively assigning transmission coefficients of thin cloud and thick cloud to the positions corresponding to thin cloud and thick cloud pixels, and assigning 1 to the positions corresponding to clear sky pixels to obtain a cloud graph transmission coefficient matrix S at n moments n . The same applies to obtain a matrix S of the transmission coefficient of the cloud picture at the moment n+1 n+1
C) Extracting the pixel point V value of the best-matched all-sky image at the current moment and forming a target matrix V n The matrix order is cloud picture pixel (a×b). Combining the improved threshold segmentation method, establishing an irradiation coefficient estimation model based on acquisition of cloud layer characteristics:
wherein: v ij Is a matrix V n Middle coordinate (i, j) pixel point V value, delta n For clear sky correction factor, delta n For taking the ratio of the average V value of the clear sky pixels at the n moments to the average V value of the best-matched clear sky graph, utilizing a clear sky correction coefficient delta n The description level of the normalized irradiation coefficient on the objective irradiation level at the moment can be further improved.
And step four, extracting historical meteorological data, constructing an input matrix based on a historical meteorological factor sequence, a normalized irradiation coefficient and a historical output time sequence, and establishing an ultra-short-term photovoltaic power prediction model based on an improved IAM-CNN-LSTM hybrid neural network.
The time sequence has a certain dynamic time characteristic, and the power sequence of the photovoltaic power station is taken as a typical time sequence and can be expressed as the following formula:
P(t)=f 1 (P(t-θ),P(t-2θ),...)+E(t)
wherein: p (t) is the output power of the photovoltaic power station at the moment t; f (f) 1 (. Cndot.) is a time-dependent function of the output power of the photovoltaic power plant; θ is the predicted time scale; e (t) is the time error of t.
Step five, initializing a neural network weight, setting the maximum iteration number K=50 and the current K 0 =1. The specific contents are as follows:
a) The method comprises the steps of (1) carrying out Gaussian initialization on a convolution layer, sampling from Gaussian distribution with a mean value of 0 and a variance of 1, and taking the Gaussian distribution as an initial weight;
b) Initializing a BN layer scale factor sigma to 1; initializing a shift factor to 0;
c) And calling a zero_state function (Tensorflow existing initialization function) to realize LSTM composite network initialization.
Step six, constructing a convolutional neural network, intercepting a characteristic input matrix from the characteristic matrix by a sliding time window method, and inputting CNN to perform characteristic extraction.
Inputting the time sequence characteristics extracted by the CNN into an improved Attention mechanism combining with a CRS algorithm, endowing transition characteristic vectors of a neural network model with different weights, inputting the transition characteristic vectors subjected to weight management into an LSTM layer according to time steps, outputting training results of an improved IAM-CNN-LSTM hybrid neural network, reading training loss curves and error curves, observing longitudinal distances of training set and verification set loss curves in a convergence process, and intuitively evaluating convergence performance of network prediction results by combining absolute error conditions of the training set and the verification set.
The following is a convergence represented by three common fitting states:
1) When the loss curve of the training set is almost not reduced, the training set is in an under fitting state and is in an unconverged state;
2) When the training set loss curve continuously descends, verifying that the training set loss curve does not descend at a certain moment, wherein the training set loss curve is in an overfitting state and is in a convergence state but not in perfect convergence;
3) And when the loss curves of the training set and the verification set have no obvious distance, the perfect fitting state is realized, and the perfect convergence is realized.
Further, the invention improves and optimizes the traditional CNN-LSTM mixed model, and comprises the following specific contents:
1) Attention mechanism combined with CRS algorithm
Because of the large number of features of the input model, the invention provides an improved Attention mechanism for giving different weights to transition feature vectors of the neural network model in order to highlight more key influencing factors and help the model to make more accurate judgment. In the conventional Attention mechanism, information carried by content input to a network first is covered by information input later, and semantic vectors may not completely represent the information of the whole sequence. Therefore, in order to overcome the defects, the invention provides an improved Attention mechanism (Improved Attention mechanism) combined with the CRS (Competitive random search) algorithm, which overcomes the defect that the network pays Attention to different related factor characteristics on the same time scale and improves the Attention degree of the network to various related factors.
The CRS is used to generate optimal parameter combinations in the attention layer. The operation of the CRS is presented in fig. 5, which consists of four parts "I, II, III, IV".
"I" provides the weight W of the attention layer; then convert to binary code W through' II B Subset W i Is transmitted to the LSTM neural network for attention weighting, and thereCorresponding loss values are generated based on the prediction errors in the network. Then, according to W in "III B Is used to select the optimal attention weight subset W i B Andand iteratively cycling through the subset combinations thereof. Finally, a new attention weight is reconstructed in "IV +.>
The detailed steps of the CRS are as follows:
11 Randomly generating a concentration weight set of length m=n (n is the model input feature dimension), w= (W) 1 ,W 2 ,...,W i ,...W M )。
12 To subset W i Input attention layer, convert W to binary code:
13 True value P and predicted value according to LSTM modelTo calculate the prediction error: />
14 Selecting an optimal attention weight subset W based on error feedback i B Andeach subset consists of a binary string and is evenly divided into n segments. Accordingly, W i B And->From W i B =(F i 1 ,F i 2 ,...F i n ) And->And (3) representing. F (F) i 1 And->Respectively W i B And->Is a part of the same.
15 Random extraction part W i B Andfor example, the n-1 th segment F of both is selected i n-1 And->However, the number of selected segments is not fixed.
16 Acquisition of F) i n-1 Andis a genetic recombination of (a) in a host cell. F (F) i n-1 And->Represented by a binary code of length 6, which are randomly exchanged over the corresponding 6 indices to obtain the reassembly segment->
17 Simulating a mutation of a gene and reversingIs a genotype of the subject. For example, 0 is inverted to 1. ThenSubstituted for W i B Corresponding F of (a) i n-1 Form a new->Inserted into W B Is a kind of medium.
18)W B Decoded to obtain an updated set of attention weights: w '= (W' 1 ,W′ 2 ,...,W′ k ,...,W′ M )。
19 Repeating steps 12) -18) until a preset number of times K is reached.
2) Improved dropout algorithm
In the model of the artificial neural network, if the parameters of the model are too many and the training samples are too few, the trained model is easy to generate the phenomenon of over fitting. Recent researches show that the traditional Dropout for randomly selecting neurons can obviously increase the calculated amount and the algorithm time consumption, and greatly influence the rapidity of the prediction algorithm.
Targeted Dropout is an improved Dropout algorithm with selectivity to neurons, which sorts weights or neurons according to a measure of fast-approximated weight importance, and applies Dropout to elements of lower importance. The specific implementation method of Targerted Dropout algorithm is as follows:
1) Pruning operation: for a parameterized neural network W a It is desirable to find the optimal parameter θ * So that the loss function epsilon (W (θ * ) As small as possible while also retaining the highest order of magnitude of k weights in the neural network. And pruning the W according to the weight pruning and unit pruning methods. The following weight pruning and unit pruning operation formulas are respectively:
wherein: epsilon (W) c (θ)) is a network loss function, W c For neural network model parameter momentArray, argmax-k is a function of returning the largest k elements of all elements, w o For the weight matrix W, the o-th column vector, W io The ith row, the ith column element and the N of the weight matrix col ,N row Representing the number of columns and rows of the parameter matrix, respectively.
(2) Introducing randomness: a targeting proportion γ and a deletion probability α are introduced, wherein the targeting proportion γ represents that the smallest γ|θ| weights will be selected as candidate weights for Dropout, and then the weights in the candidate set are independently removed with the deletion probability α.
Step eight, if the maximum number of iterations (k) 0 >K) The iteration is terminated and the modified IAM-CNN-LSTM network parameters are output. Otherwise, let k 0 =k 0 +1, and go to step four.
And step nine, performing ultra-short-term photovoltaic power prediction by utilizing the improved IAM-CNN-LSTM network trained according to the steps to obtain the predicted electric quantity of the period to be predicted.
The power prediction result may be expressed as:
F=(P,V,ζ)
wherein:improving IAM-CNN-LSTM hybrid network predicted power for time t; f (·) is a photovoltaic power station ultra-short term output power prediction algorithm; f is a neural network input sequence matrix; v is a relevant historical meteorological data matrix; p is the historical photovoltaic power timing; ζ is the irradiation factor sequence proposed in patent step three.
Preferably, the input feature matrix is input into a double-layer one-dimensional convolutional neural network, and a one-dimensional transition feature vector is output through a maximum pooling layer respectively; and then, carrying out weight management on the transition feature vector by using an improved Attention mechanism, and finally, inputting the transition feature vector with updated weight into a three-layer LSTM composite neural network, and obtaining a prediction result through a full connection layer.
According to the method, characteristics of a foundation cloud picture are considered, an irradiation coefficient for representing irradiance mutation is introduced, firstly, a color cloud picture extraction algorithm based on HSV-SURF is provided, a FLANN-IRANSAC algorithm is adopted to match and correct characteristic point pairs, and cloud cluster motion characteristics are extracted; secondly, refining and extracting cloud clusters by an improved threshold segmentation method; and finally, calculating a normalized irradiation coefficient visually representing the irradiance level at the next moment. The improved IAM-CNN-LSTM hybrid network prediction model comprehensively considers the correlation among the characteristic sequences and the ultra-short-term power and characteristic time sequence intrinsic characteristics, so that the history characteristic sequence related intrinsic information is fully extracted, an improved Attention mechanism combined with a CRS algorithm and a dropout algorithm with a pruning strategy are introduced, the fitting and optimization of the hybrid model are facilitated, and the model prediction precision is further improved.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions may be made without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (4)

1. The ultra-short term photovoltaic power prediction method is characterized by comprising the following steps of:
1) The method comprises the steps of obtaining a satellite visible light fish-eye cloud picture, correcting the fish-eye cloud picture by a longitude and latitude correction method, obtaining a corrected ground-based cloud picture sequence, and extracting color cloud picture feature points from the ground-based cloud picture sequence;
2) The characteristic point pairs are obtained in the FLANN algorithm matching step 1), the cloud image characteristic points are filtered by the improved IRANSAC algorithm, a characteristic point set with bad points removed is obtained, and a characteristic point coordinate transformation matrix is calculated through the cloud image characteristic point coordinate matching condition of adjacent time points so as to obtain a cloud cluster motion trail;
3) Dividing and extracting the cloud cluster, and utilizing an irradiation coefficient for visually representing irradiance conditions at the next moment to represent irradiance levels under cloud layer distribution;
4) Extracting historical meteorological data, constructing an input feature matrix, and establishing an ultra-short-term photovoltaic power prediction model based on an improved IAM-CNN-LSTM hybrid neural network;
5) Initializing a neural network weight and setting the maximum iteration number;
6) Constructing a convolutional neural network, intercepting a feature input matrix by a sliding time window method from the feature matrix, and inputting CNN to perform feature extraction;
7) Inputting the time sequence characteristics extracted by the CNN into an improved Attention mechanism combined with a CRS algorithm, endowing transition characteristic vectors of a neural network model with different weights, inputting the transition characteristic vectors subjected to weight management into an LSTM layer according to time steps, outputting training results of an improved IAM-CNN-LSTM hybrid neural network, reading training loss curves and error curves, observing longitudinal distances of the training set and verification set loss curves in the convergence process, and intuitively evaluating the convergence performance of the network prediction results by combining absolute error conditions of the training set and the verification set;
8) Judging whether the current iteration number reaches the maximum iteration number, if so, ending the iteration, outputting the improved IAM-CNN-LSTM network parameter, otherwise, adding one to the iteration number, and turning to the step 4);
9) Performing ultra-short-term photovoltaic power prediction by utilizing the improved IAM-CNN-LSTM network trained by the steps to obtain predicted power;
In the step 1), the HSV-SURF algorithm is adopted to rapidly extract the characteristic points of the color cloud image, and the specific steps include:
11 Extracting characteristic points of the color cloud picture by using a SURF algorithm;
12 HSV color space conversion is carried out on the extracted characteristic points of the color cloud picture, and a characteristic point coordinate transformation matrix is obtained;
13 Utilizing Haar wavelet characteristics in a circular neighborhood of the statistical characteristic points and describing the characteristic points of the color cloud picture by combining with the combined characteristics of HSV color information;
in the step 2), the purpose of improving the IRANSAC algorithm is to find an optimal parameter matrix so as to maximize the number of feature points meeting the matrix, and the specific step of filtering the cloud image feature points by using the improved IRANSAC algorithm comprises the following steps:
21 Eliminating the characteristic point matching pairs with the number of intersecting points greater than 3 with other matching pairs from the matching pair set by utilizing the FLANN algorithm;
22 Matching the remaining feature points according to the ratio (D) ij /D ij′ ) Incrementally sorting, forming a feature point matching pair set P, wherein D ij For the minimum value of Euclidean distance in the feature point matching, D ij′ The Euclidean distance is the rest point pairs;
23 Dividing the feature point matching pair set P into F in order 1 、F 2 、F 3 、F 4 Four parts, from F 1 Sequentially extracting 5 sample data, and solving the characteristic point coordinate transformation matrix M obtained in the step 12);
24 If F 1 If the error between the rest matching point pair and M is smaller than the appointed threshold T, judging that the matching point pair and the extracted sample are the same set;
25 Traversing F) by adopting a characteristic point coordinate transformation matrix M 1 Corresponding matching points in (a) and calculating a set F 1 The matching point pairs in the matching point pairs satisfy the proportion S of the transformation matrix under the threshold value, the steps are repeated, and the characteristic point transformation matrix with the largest S is selected as the final transformation matrix;
in step 4), the expression of the ultra-short term photovoltaic power prediction model based on the improved IAM-CNN-LSTM hybrid neural network is as follows:
P(t)=f 1 (P(t-θ),P(t-2θ),...)+E(t)
wherein: p (t) is the output power of the photovoltaic power station at the moment t; f (f) 1 (. Cndot.) is a time-dependent function of the output power of the photovoltaic power plant; θ is the predicted time scale; e (t) is a time t error;
in the step 4), the method further comprises the step of optimizing an ultra-short-term photovoltaic power prediction model based on the improved IAM-CNN-LSTM hybrid neural network, and the specific steps comprise:
a) Providing an improved Attention mechanism combined with a CRS algorithm to guide time sequence weight distribution;
b) Introducing a Targeted dropout algorithm into the LSTM network, and selectively removing neurons;
the CRS algorithm is used for generating an optimal parameter combination in the attention layer, and the operation process of the CRS algorithm comprises a first part, a second part, a third part and a fourth part;
The first part provides the weight W of the attention layer; then converted into a binary code W by the second part B Subset W i Is transmitted to the LSTM network for attention weighting, and corresponding loss values are generated in the LSTM network based on the prediction error of the network, and then based on W in the third section B Is used to select the optimal attention weight subset W i B Andand the subset combinations are iteratively cycled, finally, a new attention weight is reconstructed in the fourth part +.>
2. The ultra-short term photovoltaic power prediction method according to claim 1, wherein in step 3), an improved threshold segmentation method is adopted, multiple thresholds are set according to a historical clear sky picture matched with a current clear sky pixel to extract cloud clusters in a refined mode, and irradiance levels under cloud layer distribution are represented by irradiation coefficients visually representing irradiance conditions at the next moment; the specific content of refined cloud cluster extraction by adopting the improved threshold segmentation method is as follows:
firstly, carrying out cloud image inspection according to the gray level of a historical clear sky picture matched with a current clear sky pixel, and selecting cloud cluster data at all moments according with inspection and judgment bases, wherein the inspection and judgment bases are as follows:
(0.95×GRAY t )<GRAY history <(1.05×GRAY t )
wherein: GRAY history Removing the gray average value of the picture after the sun and the surrounding difficult-to-distinguish areas of the sun and the surrounding of the sun for the historical clear sky picture; GRAY t The gray average value of the background clear sky area at the moment t;
setting a thin cloud threshold and a thick cloud threshold, and further extracting thin cloud and thick cloud from cloud cluster data conforming to the inspection and discrimination basis:
311 Setting a portion of the solar peripheral area higher than the set thin cloud threshold as an extraction error area, and filling and replacing the extraction error area with black pixels;
312 Calculating GRAY values GRAY (x, y) of all pixel points, and selecting GRAY values of clear sky images matched with the cloud images at the moment in the clear sky image set, namely selecting a GRAY average value GRAY of the pictures after removing the sun and surrounding difficult-to-distinguish areas of the historical clear sky images history Gray mean value GRAY of clear sky area with background at moment t t The nearest historical clear sky image is compared with the historical clear sky image BASE (x, y), the gray difference D (x, y) between the image and the historical clear sky image is calculated, and the gray difference D (x, y) between the image and the historical clear sky image is compared with a set thick cloud threshold value to distinguish thick cloud pixel points;
313 Introduction of correction factor alpha 1 Screening and correcting the residual pixel points;
314 Using corrected grey-scale difference D 1 And (x, y) comparing with a set thin-cloud gray threshold value to distinguish and obtain thin-cloud pixel points.
3. The ultra-short term photovoltaic power prediction method according to claim 2, wherein the calculation method for intuitively representing the irradiance condition at the next moment is as follows:
321 After the cloud image is analyzed by an HSV color model, extracting a V value representing the brightness of the image as a direct index for measuring the sky light intensity;
322 According to the gray level diagram for distinguishing the thin cloud layer obtained by the improved threshold segmentation method, respectively setting the transmission coefficients of the thin cloud and the thick cloud, establishing a pixel dimension matrix of the picture, respectively assigning the transmission coefficients of the thin cloud and the thick cloud to the corresponding positions of the thin cloud and the thick cloud pixel points, respectively assigning 1 to the corresponding positions of the clear sky pixel points, and obtaining a transmission coefficient matrix S of the cloud diagram at the moment n n And similarly obtaining a cloud picture transmission coefficient matrix S at time n+1 n+1
323 Extracting the pixel point V value of the best-matched all-sky image at the current moment and forming a target matrix V n Matrix order is the same as the picture pixel dimension matrix, step 322 is combined), based on cloud layerThe acquisition of the characteristics establishes an irradiation coefficient estimation model:
wherein: v ij Is a matrix V n Middle coordinate (i, j) pixel point V value, delta n And taking the ratio of the average V value of the clear sky pixels at the moment n to the average V value of the best-matched clear sky map as the clear sky correction coefficient.
4. The ultra-short term photovoltaic power prediction method according to claim 1, wherein the specific step of step b) comprises:
b1 Pruning operation is carried out on LSTM network neurons according to the methods of weight pruning and unit pruning, and the calculation formulas are respectively as follows:
Wherein: epsilon 1 (W c (θ)) is the weight pruning network loss function, ε 2 (W c (θ)) is the unit pruning network loss function, W c For the neural network model parameter matrix, argmax-k is a function of returning the largest k elements in all elements, w o For the weight matrix W, the o-th column vector, W io The ith row, the ith column element and the N of the weight matrix col ,N row Representing the number of columns and the number of rows of the parameter matrix respectively;
b2 Introducing a targeting proportion gamma and a deletion probability alpha, selecting the smallest gamma|theta| weights as candidate weights of Dropout, and then independently removing the weights in the candidate set with the deletion probability alpha.
CN202011225477.1A 2020-11-05 2020-11-05 Ultra-short term photovoltaic power prediction method Active CN112507793B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011225477.1A CN112507793B (en) 2020-11-05 2020-11-05 Ultra-short term photovoltaic power prediction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011225477.1A CN112507793B (en) 2020-11-05 2020-11-05 Ultra-short term photovoltaic power prediction method

Publications (2)

Publication Number Publication Date
CN112507793A CN112507793A (en) 2021-03-16
CN112507793B true CN112507793B (en) 2023-08-08

Family

ID=74955872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011225477.1A Active CN112507793B (en) 2020-11-05 2020-11-05 Ultra-short term photovoltaic power prediction method

Country Status (1)

Country Link
CN (1) CN112507793B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113298303B (en) * 2021-05-19 2021-12-28 河海大学 Photovoltaic power prediction method for meteorological satellite cloud picture dynamic attention domain
CN113627070A (en) * 2021-05-24 2021-11-09 国网新疆电力有限公司经济技术研究院 Short-term photovoltaic power prediction method
CN113159466B (en) * 2021-05-27 2022-04-15 沃太能源股份有限公司 Short-time photovoltaic power generation prediction system and method
CN113311512A (en) * 2021-06-24 2021-08-27 中国气象局公共气象服务中心(国家预警信息发布中心) Photovoltaic power station solar radiation short-term forecasting method based on satellite radiation product
CN113722375B (en) * 2021-08-10 2023-10-17 国网浙江省电力有限公司电力科学研究院 Double-layer hybrid photovoltaic prediction method based on multi-algorithm optimization and computer equipment
CN113642676B (en) * 2021-10-12 2022-02-22 华北电力大学 Regional power grid load prediction method and device based on heterogeneous meteorological data fusion
CN114676893B (en) * 2022-03-11 2024-02-02 中国长江三峡集团有限公司 Photovoltaic power station solar irradiance short-term prediction method based on optimal graph structure and storage medium
CN114971058B (en) * 2022-06-09 2023-07-14 哈尔滨工业大学 Photovoltaic forecasting method based on depth attention network and clear sky radiation priori fusion
CN115481788B (en) * 2022-08-31 2023-08-25 北京建筑大学 Phase change energy storage system load prediction method and system
CN115457389B (en) * 2022-09-05 2023-04-28 河海大学 Ultra-short-term solar radiation prediction method and system based on sparse space-time feature descriptors
CN115619047B (en) * 2022-12-19 2023-02-28 广东采日能源科技有限公司 Photovoltaic power prediction method and device and electronic equipment
CN115882454B (en) * 2023-02-09 2023-08-15 国网浙江省电力有限公司宁波供电公司 Source load power prediction method and system based on multi-element information fusion
CN116523145B (en) * 2023-06-29 2023-10-20 长江三峡集团实业发展(北京)有限公司 Photovoltaic power ultra-short-term prediction method and device, computer equipment and storage medium
CN116721356B (en) * 2023-08-10 2023-11-24 深圳航天科创泛在电气有限公司 Output power prediction method of photovoltaic system and related equipment
CN116780533B (en) * 2023-08-16 2023-11-03 北京东润环能科技股份有限公司 Photovoltaic ultra-short-term forecasting method and device, electronic equipment and storage medium
CN117200971B (en) * 2023-09-11 2024-03-26 重庆千信新能源有限公司 New energy power data transmission method for photovoltaic module based on block chain
CN116911467A (en) * 2023-09-12 2023-10-20 浙江华云电力工程设计咨询有限公司 Renewable energy output prediction method, device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103971169A (en) * 2014-04-14 2014-08-06 国家电网公司 Photovoltaic super-short-term generated power forecasting method based on cloud cover simulation
CN106779130A (en) * 2015-11-20 2017-05-31 中国电力科学研究院 A kind of photovoltaic plant radiation Forecasting Methodology based on all-sky cloud atlas
WO2017221343A1 (en) * 2016-06-22 2017-12-28 株式会社日立製作所 Solar light output prediction device, electric power system control device, and solar light output prediction method
CN109325960A (en) * 2018-11-20 2019-02-12 南京信息工程大学 A kind of infrared cloud image cyclone analysis method and analysis system
US10409925B1 (en) * 2012-10-17 2019-09-10 Clean Power Research, L.L.C. Method for tuning photovoltaic power generation plant forecasting with the aid of a digital computer
CN111144643A (en) * 2019-12-24 2020-05-12 天津相和电气科技有限公司 Day-ahead power load prediction method and device based on double-end automatic coding
CN111815038A (en) * 2020-06-24 2020-10-23 山东大学 Photovoltaic ultra-short term prediction method and system
WO2020215405A1 (en) * 2019-04-25 2020-10-29 山东大学 Photovoltaic power station power prediction method and system based on grid-tie inverter operating data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10409925B1 (en) * 2012-10-17 2019-09-10 Clean Power Research, L.L.C. Method for tuning photovoltaic power generation plant forecasting with the aid of a digital computer
CN103971169A (en) * 2014-04-14 2014-08-06 国家电网公司 Photovoltaic super-short-term generated power forecasting method based on cloud cover simulation
CN106779130A (en) * 2015-11-20 2017-05-31 中国电力科学研究院 A kind of photovoltaic plant radiation Forecasting Methodology based on all-sky cloud atlas
WO2017221343A1 (en) * 2016-06-22 2017-12-28 株式会社日立製作所 Solar light output prediction device, electric power system control device, and solar light output prediction method
CN109325960A (en) * 2018-11-20 2019-02-12 南京信息工程大学 A kind of infrared cloud image cyclone analysis method and analysis system
WO2020215405A1 (en) * 2019-04-25 2020-10-29 山东大学 Photovoltaic power station power prediction method and system based on grid-tie inverter operating data
CN111144643A (en) * 2019-12-24 2020-05-12 天津相和电气科技有限公司 Day-ahead power load prediction method and device based on double-end automatic coding
CN111815038A (en) * 2020-06-24 2020-10-23 山东大学 Photovoltaic ultra-short term prediction method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于地基云图图像特征的光伏功率预测;路志英;《电力系统及其自动化学报》;20200513;全文 *

Also Published As

Publication number Publication date
CN112507793A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN112507793B (en) Ultra-short term photovoltaic power prediction method
CN109614996B (en) Weak visible light and infrared image fusion identification method based on generation countermeasure network
CN110443143B (en) Multi-branch convolutional neural network fused remote sensing image scene classification method
CN112200764B (en) Photovoltaic power station hot spot detection and positioning method based on thermal infrared image
CN114092832B (en) High-resolution remote sensing image classification method based on parallel hybrid convolutional network
CN111340738A (en) Image rain removing method based on multi-scale progressive fusion
CN112818969B (en) Knowledge distillation-based face pose estimation method and system
CN113449594B (en) Multilayer network combined remote sensing image ground semantic segmentation and area calculation method
CN111598842A (en) Method and system for generating model of insulator defect sample and storage medium
CN113076816B (en) Solar photovoltaic module hot spot identification method based on infrared and visible light images
Liu et al. Hierarchical multimodal fusion for ground-based cloud classification in weather station networks
Zhang et al. MSGAN: generative adversarial networks for image seasonal style transfer
CN116110022A (en) Lightweight traffic sign detection method and system based on response knowledge distillation
CN110610122A (en) Visible light imaging big data artificial intelligence detection diagnosis method for power transmission equipment
CN114488069A (en) Radar high-resolution range profile identification method based on graph neural network
CN111695436B (en) High spatial resolution remote sensing image scene classification method based on target enhancement
CN116933141B (en) Multispectral laser radar point cloud classification method based on multicore graph learning
CN112446305A (en) Pedestrian re-identification method based on classification weight equidistant distribution loss model
CN116993639A (en) Visible light and infrared image fusion method based on structural re-parameterization
CN116029440A (en) Ultra-short-term power prediction method and device for photovoltaic power station
CN115841608A (en) Multi-chamber lightning arrester identification method based on improved YOLOX
CN115546338A (en) Image coloring method based on Transformer and generation countermeasure network
CN115410087A (en) Transmission line foreign matter detection method based on improved YOLOv4
CN111402223B (en) Transformer substation defect problem detection method using transformer substation video image
CN114111647A (en) Artificial intelligence-based method and system for measuring damaged area of insulator umbrella skirt

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant