A power dispatch fine tuning method adaptive to topology change
By constructing a parallel structure of surrogate and auxiliary solvers and utilizing graph neural networks and low-rank decomposition techniques, rapid adaptation under power grid topology changes is achieved, solving the problem of performance degradation of deep learning models under topology changes and improving the real-time response capability and computational efficiency of the power grid.
Patent Information
- Application Number
- CN202511397335.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-09-28
AI Technical Summary
Existing deep learning models suffer from performance degradation or failure when the power grid topology changes. Traditional methods consume high computational resources and are difficult to meet the requirements for rapid response. Existing methods fail to effectively adapt to topology changes and have low computational efficiency.
A parallel structure of surrogate solver and auxiliary solver is constructed. The power grid topology is learned through graph neural network, and the parameters are updated using low-rank decomposition and singular value accelerator. Only the auxiliary solver is fine-tuned to adapt to topology changes, avoiding full model retraining.
It enables rapid adaptation to changes in power grid topology, significantly reduces computational overhead, enhances power grid resilience and real-time response capabilities, and supports expansion to various network scales.
Smart Images

Figure CN120879619B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of power system dispatching, and particularly relates to a power dispatching fine-tuning method suitable for topology changes. BACKGROUND
[0002] As an indispensable infrastructure in modern society, the safe, stable and efficient operation of the power system is of great importance. Power dispatching is the core link of power system operation, aiming to set the decision variables such as generator output to meet the power load demand, optimize the operation economy and ensure that the system meets various safety constraints. Optimal power flow calculation is a key optimization tool to support power dispatching decisions.
[0003] With the large-scale access of renewable energy to the power grid and the development of smart grid technology, the operation environment of the power grid is becoming increasingly complex and dynamic. The actual topology of the power grid changes frequently, which may be due to planned operations or unplanned faults. When the topology of the power grid changes, the network structure, power flow distribution and even the constraints of safe operation of the system will change accordingly.
[0004] Traditional optimization methods (such as interior point method, mixed integer programming) usually have low computational efficiency and long time consumption when solving large-scale, strongly constrained, nonlinear problems such as optimal power flow calculation, which is difficult to meet the real-time requirements of online rapid adjustment of dispatching. In recent years, the use of deep learning methods to build data-driven surrogate solvers has shown great potential. After training under a fixed topology, it can solve the optimal power flow calculation problem at an extremely fast speed, approaching the accuracy of traditional optimizers.
[0005] However, existing deep learning-based surrogate models are mainly trained for specific and fixed network topologies. When the topology of the power grid changes, the performance of the model will decrease significantly or even fail. If a large amount of data is collected for each possible topology change and a new model is trained, the high computational resource consumption and data preparation time cost are unbearable for online applications in power systems. A more efficient solution is to fine-tune the original model, but the fine-tuning of traditional deep learning models usually requires a large number of samples under the new topology and high computational overhead, which contradicts the demand for rapid response to topology changes, limiting the practical application of data-driven methods in dynamic power grid dispatching.
[0006] Therefore, it is urgent to develop a power dispatching method that can efficiently adapt to the change of power grid topology. This method should be able to quickly and low resource consumption complete model updating only using a small amount of running data under the new topology after the initial training is completed, so that the dispatching decision model can quickly and accurately adapt to the change of network structure, support the intelligent power grid control system to realize real-time or quasi-real-time dynamic response capability, improve the resilience and operation efficiency of the power grid, and have good scalability to cope with different sizes of power networks.
[0007] Patent document CN115021269A proposes a "two-stage" optimal power flow solution based on correlation analysis + K-means modular preprocessing combined with DNN prediction: first, clustering matching dimension reduction is used to reduce the learning burden, and then DNN prediction is used to replace and correct the infeasible results through power flow reconstruction and historical similar samples to speed up OPF / probability OPF calculation. The disadvantages of this method are: the topology is not explicitly represented by graph neural networks, and there is no fast adaptation to line addition / deletion / reconstruction; only sample retrieval correction is performed, and there is a lack of small sample low-rank fine-tuning mechanism for topology changes; there is no main model + auxiliary low-rank parallel collaborative structure, and the parameter update granularity is coarse, making it difficult to achieve efficient migration and expansion in multi-topology real-time scenarios.
[0008] Patent document CN116629110A establishes the input-output fixed and gradient relationship and constructs a multi-item composite loss to train the neural network, and discriminates adaptability by reconstructing error of hidden features, and when it is not adapted, it falls back to numerical algorithm and incrementally writes back samples to improve generalization and reliability under new energy output variation. The disadvantages of this method are: focusing on input distribution drift, not modeling topology structure changes; not using graph structure encoding and local affected subgraph fast updating; relying on additional sample retraining for adaptation, lacking low-rank / small-parameter fast fine-tuning; lacking main and auxiliary parallel collaborative and real-time lightweight updating mechanism, making it difficult to meet the rapid dispatching needs of frequent topology and limited computing power scenarios. SUMMARY
[0009] To solve the problems of the prior art, realize efficient adaptive decision of power system operation under power grid topology change, improve the robustness and real-time response capability of the power grid, and reduce the consumption of computing resources and the risk of catastrophic forgetting, the technical solution adopted by the present application is as follows:
[0010] A power dispatching fine-tuning method for adapting to topology changes, comprising the following steps:
[0011] An agent solver is constructed, and the agent solver is trained on the original power dispatching model without topology transformation. The data-driven method is used to learn the objective function and constraint conditions of the problem, and an initial data-driven model of power dispatching is obtained. A large amount of historical data is used in the training process on the original topology, and the data-driven method is used to ensure that the agent solver is efficient and robust in the original scenario.
[0012] An auxiliary solver consistent with the initial model is constructed, and a low-rank decomposition is performed on the parameter matrix of the auxiliary solver. The initial model and the low-rank decomposed auxiliary solver are coupled in parallel using a residual coupling strategy to obtain a complete power dispatch model. The fine-tuning process only updates the parameters of the auxiliary solver, and the parameters of the proxy solver are frozen to prevent the loss of prior knowledge, while focusing on specific constraint conditions under the new topology, avoiding retraining of the full model, and only fine-tuning the auxiliary solver;
[0013] The power grid topology is monitored, and the auxiliary solver is activated when the topology changes. The auxiliary solver and the proxy solver are connected in parallel to output, and a small number of specific samples after the topology change are used for efficient fine-tuning to obtain an updated power dispatch model. The updated power dispatch model is used to generate a power dispatch strategy under the new topology, supporting the efficient adaptation of the power system to the changes in the power grid topology.
[0014] The updated power dispatch model is used to generate a solution to the optimal power flow calculation problem in the power dispatch under the new topology, thereby supporting the rapid adaptation of the power system to topology changes, and simultaneously supporting DC and AC power flow calculations.
[0015] Further, the proxy solver uses a graph neural network architecture to model the power grid as a graph structure, where nodes represent buses and edges represent transmission lines. The input includes load demand, generator capacity, and constraint conditions, and the output is the active power output, reactive power output, voltage amplitude, and phase angle decision variables of the generator. The objective is to minimize the generation cost, and through optimal power flow calculation, the nodes, edges, and network topology of the graph structure required for optimal power dispatch are obtained within the feasible region of physical constraints and operating limits.
[0016] Further, for AC optimal power flow calculation, based on the binary adjacency matrix, voltage amplitude vector, conductance matrix, susceptance matrix, and voltage phase angle difference matrix of the network topology, active power flow and reactive power flow are calculated through nonlinear equations, and power balance constraints for active power flow and reactive power flow are determined based on the active power and reactive power of the generator and the active power demand and reactive power demand of the load. The upper and lower limits of the generator active power, reactive power, and voltage amplitude vector are constrained, the apparent power upper limit is constrained based on the binary adjacency matrix and apparent power, and the voltage phase angle difference matrix is constrained based on the binary adjacency matrix and the phase difference between voltage and current.
[0017] Further, for DC optimal power flow calculation, based on the binary adjacency matrix, susceptance matrix, and voltage phase angle difference matrix of the network topology, active power flow is calculated, active power is constrained by upper and lower limits, and the voltage phase angle difference matrix is constrained based on the binary adjacency matrix and the phase difference between voltage and current.
[0018] Further, the agent solver learns the mapping relationship between the input features and the optimal power flow calculation solution vector through a graph neural network, and the agent solver explicitly incorporates the topology information through encoding, aggregation and updating steps to improve the generalization ability for unknown configurations, wherein the state vectors of two adjacent nodes are spliced and then encoded through a trainable network, the neighborhood information is aggregated based on the edge connection and the encoding result, the node state vector is spliced with the aggregation result and then updated through another trainable network, and a large amount of historical data under the original scheduling model is used for pre-training to ensure efficiency and robustness.
[0019] Further, for alternating current power flow, the solution vector includes optimal active power of the generator, optimal active power of the optimal load, optimal voltage amplitude vector and optimal node phase angle vector.
[0020] Further, for direct current power flow, the solution vector is the optimal active power of the generator.
[0021] Further, the singular value accelerator is used as a matrix decomposition accelerator to accelerate the weight matrix parameter update of the auxiliary solver, and a small number of parameters are adjusted.
[0022] The singular value accelerator decomposes the initial weight matrix into a left singular vector matrix and a right singular vector matrix through singular values, multiplies the difference between the singular value diagonal matrix of the auxiliary weight matrix and the singular value diagonal matrix of the initial weight matrix by the transpose of the left singular vector matrix and the right singular vector matrix to obtain the auxiliary weight matrix, wherein only the smallest group of singular values is trained to capture the topology change; by initializing the singular value diagonal matrix of the auxiliary weight matrix as the singular value diagonal matrix of the initial weight matrix, zero initial contribution is ensured, thereby avoiding interference with the performance of the initial model.
[0023] Further, the low-rank accelerator is used as a matrix decomposition accelerator to accelerate the weight matrix parameter update of the auxiliary solver, and a small number of parameters are adjusted.
[0024] The low-rank accelerator decomposes the weight matrix into a left matrix and a right matrix through low-rank decomposition, wherein only the rank of the smallest group of matrices is trained; by initializing the left matrix and the right matrix to zero, zero correction attribute is ensured, thereby avoiding interference with the performance of the initial model.
[0025] Further, the degree of change of the power grid topology is quantified to trigger the activation of the auxiliary solver, a small sample adaptive data set containing power grid input and output is used, the power grid predicted output is obtained based on the power grid input and the auxiliary solver parameters of the data set, a loss function is constructed by the power grid predicted output and the power grid output of the data set, and the auxiliary solver parameters are updated.
[0026] The advantages and beneficial effects of the present application are as follows:
[0027] The present application realizes fast self-adaptation by using only a small amount of sample data under power grid topology changes, significantly reduces the calculation overhead and training time, retains basic knowledge through low-rank updating, avoids performance degradation, is suitable for real-time power grid control, improves the resilience and efficiency of the power grid system, and has good scalability, supporting various network scales from small test systems to large real power grids. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1 is a flowchart of the method in an embodiment of the present application.
[0029] Figure 2 is a schematic diagram of the parallel structure of the proxy solver and the auxiliary solver in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application.
[0031] As shown in Figure 1 , a power dispatch fine-tuning method suitable for topology changes is provided, which realizes adaptation to topology changes through a small-sample self-adaptation method of optimal power flow calculation, and specifically includes the following steps:
[0032] Step S110: Construct a proxy solver, pre-train on the original power dispatch model, learn the objective function and constraint conditions of the dispatch problem using a data-driven method, and obtain an initial model.
[0033] In one embodiment, the proxy solver adopts a graph neural network architecture, models the power grid as a graph structure , where the node set includes generator bus and load bus , and the edge set represents the transmission line. The network topology is described by a binary adjacency matrix , where is the number of nodes, indicates that the edge is connected, otherwise 0. We take the optimal power flow calculation problem as an example, which is expressed as:
[0034]
[0035]
[0036] where, is the objective function (such as minimizing the generation cost), is the feasible region of physical constraints and operating limits.
[0037] For AC optimal power flow calculation, the active power flow and the reactive power flow are governed by the nonlinear equations:
[0038]
[0039]
[0040] where, and are the conductance and susceptance matrices, respectively, is the voltage magnitude vector, is the voltage phase angle difference matrix, , is the node phase angle vector, is the all-ones vector, denotes element-wise multiplication, denotes a diagonal matrix with as the diagonal elements. The power balance constraints are based on Kirchhoff's current law:
[0041]
[0042]
[0043] where, , , , are the active and reactive power of the generators and the active and reactive demand of the loads in the system, respectively. The constraints in the system operation include:
[0044]
[0045]
[0046]
[0047]
[0048]
[0049] where, , , , , denote the active power, the reactive power, the voltage, the apparent power of the generators, and the phase difference between the voltage and the current in the system, respectively; the formula for the apparent power is , which denotes the integrated quantity of the active power and the reactive power; , 、 、 、 、 、 、 are the upper and lower limits of each variable, respectively, used to constrain the parameter range of the generator operation, ensuring safe and stable operation of the system; is the topology matrix of the power grid, used to describe the connection state of the lines in the power system, reflecting the on-off relationship of the lines between nodes.
[0050] Further, for DC optimal power flow, the linear model can be simplified as:
[0051]
[0052] where only active power and phase angle constraints are retained.
[0053] Agent solver Learn the mapping from input features to optimal power flow calculation solution vectors through graph neural networks:
[0054]
[0055] In the calculation of the layer to the layer, there are three steps of encoding, aggregation and updating. The specific description is as follows:
[0056] Encoding: for node and its neighbors ,
[0057]
[0058] where is a trainable network, denotes concatenation, is the node state vector, is the dimension of the vector.
[0059] Aggregation: neighborhood information aggregation:
[0060]
[0061] where is a permutation invariant operator, denotes the elements in the power grid topology matrix , used to describe the connectivity state of the transmission lines between nodes, where is a binary variable, indicating that node and node Whether connected through transmission lines or not, reflects the topology of the power grid.
[0062] Update:
[0063]
[0064] where, is another trainable network. Pre-training uses a large amount of historical data under the original scheduling model scenario, ensuring efficiency and robustness.
[0065] Step S120: Build an auxiliary solver with the same architecture as the agent solver and keep it inactive during pre-training. As shown in Figure 2 , the agent solver and the auxiliary solver are connected in parallel and output simultaneously to obtain the complete power scheduling model.
[0066] Auxiliary solver The initial parameters are zero, the same as the update block of the agent solver. The residual coupling strategy is adopted:
[0067]
[0068] where, partially frozen, is the learnable part.
[0069] Step S130: Parameterize the weight matrix of the auxiliary solver through the matrix decomposition accelerator, and only adjust a small number of parameters.
[0070] In one embodiment, the auxiliary weight matrix is decomposed by the singular value accelerator or the low rank accelerator.
[0071] First, the singular value accelerator:
[0072]
[0073] where, and are the left singular vector matrix and the right singular vector matrix of the initial weight matrix , obtained by singular value decomposition; is the singular value diagonal matrix of the initial weight matrix, which stores all singular values; is the singular value diagonal matrix of the auxiliary weight matrix, only the smallest singular values ( ) are trained, where . By initializing to , ensure zero initial contribution, so as to avoid interference with the initial model performance.
[0074] Then, the low rank accelerator:
[0075]
[0076] wherein, and are the left and right matrices in the low-rank decomposition of the auxiliary weight matrix, with dimensions and , wherein . By initializing and to zero, the zero correction property is ensured, thus avoiding interference with the initial model performance.
[0077] Step S140: Monitor the power grid topology and activate the auxiliary solver when the topology changes, using a small number of specific samples after the topology changes for efficient fine-tuning.
[0078] wherein the degree of topology change is quantified by , if ( is a small preset threshold), the auxiliary solver is activated. Fine-tuning is performed using a small sample adaptive dataset :
[0079]
[0080] wherein, denotes the power grid topology matrix after the topology change; denotes the zero norm of the matrix, used to measure the degree of topology change; denotes the input feature of the th sample, such as the state information of the power grid node; denotes the true output value of the th sample; denotes the number of samples contained in the adaptive dataset ; denotes the loss function, used to measure the error between the predicted value and the true value; denotes the predicted output of the th sample; denotes the fine-tuned model, used to generate the predicted output according to the input feature ; denotes the parameters of the frozen main solver; denotes the trainable parameters of the auxiliary solver.
[0081] Step S150: Generate the power dispatch problem solution under the new topology through the updated adaptive model, supporting the rapid adaptation of the power system to topology changes.
[0082] In one embodiment, the method of the present application can be embedded in a smart grid scheduling platform, verified by typical network topology disturbance and multi-scenario load, new energy fluctuation test, and comprehensive use of prediction error, adaptive convergence time and parameter update scale and other indicators to evaluate performance, and reflect its fast, accurate and efficient application value of parameters.
[0083] The above examples are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for fine tuning of power dispatch to adapt to topology changes, characterized by The method comprises the following steps: An agent solver is constructed, the agent solver is trained on a power dispatch model without topology transformation to obtain an initial power dispatch model; An auxiliary solver consistent with the initial model is constructed, the initial model and the auxiliary solver are coupled in parallel using a residual error coupling strategy to obtain a complete power dispatch model, and only the parameters of the auxiliary solver are updated in the fine-tuning process, and the parameters of the agent solver are frozen; The power grid topology is monitored, and the auxiliary solver is activated when the topology changes, the auxiliary solver and the agent solver are output in parallel, a small amount of specific samples after the topology changes are used for fine-tuning to obtain an updated power dispatch model; The updated power dispatch model is used to generate a power dispatch solution under a new topology.
2. The method of claim 1, wherein: The agent solver adopts a graph neural network architecture, models the power grid as a graph structure, wherein nodes represent busbars and edges represent transmission lines; the input includes load demand, generator capacity and constraint conditions, and the output is active power output, reactive power output, voltage amplitude and phase angle decision variables of the generator; the minimum generation cost is taken as the target, the optimal power flow calculation is performed, the nodes, edges and network topology of the graph structure required for optimal power dispatch are obtained within the feasible range of physical constraints and operating limits.
3. The method of claim 2, wherein: For alternating current optimal power flow calculation, based on the binary adjacency matrix, voltage amplitude vector, conductance matrix, susceptance matrix and voltage phase angle difference matrix of the network topology, the active power flow and the reactive power flow are calculated through nonlinear equations, and the power balance constraints of the active power flow and the reactive power flow are determined according to the active power and the reactive power of the generator and the active power demand and the reactive power demand of the load; the upper and lower limits of the active power, the reactive power and the voltage amplitude vector of the generator are constrained, the apparent power is constrained based on the binary adjacency matrix and the apparent power upper limit, and the voltage phase angle difference matrix is constrained based on the binary adjacency matrix and the phase difference between the voltage and the current.
4. The method of claim 2, wherein: For direct current optimal power flow calculation, based on the binary adjacency matrix, susceptance matrix and voltage phase angle difference matrix of the network topology, the active power flow is calculated, the active power is constrained by the upper and lower limits, and the voltage phase angle difference matrix is constrained based on the binary adjacency matrix and the phase difference between the voltage and the current.
5. The method of claim 2, wherein: The agent solver learns the mapping relationship between the input features and the optimal power flow calculation solution vector through the graph neural network, and the agent solver explicitly incorporates the topology information through the encoding, aggregation and updating steps, wherein the state vectors of two adjacent nodes are spliced and encoded through a trainable network, the neighborhood information is aggregated based on the edge connection and the encoding result, the state vector of the node is spliced with the aggregation result, and the state vector of the node is updated through another trainable network.
6. The method of claim 5, wherein: For alternating current flow, the solution vector includes the optimal active power of the generator, the optimal active power of the load, the optimal voltage amplitude vector and the optimal node phase angle vector.
7. The method of claim 5, wherein: For direct current flow, the solution vector is the optimal active power of the generator.
8. The method of claim 1, wherein: The singular value accelerator is used as a matrix decomposition accelerator to accelerate the weight matrix parameter update of the auxiliary solver, and a small amount of parameters are adjusted. The singular value accelerator decomposes the initial weight matrix into a left singular vector matrix and a right singular vector matrix by singular values, multiplies the difference between the singular value diagonal matrix of the auxiliary weight matrix and the singular value diagonal matrix of the initial weight matrix by the transpose of the left singular vector matrix and the right singular vector matrix to obtain the auxiliary weight matrix, wherein only the minimum set of singular values is trained to capture the topology change.
9. The method of claim 1, wherein: The low-rank accelerator is used as a matrix decomposition accelerator to accelerate the weight matrix parameter update of the auxiliary solver, and a small number of parameters are adjusted. The low-rank accelerator decomposes the weight matrix into a left matrix and a right matrix by low-rank decomposition, wherein only the rank of the minimum set of matrices is trained.
10. The method of claim 1, wherein: The degree of change in the power grid topology is quantified to trigger the activation of the auxiliary solver, a small sample adaptive dataset containing power grid inputs and outputs is used, the power grid prediction output is obtained based on the power grid inputs and the auxiliary solver parameters of the dataset, a loss function is constructed by the power grid prediction output and the power grid output of the dataset, and the auxiliary solver parameters are updated.
Citation Information
Patent Citations
Two-stage optimal power flow solving method based on data driving
CN115021269A
Optimal power flow credible data driving solving method with strong generalization capability
CN116629110A
Data-driven optimal power flow calculation method considering topological feature learning
CN116316629A
Online prediction method and device for node voltage of time-varying topology DC power distribution network
CN120184896A