A method for ultra-short-term photovoltaic power output prediction based on transient meteorology

By using an ultra-short-term photovoltaic power output prediction method based on transient weather, and employing fuzzy C-means clustering and principal component analysis, an adaptive gated recurrent unit neural network model is constructed. This solves the overfitting and underfitting problems in photovoltaic power output prediction and achieves high-precision prediction even when meteorological data is insufficient.

CN115879602BActive Publication Date: 2026-06-16STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
Filing Date
2022-11-15
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing photovoltaic power output forecasting methods are prone to overfitting and underfitting, and insufficient meteorological data input in distributed photovoltaic systems leads to low forecasting accuracy, making it difficult to meet the requirements of independent and identically distributed systems, especially in ultra-short-term load forecasting.

Method used

An ultra-short-term photovoltaic power output prediction method based on transient weather is adopted. The historical data is reduced in dimensionality by fuzzy C-means clustering and principal component analysis. An adaptive gated recurrent unit neural network model is constructed and trained using an adaptive distribution matching module and uncertainty weighting method. The relevant information between similar daily data is mined to make accurate predictions.

🎯Benefits of technology

It improves the accuracy of ultra-short-term photovoltaic power output forecasting, reduces redundant meteorological data, reduces the cost of meteorological measurement equipment, overcomes data nonlinearity and sequence problems, and achieves accurate forecasting in the absence of input data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115879602B_ABST
    Figure CN115879602B_ABST
Patent Text Reader

Abstract

The application relates to a kind of ultra-short-term photovoltaic output prediction methods based on transient meteorology, comprising: obtaining historical sample data and pre-processing;Based on fuzzy C means clustering, the historical sample data is clustered;Based on principal component analysis method, the characteristic dimensionality reduction of historical meteorological data is obtained Meteorological data characteristics;Randomly determine a reference day sample under each weather type, and sort based on the cosine distance between it and similar day meteorological data characteristics;Adaptive gated recurrent unit neural network model is constructed;The historical photovoltaic output data of adjacent ordered similar day samples are respectively used as the input and output of the model, and the model is trained based on uncertainty weighting method;Photovoltaic output is predicted based on the trained model.Compared with the prior art, the application fully considers the relationship between historical photovoltaic output and meteorological information, the related information between similar day samples under the same weather type, and can effectively and accurately predict the ultra-short-term photovoltaic output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic power output prediction technology, and in particular to an ultra-short-term photovoltaic power output prediction method based on transient weather. Background Technology

[0002] With the popularization of new energy welfare policies and the reduction in the cost of photovoltaic power generation equipment, and given the importance of photovoltaic power forecasting for grid dispatch, the demand for photovoltaic output forecasting is increasing. To improve the efficiency of photovoltaic power generation, accurate photovoltaic output forecasting has become an increasingly important issue.

[0003] With the achievement of the goals of "carbon peaking" and "carbon neutrality," the installed capacity and proportion of photovoltaic (PV) power will continue to rise. PV power plants include both centralized and distributed systems, with distributed PV's installed capacity increasing year by year and developing rapidly. Distributed PV is often installed on rooftops of government offices, industrial and commercial buildings, and residences. Compared to centralized PV, its green, environmentally friendly, cost-effective, and on-demand characteristics are better demonstrated, allowing for self-consumption while also enabling surplus electricity to be fed into the grid. Accurate ultra-short-term PV power generation forecasting plays a crucial role in the optimized operation of PV power plants, the scheduling of PV power systems, and the safe, stable, and economical operation of the power grid.

[0004] Currently, there are two main methods for predicting photovoltaic (PV) output: one is based on statistical methods, including time series modeling techniques; the other is based on artificial intelligence algorithms, including convolutional neural networks (CNNs) and long short-term neural networks (LSNs). The latter, due to its superior nonlinear processing and feature extraction capabilities, has been widely used in PV output prediction in recent years. However, existing technologies still have the following shortcomings:

