Alternating current optimal power flow solving method based on neural network and augmented Lagrange

Through the AC optimal current solution method based on neural network and augmented Lagrangian method, the high-dimensional, nonlinear and non-convex problems of ACOPF are solved, and more efficient and accurate grid scheduling is achieved, and the physical constraints of the model are enhanced. Adaptability and robustness.

CN119093377AActive Publication Date: 2024-12-06SICHUAN UNIV +2

Patent Information

Application Number
CN202411169068.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-06
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

The existing technology has high-dimensional, nonlinear and non-convex problems in solving AC Optimal Current (ACOPF), which leads to insufficient accuracy and efficiency of traditional methods, especially when the grid is loaded heavily, DC Optimal Current (DCOPF) Inaccurate, second-order cone method leads to inaccurate decision making, and deep neural network (DNN) models have limitations in physical constraint adaptability and robustness.

Method used

Using the communication optimal current solution method based on neural network and augmented Lagrangian method, the inequality constraints are converted into equation constraints through relaxed variables and dual variables, and the augmented Lagrangian function is constructed and embedded in the neural network. During the training process, the neural network is trained using the minimization loss function to achieve rapid solution of ACOPF.

Benefits of technology

The resolution accuracy and efficiency of the best AC trend is improved, the physical constraint adaptability and robustness of the model are enhanced, and the reliability and accuracy of grid scheduling are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119093377A_ABST
    Figure CN119093377A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power grid optimal power flow, and particularly discloses an alternating current optimal power flow solving method based on a neural network and augmented Lagrangian, comprising the following steps: S1, establishing an alternating current optimal power flow model; s2, based on an augmented Lagrange method ALM, converting inequality constraints of the AC optimal power flow model into equality constraints through slack variables and dual variables, and constructing an augmented Lagrange function; s3, parametric modeling is conducted on the ACOPF problem through a neural network, and mapping from an input condition to an ACOPF solution is achieved; s4, taking the augmented Lagrangian function as a loss function, embedding the augmented Lagrangian function into the training process of the neural network, and training the neural network by minimizing the loss function; and S5, realizing rapid solving of the ACOPF problem by using the trained neural network. The method has the advantages that the alternating-current optimal power flow Lagrangian function is used as a loss function to drive neural network training, and finally alternating-current optimal power flow rapid calculation is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of power grid optimal power flow, in particular to an AC optimal power flow solving method based on a neural network and augmented Lagrangian. Background Art

[0002] Due to various emerging events (e.g., high penetration of renewable energy, changing topology, deregulated electricity market, etc.), the power system is operating in a more volatile and stochastic manner, making it more prone to large-scale failures and even blackouts than ever before. This forces system operators to adjust generator setpoints at an increasingly high frequency to meet power demand while ensuring stable operation of the network. However, due to the sinusoidal nature of electrical characteristics, AC Optimal Power Flow (ACOPF) is usually a high-dimensional, nonlinear and non-convex problem. Therefore, solving ACOPF is both challenging and time-consuming. Typically, in order to achieve fast and reliable dispatch, the non-convex model can be relaxed to a convex model by using DC Optimal Power Flow (DCOPF) or the second-order cone technique. Unfortunately, when the grid is heavily loaded, DCOPF may be inaccurate, and the second-order cone may lead to loose decision feasible domains and inaccurate solutions, resulting in unreliable dispatch. In summary, traditional methods have problems in both accuracy and efficiency.

