Deep learning optimal power flow solution vector correction method considering feasible region
Through deep learning, decomposing the optimal trend problem and modifying the solution vector using physical constraints, the problem of difficult to quickly solve the optimal trend in the existing technology is solved, and efficient and accurate trend calculation and feasibility recovery are achieved.
Patent Information
- Application Number
- CN202510398315.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to quickly solve the high-quality results of the communication optimal trend under conditions that ensure that the constraints are strictly met, especially when dealing with highly feasible solutions.
By decomposing the optimal flow problem into a state-control variable problem, using deep learning to solve the state variable, and obtaining the control variable through physical flow equation constraint calculation, and constructing a correction constraint interval to correct the solution vector to satisfy the physical constraints and supply and demand balance relationship.
The optimal trend solution speed is improved, the feasibility and accuracy of understanding vectors are ensured, the AC trend equation constraints are met, and the supply and demand balance and physical limitations are achieved.
Smart Images

Figure CN119921336A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid dispatching, and in particular to a deep learning optimal power flow solution vector correction method considering a feasible domain. Background Art
[0002] The large-scale grid connection of renewable energy and the development of the power market have increased the demand for intelligent and efficient grid operation and management. At the same time, the uncertainty in the distribution system has become increasingly prominent, and the optimization and dispatching and safe operation of the distribution network are facing severe challenges. Due to the complexity of grid operation and the large amount of data generated in modern power systems, researchers have recently begun to explore the use of artificial intelligence technology, especially machine learning methods, to assist in solving problems in grid operation. Compared with methods based on numerical optimization, machine learning algorithms inevitably have the problem of unsatisfied constraints while achieving optimization acceleration. In particular, the feasibility of the solution is directly related to the safe and stable operation of the system. Referring to a method for solving an opportunity-constrained optimal power flow based on a linearized network model with reference to Chinese patent publication number CN113162050A, the method comprises the following steps: 1) establishing a linear power flow model based on a loss factor; 2) establishing an apparent power constraint; 3) establishing an optimal power flow model containing opportunity constraints; 4) reconstructing the opportunity constraints of the optimal power flow model to obtain a number of opportunity constraints; 5) converting all opportunity constraints into deterministic constraints and establishing a deterministic linear network optimal power flow model; 6) solving the linear network optimal power flow model, from the two perspectives of the linearized network model and the AC optimal power flow, the problem of calculating and analyzing the AC optimal power flow with high precision and fast calculation speed in the case of analyzing the opportunity constraints is solved. Referring to the Chinese patent publication number CN114566970A, the optimal power flow solution method for the access of multi-form distributed power sources to the distribution network includes: statistics on the initial network parameters of the distribution network and the output information of each distributed power source; according to the existing network parameters and distributed power source information, an optimal power flow model of the distribution network containing multiple types of distributed power sources is established, and the model uses the output of the distribution network balancing node and the output of the controllable distributed power source as control variables; the sequential quadratic programming algorithm is applied to solve the constructed optimal power flow model; according to the obtained optimal power flow solution result, the optimal allocation of the distribution network and the controllable distributed power source output provides an effective reference for determining the distribution network scheduling plan, which can fully consider the output characteristics of multiple types of distributed power sources, not only improve the utilization rate of renewable energy such as wind and light, but also ensure the stability and economy of the distribution network operation.
[0003] However, the existing technology is not sufficient in the research on feasibility recovery. The method of encoding constraints directly into the penalty term of the loss function is suitable for simple constraints. This method cannot strictly satisfy the feasibility of the solution and is mostly used to solve the DC optimal power flow problem. At present, the method of machine learning to solve the highly feasible solution of the optimal power flow still needs to be explored. How to quickly solve the high-quality results of the AC optimal power flow under the condition of strict satisfaction of the constraints is an urgent problem to be solved. Summary of the invention
[0004] The present invention solves the problem of how to quickly solve the AC optimal power flow with high quality results while ensuring that the constraints are strictly satisfied. A deep learning optimal power flow solution vector correction method considering the feasible domain is proposed. The optimal power flow problem is decomposed based on the state-control variable, and the state variables are solved through deep learning. The corresponding control variables are calculated using the physical power flow equation constraints, which can improve the optimal power flow solution speed while satisfying the AC power flow equation constraints.
[0005] In order to achieve the above objectives, the following technical solutions are proposed: A deep learning optimal power flow solution vector correction method considering feasible domain, a deep learning optimal power flow solution vector correction method considering feasible domain, characterized in that it includes: Loop through multiple structures and collect training samples in batches; Construct a state estimator based on deep neural network to learn the complex nonlinear mapping relationship between section load and the state variables to be determined during the optimal power flow operation of the distribution system; Set the power flow balance equation and solve the control variables to obtain the complete solution vector space of the optimal power flow; Verify whether the initial solution meets the feasibility requirements, filter out samples with inequality constraint violations in the initial solution, and obtain a corrected sample set; It is proposed to construct the correction interval based on the joint correction constraint conditions of the whole control variables; The optimal power flow calculation results are corrected based on the correction interval.
[0006] The present invention decomposes the optimal power flow problem based on state-control variables, solves the state variables through deep learning, and obtains the corresponding control variables using the physical power flow equation constraints, which can improve the optimal power flow solution speed while satisfying the AC power flow equation constraints.
[0007] The present invention constructs a correction constraint interval by considering the balance relationship between active and reactive power supply and demand, and the actual physical limitations that the output of the photovoltaic system and the reactive compensation device must meet, effectively balancing the average absolute error of each control variable, ensuring that the solution vector basically satisfies the supply and demand balance relationship, and realizing the feasibility recovery of infeasible solutions for control flow variables, while improving the accuracy of the solution.
[0008] Preferably, the system state variables to be determined include node voltage amplitudes and voltage phases other than the balanced nodes.
[0009] Preferably, the deep neural network is provided with two in the initial solution stage, one of which learns the mapping relationship between load characteristics and voltage amplitude under optimal power flow, and the other learns the mapping relationship between load characteristics and voltage phase angle under optimal power flow.
[0010] In the initial solution stage of the deep neural network, two deep neural networks are built to respectively learn the mapping of load characteristics to voltage amplitude and the mapping of load characteristics to voltage phase angle under optimal power flow, and adjust the model parameters.
[0011] Preferably, the condition for verifying that the initial solution result satisfies feasibility is if and only if the initial solution result satisfies all inequality constraints and equality constraints at the same time.
[0012] For the equality constraint h (x) = 0, if the solution y can satisfy h(y) = 0, it means that the equality constraint is satisfied, otherwise, it means that the equality constraint is not satisfied; for the inequality constraint g(x) ≤ 0, if the solution y can satisfy g(y) ≤ 0, it means that the inequality constraint is satisfied, otherwise, it means that the inequality constraint is not satisfied. If and only if the initial solution satisfies all equality constraints and inequality constraints at the same time, it meets the feasibility.
[0013] Preferably, the state estimator of the deep neural network is trained using stochastic gradient descent.
[0014] The deep neural network learning state estimator comprises an input layer, several hidden layers and an output layer, and adopts stochastic gradient descent to train the neural network.
[0015] Preferably, the control variables include the output of the controllable distributed power source and the reactive power of the reactive compensation device in the system, as well as the output of the adjustable photovoltaic system inverter and the reactive power of the reactive compensation device.
[0016] The system control variable space includes the output of the controllable distributed power source, the reactive power of the reactive compensation device in the system, the output of the adjustable photovoltaic system inverter, and the reactive power of the reactive compensation device.
[0017] Preferably, the correcting the optimal power flow calculation result based on the correction interval specifically includes: Set the objective function max(x T y), project the unconstrained y to x∈[0,1] in the feasible domain l , l is the vector dimension; Based on the multi-group marginal distribution Sinkhorn algorithm, x and y are encoded. For a set of constraints Ax≤b, the goal is to find a set of transfer matrices I that transfer the weight matrix A on the left side of the constraint to b; Normalize constraints based on row and column distributions; The initial non-negative matrix is pushed towards a matrix that satisfies the global constraints until the algorithm converges to a matrix that satisfies the constraints.
[0018] Preferably, the combined correction constraint condition is set according to the power balance constraint of active power and reactive power during the actual operation of the system and the upper and lower power limit constraints during the operation of the equipment, as follows: ; ; ; ; in: N pvs is the total number of generator sets in the system, N is the total number of nodes in the system, N svg is the total number of static VAR compensators in the system; and Respectively represent nodes j Active load and reactive load; P loss and Q loss Respectively represent the active line loss and reactive line loss of the system; P 0 and Q 0 Respectively represent the sum of active power and reactive power in the system before correction; and Respectively represent nodes i Minimum and maximum values of the generator active output; For Node h Reactive power output of static VAR compensator; and Respectively represent nodes h The maximum and minimum values of the static VAR compensator reactive output.
[0019] A computer-readable storage medium stores instructions, which, when executed, can implement a deep learning optimal power flow solution vector correction method considering a feasible domain as described in any one of claims 1-8.
[0020] An electronic device comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed, the method for correcting a deep learning optimal power flow solution vector taking into account a feasible domain as described in any one of claims 1 to 8 can be implemented.
[0021] The beneficial effects of the present invention are: 1. The present invention decomposes the optimal power flow problem based on state-control variables, solves the state variables through deep learning, and calculates the corresponding control variables using the physical power flow equation constraints, which can improve the optimal power flow solution speed while satisfying the AC power flow equation constraints.
[0022] 2. The present invention considers the balance between active and reactive power supply and demand, and the actual physical limitations that the output of the photovoltaic system and the reactive compensation device must meet, and constructs a correction constraint interval, effectively balancing the average absolute error of each control variable, ensuring that the solution vector basically satisfies the supply and demand balance relationship, and realizing the feasibility recovery of infeasible solutions for control flow variables, while improving the accuracy of the solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flow chart of the present invention.
[0024] Figure 2 It is an improved IEEE123 node distribution network topology diagram of the present invention.
[0025] Figure 3 It is a comparison of the average absolute errors of active control variables of the photovoltaic system before and after the correction of the power flow calculation of the present invention. DETAILED DESCRIPTION
[0026] Embodiment 1: This embodiment proposes a deep learning optimal power flow solution vector correction method considering the feasible domain, referring to Figure 1 The specific steps include: S1, looping to construct a multi-structure and batch collecting training samples, wherein the multi-structure contains detailed information of the single-section optimal power flow solution, including data matrices of nodes, branches, generators and other equipment, scalar data such as voltage reference values, objective function values, solution time, and other information such as Lagrange multipliers and number of iterations.
[0027] S2, using the training samples to construct a state estimator based on a deep neural network for learning the complex nonlinear mapping relationship between the section load and the system state variables to be determined when the distribution system is operating at the optimal power flow; the system state variables to be determined are the node voltage amplitude and the voltage phase other than the balance node. The deep neural network learning state estimator comprises an input layer, several hidden layers and an output layer, and uses stochastic gradient descent to train the neural network.
[0028] In the initial solution stage of the deep neural network, two deep neural networks are built to respectively learn the mapping of load characteristics to voltage amplitude and the mapping of load characteristics to voltage phase angle under optimal power flow, and adjust the model parameters.
[0029] S3, construct the power flow balance equation and bring in the state quantity prediction result of the state estimator to solve the control variables and obtain the complete solution vector space of the optimal power flow; The power flow balance equation is as follows: (1-1) in, P Di and Q Di Respectively represent nodes i Active load and reactive load, V i is the state variable output by the neural network, V i For Node i voltage. P Gi and Q Gi is the control variable of the system, P Gi and Q Gi Respectively represent nodes i The active power and reactive power output by the generator. i , j ) represents a connection node i and nodes j The line, ε Represents the set of all lines in the system. y ij Representation Node i and nodes j Re(·) and Im(·) represent the real and imaginary parts of the variable ·, respectively. * The system control variable space includes the output of the controllable distributed power source, the reactive power of the reactive compensation device in the system, the output of the adjustable photovoltaic system inverter, and the reactive power of the reactive compensation device.
[0030] S4, verify whether the initial solution result in S3, i.e., the complete solution vector space, satisfies feasibility according to the acceptable allowable power error. If not, filter out the samples with inequality constraint violations in the initial solution result to form a modified sample set; for the equality constraint h (x) = 0, if the obtained solution y can satisfy h (y) = 0, it means that the equality constraint is satisfied, otherwise, it means that the equality constraint is not satisfied; for the inequality constraint g (x) ≤ 0, if the obtained solution y can satisfy g (y) ≤ 0, it means that the inequality constraint is satisfied, otherwise, it means that the inequality constraint is not satisfied. If and only if the initial solution satisfies all equality constraints and inequality constraints at the same time, it satisfies feasibility.
[0031] S5, considering the actual physical constraints and the supply-demand balance relationship, establish the joint correction constraints based on the overall control variables and construct the correction interval; S6, based on the correction interval constructed in S5, the solution vector of the optimal power flow is corrected to satisfy the physical constraints.
[0032] The present invention decomposes the optimal power flow problem based on state-control variables, solves the state variables through deep learning, and obtains the corresponding control variables using the physical power flow equation constraints, which can improve the optimal power flow solution speed while satisfying the AC power flow equation constraints.
[0033] The present invention constructs a correction constraint interval by considering the balance relationship between active and reactive power supply and demand, and the actual physical limitations that the output of the photovoltaic system and the reactive compensation device must meet, effectively balancing the average absolute error of each control variable, ensuring that the solution vector basically satisfies the supply and demand balance relationship, and realizing the feasibility recovery of infeasible solutions for control flow variables, while improving the accuracy of the solution.
[0034] This embodiment also proposes a computer-readable storage medium storing instructions, which, when executed, can implement the above-mentioned deep learning optimal power flow solution vector correction method considering the feasible domain.
[0035] This embodiment also proposes an electronic device, including a processor and a memory and a program or instruction stored in the memory, wherein the program or instruction can be executed on the processor, and when the program or instruction is executed, the method for correcting a deep learning optimal power flow solution vector considering a feasible domain as described in any one of claims 1 to 8 can be implemented.
[0036] Embodiment 2: This embodiment optimizes S5 on the basis of embodiment 1, and proposes a deep learning optimal power flow solution vector correction method considering the feasible domain, referring to Figure 1 The specific steps include: S1, looping to construct a multi-structure and batch collecting training samples, wherein the multi-structure contains detailed information of the single-section optimal power flow solution, including data matrices of nodes, branches, generators and other equipment, scalar data such as voltage reference values, objective function values, solution time, and other information such as Lagrange multipliers and number of iterations.
[0037] S2, using the training samples to construct a state estimator based on a deep neural network for learning the complex nonlinear mapping relationship between the section load and the system state variables to be determined when the distribution system is operating at the optimal power flow; the system state variables to be determined are the node voltage amplitude and the voltage phase other than the balance node. The deep neural network learning state estimator comprises an input layer, several hidden layers and an output layer, and uses stochastic gradient descent to train the neural network.
[0038] In the initial solution stage of the deep neural network, two deep neural networks are built to respectively learn the mapping of load characteristics to voltage amplitude and the mapping of load characteristics to voltage phase angle under optimal power flow, and adjust the model parameters.
[0039] S3, construct the power flow balance equation and bring in the state quantity prediction result of the state estimator to solve the control variables and obtain the complete solution vector space of the optimal power flow; The power flow balance equation is as follows: (1-1) in, P Di and Q Di Respectively represent nodes i Active load and reactive load, V i is the state variable output by the neural network, V i For Node i voltage. P Gi and Q Gi is the control variable of the system, P Gi and Q Gi Respectively represent nodes i The active power and reactive power output by the generator. i , j ) represents a connection node i and nodes j The line, ε Represents the set of all lines in the system. y ij Representation Node i and nodes jRe(·) and Im(·) represent the real and imaginary parts of the variable ·, respectively. * The system control variable space includes the output of the controllable distributed power source, the reactive power of the reactive compensation device in the system, the output of the adjustable photovoltaic system inverter, and the reactive power of the reactive compensation device.
[0040] S4, verify whether the initial solution result in S3, i.e., the complete solution vector space, satisfies feasibility according to the acceptable allowable power error. If not, filter out the samples with inequality constraint violations in the initial solution result to form a modified sample set; for the equality constraint h (x) = 0, if the obtained solution y can satisfy h (y) = 0, it means that the equality constraint is satisfied, otherwise, it means that the equality constraint is not satisfied; for the inequality constraint g (x) ≤ 0, if the obtained solution y can satisfy g (y) ≤ 0, it means that the inequality constraint is satisfied, otherwise, it means that the inequality constraint is not satisfied. If and only if the initial solution satisfies all equality constraints and inequality constraints at the same time, it satisfies feasibility.
[0041] S5, considering the actual physical constraints and the supply-demand balance relationship, establish the joint correction constraints based on the overall control variables and construct the correction interval; S5 of the present invention specifically includes the following steps: Joint correction: By considering the power balance constraints of active power and reactive power during the actual operation of the system and the upper and lower power constraints when the equipment is running, the correction constraint conditions based on the control variables are designed: ; (1-2) ; (1-3) ; (1-4) ; (1-5) Formula (1-2) (1-3) is the correction constraint condition, which takes into account the balance between active and reactive power supply and demand. The left side of the equal sign is the control variable to be corrected, and the right side calculates the power required by the system through the system load and line loss, and obtains the correction amount of the solution by subtracting it from the initial solution. Formula (1-4) (1-5) is a single-point correction constraint established by considering the actual physical limitations that the output of the photovoltaic system and the reactive power compensation device must meet. N pvs Indicates the total number of generator sets in the system, N Indicates the total number of nodes in the system. N svg Represents the total number of static VAR compensators in the system. and Respectively represent nodes i Correction values of active power and reactive power of the upper generator set. PD,j and Q D,j Respectively represent nodes j of active load and reactive load. P loss and Q loss They represent the active line loss and reactive line loss of the system respectively. P 0 and Q 0 They represent the sum of active power and reactive power in the system before correction. and Respectively represent nodes i The minimum and maximum values of the generator active output. For Node h Reactive power output of static VAR compensator. and Respectively represent nodes h The minimum and maximum values of the static VAR compensator reactive output.
[0042] S6, based on the correction interval constructed in S5, the solution vector of the optimal power flow is corrected to satisfy the physical constraints.
[0043] The present invention decomposes the optimal power flow problem based on state-control variables, solves the state variables through deep learning, and obtains the corresponding control variables using the physical power flow equation constraints, which can improve the optimal power flow solution speed while satisfying the AC power flow equation constraints.
[0044] The present invention constructs a correction constraint interval by considering the balance relationship between active and reactive power supply and demand, and the actual physical limitations that the output of the photovoltaic system and the reactive compensation device must meet, effectively balancing the average absolute error of each control variable, ensuring that the solution vector basically satisfies the supply and demand balance relationship, and realizing the feasibility recovery of infeasible solutions for control flow variables, while improving the accuracy of the solution.
[0045] This embodiment also proposes a computer-readable storage medium storing instructions, which, when executed, can implement the above-mentioned deep learning optimal power flow solution vector correction method considering the feasible domain.
[0046] This embodiment also proposes an electronic device, including a processor and a memory and a program or instruction stored in the memory, wherein the program or instruction can be executed on the processor, and when the program or instruction is executed, the above-mentioned deep learning optimal power flow solution vector correction method considering the feasible domain can be implemented.
[0047] Embodiment 3: This embodiment optimizes S6 on the basis of embodiment 2, and proposes a deep learning optimal power flow solution vector correction method considering the feasible domain, referring to Figure 1 The specific steps include: S1, looping to construct a multi-structure and batch collecting training samples, wherein the multi-structure contains detailed information of the single-section optimal power flow solution, including data matrices of nodes, branches, generators and other equipment, scalar data such as voltage reference values, objective function values, solution time, and other information such as Lagrange multipliers and number of iterations.
[0048] S2, using the training samples to construct a state estimator based on a deep neural network for learning the complex nonlinear mapping relationship between the section load and the system state variables to be determined when the distribution system is operating at the optimal power flow; the system state variables to be determined are the node voltage amplitude and the voltage phase other than the balance node. The deep neural network learning state estimator comprises an input layer, several hidden layers and an output layer, and uses stochastic gradient descent to train the neural network.
[0049] In the initial solution stage of the deep neural network, two deep neural networks are built to respectively learn the mapping of load characteristics to voltage amplitude and the mapping of load characteristics to voltage phase angle under optimal power flow, and adjust the model parameters.
[0050] S3, construct the power flow balance equation and bring in the state quantity prediction result of the state estimator to solve the control variables and obtain the complete solution vector space of the optimal power flow; The power flow balance equation is as follows: (1-1) in, P Di and Q Di Respectively represent nodes i Active load and reactive load, V i is the state variable output by the neural network, V i For Node i voltage. P Gi and Q Gi is the control variable of the system, P Gi and Q Gi Respectively represent nodes i The active power and reactive power output by the generator. i , j ) represents a connection node i and nodes j The line, ε Represents the set of all lines in the system. y ij Representation Node i and nodes j Re(·) and Im(·) represent the real and imaginary parts of the variable ·, respectively. * The system control variable space includes the output of the controllable distributed power source, the reactive power of the reactive compensation device in the system, the output of the adjustable photovoltaic system inverter, and the reactive power of the reactive compensation device.
[0051] S4, verify whether the initial solution result in S3, i.e., the complete solution vector space, satisfies feasibility according to the acceptable allowable power error. If not, filter out the samples with inequality constraint violations in the initial solution result to form a modified sample set; for the equality constraint h (x) = 0, if the obtained solution y can satisfy h (y) = 0, it means that the equality constraint is satisfied, otherwise, it means that the equality constraint is not satisfied; for the inequality constraint g (x) ≤ 0, if the obtained solution y can satisfy g (y) ≤ 0, it means that the inequality constraint is satisfied, otherwise, it means that the inequality constraint is not satisfied. If and only if the initial solution satisfies all equality constraints and inequality constraints at the same time, it satisfies feasibility.
[0052] S5, considering the actual physical constraints and the supply-demand balance relationship, establish the joint correction constraints based on the overall control variables and construct the correction interval; S5 of the present invention specifically includes the following steps: Joint correction: By considering the power balance constraints of active power and reactive power during the actual operation of the system and the upper and lower power constraints when the equipment is running, the correction constraint conditions based on the control variables are designed: ; (1-2) ; (1-3) ; (1-4) ; (1-5) Formula (1-2) (1-3) is the correction constraint condition, which takes into account the balance between active and reactive power supply and demand. The left side of the equal sign is the control variable to be corrected, and the right side calculates the power required by the system through the system load and line loss, and obtains the correction amount of the solution by subtracting it from the initial solution. Formula (1-4) (1-5) is a single-point correction constraint established by considering the actual physical limitations that the output of the photovoltaic system and the reactive power compensation device must meet. N pvs Indicates the total number of generator sets in the system, N Indicates the total number of nodes in the system. N svgRepresents the total number of static VAR compensators in the system. and Respectively represent nodes i Correction values of active power and reactive power of the upper generator set. P D,j and Q D,j Respectively represent nodes j of active load and reactive load. P loss and Q loss They represent the active line loss and reactive line loss of the system respectively. P 0 and Q 0 They represent the sum of active power and reactive power in the system before correction. and Respectively represent nodes i The minimum and maximum values of the generator active output. For Node h Reactive power output of static VAR compensator. and Respectively represent nodes h The minimum and maximum values of the static VAR compensator reactive output.
[0053] S6, based on the correction interval constructed in S5, the solution vector of the optimal power flow is corrected to satisfy the physical constraints.
[0054] S6 of the present invention specifically comprises the following steps: using a linear constraint satisfaction network, with max(x T y) as the target, project the unconstrained y to x∈[0,1] in the feasible domain l , l is the vector dimension. The multi-group marginal distribution Sinkhorn algorithm is used to encode y and x, and the constraints in the optimal power flow problem are transformed into a quantity allocation problem. For a set of constraints Ax≤b, the goal is to find a set of transfer matrices I, and transfer the weight matrix A on the left side of the constraint to b through the transfer matrix. According to formula (1-6), formula (1-7) is cyclically based on the row distribution r η and column distribution c η Normalize and gradually push the initial non-negative matrix to a matrix that satisfies the global constraints until the algorithm converges and the output matrix I is a matrix that satisfies the constraints.
[0055] (1-6) (1-7) In the formula Indicates tThe first iteration is to modify the previous matrix I i Line j Column elements, Indicates t At the iteration, the modified matrix I i Line j Column elements. n and m Respectively represent the number of rows and columns of matrix I. η,j and c η,j Represents the row distribution r η and column distribution c η No. j elements.
[0056] The present invention decomposes the optimal power flow problem based on state-control variables, solves the state variables through deep learning, and obtains the corresponding control variables using the physical power flow equation constraints, which can improve the optimal power flow solution speed while satisfying the AC power flow equation constraints.
[0057] The present invention constructs a correction constraint interval by considering the balance relationship between active and reactive power supply and demand, and the actual physical limitations that the output of the photovoltaic system and the reactive compensation device must meet, effectively balancing the average absolute error of each control variable, ensuring that the solution vector basically satisfies the supply and demand balance relationship, and realizing the feasibility recovery of infeasible solutions for control flow variables, while improving the accuracy of the solution.
[0058] This embodiment also proposes a computer-readable storage medium storing instructions, which, when executed, can implement the above-mentioned deep learning optimal power flow solution vector correction method considering the feasible domain.
[0059] This embodiment also proposes an electronic device, including a processor and a memory and a program or instruction stored in the memory, wherein the program or instruction can be executed on the processor, and when the program or instruction is executed, the above-mentioned deep learning optimal power flow solution vector correction method considering the feasible domain can be implemented.
[0060] Embodiment 4: This embodiment is compared with the specific practical case cited in Example 3, and proposes a deep learning optimal power flow solution vector correction method considering the feasible domain. Figure 1 The specific steps include: S1, looping to build a multi-structure and batch collecting training samples, the multi-structure contains detailed information on the single-section optimal power flow solution, including data matrices of nodes, branches, generators and other equipment, scalar data such as voltage reference values, objective function values, solution time, and other information such as Lagrange multipliers and iteration times. In this embodiment, the example uses an improved IEEE123 node distribution network such as Figure 2As shown in the figure, reactive compensation devices are configured at busbars numbered 65, 72, 90, and 99. Photovoltaic systems are added at 7 nodes, namely 45, 74, 86, 108, 50, 70, and 113. The nominal load of the IEEE123 node system is taken as the mean, and a random Gaussian distribution is set to simulate fluctuations. The variance is 0.03, the load fluctuation range is [60%, 120%], and the photovoltaic penetration rate reaches 40%. A total of 60,000 optimal power flow data samples are generated, and the data set is divided according to the ratio of 10: 1: 1, that is, 50,000 samples are randomly selected as training data samples, and the number of validation sample sets and test sample sets is 5,000.
[0061] It should be noted that the optimal power flow calculation in this embodiment is made based on the IEEE123 node distribution network of this embodiment. When the method of the present invention is actually implemented, the topology division can be adaptively adjusted according to the structure of the distribution network actually applied.
[0062] S2, using the training samples to construct a state estimator based on a deep neural network for learning the complex nonlinear mapping relationship between the section load and the system state variables to be determined when the distribution system is operating at the optimal power flow; Table 1 gives the solution results of the constructed state-control variable decomposition architecture; the system state variables to be determined are the node voltage amplitude and the voltage phase other than the balance node. The deep neural network learning state estimator comprises an input layer, several hidden layers and an output layer, and uses stochastic gradient descent to train the neural network.
[0063] In the initial solution stage of the deep neural network, two deep neural networks are built to respectively learn the mapping of load characteristics to voltage amplitude and the mapping of load characteristics to voltage phase angle under optimal power flow, and adjust the model parameters.
[0064] S3, construct the power flow balance equation and bring in the state quantity prediction result of the state estimator to solve the control variables and obtain the complete solution vector space of the optimal power flow; The power flow balance equation is as follows: (1-1) in, P Di and Q Di Respectively represent nodes i Active load and reactive load, V i is the state variable output by the neural network, V i For Node i voltage. P Gi and Q Giis the control variable of the system, P Gi and Q Gi Respectively represent nodes i The active power and reactive power output by the generator. i , j ) represents a connection node i and nodes j The line, ε Represents the set of all lines in the system. y ij Representation Node i and nodes j Re(·) and Im(·) represent the real and imaginary parts of the variable ·, respectively. * The system control variable space includes the output of the controllable distributed power source, the reactive power of the reactive compensation device in the system, the output of the adjustable photovoltaic system inverter, and the reactive power of the reactive compensation device.
[0065] S4, verify whether the initial solution result in S3, i.e., the complete solution vector space, satisfies feasibility according to the acceptable allowable power error. If not, filter out the samples with inequality constraint violations in the initial solution result to form a modified sample set; for the equality constraint h (x) = 0, if the obtained solution y can satisfy h (y) = 0, it means that the equality constraint is satisfied, otherwise, it means that the equality constraint is not satisfied; for the inequality constraint g (x) ≤ 0, if the obtained solution y can satisfy g (y) ≤ 0, it means that the inequality constraint is satisfied, otherwise, it means that the inequality constraint is not satisfied. If and only if the initial solution satisfies all equality constraints and inequality constraints at the same time, it satisfies feasibility.
[0066] S5, considering the actual physical constraints and the supply-demand balance relationship, establish the joint correction constraints based on the overall control variables and construct the correction interval; S5 of the present invention specifically includes the following steps: Joint correction: By considering the power balance constraints of active power and reactive power during the actual operation of the system and the upper and lower power constraints when the equipment is running, the correction constraint conditions based on the control variables are designed: ; (1-2) ; (1-3) ; (1-4) ; (1-5) Formula (1-2) (1-3) is the correction constraint condition, which takes into account the balance between active and reactive power supply and demand. The left side of the equal sign is the control variable to be corrected, and the right side calculates the power required by the system through the system load and line loss, and obtains the correction amount of the solution by subtracting it from the initial solution. Formula (1-4) (1-5) is a single-point correction constraint established by considering the actual physical limitations that the output of the photovoltaic system and the reactive power compensation device must meet. N pvs Indicates the total number of generator sets in the system, N Indicates the total number of nodes in the system. N svg Represents the total number of static VAR compensators in the system. and Respectively represent nodes i Correction values of active power and reactive power of the upper generator set. P D,j and Q D,j Respectively represent nodes j of active load and reactive load. P loss and Q loss They represent the active line loss and reactive line loss of the system respectively. P 0 and Q 0 They represent the sum of active power and reactive power in the system before correction. and Respectively represent nodes i The minimum and maximum values of the generator's active output. h Reactive power output of static VAR compensator. and Respectively represent nodes h The minimum and maximum values of the static VAR compensator reactive output.
[0067] S6, based on the correction interval constructed in S5, the solution vector of the optimal power flow is corrected to satisfy the physical constraints.
[0068] S6 of the present invention specifically comprises the following steps: using a linear constraint satisfaction network, with max(x T y) as the target, project the unconstrained y to x∈[0,1] in the feasible domain l , lis the vector dimension. The multi-group marginal distribution Sinkhorn algorithm is used to encode y and x, and the constraints in the optimal power flow problem are transformed into a quantity allocation problem. For a set of constraints Ax≤b, the goal is to find a set of transfer matrices I, and transfer the weight matrix A on the left side of the constraint to b through the transfer matrix. According to formula (1-6), formula (1-7) is cyclically based on the row distribution r η and column distribution c η Normalize and gradually push the initial non-negative matrix to a matrix that satisfies the global constraints until the algorithm converges and the output matrix I is a matrix that satisfies the constraints.
[0069] (1-6) (1-7) In the formula Indicates t The first iteration is to modify the previous matrix I i Line j Column elements, Indicates t At the iteration, the modified matrix I i Line j Column elements. n and m Respectively represent the number of rows and columns of matrix I. η,j and c η,j Represents the row distribution r η and column distribution c η No. j elements.
[0070] The present invention decomposes the optimal power flow problem based on state-control variables, solves the state variables through deep learning, and obtains the corresponding control variables using the physical power flow equation constraints, which can improve the optimal power flow solution speed while satisfying the AC power flow equation constraints.
[0071] The present invention constructs a correction constraint interval by considering the balance relationship between active and reactive power supply and demand, and the actual physical limitations that the output of the photovoltaic system and the reactive compensation device must meet, effectively balancing the average absolute error of each control variable, ensuring that the solution vector basically satisfies the supply and demand balance relationship, and realizing the feasibility recovery of infeasible solutions for control flow variables, while improving the accuracy of the solution.
[0072] This embodiment also proposes a computer-readable storage medium storing instructions, which, when executed, can implement the above-mentioned deep learning optimal power flow solution vector correction method considering the feasible domain.
[0073] This embodiment also proposes an electronic device, including a processor and a memory and a program or instruction stored in the memory, wherein the program or instruction can be executed on the processor, and when the program or instruction is executed, the above-mentioned deep learning optimal power flow solution vector correction method considering the feasible domain can be implemented.
[0074] To verify the model effect, we built an optimal power flow solution model based on the state-control variable decomposition of three algorithms: Support Vector Regression (SVR), Random Forest (RF), and Deep Neural Network (DNN), which were defined as SC-SVR, SC-RF, and SC-DNN respectively. The mean absolute error (MAE), mean absolute percentage error (MAPE), and equality constraint satisfaction ratio ( CR ), average violation degree of inequality constraints ( VD avg ), inequality constraints( VD max ) Five evaluation indicators of maximum violation are used to evaluate the model performance, among which: Mean absolute error: ; Mean absolute percentage error: ; In the formula, S is the number of samples, y i For sample i The corresponding exact solution vector, y θ ( x i ) is a sample i The predicted value of Equality constraints are satisfied in proportion: ; In the formula, Representation sample i The number of variables in the constraint condition that exceeds the allowed threshold, N ec represents the number of corresponding inequality constraints; Average violation of inequality constraints: ; ; In the formula, bis the number of inequality constraints, for the solution x For example, i The degree of violation of a constraint can be expressed as vd i ( x ) to indicate that g i ( x ) ≤ 0 is a general form of inequality constraint; Inequality constraints ( VD max )Maximum Violation: .
[0075] Table 1 Comprehensive index results of different algorithms under the state-control variable decomposition framework Evaluation indicators SC-SVR SC-RF SC-DNN <![CDATA[MAE( P Gi ) / MW(×10 -3 )]]> 24.395 5.1747 2.6842 <![CDATA[MAE( Q Gi ) / Mvar(×10 -3 )]]> 17.750 6.7334 2.2507 MAPE() 4.77% 1.16% 0.32% <![CDATA[Average solution time / s (×10 -3 )]]> 6.8187 23.013 0.3906 Table 1 shows the comprehensive index results of different algorithms under the state-control variable decomposition architecture. Analysis of the performance indicators shown in Table 1 shows that the state-control variable decomposition architecture adopted by the present invention is better than the architecture obtained in DNN. Since the error of the SC-DNN method in the state variable solution is the smallest, and there is no phenomenon that the average prediction error of the voltage amplitude or phase angle of individual nodes is significantly larger. Therefore, when calculating the power flow equation, no excessive voltage mapping error is introduced. The average absolute errors of active power and reactive power solved by the proposed SC-DNN method are 2.6842×10 -3 MW and 2.2507×10 -3 MVar, accounting for about 0.013% of the maximum installed capacity of the photovoltaic system.
[0076] To further demonstrate the superiority of the model, the constraint violation of the present invention before and after the feasibility recovery correction is tested. Table 2 summarizes the relevant evaluation indicators of various inequality constraints before and after the correction. Among the 2574 infeasible samples before the correction, the proposed correction method successfully corrected 2379 samples, and 92.42% of the infeasible samples were successfully corrected. The average active inequality constraint satisfaction ratio based on the samples is CR pg The percentage increased from 82.27% to 98.59%. The remaining 195 samples, totaling 293 PV active power control variables, had constraint violations, and the degree of violation was relatively minor.
[0077] Table 2 Comparison of constraint violations before and after correction Evaluation indicators Before correction After correction <![CDATA[ VD avg ( P G )]]> <![CDATA[2.0912×10 -3 ]]> <![CDATA[1.3304×10 -4 ]]> <![CDATA[ VD max ( P G )]]> <![CDATA[4.9283×10 -3 ]]> <![CDATA[1.5165×10 -4 ]]> <![CDATA[ VD avg ( Q G )]]> <![CDATA[2.4549×10 -3 ]]> <![CDATA[<1×10 -4 ]]> <![CDATA[ VD max ( Q G )]]> <![CDATA[3.4856×10 -3 ]]> <![CDATA[<1×10 -4 ]]> <![CDATA[ CR pg ]]> 82.27% 98.59% <![CDATA[ CR qg ]]> 96.98% 100.0% <![CDATA[ CR bran ]]> 100.0% 99.97% To further demonstrate the superiority of the model, the average absolute errors of the active control variables of the photovoltaic system before and after correction are compared. Figure 3As shown in the figure, compared with the correction before, the average absolute error of the active control variables of each node under the proposed correction method is obviously more balanced.
Claims
1. A deep learning optimal power flow solution vector correction method considering feasible domain, characterized by: include: Loop through multiple structures and collect training samples in batches; Construct a state estimator based on deep neural network to learn the complex nonlinear mapping relationship between section load and the state variables to be determined during the optimal power flow operation of the distribution system; Set the power flow balance equation and solve the control variables to obtain the complete solution vector space of the optimal power flow; Verify whether the initial solution meets the feasibility requirements, filter out samples with inequality constraint violations in the initial solution, and obtain a corrected sample set; It is proposed to construct the correction interval based on the joint correction constraint conditions of the whole control variables; The optimal power flow calculation results are corrected based on the correction interval.
2. According to the method for correcting the optimal power flow solution vector by deep learning considering the feasible domain according to claim 1, it is characterized in that: The system state variables to be determined include node voltage amplitudes and voltage phases other than the balanced node.
3. The deep learning optimal power flow solution vector correction method considering feasible domain according to claim 2 is characterized in that: The deep neural network is provided with two in the initial solution stage, one of which learns the mapping relationship between load characteristics and voltage amplitude under the optimal power flow, and the other learns the mapping relationship between load characteristics and voltage phase angle under the optimal power flow.
4. The deep learning optimal power flow solution vector correction method considering feasible domain according to claim 1 is characterized in that: The condition for verifying that the initial solution result satisfies the feasibility is if and only if the initial solution result satisfies all inequality constraints and equality constraints at the same time.
5. The deep learning optimal power flow solution vector correction method considering feasible domain according to claim 1 is characterized in that: The correction of the optimal power flow calculation result based on the correction interval specifically includes: Set the objective function max(x T y), project the unconstrained y to x∈[0,1] in the feasible domain l , l is the vector dimension; Based on the multi-group marginal distribution Sinkhorn algorithm, x and y are encoded. For a set of constraints Ax≤b, the goal is to find a set of transfer matrices I that transfer the weight matrix A on the left side of the constraint to b; Normalize constraints based on row and column distributions; The initial non-negative matrix is pushed towards a matrix that satisfies the global constraints until the algorithm converges to a matrix that satisfies the constraints.
6. A deep learning optimal power flow solution vector correction method considering feasible domain according to any one of claims 1 to 5, characterized in that: The control variables include the output of the controllable distributed power source and the reactive power of the reactive compensation device in the system, as well as the output of the adjustable photovoltaic system inverter and the reactive power of the reactive compensation device.
7. The deep learning optimal power flow solution vector correction method considering feasible domain according to claim 6 is characterized in that: The state estimator of the deep neural network is trained using stochastic gradient descent.
8. The deep learning optimal power flow solution vector correction method considering feasible domain according to claim 6 is characterized in that: The combined correction constraint condition is set according to the power balance constraint of active power and reactive power during the actual operation of the system and the upper and lower power limit constraints during the operation of the equipment.
9. A computer-readable storage medium storing instructions, characterized in that: When the instruction is executed, it can implement the deep learning optimal power flow solution vector correction method considering the feasible domain as described in claim 7 or 8.
10. An electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein: When the program or instruction is executed, it can implement the deep learning optimal power flow solution vector correction method considering the feasible domain as described in claim 7 or 8.
Citation Information
Patent Citations
Power grid power flow control method and system based on artificial intelligence neural network
CN115065063A
Optimal power flow rapid solving method combining neural network and physical model
CN116720436A
Alternating current optimal power flow solving method based on distributed machine learning
CN119341006A
Multi-period optimal power flow rapid calculation method based on multi-task Transform
CN119382140A
Cited By
Data mechanism combined driving method and system for direct current optimal power flow solution
CN120724864A