[0005] (1) Methods based on artificial intelligence algorithms are prone to overfitting and underfitting, and require that the test dataset and the training dataset be independent and identically distributed. However, due to the large amount of uncertainty in photovoltaic power output, this premise is difficult to be fully met, resulting in low algorithm accuracy.

[0006] (2) Because the installation sites of distributed photovoltaic systems are relatively scattered and the installed capacity is small, it is costly and difficult to manage to install meteorological measurement devices for each distributed photovoltaic system. The time granularity of ultra-short-term load forecast is mostly 5 minutes, 10 minutes or 15 minutes. Therefore, it is extremely dependent on meteorological data for auxiliary forecasting. If cost is taken into consideration, fewer meteorological measurement devices will be installed, resulting in a lack of sufficient input data to assist in forecasting photovoltaic output, leading to poor algorithm accuracy. Summary of the Invention

[0007] The purpose of this invention is to provide an ultra-short-term photovoltaic power output prediction method based on transient weather conditions. This method fully considers the relationship between historical photovoltaic power output and meteorological information, as well as the relevant information between similar daily data under the same weather type, and can effectively and accurately predict ultra-short-term photovoltaic power output.

[0008] The objective of this invention can be achieved through the following technical solutions:

[0009] A method for predicting ultra-short-term photovoltaic power output based on transient weather conditions includes the following steps:

[0010] S1: Acquire historical sample data and preprocess it. The historical sample data includes ultra-short-term historical photovoltaic power output data and corresponding historical meteorological data.

[0011] S2: Use the statistical indicators of historical meteorological data as clustering indicators to perform fuzzy C-means clustering on historical sample data, and cluster the historical sample data into multiple weather types. Sample data under the same weather type are similar daily samples.

[0012] S3: Based on principal component analysis, feature dimensionality reduction is performed on historical meteorological data for each weather type to obtain the dimensionality-reduced meteorological data features;

[0013] S4: Randomly select a reference day sample under each weather type, and sort the similar day samples based on the cosine distance between the meteorological data characteristics of the similar day samples and the reference day samples;

[0014] S5: Construct an adaptive gated recurrent unit neural network model for each weather type. The adaptive gated recurrent unit neural network model includes a distribution recognition module and an adaptive distribution matching module. The distribution recognition module is used to identify that the data distribution of similar daily samples under the same weather type is different. The adaptive distribution matching module is used to learn the relevant information between similar daily samples under the same weather type.

[0015] S6: The historical photovoltaic power output data in the sorted adjacent similar day samples are used as the input and output of the adaptive gated recurrent unit neural network model, and the model is trained based on the uncertainty weighting method to balance the prediction error and related information error.

[0016] S7: Obtain meteorological data for the predicted day and determine the corresponding weather type. Perform principal component analysis on the meteorological data for the predicted day to obtain the meteorological data features for the predicted day. Calculate the predicted cosine distance between the meteorological data features for the predicted day and the meteorological data features of the corresponding reference day sample. Based on the predicted cosine distance, determine the closest similar day sample. Use the historical photovoltaic power output data of the closest similar day sample as the model input. Call the adaptive gated recurrent unit neural network model that matches the weather type of the predicted day to predict the photovoltaic power output for the predicted day.

[0017] Step S1 includes the following steps:

[0018] S11: Obtain historical sample data;

[0019] S12: Use the 3σ criterion to check and remove outliers in historical sample data;

[0020] S13: Use the Lagrange interpolation method to impute missing values ​​in historical sample data;

[0021] S14: Normalize the historical sample data.

[0022] The statistical indicators of the historical meteorological data include harmonic mean, geometric mean, coefficient of variation, skewness, and kurtosis.

[0023] The weather types are divided into five categories: sunny, cloudy, overcast, rainy, and extreme weather.

[0024] The clustering loss function for fuzzy C-means clustering of historical sample data is:

[0025]