[0003] To address these issues, recent studies have proposed the idea of ​​using deep neural networks (DNNs) to predict ACOPF solutions. A common approach is to perform supervised learning (SL), also known as imitation learning (IL), to directly learn the mapping between operations and ACOPF solutions. In the SL / IL framework, the sampled operating conditions must be unpacked with the ACOPF to provide labeled data for training. Once the DNN model is well trained on labeled sample data, the ACOPF solution can be simply calculated through a real-time feedforward process. However, the learning algorithm of SL / IL can only mine empirical patterns in the data, and the decision quality depends on the data distribution and the SL model itself, so that the real physical pattern cannot be found, so the robustness and generality may be limited. In addition, the algorithm of the pure SL / IL framework is prone to violate the constraints of power grid operation. Therefore, two alternatives are proposed to address this problem. One is still a SL / IL method, but involves several mandatory physical constraints. For example, the learning process is constrained by introducing a penalty for violating constraints in the DNN loss, and then the Lagrangian duality is used to adjust the penalty weights during training. Numerical studies have shown that the ACOPF solution to DNN becomes more accurate as the physical restrictions of the learning domain are strengthened. Some studies have introduced a power transfer penalty in the DNN learning loss for DCOPF. Another is a method based on reinforcement learning (RL), which attempts to adapt the ACOPF model through a reward mechanism. However, to achieve high-performance RL, the reward function must be carefully designed. Even so, RL is still prone to falling into local optimality.

[0004] Overall, existing research provides some physics- and data-co-driven solutions for ACOPF, but there are still some key issues, such as the topological adaptability problem, which is still under consideration and has not been solved. In addition, learning multiple physical constraints in a simple penalty-based manner requires careful design of penalty weights, and the perfect value of penalty weights is difficult to find. Therefore, when DNNs trained in this way are deployed online, physical failures are prone to occur. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide an AC optimal power flow solution method based on neural network and augmented Lagrangian.

[0006] The object of the present invention is achieved by the following technical scheme: an AC optimal power flow solution method based on neural network and augmented Lagrangian includes the following steps:

[0007] Step S1: Establishing AC optimal power flow model;

[0008] Step S2: Based on the augmented Lagrangian method ALM, the inequality constraints of the AC optimal power flow model are transformed into equality constraints through slack variables and dual variables, and the augmented Lagrangian function is constructed;

[0009] Step S3: A neural network is used to perform parameterized modeling on the ACOPF problem to achieve the mapping from input conditions to ACOPF solutions; Step S4: The augmented Lagrangian function is used as a loss function and embedded into the training process of the neural network to train the neural network by minimizing the loss function;

[0010] Step S5: Use the trained neural network to quickly solve the ACOPF problem.

[0011] Specifically, the AC optimal power flow model in step S1 is:

[0012]

[0013] stg(v,x)=0 (1b)

[0014] h min ≤h(v,x)≤h max (1c)

[0015] Among them, g(v,x) and h(v,x) are the equality constraints and inequality constraints of the model respectively, v = [V i ,δ i ], is the decision variable vector, represents the busbar set, is the given initial operating condition vector, and They represent synchronous units and new energy units respectively. represents the load set, P i g,max , and P i g,min , Represent the maximum and minimum active / reactive power of the ith generator, and They are respectively the active and reactive power of the load on the i-th bus, and the new energy prediction value is given by P i g,max , It means that f is the objective function that integrates the costs of power generation and new energy consumption.

[0016] Specifically, the objective function f is:

[0017]

[0018]

[0019] Among them, i represents the generator, P i g is the active output of the generator, P i g,max is the output forecast value of the new energy unit, f i C represents the cost of electricity generation, f i R represents the standby cost, a i 、b i 、c i represents the cost coefficient of generator i, and denote the set of synchronous generators and renewable generators respectively.

[0020] Specifically, the constraints of the AC optimal power flow model are:

[0021]

[0022] Among them, V i represents the voltage amplitude of the i-th bus, j∈i represents that bus j is connected to bus i through branch ij, G ij and B ij Represent the conductance and susceptance of branch ij respectively, δ ij is the voltage phase difference across branch ij, and are the lower and upper limits of the voltage, S ij is the line flow, It is the line flow transfer limit.

[0023] Specifically, in step S2, the inequality constraint is converted into an equality constraint by using the slack variables u and l, and an augmented Lagrangian function is constructed:

[0024]

[0025] Among them, f(·) is the solution target of the optimal power flow model, corresponding to equation (2); g(·) is the equality constraint of the optimal power flow model, including the system AC power flow equality constraint described in equation (3); h(·) is the inequality constraint of the optimal power flow model, including the upper and lower limit constraints of the system operation in equations (4) to (6); λ, γ and τ are dual variables, u and l are slack variables, μ∑log(u) and μ∑log(l) are barrier function terms. Specifically, the model constructed by the neural network in step S3 is:

[0026]

[0027] stg(φ θ (x),x)=0 (8c)

[0028] ReLU(h(φ θ (x),x)-h max )=0 (8d)

[0029] ReLU(h min -h(φ θ (x),x))=0 (8e)

[0030] Among them, φ θ (·) represents the neural network model, which realizes the mapping from x to v, and θ is the parameter of the neural network.

[0031] Specifically, the training process of the neural network in step S4 is:

[0032]

[0033] Where ρ>0, formula (9b) is the loss function;

[0034] The ALM-based neural network parameter learning strategy is as follows:

[0035]

[0036] In the formula.

[0037] The present invention has the following advantages:

[0038] The present invention proposes a relaxation modeling method of an AC optimal power flow model based on augmented Lagrangian methods (ALM), models the optimal power flow model as a relaxed unconstrained model, and proposes a neural network parameterized modeling and augmented Lagrangian learning strategy construction method for AC optimal power flow, uses the AC optimal power flow Lagrangian function as a loss function to drive neural network training, and finally realizes rapid calculation of AC optimal power flow. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 The figure is a flow chart of the optimal power flow model solving method of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the embodiments described are only part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0041] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0042] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0043] The present invention is further described below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following description. Figure 1 As shown, the AC optimal power flow solution method based on neural network and augmented Lagrangian is characterized by comprising the following steps:

[0044] Step S1: Establish an AC optimal power flow model; model the AC optimal power flow ACOPF problem as an optimization problem containing equality constraints and inequality constraints. The purpose of the ACOPF problem is to obtain the most economical dispatch with the minimum amount of new energy obstruction while considering transmission constraints. The AC optimal power flow model is:

[0045]

[0046] stg(v,x)=0(1b)

[0047] h min ≤h(v,x)≤h max (1c)

[0048] Among them, g(v,x) and h(v,x) are the equality constraints and inequality constraints of the model respectively, v = [V i ,δ i ], is the decision variable vector, represents the busbar set, is the given initial operating condition vector, and They represent synchronous units and new energy units respectively. represents the load set, P i g,max , and P i g,min , Represent the maximum and minimum active / reactive power of the ith generator, and They are respectively the active and reactive power of the load on the i-th bus, and the new energy prediction value is given by P i g,max , Indicates that f is the objective function that integrates the cost of power generation and new energy consumption:

[0049]

[0050] Among them, i represents the generator, P i g is the active output of the generator, P i g,max is the output forecast value of the new energy unit, f i C represents the cost of electricity generation, f i R represents the standby cost, a i 、b i 、c i represents the cost coefficient of generator i, and They represent the set of synchronous generators and renewable generators respectively. Formula (1) includes (1a), (1b) and (1c), and formula (2) includes (2a), (2b) and (2c);

[0051] The constraints g and h reflect Kirchhoff's theorem, generator operating limits, and grid constraints:

[0052]

[0053] Among them, V i represents the voltage amplitude of the i-th bus, j∈i represents that bus j is connected to bus i through branch ij, G ij and B ijRepresent the conductance and susceptance of branch ij respectively, δ ij is the voltage phase difference across branch ij, V i min and V i max are the lower and upper limits of the voltage, S ij is the line flow, which can be calculated from the flow transfer factor of each node; is the line power flow transfer restriction; Formula (3) includes Formula (3a) and (3b), Formula (4) includes Formula (4a) and (4b);

[0054] Step S2: Based on the augmented Lagrangian method ALM, the inequality constraints of the AC optimal power flow model are converted into equality constraints through slack variables and dual variables, and the augmented Lagrangian function is constructed; in order to solve the ACOPF model, the inequality constraints are converted into equality constraints through slack variables u and l. The augmented Lagrangian function is as follows:

[0055]

[0056] Among them, f(·) is the solution target of the optimal power flow model, corresponding to equation (2); g(·) is the equality constraint of the optimal power flow model, including the system AC power flow equality constraint described in equation (3); h(·) is the inequality constraint of the optimal power flow model, including the system operation upper and lower limit constraints of equations (4) to (6); to construct the Lagrangian function of equations (1) to (6), dual variables λ, γ and τ are introduced, slack variables u and l are introduced to transform inequality constraints into equality constraints, and barrier function terms μ∑log(u) and μ∑log(l) are introduced;

