Power distribution network source load multi-type scene generation method, system, equipment and medium
By using a diffusion model of Markov chain structure and a parameterized Markov chain inversion process, source load scene data with the same dimension and spatiotemporal correlation as historical scene data is generated, which solves the problems of insufficient generation quality and efficiency in existing technologies and achieves efficient and accurate scene generation.
Patent Information
- Application Number
- CN202511095441.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-21
AI Technical Summary
Existing methods for generating power grid source-load scenarios are difficult to accurately represent the characteristics of high-dimensional, multimodal renewable energy. Furthermore, generative adversarial networks are unstable in training and lack diversity in generated scenarios. Variational autoencoders assume that latent variables follow a Gaussian distribution, which limits the quality of generation. The encoder representation capability of generative moment matching networks is also limited.
A diffusion model with a Markov chain structure is adopted. Noise data is sampled from a standard Gaussian distribution and gradually superimposed onto historical scene data according to a preset variance sequence. Combined with the reverse process of a parameterized Markov chain, source load scene data with the same dimension and spatiotemporal correlation as historical scene data is generated.
It improves the generation efficiency and quality of multiple types of source and load scenarios in the distribution network, ensures that the generated scenarios match the actual working conditions, reduces invalid iterations, increases the scenario generation speed, and meets the needs of distribution network planning for efficient acquisition of multiple types of scenarios.
Smart Images