[0026] Where J(U,V) is the clustering loss function; u ij Let U be the membership degree of the i-th sample belonging to the j-th class; N be the number of samples; V be the cluster center; m be the membership factor, 1 ≤ m < ∞; d ij It is the distance from the sample data to the cluster center.

[0027] The specific method for feature dimensionality reduction of meteorological data based on principal component analysis (PCA) to obtain meteorological data features is as follows: Meteorological data are constructed into a meteorological matrix; PCA is performed on the meteorological matrix to obtain the contribution rate of each principal component; and the principal component with the highest contribution rate is selected as the extracted meteorological data feature. The calculation method for the contribution rate of each principal component is as follows:

[0028]

[0029]

[0030] Where, λ i Let X be the eigenvector of the covariance matrix of the meteorological matrix, where X is an N×m meteorological matrix, N is the number of samples, m is the initial feature dimension, and e is the eigenvector of the covariance matrix of the meteorological matrix. i Let r be the eigenvalue of the covariance matrix of the meteorological matrix. i The contribution rate of each principal component.

[0031] The adaptive gated recurrent unit neural network model consists of an input layer, two hidden layers, a fully connected layer, and an output layer.

[0032] The distribution identification module is constructed based on the maximum mean difference method, specifically as follows:

[0033]

[0034] Among them, h s and h t These are two different sets of sample data, n s and n t denoted by , where is the number of samples in the two groups, k is the kernel function, and i and j represent the i-th and j-th data points, respectively.

[0035] The adaptive distribution matching module is used to learn relevant information among similar daily samples under the same weather type, specifically represented as a loss function:

[0036]

[0037] Where L(θ) represents the loss function of the adaptive distribution matching module, L pred (θ) is the prediction error loss function, L ada Let be the relevant information error loss function, λ be the balance term balancing prediction error and relevant information error, K be the parameter to avoid overlearning, and D be the loss function. j,i It is the j,i-th distribution, and θ represents the model parameters.

[0038] The specific details of balancing prediction error and related information error based on the uncertainty weighted method are as follows:

[0039]

[0040] Where σ1 is L pred The standard deviation of the output value, σ², is L. ada The standard deviation of the output values.

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] (1) This invention fully considers the relationship between historical photovoltaic power output and meteorological information, and also fully considers the relevant information between similar daily data under the same weather type, thereby improving the accuracy of ultra-short-term photovoltaic power output prediction.

[0043] (2) The present invention uses the fuzzy C-means clustering method to cluster the samples, which can overcome the premise that the data needs to meet the normal distribution.

[0044] (3) This invention reduces redundant information in meteorological data through clustering and principal component dimensionality reduction analysis, enabling deeper utilization of meteorological data and achieving effective prediction even when meteorological data input is insufficient, thereby reducing the installation cost of meteorological measurement devices.

[0045] (4) The adaptive distribution matching module of the UW-ADAGRU model of the present invention can mine relevant information between all similar daily data to cope with possible unseen meteorological information in the future, and thus cope with the uncertainty of photovoltaic power output, and achieve accurate prediction in the absence of input data.

[0046] (5) The adaptive gated recurrent unit neural network model of the present invention can overcome the nonlinearity and sequentiality of data very well, and its ability to avoid overfitting and underfitting is stronger than that of traditional artificial intelligence algorithms (BP, CNN, etc.). Attached Figure Description

[0047] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0048] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0049] This embodiment provides an ultra-short-term photovoltaic power output prediction method based on transient weather conditions, such as... Figure 1 As shown, it includes the following steps:

[0050] S1: Acquire historical sample data and preprocess it. The historical sample data includes ultra-short-term historical photovoltaic power output data and corresponding historical meteorological data.

[0051] S11: Obtain historical sample data;

[0052] S12: Use the 3σ criterion to check for and remove outliers in historical sample data:

[0053] Under the 3σ principle, data does not need to follow a normal distribution. If a data outlier exceeds three times the standard deviation, it can be considered an outlier. The probability of ±3σ is 98.9%, so the probability of a value outside the mean by 3σ is P(|xu|>3σ)=0.011, which is an extremely rare, low-probability event. Assuming that the historical meteorological and photovoltaic power output data to be detected contain only random errors, the standard deviation is calculated from the raw data. Then, a probability interval is determined based on a certain probability. Errors exceeding this probability interval are considered outliers. After detecting outliers, they are removed.

[0054] S13: Imput missing values ​​in historical sample data using Lagrange interpolation:

[0055] The original data contained missing values, and the removal of outliers in step S12 further increased the number of missing values. Therefore, it is necessary to impute the missing values ​​to obtain complete data. The Lagrange interpolation method originates from numerical analysis, given N+1 distinct points x of a function f(x). i The corresponding function value is y i Its Lagrange interpolation polynomial can be written in the following form:

[0056]

[0057] In the above formula, l k (x) is a basis function, and its expression is shown below:

[0058]

[0059] S14: Normalize the historical sample data.

[0060] S2: Use statistical indicators of historical meteorological data as clustering indicators to perform fuzzy C-means clustering (FCM) on historical sample data, and cluster the historical sample data into multiple weather types.

[0061] S21: Determine the statistical indicators for historical meteorological data, including:

[0062] 1) Harmonic Mean

[0063]

[0064] Where H is the harmonic mean, N is the sample size, and X is the mean. i Let i be the i-th variable.

[0065] 2) Geometric mean

[0066]

[0067] Where G is the geometric mean.

[0068] 3) Coefficient of variation

[0069]

[0070] Where cv is the coefficient of variation and σ is the standard deviation.

[0071] 4) Skewness

[0072]

[0073] Where s is the skewness, μ3 is the third-order central moment, and σ is the standard deviation.

[0074] 5) Kurtosis

[0075]

[0076] Where k is the kurtosis.

[0077] S22: Classify weather types into 5 categories: sunny, cloudy, overcast, rainy, and extreme weather. Determine typical daily meteorological data for each weather type. Specifically, extract typical daily meteorological data from historical meteorological day samples labeled as sunny, cloudy, overcast, rainy, and extreme weather using the average value method, and use this data as the basis for selecting cluster centers.

[0078] S23: Based on five statistical indicators of historical meteorological data, historical sample data are clustered into five weather types using fuzzy C-means clustering (FCM) and determined cluster centers. Sample data under the same weather type are similar daily samples.

[0079] The clustering loss function for fuzzy C-means clustering of historical sample data is defined as follows:

[0080]

[0081] Where J(U,V) is the clustering loss function, u ij is the membership degree of the i-th sample belonging to the j-th class, U is the membership degree matrix; V is the cluster center, i.e., the typical daily data determined in S22; m is the membership factor, 1≤m<∞; d ij It is the distance from the sample data to the cluster center.

[0082] The strategy of FCM clustering is to iteratively calculate U and V to minimize the clustering loss function.

[0083] Specifically, the specific steps of FCM in the ultra-short-term photovoltaic forecasting described in this invention are as follows:

[0084] S231: Initialize the number of clusters to 5 weather types and the membership matrix U. (0) Let l represent the number of iterations.

[0085] S232: Calculate the cluster center V in the l-th iteration. (l) :

[0086]

[0087] S233: Update the membership matrix U (l) Calculate the clustering loss function J (l) :

[0088]

[0089]

[0090] in,

[0091] S234: Given the membership termination threshold ε u The termination threshold ε of the loss function J The iteration stops when the threshold is reached; otherwise, it returns to S232.

[0092] S3: Based on principal component analysis, feature dimensionality reduction is performed on historical meteorological data for each weather type to obtain the dimensionality-reduced meteorological data features.

[0093] Principal Component Analysis (PCA) is a commonly used and effective method for data dimensionality reduction. However, due to redundancy among various meteorological factors, excessive redundant information can affect computational efficiency and reduce model accuracy.

[0094] S31: Determine the dimensions of the meteorological features to be analyzed. In this embodiment, the dimensions include temperature, humidity, wind speed, tilt scattering, horizontal scattering, horizontal radiation, and tilt scattering.