[0057] Step S3: Use a neural network to parameterize the ACOPF problem and realize the mapping from input conditions to ACOPF solutions; for formula (7), Newton's method or KKT conditions can be used to solve it. However, in view of the continuous expansion of the scale of the power system and the uncertainty of renewable energy, the model-based solution method has poor convergence and faces huge challenges in solution efficiency. The non-real-time solver needs to perform random programming or robust programming on ACOPF, which further reduces the solution speed. To solve the above problems, the present invention adopts an ACOPF real-time solver based on augmented Lagrangian and neural network, and parameterizes formula (1) into the following model using a neural network:

[0058]

[0059] stg(φ θ (x),x)=0 (8c)

[0060] ReLU(h(φ θ (x),x)-h max)=0 (8d)

[0061] ReLU(h min -h(φ θ (x),x))=0 (8e)

[0062] in, is the prediction solution obtained by the neural network model, φ θ (·) represents the neural network model, which realizes the mapping from x to v. θ is the parameter of the neural network. It is worth noting that the inequality constraint can be modeled using the ReLu function, as shown in Equations (8d) and (8e).

[0063] Step S4: The augmented Lagrangian function is used as a loss function and embedded into the training process of the neural network. The neural network is trained by minimizing the loss function. Formula (8) includes formulas (8a), (8b), (8c), (8d) and (8e). Model (8) is non-convex and nonlinear and difficult to solve. The present invention approximates the solution of the model through the ALM method to alleviate the problem of difficulty in solving. ALM usually alleviates the strong convexity condition and is easy to construct a loss function form and embed it into the neural network training.

[0064] Specifically, the present invention proposes the following augmented Lagrangian learning strategy. For concise mathematical expression, the neural network parameterized augmented Lagrangian function is as follows:

[0065] G(φ θ (x),x)=[g(φ θ (x),x) T ,ReLU(h(φ θ (x),x)-h max ) T ,ReLU(h min -h(φ θ (x),x)) T ] T (9a)

[0066]

[0067] Where ρ>0, G(φ θ (x),x) is the construction constraint matrix; Formula (9b) is the loss function; is the L2 regularization term of the loss function.

[0068] During the training process of the neural network, the penalty coefficient and the parameters of the barrier function in the augmented Lagrangian function are adjusted to improve the training effect and generalization ability of the neural network.

[0069] The ALM-based neural network parameter learning strategy is as follows:

[0070]

[0071] Step S5: Use the trained neural network to quickly solve the ACOPF problem. Based on the above neural network calculation model and ALM learning strategy, the ACOPF can be quickly calculated.

[0072] The above is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any technician familiar with the art can make many possible changes and modifications to the technical solution of the present invention by using the above-mentioned technical content without departing from the scope of the technical solution of the present invention, or modify it into an equivalent embodiment of equivalent changes. Therefore, any changes, modifications, equivalent changes and modifications made to the above embodiments based on the technology of the present invention without departing from the content of the technical solution of the present invention belong to the protection scope of the present technical solution.

Claims

1. A method for solving AC optimal power flow based on neural network and augmented Lagrangian, characterized by: The following steps are involved: Step S1: Establishing AC optimal power flow model; Step S2: Based on the augmented Lagrangian method ALM, the inequality constraints of the AC optimal power flow model are transformed into equality constraints through slack variables and dual variables, and the augmented Lagrangian function is constructed; Step S3: Use a neural network to perform parameterized modeling on the ACOPF problem to achieve the mapping from input conditions to ACOPF solutions; Step S4: using the augmented Lagrangian function as a loss function, embedding it into the training process of the neural network, and training the neural network by minimizing the loss function; Step S5: Use the trained neural network to quickly solve the ACOPF problem.

