Distributed photovoltaic cluster output interval prediction method and terminal
By combining the ARIMA and RCGAN models, the accuracy and speed issues of distributed photovoltaic cluster output forecasting are solved, the accuracy of photovoltaic output point forecasting and interval forecasting is achieved, and the stable operation of the smart distribution network is supported.
Patent Information
- Application Number
- CN202410716553.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-06-04
AI Technical Summary
In existing technologies, the accuracy and speed of distributed photovoltaic cluster output prediction are insufficient, making it difficult to meet the stability and reliability requirements of the power system after large-scale grid connection.
Combining the Autoregressive Integrated Moving Average (ARIMA) model and the Recurrent Convolutional Generative Adversarial Network (RCGAN) model, the photovoltaic output point forecast and interval forecast are realized through fitting and training of historical output data, taking into account the influence of time and space conditions.
It improves the accuracy of distributed photovoltaic cluster output range prediction, is applicable to distributed photovoltaic cluster prediction with different numbers, geographical locations and climatic conditions, and supports smart distribution network scheduling optimization.
Smart Images

Figure CN118709827B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent distribution network dispatching and control, and in particular to a method and terminal for predicting the output interval of a distributed photovoltaic cluster. Background Art
[0002] In recent years, new energy construction has shifted from base-based development to a combined approach of centralized and distributed development, forming a development model that organically combines large-scale centralized utilization, distributed production, and local consumption. Distributed photovoltaics offer significant advantages, including high resource utilization, minimal negative environmental impact, and excellent economic and social benefits. However, their power generation is susceptible to direct or indirect influences from various regional meteorological factors, such as solar irradiance, temperature, and relative humidity, resulting in a degree of randomness, intermittency, and uncertainty. Therefore, the large-scale grid integration of distributed photovoltaics will adversely affect the stability and reliability of power system operations. Forecasting distributed photovoltaic output will help ensure the safe, stable, and economical operation of the power system after the integration of large-scale distributed photovoltaic clusters.
[0003] Currently, there is a significant body of research on distributed photovoltaic output forecasting methods, which are primarily categorized as point forecasting and interval forecasting based on the forecast format. Most current research focuses on point forecasting. Point forecasting is a deterministic method, resulting in a fixed value at a specific time. It contains limited information and struggles to express the probabilistic confidence level of the forecast result. Interval forecasting, on the other hand, outputs upper and lower bounds for photovoltaic power generation output at a given confidence level, providing decision makers with more information and significant implications for improving power system resilience to adverse effects of photovoltaic power generation output fluctuations. Current photovoltaic power generation output forecasting methods primarily focus on predicting the output power of a single photovoltaic power station. With the construction and integration of a large number of distributed photovoltaic power stations, the prediction of distributed photovoltaic cluster power generation output has become increasingly important. However, research on distributed photovoltaic cluster output forecasting started relatively late, resulting in limited research results, and the accuracy and speed of the methods need to be further improved. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and terminal for predicting the output interval of a distributed photovoltaic cluster, which can improve the accuracy of the prediction of the output interval of the distributed photovoltaic cluster.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A distributed photovoltaic cluster output interval prediction method, comprising:
[0007] Obtain historical output data of distributed photovoltaic clusters;
[0008] Establishing a differential autoregressive moving average model, and fitting the differential autoregressive moving average model according to the historical output data to obtain a first prediction model;
[0009] Establishing a cyclic convolutional generative adversarial network model, and training the cyclic convolutional generative adversarial network model based on the historical output data to obtain a second prediction model;
[0010] Predicting the output of a single distributed photovoltaic unit using the first prediction model to obtain first prediction data;
[0011] Inputting the first prediction data into the second prediction model to perform output prediction on the distributed photovoltaic cluster to obtain second prediction data;
[0012] A prediction interval for the output of the distributed photovoltaic cluster is determined based on the second prediction data.
[0013] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0014] A distributed photovoltaic cluster output interval prediction terminal includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, each step of the above-mentioned distributed photovoltaic cluster output interval prediction method is implemented.
[0015] The beneficial effects of the present invention are as follows: by establishing an autoregressive moving average (ARIMA) model and fitting the ARIMA model based on historical output data, a first prediction model for photovoltaic output point prediction is obtained, and at the same time, by establishing a recurrent convolution generative adversarial network (RCGAN) model and training the RCGAN model based on historical output data, a second prediction model for photovoltaic interval prediction is obtained. In the prediction process, the time series output characteristics of distributed photovoltaics are first extracted by the first prediction model to achieve photovoltaic output point prediction, and then the spatial position output characteristics of distributed photovoltaics are extracted by the second prediction model to achieve photovoltaic output interval prediction. This effectively combines photovoltaic output point prediction and interval prediction, fully considers the impact of time and space conditions on distributed photovoltaic output, and improves the accuracy of distributed photovoltaic cluster output interval prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A flowchart of a method for predicting output intervals of distributed photovoltaic clusters provided by an embodiment of the present invention;
[0017] Figure 2 A schematic diagram of the structure of a distributed photovoltaic cluster output interval prediction terminal provided by an embodiment of the present invention;
[0018] Description of labels:
[0019] 100. A distributed photovoltaic cluster output range prediction terminal; 101. Memory; 102. Processor. DETAILED DESCRIPTION
[0020] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following description is given in conjunction with the embodiments and accompanying drawings.
[0021] An embodiment of the present invention provides a method for predicting output intervals of a distributed photovoltaic cluster, comprising:
[0022] Obtain historical output data of distributed photovoltaic clusters;
[0023] Establishing a differential autoregressive moving average model, and fitting the differential autoregressive moving average model according to the historical output data to obtain a first prediction model;
[0024] Establishing a cyclic convolutional generative adversarial network model, and training the cyclic convolutional generative adversarial network model based on the historical output data to obtain a second prediction model;
[0025] Predicting the output of a single distributed photovoltaic unit using the first prediction model to obtain first prediction data;
[0026] Inputting the first prediction data into the second prediction model to perform output prediction on the distributed photovoltaic cluster to obtain second prediction data;
[0027] A prediction interval for the output of the distributed photovoltaic cluster is determined based on the second prediction data.
[0028] From the above description, it can be seen that the beneficial effects of the present invention are: by establishing a differential autoregressive moving average model (hereinafter referred to as the ARIMA model) and fitting the ARIMA model based on historical output data, a first prediction model for photovoltaic output point prediction is obtained, and at the same time, by establishing a cyclic convolution generative adversarial network model (hereinafter referred to as the RCGAN model) and training the RCGAN model based on historical output data, a second prediction model for photovoltaic interval prediction is obtained. In the prediction process, the time series output characteristics of distributed photovoltaics are first extracted through the first prediction model to realize photovoltaic output point prediction, and then the spatial position output characteristics of distributed photovoltaics are extracted from the photovoltaic output point prediction data through the second prediction model to realize photovoltaic output interval prediction, which effectively combines photovoltaic output point prediction and interval prediction, fully considers the influence of time and space conditions on distributed photovoltaic output, and improves the accuracy of distributed photovoltaic cluster output interval prediction.
[0029] Furthermore, fitting the differential autoregressive moving average model according to the historical output data to obtain a first prediction model includes:
[0030] Selecting first output data of a single distributed photovoltaic unit from the historical output data;
[0031] The differential autoregressive moving average model is fitted according to the first output data to obtain a first prediction model.
[0032] From the above description, it can be seen that since the historical output data is related data of the distributed photovoltaic cluster, the historical output data contains the output data of multiple distributed photovoltaic units, and the spatial position of each distributed photovoltaic unit is different. Therefore, when fitting the ARIMA model, the first output data of each distributed photovoltaic unit is input as independent data for fitting. In this way, only the influence of the time conditions of each distributed photovoltaic unit is considered, avoiding the interference of the spatial conditions of the distributed photovoltaic units on the first prediction model, and improving the fitting accuracy of the first prediction model.
[0033] Furthermore, after establishing the cyclic convolutional generative adversarial network model, the method further includes:
[0034] The Wasserstein distance and gradient penalty function are introduced into the cyclic convolutional generative adversarial network model.
[0035] From the above description, we can see that by introducing Wasserstein distance and gradient penalty function into the RCGAN model for optimization, the prediction performance of the RCGAN model is improved.
[0036] Furthermore, the historical output data includes output data of multiple distributed photovoltaics at a certain date and time; the cyclic convolutional generative adversarial network model includes a generator and a discriminator;
[0037] The step of training the cyclic convolutional generative adversarial network model according to the historical output data to obtain a second prediction model includes:
[0038] Dividing the historical output data by date to obtain second output data of multiple distributed photovoltaic units on each date;
[0039] After splicing the second output data with the random noise data, the concatenated data are input into the generator to obtain generated data;
[0040] Calculating average output data of the second output data, and concatenating the average output data with the second output data to obtain true output data;
[0041] splicing the second output data with the generated data to obtain pseudo output data;
[0042] Inputting the true output data and the pseudo output data into the discriminator at the same time to obtain a discrimination result;
[0043] Calculating the loss functions of the generator and the discriminator respectively based on the generated data and the discrimination result, and optimizing and updating the network weight parameters of the generator and the discriminator by using the RMSprop optimization algorithm;
[0044] After the training is completed, the generator is retained to obtain a second prediction model.
[0045] From the above description, it can be seen that since the historical output data contains the output data of multiple distributed photovoltaics at a certain date and time, the historical output data contains the characteristics of distributed photovoltaics changing with time conditions. Therefore, it is necessary to divide the historical output data into the second output data of multiple distributed photovoltaics on each date according to the date, to ensure that the second output data input into the RCGAN model for training only contains the spatial characteristics of distributed photovoltaics, and to avoid the time conditions of distributed photovoltaics from interfering with the second prediction model; at the same time, the generator in the RCGAN model learns from the second output data to generate fake sample data that is indistinguishable from the real one, while the discriminator receives the real second output data and the fake sample data for judgment and distinction. During the training process, the generator and the discriminator compete, learn and confront each other, so that the generation ability of the generator and the discrimination ability of the discriminator are gradually enhanced and converged, thereby accurately capturing the characteristics of the distributed photovoltaic output data under spatial conditions and achieving accurate prediction.
[0046] Furthermore, the establishment of the differential autoregressive moving average model is specifically as follows:
[0047]
[0048] Among them, Y t represents the sample data value, c represents a constant, ε t represents the white noise error term at time t, p represents the p-order autoregressive process, represents the autoregressive coefficient, q represents the q-order moving average process, (θ1,θ2,…,θ p ) represents the moving average coefficient, Y t-i Represents the data value at the past time, ε t-i represents the white noise error term at the past time.
[0049] As can be seen from the above description, the ARIMA model includes both an autoregressive model and a moving average model. The autoregressive model describes the relationship between current and historical values, predicting itself based on past values. The autoregressive model requires that the fitted curve derived from historical output data continue to predict along its existing form for a period of time in the future. The moving average model accounts for the accumulation of error terms in the autoregressive model, thereby eliminating random fluctuations in the forecast.
[0050] Furthermore, fitting the differential autoregressive moving average model according to the first output data to obtain a first prediction model includes:
[0051] Randomly selecting a date from the historical output data as a prediction date;
[0052] All first output data before the forecast date in the historical output data are used as data values of the past time of the differential autoregressive moving average model, and the first output data of the forecast date in the historical output data are used as sample data values of the differential autoregressive moving average model;
[0053] Fitting the differential autoregressive moving average model according to the data value at the past moment and the sample data value to obtain an autocorrelation coefficient and a partial autocorrelation coefficient;
[0054] A q value and a p value in the differential autoregressive moving average model are determined according to the autocorrelation coefficient and the partial autocorrelation coefficient, and a first prediction model is obtained based on the q value and the p value.
[0055] As can be seen from the above description, since the historical output data includes distributed PV output data from multiple dates, the ARIMA model is fitted by randomly selecting a date as the prediction date, using the output data before the prediction date as the past data value, and the output data on the prediction date as the current data value. In this case, by selecting different dates as the prediction date, multiple sets of sample data are obtained, and the ARIMA model is fitted multiple times, resulting in highly accurate q and p values, ensuring the accuracy of the first prediction model.
[0056] Furthermore, the establishing of the cyclic convolutional generative adversarial network model includes:
[0057] Define a set of random noise data z as the input data of the generator, with p z (z) represents the probability distribution of random noise data z, Indicates the historical output data The output of the generator is defined as the generated data G(z), and the probability distribution is p G (z); define the input of the discriminator as the historical output data and the generated data G(z), the output of the discriminator is a scalar D(G(z)), which indicates that the random noise data z obeys the historical output data The probability distribution of probability;
[0058] According to the training objectives of the generator and the discriminator, the loss functions of the generator and the discriminator are constructed respectively:
[0059]
[0060]
[0061] Among them, L G represents the loss function of the generator, L D represents the loss function of the discriminator, represents the probability distribution p of random noise data z z The expected value of (z), Indicates the historical output data The probability distribution of expected value;
[0062] Determine the objective function of the cyclic convolutional generative adversarial network model:
[0063]
[0064] in, Denotes the objective function, and V(D,G) denotes the binary cross entropy function.
[0065] From the above description, we can see that the objective function of the RCGAN model is to minimize the loss function of the generator and maximize the loss function of the discriminator, so as to represent that the generation ability of the generator and the discrimination ability of the discriminator are gradually enhanced and converged, completing the optimization training of the RCGAN model.
[0066] Furthermore, the generator includes a first long short-term memory network, a second long short-term memory network, a third long short-term memory network and a fully connected layer;
[0067] The step of splicing the second output data with the random noise data and inputting the spliced data into the generator to obtain generated data includes:
[0068] After concatenating the second output data with the random noise data, the data are sequentially input into the first long short-term memory network, the second long short-term memory network, and the third long short-term memory network for feature extraction, and the extracted features are fused and outputted into generated data through the fully connected layer;
[0069] The input dimension of the first long short-term memory network is (N+1)×T, where N represents the number of distributed photovoltaic units included in the second output data, the random noise data is a two-dimensional matrix, and T represents the number of columns of the random noise data;
[0070] The output dimension of the fully connected layer is 1×1×T.
[0071] As can be seen from the above description, the generator of the RCGAN model uses a long short-term memory network. While further improving the accuracy of time series prediction, it can also collect the output characteristics of multiple distributed photovoltaic power stations with different spatial location characteristics, and achieve accurate prediction of the output of distributed photovoltaic clusters.
[0072] Furthermore, the discriminator includes a convolutional layer, a pooling layer and a global mean pooling layer;
[0073] The step of simultaneously inputting the true output data and the pseudo output data into the discriminator to obtain a discrimination result comprises:
[0074] The true output data and the pseudo output data are simultaneously input into the convolution layer and the pooling layer, feature extraction and feature dimensionality reduction are performed in the convolution layer and the pooling layer respectively, and the generated data and the average output data are classified according to the extracted features through the global mean pooling layer, and the discrimination result is output.
[0075] From the above description, we can see that the convolution layer is used to extract the features of true output data and false output data, the pooling layer is used to reduce the size of the convolution kernel and retain the features of the data to achieve data dimensionality reduction, and finally the global mean pooling layer performs classification processing based on the final features to distinguish true and false data and output the discrimination results.
[0076] Another embodiment of the present invention provides a distributed photovoltaic cluster output interval prediction terminal, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the various steps in the above-mentioned distributed photovoltaic cluster output interval prediction method.
[0077] From the above description, it can be seen that the beneficial effects of the present invention are: by establishing an ARIMA model and fitting the ARIMA model based on historical output data, a first prediction model for photovoltaic output point prediction is obtained, and at the same time, by establishing an RCGAN model and training the RCGAN model based on historical output data, a second prediction model for photovoltaic interval prediction is obtained. In the prediction process, the time series output characteristics of distributed photovoltaics are first extracted by the first prediction model to achieve photovoltaic output point prediction, and then the spatial position output characteristics of distributed photovoltaics are extracted by the second prediction model to achieve photovoltaic output interval prediction. This effectively combines photovoltaic output point prediction and interval prediction, fully considers the impact of time and space conditions on distributed photovoltaic output, and improves the accuracy of distributed photovoltaic cluster output interval prediction.
[0078] The embodiments of the present invention provide a distributed photovoltaic cluster output interval prediction method and terminal, which can be applied to intelligent distribution network scheduling optimization scenarios. The method combines the ARIMA model with the RCGAN model to predict the output of distributed photovoltaic clusters, thereby improving the accuracy of the prediction. At the same time, during the prediction process, users can observe the output prediction data of each distributed photovoltaic unit. The prediction method of the present invention has strong versatility and can be widely applied to distributed photovoltaic cluster prediction scenarios with different numbers, different geographical locations, and different climatic conditions. The following is an illustration of the specific embodiment:
[0079] Please refer to Figure 1 , embodiment 1 of the present invention is:
[0080] A distributed photovoltaic cluster output interval prediction method, comprising:
[0081] S1. Obtain historical output data of distributed photovoltaic clusters.
[0082] In some embodiments, all distributed photovoltaics in a county are regarded as a distributed photovoltaic cluster for data collection and interval prediction.
[0083] In some embodiments, the data set of historical output data of a distributed photovoltaic cluster is P, where the data set P includes N sub-data sets P n , where each sub-dataset P n Represents the historical output data of a distributed photovoltaic unit, so the current dataset P contains the historical output data of N distributed photovoltaic units. n The specific expression is:
[0084]
[0085] Among them, p n,d,t represents the output data of the nth distributed photovoltaic unit at time t on the dth day, D represents the maximum number of days included in the data set P, and T represents the number of distributed photovoltaic output data collected daily.
[0086] In some embodiments, in order to improve the solution speed and calculation accuracy, the maximum value max(p n,d,t ) and minimum value min(p n,d,t ), according to the maximum value max(p n,d,t ) and minimum value min(p n,d,t ) Each output data p n,d,t Perform normalization processing, specifically:
[0087]
[0088] Among them, p' n,d,tIndicates the normalized output data.
[0089] Normalized sub-dataset P' n Specifically:
[0090]
[0091] S2. Establish a differential autoregressive moving average model, and fit the differential autoregressive moving average model according to the historical output data to obtain a first prediction model.
[0092] Specifically, step S2 includes:
[0093] S21. Establish a differential autoregressive moving average model ARIMA (p, d, q).
[0094] The step S21 is specifically as follows:
[0095]
[0096] Among them, Y t represents the sample data value, c represents a constant, ε t represents the white noise error term at time t, p represents the p-order autoregressive process, represents the autoregressive coefficient, q represents the q-order moving average process, (θ1,θ2,…,θ p ) represents the moving average coefficient, Y t-i Represents the data value at the past time, ε t-i represents the white noise error term at the past time.
[0097] It should be noted that the parameter p is used to establish the autocorrelation in the time series data, representing the current sample data value Y in the time series t and the past data value Y t-i The part where there is a relationship, so as to predict the current data value based on the past data value. The parameter d represents the d-order difference. The time series after the d-order difference of the original time series has stationary properties. The parameter q represents the relationship between the lagged error terms in the time series data, which represents the current sample data value Y in the time series. t and the past time error term ε t-i The part where there is a relationship, so that the current data value is predicted based on the error of the previous prediction.
[0098] S22: Select first output data of a single distributed photovoltaic unit from the historical output data.
[0099] S23. Fit the differential autoregressive moving average model according to the first output data to obtain a first prediction model.
[0100] Specifically, step S23 includes:
[0101] S231. Randomly select a date from the historical output data as a prediction date.
[0102] S232. Use all the first output data before the predicted day in the historical output data as the data values of the past moments of the differential autoregressive moving average model, and use the first output data of the predicted day in the historical output data as the sample data value of the differential autoregressive moving average model.
[0103] In some embodiments, the Sth day in the historical output data is defined as the prediction day, and the sub-datasets of N distributed photovoltaic units from the (S-1-D)th day to the (S-1)th day are used as the data values of the past moments of the ARIMA model, and the sub-datasets of N distributed photovoltaic units on the Sth day are used as the sample data values of the ARIMA model to fit the ARIMA model.
[0104] S233. Perform fitting calculation on the differential autoregressive moving average model according to the data value at the past moment and the sample data value to obtain an autocorrelation coefficient and a partial autocorrelation coefficient.
[0105] S234. Determine a q value and a p value in the differential autoregressive moving average model according to the autocorrelation coefficient and the partial autocorrelation coefficient, and obtain a first prediction model based on the q value and the p value.
[0106] That is, the fitting calculation of the ARIMA model is performed to determine the values of the parameters q and p in the ARIMA model.
[0107] In some embodiments, the q-value and p-value of the ARIMA model may also be determined by computer ergodic methods.
[0108] S3. Establish a cyclic convolutional generative adversarial network model, and train the cyclic convolutional generative adversarial network model according to the historical output data to obtain a second prediction model.
[0109] Specifically, step S3 includes:
[0110] S31. Establish a cyclic convolutional generative adversarial network model, wherein the cyclic convolutional generative adversarial network model includes a generator and a discriminator.
[0111] Specifically, step S31 includes:
[0112] S311, define a set of random noise data z as the input data of the generator, with p z (z) represents the probability distribution of random noise data z, Indicates the historical output data The output of the generator is defined as the generated data G(z), and the probability distribution is p G (z); define the input of the discriminator as the historical output data and the generated data G(z), the output of the discriminator is a scalar D(G(z)), which indicates that the random noise data z obeys the historical output data The probability distribution of probability;
[0113] S312. Construct loss functions of the generator and the discriminator respectively according to the training objectives of the generator and the discriminator:
[0114]
[0115] Among them, L G represents the loss function of the generator, L D represents the loss function of the discriminator, represents the probability distribution p of random noise data z z The expected value of (z), Indicates the historical output data The probability distribution of expected value;
[0116] S313, determining the objective function of the cyclic convolutional generative adversarial network model:
[0117]
[0118] in, Denotes the objective function, and V(D,G) denotes the binary cross entropy function.
[0119] In an optional implementation, after step S31, the method further includes:
[0120] S314. Introducing Wasserstein distance and gradient penalty function into the cyclic convolutional generative adversarial network model.
[0121] Specifically, Wasserstein distance is used to solve the problems of gradient vanishing, instability, and mode collapse of the RCGAN model, thereby improving the performance of the model.
[0122] Among them, the Wasserstein distance is specifically:
[0123]
[0124] Among them, W(p data ,p G) is expressed as the lower bound of (u, v) ~ γ expectation, indicating that the data distribution p will be generated G Fitting into the historical output data distribution p data , the distance u needs to be moved to v, where u and v represent the historical output data randomly sampled from the joint distribution γ The samples of Ω(p data ,p G ) indicates that p data and p G is the set of joint probability distributions γ of the marginal distributions.
[0125] The Kantorovich-Rubinstein dual form is used to describe the sample and historical output data of the generated data G(z) The distance between samples:
[0126]
[0127] Among them, ||f D ||L≤K indicates that the discriminator function satisfies K-Lipschitz continuity, that is, the upper limit of the absolute value of the function gradient is K; in order to ensure that the gradient does not exceed the limit K, the discriminator function is introduced into the above formula (8) The gradient penalty function within the domain of definition makes the discriminator function Approximately satisfying K-Lipschitz continuity to accurately describe the Wasserstein distance, at this time, the objective function of the RCGAN model is transformed from formula (6) to:
[0128]
[0129] The historical output data includes the output data of multiple distributed photovoltaic units at a certain date and time.
[0130] S32: Divide the historical output data by date to obtain second output data of multiple distributed photovoltaic units on each date.
[0131] In some embodiments, the normalized sub-dataset P' in the historical output data is n Divide the data into D parts according to the number of days, and you can get the second output data of multiple distributed photovoltaic units on each date. Among them, the output data of the nth distributed photovoltaic unit on the dth day is expressed as:
[0132] P' n,d =[p' n,d,1 p' n,d,2 … p' n,d,T ] (11)
[0133] The second output data of multiple distributed photovoltaic units on day d is expressed as:
[0134] P' d =[P' 1,d ,P' 2,d ,…,P' N,d ] (12)
[0135] S33: After splicing the second output data and the random noise data, input the concatenated data into the generator to obtain generated data.
[0136] In some embodiments, the random noise data z is a two-dimensional matrix with a size of 1×T; the sample data after the second output data and the random noise data z are spliced together is a three-dimensional matrix with a size of (N+1)×1×T. Then, the sample data after the second output data of multiple distributed photovoltaic units on day d and the random noise data are spliced together is expressed as: {P' 1,d ,P' 2,d ,…,P' N,d ,z}; After splicing the second output data of each date in the historical output data with the random noise data, D batches of sample data can be obtained.
[0137] In an optional embodiment, the generator includes a first long short-term memory network, a second long short-term memory network, a third long short-term memory network, and a fully connected layer, then step S33 includes:
[0138] S331. After concatenating the second output data with the random noise data, the data are sequentially input into the first long short-term memory network, the second long short-term memory network, and the third long short-term memory network for feature extraction, and the extracted features are fused and output through the fully connected layer to generate data.
[0139] The input dimension of the first long short-term memory network is (N+1)×T, where N represents the number of distributed photovoltaic units contained in the second output data, the random noise data is a two-dimensional matrix, and T represents the number of columns of the random noise data; the output dimension of the fully connected layer is 1×1×T.
[0140] In some embodiments, the structure of the generator is specifically as follows: a first long short-term memory network is sequentially connected to a second long short-term memory network, a third long short-term memory network, and a fourth fully connected layer. The first long short-term memory network has an input dimension of (N+1)×T, a hidden layer dimension of 128, and an activation function of the hyperbolic tangent function Tanh. The second long short-term memory network has an input dimension of 128, a hidden layer dimension of 64, and an activation function of the hyperbolic tangent function Tanh. The third long short-term memory network has an input dimension of 64, a hidden layer dimension of 16, and an activation function of the hyperbolic tangent function Tanh. The fourth fully connected layer has T neurons, an activation function of the hyperbolic tangent function Tanh, and an output dimension of 1×1×T.
[0141] S34. Calculate average output data of the second output data, and concatenate the average output data with the second output data to obtain true output data.
[0142] In some embodiments, the average output data of N distributed photovoltaic clusters on day d is calculated. Specifically:
[0143]
[0144] In some embodiments, the second output data and the average output data are both three-dimensional matrices, and the size of the true output data is (N+1)×1×T. Then, the true output data obtained by splicing the second output data and the average output data of multiple distributed photovoltaic units on day d is expressed as: In this way, the true output data of D batches can be obtained.
[0145] S35: Concatenate the second output data with the generated data to obtain pseudo output data.
[0146] In some embodiments, the second output data and the generated data are both three-dimensional matrices, and the size of the pseudo output data is (N+1)×1×T. Then, the pseudo output data obtained by splicing the second output data of multiple distributed photovoltaic units and the generated data on the dth day is expressed as: {P' 1,d ,P' 2,d ,…,P' N,d ,G(z)}, thus D batches of pseudo output data can be obtained.
[0147] S36 , inputting the true output data and the pseudo output data into the discriminator at the same time to obtain a discrimination result.
[0148] In some embodiments, the judgment result is the generated data G(z) and the average output data The classification results are used to determine the authenticity of the data.
[0149] In an optional embodiment, the discriminator includes a convolutional layer, a pooling layer, and a global mean pooling layer, and step S36 includes:
[0150] S361. Input the true output data and the pseudo output data into the convolution layer and the pooling layer at the same time, perform feature extraction and feature dimensionality reduction in the convolution layer and the pooling layer respectively, and classify the generated data and the average output data according to the extracted features through the global mean pooling layer, and output the judgment result.
[0151] In some embodiments, the convolutional layer includes a first two-dimensional convolutional layer, a third two-dimensional convolutional layer, a fifth two-dimensional convolutional layer, and a seventh two-dimensional convolutional layer; and the pooling layer includes a second two-dimensional pooling layer, a fourth two-dimensional pooling layer, and a sixth two-dimensional pooling layer. The discriminator structure is specifically as follows: the first two-dimensional convolutional layer is sequentially connected to the second two-dimensional pooling layer, the third two-dimensional convolutional layer, the fourth two-dimensional pooling layer, the fifth two-dimensional convolutional layer, the sixth two-dimensional pooling layer, the seventh two-dimensional convolutional layer, and the global mean pooling layer. The first and fifth two-dimensional convolutional layers have 32 convolution kernels, each with a size of 3, a stride of 1, an edge padding of 1, and an activation function of the linear rectifier function LeakyReLU. The third two-dimensional convolutional layer has 64 convolution kernels, each with a size of 3, a stride of 1, an edge padding of 1, and an activation function of the linear rectifier function LeakyReLU. The second, fourth, and sixth two-dimensional pooling layers have a pooling kernel size of 2 and a stride of 2; the global mean pooling layer outputs a feature matrix.
[0152] S37. Calculate the loss functions of the generator and the discriminator respectively based on the generated data and the discrimination result, and optimize and update the network weight parameters of the generator and the discriminator through the RMSprop optimization algorithm.
[0153] In some embodiments, optimizing and updating the network weight parameters through the RMSprop optimization algorithm can improve the speed and effect of model training.
[0154] Among them, the RMSprop optimization algorithm is specifically as follows:
[0155]
[0156] Among them, s dw and s db They represent the accumulated gradient momentum of weight W and bias value b during the t-1 round of iterations; β represents the parameter of gradient accumulation, which is generally set to 0.9; dW and db represent the differential units of W and b respectively; α represents the learning rate, which is set to 2×10 -4 ; ε represents an auxiliary parameter to prevent the denominator from being zero.
[0157] S38: After one round of training, if the training target is not reached, return to step S32 for the next round of training. If the training target is not reached, the training is terminated and the network structure and parameters of the generator are retained to obtain a second prediction model.
[0158] S4. Use the first prediction model to predict the output of a single distributed photovoltaic unit to obtain first prediction data.
[0159] In some embodiments, the output of N distributed photovoltaic units on the Sth day is predicted using a first prediction model to obtain first prediction data, wherein the first prediction data includes N prediction sub-data, and the prediction sub-data is the prediction data of the nth distributed photovoltaic unit on the Sth day. The prediction sub-data is specifically:
[0160] P' n,S =[p' n,S,1 p' n,S,2 … p' n,S,T ] (15)
[0161] S5. Input the first prediction data into the second prediction model to perform output prediction on the distributed photovoltaic cluster to obtain second prediction data.
[0162] In some embodiments, the first prediction data is concatenated with the random noise data z of T dimensions to form three-dimensional sample data, the size of which is (N+1)×1×T. The sample data is represented as: {P' 1,S ,P' 2,S ,…,P' N,S ,z}, input the sample data into the generator of the second prediction model to obtain multiple second prediction data of the distributed photovoltaic cluster on the Sth day, where the dimension size of each second prediction data is 1×T.
[0163] In some embodiments, 500 pieces of second prediction data may be generated based on a corresponding amount of historical output data.
[0164] S6. Determine a prediction interval for the output of the distributed photovoltaic cluster based on the second prediction data.
[0165] In some embodiments, all second prediction data are divided according to time to obtain predicted output data of N distributed photovoltaic clusters at each time t, and the maximum and minimum values of the predicted output data at each time t are selected to form an interval range to obtain the prediction interval of the current distributed photovoltaic cluster output.
[0166] Please refer to Figure 2 , the second embodiment of the present invention is:
[0167] A distributed photovoltaic cluster output interval prediction terminal 100 includes a memory 101, a processor 102, and a computer program stored in the memory 101 and running on the processor 102. When the processor 102 executes the computer program, it implements the various steps of the distributed photovoltaic cluster output interval prediction method of the above-mentioned embodiment 1.
[0168] In summary, the present invention provides a distributed photovoltaic cluster output interval prediction method and terminal, which establishes an ARIMA model and fits the ARIMA model based on the output data of a single distributed photovoltaic at multiple times of a day, thereby obtaining a first prediction model, and then extracting the time series output characteristics of a single distributed photovoltaic based on the first prediction model to capture the output volatility of a single distributed photovoltaic under time conditions. At the same time, by establishing an RCGAN model and training the RCGAN model based on the output data of multiple distributed photovoltaics on a certain date, a second prediction model is obtained, and then extracting the position output characteristics of the distributed photovoltaic cluster based on the second prediction model to capture the output volatility of each photovoltaic in the distributed photovoltaic cluster under different position conditions, thereby realizing the interval prediction of the entire distributed photovoltaic cluster. In the prediction process, the distributed photovoltaic cluster is predicted by combining the first prediction model with the second prediction model, realizing the combination of the point prediction method and the interval prediction method, fully considering the influence of time and space conditions on the output of the distributed photovoltaic cluster, and improving the accuracy of the output interval prediction of the distributed photovoltaic cluster.
[0169] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for predicting the output interval of a distributed photovoltaic cluster, characterized in that: include: Obtain historical output data of distributed photovoltaic clusters; Establishing a differential autoregressive moving average model, and fitting the differential autoregressive moving average model according to the historical output data to obtain a first prediction model; Establishing a cyclic convolutional generative adversarial network model, and training the cyclic convolutional generative adversarial network model based on the historical output data to obtain a second prediction model; Predicting the output of a single distributed photovoltaic unit using the first prediction model to obtain first prediction data; Inputting the first prediction data into the second prediction model to perform output prediction on the distributed photovoltaic cluster to obtain second prediction data; Determining a prediction interval for the output of the distributed photovoltaic cluster based on the second prediction data; The step of fitting the differential autoregressive moving average model according to the historical output data to obtain a first prediction model includes: Selecting first output data of a single distributed photovoltaic unit from the historical output data; Fitting the differential autoregressive moving average model according to the first output data to obtain a first prediction model; The historical output data includes the output data of multiple distributed photovoltaics at a certain date and time; the cyclic convolutional generative adversarial network model includes a generator and a discriminator; The step of training the cyclic convolutional generative adversarial network model according to the historical output data to obtain a second prediction model includes: Dividing the historical output data by date to obtain second output data of multiple distributed photovoltaic units on each date; After splicing the second output data with the random noise data, the concatenated data are input into the generator to obtain generated data; Calculating average output data of the second output data, and concatenating the average output data with the second output data to obtain true output data; splicing the second output data with the generated data to obtain pseudo output data; Inputting the true output data and the pseudo output data into the discriminator at the same time to obtain a discrimination result; Calculating the loss functions of the generator and the discriminator respectively based on the generated data and the discrimination result, and optimizing and updating the network weight parameters of the generator and the discriminator by using the RMSprop optimization algorithm; After the training is completed, the generator is retained to obtain a second prediction model; The specific steps of establishing the differential autoregressive moving average model are as follows: ; in, Y t represents the sample data value, c represents a constant, represents the white noise error term at time t, p represents a p-order autoregressive process, represents the autoregressive coefficient, q represents the q-order moving average process, represents the moving average coefficient, Y t-i Represents the data value at the past time, represents the white noise error term at the past moment; The step of fitting the differential autoregressive moving average model according to the first output data to obtain a first prediction model includes: Randomly selecting a date from the historical output data as a prediction date; All first output data before the forecast date in the historical output data are used as data values of the past time of the differential autoregressive moving average model, and the first output data of the forecast date in the historical output data are used as sample data values of the differential autoregressive moving average model; Fitting the differential autoregressive moving average model according to the data value at the past moment and the sample data value to obtain an autocorrelation coefficient and a partial autocorrelation coefficient; Determine the difference autoregressive moving average model based on the autocorrelation coefficient and the partial autocorrelation coefficient. q Value and p Value, based on the q Value and p It is worth getting the first prediction model.
2. A distributed photovoltaic cluster output interval prediction method according to claim 1, characterized in that: After establishing the cyclic convolutional generative adversarial network model, the method further includes: The Wasserstein distance and gradient penalty function are introduced into the cyclic convolutional generative adversarial network model.
3. A distributed photovoltaic cluster output interval prediction method according to claim 1, characterized in that: The establishing of the cyclic convolutional generative adversarial network model includes: Define a set of random noise data z as the input data of the generator, Represents the probability distribution of random noise data z, with Indicates the historical output data The probability distribution of the generator is defined as the generated data , the probability distribution is ; Define the input of the discriminator as the historical output data and the generated data , the output of the discriminator is a scalar , the scalar Indicates that the random noise data z obeys the historical output data The probability distribution of probability; According to the training objectives of the generator and the discriminator, the loss functions of the generator and the discriminator are constructed respectively: ; ; in, L G represents the loss function of the generator, L D represents the loss function of the discriminator, Represents the probability distribution of random noise data z The expected value of Indicates the historical output data The probability distribution of expected value; Determine the objective function of the cyclic convolutional generative adversarial network model: ; in, represents the objective function, V ( D,G ) represents the binary cross entropy function.
4. A distributed photovoltaic cluster output interval prediction method according to claim 1, characterized in that: The generator includes a first long short-term memory network, a second long short-term memory network, a third long short-term memory network and a fully connected layer; The step of splicing the second output data with the random noise data and inputting the spliced data into the generator to obtain generated data includes: After concatenating the second output data with the random noise data, the data are sequentially input into the first long short-term memory network, the second long short-term memory network, and the third long short-term memory network for feature extraction, and the extracted features are fused and outputted into generated data through the fully connected layer; The input dimension of the first long short-term memory network is (N+1)×T, where N represents the number of distributed photovoltaic units included in the second output data, the random noise data is a two-dimensional matrix, and T represents the number of columns of the random noise data; The output dimension of the fully connected layer is 1×1×T.
5. A distributed photovoltaic cluster output interval prediction method according to claim 1, characterized in that: The discriminator includes a convolutional layer, a pooling layer and a global mean pooling layer; The step of simultaneously inputting the true output data and the pseudo output data into the discriminator to obtain a discrimination result comprises: The true output data and the pseudo output data are simultaneously input into the convolution layer and the pooling layer, feature extraction and feature dimensionality reduction are performed in the convolution layer and the pooling layer respectively, and the generated data and the average output data are classified according to the extracted features through the global mean pooling layer, and the discrimination result is output.
6. A distributed photovoltaic cluster output interval prediction terminal, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, each step of the method for predicting the output interval of a distributed photovoltaic cluster as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Distributed photovoltaic output prediction method based on graph convolution long short-term memory network
CN116435984A
Distributed photovoltaic output scene generation method, device, equipment and medium
CN117424289A