[0095] S32: Construct an N×m meteorological matrix X from the meteorological data, where N is the number of samples and m is the initial feature dimension. In this embodiment, m = 7.

[0096] S33: Calculate the average value of each feature dimension:

[0097]

[0098] in, This is the average value.

[0099] S34: Calculate the covariance matrix C:

[0100]

[0101] S35: Calculate the eigenvector e of C i and eigenvalues ​​λ i i = 1, 2, ..., m:

[0102] Ce i =λ i e i

[0103] Right now:

[0104]

[0105] S36: Determine the dimension-reduced matrix Z = XE, where E = [e1, e2, ..., e k ], where k is the dimension after dimensionality reduction.

[0106] S37: Determine the value of k, i.e., the number of principal components in Z, and calculate the contribution rate of each principal component after feature reduction according to the following formula:

[0107]

[0108] Among them, e i It is the eigenvector, λ i It is an eigenvalue, r i It represents the contribution rate of each principal component.

[0109] This embodiment uses principal component analysis (PCA) to comprehensively analyze the seven initial meteorological features mentioned above, obtaining the dimensionality-reduced meteorological data features. PCA analysis was performed on the seven main meteorological factors using different k values ​​(from 1 to 7), and the data was divided into spring, summer, autumn, and winter according to the season. The calculated contribution rates of the seven principal components for different seasons and the whole year are shown in Table 1. It can be seen that after dimensionality reduction, the contribution rate of principal component 1 in spring, summer, and autumn reaches over 95%, with summer and autumn reaching over 97%. Overall, principal component 1 achieves a contribution rate higher than 96% for the whole year, retaining most of the information in the original meteorological data. Therefore, principal component 1 is used as the dimensionality-reduced meteorological data feature.

[0110] Table 1 Principal Component Contribution Rate

[0111]

[0112] S4: Randomly select a reference day sample under each weather type, and sort the similar day samples based on the cosine distance between the meteorological data characteristics of the similar day samples and the reference day samples.

[0113] The cosine distance is calculated as follows:

[0114]

[0115] S5: Construct an adaptive gated recurrent unit neural network model (UW-ADAGRU model) for each weather type, including a distribution recognition module and an adaptive distribution matching module.

[0116] The adaptive gated recurrent unit neural network model consists of an input layer, two hidden layers, a fully connected layer, and an output layer.

[0117] The distribution identification module is built based on the Maximum Mean Discrepancy (MMD) method and is used to identify differences in the data distribution of similar daily samples under the same weather type. Specifically:

[0118]

[0119] Among them, h s and h t These are two different sets of sample data, n s and n t denoted by , where is the number of samples in the two groups, k is the kernel function, and i and j represent the i-th and j-th data points, respectively.

[0120] The adaptive distribution matching module is used to learn relevant information among similar daily samples under the same weather type. Therefore, it functions in the form of a loss function, specifically expressed as follows:

[0121]

[0122] Where L(θ) represents the loss function of the adaptive distribution matching module; L pred (θ) is the prediction error loss function; L ada Let be the relevant information error loss function; λ is the balance term between prediction error and relevant information error, used to avoid the network overlearning and sharing knowledge, thus increasing the error; K is the parameter to avoid overlearning; D j,i It represents the j-th, i-th distribution; θ represents the model parameters.

[0123] The first part of L(θ) effectively reduces the error in the learning process of similar day models, while the second part mines relevant information between similar day data samples to adaptively cope with the uncertainty of photovoltaic output caused by weather.

[0124] Prediction error loss function L pred (θ) is:

[0125]

[0126] Where x is the predicted value, y is the actual value, and M is the functional relationship between the predicted value and the network parameters.

[0127] S6: The historical photovoltaic power output data from adjacent similar day samples are used as the input and output of the adaptive gated recurrent unit neural network model, and the prediction error and related information error are balanced by uncertainty weighting (UW) and inverse normalized to train the model.