2. The AC optimal power flow solution method based on neural network and augmented Lagrangian according to claim 1, characterized in that: The AC optimal power flow model in step S1 is: stg(υ,x)=0(1b) h min ≤h(υ,x)≤h max (1c) Among them, g(υ,x) and h(v,x) are the equality constraints and inequality constraints of the model respectively, v=[V i ,δ i ], is the decision variable vector, represents the busbar set, is the given initial operating condition vector, and They represent synchronous units and new energy units respectively. represents the load set, P i g,max , and P i g,min , Represent the maximum and minimum active / reactive power of the ith generator, and They are respectively the active and reactive power of the load on the i-th bus, and the new energy prediction value is given by P i g,max , It means that f is the objective function that integrates the costs of power generation and new energy consumption.

3. The AC optimal power flow solution method based on neural network and augmented Lagrangian according to claim 2, characterized in that: The objective function f is: Among them, i represents the generator, P i g is the active output of the generator, P i g,max is the output forecast value of the new energy unit, f i C represents the cost of electricity generation, f i R represents the standby cost, a i , b i 、c i Represents the cost coefficient of generator i.

4. The AC optimal power flow solution method based on neural network and augmented Lagrangian according to claim 3, characterized in that: The constraints of the AC optimal power flow model are: in, and Respectively represent the reactive power that can be generated, the lower limit and upper limit of reactive power of the i-th synchronous generator and the new energy unit; and are the active and reactive loads of the ith bus, V i 、V j represents the voltage amplitude of the i-th and j-th buses, j∈i represents that bus j is connected to bus i through branch ij, G ij and B ij Represent the conductance and susceptance of branch ij respectively, δ ij is the voltage phase difference across branch ij, and are the lower and upper limits of the voltage, S ij is the line flow, is the line power transfer limit, |S ij | represents the apparent power of the branch between busbars i and j.

5. The method for solving AC optimal power flow based on neural network and augmented Lagrangian according to claim 4, characterized in that: In step S2, the inequality constraint is converted into an equality constraint by using the slack variables u and l, and the augmented Lagrangian function is constructed: Where f(·) is the solution target of the optimal power flow model, corresponding to equation (2); g(·) is the equality constraint of the optimal power flow model, including the system AC power flow equality constraint described in equation (3); h(·) is the inequality constraint of the optimal power flow model, including the system operation upper and lower limit constraints of equations (4) to (6); λ, γ and τ are dual variables, u and l are slack variables, μ∑log(u) and μ∑log(l) are barrier function terms; h min and h max are the upper and lower bounds of the inequality constraint.

6. The AC optimal power flow solution method based on neural network and augmented Lagrangian according to claim 5, characterized in that: The neural network model constructed in step S3 is: stg(φ θ (x),x)=0 (8c) ReLU(h(ϕ θ (x),x)-h max )=0 (8d) ReLU(h min -h(φ θ (x),x))=0 (8e) in, is the prediction solution obtained by the neural network model; φ θ (·) represents the neural network model, which realizes the mapping from x to υ, and θ is the parameter of the neural network.

7. The method for solving AC optimal power flow based on neural network and augmented Lagrangian according to claim 6, characterized in that: The training process of the neural network in step S4 is: G(ϕ θ (x),x)=[g(φ θ (x),x) T ,ReLU(h(ϕ θ (x),x)-h max ) T ,ReLU(h min -h(ϕ θ (x),x)) T ] T (9a) Where ρ>0, G(φ θ (x),x) is the construction constraint matrix; Formula (9b) is the loss function; is the L2 regularization term of the loss function. The learning strategy based on ALM is as follows:

Citation Information

Patent Citations

  • AC / DC hybrid power distribution network scheduling method

    CN111340386A

  • Alternating current optimal power flow calculation method, system and equipment of power system and storage medium

    CN114421481A

  • Alternating current and direct current hybrid power distribution network optimal scheduling method based on graph calculation

    CN116073453A

  • Power grid active scheduling intelligent decision-making method and system based on Lagrange relaxation

    CN117254468A

  • Distributed optimal power flow method for alternating current and direct current hybrid power distribution network

    CN117394367A

Cited By

  • Data mechanism combined driving method and system for direct current optimal power flow solution

    CN120724864A

  • Direct current optimal power flow solving method and system based on neural network

    CN120745441A

  • A direct current optimal power flow solving method and system based on a neural network

    CN120745441B