Generative adversarial network-based bus voltage fluctuation prediction and dynamic reactive compensation method
By constructing a high-voltage bus voltage fluctuation prediction and dynamic reactive power compensation system based on GAN and DRL methods, the problems of insufficient prediction accuracy and response speed of bus voltage fluctuation were solved, and high-precision, fast and robust voltage control was achieved, thereby improving the stability and economy of the power grid.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies have poor generalization ability in the high-voltage bus voltage fluctuation prediction stage, slow response speed in the compensation stage, and insufficient overall robustness. They are unable to effectively cope with frequent bus voltage fluctuations caused by sudden changes in new energy output and load changes, which affects grid stability and equipment lifespan.
A bus voltage fluctuation prediction model and dynamic reactive power compensation strategy are constructed using a method based on generative adversarial networks (GAN) and deep reinforcement learning (DRL). The prediction accuracy and robustness are enhanced through adversarial training mechanism, and the compensation strategy is optimized by combining deep learning to achieve millisecond-level response and equipment collaborative optimization.
It significantly improves the accuracy and generalization ability of bus voltage fluctuation prediction, meets the millisecond-level control requirements in response speed, enhances the model's adaptability to noise and equipment parameter fluctuations, reduces the regulation losses of reactive equipment, and improves the stability and economy of the power grid.
Smart Images