[0128] The core idea of ​​balancing prediction error and related information error based on the uncertainty weighted method is to integrate L... pred and L ada As two tasks, a suitable balance is obtained by exploring the uncertainties of the two tasks, specifically as follows:

[0129] S61: Assume that the posterior distribution of the true value for each task is a normal distribution with the predicted value as the mean, and the variance is noise, representing the difficulty of the task:

[0130] p(y|f θ (x))=N(f θ (x),σ 2 )

[0131] Where p is the likelihood function, f(X) is the output of the neural network, θ is the weight of the input X, σ is the standard deviation, N is the normal distribution expression, and y is the given output value.

[0132] S62: Determine the joint distribution of the two tasks:

[0133]

[0134] Where y1 and y2 are the output values ​​of the two tasks, respectively.

[0135] S63: The optimization objective is transformed into finding the maximum likelihood of the above joint distribution, which is equivalent to minimizing its negative value. Therefore, the minimization objective is:

[0136]

[0137] Where σ1 is L pred The standard deviation of the output value, σ², is L. ada The standard deviation of the output values.

[0138] S64: Take the historical photovoltaic power output data from adjacent similar day samples under a certain weather type as the input of the adaptive gated recurrent unit neural network model for the corresponding weather type, and the latter as the output of the model to train the model.

[0139] S7: Obtain meteorological data for the predicted day and determine the corresponding weather type. Perform principal component analysis on the meteorological data for the predicted day to obtain the meteorological data features for the predicted day. Calculate the predicted cosine distance between the meteorological data features for the predicted day and the meteorological data features of the corresponding reference day sample. Based on the predicted cosine distance, determine the closest similar day sample. Use the historical photovoltaic power output data of the closest similar day sample as the model input. Call the adaptive gated recurrent unit neural network model that matches the weather type of the predicted day to predict the photovoltaic power output for the predicted day.

[0140] Table 2 shows a comparison of the prediction results of the present invention and existing methods for predicting ultra-short-term photovoltaic power output from the perspective of commonly used evaluation indicators such as MAE, MAPE, and RMSE. Among them, ARMA is an autoregressive moving average model, ARIMA is a differential integrated moving average autoregressive model, SVM is a support vector machine model, CNN is a convolutional neural network, LSTM is a long short-term memory neural network, GRU is a common gated recurrent unit neural network, and FCM-UW-ADAGRU is the method described in the present invention.

[0141] Table 2 Evaluation of Prediction Results

[0142] method MAE MAPE RMSE ARMA 17.34 12.03% 23.04 ARIMA 16.97 11.59% 20.58 SVM 13.28 8.45% 17.52 CNN 12.24 7.42% 18.34 LSTM 10.51 7.01% 15.21 GRU 10.33 6.45% 13.23 FCM-UW-ADAGRU 8.52 4.03% 10.01

[0143] Based on the results shown in Table 2, the method of the present invention has smaller MAE, MAPE, and RMSE, demonstrating the effectiveness and predictive accuracy of the method.

