Power data diffusion generation method and system based on physical constraints and decoupled latent space
By using a power data diffusion generation method based on physical constraints and decoupling latent space, the problems of unstable generation and violation of physical laws in existing technologies are solved, and high-quality, diverse power data with consistent physical laws are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED
- Filing Date
- 2026-06-24
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to generate power data that balances generation stability, long-sequence modeling capabilities, and consistency with physical laws, resulting in insufficient sample diversity and violations of power grid physical laws.
A power data diffusion generation method based on physical constraints and decoupled latent space is adopted. By adaptively decoupling time-frequency domain features through discrete wavelet transform, and mapping to a low-dimensional latent space using an encoder, combined with a diffusion denoising model and a physical constraint network, high-quality power data synthesis is achieved.
The generated power data balances time-frequency domain feature decoupling with physical consistency, avoiding pattern collapse, ensuring that the generated data conforms to the physical laws of the power grid, and providing diversity and stability.
Smart Images

Figure CN122432682A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to power data generation technology, specifically to a power data diffusion generation method and system based on physical constraints and decoupling latent space. Background Technology
[0002] High-quality power time series data is fundamental for accurate load forecasting, grid stability analysis, and power dispatch optimization. However, in practical applications, high-quality power samples are often difficult to obtain on a large scale due to factors such as data security control policies, sensor link failures, and the scarcity of extreme weather samples. Existing technologies mainly employ Generative Adversarial Networks (GANs) or traditional smoothing interpolation methods for data augmentation. However, GANs suffer from severe training instability when dealing with power sequences that are highly non-stationary and have complex periodicity, and are prone to "pattern collapse," resulting in insufficient diversity of generated samples. More importantly, existing deep learning models are mostly black-box architectures, lacking constraints on the physical logic of the power grid. Although the generated current, voltage, or load waveforms are statistically close to the true values, they often violate Kirchhoff's laws or power balance equations, rendering the synthetic data unusable in actual dispatch analysis. Furthermore, traditional models struggle to effectively handle ultra-long sequence dependencies that can last for weeks or even months. Therefore, developing a power data generation method that balances generation stability, long-sequence modeling capabilities, and consistency with physical laws has become a critical issue that urgently needs to be addressed in the field of power system big data. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method and system for generating power data diffusion based on physical constraints and decoupling latent space, so as to achieve high-quality power data synthesis that takes into account both time-frequency domain feature decoupling and physical consistency.
[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for generating power data diffusion based on physical constraints and decoupled latent space includes the following steps: By acquiring power time series data and adaptively decoupling in the time and frequency domain through discrete wavelet transform, approximate components representing long-term load trends and detailed components representing instantaneous fluctuation characteristics are obtained. The encoder is used to map the decoupled approximation components and detail components to a low-dimensional continuous latent space, and reparameterization is performed to obtain the latent space representation of the power time series data. The latent space representation of power time series data is input into the diffusion denoising model to obtain the predicted latent space vector. The diffusion denoising model first adds noise to the input data to obtain a noise interference sequence, and then inputs the noise interference sequence into the denoising backbone network to predict the latent space variables at each time. During the reverse prediction process, the prediction results of the latent space variables at each time are logically calibrated in real time through the physical constraint network. The decoder is used to reconstruct the predicted latent space vectors into high-quality power time series data.
[0005] Furthermore, when acquiring power time series data and adaptively decoupling in the time-frequency domain using discrete wavelet transform, specifically, the learnable low-pass and high-pass filter banks are set with initial parameters and then trained. During training, the parameters of the low-pass and high-pass filter banks are adaptively optimized using the gradient descent algorithm, so that the parameters of the low-pass and high-pass filter banks are jointly trained according to the load characteristics under specific power grid scenarios to accurately identify the daily and weekly evolution patterns.
[0006] Furthermore, when reparameterizing, an encoder is used to map the decoupled approximation components and detail components to a low-dimensional continuous latent space. Specifically, an encoder with a variational autoencoder structure is used to map the decoupled approximation components and detail components to a low-dimensional continuous latent space. Thus, the input is mapped to the mean and variance of a probability distribution through the encoder network. Using reparameterization techniques, the latent space representation is calculated based on the mean and variance.
[0007] Furthermore, the denoising backbone network adopts a Patch-Transformer architecture, which slices the input data to obtain latent variable time series blocks corresponding to each time step. A dual-cycle joint positional encoding containing daily sine features and weekly cosine features is introduced at the input end and superimposed on the latent variable time series blocks. Timestamps, meteorological data, holiday labels, and static features of power grid nodes mapped and copied by a multilayer perceptron are used as condition vectors. In each layer, a cross-attention mechanism is used to calculate the latent variable time series blocks as queries and the condition vectors as keys and values, thereby using a global self-attention mechanism to capture the ultra-long-term time dependencies across quarters and years in the power time series data.
[0008] Furthermore, when performing real-time logical calibration of the latent space variable prediction results at each time step using a physical constraint network, the specific steps include: The physical consistency loss function is calculated based on the preset physical threshold and the prediction results of the latent space variables at the current moment. Then, the gradient of the physical loss consistency function with respect to the latent space variables at the current moment is calculated. The prediction results of the latent space variables at the current moment are corrected by combining the physical guidance step size coefficient, thereby correcting the predicted trajectory of the latent variables so that it approaches the physical feasible region that satisfies the power system operation constraints.
[0009] Furthermore, the mathematical expression for the physical consistency loss function is as follows:
[0010] in, This represents the i-th active power data in the approximate power data after decoding the latent space variables at the current moment. This represents the corresponding node voltage data. Indicates the maximum ramp threshold. This indicates an upper limit constraint on the power value; and These represent the lower and upper limits of the safe voltage, respectively. , and These are the penalty weights, This represents the activation function.
[0011] Furthermore, the revised mathematical expression for the current time-series latent space variable prediction results is as follows:
[0012] in, This represents the prediction result of the latent space variables at the current moment. The physical consistency loss function represents the prediction results of the latent space variables at the current moment. The cumulative noise figure defined for the forward noise addition stage. This is the physical guidance step size coefficient. For partial derivative operators, The gradient of the physical consistency loss function of the latent space variable prediction results at the current time is given by the latent space variable at the current time. This gradient is obtained by taking the derivative based on the chain rule using an automatic differentiation mechanism.
[0013] Furthermore, when using a decoder to reconstruct the predicted latent space vector into high-quality power time series data, the following steps are included: The predicted latent space vector is input into the decoder of the variational autoencoder structure, and the latent space vector is mapped back to the original feature space through inverse transformation to obtain the power time series data. The power time series data generated by the decoder is smoothed using a Savitzky-Golay filter, and then the smoothed power time series data is inversely normalized.
[0014] The present invention also proposes a power data diffusion generation system based on physical constraints and decoupling latent space, comprising a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the power data diffusion generation method based on physical constraints and decoupling latent space.
[0015] The present invention also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the power data diffusion generation method based on physical constraints and decoupling latent space.
[0016] Compared with the prior art, the advantages of the present invention are as follows: This invention achieves high-quality power data synthesis that balances time-frequency domain feature decoupling and physical consistency through a three-stage cascaded architecture of "time-frequency decoupling - latent space diffusion - physical constraints". First, learnable discrete wavelet transform is used to adaptively decouple the power time series data in the time-frequency domain, achieving explicit separation of the fundamental trend and high-frequency noise, enhancing feature interpretability. Then, the encoder maps the decoupled approximate and detail components to a low-dimensional continuous latent space, performing reparameterization to obtain the latent space representation of the power time series data, compressing computational dimensionality while preserving key time-frequency features. The core generation stage employs a diffusion denoising model. First, the input data is denoised to obtain a noise interference sequence. This noise interference sequence is then input into the denoising backbone network to predict the latent space variables at each time step, thereby capturing long-period dependencies. Furthermore, a physical constraint network performs real-time logical calibration on the predicted latent space variables at each time step, forcing the generated samples to converge towards a feasible region that conforms to the physical laws of the power grid. Finally, the decoder reconstructs the predicted latent space vectors into high-quality power time series data. This invention deeply integrates statistical generation stability with physical rule constraints, which not only avoids the pattern collapse of GANs, but also solves the pain point of "statistically real but physically absurd" in pure data-driven methods. Attached Figure Description
[0017] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.
[0018] Figure 2 This is a flowchart illustrating the reverse prediction of latent space variables at various times and real-time logic calibration in an embodiment of the present invention.
[0019] Figure 3A comparison chart showing the relationship between real power data and power data generated by the method in this embodiment of the invention. Detailed Implementation
[0020] The present invention will be further described below with reference to the accompanying drawings and specific preferred embodiments, but this does not limit the scope of protection of the present invention.
[0021] To overcome the shortcomings of existing Generative Adversarial Networks (GANs) in generating power time series data, such as training instability, pattern collapse, and generated samples that violate the physical laws of the power grid, this embodiment proposes a power data diffusion generation method based on physical constraints and decoupled latent space (Physics-Informed Disentangled Latent Diffusion Model, PIDDM). This method abandons the traditional adversarial game mechanism and introduces a latent diffusion probability model and a physical information neural network (PINN). It integrates the generation stability of the latent diffusion probability model, the feature extraction capability of time-frequency domain decoupling, and the logical constraint advantages of the physical information neural network, achieving high-quality power data synthesis that balances time-frequency domain feature decoupling and physical consistency.
[0022] like Figure 1 As shown, this method achieves high-quality reconstruction and enhancement of power time series through five core modules: a time-frequency domain adaptive decoupling layer, a latent space coding and compression module, a diffusion generation engine, a physical information-guided correction module, and a reconstruction and output layer. The steps include: S101: Acquire power time series data, and use discrete wavelet transform to adaptively decouple in the time and frequency domains to obtain approximate components representing long-term load trends and detailed components representing instantaneous fluctuation characteristics.
[0023] In this embodiment, based on the coexistence of strong periodicity and instantaneous randomness in power data, the time-frequency domain adaptive decoupling layer uses learnable discrete wavelet transform (L-DWT) to perform multi-scale decomposition on the original power time series data, extracting trend and fluctuation features to obtain low-dimensional components representing long-term trends and components representing short-term fluctuations.
[0024] In this embodiment, the time-frequency domain adaptive decoupling layer includes a learnable low-pass filter bank h and a high-pass filter bank g. The filter parameters are adaptively optimized using a gradient descent algorithm, thereby decomposing the original power sequence X into an approximate component A representing the long-term load trend and a detailed component D representing instantaneous fluctuation characteristics. When acquiring power time-series data and performing time-frequency domain adaptive decoupling using discrete wavelet transform, specifically, the learnable low-pass filter bank h and high-pass filter bank g are set with initial parameters and then trained. During training, the parameters of the low-pass filter bank h and high-pass filter bank g are adaptively optimized using a gradient descent algorithm, so that the parameters of the low-pass filter bank h and high-pass filter bank g are jointly trained according to the load characteristics under a specific power grid scenario to accurately identify the daily and weekly cycle evolution patterns.
[0025] Specifically, in this embodiment, the raw power time series data is input. The dimension is set to ,in (Corresponding to a sampling frequency of 15 minutes per day), number of channels (each includes active power) reactive power and node voltage The number of decomposition levels for the discrete wavelet transform is set to... To better capture the asymmetric ramping characteristics unique to electrical loads, filter banks... and The initial parameters are not randomly initialized, but rather initialized to Daubechies4 (db4) wavelet basis coefficients, and then fine-tuned during training. Approximate components after decomposition. The corresponding frequency is lower than The fundamental wave, physically characterizing the daily base load curve; detailed components Include The three components physically characterize the high-frequency noise caused by users' random switching behavior and sudden weather changes.
[0026] Its decomposition function is defined as:
[0027] The parameters of filter banks h and g are jointly trained based on the load characteristics under specific power grid scenarios. During the training process, the wavelet basis function is automatically optimized based on the periodic characteristics of power data through the gradient descent algorithm, so as to achieve explicit decoupling of time domain information and frequency domain information, and accurately identify the evolution law of daily and weekly cycles.
[0028] S102: The encoder is used to map the decoupled approximate components and detail components to a low-dimensional continuous latent space, and reparameterization is performed to obtain the latent space representation of the power time series data.
[0029] In this embodiment, to reduce the computational overhead of the generation process and filter high-frequency redundant noise in the original signal, the latent space coding and compression module constructs a variational autoencoder (VAE) to decouple the combined features. The input is mapped to a low-dimensional continuous latent space, and the encoder network E maps the input to the mean of the probability distribution. and variance The latent space representation is obtained by utilizing reparameterization techniques, and then the decomposed feature components are mapped to a low-dimensional latent space through an encoder to obtain the power latent space representation. The mathematical expression is as follows:
[0030] In this embodiment, to clarify the above representation process: the encoder adopts a multi-scale convolutional architecture based on 1D-ResNet, with an input dimension of... (After feature channel expansion), after three downsampling operations, the compression ratio of the time dimension is 6:1. Finally, the original electrical features of 96 time steps are compressed into a latent space manifold with a time length of 16 and a feature dimension of 64. This compression significantly improves the convergence speed of subsequent diffusion engines. Simultaneously, by minimizing the Kullback-Leibler divergence, the latent space is guided to exhibit a standard normal distribution, and the weighting coefficients of the Kullback-Leibler divergence loss are... Set as This provides a continuous and smooth search space for random sampling in subsequent diffusion models.
[0031] Furthermore, to enhance the model's generalization ability across different power grid nodes, static features (such as node rated capacity, voltage level, and user type identifier) in the original power data are independently embedded. Specifically, a multilayer perceptron (MLP) with two hidden layers (128 and 64 neurons respectively) is used to map the static features into 64-dimensional static embedding vectors. Subsequently, these static embedding vectors are replicated and expanded in the time dimension so that their length is proportional to the dynamic latent space manifold. The time length is consistent, and it is consistent with the feature channel dimension. By splicing and merging, the latent space features of the merged system are obtained. This feature fusion mechanism enables the subsequent diffusion process to explicitly perceive the inherent physical properties of power grid nodes, effectively preventing the generation of abnormal load curves that violate the node capacity limit.
[0032] S103: Input the latent space representation of the power time series data into the diffusion denoising model to obtain the predicted latent space vector.
[0033] In this embodiment, the diffusion generation engine constructs a diffusion denoising model within the latent space. It learns the power data distribution through a forward denoising process and a denoising backbone network based on a Patch-Transformer architecture. Simultaneously, during the reverse denoising process, a Physical Constraint Network (PINN) is introduced through a Physical Information Guided Correction Module to calculate the deviation between the generated data and the laws of electrical physics, and this deviation is used as gradient information to guide the denoising process.
[0034] In this embodiment, the diffusion denoising model performs a diffusion generation process within the latent space, which includes two stages: forward denoising and backward denoising. (1) Noise is added to the input data to obtain a noise interference sequence.
[0035] Forward noise addition Apply T-step noise to obtain In this embodiment, the total number of diffusion steps is set to... Furthermore, a cosine noise scheduling strategy is employed to retain more signal structure information. Addressing the non-stationary characteristics of power load data—strong low-frequency fundamental frequency and weak high-frequency fluctuations—this scheme adaptively improves the traditional forward noise addition stage by specifically setting adaptive offset parameters for the cosine noise scheduling. The innovative logic of this design lies in the fact that, compared to the linear scheduling commonly used in image generation, cosine scheduling with a specific offset can largely preserve the low-frequency structural information representing the daily base load curve in the early stages of noise addition, avoiding the instantaneous destruction of the fundamental trend of the power sequence, thereby improving the model's ability to remember long-sequence periodic dependencies. The noise addition formula for each step is:
[0036] In the formula, The cumulative noise figure is calculated using an adaptive offset parameter. The cosine function is defined as follows: ,in By setting , making The noise variance at that time is not absolutely zero, thus effectively preventing the model from generating numerical singularities at the end of the denoising period and preserving the fundamental wave characteristics to the greatest extent.
[0037] (2) Input the noise interference sequence into the denoising backbone network to predict the latent space variables at each time step.
[0038] In this embodiment, the inverse denoising process adopts a DiT architecture, which divides the latent space sequence into several temporal patches through a multi-scale slicing mechanism. Each temporal patch corresponds to multiple consecutive sampling points in physical time. The network processes the conditional vector through a cross-attention mechanism, where the features of the latent variables serve as queries, and the conditional vector serves as keys and values, to capture long-distance dependencies across quarters and years in the power sequence. For the inverse denoising stage, this scheme makes adaptive improvements to the traditional DiT architecture for power scenarios: at the input of the Patch-Transformer, the traditional 1D absolute positional encoding is abandoned, and dual-periodic positional encoding is introduced. Specifically, a sine positional encoding with a dimension of 32 is assigned to the daily periodic features corresponding to 96 sampling points of a day, and a cosine positional encoding with a dimension of 32 is assigned to the weekly periodic features corresponding to 7 days of a week. The two are then concatenated and superimposed onto the temporal patches.
[0039] Specifically, the denoising backbone network adopts a Patch-Transformer architecture, which transforms the latent space sequence into multiple temporal blocks (Patches) through a slicing mechanism. Specifically, it transforms latent variables of length 16 into... It is divided into 8 patches, each patch being [size missing]. This corresponds to 12 time steps (i.e., 3 hours) in the original data. This allows the model to capture the ramp-up and peak-valley characteristics of power load using "3 hours" as a semantic unit. A global self-attention mechanism is used to capture ultra-long-term time dependencies in the power data. The loss function for diffusion training is defined as:
[0040] In the formula, For injected noise, The noise predicted by the denoising network is denoised as c, and c is an external condition vector containing information such as weather and electricity prices. The condition vector... The construction method involves concatenating timestamps (mapped via sinusoidal position encoding), normalized meteorological data (temperature, humidity), and holiday labels (0 / 1 embeddings). Each layer of the Patch-Transformer uses a cross-attention mechanism to... Using latent variable Patch features as both Key and Value, we can explicitly guide the generation of loads by environmental factors.
[0041] In this embodiment, the physical information-guided correction module performs real-time logical calibration of the latent space variable prediction results at each time step using a physical constraint network. For example... Figure 2 As shown, by combining a physical constraint network, at each time step of backsampling... In the process, the latent variables were initially predicted. Real-time logic calibration is performed. The physical information-guided correction module defines the physical residual terms for power system operation. It includes nonnegativity constraints, power upper and lower limits constraints, and ramp rate constraints.
[0042] In this embodiment, the physical constraint network is built upon power system operating criteria, and the physical constraints include node power operating limits and node voltage safety ranges. To ensure that the generated load curve conforms to the physical response characteristics of generator sets and transformers, the following specific physical thresholds are set: Ramp Rate Constraint: Limits the power variation between adjacent time steps (15 minutes) to no more than 20% of the rated capacity.
[0043] Boundary Constraint: Restricts the generated power value to be within the range [0, 1]. Within the range, This represents the highest historical load before normalization.
[0044] Voltage Security Constraint: Restricts the generated node voltage values to a preset safe operating range. Inside, for example, per-unit value to between.
[0045] Path correction is performed by calculating the gradient of the latent variable using the residuals:
[0046] In the formula, This represents the prediction result of the latent space variables at the current moment. The physical consistency loss function represents the prediction results of the latent space variables at the current moment. The cumulative noise figure is defined for the forward noise addition stage, and the physical guidance step size coefficient is used. For partial derivative operators, This represents the gradient of the physical consistency loss function of the latent space variable prediction results at the current time step with respect to the latent space variables at the current time step. Specifically, this gradient is obtained by taking the predicted latent variables... Input pre-trained decoder The physical consistency loss is calculated by mapping approximate power data to physical space. Then, using the automatic differentiation mechanism (Autograd) of the deep learning framework, the derivative is obtained by backpropagation through the decoder network based on the chain rule. In this embodiment, it is set as follows: This coefficient controls the strength of the physical constraints' intervention in the generation process: a coefficient that is too small will cause the constraints to fail, while a coefficient that is too large will cause artifacts in the generated image. In the diffusion probability model, it strictly corresponds to the current time step. The noise standard deviation is used to dynamically adjust the gradient magnitude based on the current noise level, ensuring large corrections in the early stages of denoising (when noise is high) and fine-tuning in the later stages (when noise is low). To clarify the above correction logic, the physical consistency loss function Specifically defined as:
[0047] in, It is approximate power data after latent variable decoding. Represents the latent space variable at the current time. The i-th data point in the decoded approximate power data; This represents the corresponding node voltage data; The maximum ramp threshold is set (e.g., 0.2). The penalty weights are applied. Gradient correction mechanism: If the generated load value violates the above constraints, the physical gradient will force the direction of the latent space vector to move closer to the feasible region that conforms to the physical common sense of the power grid while denoising.
[0048] The physical constraint guidance of the physical information guidance correction module adopts a gradient-based projection technique. In each denoising time step, the gradient of the physical loss function with respect to the current latent variable is calculated using the aforementioned automatic differentiation mechanism. The guidance step size coefficient is dynamically adjusted in combination with the current noise level to correct the predicted latent variable trajectory so that it approaches the physical feasible region that satisfies the power system operation constraints.
[0049] Therefore, when performing real-time logical calibration of the latent space variable prediction results at each time step through the physical constraint network, the specific method is based on formula (6), which calculates the physical consistency loss function according to the preset physical threshold and the latent space variable prediction results at the current time step. Then, the gradient of the physical loss consistency function with respect to the latent space variables at the current time step is calculated. Based on formula (5), the latent space variable prediction results at the current time step are corrected in combination with the physical guidance step size coefficient, thereby correcting the predicted latent variable trajectory so that it approaches the physical feasible region that satisfies the power system operation constraints.
[0050] In this embodiment, the total loss function of the diffusion denoising model This includes variational lower bound loss, conditional probability distribution loss, and a physical consistency penalty term generated by the physical constraint network. Specifically, this scheme adopts a simplified version of the noise prediction loss defined in equation (4). To unify the characterization of variational lower bound and conditional probability distribution loss, and to achieve physical consistency loss as defined in equation (6). The weighted combination yields the following mathematical form of its total loss function: in, To control the adaptive weighting coefficient of the physical constraint strength, it is initially set to [value] in this embodiment. .
[0051] S104: Use a decoder to reconstruct the predicted latent space vector into high-quality power time series data.
[0052] In this embodiment, the reconstruction and output layer uses a decoder to reconstruct the corrected latent space representation into high-quality power time series data. The reconstruction and output layer then converts the final latent space vector obtained after T steps of correction into... The input is a pre-trained decoder D. The decoder uses an inverse transform to map the latent space vectors back to the original feature space, reconstructing a complete, high-quality power time series.
[0053] In this embodiment, to eliminate the "blocking artifacts" that may be caused by the Patch-Transformer slicing mechanism, a post-processing smoothing step is added after the decoder output: the generated time series is smoothed using a Savitzky-Golay filter with a window size of 5 and a polynomial order of 3. Subsequently, the data is denormalized to restore it to the original MW (megawatt) and kV (kilovolt) physical units. This generated data can be directly used for downstream tasks such as power system analysis, anomaly detection, or load forecasting. Therefore, when using the decoder to reconstruct the predicted latent space vector into high-quality power time series data, the process includes: The predicted latent space vector is input into the decoder of the variational autoencoder structure, and the latent space vector is mapped back to the original feature space through inverse transformation to obtain the power time series data. The power time series data generated by the decoder is smoothed using a Savitzky-Golay filter, and then the smoothed power time series data is inversely normalized.
[0054] In this embodiment, the encoder and decoder, employing a variational autoencoder structure, ensure the invertibility of the mapping between the latent space and the original electrical feature space through a reconstruction loss function. As a mature technology publicly disclosed in the field, this reconstruction loss function... Specifically, it consists of a mean squared error (MSE) reconstruction term and a KL divergence regularization term, and its formula is as follows: in, For the decoupling features of the input, and These represent the network mapping operations for the encoder and decoder, respectively. To ensure the reversibility of the feature space mapping, a reconstruction error term is required; The KL divergence term is used to measure the difference between the latent space distribution and the standard normal distribution. The KL divergence weighting coefficients were set as described above.
[0055] The comparison results between the power time series data generated through the above steps and the actual power data are as follows: Figure 3 As shown in Figure 3, the two core beneficial effects of the method in this embodiment can be intuitively verified: First, the superior ability to generate diverse samples. Compared with the original real data (blue line), the synthetic data generated in this embodiment (red line) exhibits extremely rich fluctuation patterns and high-frequency detailed features while retaining the overall macro trend. This proves that the diffusion probability model used in this embodiment effectively overcomes the mode collapse problem that is prone to occur in traditional GAN networks, and can generate a large number of edge load scenarios with high coverage for the power grid, thereby greatly expanding the training sample library for downstream tasks. Second, strict consistency of physical rules. Although the generated red line has high diversity and violent fluctuations, its overall peak and trough values are strictly limited within a reasonable physical upper and lower limit range (as shown in the figure, the values do not exceed the historical maximum load). The power jump amplitudes in adjacent time steps did not exhibit any non-physical distortions that violated the ramp rate constraint (the upper limit set by the standard), which strongly demonstrates that the PINN physical information gradient guidance module introduced in this embodiment has successfully played its role, ensuring that the generated power data fully meets the physical feasible region requirements for safe grid operation while possessing extremely high statistical diversity.
[0056] Furthermore, this embodiment also proposes a power data diffusion generation system based on physical constraints and decoupling latent space, including a processor and a computer-readable storage medium. The computer-readable storage medium stores a computer program, which is executed by the processor to implement the steps of the power data diffusion generation method based on physical constraints and decoupling latent space described in this embodiment.
[0057] Furthermore, this embodiment also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the power data diffusion generation method based on physical constraints and decoupling latent space described in this embodiment.
[0058] In summary, this invention first decouples the original power time series data in the time and frequency domains using a learnable discrete wavelet transform (L-DWT), wherein the transform is initialized to Daubechies 4 (db4). The filter bank extracts approximate components representing long-term load trends and detailed components representing instantaneous disturbances. A variational autoencoder (VAE) maps the decoupled features to a low-dimensional continuous latent space to construct a compressed representation of the power data. Subsequently, a diffusion probability model is built within the latent space. A forward denoising process is performed using a pre-defined denoising sequence, and a denoising network based on a Patch-Transformer architecture performs backsampling. A slicing mechanism transforms the latent space sequence into time-series blocks (Patches) with physical temporal meaning. A cross-attention mechanism injects external environmental condition vectors as keys and values into the network. In the backsampling loop, a Physical Constraint Network (PINN) is introduced to monitor the state of the generated samples in real time. By calculating the residuals between the samples and physical laws such as grid power balance and non-negativity constraints, and dynamically adjusting the guiding step size coefficient based on the current noise level, the physical gradient is projected onto the latent space to correct the denoising trajectory. Finally, the trained decoder reconstructs the corrected latent space vectors into high-quality, physically logical power time-series data. The present invention has the following significant beneficial effects: 1. Extremely high physical realism: By introducing a physical information neural network (PINN) as a real-time guidance mechanism, this invention forces the generated samples to follow the physical laws of the power grid during the denoising process, completely solving the pain point of "statistically real but physically absurd" data generated by traditional deep learning models.
[0059] 2. Excellent generation stability: By using a diffusion probability model instead of the traditional generative adversarial network (GAN), the problems of mode collapse and training non-convergence are avoided from a mathematical perspective, and high-quality power samples with diverse and stable distribution can be generated.
[0060] 3. Fine feature capture capability: This invention uses a learnable wavelet transform initialized to db4. Compared with conventional random initialization or fixed wavelets, this filter bank can adaptively match the asymmetric ramp and instantaneous change features commonly found in power load curves, effectively separate the fundamental trend from high-frequency noise, and greatly improve the modeling accuracy of complex power cycle features.
[0061] 4. Deep Environmental Semantic Guidance Capability: Unlike the simple feature splicing in existing technologies, this invention utilizes the cross-attention mechanism of Patch-Transformer to process meteorological and holiday information. This structure enables the model to explicitly query and generate corresponding load waveforms (such as air conditioning load spikes) based on environmental context (such as high temperature, holidays), achieving controllable and accurate conditional generation.
[0062] 5. Dynamic Physical Consistency Guarantee: The dynamic gradient physical guidance mechanism proposed in this invention can adaptively adjust the intervention intensity of physical constraints according to the noise level during the diffusion process. Significant physical corrections are performed in the early stages of denoising, followed by fine-tuning in the later stages. This ensures that the final generated data strictly adheres to node voltage safety constraints and power operating limits, while avoiding data distribution distortion caused by forced truncation.
[0063] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create an implementation for the process. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0064] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A method for generating power data diffusion based on physical constraints and decoupling latent space, characterized in that, Includes the following steps: By acquiring power time series data and adaptively decoupling in the time and frequency domain through discrete wavelet transform, approximate components representing long-term load trends and detailed components representing instantaneous fluctuation characteristics are obtained. The encoder is used to map the decoupled approximation components and detail components to a low-dimensional continuous latent space, and reparameterization is performed to obtain the latent space representation of the power time series data. The latent space representation of power time series data is input into a diffusion denoising model to obtain a predicted latent space vector. The diffusion denoising model first adds noise to the input data to obtain a noise interference sequence, and then inputs this noise interference sequence into a denoising backbone network to predict the latent space variables at each time step. During the reverse prediction process, a physical constraint network is used to perform real-time logical calibration on the prediction results of the latent space variables at each time step to obtain the predicted latent space vector. Specifically, the real-time logical calibration of the prediction results of the latent space variables at each time step using the physical constraint network includes: The physical consistency loss function is calculated based on the preset physical threshold and the prediction results of the latent space variables at the current time. Then, the gradient of the physical loss consistency function with respect to the latent space variables at the current time is calculated. The prediction results of the latent space variables at the current time are corrected by combining the physical guidance step size coefficient, thereby correcting the predicted latent variable trajectory so that it approaches the physical feasible region that satisfies the power system operation constraints. The decoder is used to reconstruct the predicted latent space vectors into high-quality power time series data.
2. The power data diffusion generation method based on physical constraints and decoupling latent space according to claim 1, characterized in that, When acquiring power time series data and adaptively decoupling it in the time and frequency domain using discrete wavelet transform, the initial parameters of the learnable low-pass and high-pass filter banks are set and then trained. During training, the parameters of the low-pass and high-pass filter banks are adaptively optimized using the gradient descent algorithm. This allows the parameters of the low-pass and high-pass filter banks to be jointly trained according to the load characteristics under specific power grid scenarios, so as to accurately identify the daily and weekly cycle evolution patterns.
3. The power data diffusion generation method based on physical constraints and decoupling latent space according to claim 1, characterized in that, When reparameterizing, an encoder is used to map the decoupled approximation components and detail components to a low-dimensional continuous latent space. Specifically, an encoder with a variational autoencoder structure is used to map the decoupled approximation components and detail components to a low-dimensional continuous latent space. Thus, the input is mapped to the mean and variance of a probability distribution through the encoder network. Using reparameterization techniques, the latent space representation is calculated based on the mean and variance.
4. The power data diffusion generation method based on physical constraints and decoupling latent space according to claim 1, characterized in that, The denoising backbone network adopts a Patch-Transformer architecture, which slices the input data to obtain latent variable time series blocks corresponding to each time step. A dual-cycle joint positional encoding containing daily sine features and weekly cosine features is introduced at the input end and superimposed on the latent variable time series blocks. Timestamps, meteorological data, holiday labels, and static features of power grid nodes mapped and copied by a multilayer perceptron are used as condition vectors. In each layer, a cross-attention mechanism is used to calculate the latent variable time series blocks as queries and the condition vectors as keys and values, thereby capturing ultra-long-term time dependencies across quarters and years in power time series data using a global self-attention mechanism.
5. The power data diffusion generation method based on physical constraints and decoupling latent space according to claim 1, characterized in that, The mathematical expression for the physical consistency loss function is as follows: in, This represents the i-th active power data in the approximate power data after decoding the latent space variables at the current moment. This represents the corresponding node voltage data. Indicates the maximum ramp threshold. This indicates an upper limit constraint on the power value; and These represent the lower and upper limits of the safe voltage, respectively. , and These are the penalty weights, This represents the activation function.
6. The power data diffusion generation method based on physical constraints and decoupling latent space according to claim 1, characterized in that, The corrected mathematical expression for the current time-live potential variable prediction is as follows: in, This represents the prediction result of the latent space variables at the current moment. The physical consistency loss function represents the prediction results of the latent space variables at the current moment. The cumulative noise figure defined for the forward noise addition stage. This is the physical guidance step size coefficient. For partial derivative operators, The gradient of the physical consistency loss function of the latent space variable prediction results at the current time is given by the latent space variable at the current time. This gradient is obtained by taking the derivative based on the chain rule using an automatic differentiation mechanism.
7. The power data diffusion generation method based on physical constraints and decoupling latent space according to claim 1, characterized in that, When using a decoder to reconstruct the predicted latent space vector into high-quality power time series data, the following are included: The predicted latent space vector is input into the decoder of the variational autoencoder structure, and the latent space vector is mapped back to the original feature space through inverse transformation to obtain the power time series data. The power time series data generated by the decoder is smoothed using a Savitzky-Golay filter, and then the smoothed power time series data is inversely normalized.
8. A power data diffusion generation system based on physical constraints and decoupling latent space, characterized in that, The device includes a processor and a computer-readable storage medium storing a computer program, which is executed by the processor to implement the steps of the power data diffusion generation method based on physical constraints and decoupling latent space as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the power data diffusion generation method based on physical constraints and decoupling latent space as described in any one of claims 1 to 7.