Figure CN121643019A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power system automation, and more particularly, to a bus voltage fluctuation prediction and dynamic reactive power compensation method based on a generative adversarial network. BACKGROUND
[0002] With the accelerating process of global energy transformation, 220kV and higher voltage level buses as key node facilities of the energy internet bear the core tasks of regional power aggregation, distribution and cross-regional power exchange. As of recent years, the total number of ultra-high voltage buses in China has exceeded 1,000, among which the installed capacity of new energy such as wind power and photovoltaic through bus grid connection has accounted for more than 40%. However, new energy generation itself has significant intermittent, volatile and random characteristics. For example, wind power output is affected by sudden changes in wind speed, and photovoltaic output is prone to fluctuations due to cloud cover. At the same time, industrial loads are often accompanied by sudden changes. These factors together cause frequent transient fluctuations in bus voltage, with fluctuation amplitudes deviating from the rated voltage and durations ranging from tens of milliseconds to hundreds of milliseconds.
[0003] Bus voltage transient problems not only accelerate the insulation aging of key power equipment such as transformers and circuit breakers associated with the bus, shortening the service life of the equipment, but also can cause a chain reaction, such as causing relay protection devices to malfunction, new energy inverters to be disconnected from the grid, and in severe cases, even threatening the stable operation of the entire power grid.
[0004] To solve the problem of bus voltage fluctuation, existing technologies mainly include two core links: "prediction" and "compensation", but both have obvious defects.
[0005] In the bus voltage fluctuation prediction link, traditional methods can be divided into two categories: one is the prediction method based on physical models (such as power flow calculation), which relies on accurate bus and associated line parameters and topology structure, and has weak fitting ability for the nonlinear characteristics of new energy output. In extreme conditions such as typhoons and sandstorms that easily cause wind power output to drop, the prediction error can exceed 20%; the other is the traditional machine learning or deep learning method based on data-driven (such as LSTM, GRU, etc.), which can capture some nonlinear relationships, but is too dependent on historical data distribution. When the actual conditions deviate from the training samples, such as extreme load mutations, the model generalization ability will decrease sharply, and the precision will decrease by more than half, making it difficult to provide reliable input basis for subsequent compensation strategies.
[0006] In the dynamic reactive power compensation link, the existing strategy is mainly based on "static threshold control" or "traditional closed-loop control". Among them, the static threshold control can only trigger the preset action according to the current bus voltage deviation, and cannot predict the voltage fluctuation trend in advance. The response delay is usually tens to hundreds of milliseconds, which cannot meet the control demand of millisecond-level response of the ultra-high voltage bus. The traditional closed-loop control has real-time adjustment capability, but it is insufficient in the ability of collaborative optimization of multiple devices under complex working conditions, which may lead to conflicts between the output of SVC and synchronous compensator and other devices, and may even exacerbate the bus voltage fluctuation. In addition, the existing compensation strategy does not fully consider the uncertainty of the prediction model itself. When the prediction result has an error, the compensation action is prone to "over-regulation" or "under-regulation" problem, which further reduces the overall control accuracy.
[0007] In terms of robustness, the existing model is generally sensitive to two types of interference. One is data noise: such as errors in the collection process of bus monitoring sensors, abnormal data caused by communication interference; the other is model uncertainty: such as model mismatch caused by parameter drift of bus associated devices and environmental interference.
[0008] In summary, the current 220kV and higher voltage level high-voltage bus voltage fluctuation control technology faces three core pain points: poor generalization ability of the prediction link, slow response speed of the compensation link, and insufficient overall robustness. Therefore, an integrated technical solution that integrates advanced artificial intelligence algorithms is urgently needed, which has high-precision prediction capability and can realize fast and optimal compensation, thereby ensuring the safe and stable operation of the ultra-high voltage power grid. SUMMARY
[0009] In view of the deficiencies of the prior art, the present application provides a bus voltage fluctuation prediction and dynamic reactive power compensation method based on a generative adversarial network.
[0010] According to one aspect of the present application, a bus voltage fluctuation prediction and dynamic reactive power compensation method based on a generative adversarial network is provided, comprising:
[0011] Collecting historical operation data and real-time monitoring data of the high-voltage bus and performing data preprocessing to obtain a training sample set;
[0012] Training a pre-constructed generative adversarial network according to the training sample set to generate a bus voltage fluctuation prediction model;
[0013] Training a pre-constructed deep learning model according to the training sample set to generate an optimal compensation strategy;
[0014] Inputting the real-time collected historical window data into the bus voltage fluctuation prediction model to output the bus voltage fluctuation prediction value;
[0015] Based on the bus voltage fluctuation prediction value and the historical window data input to the optimal compensation strategy, the action instruction of dynamic reactive power compensation is generated.
[0016] Optionally, the historical operation data and real-time monitoring data of the high-voltage bus are collected and preprocessed to obtain time series sample data, including:
[0017] The 3σ criterion is used to remove outliers and complete missing values of the historical operation data and real-time monitoring data to obtain abnormal correction data.
[0018] The abnormal correction data is normalized to obtain normalized data.
[0019] The normalized data is reconstructed into a training sample set of historical data segments and future labels.
[0020] Optionally, the structure of the generative adversarial network is as follows:
[0021] Generator G(z, X hist ): input random noise z~N(0, 1) with dimension d z and historical bus data sample X x with dimension d hist , output bus voltage fluctuation prediction scenario U p =G(z, X gen ) for T hist steps, the generator adopts a 3-layer fully connected network, and the activation function is ReLU and Sigmoid.
[0022] Discriminator D(X real , X gen ): input real bus voltage sequence U real and generated sequence U gen , output the probability that the data is real D(X)∈[0, 1], the discriminator adopts a 3-layer fully connected network, and the activation function is LeakyReLU and Sigmoid.
[0023] Optionally, the discriminator loss L D of the discriminator is:
[0024]
[0025] In the formula, L D is the loss value of the discriminator; E is the mathematical expectation symbol; U real is the real voltage sequence, i.e. X real ; p data is the probability distribution of the real voltage sequence U real ; log is the natural logarithm function; z~p z is a random noise z following the probability distribution p z; D(G(z, X hist )) is the discriminant probability of the discriminator to the generated voltage U gen ;
[0026] The generator loss L G of the generator is:
[0027]
[0028] In the formula, L G : loss value of the generator; λ: weight of the prediction error constraint term; MSE(a, b): mean square error function.
[0029] Optionally, the pre-constructed generative adversarial network is trained according to the training sample set to generate the bus voltage fluctuation prediction model, comprising:
[0030] Noise is injected into the training sample set to generate noise, and a perturbed sample is constructed based on the noise;
[0031] An L2 regularization term is added to the generator loss of the generative adversarial network to obtain a model loss function;
[0032] Based on the model loss function, the parameters of the discriminator and the generator are alternately updated using an Adam optimizer until the model loss function converges, and the bus voltage fluctuation prediction model is generated.
[0033] Optionally, the environment and space of the deep learning model are defined as:
[0034] State space S: containing the predicted bus voltage deviation, current reactive power output, and device state, defined as: S(t) = [ΔU pred (t), Q SVC (t), Q syn (t), U real (t)] T , where ΔU pred (t) = U pred (t) - U rated , U rated is the rated voltage, Q SVC (t) is the current reactive power output of the SVC, Q syn (t) is the current reactive power output of the synchronous phase modifier, and U real (t) is the current bus measured voltage;
[0035] Action space A: containing the bus SVC trigger angle adjustment amount and the phase modifier excitation current adjustment amount, defined as: A(t) = [Δα(t), ΔI f (t)] T , where Δα(t) ∈ [-5°, 5°] is the adjustment range of the SVC trigger angle, and ΔI f (t) ∈ [-0.2If0 0.2I f0 ] is the excitation current regulation range of the phase modifier, I f0 is the rated excitation current of the phase modifier.
[0036] Optionally, the reward function R(S(t), A(t)) of the deep learning model is:
[0037]
[0038] wherein ω1=10 is a voltage deviation weight, ΔU real (t+1) is the voltage deviation at t+1; ω2=50 is a safety constraint weight, ||(·) is an indicator function; ω3=2 is a regulation smoothing weight;
[0039] Deep learning model optimization and policy update:
[0040] Policy network π θ (A|S): input state S(t), output action A(t) probability distribution, parameter is θ;
[0041] Value network V φ (S): input state S(t), estimate state value, parameter is φ;
[0042] The policy update formula is:
[0043]
[0044] wherein L CLIP (θ) is the optimization objective function of the policy network; S~ρ π is the state S obeying the state distribution ρ π under the policy π; is the probability distribution of action a obeying the old policy ; A t is the advantage function at t; clip(·, 1-ξ, 1+ξ) is a clipping function, wherein
[0045] In the deep learning model training, the policy network and the value network are alternately optimized, an Adam optimizer is adopted, training is performed until the policy converges, and the optimal compensation policy
[0046] Optionally, it further comprises:
[0047] The action instruction is converted into a physical control signal to control the trigger angle of the bus static reactive power compensator and the excitation current of the phase modifier.
[0048] According to another aspect of the present application, a bus voltage fluctuation prediction and dynamic reactive power compensation device based on a generative adversarial network is provided, comprising:
[0049] The collection module is configured to collect historical operation data and real-time monitoring data of the high-voltage bus and perform data preprocessing to obtain a training sample set;
[0050] The first generation module is configured to train a pre-constructed generative adversarial network according to the training sample set to generate a bus voltage fluctuation prediction model.
[0051] The second generation module is configured to train a pre-constructed deep learning model according to the training sample set to generate an optimal compensation strategy.
[0052] The prediction module is configured to input the real-time collected historical window data into the bus voltage fluctuation prediction model to output a bus voltage fluctuation prediction value.
[0053] The third generation module is configured to input the bus voltage fluctuation prediction value and the historical window data into the optimal compensation strategy to generate an action instruction of dynamic reactive power compensation.
[0054] According to another aspect of the present application, a computer readable storage medium is provided, the storage medium storing a computer program for executing the method of any one of the above aspects of the present application.
[0055] According to another aspect of the present application, an electronic device is provided, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method of any one of the above aspects of the present application.
[0056] The technical solution provided by the present application has the following beneficial effects:
[0057] (1) The prediction accuracy and generalization ability are significantly improved. The present application greatly enhances the accuracy and generalization performance of the bus voltage fluctuation prediction model by means of the adversarial training mechanism of GAN. Under normal operating conditions, the average error of the model is maintained at a very low level. Even in the face of extreme conditions such as a significant drop in new energy output and a sudden significant increase in load, the error can still be controlled within a relatively low range. In contrast, the error of the traditional LSTM model under such extreme conditions is significantly higher, and the error reduction of the present application is very significant, providing reliable advance support for the subsequent dynamic reactive power compensation strategy, ensuring that the compensation action has accurate prediction basis.
[0058] (2) Compensation response speed meets the millisecond-level control requirement. Based on the dynamic compensation strategy constructed by DRL (PPO algorithm), the overall delay from generation to execution of the compensation instruction is strictly controlled within the millisecond level through lightweight design of the strategy network and optimization of the real-time inference process, which fully meets the rapid response requirement of the transient voltage control of the high-voltage bus. Compared with the traditional static threshold control, the response speed of the present application is significantly improved, which can timely suppress the voltage transient change of the high-voltage bus and effectively avoid the voltage deviation from exceeding the safe operation threshold.
[0059] (3) Strong robustness and adaptability to complex working conditions. After introducing the adversarial training mechanism in the GAN model training stage, the tolerance of the model to data noise is greatly enhanced. Even if a certain intensity of noise (such as abnormal data caused by sensor errors and communication interference) is mixed in the collected data, the decline range of the prediction accuracy can still be kept in a small range. At the same time, the uncertainty compensation term is added to the DRL compensation strategy, so that the strategy can flexibly adapt to the situation where the device parameters fluctuate within a certain range. Compared with the prior art, the robustness of the present application is significantly improved, and the system can still operate stably even in complex operating scenarios such as severe weather conditions and equipment aging.
[0060] (4) Dual optimization of economy and reliability. By constructing a closed-loop control system of "accurate prediction - on-demand compensation", the present application greatly reduces the invalid adjustment times of static var compensators (SVC), synchronous compensators and other reactive power devices, and the adjustment times are significantly reduced. Not only the mechanical loss of the device is reduced, but also the energy consumption is effectively reduced, and the energy-saving effect is outstanding. At the same time, since the bus voltage fluctuation is effectively suppressed, the failure probability of related transformers, circuit breakers and other key devices is significantly reduced, and the corresponding maintenance cost is also reduced, realizing the dual optimization of advanced technology and economic feasibility, and taking into account the long-term stable operation and cost control requirements. BRIEF DESCRIPTION OF DRAWINGS
[0061] The exemplary embodiments of the present application can be more completely understood by reference to the following drawings:
[0062] Figure 1 is a flowchart of the bus voltage fluctuation prediction and dynamic reactive power compensation method based on the generative adversarial network provided by an exemplary embodiment of the present application;
[0063] Figure 2 is a schematic diagram of the overall technical architecture of the ultra-high voltage bus voltage control based on GAN+PPO provided by an exemplary embodiment of the present application;
[0064] Figure 3 is a comparison diagram of the voltage fluctuation prediction convergence process of the present application method and the traditional method provided by an exemplary embodiment of the present application;
[0065] Figure 4 is a PPO algorithm average reward convergence process curve provided by an exemplary embodiment of the present application;
[0066] Figure 5 is a robustness test precision decline trend graph comparison graph (data noise interference) provided by an exemplary embodiment of the present application;
[0067] Figure 6 is a robustness test precision decline trend graph comparison graph (device parameter fluctuation) provided by an exemplary embodiment of the present application;
[0068] Figure 7 is a structure schematic diagram of a bus voltage fluctuation prediction and dynamic reactive power compensation device based on a generative adversarial network provided by an exemplary embodiment of the present application;
[0069] Figure 8 is a structure of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0070] Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and are not all the embodiments of the present application, and it should be understood that the present application is not limited to the example embodiments described herein.
[0071] It should be noted that: unless otherwise specified, the relative arrangement, numerical expression and numerical value of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0072] Those skilled in the art can understand that the terms "first", "second" and the like in the embodiments of the present application are only used to distinguish different steps, devices or modules, and do not represent any specific technical meaning, nor do they represent the inevitable logical sequence between them.
[0073] It should also be understood that in the embodiments of the present application, "a plurality of" can mean two or more, and "at least one" can mean one, two or more.
[0074] It should also be understood that for any component, data or structure mentioned in the embodiments of the present application, it can be understood as one or more in general, without explicit limitation or in the context of the opposite indication.
[0075] In addition, the term "and / or" in the present application is only a description of the association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in the present application generally represents an "or" relationship between the front and rear associated objects.
[0076] It should also be understood that the description of the various embodiments is intended to highlight the differences between the various embodiments and that the same or similar features can be referenced in connection with more than one embodiment. For the sake of brevity, the numerous details of construction and operation for various sizes, shapes, components, and embodiments of the application can not be described in detail.
[0077] It should be understood, however, that the sizes of the various parts shown in the drawings are chosen for convenience only, and do not bear any relationship to the actual size of the parts.
[0078] The following description of at least one example embodiment is merely exemplifying in nature and is in no way intended to limit the application, its application, or uses.
[0079] Techniques, methods, and apparatus known to those of ordinary skill in the relevant art can not be discussed in detail insofar as they can be readily understood from the disclosure given herein. Where appropriate, techniques, methods, and apparatus should be considered part of the disclosure.
[0080] It should be noted that like reference numerals and letters refer to like items in the drawings and that, as such, once an item is defined in one drawing, it is not necessary to discuss it further in connection with additional drawings.
[0081] Embodiments of the application can be applied to terminal devices, computer systems, servers, and other electronic devices, which can operate in conjunction with many other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations that can be suitable for use with terminal devices, computer systems, servers, and other electronic devices include, but are not limited to: personal computers, servers, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed cloud computing environments that include any of the above systems or the like.
[0082] Terminal devices, computer systems, servers, and other electronic devices can be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules can include routines, programs, objects, components, logic, data structures, and the like, that perform particular tasks or implement particular abstract data types. Computer systems / servers can be practiced in distributed cloud-computing environments with remote processing devices that are linked through a communications network. In a distributed cloud-computing environment, program modules can reside on local or remote computer system storage media including memory storage devices.
[0083] Exemplary method
[0084] Figure 1is a flowchart of a bus voltage fluctuation prediction and dynamic reactive power compensation method based on a generative adversarial network provided by an exemplary embodiment of the present application. The present embodiment can be applied on electronic devices, such as Figure 1 As shown, the bus voltage fluctuation prediction and dynamic reactive power compensation method based on a generative adversarial network 100 includes the following steps:
[0085] Step 101, collect historical operation data and real-time monitoring data of the high-voltage bus and perform data preprocessing to obtain a training sample set;
[0086] Step 102, train a pre-constructed generative adversarial network according to the training sample set to generate a bus voltage fluctuation prediction model;
[0087] Step 103, train a pre-constructed deep learning model according to the training sample set to generate an optimal compensation strategy;
[0088] Step 104, input the real-time collected historical window data to the bus voltage fluctuation prediction model to output a bus voltage fluctuation prediction value;
[0089] Step 105, input the bus voltage fluctuation prediction value and the historical window data to the optimal compensation strategy to generate an action instruction for dynamic reactive power compensation.
[0090] Specifically, the core purpose of the present application is to provide an integrated optimization scheme based on a generative adversarial network (GAN) and deep reinforcement learning (DRL) to address the defects of existing high-voltage bus voltage fluctuation prediction and reactive power compensation technology. The specific purposes include:
[0091] (1) To solve the problem of insufficient generalization ability of traditional voltage fluctuation prediction models under extreme conditions. By constructing a GAN prediction model that integrates multi-dimensional data (historical bus voltage, power, and weather factors), using the adversarial training mechanism of the generator and discriminator, a high-fidelity future bus voltage fluctuation scenario is generated, allowing the model to maintain high-precision prediction under extreme conditions such as sudden changes in new energy and sudden changes in load, with prediction errors controlled within a reasonable range to provide reliable advance input for dynamic reactive power compensation.
[0092] (2) To achieve millisecond-level dynamic reactive power compensation for high-voltage bus voltage fluctuation. Based on the prediction results of GAN, a deep reinforcement learning PPO algorithm is introduced to construct a dynamic compensation strategy, with "bus voltage stability precision, device output constraint, and adjustment response speed" as the optimization objectives, to dynamically adjust the trigger angle of the static var compensator (SVC) and the excitation current of the synchronous compensator, reducing the response delay of the compensation strategy to milliseconds to meet the real-time requirements of high-voltage bus transient voltage control.
[0093] (3) Improve the robustness of the model to data noise and uncertainty: In the GAN training process, an adversarial training mechanism is introduced to enhance the generator’s fault tolerance to data anomalies by injecting controllable noise into the training data and applying regular constraints to the model parameters. At the same time, an uncertainty compensation term is added to the DRL strategy optimization so that the compensation strategy can still maintain stable control effect under scenarios such as prediction error and equipment parameter fluctuation, thus ensuring the robustness of the system under complex working conditions.
[0094] (4) Construct a closed-loop control system of "prediction-compensation-feedback" to improve overall control accuracy and economy. Deeply integrate the GAN prediction module and the DRL compensation module, and dynamically update the model parameters and compensation strategy by providing real-time feedback on the current bus voltage status and equipment operating parameters. This realizes the transformation from "passive response" to "active prediction-precise compensation", which improves the accuracy of voltage stability control, reduces the frequent adjustment losses of reactive power equipment, and lowers the operating cost of the power grid.
[0095] The technical solution of this invention includes four core steps: "data preprocessing - GAN bus voltage fluctuation prediction - DRL dynamic reactive power compensation - strategy deployment". (Refer to...) Figure 2 As shown, the details are as follows:
[0096] Step 1: Multi-dimensional data collection and preprocessing
[0097] 1.1 Data Acquisition: Collect historical operating data and real-time monitoring data of the high-voltage busbar, including:
[0098] Voltage time series: U(t)=[U1(t),U2(t),…,U n (t)] T , middle, U i (t) is the line voltage (unit: kV) of the i-th monitoring point at time t, t∈[1,T] (T is the length of the time series);
[0099] Power data: Total active power of the bus P(t) = [P1(t), P2(t), ..., P n (t)] T (Unit: MW), Total reactive power of the bus Q(t) = [Q1(t), Q2(t), ..., Q n (t)] T (Unit: MVar);
[0100] Meteorological factors: wind speed v(t) at the wind farm's anemometer tower (unit: m / s), solar irradiance I(t) at the photovoltaic power station (unit: W / m²) 2 The temperature along the busbar, T(t) (unit: °C), is uniformly expressed as M(t)=[v(t),I(t),T(t)].
[0101] 1.2 Data preprocessing: The collected raw data is processed by "anomaly correction-range normalization-sample reconstruction" to ensure that the data meets the training and inference requirements of the GAN and DRL models.
[0102] (1) Anomaly value elimination and missing value completion. Anomaly value elimination: 3σ criterion is used (i.e. if the data value is outside the range of "mean ± 3 times standard deviation", it is determined as an anomaly value and is eliminated), to avoid the influence of abnormal data caused by sensor error and communication interference on model training; missing value completion: linear interpolation method is used to complete the data gaps after eliminating abnormal values, to ensure the continuity of time series.
[0103] (2) Data normalization: The purpose of normalization is to eliminate the difference between different data dimensions (such as kV, MW, m / s), to avoid parameter update imbalance caused by value range difference during model training.
[0104] All data is mapped to the interval [0, 1], and the normalization formula is:
[0105]
[0106] where x norm (t) is the output value (range [0, 1]) of the original data x(t) after normalization at time t, x(t) is the original data (U(t), P(t), Q(t), M(t)), x min , and x max are the minimum and maximum values of the data sequence, respectively.
[0107] (3) Data reconstruction: The continuous time series data after preprocessing is reconstructed into a training sample set of "historical data segment + future label", and the formula is as follows:
[0108] X = {X1, X2…, X N} (2)
[0109] where each sample X k = [U(k-L:k), P(k-L:k), Q(k-L:k), M(k-L:k)], L is the length of the historical window (i.e. the number of historical data time steps included in each sample, such as L = 20, which means each sample includes the historical data of the previous 20 time steps), k is the sample index (starting from L+1, as it needs to include the data of the previous L time steps), and N is the total number of samples (N = T-L, T is the total length of the original time series).
[0110] Step 2: GAN-based bus voltage fluctuation prediction model construction: By constructing a "generator-discriminator" adversarial architecture, combined with a robustness enhancement mechanism, high-precision prediction of bus voltage fluctuations is achieved, including model structure definition, loss function design, and adversarial training.
[0111] 2.1 GAN model structure definition:
[0112] (1) Generator G(z, X hist ): Input random noise z ~ N(0, 1) (dimension d z ) and historical bus data sample X hist (dimension d x ), output future T p step bus voltage fluctuation prediction scenario U gen = G(z, X hist ), the generator uses a 3-layer fully connected network, with ReLU and Sigmoid (output layer) activation functions.
[0113] (2) Discriminator D(X real , X gen ): Input real bus voltage sequence U real (from future T p step data from sample set X) and generated sequence U gen , output the probability that "the data is real" D(X) ∈ [0, 1], the discriminator uses a 3-layer fully connected network, with LeakyReLU and Sigmoid (output layer) activation functions.
[0114] 2.2 Construction of basic loss function (define model optimization objective):
[0115] (1) Discriminator loss L D (maximize the ability to distinguish between real and fake data): Use cross-entropy loss, the goal is to distinguish between real bus voltage data and generated data.
[0116]
[0117] where: L D : the loss value of the discriminator (the smaller the value, the stronger the discriminator's ability to distinguish between real and fake data); E: mathematical expectation symbol (average over the probability distribution of input data, to avoid the influence of randomness of a single sample); U real : real voltage sequence (i.e. X real ), consistent with X real definition; p data : real voltage sequence U realThe probability distribution of z (i.e., the statistical distribution of actual monitored voltage data); log: natural logarithm function (used to calculate cross-entropy loss, the impact of amplified probability differences on the loss); z ~ p z Random noise z follows a probability distribution p z (p z (N(0,1) normal distribution); D(G(z,X) hist The discriminator detects the generated voltage U. gen The discriminant probability (i.e., D(X)) gen )).
[0118] Optimization objective: The discriminator minimizes L D To achieve "U real Output high probability (logD(U)) real )≈0), for U gen Output low probability (log(1-D(U)) real ))≈0)".
[0119] (2) Generator loss L G The goal is to generate data that the discriminator cannot distinguish, while introducing a "prediction error constraint" (MSE loss) to improve the accuracy of bus voltage prediction.
[0120]
[0121] Where: L G λ: The generator's loss value (the smaller the value, the stronger the generator's "deception ability" and "prediction accuracy"); λ: The weight of the prediction error constraint term (balancing adversarial loss and MSE loss, determined through experimental debugging, here λ = 0.8); MSE(a,b): Mean Square Error Function (measures the deviation between the generated voltage and the true voltage, the formula is:
[0122]
[0123] In the formula, T p : Total length of the time series or total number of sample points; t: Time index (or sample index), from 1 to T. a(t): Value of the first sequence at time t (e.g., observed, predicted, or reference value). b(t): Value of the second sequence at time t (e.g., predicted, observed, or comparative value). a(t)-b(t): The difference (residual) between the two sequences at time t.
[0124] Optimization objective: The generator minimizes L G This achieves the goal of making the discriminator unable to distinguish it from U. gen with U real (logD(U real )≈0)” and “U gen with Ureal The deviation is the smallest (MSE≈0)".
[0125] 2.3 Robustness-enhancing adversarial training:
[0126] (1) Injecting noise into the training data: Generate noise ε ~ u(-ε0, ε0) (ε0 = 1 is the noise intensity), and construct perturbation samples.
[0127] (2) Introduce a robust regularization term: Add an L2 regularization term to the generator loss to constrain the model parameter θ. G The fluctuations ultimately lead to a "minimum-maximum" game as the objective function of GAN:
[0128]
[0129] Where: L total : Total loss function of the GAN model (combining discriminator loss, generator loss, and regularization term); α: L2 regularization coefficient (controlling the weight of the regularization term, here α = 0.01); θ G : All trainable parameters of generator G (including the weight matrix and bias vector of the fully connected network); θ G The square of the L2 norm.
[0130] (3) Model training: The Adam optimizer is used (learning rate η = 1e- 4 The discriminator and generator parameters are updated alternately until the loss function converges (loss fluctuation ≤ 1e-5 over 100 consecutive iterations). After training, the generator G... * Can output future T P Predicted bus voltage fluctuation value U pred =G * (z,X hist ).
[0131] Step 3: Optimization of Dynamic Reactive Power Compensation Strategy Based on DRL (PPO)
[0132] 3.1 DRL Environment and Space Definition
[0133] (1) State space S: includes predicted bus voltage deviation, current reactive power output, and equipment status, defined as:
[0134] S(t)=[ΔU pred (t),Q SVC (t),Q syn (t),U real (t)] T (7)
[0135] Where ΔU pred(t) = U pred (t) - U rated , U rated is rated voltage, Q SVC (t) is SVC current reactive power output (unit: MVar), Q syn (t) is synchronous condenser current reactive power output (unit: MVar), U real (t) is current bus measured voltage (unit: kV);
[0136] (2) Action space A: contains bus SVC trigger angle adjustment amount, condenser excitation current adjustment amount, defined as:
[0137] A(t) = [Δα(t), ΔI f (t)] T (8)
[0138] Where Δα(t) ∈ [-5°, 5°] (SVC trigger angle adjustment range), ΔI f (t) ∈ [-0.2I f0 , 0.2I f0 ] (I f0 is the rated excitation current of the condenser).
[0139] 3.2 Reward function design:
[0140] Considering bus voltage stability, equipment constraints and response speed, the reward function R(S(t), A(t)) is defined as:
[0141]
[0142] Where: ω1 = 10 (voltage deviation weight, priority to ensure voltage stability), ΔU real (t+1) = U real (t+1) - U rated ; ω2 = 50 (safety constraint weight, to avoid SVC and condenser overrated output), || (·) is the indicator function (|| = 1 when the action exceeds the safety range, otherwise 0); ω3 = 2 (adjustment smoothing weight, to reduce the loss of frequent action of bus compensation equipment).
[0143] 3.3 PPO algorithm optimization and policy update:
[0144] (1) Policy network π θ (A|S): input state S(t), output action A(t) probability distribution (Gaussian distribution), parameter is θ;
[0145] (2) Value network V φ (S): input state S(t), estimate state value, parameter is φ;
[0146] (3) PPO core update formula: adopt "clipped surrogate objective function" to avoid too large policy update amplitude.
[0147]
[0148] where: L CLIP (θ): optimization objective function of policy network (maximize the function to achieve policy improvement); S ~ p π : state S obeys state distribution p under policy π ; action a obeys the probability distribution of "old policy" ; A t : advantage function at time t (measure the "relative advantage" of action a in state S, that is, the reward improvement of the action compared with the average action); clip(·,1-ξ,1+ξ): clipping function (limit the first input parameter to the interval [1-ξ,1+ξ]).
[0149] (4) Network training: alternately optimize policy network (minimize-L CLIP ) and value network (minimize MSE(V φ (S(t)),R t )), use Adam optimizer (learning rate η=3e-4), train until policy converges (average reward improvement ≤1% for 50 consecutive iterations), and obtain optimal policy
[0150] Step 4: policy deployment and real-time closed-loop control
[0151] 4.1 Real-time prediction and action generation:
[0152] (1) Collect historical window data X hist (t) in real time, input the trained generator G * , and obtain bus voltage fluctuation prediction value U pred (t+1:t+T P );
[0153] (2) Input S(t) = [ΔU pred (t), Q SVC (t), Q syn (t), U real (t)] T to the optimal policy to generate action instruction A(t) = [Δα(t), ΔI f (t)] T .
[0154] 4.2 Equipment control and state feedback:
[0155] (1) Convert the action instruction into a physical control signal, control the bus SVC trigger angle a(t+1) = a(t) + Delta a(t), the excitation current I f (t+1) = I f (t) + Delta I f (t);
[0156] (2) Real-time acquisition of U real (t+1), Q SVC (t+1), Q syn (t+1), update state S(t+1), form a "prediction-compensation-feedback" closed loop.
[0157] (3) Periodically fine-tune the GAN and PPO model parameters with newly collected operating data to ensure that the model adapts to changes in operating conditions.
[0158] Through the above steps, high-precision prediction of ultra-high voltage bus voltage fluctuation and millisecond-level dynamic reactive power compensation can be realized, which significantly improves the voltage stability and operating economy of the power grid.
[0159] In a specific embodiment of the present application, a certain 500kV ultra-high voltage bus is taken as the implementation object, which undertakes the power exchange task between a certain wind-solar integrated base in the northwest and the load center in central China, with a designed transmission capacity of 2.5GW and a rated voltage of 500kV. The bus is long-term affected by the output fluctuation of the connected new energy station and the sudden change of downstream industrial load, and the bus voltage transient fluctuation is frequent, which urgently needs to be solved by the technical solution of the present application to solve the voltage stability problem.
[0160] 1. Data acquisition and device configuration (corresponding to the first step of the invention)
[0161] 1.1 Data acquisition scheme
[0162] Collect the historical operating data and real-time monitoring data of the 500kV ultra-high voltage bus. The types of collected data are: voltage data: bus voltage data: collect bus A, B, C three-phase line voltage U(t), time granularity 100ms; power data: bus total active power P(t), total reactive power Q(t), and output data P wind (t), P pv (t) of 3 wind farms and 2 photovoltaic power stations connected to the bus, time granularity 100ms; meteorological data: wind speed V(t) of wind tower in wind farm (10min average wind speed + instantaneous wind speed), light intensity I(t) of photovoltaic power station, ambient temperature T(t) around the substation where the bus is located, time granularity 1min, matched to 100ms granularity by linear interpolation, to ensure time synchronization with voltage and power data.
[0163] 1.2. Compensation device configuration
[0164] A dedicated reactive power compensation device is configured for the 500 kV EHV bus, and the specific parameters are as follows:
[0165] Static Var Compensator (SVC): installed in the 500 kV distribution interval of the substation where the bus is located, model TSC (thyristor switched capacitor) + TCR (thyristor controlled reactor) combined type, rated capacity ±200 Mvar, trigger angle regulation range 15°-165°, response time ≤5 ms, regulation instruction directly acting on bus voltage compensation;
[0166] Synchronous condenser: installed in the 500 kV bus tie side of the substation where the bus is located, rated capacity 300 Mvar, excitation system response time ≤3 ms, excitation current regulation range 0.8I f0 -1.2I f0 (I f0 =800A), used to stabilize the transient fluctuations of bus voltage.
[0167] 2. Model construction and training (corresponding to the steps 2 and 3 of the invention)
[0168] 2.1. GAN voltage fluctuation prediction model implementation
[0169] (1) Model structure parameters
[0170] Generator G: 3-layer fully connected network, input dimension d x =80, random noise z dimension d z =32; the number of hidden layer neurons is 256, 128 respectively, and the number of output layer neurons = prediction step T p =10 (i.e. predicting 10 voltage values in the next 1s, calculated by the average voltage of 5 monitoring points), and the activation function is ReLU (hidden layer) and Sigmoid (output layer).
[0171] Discriminator D: 3-layer fully connected network, input dimension =10 (real / generated voltage sequence length), hidden layer neuron number 128, 64, output layer 1 neuron, activation function LeakyReLU (hidden layer, negative slope 0.2), Sigmoid (output layer), used to distinguish real bus voltage sequence and generated sequence.
[0172] (2) Training parameters and process
[0173] Optimizer: Adam, learning rate η=1e-4, batch size =256;
[0174] Loss function weight: λ=0.8 (MSE constraint term weight), α=0.01 (L2 regularization coefficient);
[0175] Adversarial training noise: ε0=0.1, noise type is uniformly distributed u(-0.1,0.1);
[0176] Training process: 1500 iterations, the loss function converges in the 1200th iteration (loss fluctuation ≤ 8e-6 for 100 consecutive iterations), and the generator G is completed after training. * Predicted output U pred Goodness of fit R to the true value 2 =0.982, which meets the accuracy requirements for bus voltage prediction.
[0177] 2.2. Implementation of PPO Dynamic Reactive Power Compensation Strategy
[0178] (1) Definition of State and Action Space
[0179] State space S(t): 4-dimensional, with specific parameter ΔU pred (t)=U pred (t+1)-500 (unit: kV), Q SVC (t)(unit: MVar), Q syn (t)(unit: MVar), U real (t)(unit: kV);
[0180] Action space A(t): dimension 2, Δα(t)∈[-5°,5°] (step size 0.1°), ΔI f (t)∈[-160A,160A]
[0181] (Step size 1A, because I) f0 =800A, 0.2I f0 =160A).
[0182] (2) Training parameters and process
[0183] Reward function weights: ω1 = 10, ω2 = 50, ω3 = 2;
[0184] Policy / Value Networks: Both are 3-layer fully connected networks with 4 input dimensions, 128 and 64 hidden layer neurons respectively, and 2 output layer dimensions (policy network, outputting SVC firing angle and synchronous condenser excitation current adjustment amount) / 1 (value network, estimating the current state value of the bus).
[0185] PPO parameters: ε = 0.2, learning rate η = 3e-4, 800 iterations, convergence on the 650th iteration (average reward stabilized in the range of -0.8 to -0.5 for 50 consecutive iterations, with no significant improvement), post-convergence policy The action generation delay time meets the millisecond-level compensation requirements of the bus voltage.
[0186] 3. Strategy deployment and real-time control (corresponding to step 4 of the invention)
[0187] 3.1. Closed-loop control flow
[0188] (1) Data collection and prediction: collect historical window data X every 100 ms hist (t) (the first 20 steps, i.e. 2s data), input G * Generate voltage prediction value U for the next 10 steps (1s) pred (t+1:t+10);
[0189] (2) Action generation: extract U pred (t+1) Calculate ΔU pred (t) in combination with current Q SVC (t), Q syn (t), U real (t) to construct state S(t), input optimal strategy Generate action A(t) = [Δα(t), ΔI f (t)];
[0190] (3) Device control: action instructions are converted into physical signals through the SCADA system to control the SVC trigger angle α(t+1) = α(t) + Δα(t) and the excitation current I f (t+1) = I f (t) + ΔI f (t);
[0191] (4) State feedback and model fine-tuning: collect U real (t+1), Q SVC (t+1), Q syn (t+1) to update state S(t+1) every 100 ms, forming a "prediction-compensation-feedback" closed loop; fine-tune the GAN and PPO model parameters every 7 hours with 100,000 newly collected bus operation data (voltage, power, device state) to ensure that the model adapts to changes in bus operating conditions.
[0192] 4. Control effect
[0193] 4.1. Prediction accuracy improvement: under normal operating conditions, the bus voltage prediction error of the present application is improved compared to the traditional LSTM scheme; under extreme operating conditions, the bus voltage prediction error of the present application is relatively significantly improved compared to the traditional LSTM scheme, effectively avoiding the lag in compensation caused by inaccurate prediction.
[0194] 4.2. Compensation response speed improvement: The total delay from the occurrence of bus voltage fluctuation to the effectiveness of compensation action in the present scheme is significantly higher than that in the traditional static threshold control scheme; voltage deviation control: During the trial operation, the number of times the bus voltage deviation exceeds ±2% of the rated voltage is significantly lower than that in the traditional scheme, fully meeting the ultra-high voltage bus voltage stability standard.
[0195] 4.3. Robustness verification: Data noise test: 15% intensity noise is injected into the collected data (voltage, power) of the bus (simulating sensor failure, communication interference), and the decrease in bus voltage prediction accuracy in the present scheme is significantly higher than that in the traditional LSTM scheme; device parameter fluctuation test: the SVC trigger angle response delay is increased by 20%, and the excitation current deviation of the phase modifier is 15% (simulating device aging), and the decrease in bus voltage control accuracy in the present scheme is also significantly higher than that in the traditional LSTM scheme, proving its stability control ability for bus voltage under complex working conditions.
[0196] The specific control effect diagram is shown in the accompanying Figures 3 to 6
[0197] The technical scheme provided by the present application has the beneficial effects of:
[0198] (1) The prediction accuracy and generalization ability are significantly improved. The present application greatly improves the accuracy and generalization performance of the bus voltage fluctuation prediction model by means of the adversarial training mechanism of GAN: under normal operating conditions, the average error of the model is maintained at a very low level; even in the face of sudden large drop in new energy output, sudden large increase in load and other extreme conditions, the error can still be controlled within a relatively low range. In contrast, the error of the traditional LSTM model under such extreme conditions is significantly higher, and the error reduction of the present application is very significant, providing accurate and reliable advance support for subsequent dynamic reactive power compensation strategies, and ensuring that the compensation action has accurate prediction basis.
[0199] (2) The compensation response speed meets the millisecond-level control requirement. The dynamic compensation strategy based on DRL (PPO algorithm) strictly controls the overall delay from the generation to the execution of the compensation instruction within the millisecond level by means of lightweight design of the strategy network and optimization of real-time inference process, fully meeting the fast response requirement of high-voltage bus for transient voltage control. Compared with the traditional static threshold control, the response delay of which is usually in a higher millisecond range, the response speed of the present application is significantly improved, which can timely suppress the transient change of the voltage of the high-voltage bus, and effectively avoid the voltage deviation exceeding the safe operation threshold.
[0200] (3) Robustness is strong, and it is suitable for complex working conditions. After introducing the adversarial training mechanism in the GAN model training stage, the tolerance of the model to data noise is greatly enhanced. Even if a certain intensity of noise (such as abnormal data caused by sensor error and communication interference) is mixed in the collected data, the decline range of the prediction accuracy can still be kept in a small range. At the same time, the uncertainty compensation term is added in the DRL compensation strategy, so that the strategy can flexibly adapt to the situation that the device parameters fluctuate within a certain range. Compared with the prior art, the robustness of the present application is significantly improved. Even in complex running scenes such as bad weather conditions and device aging, the system can still run stably.
[0201] (4) Economic and reliable optimization. By constructing a closed-loop control system of "accurate prediction-on-demand compensation", the present application greatly reduces the invalid adjustment times of static var compensator (SVC), synchronous phase modifier and other reactive power devices. The adjustment times are significantly reduced, which not only reduces the mechanical loss of the device, but also effectively reduces the energy consumption, and the energy-saving effect is outstanding. At the same time, since the bus voltage fluctuation is effectively suppressed, the failure probability of related transformers, circuit breakers and other key devices is significantly reduced, and the corresponding maintenance cost is also reduced, realizing the dual optimization of advanced technology and economic feasibility, and taking into account the long-term stable operation and cost control requirements.
[0202] Exemplary apparatus
[0203] Figure 7 is a structural schematic diagram of a bus voltage fluctuation prediction and dynamic reactive power compensation device based on a generative adversarial network provided by an exemplary embodiment of the present application. As shown in Figure 7 , the device 700 comprises:
[0204] The acquisition module 710 is configured to acquire historical operation data and real-time monitoring data of the high-voltage bus and perform data preprocessing to obtain a training sample set.
[0205] The first generation module 720 is configured to train a pre-constructed generative adversarial network according to the training sample set to generate a bus voltage fluctuation prediction model.
[0206] The second generation module 730 is configured to train a pre-constructed deep learning model according to the training sample set to generate an optimal compensation strategy.
[0207] The prediction module 740 is configured to input the real-time collected historical window data into the bus voltage fluctuation prediction model to output a bus voltage fluctuation prediction value.
[0208] The third generation module 750 is configured to input the bus voltage fluctuation prediction value and the historical window data into the optimal compensation strategy to generate an action instruction of dynamic reactive power compensation.
[0209] Optionally, the acquisition module 710 comprises:
[0210] The 3σ criterion is adopted to remove outliers and complete missing values from the historical operation data and the real-time monitoring data, to obtain abnormal correction data;
[0211] The abnormal correction data is normalized to obtain normalized data;
[0212] The normalized data is reconstructed into a training sample set of historical data segments and future labels.
[0213] Optionally, the structure of the generative adversarial network is as follows:
[0214] The generator G(z, X hist ): input random noise z ~ N(0, 1) with a dimension of d z and historical busbar data sample X x with a dimension of d hist , output future T p step busbar voltage fluctuation prediction scene U gen =G(z, X hist ), the generator adopts a 3-layer fully connected network, and the activation function is ReLU and Sigmoid;
[0215] The discriminator D(X real , X gen ): input real busbar voltage sequence U real and generated sequence U gen , output the probability that the data is real D(X) ∈ [0, 1], the discriminator adopts a 3-layer fully connected network, and the activation function is LeakyReLU and Sigmoid.
[0216] Optionally, the discriminator loss L D of the discriminator is as follows:
[0217]
[0218] In the formula, L D is the loss value of the discriminator; E is the mathematical expectation symbol; U real is the real voltage sequence, i.e., X real ; p data is the probability distribution of the real voltage sequence U real ; log is the natural logarithm function; z ~ p z is a random noise z obeying the probability distribution p z ; D(G(z, X hist )) is the discrimination probability of the discriminator on the generated voltage U gen ;
[0219] The generator loss L G of the generator is as follows:
[0220]
[0221] wherein, L G : loss value of generator; λ: weight of prediction error constraint term; MSE(a, b): mean square error function.
[0222] Optionally, the first generation module 720 comprises:
[0223] injecting noise into the training sample set, generating noise, and constructing a perturbed sample based on the noise;
[0224] adding an L2 regularization term to the loss of the generator of the generative adversarial network to obtain a model loss function;
[0225] based on the model loss function, using an Adam optimizer to alternately update parameters of the discriminator and the generator until the model loss function converges, thereby generating a bus voltage fluctuation prediction model.
[0226] Optionally, the environment and space of the deep learning model are defined as:
[0227] state space S: containing predicted bus voltage deviation, current reactive power output, and device state, defined as: S(t) = [ΔU pred (t), Q SVC (t), Q syn (t), U real (t)] T wherein ΔU pred (t) = U pred (t) - U rated , U rated is the rated voltage, Q SVC (t) is the current reactive power output of the SVC, Q syn (t) is the current reactive power output of the synchronous compensator, and U real (t) is the current bus measured voltage;
[0228] action space A: containing bus SVC trigger angle adjustment amount and compensator excitation current adjustment amount, defined as: A(t) = [Δα(t), ΔI f (t)] T wherein Δα(t) ∈ [-5°, 5°] is the adjustment range of the SVC trigger angle, ΔI f (t) ∈ [-0.2I f0 , 0.2I f0 ] is the adjustment range of the compensator excitation current, and I f0 is the rated excitation current of the compensator.
[0229] Optionally, the reward function R(S(t), A(t)) of the deep learning model is:
[0230]
[0231] wherein: ω1=10 is a voltage deviation weight, ΔU real (t+1) is the voltage deviation amount at t+1 time; ω2=50 is a safety constraint weight, ||(·) is an indicator function; ω3=2 is a regulation smoothing weight;
[0232] Deep learning model optimization and strategy update:
[0233] Strategy network π θ (A|S): input state S(t), output action A(t) probability distribution, parameter is θ;
[0234] Value network V φ (S): input state S(t), estimate state value, parameter is φ;
[0235] The strategy update formula is:
[0236]
[0237] wherein: L CLIP (θ) is the optimization objective function of the strategy network; S~ρ π is the state S under the state distribution ρ π of the strategy π. is the probability distribution of the action a under the old strategy ; A t is the advantage function at t time; clip(·,1-ξ,1+ξ) is a clipping function, wherein
[0238] In the deep learning model training, the strategy network and the value network are alternately optimized, the Adam optimizer is adopted, the training is performed until the strategy converges, and the optimal compensation strategy is obtained
[0239] Optionally, the apparatus 700 further comprises:
[0240] The action instruction is converted into a physical control signal to control the bus static reactive compensator trigger angle and the excitation current of the phase modifier.
[0241] Exemplary electronic device
[0242] Figure 8 is the structure of the electronic device provided by an exemplary embodiment of the present application. As Figure 8 shown, the electronic device 80 includes one or more processors 81 and a memory 82.
[0243] The processor 81 can be a central processing unit (CPU) or other form of processing unit that has data processing and / or instruction execution capabilities and can control other components in the electronic device to perform desired functions.
[0244] The memory 82 can include one or more computer program products that can include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory, for example, can include random access memory (RAM), cache memory, and / or the like. The non-volatile memory, for example, can include read only memory (ROM), hard disk, flash memory, and / or the like. One or more computer program instructions can be stored on the computer-readable storage media, which the processor 81 can execute to implement the methods of the software programs of the various embodiments of the present application described above and / or other desired functions. In one example, the electronic device can further include an input device 83 and an output device 84, which are interconnected through a bus system and / or other form of connection mechanism (not shown).
[0245] In addition, the input device 83 can include, for example, a keyboard, a mouse, and / or the like.
[0246] The output device 84 can output various information to the outside. The output device 84 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and / or the like.
[0247] Of course, in order to simplify, Figure 8 Only some of the components of the electronic device related to the present application are shown in FIG. 1, and components such as a bus, an input / output interface, and the like are omitted. In addition, the electronic device can include any other appropriate components according to the specific application.
[0248] Exemplary computer program product and computer readable storage medium
[0249] In addition to the above-described methods and devices, embodiments of the present application can be a computer program product including computer program instructions that, when executed by a processor, cause the processor to perform the steps of the methods according to various embodiments of the present application described in the above "Exemplary Methods" section of the specification.
[0250] The computer program product can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server.
[0251] Furthermore, embodiments of the present application can also be a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, cause the processor to perform the steps described in the above "Exemplary Method" section of the present specification for carrying out methods according to embodiments of the present application.
[0252] The computer readable storage medium can be a combination of one or more computer readable media. The computer readable media can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or apparatus or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0253] The above description merely provides exemplary embodiments of the present application, but the present application is not limited thereto. It will be apparent to those skilled in the art that various modifications, substitutions and changes can be made thereto without departing from the scope of the present application. The above specification, examples and data provide exemplary description only of the application, and use of the best mode contemplated. Therefore, the scope of the application is not intended to be limited to the above specification, examples and data, and the scope of the application should be determined by the following claims.
[0254] Each embodiment of the present specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between each embodiment can be understood by referring to each other. For system embodiments, since they basically correspond to the method embodiments, the description is relatively simple, and the relevant parts can be understood by referring to the part of the method embodiments.
[0255] The block diagrams of the devices, systems, apparatuses, systems referred to in this disclosure are merely illustrative examples and are not intended to require or imply that the connections, arrangements, configurations be as shown in the block diagrams. As will be recognized by one of ordinary skill in the art, the devices, systems, apparatuses, systems can be connected, arranged, configured in any manner. Words such as "including," "containing," "comprising," and the like are to be construed in an inclusive fashion, indicating open-ended duration, and are intended to be equivalent to "including, but not limited to." As used herein, the terms "or" and "and" shall each be construed as the term "and / or" unless expressly indicated otherwise. As used herein, the term "such as" shall be construed as the phrase "such as but not limited to."
[0256] The methods and systems of the present application can be implemented in a number of ways. For example, the methods and systems of the present application can be implemented via software, hardware, firmware, or any combination of software, hardware, and firmware. The above described order of steps for the methods is merely illustrative, and the steps of the methods of the present application are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, the present application can also be implemented as a program recorded on a recording medium, which includes machine readable instructions for implementing the methods according to the present application. Thus, the present application also covers a recording medium storing a program for executing the methods according to the present application.
[0257] It is also to be noted that in the systems, apparatuses, and methods of the present application, various components or steps can be decomposed and / or recombined. Such decompositions and / or re-combinations are to be considered as equivalent to the present application. The above description of the disclosed aspects is given for illustrative purposes and is not intended to limit the aspects of the application in any way. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0258] The above description has been presented for the purposes of example and description. It is not intended to be exhaustive or to limit embodiments of the application to the forms disclosed herein. Although various example aspects and embodiments have been discussed, those skilled in the art will recognize certain modifications, permutations, additions, and sub-combinations thereof.
Claims
1. A method for bus voltage fluctuation prediction and dynamic reactive power compensation based on a generative adversarial network, characterized in that, The method comprises the following steps: Collecting historical operation data and real-time monitoring data of a high-voltage bus and performing data preprocessing to obtain a training sample set; Training a pre-constructed generative adversarial network according to the training sample set to generate a bus voltage fluctuation prediction model; Training a pre-constructed deep learning model according to the training sample set to generate an optimal compensation strategy; Inputting real-time collected historical window data into the bus voltage fluctuation prediction model to output a bus voltage fluctuation prediction value; Inputting the bus voltage fluctuation prediction value and the historical window data into the optimal compensation strategy to generate an action instruction of dynamic reactive power compensation.
2. The method of claim 1, wherein, Collecting historical operation data and real-time monitoring data of a high-voltage bus and performing data preprocessing to obtain time series sample data, comprising: Using the 3σ criterion to perform outlier rejection and missing value completion on the historical operation data and the real-time monitoring data to obtain abnormal correction data; Performing normalization processing on the abnormal correction data to obtain normalized data; Reconstructing the normalized data into a training sample set of historical data segments and future labels.
3. The method of claim 1, wherein, The structure of the generative adversarial network is: Generator G(z, X hist ): Random noise z ~ N(0, 1) with input dimension d z and historical bus data sample X x with dimension d hist output future T p step bus voltage fluctuation prediction scene U gen = G(z, X hist ), the generator adopts a 3-layer fully connected network, and the activation function is ReLU and Sigmoid; Discriminator D(X real ,X gen ) : input real bus voltage sequence U real and generated sequence U gen , output the probability of data being real D(X) ∈ [0, 1], the discriminator adopts a 3-layer fully connected network, and the activation function is LeakyReLU and Sigmoid.
4. The method of claim 3, wherein, The discriminator loss L of the discriminator is: D is: where L D is the loss value of the discriminator; E is the mathematical expectation symbol; U real is the real voltage sequence, i.e. X real ; p data is the probability distribution of the real voltage sequence U real ; log is the natural logarithm function; z ~ p z is the random noise z subject to the probability distribution p z ; D(G(z, X hist )) is the discriminant probability of the generated voltage U gen by the discriminator. The generator loss L of the generator G is: In the formula, L G : loss value of the generator; λ: weight of the prediction error constraint term; MSE(a, b): mean square error function.
5. The method of claim 1, wherein, Training a pre-constructed generative adversarial network according to the training sample set to generate a bus voltage fluctuation prediction model, comprising: Injecting noise into the training sample set to generate noise and constructing a perturbed sample based on the noise; Adding an L2 regularization term to the generator loss of the generative adversarial network to obtain a model loss function; Based on the model loss function, using the Adam optimizer to alternately update the parameters of the discriminator and the generator until the model loss function converges, generating the bus voltage fluctuation prediction model.
6. The method of claim 1, wherein, The environment and space of the deep learning model are defined as: State space S: contains the predicted bus voltage deviation, current reactive power output, equipment status, defined as: S(t) = [ΔU pred (t), Q SVC (t), Q syn (t), U real (t)] T , where ΔU pred (t) = U pred (t) - U rated , U rated is the rated voltage, Q SVC (t) is the current reactive power output of SVC, Q syn (t) is the current reactive power output of synchronous condenser, U real (t) is the current measured bus voltage; Action space A: contains bus SVC trigger angle adjustment amount, phase modifier excitation current adjustment amount, defined as: A(t)=[Δα(t), ΔI f (t)] T , where Δα(t)∈[-5°, 5°] is the SVC trigger angle adjustment range, ΔI f (t)∈[-0.2I f0 , 0.2I f0 ], is the phase modifier excitation current adjustment range, I f0 is the rated excitation current of the phase modifier.
7. The method of claim 6, wherein, The reward function R(S(t), A(t)) of the deep learning model is: where: ω1=10 is the voltage deviation weight, ΔU real (t+1) is the voltage deviation at time t+1; ω2=50 is the security constraint weight, ||(·) is the indicator function; ω3=2 is the adjustment smoothing weight; The deep learning model optimization and strategy update are: Policy network π θ (A|S): probability distribution over actions A(t) given state S(t), parameterized by θ Value network V φ (S): input state S(t), estimate state value, parameter φ; The strategy update formula is: where: L CLIP (θ) is the optimization objective function of the policy network; S ~ p π is the state distribution pπunder the policy π for state S; is the probability distribution of action a under the old policy A t is the advantage function at time t; clip(·,1-ξ,1+ξ) is the clipping function, where In the deep learning model training, the policy network and the value network are alternately optimized, an Adam optimizer is adopted, and the training is performed until the policy converges, so as to obtain an optimal compensation policy 8. The method of claim 1, wherein, Further comprising: Converting the action instruction into a physical control signal to control the trigger angle of the bus static reactive power compensator and the excitation current of the phase modifier.
9. A bus voltage fluctuation prediction and dynamic reactive power compensation device based on a generative adversarial network, characterized in that, The method comprises the following steps: A collection module is configured to collect historical operation data and real-time monitoring data of a high-voltage bus and perform data preprocessing to obtain a training sample set; A first generation module is configured to train a pre-constructed generative adversarial network according to the training sample set to generate a bus voltage fluctuation prediction model; A second generation module is configured to train a pre-constructed deep learning model according to the training sample set to generate an optimal compensation strategy; A prediction module is configured to input real-time collected historical window data into the bus voltage fluctuation prediction model to output a bus voltage fluctuation prediction value; A third generation module is configured to input the bus voltage fluctuation prediction value and the historical window data into the optimal compensation strategy to generate an action instruction of dynamic reactive power compensation.
10. The apparatus of claim 9, wherein, The collection module comprises: A correction submodule is configured to use the 3σ criterion to perform outlier rejection and missing value completion on the historical operation data and the real-time monitoring data to obtain abnormal correction data; A normalization submodule is configured to perform normalization processing on the abnormal correction data to obtain normalized data; A reconstruction submodule is configured to reconstruct the normalized data into a training sample set of historical data segments and future labels.
11. The apparatus of claim 9, wherein, The structure of the generative adversarial network is as follows: Generator G(z, X hist ): input random noise z ~ N(0, 1) with dimension d z and historical bus data sample X x with dimension d hist , output future T p step bus voltage fluctuation prediction scenario U gen = G(z, X hist ), the generator adopts a 3-layer fully connected network, and the activation function is ReLU and Sigmoid; Discriminator D(X real ,X gen ) : input real bus voltage sequence U real and generated sequence U gen , output the probability of data being real D(X) ∈ [0, 1], the discriminator adopts a 3-layer fully connected network, and the activation function is LeakyReLU and Sigmoid.
12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is used for executing the method in any one of claims 1-8.
13. An electronic device, comprising: The electronic device comprises: a processor; a memory for storing executable instructions of the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method in any one of claims 1-8.
Citation Information
Cited By
Sample model training method and system based on data driving
CN122021741A