[0144] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A method for predicting ultra-short-term photovoltaic power output based on transient weather conditions, characterized in that, Includes the following steps: S1: Acquire historical sample data and preprocess it. The historical sample data includes ultra-short-term historical photovoltaic power output data and corresponding historical meteorological data. S2: Use the statistical indicators of historical meteorological data as clustering indicators to perform fuzzy C-means clustering on historical sample data, and cluster the historical sample data into multiple weather types. Sample data under the same weather type are similar daily samples. S3: Based on principal component analysis, feature dimensionality reduction is performed on historical meteorological data for each weather type to obtain the dimensionality-reduced meteorological data features; S4: Randomly select a reference day sample under each weather type, and sort the similar day samples based on the cosine distance between the meteorological data characteristics of the similar day samples and the reference day samples; S5: Construct an adaptive gated recurrent unit neural network model for each weather type. The adaptive gated recurrent unit neural network model includes a distribution recognition module and an adaptive distribution matching module. The distribution recognition module is used to identify that the data distribution of similar daily samples under the same weather type is different. The adaptive distribution matching module is used to learn the relevant information between similar daily samples under the same weather type. S6: The historical photovoltaic power output data in the sorted adjacent similar day samples are used as the input and output of the adaptive gated recurrent unit neural network model, and the model is trained based on the uncertainty weighting method to balance the prediction error and related information error. S7: Obtain meteorological data for the predicted day and determine the corresponding weather type. Perform principal component analysis on the meteorological data for the predicted day to obtain the meteorological data features for the predicted day. Calculate the prediction cosine distance between the meteorological data features for the predicted day and the meteorological data features of the corresponding reference day sample. Based on the prediction cosine distance, determine the closest similar day sample. Use the historical photovoltaic power output data of the closest similar day sample as the model input. Call the adaptive gated recurrent unit neural network model that matches the weather type of the predicted day to predict the photovoltaic power output for the predicted day. The distribution identification module is constructed based on the maximum mean difference method, specifically as follows: in, h s and h t These are two different sets of sample data. n s and n t These represent the number of samples in each of the two groups. k For kernel function, i and j Indicates the first i and j One data point; The adaptive distribution matching module is used to learn relevant information among similar daily samples under the same weather type, specifically represented as a loss function: in, The loss function representing the adaptive distribution matching module. Let the prediction error loss function be... L ada The relevant information error loss function, To balance the prediction error and related information error, K These are parameters to avoid overlearning. D j,i It is the first j,i species distribution, θ Represents model parameters; The specific details of balancing prediction error and related information error based on the uncertainty weighted method are as follows: in, for L pred The standard deviation of the output value for L ada The standard deviation of the output values.

2. The ultra-short-term photovoltaic power output prediction method based on transient weather as described in claim 1, characterized in that, Step S1 includes the following steps: S11: Obtain historical sample data; S12: Utilizing 3 σ The criteria check and remove outliers from historical sample data; S13: Use the Lagrange interpolation method to impute missing values ​​in historical sample data; S14: Normalize the historical sample data.

3. The ultra-short-term photovoltaic power output prediction method based on transient weather as described in claim 1, characterized in that, The statistical indicators of the historical meteorological data include harmonic mean, geometric mean, coefficient of variation, skewness, and kurtosis.

4. The ultra-short-term photovoltaic power output prediction method based on transient weather as described in claim 1, characterized in that, The weather types are divided into five categories: sunny, cloudy, overcast, rainy, and extreme weather.

5. The ultra-short-term photovoltaic power output prediction method based on transient weather as described in claim 1, characterized in that, The clustering loss function for fuzzy C-means clustering of historical sample data is: in, It is the clustering loss function; u ij It is the first i The sample belongs to the first j Membership degree of a class U This is the membership matrix; N The number of samples; V It is a cluster center; m It is the membership factor, 1≤ m <∞; d ij It is the distance from the sample data to the cluster center.

6. The ultra-short-term photovoltaic power output prediction method based on transient weather as described in claim 1, characterized in that, The specific method for feature dimensionality reduction of meteorological data based on principal component analysis (PCA) to obtain meteorological data features is as follows: Meteorological data are constructed into a meteorological matrix; PCA is performed on the meteorological matrix to obtain the contribution rate of each principal component; and the principal component with the highest contribution rate is selected as the extracted meteorological data feature. The calculation method for the contribution rate of each principal component is as follows: in, The eigenvectors of the covariance matrix of the meteorological matrix are... X for N × m The meteorological matrix N For the number of samples, m As the initial feature dimension, These are the eigenvalues ​​of the covariance matrix of the meteorological matrix. The contribution rate of each principal component.

7. The ultra-short-term photovoltaic power output prediction method based on transient weather as described in claim 1, characterized in that, The adaptive gated recurrent unit neural network model consists of an input layer, two hidden layers, a fully connected layer, and an output layer.