Figure CN120996221A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of power systems, and particularly relates to a power distribution network source-load multi-type scene generation method, system, device and medium. BACKGROUND
[0002] With the increasing penetration of renewable energy such as wind and photovoltaic in the power distribution network, the spatio-temporal uncertainty of the output and load is significantly enhanced, which brings severe challenges to the stable operation, economic dispatch and planning optimization of the power grid. In order to transform this uncertainty into an analyzable deterministic problem, multi-type scene data that can accurately reflect the characteristics of source and load need to be generated - such data need to accurately represent the spatio-temporal correlation and probability distribution characteristics between different sites, so as to support the scientific formulation of power distribution network planning and dispatching strategies, and ensure the safety and economy of the power grid under complex source and load conditions.
[0003] Existing power distribution network source-load scene generation methods mainly include model-based methods (such as Copula, Markov chain) and unsupervised learning methods (such as generative adversarial network, variational autoencoder, generative moment matching network), but these methods all have their defects. Among them, the model-based method needs to pre-assume the probability distribution (such as Gaussian distribution), which is difficult to fully represent the characteristics of high-dimensional and multi-modal renewable energy, and the modeling complexity increases sharply with the increase of dimension, while in the unsupervised learning method, the generative adversarial network (GAN) has the problems of unstable training process, easy mode collapse and insufficient diversity of generated scenes; the variational autoencoder (VAE) needs to assume that the hidden variable obeys Gaussian distribution, which limits the quality of generation; and the encoder of the generative moment matching network (GMMN) has limited representation ability, which is difficult to handle high-dimensional scenes. SUMMARY
[0004] The present application provides a power distribution network source-load multi-type scene generation method, system, device and medium to improve the generation efficiency and quality of power distribution network source-load multi-type scenes.
[0005] An embodiment of the present application provides a power distribution network source-load multi-type scene generation method, comprising:
[0006] Collecting historical scene data of each node of the power distribution network to be planned, wherein the historical scene data includes historical load data, photovoltaic power generation data and wind power generation data with spatio-temporal correlation;
[0007] input the historical scene data into the diffusion model to sample noise data from a standard Gaussian distribution through a diffusion process of a Markov chain structure, and to add the noise data to the historical scene data step by step according to a preset variance sequence to obtain a diffusion result, and to denoise the diffusion result step by step through a reverse process of the parameterized Markov chain to generate source-load scene data with the same dimension and spatiotemporal correlation as the historical scene data, until a target error value of the historical scene data and the source-load scene data meets a preset threshold condition or reaches a preset iteration step number, to determine a trained target diffusion model;
[0008] input real-time collected scene data into the target diffusion model to obtain power grid source-load multi-type scene data.
[0009] The historical scene data of each node of the to-be-planned power grid is collected, the defects of complex spatiotemporal correlation of multiple sites can be captured, the training sample containing real data features is provided for the diffusion model, and the core law of the source-load scene is ensured to be learned by the diffusion model to generate a high-fidelity scene; the diffusion process adds noise through the Markov chain structure and the preset variance sequence, the stability and controllability of noise addition are ensured, the model can fully learn the high-dimensional and multi-modal source-load data distribution, the reverse process accurately captures the spatiotemporal correlation of the source-load data through the parameterized Markov chain combined with the learned Gaussian transition mechanism to improve the generation quality, and the generation efficiency is improved through the optimized multi-step iteration denoising process, thereby effectively improving the generation efficiency and generation quality of the power grid source-load multi-type scene, the rhythm of noise addition / denoising is controlled through the preset variance sequence, invalid iterations are reduced, and the generation efficiency is improved; by inputting the real-time collected scene data into the target diffusion model, the multi-type scene matching the actual working condition can be directly generated, the accurate fitting ability of the model to the spatiotemporal correlation and the probability distribution is continued, repeated training is avoided, the scene generation speed in actual application is significantly improved, and the demand of power grid planning for efficiently obtaining multi-type scenes is met. Compared with the prior art, the generation efficiency and generation quality of the power grid source-load multi-type scene can be improved.
[0010] Further, the historical scene data of each node of the to-be-planned power grid is collected, specifically:
[0011] initial historical scene data of each node of the to-be-planned power grid is collected, and the initial historical scene data is subjected to data cleaning to obtain a first processing result;
[0012] the first processing result is subjected to normalization processing to obtain a second processing result, and the second processing result is organized into a preset data format to obtain the historical scene data.
[0013] In this way, by cleaning the initial historical scenario data to remove noise, normalizing to unify the data range, and organizing into a preset format to adapt to the model input, high-quality and standardized training data basis is provided for the diffusion model, thereby improving the generation efficiency and quality of the power distribution network source-load multi-type scenario.
[0014] Further, the noise data is gradually superimposed on the historical scenario data according to the preset variance sequence to obtain a diffusion result, specifically:
[0015] Based on the preset variance sequence, the cumulative product of the noise data is calculated by a recursive formula, and the diffusion data is obtained by combination calculation based on the historical scenario data, the noise data and the cumulative product, wherein the preset variance sequence can be calculated according to model parameters, and the model parameters include time step and offset parameter.
[0016] In this way, the rhythm of noise superposition is controlled by the preset variance sequence, reducing invalid iterations and improving generation efficiency.
[0017] Further, the formula for gradually superimposing noise data on the historical scenario data according to the preset variance sequence to obtain a diffusion result is:
[0018]
[0019]
[0020]
[0021] In the formula, x t is the diffusion result of the t-th step, is the cumulative product of the noise data, x0 is the historical scenario data, z is the noise data, a t is a scaling factor for each step in the diffusion process, b t is the preset variance sequence, T is the time step, and s is the offset parameter.
[0022] Further, the diffusion result is gradually denoised by the reverse process of the parameterized Markov chain to generate source-load scenario data with the same dimension and spatiotemporal correlation as the historical scenario data, specifically:
[0023] The diffusion result is input into the parameterized Markov chain to output predicted noise;
[0024] Based on the learned Gaussian transition mechanism, the source-load scenario data is calculated using the predicted noise, and multi-step iterative denoising is performed until the source-load scenario data with the same dimension and spatiotemporal correlation as the historical scenario data is generated.
[0025] Thus, the spatio-temporal correlation of source-load data is accurately captured by the parameterized Markov chain combined with the learned Gaussian transition mechanism to improve the generation quality, and the generation efficiency is improved by the optimized multi-step iterative denoising process, thereby effectively improving the generation efficiency and generation quality of the multi-type scenario of the power distribution network source-load.
[0026] Further, the learned Gaussian transition mechanism is used to calculate the source-load scenario data based on the predicted noise, specifically:
[0027]
[0028] where x t-1 is the source-load scenario data, alpha t is the scaling factor of each step in the diffusion process, x t is the diffusion result of the t-th step, is the cumulative product of the noise data, z θ (x t , t) is the predicted noise, and z is the noise data, is the variance of the conditional distribution q(x t-1 | x t , x0).
[0029] Further, the trained target diffusion model is determined until the target error value of the historical scenario data and the source-load scenario data meets the preset threshold condition or reaches the preset iteration step number, specifically:
[0030] The Wasserstein distance, probability density error and cumulative distribution error between the historical scenario data and the source-load scenario data are calculated, wherein the target error value includes the Wasserstein distance, probability density error and cumulative distribution error;
[0031] If the Wasserstein distance, the probability density error and the cumulative distribution error are all less than or equal to the corresponding preset threshold, or the current iteration number reaches the preset iteration step number, the current diffusion model is determined as the trained target diffusion model.
[0032] In this way, by explicitly setting the thresholds of the Wasserstein distance, the probability density error and the cumulative distribution error, the high consistency of the generated scenario and the historical data in distribution and correlation can be ensured to improve the generation quality, and the training process is controlled by the preset iteration step number to avoid redundant calculation to improve the generation efficiency, thereby effectively improving the generation efficiency and generation quality of the multi-type scenario of the power distribution network source-load.
[0033] Another embodiment of the present application also provides a power distribution network source-load multi-type scenario generation system, comprising: an acquisition module, a training module and a generation module;
[0034] The acquisition module is configured to collect historical scenario data of each node of the power distribution network to be planned, wherein the historical scenario data comprises historical load data, photovoltaic power generation data and wind power generation data having spatiotemporal correlation.
[0035] The training module is configured to input the historical scenario data into a diffusion model to sample noise data from a standard Gaussian distribution through a diffusion process of a Markov chain structure, and to gradually superimpose the noise data on the historical scenario data according to a preset variance sequence to obtain a diffusion result, and to gradually denoise the diffusion result through a reverse process of a parameterized Markov chain to generate source-load scenario data having the same dimension and spatiotemporal correlation as the historical scenario data, until a target error value of the historical scenario data and the source-load scenario data meets a preset threshold condition or reaches a preset iteration step number, to determine a trained target diffusion model.
[0036] The generation module is configured to input real-time collected scenario data into the target diffusion model to obtain power distribution network source-load multi-type scenario data.
[0037] The embodiments of the present application can capture the defects of multi-site complex spatiotemporal correlation by collecting historical scenario data of each node of the power distribution network to be planned, provide a training sample containing real data features for the diffusion model, ensure that the diffusion model can learn the core law of the source-load scenario to generate high-fidelity scenarios, and ensure the stability and controllability of noise addition by using the Markov chain structure and the preset variance sequence to superimpose noise in the diffusion process, so that the model can fully learn the high-dimensional and multi-modal source-load data distribution. The reverse process can accurately capture the spatiotemporal correlation of the source-load data by parameterizing the Markov chain combined with the learned Gaussian transition mechanism to improve the generation quality, and at the same time, the generation efficiency is improved through the optimized multi-step iterative denoising process, thereby effectively improving the generation efficiency and generation quality of the power distribution network source-load multi-type scenario, and controlling the rhythm of noise superposition / denoising through the preset variance sequence to reduce invalid iterations, thereby improving the generation efficiency. By inputting real-time collected scenario data into the target diffusion model, multi-type scenarios matching the actual working conditions can be directly generated, the precise fitting ability of the model to the spatiotemporal correlation and probability distribution is continued, repeated training is avoided, the scenario generation speed in actual application is significantly improved, and the demand of power distribution network planning for efficient acquisition of multi-type scenarios is met. Compared with the prior art, the present application can improve the generation efficiency and generation quality of the power distribution network source-load multi-type scenario.
[0038] Another embodiment of the present application also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the steps of the power distribution network source-load multi-type scenario generation method of the present application when executing the computer program.
[0039] Another embodiment of the present application also provides a computer readable storage medium item, comprising: a stored computer program, when the computer program runs, controls a device where the computer readable storage medium is located to execute steps of the power distribution network source-load multi-type scene generation method. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described in the following are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort.
[0041] Figure 1 is a flow diagram of an embodiment of the power distribution network source-load multi-type scene generation method provided by the present application;
[0042] Figure 2 is a power distribution network source-load scene diagram generated by a diffusion model provided by the present application;
[0043] Figure 3 is a probability density function diagram of the power distribution network source-load scene generation result provided by the present application;
[0044] Figure 4 is a cumulative distribution function diagram of the power distribution network source-load scene generation result provided by the present application;
[0045] Figure 5 is a structure diagram of an embodiment of the power distribution network source-load multi-type scene generation system provided by the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the present application more clear, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only some embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort are within the scope of protection of the present application.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "include" and "have" and any variations thereof in the specification and claims of the present application and the above description of drawings are intended to cover non-exclusive inclusion.
[0048] In the description of the embodiments of the present application, the technical terms "first", "second" and the like are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise explicitly specified and limited.
[0049] Reference herein to "embodiments" means that the particular features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0050] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after it.
[0051] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two), and similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0052] In the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the technical terms "mounting", "connection", "connection", "fixing" and the like should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanical connection, or it can be electrical connection; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0053] With the increasing penetration of renewable energy sources such as wind and photovoltaic in distribution networks, the temporal and spatial uncertainty of these sources poses a challenge to the stable operation and economic dispatch of power grids. To transform this uncertainty, it is necessary to generate multi-type scenario data that accurately reflects the characteristics of sources and loads to support the scientific formulation of distribution network planning and dispatch strategies. Existing methods include model-based methods (such as Copula, Markov chain) and unsupervised learning methods (such as GAN, VAE, GMMN), but these methods all have their defects, so there is an urgent need to develop a multi-type scenario generation method for distribution network sources and loads.
[0054] Reference is made to Figure 1To improve the generation efficiency and generation quality of the multi-type scene of the power distribution network source and load, an embodiment of the present application provides a method for generating a multi-type scene of a power distribution network source and load, comprising steps S101 to S103.
[0055] In step S101, historical scene data of each node of the to-be-planned power distribution network is collected, wherein the historical scene data includes historical load data, photovoltaic power generation data and wind power generation data with space-time correlation.
[0056] In some embodiments, the historical scene data of each node of the to-be-planned power distribution network is collected, specifically: the initial historical scene data of each node of the to-be-planned power distribution network is collected, and the initial historical scene data is cleaned to obtain a first processing result; the first processing result is normalized to obtain a second processing result, and the second processing result is organized into a preset data format to obtain the historical scene data. Specifically, first, historical load data, photovoltaic power generation data and wind power generation data are collected from each node of the power distribution network through sensors and measuring devices. Second, the collected initial historical scene data is cleaned to remove noise and outliers. Then, the cleaned data is normalized to unify the data range, which usually involves scaling the data to a specific range, such as 0 to 1, or -1 to 1, to facilitate model processing. Finally, the normalized data is organized into a preset data format (such as an array, a matrix or a data frame).
[0057] It should be noted that data cleaning includes but is not limited to removing missing values, outlier detection and correction or deletion, and removing duplicate data.
[0058] It should be noted that normalization can be achieved by minimum-maximum scaling, Z-score standardization or decimal scaling, and the present application does not limit.
[0059] It should be noted that organizing into a preset data format is not the focus of the present application, and therefore will not be expanded here.
[0060] In this way, by cleaning the initial historical scene data to remove noise, normalizing to unify the data range, and organizing into a preset format to adapt to model input, high-quality, standardized training data basis is provided for the diffusion model, thereby improving the generation efficiency and generation quality of the multi-type scene of the power distribution network source and load.
[0061] In step S102, the historical scene data is input into the diffusion model to sample noise data from a standard Gaussian distribution through a diffusion process of Markov chain structure, and the noise data is gradually superimposed on the historical scene data according to a preset variance sequence to obtain a diffusion result, and the diffusion result is gradually denoised through a reverse process of the parameterized Markov chain to generate source load scene data with the same dimension and spatiotemporal correlation as the historical scene data, until a target error value of the historical scene data and the source load scene data meets a preset threshold condition or a preset iteration step number is reached, and a trained target diffusion model is determined.
[0062] In some embodiments, the historical scene data is input into the diffusion model to sample noise data from a standard Gaussian distribution through a diffusion process of Markov chain structure. Specifically, according to the requirements of the model and the expected performance, the parameters of the diffusion model are set, including time step, small shift parameter, learning rate and batch size, etc. Then, the obtained historical scene data and time resolution are input into the diffusion model, and the diffusion model samples noise from a standard Gaussian distribution through a diffusion process and gradually superimposes it on the historical scene data.
[0063] It should be noted that the setting of the iteration step number depends on the complexity of the model and the required accuracy, and the optimal iteration step number usually needs to be determined through experiments.
[0064] In some embodiments, the noise data is gradually superimposed on the historical scene data according to a preset variance sequence to obtain a diffusion result, specifically: based on the preset variance sequence, the cumulative product of the noise data is calculated through a recursive formula, and the historical scene data, the noise data and the cumulative product are combined and calculated to obtain the diffusion data, wherein the preset variance sequence can be calculated according to model parameters, and the model parameters include time step and shift parameter. Specifically, first, a preset variance sequence β1, β2,..., βt needs to be defined, which will control the variance of noise in each diffusion process. Then, based on the preset variance sequence β t , the cumulative product of the noise data is calculated through a recursive formula , wherein the cumulative product is the cumulative scaling effect from the initial state to the t-th step, and the related calculation formula is: α t = 1-β t ; then, using the cumulative product and the preset variance sequence, the conditional distribution q(x t |x t-1 ) of the diffusion process is calculated, which defines the probability distribution of the current state x t given the previous state x t-1 , and the calculation formula is as follows: where N denotes a normal distribution. Then, at each step t, noise is sampled from a standard Gaussian distribution and superimposed onto the historical scene data, with the formula: until a preset time step T is reached, resulting in the final diffusion result x t This process is a Markov chain, with each step only dependent on the result of the previous step. Finally, by controlling the pace of noise superimposition through a preset variance sequence, the efficiency of generation can be improved by reducing invalid iterations, as the preset variance sequence can be adjusted according to model parameters (time step and offset parameter) to adapt to different data characteristics and generation requirements.
[0065] It should be noted that the preset variance sequence is calculated based on model parameters, including time step T and offset parameter s. The specific calculation process is not the focus of this application, so it will not be expanded here.
[0066] It should be noted that the conditional probability distribution function q(x t |x t-1 ) defines the probability distribution of the current time step t data x t-1 given the previous time step t-1 data x t . This distribution is based on a Gaussian distribution, with its mean and variance determined by the preset variance sequence β t and the cumulative product . Through this conditional probability distribution function, the model can generate a new state at each step based on the previous state and added noise, achieving a smooth transition from the original data to completely noisy data.
[0067] In this way, the pace of noise superimposition is controlled through a preset variance sequence, reducing invalid iterations and improving generation efficiency.
[0068] In some embodiments, the formula for gradually superimposing noise data onto the historical scene data according to a preset variance sequence to obtain a diffusion result is:
[0069]
[0070]
[0071]
[0072] where x t is the diffusion result at step t, is the cumulative product of noise data, x0 is the historical scene data, z is noise data, α t is the scaling factor at each step of the diffusion process, and β tThe preset variance sequence is defined as T, the time step is defined as s, and the offset parameter is defined as s.
[0073] In some embodiments, the stepwise denoising of the diffusion results through the reverse process of a parameterized Markov chain to generate source load scene data with the same dimension and spatiotemporal correlation as the historical scene data specifically involves: inputting the diffusion results into a parameterized Markov chain to output prediction noise; calculating source load scene data using the prediction noise based on the learned Gaussian transition mechanism, and denoising through multi-step iterations until source load scene data with the same dimension and spatiotemporal correlation as the historical scene data is generated. Specifically, firstly, the distribution of the diffusion results is determined. Where I is the identity matrix, and the diffusion result x t The time step T is input into a parameterized Markov chain, which is a noisy prediction model z. θ This is used to predict noise at a given time step t; then, the noise prediction model z is used... θ The obtained prediction noise z θ (x t ,t); Subsequently, based on the predicted noise z θ (x t ,t) and cumulative product Using the learned Gaussian transition mechanism, according to the formula The denoised source-load scene data x is calculated. t-1 By iteratively denoising until the initial time step t = 0 is reached, the time step t decreases in each step until source load scene data with the same dimension and spatiotemporal correlation as the original historical scene data x0 is generated.
[0074] It should be noted that the training process of the noise prediction model is as follows: First, using the Markov property of the diffusion process, x is derived from the previous Gaussian conditional probability distribution. t-1 Given x t The conditional probability distribution of x0 is given by the following formula: in,
[0075] Then, according to Output prediction noise
[0076]
[0077] Voice Then, the loss function for predicting noise is calculated, where L=||x0-μ(x t )|| 2 The trained prediction model z is determined when the loss function is minimized. θwhere μ(x t ) can be parameterized as
[0078] In this way, the spatio-temporal correlation of source-load data is accurately captured by parameterizing Markov chain combined with the learned Gaussian transition mechanism to improve the generation quality, and the generation efficiency is improved by the optimized multi-step iterative denoising process, thereby effectively improving the generation efficiency and generation quality of the multi-type scenario of the power distribution network source-load.
[0079] In some embodiments, the source-load scenario data is calculated using the learned Gaussian transition mechanism and the prediction noise, specifically:
[0080] p(x t-1 ∣x t )≈q(x t-1 ∣x t ,x0=μ(x t ))
[0081]
[0082]
[0083] where x t-1 is the source-load scenario data, α t is the scaling factor of each step in the diffusion process, x t is the diffusion result of the t-th step, is the cumulative product of the noise data, z θ (x t ,t) is the prediction noise, and z is the noise data. is the variance of the conditional distribution q(x t-1 |x t ,x0).
[0084] It should be noted that β t is a preset variance sequence that can schedule the noise, and the value of β t will affect
[0085] In some embodiments, the target error value of the historical scenario data and the source-load scenario data meets a preset threshold condition or reaches a preset iteration step number, a trained target diffusion model is determined, specifically: the Wasserstein distance, the probability density error and the cumulative distribution error between the historical scenario data and the source-load scenario data are calculated, wherein the target error value includes the Wasserstein distance, the probability density error and the cumulative distribution error; if the Wasserstein distance, the probability density error and the cumulative distribution error are all less than or equal to the corresponding preset threshold, or the current iteration number reaches the preset iteration step number, the current diffusion model is determined as the trained target diffusion model. Specifically, first, in each iteration process, the Wasserstein distance between the generated source-load scenario data and the historical scenario data is calculated, the probability density error is obtained by calculating the probability density functions of the two and taking the difference, and the cumulative distribution error is obtained by calculating the closeness of the source-load scenario data and the historical scenario data on the cumulative distribution function; then, if the Wasserstein distance, the probability density error and the cumulative distribution error are all less than or equal to the corresponding preset threshold, that is In the formula, error wa Wasserstein distance between generated data and original data; error PDF Probability density error of generated data and original data; error CDF Cumulative distribution error of generated data and original data; δ wa , δ PDF , δ CDF Wasserstein distance, probability density error, cumulative distribution error threshold, respectively, or the current iteration number reaches the preset iteration step number, once the above conditions are met, it is considered that the diffusion model has been trained, and the current diffusion model is determined as the trained target diffusion model.
[0086] It should be noted that the Wasserstein distance is a method for measuring the difference between two probability distributions, which can reflect the shape and position difference of the distribution; the probability density error measures the closeness of the generated data and the original data on the probability density function; and the cumulative distribution error measures the closeness of the generated data and the original data on the cumulative distribution function.
[0087] In this way, by explicitly setting the thresholds of the Wasserstein distance, the probability density error and the cumulative distribution error, the consistency of the generated scenario and the historical data in distribution and correlation can be ensured to improve the generation quality, and the training process is controlled by the preset iteration step number to avoid redundant calculation to improve the generation efficiency, thereby effectively improving the generation efficiency and generation quality of the multi-type scenario of the power distribution network source-load
[0088] Step S103, input the real-time collected scene data into the target diffusion model to obtain the multi-type scene data of the power distribution network source and load.
[0089] In some embodiments, first, the real-time collected power distribution network scene data is preprocessed, including data cleaning, normalization, etc., to ensure data quality and make it suitable for model input; then, the preprocessed real-time scene data is input into the target diffusion model which has been trained, where the model can understand and process new input data by learning the distribution characteristics of historical scene data; then, the diffusion model generates power distribution network source and load multi-type scene data according to the input real-time data using the generation ability of the diffusion model. In this step, the model will use the learned Gaussian transition mechanism to gradually denoise the input data through the reverse process of the parameterized Markov chain to generate source and load scene data with the same dimension and spatiotemporal correlation as the historical scene data.
[0090] By collecting historical scene data of each node of the to-be-planned power distribution network, the embodiments of the present application can capture the defects of multi-site complex spatiotemporal correlation, provide training samples containing real data features for the diffusion model, and ensure that the diffusion model can learn the core law of the source and load scene to generate high-fidelity scenes; the diffusion process uses Markov chain structure and pre-set variance sequence superimposed noise to ensure the stability and controllability of noise addition, so that the model can fully learn the high-dimensional and multi-modal source and load data distribution; the reverse process accurately captures the spatiotemporal correlation of the source and load data through the parameterized Markov chain combined with the learned Gaussian transition mechanism to improve the generation quality, and at the same time improves the generation efficiency through the optimized multi-step iterative denoising process, thereby effectively improving the generation efficiency and generation quality of the power distribution network source and load multi-type scene, and controlling the rhythm of noise superposition / denoising through the pre-set variance sequence to reduce invalid iterations and further improve the generation efficiency; by inputting the real-time collected scene data into the target diffusion model, multi-type scenes matching the actual working conditions can be directly generated, which continues the model's accurate fitting ability for spatiotemporal correlation and probability distribution, avoids repeated training, significantly improves the scene generation speed in actual application, and meets the demand of power distribution network planning for efficient acquisition of multi-type scenes. Compared with the prior art, the present application can improve the generation efficiency and generation quality of the power distribution network source and load multi-type scene.
[0091] The present application provides a specific embodiment to facilitate understanding:
[0092] Step A, collect historical load data, photovoltaic power generation data, and wind power generation data of each node of the to-be-planned power distribution network, and perform normalization processing on the original data to ensure that the range of the original data is consistent.
[0093] In the embodiment, the load data of a power distribution network in a city in southern China, the historical power generation data of a wind farm and the historical power generation data of a photovoltaic power station are used, and the resolution of the original data is 1 hour. The entire data set is randomly sorted, and 300 scenarios are randomly selected from each month as a training set, and the remaining 65 scenarios are used as a test set.
[0094] Step B, setting diffusion model parameters and iteration steps. The diffusion model parameters include time step, small offset parameter, learning rate, batch size, etc., wherein in the embodiment, the diffusion model parameters are shown in Table 1, and the iteration steps are 500.
[0095] Table 1 Diffusion model parameters
[0096] Parameter name Value Time step 1000 Small shift parameter 0.008 Learning rate 0.0001 Batch 32
[0097] Step C, inputting the historical scenario data and the corresponding time resolution into the diffusion model, the diffusion model sampling noise from the standard Gaussian distribution through the diffusion process, and gradually superimposing the noise into the historical scenario data.
[0098] Step D, the diffusion model gradually denoises the noise data through the reverse process, and generates a power distribution network source load scenario with the same dimension as the original data, wherein the power distribution network source load scenario generated by the diffusion model is shown in Figure 2 .
[0099] Step E, using the Wasserstein distance, probability density function, cumulative distribution function and other evaluation indexes to verify and evaluate the performance of the newly generated power distribution network source load scenario, wherein the probability density function of the power distribution network source load scenario generation result is shown in Figure 3 , the cumulative distribution function of the power distribution network source load scenario generation result is shown in Figure 4 , in the embodiment, δ wa =0.02, δ PDF =0.015, δ CDF =0.02. The Wasserstein distance of the power distribution network source load scenario generation result is shown in Table 2.
[0100] Table 2 Wasserstein distance of power distribution network source load scenario generation result
[0101] Actor Wasserstein distance Load 0.0056 Photovoltaic 0.0093 Wind power 0.0162
[0102] As shown in Figure 5 , on the basis of the above method embodiment, the corresponding device embodiment is provided;
[0103] An embodiment of the present application provides a power distribution network source load multi-type scenario generation system, comprising: an acquisition module 100, a training module 200 and a generation module 300.
[0104] The acquisition module 100 is configured to collect historical scenario data of each node of the power distribution network to be planned, wherein the historical scenario data comprises historical load data, photovoltaic power generation data and wind power generation data having spatiotemporal correlation.
[0105] The training module 200 is configured to input the historical scenario data into a diffusion model to sample noise data from a standard Gaussian distribution through a diffusion process of a Markov chain structure, and to gradually superimpose the noise data on the historical scenario data according to a preset variance sequence to obtain a diffusion result, and to gradually denoise the diffusion result through a reverse process of a parameterized Markov chain to generate source load scenario data having the same dimension and spatiotemporal correlation as the historical scenario data, until a target error value of the historical scenario data and the source load scenario data meets a preset threshold condition or reaches a preset iteration step number, and to determine a trained target diffusion model.
[0106] The generation module 300 is configured to input real-time collected scenario data into the target diffusion model to obtain power distribution network source load multi-type scenario data.
[0107] It can be understood that the above device item embodiments correspond to the method item embodiments of the present application, and can realize the power distribution network source load multi-type scenario generation method provided by any one of the above method item embodiments.
[0108] It should be noted that the device embodiments described above are only schematic, and part or all of the modules thereof can be selected to achieve the purpose of the present embodiment. In addition, in the device embodiment provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which can be realized as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.
[0109] On the basis of the above-mentioned embodiment of the power distribution network source load multi-type scenario generation method, another embodiment of the present application provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to realize the power distribution network source load multi-type scenario generation method of any one embodiment of the present application.
[0110] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the terminal device.
[0111] The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The terminal device can include, but is not limited to, a processor and a memory.
[0112] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The processor is a control center of the terminal device, and connects all parts of the terminal device through various interfaces and lines.
[0113] On the basis of the above-mentioned method embodiment, another embodiment of the present application provides a computer readable storage medium, including a stored computer program, wherein when the computer program runs, the device where the computer readable storage medium is located performs the power distribution network source and load multi-type scene generation method described in any one of the above-mentioned method embodiments of the present application.
[0114] The modules / units integrated in the apparatus / terminal device, if realized in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiments can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the processor executes the computer program, the steps of each method embodiment can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, and the like.
[0115] The above is the preferred embodiment of the present application, it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, can also make a number of improvements and refinements, these improvements and refinements are also considered to be within the scope of the present application.
Claims
1. A method for generating multiple types of source-load scenarios in a power distribution network, characterized in that, include: Collect historical scenario data for each node of the distribution network to be planned, wherein the historical scenario data includes historical load data, photovoltaic power generation data and wind power generation data that have spatiotemporal correlation; The historical scene data is input into the diffusion model to sample noise data from the standard Gaussian distribution through the diffusion process of the Markov chain structure. The noise data is then gradually superimposed onto the historical scene data according to a preset variance sequence to obtain the diffusion result. The diffusion result is then gradually denoised through the reverse process of the parameterized Markov chain to generate source load scene data with the same dimension and spatiotemporal correlation as the historical scene data. This process continues until the target error value between the historical scene data and the source load scene data meets a preset threshold condition or reaches a preset number of iterations, thus determining the trained target diffusion model. The real-time collected scene data is input into the target diffusion model to obtain multi-type scene data of power distribution network sources and loads.
2. The method for generating multiple types of power distribution network source and load scenarios according to claim 1, characterized in that, The collection of historical scenario data for each node of the distribution network to be planned specifically includes: Collect initial historical scenario data of each node of the distribution network to be planned, and clean the initial historical scenario data to obtain the first processing result; The first processing result is normalized to obtain a second processing result, and the second processing result is organized into a preset data format to obtain the historical scene data.
3. The method for generating multiple types of power distribution network source-load scenarios according to claim 1, characterized in that, The process of progressively superimposing noise data onto the historical scene data according to a preset variance sequence to obtain the diffusion result is as follows: Based on a preset variance sequence, the cumulative product of noise data is calculated using a recursive formula. The diffusion data is obtained by combining the historical scene data, the noise data, and the cumulative product. The preset variance sequence can be calculated based on model parameters, including time step and offset parameters.
4. The method for generating multiple types of power distribution network source and load scenarios according to claim 3, characterized in that, The formula for progressively superimposing noise data onto the historical scene data according to a preset variance sequence to obtain the diffusion result is as follows: In the formula, x t The diffusion result at step t, The cumulative product of the noise data, x0 is the historical scene data, z is the noise data, and α is the noise data. t β is the scaling factor for each step in the diffusion process. t The preset variance sequence is defined as T, the time step is defined as s, and the offset parameter is defined as s.
5. The method for generating multiple types of power distribution network source and load scenarios according to claim 1, characterized in that, The diffusion result is gradually denoised through the reverse process of a parameterized Markov chain to generate source-load scene data with the same dimension and spatiotemporal correlation as the historical scene data, specifically as follows: The diffusion results are input into a parameterized Markov chain to output predicted noise; Based on the learned Gaussian transition mechanism, source load scene data is obtained by using the predicted noise, and denoising is performed through multiple steps until source load scene data with the same dimension and spatiotemporal correlation as the historical scene data is generated.
6. The method for generating multiple types of power distribution network source-load scenarios according to claim 5, characterized in that, The learned Gaussian transition mechanism, using the predicted noise to calculate the source-load scene data, specifically involves: In the formula, x t-1 For source and load scene data, α t x is the scaling factor for each step in the diffusion process. t The diffusion result at step t, The cumulative product of the noise data, z θ (x t ,t) represents the predicted noise, and z represents the noise data. For the conditional distribution q(x) t-1 |x t The variance of x0).
7. The method for generating multiple types of power distribution network source-load scenarios according to claim 1, characterized in that, The process continues until the target error value between the historical scene data and the source load scene data meets a preset threshold condition or reaches a preset number of iterations, at which point the trained target diffusion model is determined. Specifically: Calculate the Wasserstein distance, probability density error, and cumulative distribution error between the historical scene data and the source load scene data, wherein the target error value includes the Wasserstein distance, probability density error, and cumulative distribution error; If the Wasserstein distance, the probability density error, and the cumulative distribution error are all less than or equal to the corresponding preset thresholds, or if the current iteration count reaches the preset iteration step count, the current diffusion model is determined to be the trained target diffusion model.
8. A system for generating multiple types of power distribution network source and load scenarios, characterized in that, include: Acquisition module, training module, and generation module; The acquisition module is used to collect historical scene data of each node of the distribution network to be planned. The historical scene data includes historical load data, photovoltaic power generation data and wind power generation data with spatiotemporal correlation. The training module is used to input the historical scene data into the diffusion model, sample noise data from the standard Gaussian distribution through the diffusion process of the Markov chain structure, and gradually superimpose the noise data onto the historical scene data according to the preset variance sequence to obtain the diffusion result. The diffusion result is then gradually denoised through the reverse process of the parameterized Markov chain to generate source load scene data with the same dimension and spatiotemporal correlation as the historical scene data, until the target error value between the historical scene data and the source load scene data meets the preset threshold condition or reaches the preset number of iterations, and the trained target diffusion model is determined. The generation module is used to input the real-time collected scene data into the target diffusion model to obtain multi-type scene data of power distribution network sources and loads.
9. A terminal device, characterized in that, include: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating multiple types of power distribution network sources and loads as claimed in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for generating multiple types of power distribution network source and load scenarios as described in any one of claims 1-7.