A method and device for generating time-series output data of new energy
By combining the generative adversarial network and the diffusion-denoising model, the generator and discriminator train and post-process the renewable energy time-series output data, solving the problem of difficulty in generating high-quality renewable energy time-series output data in existing technologies, achieving data accuracy and reliability, and improving the prediction and scheduling efficiency of renewable energy power generation.
Patent Information
- Application Number
- CN202411517968.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-10-29
AI Technical Summary
Existing technologies make it difficult to generate high-quality renewable energy time-series output data that includes both large trends and detailed fluctuations, resulting in greater uncertainty risks in power system operations.
A generative adversarial network consisting of a generator based on a convolutional neural network and a discriminator based on the Transformer architecture is used, combined with a diffusion-denoising model, to train and post-process the new energy time-series output data to generate new energy time-series output data that conforms to actual characteristics.
The generated new energy time-series output data can reflect the overall trend of historical data, carefully depict the output fluctuation characteristics, and improve the reliability and scheduling efficiency of new energy power generation.
Smart Images

Figure CN119441748B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of generating and predicting new energy output data, and in particular to a method and device for generating time-series output data of new energy. Background Art
[0002] As the proportion of distributed renewable energy sources such as wind power and photovoltaics continues to expand in the global energy mix, the randomness and volatility of renewable energy output pose a major challenge to the safe and stable operation of power systems. Renewable energy output is significantly affected by natural conditions (such as wind speed and solar radiation), and its output curve exhibits complex nonlinear and uncertain characteristics, making it difficult to accurately predict using traditional linear methods. Furthermore, due to the sudden changes in output data over shorter time scales, power system scheduling and optimization place increasingly stringent requirements on the accuracy of prediction models. However, most current time series prediction models have limitations in capturing the complex temporal dependencies and uncertainties of renewable energy output, and often struggle to generate high-quality time series data that captures both large trends and detailed fluctuations, resulting in greater uncertainty risks for system operation. Summary of the Invention
[0003] The purpose of the present invention is to provide a method and device for generating new energy time series output data, which is used to solve the problem that the existing technology is difficult to generate high-quality time series data with both large trends and detailed fluctuations, resulting in large uncertainty risks in system operation. It can effectively improve the generation quality and accuracy of new energy output data.
[0004] In order to achieve the above objectives, the present invention provides a method for generating time-series output data of new energy, comprising:
[0005] Step 1: Collect historical time series output data of new energy;
[0006] Step 2: Input the historical time series output data into the generator based on the convolutional neural network to generate preliminary time series output data;
[0007] Step 3: The authenticity and rationality of the preliminary time series output data are evaluated by a discriminator based on the Transformer architecture, thereby training the generative adversarial network. The generative adversarial network includes a generator and a discriminator. After training, the generator generates the time series output data to be processed.
[0008] Step 4: Post-process the time series output data to be processed using a preset diffusion-denoising model to obtain the time series output data to be optimized;
[0009] Step 5: Perform an overall trend check on the time series output data to be optimized. After successful verification, output the new energy time series output data.
[0010] According to a method for generating time-series output data of new energy provided by the present invention, in step 1, if there are anomalies in the historical time-series output data, an interpolation method is used to fill in the anomalies.
[0011] According to a method for generating time-series output data of new energy provided by the present invention, in step 1, if there is a missing historical time-series output data, the Kalman gain is used to correct it.
[0012] According to a method for generating new energy time-series output data provided by the present invention, the loss function of the generative adversarial network is:
[0013]
[0014] Where L represents the value of the loss function; D and G represent the discriminator and generator respectively; x and z represent real data and random noise respectively; λ is the weight of the penalty term; E is the expectation operator; For the discriminator to the intermediate data The second norm of the gradient of .
[0015] According to a method for generating time-series output data of new energy provided by the present invention, a discriminator evaluates the authenticity and rationality of preliminary time-series output data through a self-attention mechanism.
[0016] According to a method for generating time-series output data of new energy provided by the present invention, step 4 specifically includes:
[0017] Injecting Gaussian noise into the time series output data to be processed through the diffusion process of the diffusion-denoising model;
[0018] The Gaussian noise is gradually removed through the diffusion inverse process of the diffusion-denoising model to obtain the time series output data to be optimized.
[0019] According to a method for generating time-series output data of new energy provided by the present invention, in step 5, the time-series output data to be optimized is subjected to overall trend verification, including:
[0020] Compare the statistical characteristics of the time series output data to be optimized with the historical time series output data through the mean and standard deviation;
[0021] Use autocorrelation function and spectrum analysis to evaluate the short-term and long-term dependencies of the time-series output data to be optimized;
[0022] Compare and verify the average width of the power interval of the time series output data to be optimized with the average width of the power interval of the historical time series output data;
[0023] The mean square error is used to measure the overall error between the time series output data to be optimized and the historical time series output data.
[0024] In a second aspect, the present invention provides a device for generating time-series output data of a new energy source, comprising:
[0025] Collection unit, used to collect historical time-series output data of new energy;
[0026] A generation unit, configured to input historical time-series output data into a generator based on a convolutional neural network to generate preliminary time-series output data;
[0027] The training unit is used to evaluate the authenticity and rationality of the preliminary time series output data through a discriminator based on the Transformer architecture, thereby training the generative adversarial network. The generative adversarial network includes a generator and a discriminator. After training, the generator generates the time series output data to be processed;
[0028] A post-processing unit, configured to post-process the time series output data to be processed using a preset diffusion-denoising model to obtain the time series output data to be optimized;
[0029] The output unit is used to perform overall trend verification on the time series output data to be optimized, and output the new energy time series output data after successful verification.
[0030] The technical solution of the present invention has at least the following technical effects:
[0031] The present invention provides a method and device for generating time-series output data of new energy sources, the method comprising: step 1, collecting historical time-series output data of new energy sources; step 2, inputting the historical time-series output data into a generator based on a convolutional neural network to generate preliminary time-series output data; step 3, evaluating the authenticity and rationality of the preliminary time-series output data through a discriminator based on a Transformer architecture, thereby training a generative adversarial network, the generative adversarial network comprising a generator and a discriminator. After training, the generator generates time-series output data to be processed; step 4, post-processing the time-series output data to be processed through a preset diffusion-denoising model to obtain time-series output data to be optimized; step 5, performing an overall trend check on the time-series output data to be optimized. After successful check, the new energy time-series output data is output. The new energy time-series output data generated by the present invention can not only reflect the overall trend of historical data, but also carefully depict the fluctuation characteristics in the new energy output. The data finally generated can support prediction and scheduling optimization in new energy power generation scenarios, and ensure its consistency in physical laws and statistical characteristics, thereby improving the reliability and scheduling efficiency of new energy power generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] In the attached figure:
[0034] Figure 1 This is a flow chart of the method for generating new energy time-series output data of the present invention;
[0035] Figure 2 This is a structural block diagram of the device for generating time-series output data of new energy according to the present invention. DETAILED DESCRIPTION
[0036] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0037] The following will describe some embodiments of the present invention in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.
[0038] After research, the inventors of the present invention found that the generative adversarial network (GAN) can be applied to the field of time series data generation and prediction. Through adversarial training between the generator and the discriminator, time series data with high fidelity can be generated. However, when dealing with highly random time series such as new energy output, the traditional GAN architecture can often only simulate the general trend and has difficulty capturing local subtle fluctuations and sudden changes. The Transformer architecture, with its powerful self-attention mechanism, performs well in time series data processing and can effectively capture long-term dependencies and global features. Therefore, it can be introduced as a discriminator of GAN to further improve the global consistency and authenticity of the generated data. In addition, since the data generated by GAN is often not smooth enough or noisy in the details, the generated data needs to be post-processed to enhance the characterization of the uncertainty and detailed changes in new energy output, so as to ensure the reliability of the generated data in practical applications.
[0039] Based on the above research, please refer to Figure 1 , an embodiment of the present invention provides a method for generating time-series output data of new energy, comprising:
[0040] Step 1: Collect historical time series output data of new energy;
[0041] Specifically, the sampling time step is set (e.g., 15 minutes) to obtain the historical time-series output data of new energy sources hour by hour. If there are missing historical time-series output data, the interpolation method is used to fill in the missing data. The interpolation calculation formula is as follows:
[0042]
[0043] Where f(x) represents the interpolation calculation of the output data at time x1 and x2, and f(x1) and f(x2) are the outputs at time x1 and x2, respectively. For example, if x1 = 30 minutes and x2 = 60 minutes, then x = 45 minutes, and f(x) indicates that the output data at 45 minutes is missing, then the output data is calculated using the above formula.
[0044] Thus, the values of missing data are calculated to ensure the continuity of the time series.
[0045] If there are abnormal data in the historical time series output data, for example, the output data at 12 o'clock at night is similar to that at noon, which is obviously abnormal, then the abnormal data needs to be processed. To process the abnormal data, use the Kalman gain applicable to the time series data to estimate the state of the new energy time series data and correct the abnormal data. The Kalman gain is calculated according to the following formula:
[0046]
[0047] Where K represents the Kalman gain, which is used to measure the correction amplitude; P represents the uncertainty of the prior data, that is, the variance of the output data at that moment in the historical time series output data, which reflects the volatility of the historical time series output data; R represents the variance of the observation noise, that is, the estimation error of the abnormal output data.
[0048] Use the Kalman gain K to correct the abnormal output data and calculate the corrected output:
[0049]
[0050] Where, represents the corrected historical time-series output data for renewable energy sources; x represents the initial abnormal output data; and z represents the mean or predicted value of the historical time-series output data corresponding to that moment. This method uses the Kalman gain K to control the degree of correction for abnormal output data, ensuring that the corrected data is close to the historical mean while retaining reasonable fluctuation characteristics, maintaining data accuracy and stability.
[0051] Through the above calculation and correction, the abnormal output data in the historical time series output data of new energy can be accurately corrected to ensure the accuracy and stability of the data.
[0052] Step 2: Input the historical time series output data into the generator based on the convolutional neural network to generate preliminary time series output data;
[0053] Specifically, the generator extracts the time series features of the historical time series output data through convolution operations and adds noise to generate preliminary time series output data, that is, it extracts local time correlations through a one-dimensional convolutional neural network to generate preliminary time series output data.
[0054] Step 3: The authenticity and rationality of the preliminary time series output data are evaluated by a discriminator based on the Transformer architecture, thereby training the generative adversarial network, which includes a generator and a discriminator. After training, the generator generates the time series output data to be processed;
[0055] In some embodiments, step 3 specifically includes:
[0056] The generator and discriminator are trained adversarially through alternating optimization. The goal of the generator G is to minimize the discriminator's evaluation of the preliminary time series output data (generated data), while the goal of the discriminator D is to distinguish the preliminary time series output data from the real data. The loss function of the generative adversarial network is:
[0057]
[0058] Based on this loss function, neural network training is performed to optimize the generator and discriminator by maximizing the score of real data and minimizing the score of generated data. L represents the value of the entire loss function. D and G represent the discriminator and generator, respectively; x and z represent real data and random noise, respectively. λ is the weight that adjusts the penalty term to control the balance; the expectation operator E calculates the average value, while the gradient and norm are used to measure the sensitivity of data changes. is the discriminator D on the intermediate data The second norm of the gradient of is used to measure the sensitivity of the discriminator D to the input.
[0059] The main purpose of designing this loss function is to ensure that the generated data gradually approaches the real data while maintaining the stability of the model. The difference between the first two terms, E[D(x)]-E[D(G(z))], reflects the ability of the discriminator to distinguish between real data and generated data. The goal of the generator is to minimize this difference and thus generate data that is indistinguishable from the real data. The third term, the gradient penalty, The penalty term is to ensure that the output of the discriminator remains smooth to data changes, to avoid overfitting and enhance the convergence of the model. This penalty term improves the performance of the generator in generating uncertain data by constraining the sensitivity of the discriminator to the input.
[0060] The discriminator evaluates the authenticity of the generated data through the self-attention mechanism, which includes the following steps:
[0061] Input generated data and real data, and capture global dependencies through the multi-head self-attention mechanism;
[0062] The calculation formula for self-attention is:
[0063]
[0064] The attention mechanism calculates the correlation between the generated data and the real data to ensure the understanding of global dependencies. The formula used to calculate self-attention combines the query Q (representing the features to be paid attention to), the key K (matching the query) and the value V (containing feature information related to the input data). By comparing the similarity between Q and K, V is adjusted to capture the global dependencies in the data. k Indicates the dimension of the key vector, used to scale the results. Attention is the attention mechanism, softmax is the function. T represents the transpose of the matrix K.
[0065] The loss function of the discriminator is fed back to the generator so that the preliminary time series output data it generates is closer to the characteristics of the real data.
[0066] Step 4: Post-process the time-series output data using a preset diffusion-denoising model, inject reasonable random fluctuation characteristics, simulate the uncertainty and detailed changes in the output of renewable energy, and obtain the time-series output data to be optimized;
[0067] In some embodiments, step 4 specifically includes:
[0068] Gaussian noise is injected into the time series output data to be processed through the diffusion process of the diffusion-denoising model, gradually increasing the randomness of the data. The expression of the diffusion process is:
[0069]
[0070] During the diffusion process, noise is gradually added to the data to simulate random fluctuations in the data;
[0071] The Gaussian noise is gradually removed through the diffusion-denoising model's diffusion inverse process, optimizing the details of the generated data. The expression of the diffusion inverse process is:
[0072]
[0073] Among them, x t and x t-1 represents the data of the current and previous time steps, β t represents the noise variance at time step t, controlling the amount of noise added at each step, represents normal distribution, I represents the unit matrix (here it mainly represents that the variance matrix of the noise is a diagonal matrix with uniform variance), μ t (x t ) represents the mean value in the reverse diffusion process, which is used to estimate the denoised data. represents the variance of the estimated data in the diffusion inverse process, the process of restoring the data in the denoising process, and gradually recovering high-quality data by reducing noise, p(x t-1 |x t ),q(x t |x t-1 ) represent the conditional probabilities of the two processes respectively;
[0074] The present invention uses diffusion-denoising processing to generate optimized time-series output data that is more consistent with the actual uncertainty and fluctuation characteristics of new energy output.
[0075] Step 5: Perform an overall trend check on the time series output data to be optimized to ensure that it complies with statistical characteristics and physical laws. After successful verification, the new energy time series output data is output.
[0076] In some embodiments, the overall trend verification of the time series output data to be optimized is performed, including:
[0077] The statistical characteristics of the time series output data to be optimized and the historical time series output data are compared by using the mean and standard deviation. The mean of the time series output data to be optimized is μ gen , the mean value of historical time series output data is μ hist , the verification formula is as follows:
[0078]
[0079] The standard deviation of the time series output data to be optimized is σ gen , the standard deviation of historical time series output data is σ hist , the verification formula is as follows:
[0080]
[0081] Ensure that the overall mean and volatility of the time series output data to be optimized are consistent with the historical time series output data within the error range of ∈1 and ∈2;
[0082] To verify the detailed volatility, the autocorrelation function (ACF) and spectrum analysis are used to evaluate the short-term and long-term dependencies of the time series output data to be optimized. The autocorrelation function is defined as:
[0083]
[0084] Where x(t) is the time series output data value to be optimized at time t, x(t+k) is the time series output data value to be optimized at time t+k, E is the expectation operator, μ is the mean of the time series output data to be optimized, and σ is the standard deviation of the time series output data to be optimized.
[0085] Spectral analysis calculates the frequency components of a data through Fourier transform. The spectrum S(f) is defined as:
[0086]
[0087] Where x(t) is the data value at time t, f is the frequency, and i is the imaginary unit.
[0088] Verify the frequency spectrum of the time series output data to be optimized and the historical time series output data. By comparing the power density differences in the main frequency ranges, ensure that the high-frequency and low-frequency components of the time series output data to be optimized remain similar to those of the historical time series output data. The verification criteria are:
[0089]
[0090] The threshold value of ∈3 is obtained by analyzing the spectrum of historical time series output data to ensure that the frequency characteristics of the time series output data to be optimized and the spectrum difference of the historical time series output data are within a reasonable range; gen (f) is the frequency spectrum of the time series output data to be optimized, S hist (f) is the frequency spectrum of historical time series output data.
[0091] The power interval of each time step is checked to ensure its rationality. The power interval is defined as the maximum power value P at each time step t. max (t) and the minimum power value P min The difference between (t) and (t) is as follows:
[0092] P range (t) = P max (t)-P min (t)
[0093] Calculate the average width P of the power interval for all time steps avg , the formula is:
[0094]
[0095] Compare and verify the average width of the power interval of the time series output data to be optimized with the average width of the power interval of the historical time series output data. The verification formula is:
[0096]
[0097] Where ∈4 is obtained by statistically analyzing the power range fluctuation range of the historical time series output data, ensuring that the power fluctuation of the time series output data to be optimized at each time step is consistent with the historical time series output data; P avg,gen is the average width of the power interval of all time steps of the time series output data to be optimized, P avg,hist It is the average width of the power interval of all time steps of the historical time series output data.
[0098] The mean square error (MSE) is used to measure the overall error between the time series output data to be optimized and the historical time series output data. It is defined as follows:
[0099]
[0100] Where ∈5 is the error threshold of MSE, which is obtained through MSE statistical analysis of historical time series output data to ensure that the overall error between the time series output data to be optimized and the historical time series output data is within an acceptable range; gen,i is the i-th time series output data to be optimized, x hist,i is the i-th historical time series output data, and n is the total amount of data.
[0101] After successful verification, the final generated time-series output data to be optimized will be output as new energy time-series output data, which can be applied to new energy power generation scenarios such as wind power and photovoltaics, and can support subsequent prediction and scheduling optimization.
[0102] The new energy time-series output data output by the present invention is suitable for real-time scheduling and output prediction of new energy scenarios, and ensures a certain degree of consistency with historical time-series output data in statistical characteristics and physical laws, thereby improving the reliability and scheduling efficiency of new energy power generation.
[0103] Based on the same inventive concept, another embodiment of the present invention provides a device for generating time-series output data of new energy, which corresponds to the method of the above embodiment, such as Figure 2 As shown, the device includes:
[0104] Collection unit, used to collect historical time-series output data of new energy;
[0105] A generation unit, configured to input historical time-series output data into a generator based on a convolutional neural network to generate preliminary time-series output data;
[0106] The training unit is used to evaluate the authenticity and rationality of the preliminary time series output data through a discriminator based on the Transformer architecture, thereby training the generative adversarial network. The generative adversarial network includes a generator and a discriminator. After training, the generator generates the time series output data to be processed;
[0107] A post-processing unit, configured to post-process the time series output data to be processed using a preset diffusion-denoising model to obtain the time series output data to be optimized;
[0108] The output unit is used to perform overall trend verification on the time series output data to be optimized, and output the new energy time series output data after successful verification.
[0109] In summary, the present invention provides a method and device for generating time-series output data of new energy based on multi-layer generation and optimization, which generates data that conforms to the actual output characteristics of new energy by combining multi-layer generation and optimization. Among them, the generator uses a convolutional neural network to extract the local features of historical time-series output data and generate output data with a general trend; the discriminator is based on the Transformer architecture and uses the self-attention mechanism to capture the global dependencies of the preliminary time-series output data and evaluate its authenticity; finally, the diffusion-denoising model is used to post-process the time-series output data to be processed, and further optimize the details and random fluctuation characteristics of the data. Through this multi-layer architecture, the present invention can not only generate new energy time-series output data with macro-trends, and output new energy time-series output data that conforms to statistical characteristics and physical laws, which can be used for subsequent new energy power generation prediction and scheduling optimization; it can also effectively describe the uncertainty and random changes in new energy output, and improve the physical rationality and prediction accuracy of the data.
[0110] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the embodiments disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and variations can be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for generating time-series output data of new energy, characterized in that: include: Step 1: Collect historical time series output data of new energy; Step 2: Input the historical time series output data into a generator based on a convolutional neural network to generate preliminary time series output data; Step 3: The authenticity and rationality of the preliminary time series output data are evaluated by a discriminator based on the Transformer architecture, thereby training a generative adversarial network. The generative adversarial network includes the generator and the discriminator. After the training is completed, the generator generates the time series output data to be processed. Step 4: Post-process the time series output data to be processed using a preset diffusion-denoising model to obtain the time series output data to be optimized; Step 5: Perform an overall trend check on the time series output data to be optimized. After successful verification, output the new energy time series output data.
2. The method for generating new energy time series output data according to claim 1, characterized in that: In step 1, if the historical time series output data has anomalies, interpolation is used to fill in the anomalies.
3. The method for generating new energy time series output data according to claim 1, characterized in that: In step 1, if the historical time series output data is missing, the Kalman gain is used to correct it.
4. The method for generating new energy time series output data according to claim 1, characterized in that: The loss function of the generative adversarial network is: Where L represents the value of the loss function; D and G represent the discriminator and generator respectively; x and z represent real data and random noise respectively; λ is the weight of the penalty term; E is the expectation operator; For the discriminator to the intermediate data The second norm of the gradient of .
5. The method for generating new energy time series output data according to claim 1, characterized in that: The discriminator evaluates the authenticity and rationality of the preliminary time series output data through a self-attention mechanism.
6. The method for generating new energy time series output data according to claim 1, characterized in that: The step 4 specifically includes: Injecting Gaussian noise into the time series output data to be processed through the diffusion process of the diffusion-denoising model; The Gaussian noise is gradually removed through the diffusion inverse process of the diffusion-denoising model to obtain the time series output data to be optimized.
7. The method for generating new energy time series output data according to claim 1, characterized in that: In step 5, the overall trend verification of the time series output data to be optimized includes: Comparing the statistical characteristics of the time series output data to be optimized with the historical time series output data by means of mean and standard deviation; Using autocorrelation function and spectrum analysis to evaluate the short-term and long-term dependencies of the time-series output data to be optimized; Comparing and verifying the average width of the power interval of the time series output data to be optimized with the average width of the power interval of the historical time series output data; The mean square error is used to measure the overall error between the time series output data to be optimized and the historical time series output data.
8. A device for generating time-series output data of new energy, characterized in that: include: Collection unit, used to collect historical time-series output data of new energy; a generating unit, configured to input the historical time-series output data into a generator based on a convolutional neural network to generate preliminary time-series output data; A training unit, configured to evaluate the authenticity and rationality of the preliminary time series output data through a discriminator based on a Transformer architecture, thereby training a generative adversarial network, wherein the generative adversarial network includes the generator and the discriminator. After the training is completed, the generator generates the time series output data to be processed; a post-processing unit, configured to post-process the time series output data to be processed using a preset diffusion-denoising model to obtain the time series output data to be optimized; The output unit is used to perform overall trend verification on the time-series output data to be optimized, and output the new energy time-series output data after successful verification.
Citation Information
Patent Citations
Image feature analysis and generation method based on fast denoising diffusion probability model
CN115908187A
New energy prediction output scene generation method and system
CN117220266A