Power system optimal power flow control method and device based on transient stability constraint, terminal equipment and storage medium
By constructing a transient stability constraint transformation model and machine learning algorithm, transient stability algebraic constraints are generated, solving the problem of the expansion of the number of optimization variables and constraints, and realizing efficient transient stability control of the power system.
Patent Information
- Application Number
- CN202511726851.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies, when constructing transient stability-constrained optimal power flow control, result in a sharp increase in the number of optimization variables and constraints, leading to excessively long computation times and making it difficult to meet the real-time control requirements of power systems.
By constructing a transient stability constraint transformation model, using machine learning algorithms to train the prediction value of the maximum relative work angle difference, generating transient stability algebraic constraints, and embedding them into the initial optimal power flow optimization model, a mixed integer linear programming constraint is formed, avoiding direct processing of differential algebraic equations and simplifying the optimization model.
It significantly reduces the difficulty of model solving, improves computational efficiency, meets the online dispatching requirements of power systems, and ensures that the power grid maintains transient stability after being subjected to large disturbances.
Smart Images

Figure CN121507775A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system control technology, and in particular to a method, apparatus, terminal equipment and storage medium for optimal power flow control of a power system based on transient stability constraints. Background Technology
[0002] Optimal Power Flow (OPF) is one of the core issues in power system dispatching. Its goal is to achieve economic objectives such as minimizing generation costs and network losses by adjusting control variables such as generator active power output, while satisfying various steady-state operating constraints. Transient stability refers to the ability of all generating units to maintain synchronous operation and transition to a new stable operating state after a large disturbance in the power system. Traditional OPF primarily focuses on the steady state of the system and cannot account for the transient processes after a large disturbance. OPF dispatching that only satisfies steady-state constraints may pose significant safety risks in actual operation.
[0003] Transient Stability-Constrained Optimal Power Flow (TSCOPF) builds upon traditional Off-Flow Flow (OPF) by incorporating transient stability constraints to find an optimal scheduling scheme that satisfies both economic efficiency and transient stability. However, current TSCOPF solutions require directly embedding a complex set of nonlinear differential-algebraic equations (DAEs) as constraints into the optimization model. Discretization methods are used to discretize the DAEs over the entire time domain, transforming them into a set of equivalent pure algebraic equation constraints before solving. This process introduces all variables and equations at each time step of the transient process into the optimization model, leading to a dramatic increase in the number of optimization variables and constraints, resulting in long computation times and difficulty in meeting the timeliness requirements of control. Summary of the Invention
[0004] This invention provides a method, apparatus, terminal equipment, and storage medium for optimal power flow control of power systems based on transient stability constraints. It can effectively solve the problem that the number of optimization variables and constraints in existing technologies has increased dramatically, resulting in long calculation times and difficulty in meeting control timeliness requirements.
[0005] An embodiment of the present invention provides an optimal power flow control method for power systems based on transient stability constraints, comprising: Obtain the operating cost, grid operation data, and topology data of the power grid to be optimized; Based on the operating cost, the power grid operation data, and the topology data, an initial optimal power flow optimization model is constructed, which includes power balance constraints, generator output constraints, node voltage constraints, and branch power flow constraints. The power grid operation data and the topology data are input into a preset transient stability constraint transformation model. Constraint transformation is performed based on a preset transient stability threshold to generate transient stability algebraic constraints. The transient stability constraint transformation model is trained using historical operation data and historical topology data as input and the maximum relative power angle difference as a label. The transient stability algebraic constraints are embedded into the initial optimal power flow control model to construct the final optimal power flow optimization model. With the goal of minimizing total power generation cost, the final optimal power flow optimization model is solved under the constraints of power balance, generator output, node voltage, branch power flow, and transient stability algebra to obtain the unit output scheduling results. The power grid to be optimized is then optimized based on the unit output scheduling results.
[0006] Furthermore, the training of the transient stability constraint transformation model includes: Acquire historical operational data, historical topology data, and historical fault data; Historical control variable vectors are extracted based on historical operating data. Random sampling is performed based on historical topology data and historical control variable vectors to generate several historical operating modes. The historical control variable vectors include historical generator output. For each historical operating mode, time-domain simulation is performed based on historical fault data to generate a system of differential-algebraic equations. Based on the system of differential-algebraic equations, the dynamic variable trajectory within a preset time after the fault is extracted. The maximum relative work angle difference is calculated from the dynamic variable trajectory. Using the historical control variable vector as input features and the maximum relative work angle difference as a label, training sample pairs are generated. The transient stable constraint transformation model to be trained is trained based on the training sample pairs until the preset loss function converges, and the trained transient stable constraint transformation model is obtained.
[0007] Further, the power grid operation data and the topology data are input into a preset transient stability constraint transformation model, and constraint transformation is performed based on a preset transient stability threshold to generate transient stability algebraic constraints, including: The power grid operation data and the topology data are input into a preset transient stability constraint transformation model to obtain the feasible region of generator active power output and the upper and lower bounds of the activation function of each layer of neurons. Based on the feasible region of generator active power output and the upper and lower bounds of the activation function of each layer of neurons, a linear transformation is performed based on the preset binary variables of neuron activation to obtain mixed integer linear programming constraints. The prediction of the maximum relative work angle difference is obtained by using mixed integer linear programming constraints. The constraint transformation is performed based on the predicted value of the maximum relative work angle difference and the preset transient stability threshold to form the transient stability constraint algebraic constraint.
[0008] Furthermore, the transient stability algebraic constraint is: in, This is the predicted value for the maximum relative angle difference; This represents the form of the transient stability constraint transformation model; For control vectors; The network parameters of the trained transient stable constraint transformation model, including the weights of each layer. With bias ; This is the transient stability threshold.
[0009] Furthermore, the power balance constraint is: in, and busbars Active power generation injection and reactive power generation injection; busbars Active and reactive loads; busbar The voltage amplitude; For the set of busbars; Index of the parent line set; These are the real and imaginary elements of the nodal admittance matrix, respectively. Phase angle; The generator output constraint is: in, The units The lower and upper limits of the effective output; The units The lower and upper limits of reactive power output; To connect to the bus A collection of generators; For unit indexing; and The units The effective and ineffective contributions; The node voltage constraint is: in, busbars Lower and upper limits of voltage amplitude; The branch power flow constraint is: in, Branch roads The lower and upper limits of the active current flow; branch road The meritorious trend; For branch set; For load sets; interruptible load Baseline active load; This represents the interruptible quantity corresponding to the active load.
[0010] Furthermore, the final optimal power flow optimization model is as follows: in, Total power generation cost; Let be the fixed cost coefficient of the ngth generator; The linear increase in cost for every 1MW increase in unit output; This increases the marginal cost of the unit.
[0011] Furthermore, it also includes: After optimizing the power grid to be optimized based on the unit output scheduling results, based on the optimized unit output, several historical fault data are selected for time-domain simulation to obtain the target maximum relative power angle difference. The optimization is deemed effective if the target's maximum relative power angle difference is compared with a preset judgment threshold. If the maximum relative work angle difference of the target is greater than or equal to the preset judgment threshold, the optimization is deemed invalid and the optimal power flow optimization model is retrained.
[0012] As an improvement to the above solution, another embodiment of the present invention provides a power system optimal power flow control device based on transient stability constraints, comprising: The power grid data acquisition module is used to acquire the operating cost, power grid operation data, and topology data of the power grid to be optimized. The initial model building module is used to build an initial optimal power flow optimization model based on the operating cost, the power grid operation data, and the topology data. The initial optimal power flow optimization model includes power balance constraints, generator output constraints, node voltage constraints, and branch power flow constraints. The transient stability constraint conversion module is used to input the power grid operation data and the topology data into a preset transient stability constraint conversion model, perform constraint conversion based on a preset transient stability threshold, and generate transient stability algebraic constraints; wherein, the transient stability constraint conversion model is trained with historical operation data and historical topology data as input and the maximum relative power angle difference as a label; The final model building module is used to embed the transient stability algebraic constraints into the initial optimal power flow control model to build the final optimal power flow optimization model. The optimization model solving module is used to solve the final optimal power flow optimization model with the goal of minimizing the total power generation cost, under the constraints of power balance, generator output, node voltage, branch power flow, and transient stability algebra, to obtain the unit output scheduling results. The power grid optimization module is used to optimize the power grid to be optimized based on the unit output scheduling results.
[0013] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a power system optimal power flow control method based on transient stability constraints as described in the above embodiments.
[0014] Another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the optimal power flow control method for a power system based on transient stability constraints described in the above embodiment.
[0015] By implementing this invention, at least the following beneficial effects are achieved: This invention provides a method, device, terminal equipment, and storage medium for optimal power flow control of power systems based on transient stability constraints. The method generates transient stability algebraic constraints through a pre-set transient stability constraint transformation model. This model has been trained offline, solidifying the mapping relationship between historical operating data, historical topology data, and the maximum relative power angle difference. In online applications, only the operating data and topology data of the power grid to be optimized need to be input, and the algebraic form of transient stability constraints can be directly output without any direct processing or time-domain discretization of the DAEs, fundamentally eliminating the complexity introduced by discretization. The technical link is optimized; the generated transient stability algebraic constraints are constructed only around generator output, without the need to introduce any additional time-step related variables and equations. The number of optimization variables and constraints only increases slightly on the basis of the initial optimal power flow optimization model, completely avoiding the multi-dimensional difficulty of traditional methods and significantly reducing the difficulty of model solution. Since there is no need to solve thousands of algebraic equations after discretization, the solution efficiency of the final optimal power flow optimization model is significantly improved, which can adapt to the timeliness requirements of online power system dispatching and solve the key problem that traditional discretization methods are difficult to apply to real-time control of actual power grids due to excessive computation time. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating an optimal power flow control method for a power system based on transient stability constraints, provided by an embodiment of the present invention. Figure 2 This is a structural diagram of a two-stage model provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an optimal power flow control device for a power system based on transient stability constraints, provided in an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] See Figure 1 To address the problem of the rapidly increasing number of optimization variables and constraints in existing technologies, which leads to long computation times and difficulty in meeting control timeliness requirements, an embodiment of the present invention provides a flowchart of a power system optimal power flow control method based on transient stability constraints, including: S1. Obtain the operating cost, power grid operation data, and topology data of the power grid to be optimized; Specifically, the power grid to be optimized refers to a power system that needs to achieve the dual objectives of minimizing power generation costs and achieving transient stability by adjusting generator output, etc. This can encompass scenarios such as provincial power grids, regional interconnected power grids, or distribution networks with high penetration rates of renewable energy. Operating costs refer to the total power generation cost of all generators in the power grid, including fixed costs, variable costs linearly related to output, and marginal costs related to the square of output; this is a core component of the optimization objective. Power grid operating data refers to real-time or recent operating status parameters of the power grid, including generator active and reactive power output, bus voltage amplitude and phase angle, branch power flow, and load power. Topology data refers to the basic data describing the physical connections of the power grid, including bus type, line resistance, inductive reactance, susceptance, transformer parameters, equipment commissioning / discharging status, and the connection relationships between buses, generators, and loads.
[0019] In a preferred embodiment of the present invention, real-time operating data is collected through the SCADA system and PMU synchronization phasor measurement device of the power grid dispatch center; topology data is extracted from the power grid GIS system; and operating costs are determined based on cost parameters provided by the generator manufacturer, such as fixed cost and variable cost coefficients. This provides basic data support for subsequent model construction, ensuring that the data covers the economic indicators, operating status indicators, and physical structure indicators required for optimization.
[0020] S2. Based on the operating cost, the power grid operation data, and the topology data, construct an initial optimal power flow optimization model, which includes power balance constraints, generator output constraints, node voltage constraints, and branch power flow constraints. Specifically, the initial optimal power flow optimization model refers to a mathematical optimization model that considers only the basic operating constraints of the power grid, including power balance, generator output, node voltage, and branch power flow constraints, with the objective of minimizing the total generation cost. It is the foundational model for subsequently embedding transient stability constraints.
[0021] In a preferred embodiment of the present invention, the objective function is to minimize the total power generation cost. A mathematical modeling method is used to construct a model, taking into account constraints such as power balance, generator output limits, node voltage amplitude range, and branch power flow transmission limits. This establishes a basic optimization framework for the economic operation of the power grid, ensuring that the optimization results meet the fundamental physical constraints for normal grid operation.
[0022] Preferably, the power balance constraint is: in, and busbars Active power generation injection and reactive power generation injection; busbars Active and reactive loads; busbar The voltage amplitude; For the set of busbars; Index of the parent line set; These are the real and imaginary elements of the nodal admittance matrix, respectively. Phase angle; The generator output constraint is: in, The units The lower and upper limits of the effective output; The units The lower and upper limits of reactive power output; To connect to the bus A collection of generators; For unit indexing; and The units The effective and ineffective contributions; The node voltage constraint is: in, busbars Lower and upper limits of voltage amplitude; The branch power flow constraint is: in, Branch roads The lower and upper limits of the active current flow; branch road The meritorious trend; For branch set; For load sets; interruptible load Baseline active load; This represents the interruptible quantity corresponding to the active load.
[0023] Specifically, power balance constraints refer to the requirement that the active and reactive power injected into each bus in the power grid equals the load power consumed by that bus. This is a fundamental physical constraint for maintaining the normal operation of the power grid, including active power balance constraints and reactive power balance constraints. It ensures that the power supply and demand of each bus in the power grid are balanced, avoiding frequency and voltage fluctuations caused by power surplus or shortage. Generator output constraints refer to the constraint that the active and reactive power output of generators must not exceed their rated capacity or safe operating limits. This ensures that generators operate within safe ranges, limits their output range, avoids generator overload operation, and protects equipment safety. Node voltage constraints refer to the requirement that the voltage amplitude of each bus in the power grid must not exceed a preset range. This is an important constraint for ensuring power quality and equipment safety, guaranteeing power grid voltage quality, and preventing damage to electrical equipment from excessively high or low voltage. Branch power flow constraints refer to the requirement that the active power flow of each transmission line and transformer in the power grid must not exceed its transmission limit. This prevents safety accidents caused by line overload, avoids branch power flow overload, prevents line overheating damage, and provides emergency regulation capabilities through interruptible loads. The node admittance matrix is a matrix describing the electrical connections between buses in a power grid. Its elements include real parts (conductance) and imaginary parts (susceptance), and it is the core matrix for calculating bus power balance. Interruptible load refers to the load that can be temporarily reduced in the event of a power grid emergency. Its baseline active load is the load value during normal operation, and the interruptible load is the maximum allowable load reduction value.
[0024] S3. Input the power grid operation data and the topology data into a preset transient stability constraint transformation model, perform constraint transformation based on a preset transient stability threshold, and generate transient stability algebraic constraints; wherein, the transient stability constraint transformation model is trained using historical operation data and historical topology data as input and the maximum relative power angle difference as a label; Specifically, the transient stability constraint transformation model refers to a predictive model trained based on machine learning algorithms. Its core function is to map power grid operation data and topology data into predicted values of the maximum relative power angle difference, thereby achieving the quantitative transformation of transient stability constraints. Transient stability algebraic constraints refer to transforming transient stability requirements into algebraic expression constraints that the optimization model can recognize. By limiting the predicted value of the maximum relative power angle difference to not exceed a preset threshold, the transient stability of the power grid is ensured.
[0025] In a preferred embodiment of the present invention, the operating data and topology data obtained in S1 are input into a pre-trained transient stability constraint transformation model, and the model outputs a predicted value of the maximum relative work angle difference; combined with a preset transient stability threshold, an algebraic constraint is formed where the predicted value is ≤ the threshold. This solves the problem that traditional transient stability constraints are difficult to quantify and embed into the optimal power flow model, and achieves the algebraic transformation of dynamic constraints through a data-driven method.
[0026] Preferably, the training of the transient stability constraint transformation model includes: Acquire historical operational data, historical topology data, and historical fault data; Historical control variable vectors are extracted based on historical operating data. Random sampling is performed based on historical topology data and historical control variable vectors to generate several historical operating modes. The historical control variable vectors include historical generator output. For each historical operating mode, time-domain simulation is performed based on historical fault data to generate a system of differential-algebraic equations. Based on the system of differential-algebraic equations, the dynamic variable trajectory within a preset time after the fault is extracted. The maximum relative work angle difference is calculated from the dynamic variable trajectory. Using the historical control variable vector as input features and the maximum relative work angle difference as a label, training sample pairs are generated. The transient stable constraint transformation model to be trained is trained based on the training sample pairs until the preset loss function converges, and the trained transient stable constraint transformation model is obtained.
[0027] Specifically, historical operating data refers to the power grid's operating records over a period of time, such as one year, including data on generator output, bus voltage, and branch power flow under different load levels and renewable energy output scenarios, used for generating model training samples. Historical topology data refers to the topology records of the power grid during its historical operation, including topology adjustment data caused by equipment commissioning / decommissioning and line maintenance, ensuring that training samples cover diverse topology scenarios. Historical fault data refers to records of faults that occurred in the power grid's history or preset typical fault sets, including fault type, fault location, fault start time, and clearing time. Historical control variable vectors refer to the set of key variables extracted from historical operating data used to control the power grid state, with historical generator active power output as the core, and optional variables including generator voltage reference values, transformer tap positions, etc. Historical operating modes refer to diverse power grid operating scenarios obtained by sampling historical control variable vectors and topology data, with each scenario corresponding to a specific combination of generator output and topology. Time-domain simulation refers to simulating the process of power grid state changing over time after a fault occurs based on a power system dynamic model. Differential-algebraic equations (DAEs) refer to the set of mathematical equations describing the dynamic characteristics of the power system. Dynamic variable trajectories refer to the curve data of the changes in dynamic variables of the power grid (generator power angle, angular velocity, bus voltage, etc.) over time during time-domain simulation, reflecting the dynamic response process of the system after a fault. Maximum relative power angle difference refers to the maximum difference in rotor power angle between any two generators within a preset time after a fault; it is a core indicator for measuring the transient stability of the power system. When this value is less than 180°... 0 The system is generally considered to be transiently stable. Loss function convergence means that during model training, the error between the predicted value and the true label (maximum relative angle difference) gradually decreases and tends to stabilize, reaching the preset accuracy requirement.
[0028] In a preferred embodiment of the present invention, the maximum relative work angle difference is calculated from the dynamic variable trajectory as a label, and the corresponding historical control variable vector is used as input features to form input-label sample pairs. A DNN is used as the model to be trained, with mean squared error (MSE) as the loss function, and iterative training is performed using the Adam algorithm until the loss function converges. Through supervised learning, the model learns the mapping relationship between control variables and transient stability indices, thereby achieving quantitative prediction of transient stability constraints.
[0029] Preferably, the power grid operation data and the topology data are input into a preset transient stability constraint transformation model, and constraint transformation is performed based on a preset transient stability threshold to generate transient stability algebraic constraints, including: The power grid operation data and the topology data are input into a preset transient stability constraint transformation model to obtain the feasible region of generator active power output and the upper and lower bounds of the activation function of each layer of neurons. Based on the feasible region of generator active power output and the upper and lower bounds of the activation function of each layer of neurons, a linear transformation is performed based on the preset binary variables of neuron activation to obtain mixed integer linear programming constraints. The prediction of the maximum relative work angle difference is obtained by using mixed integer linear programming constraints. The constraint transformation is performed based on the predicted value of the maximum relative work angle difference and the preset transient stability threshold to form the transient stability constraint algebraic constraint.
[0030] Specifically, the feasible region of generator active power output refers to the range of active power output of each generator under safe operation conditions. It is determined by factors such as generator rated capacity and speed control system limitations, and is the fundamental boundary condition for constraint transformation. The upper and lower bounds of the neuron activation function refer to the minimum and maximum values of the input values of each ReLU neuron before activation in the transient stable constraint transformation model (DNN), calculated using the interval bound propagation (IBP) algorithm. The neuron activation binary variable refers to the variable r used to mark the activation state of the ReLU neuron. k ∈{0,1}, r k =1 indicates that the neuron is in the activation region (input ≥ 0), r k =0 indicates the system is in the inactive region (input ≤ 0). Mixed-integer linear programming constraints transform the nonlinear activation relationship of ReLU neurons into a combination of linear and binary variable constraints, making the prediction process of the transformed model recognizable by the integer programming solver. The maximum relative power angle difference prediction value refers to the estimated value of the maximum relative power angle difference of the system after a fault, calculated through mixed-integer linear programming constraints, and is the core quantitative indicator of transient stability constraints.
[0031] In a preferred embodiment of the present invention, a binary variable r is introduced for each ReLU neuron. k The nonlinear activation relation zk = max(0, z k Transform ^*) into a set of linear constraints: z k ≥z k ^*、z k ≤z k ^*- z k,min ^*(1-r k ), z k ≥0, z k ≤z k,max ^*·r k The constraints of all neurons are integrated to obtain a mixed-integer linear programming constraint set. The nonlinearity of the ReLU function is addressed by transforming the prediction process of the transformation model into a combination of linear constraints, ensuring embedding into the optimal power flow optimization model. The mixed-integer linear programming constraints are combined with the linear transformation constraints (weight matrix W, bias vector b) of the transformation model, and the predicted value of the maximum relative work angle difference is obtained by solving a system of linear equations. The transient stability index under the current operating scenario is quantitatively predicted, providing a basis for forming transient stability constraints. The transient stability requirements are transformed into algebraic constraints that the optimization model can directly recognize, achieving the coupling of transient stability and economic optimization.
[0032] Indicatively, with Let's take an example to illustrate the specific process of transforming to linear constraints: Assume the input (For example, the active power output of two generator units). One ReLU hidden layer, two neurons: , in , ; ,remember , , Linear output layer: For each Estimated upper and lower bounds Linearize ReLU separately (Big-M form): For Add binary And add a linear relationship (before activation): ; ReLU equivalent inequalities: , ; ; ; , ; Output layer equation: Stability threshold: At this point, and Each step is constructed by simultaneously applying linear equality / inequality equations, resulting in a set of linear (including binary) constraints that can be directly processed by the MILP solver. Deeper networks repeat this construction layer by layer; input... The boundaries and coupling relationships should be considered to maintain the consistency of variables between offline training and online applications.
[0033] Preferably, the transient stability algebraic constraint is: in, This is the predicted value for the maximum relative angle difference; This represents the form of the transient stability constraint transformation model; For control vectors; The network parameters of the trained transient stable constraint transformation model, including the weights of each layer. With bias ; This is the transient stability threshold.
[0034] Specifically, the control vector u refers to the core control variable affecting the transient stability of the power grid. The core is the active power output of each generator, which can include generator voltage reference values, transformer tap positions, etc., and its dimension is consistent with the number of nodes in the DNN input layer. The core meaning of transient stability algebraic constraints is to adjust the power grid operating state through the control vector u so that the maximum relative power angle difference predicted by the transient stability constraint transformation model does not exceed the preset transient stability threshold, ensuring that the power grid can maintain transient stability after a fault. This retains the core requirements of transient stability and can be directly identified and processed by the solver of the optimal power flow optimization model.
[0035] S4. Embed the transient stability algebraic constraints into the initial optimal power flow control model to construct the final optimal power flow optimization model; Specifically, the transient stability algebraic constraints generated in S3 are integrated with the constraints of the initial optimal power flow optimization model constructed in S2 to form a complete optimization model that includes economic objectives, basic operational constraints, and transient stability constraints. This achieves coupled optimization of economic and safety objectives, ensuring that the model pursues both minimum cost and meets transient stability requirements.
[0036] Preferably, the final optimal power flow optimization model is as follows: in, Total power generation cost; Let be the fixed cost coefficient of the ngth generator; The linear increase in cost for every 1MW increase in unit output; This increases the marginal cost of the unit.
[0037] Specifically, total generation cost refers to the total cost incurred by all generators operating in the power grid, including fixed cost, linear variable cost, and quadratic marginal cost, and is the objective function of the optimal power flow optimization model. The fixed cost coefficient refers to the fixed operating cost (in yuan) of the ng-th generator, which is independent of generator output and only related to the generator's operating status. The linear incremental cost coefficient refers to the increase in linear variable cost (in yuan / MW) for every 1MW increase in the output of the ng-th generator, reflecting the generator's basic variable cost characteristics. The incremental marginal cost coefficient refers to the quadratic cost coefficient (in yuan / MW) of the output of the ng-th generator. 2 This reflects the characteristic of increasing marginal cost as generator output increases. Active power output refers to the active power output of the ng-th generator (unit: MW), and is the core variable affecting the total generation cost. The core meaning of the objective function of the final optimal power flow optimization model is to minimize the total generation cost of the system by adjusting the active power output of each generator, under the premise of satisfying all constraints such as power balance, generator output, node voltage, branch power flow, and transient stability. This objective function adopts a quadratic function form, which can accurately fit the actual cost characteristics of generators (marginal cost increases with output).
[0038] S5. With the goal of minimizing total power generation cost, under the constraints of power balance, generator output, node voltage, branch power flow, and transient stability algebra, the final optimal power flow optimization model is solved to obtain the unit output scheduling results. Specifically, the unit output scheduling result refers to the active and reactive power output adjustment scheme of each generator obtained by solving the final optimization model, which is the core basis for guiding the optimized operation of the power grid.
[0039] In a preferred embodiment of the present invention, a solver that supports mixed integer programming is used to solve the final optimal power flow optimization model and output the optimal output value of the generator.
[0040] S6. Optimize the power grid to be optimized based on the unit output scheduling results.
[0041] Specifically, based on the unit output scheduling results, the dispatch center adjusts the output status of each generator through remote control or by issuing commands to ensure the power grid operates in an optimal state. This transforms the theoretical results of the optimization model into the actual operational behavior of the power grid, completing the closed loop of modeling, solving, and execution.
[0042] Indicatively, it also includes: After optimizing the power grid to be optimized based on the unit output scheduling results, based on the optimized unit output, several historical fault data are selected for time-domain simulation to obtain the target maximum relative power angle difference. The optimization is deemed effective if the target's maximum relative power angle difference is compared with a preset judgment threshold. If the maximum relative work angle difference of the target is greater than or equal to the preset judgment threshold, the optimization is deemed invalid and the optimal power flow optimization model is retrained.
[0043] Specifically, the target maximum relative power angle difference refers to the actual maximum relative power angle difference of the system after a fault, obtained through time-domain simulation based on the optimized unit output scheduling results. It is a core indicator for verifying the transient stability of the optimization results. The preset judgment threshold refers to the critical value used to determine whether the optimization results are effective. It is usually set to 90% of the transient stability threshold. For example, if the transient stability threshold is 150°, the judgment threshold is 135° to ensure that the optimization results have a certain stability margin. Retraining the optimal power flow optimization model means that when the optimization results are invalidated, the process returns to the training steps of the transient stability constraint transformation model, supplements samples or adjusts model parameters for retraining, and then rebuilds and solves the optimal power flow optimization model based on the new model.
[0044] In a preferred embodiment of the present invention, such as Figure 2As shown, the offline phase represents the construction and training of the knowledge model. The power grid model and the set of anticipated accidents correspond to the acquisition of historical topology data and historical fault data, used to define the physical structure of the power grid to be optimized (including generator, line, and load parameters) and typical fault scenarios, providing a foundation for subsequent sample generation. Large-scale time-domain simulation and data processing correspond to time-domain simulation and extraction of dynamic variable trajectories. Based on the power grid model and the set of anticipated accidents, time-domain simulations are performed on diverse historical operating modes to solve differential algebraic equations (DAEs), extracting the dynamic variable trajectories after faults, and calculating the maximum relative power angle difference as a label. Machine learning model training and validation correspond to generating training sample pairs and training the model. Using historical control variable vectors (such as generator active power output) as input and the maximum relative power angle difference as a label, a deep neural network (DNN) is trained. Hyperparameters are adjusted through a validation set until the loss function converges. The trained high-precision model corresponds to the transient stability constraint transformation model, which is the core output of the offline phase. It solidifies transient stability knowledge (power angle-control variable mapping relationship) into a reusable machine learning model, providing knowledge transfer for the online phase. Real-time power grid data acquired during the online phase corresponds to the acquisition of power grid operation data and topology data of the power grid to be optimized, including real-time generator output, bus voltage, line power flow, and power grid topology, serving as the input foundation for online optimization. Stability limits correspond to preset transient stability thresholds, determined by power grid safety regulations, and are the core judgment indicators for transient stability constraints. Constructing a unified TSCOPF model involves embedding transient stability algebraic constraints into the initial optimal power flow model. Combined with a high-precision model trained offline, the transient stability constraints are transformed into algebraic constraints in the form of mixed-integer linear programming (MILP), which are then integrated with the steady-state constraints of the initial optimal power flow model to form a Transient Stability Constrained Optimal Power Flow (TSCOPF) model. Integrated solution involves calling a solver to solve the final model. Solvers supporting mixed-integer programming, such as Gurobi and CPLEX, are used to solve the integrated TSCOPF model in one go, avoiding the dimensionality problem caused by the discretization of DAEs in traditional methods. The optimal stable dispatch scheme corresponds to the unit output dispatch results and grid optimization. It is the output of the online phase, including a unit output allocation scheme that balances minimizing total generation cost with achieving transient stability. This scheme can be directly used for real-time grid dispatch, but its effectiveness needs to be verified through time-domain simulation. By using deep learning of the relationship between transient stability and control variables in the offline phase, the online phase no longer needs to handle complex DAE discretization. Efficient optimization is achieved directly through algebraic constraint embedding, fundamentally solving the pain points of variable explosion and computationally intensive computation caused by discretized DAEs in traditional TSCOPF. It balances optimization accuracy and timeliness, providing technical support for the safe and economical operation of the power system.
[0045] By implementing this embodiment, transient stability algebraic constraints are generated through a pre-set transient stability constraint transformation model. This model has been trained offline, solidifying the mapping relationship between historical operating data, historical topology data, and the maximum relative power angle difference. In online applications, only the operating data and topology data of the power grid to be optimized need to be input, and the algebraic form of transient stability constraints can be directly output without any direct processing or time-domain discretization of DAEs, fundamentally cutting off the technical link of complexity introduced by discretization. The generated transient stability algebraic constraints are built only around generator output, without introducing any additional time-step related variables and equations. The number of optimization variables and constraints only increases slightly on the basis of the initial optimal power flow optimization model, completely avoiding the multi-dimensional difficulty of traditional methods and significantly reducing the difficulty of model solution. Since there is no need to solve thousands of algebraic equations after discretization, the solution efficiency of the final optimal power flow optimization model is significantly improved, which can adapt to the timeliness requirements of online power system dispatching and solves the key problem that traditional discretization methods are difficult to apply to real-time control of actual power grids due to excessive computation time.
[0046] See Figure 3 This is a schematic diagram of the structure of an optimal power flow control device for a power system based on transient stability constraints, provided in an embodiment of the present invention, comprising: The power grid data acquisition module is used to acquire the operating cost, power grid operation data, and topology data of the power grid to be optimized. The initial model building module is used to build an initial optimal power flow optimization model based on the operating cost, the power grid operation data, and the topology data. The initial optimal power flow optimization model includes power balance constraints, generator output constraints, node voltage constraints, and branch power flow constraints. The transient stability constraint conversion module is used to input the power grid operation data and the topology data into a preset transient stability constraint conversion model, perform constraint conversion based on a preset transient stability threshold, and generate transient stability algebraic constraints; wherein, the transient stability constraint conversion model is trained with historical operation data and historical topology data as input and the maximum relative power angle difference as a label; The final model building module is used to embed the transient stability algebraic constraints into the initial optimal power flow control model to build the final optimal power flow optimization model. The optimization model solving module is used to solve the final optimal power flow optimization model with the goal of minimizing the total power generation cost, under the constraints of power balance, generator output, node voltage, branch power flow, and transient stability algebra, to obtain the unit output scheduling results. The power grid optimization module is used to optimize the power grid to be optimized based on the unit output scheduling results.
[0047] This invention provides a power system optimal power flow control device based on transient stability constraints. In the power grid data acquisition module, the operating cost, power grid operation data, and topology data of the power grid to be optimized are acquired. In the initial model construction module, an initial optimal power flow optimization model is constructed based on the operating cost, the power grid operation data, and the topology data. The initial optimal power flow optimization model corresponds to power balance constraints, generator output constraints, node voltage constraints, and branch power flow constraints. Through the transient stability constraint conversion module, the power grid operation data and the topology data are input into a preset transient stability constraint conversion model, and constraint conversion is performed based on a preset transient stability threshold to generate a transient... The system employs a stable algebraic constraint model. The transient stability constraint transformation model is trained using historical operating data and historical topology data as input, with the maximum relative power angle difference as the label. The transient stability algebraic constraint is embedded into the initial optimal power flow control model through the final model construction module to construct the final optimal power flow optimization model. Then, in the optimization model solution module, with the objective of minimizing total generation cost, the final optimal power flow optimization model is solved under the constraints of power balance, generator output, node voltage, branch power flow, and transient stability algebraic constraint to obtain the unit output scheduling results. Finally, in the grid optimization module, the grid to be optimized is optimized based on the unit output scheduling results.
[0048] Transient stability algebraic constraints are generated through a pre-defined transient stability constraint transformation model. This model has been trained offline, solidifying the mapping relationship between historical operating data, historical topology data, and the maximum relative power angle difference. In online applications, only the operating data and topology data of the power grid to be optimized need to be input, and the algebraic form of transient stability constraints can be directly output without any direct processing or time-domain discretization of DAEs, fundamentally cutting off the technical link that introduces complexity through discretization. The generated transient stability algebraic constraints are constructed solely around generator output, without introducing any additional time-step related variables and equations. The number of optimization variables and constraints increases only slightly from the initial optimal power flow optimization model, completely avoiding the multi-dimensional difficulties of traditional methods and significantly reducing the difficulty of model solving. Since there is no need to solve thousands of algebraic equations after discretization, the efficiency of solving the final optimal power flow optimization model is significantly improved, adapting to the timeliness requirements of online power system dispatch. This solves the key problem that traditional discretization methods are difficult to apply to real-time control of actual power grids due to excessive computation time.
[0049] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0050] Those skilled in the art will understand that, for convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0051] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a power system optimal power flow control method based on transient stability constraints as described in the above embodiments. The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0052] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0053] The memory can be used to store the computer program. The processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device or other volatile solid-state storage device.
[0054] Another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the optimal power flow control method for a power system based on transient stability constraints described in the above embodiment.
[0055] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0056] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A power system optimal power flow control method based on transient stability constraints, characterized in that, include: Obtain the operating cost, grid operation data, and topology data of the power grid to be optimized; Based on the operating cost, the power grid operation data, and the topology data, an initial optimal power flow optimization model is constructed, which includes power balance constraints, generator output constraints, node voltage constraints, and branch power flow constraints. The power grid operation data and the topology data are input into a preset transient stability constraint transformation model. Constraint transformation is performed based on a preset transient stability threshold to generate transient stability algebraic constraints. The transient stability constraint transformation model is trained using historical operation data and historical topology data as input and the maximum relative power angle difference as a label. The transient stability algebraic constraints are embedded into the initial optimal power flow control model to construct the final optimal power flow optimization model. With the goal of minimizing total power generation cost, the final optimal power flow optimization model is solved under the constraints of power balance, generator output, node voltage, branch power flow, and transient stability algebra to obtain the unit output scheduling results. The power grid to be optimized is then optimized based on the unit output scheduling results.
2. The optimal power flow control method for power systems based on transient stability constraints as described in claim 1, characterized in that, The training of the transient stability constraint transformation model includes: Acquire historical operational data, historical topology data, and historical fault data; Historical control variable vectors are extracted based on historical operating data. Random sampling is performed based on historical topology data and historical control variable vectors to generate several historical operating modes. The historical control variable vectors include historical generator output. For each historical operating mode, time-domain simulation is performed based on historical fault data to generate a system of differential-algebraic equations. Based on the system of differential-algebraic equations, the dynamic variable trajectory within a preset time after the fault is extracted. The maximum relative work angle difference is calculated from the dynamic variable trajectory. Using the historical control variable vector as input features and the maximum relative work angle difference as a label, training sample pairs are generated. The transient stable constraint transformation model to be trained is trained based on the training sample pairs until the preset loss function converges, and the trained transient stable constraint transformation model is obtained.
3. The optimal power flow control method for power systems based on transient stability constraints as described in claim 2, characterized in that, The power grid operation data and the topology data are input into a preset transient stability constraint transformation model. Constraint transformation is performed based on a preset transient stability threshold to generate transient stability algebraic constraints, including: The power grid operation data and the topology data are input into a preset transient stability constraint transformation model to obtain the feasible region of generator active power output and the upper and lower bounds of the activation function of each layer of neurons. Based on the feasible region of generator active power output and the upper and lower bounds of the activation function of each layer of neurons, a linear transformation is performed based on the preset binary variables of neuron activation to obtain mixed integer linear programming constraints. The prediction of the maximum relative work angle difference is obtained by using mixed integer linear programming constraints. The constraint transformation is performed based on the predicted value of the maximum relative work angle difference and the preset transient stability threshold to form the transient stability constraint algebraic constraint.
4. The optimal power flow control method for power systems based on transient stability constraints as described in claim 3, characterized in that, The transient stability algebraic constraint is: in, This is the predicted value for the maximum relative angle difference; This represents the form of the transient stability constraint transformation model; For control vectors; The network parameters of the trained transient stable constraint transformation model, including the weights of each layer. With bias ; This is the transient stability threshold.
5. The optimal power flow control method for a power system based on transient stability constraints as described in claim 4, characterized in that, The power balance constraint is: in, and busbars Active power generation injection and reactive power generation injection; busbars Active and reactive loads; busbar The voltage amplitude; For the set of busbars; Index of the parent line set; These are the real and imaginary elements of the nodal admittance matrix, respectively. Phase angle; The generator output constraint is: in, The units The lower and upper limits of the effective output; The units The lower and upper limits of reactive power output; To connect to the bus A collection of generators; For unit indexing; and The units The effective and ineffective contributions; The node voltage constraint is: in, busbars Lower and upper limits of voltage amplitude; The branch power flow constraint is: in, Branch roads The lower and upper limits of the active current flow; branch road The meritorious trend; For branch set; For load sets; interruptible load Baseline active load; This represents the interruptible quantity corresponding to the active load.
6. The optimal power flow control method for a power system based on transient stability constraints as described in claim 5, characterized in that, The final optimal power flow optimization model is as follows: in, Total power generation cost; Let be the fixed cost coefficient of the ngth generator; The linear increase in cost for every 1MW increase in unit output; This increases the marginal cost of the unit.
7. The optimal power flow control method for a power system based on transient stability constraints as described in claim 6, characterized in that, Also includes: After optimizing the power grid to be optimized based on the unit output scheduling results, based on the optimized unit output, several historical fault data are selected for time-domain simulation to obtain the target maximum relative power angle difference. The optimization is deemed effective if the target's maximum relative power angle difference is compared with a preset judgment threshold. If the maximum relative work angle difference of the target is greater than or equal to the preset judgment threshold, the optimization is deemed invalid and the optimal power flow optimization model is retrained.
8. A power system optimal power flow control device based on transient stability constraints, characterized in that, include: The power grid data acquisition module is used to acquire the operating cost, power grid operation data, and topology data of the power grid to be optimized. The initial model building module is used to build an initial optimal power flow optimization model based on the operating cost, the power grid operation data, and the topology data. The initial optimal power flow optimization model includes power balance constraints, generator output constraints, node voltage constraints, and branch power flow constraints. The transient stability constraint conversion module is used to input the power grid operation data and the topology data into a preset transient stability constraint conversion model, perform constraint conversion based on a preset transient stability threshold, and generate transient stability algebraic constraints; wherein, the transient stability constraint conversion model is trained with historical operation data and historical topology data as input and the maximum relative power angle difference as a label; The final model building module is used to embed the transient stability algebraic constraints into the initial optimal power flow control model to build the final optimal power flow optimization model. The optimization model solving module is used to solve the final optimal power flow optimization model with the goal of minimizing the total power generation cost, under the constraints of power balance, generator output, node voltage, branch power flow, and transient stability algebra, to obtain the unit output scheduling results. The power grid optimization module is used to optimize the power grid to be optimized based on the unit output scheduling results.
9. A terminal device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a power system optimal power flow control method based on transient stability constraints as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform a power system optimal power flow control method based on transient stability constraints as described in any one of claims 1 to 7.