Two-stage reactive power flow generation method considering switching times of reactive power compensation devices

The reactive power flow generation method constructed by the two-stage solution strategy solves the problem of low efficiency in reactive power flow generation in power systems, achieves rapid generation and feasibility requirements, reduces solution complexity and reduces the adjustment of active power output of generator units.

CN120728614BActive Publication Date: 2026-04-10SOUTH CHINA UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing reactive power flow generation methods in power systems are inefficient and cannot simultaneously meet the requirements of rapid generation and solution feasibility. In particular, in large-scale power systems, the algorithm converges slowly, takes a long time to solve, and lacks an effective feasibility correction mechanism.

Method used

A two-stage solution strategy is adopted. First, with the goal of minimizing the active power flow deviation of the branch and the square difference of the voltage at both ends of the branch, a parallel first-stage model M1 is constructed. The AC power flow is rapidly converged by adjusting the reactive power output of the generator set and the switching state of the discrete reactive power compensation device. Then, with the goal of minimizing the active power adjustment of the generator set, a second-stage model M2 is constructed. The active power output of the generator set and the state of the reactive power compensation device are adjusted to meet the AC feasibility requirements.

Benefits of technology

It significantly reduces the solution complexity of reactive power flow generation problems, improves solution efficiency, meets the power system's requirements for rapid and feasible generation of reactive power flow, and reduces the adjustment of active power output of generator units.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120728614B_ABST
    Figure CN120728614B_ABST
Patent Text Reader

Abstract

The application discloses a two-stage reactive power flow generation method considering switching times of reactive power compensation devices. The method adopts a two-stage solving strategy to solve a reactive power flow generation problem considering switching time limits of shunt reactive power compensation devices, in the first stage, an optimization model containing constraints such as switching time limits of discrete reactive power compensation devices is constructed with minimization of branch active power flow deviation and branch voltage square difference as an objective function, and linearization processing is performed, and through adjustment of switching states of the reactive power compensation devices, fast convergence of alternating current power flow is realized; in the second stage, the switching states obtained in the first stage are fixed, minimization of active power adjustment amount of a generator set is taken as an objective function, and active power output, reactive power output and terminal voltage of the generator set are further adjusted, so that the system meets alternating current feasibility requirements. The application can significantly reduce the solving complexity of the reactive power flow generation problem, accelerate the solving efficiency, and meet the fast generation and feasibility requirements of the reactive power flow of a power system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of reactive power flow generation of power systems, and particularly relates to a two-stage reactive power flow generation method considering the switching times of reactive power compensation devices. BACKGROUND

[0002] With large-scale grid connection of new energy and increasing complexity of power system structure, power system operation modes become complex and diverse, and the reactive power and voltage problems of power systems become increasingly prominent. How to quickly generate reasonable reactive power flow in the process of power grid operation mode and planning scheme compilation to make the operation mode AC power flow converge becomes increasingly important. Due to the non-frequent switching characteristics of discrete reactive power compensation devices, the reactive power flow generation problem of the power grid belongs to a strong time-coupled large-scale complex mixed integer nonlinear programming problem, which is difficult to be directly solved by using nonlinear programming algorithms or mainstream solvers. In order to ensure the solving efficiency of the reactive power flow generation problem, the common solving methods currently include: 1) intelligent optimization method; 2) deep learning method; 3) reinforcement learning method; 4) linearization of the nonlinear part in the reactive power flow generation model or relaxation of the discrete variables in the reactive power flow generation model, and then solving by using a mathematical optimization algorithm.

[0003] In the prior art, such as CN116780562A, a "power distribution network voltage reactive power control method based on DDQN algorithm" is disclosed, which includes: constructing a power distribution network voltage reactive power optimization model based on a forward-backward sweep power flow calculation method; describing the power distribution network voltage reactive power optimization model as a Markov decision MDP model in a deep reinforcement learning method; constructing a deep double Q network DDQN algorithm architecture by introducing a target network for evaluating the Q value of the action, and solving the MDP model by using the DDQN algorithm; simulating the simulation running environment of the power distribution network according to historical data, training the DDQN agent and the running environment, and making decisions on the online voltage reactive power control of the power distribution network based on the DDQN agent model after training.

[0004] In the prior art, such as CN109617092, a "method and system for dynamic reactive power optimization of AC-DC hybrid power grid" is disclosed, which includes: collecting power grid operation parameters; bringing the power grid operation parameters into a pre-constructed and processed AC-DC dynamic reactive power optimization model for solving; performing reactive power control on the AC-DC hybrid power grid system based on the solving result; wherein the processing of the AC-DC dynamic reactive power optimization model includes relaxation and linearization processing of the AC-DC dynamic reactive power optimization model based on second-order cone programming.

[0005] However, with the continuous expansion of the scale of the power system, the intelligent optimization algorithm, the deep learning and the reinforcement learning method have the problems of slow convergence speed, long solution time and the like in practical application, and it is difficult to effectively ensure the feasibility of the solution result. On the other hand, although linearization of the reactive power flow generation model or relaxation of the discrete variables can reduce the solution complexity, if there is no subsequent feasibility correction mechanism, it is also difficult to ensure the actual feasibility of the final solution. Therefore, the existing solution method has obvious contradiction between efficiency and feasibility, and it is difficult to meet the requirements of the new type of power system for reactive power flow fast generation and solution feasibility. SUMMARY

[0006] In order to solve the problem of low efficiency of reactive power flow generation of the power system, the present application provides a two-stage reactive power flow generation method considering the switching times of reactive power compensation devices.

[0007] The object of the present application is achieved at least by one of the following technical solutions.

[0008] The two-stage reactive power flow generation method considering the switching times of reactive power compensation devices comprises the following steps:

[0009] S1, initializing a total optimization period episode, an optimization period M1_T of a first stage model M1, a maximum adjustment interval length M2_T_Max of a second stage model M2, and reading network data and source and load output data of each period in the total optimization period;

[0010] S2, combining the source and load output of each period obtained in S1 with the network data, and performing direct current flow calculation in parallel to obtain node voltage phase angle and branch active power flow of each period;

[0011] S3, taking M1_T as the optimization period, and constructing a model M with the objective function of minimizing the branch active power flow deviation and the square difference of the voltages at both ends of the branch;

[0012] S4, linearizing the model M to construct the first stage model M1;

[0013] S5, combining the calculation results of step S2, instantiating episode / M1_T models M1 with M1_T as the optimization period, and performing solution to obtain discrete reactive power compensation device switching state results;

[0014] S6, based on the solution results of S5, performing alternating current flow calculation in parallel, and judging whether the alternating current flow calculation results of each period meet the alternating current feasibility requirements, and adding the periods not meeting the alternating current feasibility requirements to an adjustment set F;

[0015] S7, judging whether the adjustment set F is empty, if yes, executing step S11, and if not, executing step S8;

[0016] S8. Sort the time periods in the adjustment set F in chronological order, and divide them into several intervals according to whether the time periods are adjacent, and the length of each interval does not exceed M2_T_Max;

[0017] S9. Taking the minimum adjustment of the active power output of the generator set as the objective function, and fixing the switching state of the discrete reactive power compensation devices such as parallel capacitors / reactors obtained from the solution of the first stage model M1, construct the second stage model M2.

[0018] S10. For each interval obtained in step S8, instantiate the second-stage model M2, while considering the ramping constraints between the first and last feasible time periods adjacent to the interval, and solve them in parallel.

[0019] S11. Output the solution results of the second-stage model M2 to obtain the reactive power flow configuration that meets the AC feasibility requirements.

[0020] Furthermore, in step S3, the objective function in model M is expressed as follows:

[0021]

[0022] In the formula, NL Indicates the number of branches; K Represents the set of branches; Indicate the start and end nodes are respectively i and j The side road; Indicates a branch exist t The positive active power of AC over a given time period; PAC ji,t Indicates a branch exist t The reverse active power of AC over a time period; PDC ij,t Indicates a branch exist t The positive active power during the time period is calculated from the DC power flow and is a known value. Represents a node i exist t Voltage amplitude over a time period; Represents a node j exist t Voltage amplitude over a time period. Among them, The calculation formula is as follows:

[0023]

[0024] In the formula, , Representing nodes respectively i and nodes j The electrical conductance and susceptance between them; representing a node i and a node j at t a voltage phase angle difference of a time period.

[0025] The model M includes the following constraints: 1) upper and lower limits of reactive power output of the thermal power unit; 2) AC power flow equation constraint; 3) node voltage amplitude constraint; 4) node voltage phase angle constraint; 5) branch transmission power constraint; 6) parallel capacitor / reactor capacity constraint; 7) total switching times of the parallel capacitor / reactor constraint.

[0026] Further, the model M is linearized in step S4, and the mixed integer nonlinear programming model is simplified into a mixed integer linear programming model to obtain the first-stage model M1, and the linearization method is as follows:

[0027] 1) the first-order Tailor expansion is used to linearize the nonlinear term U i U j cosα ij and U i U j sinα ij , and the linearization expression is as follows:

[0028]

[0029] In the formula, representing a voltage amplitude of a node i ; representing a voltage amplitude of a node j ; representing a voltage phase angle difference between a node i and a node j ; representing a Tailor expansion point of ; representing a Tailor expansion point of ; representing a Tailor expansion point of .

[0030] U i U j , and the linearization expression is as follows:

[0031]

[0032] 2) in mathematics, like x | C The absolute value constraint can be equivalent to - C x C Based on this, absolute values ​​in model M can be removed.

[0033] Based on the linearization method described above, the objective function of the first-stage model M1 is:

[0034]

[0035] In the formula, M 1 _T This indicates the optimization period of model M1 in the first stage; and Branch roads ( i, j )exist t Auxiliary variables for time period The calculation formula is as follows:

[0036]

[0037] In the formula, The calculation formula is as follows:

[0038]

[0039] In the formula, α ij,t,0 In order to be in t Branches obtained from DC power flow calculation over a time period ( i, j The phase angle difference between the voltages at the two nodes is a known quantity.

[0040] Auxiliary variables The calculation formula is as follows:

[0041]

[0042] The constraints of the first-stage model M1 are as follows:

[0043] 1) Upper and lower limits of reactive power output of thermal power units

[0044]

[0045] In the formula, Q G,n,min Indicates the first n Minimum reactive power output of a thermal power unit; Q G,n,t Indicates the first n Taiwan thermal power units t Reactive power over a time period; Q G,n,max Indicates the firstn The maximum reactive power output of the thermal generating units.

[0046] 2) Linearized AC power flow equation constraints

[0047]

[0048] where, P G,i,t denotes the active power output of the thermal generating units at bus i during the time period t ; P R,i,t denotes the active power output of the new energy generating units at bus i during the time period t ; Q G,i,t denotes the reactive power output of the thermal generating units at bus i during the time period t ; Q C,i,t denotes the reactive power compensation of the shunt capacitor / reactor at bus i during the time period t , which is a discrete variable; U i,t , U j,t denote the voltage amplitude of bus i and bus j during the time period t ; N denotes the number of AC buses in the system.

[0049] 4) Constraints on the square of the voltage amplitude of the bus

[0050]

[0051] where, U i,min denotes the minimum value of the voltage amplitude of bus i ; U i,max denotes the maximum value of the voltage amplitude of bus i .

[0052] 5) Constraints on the phase angle of the voltage of the bus

[0053]

[0054] where, denotes the minimum value of the phase angle of the voltage of bus i ; denotes the maximum value of the phase angle of the voltage of bus i ; θ i,t denotes the phase angle of the voltage of bus i during the time periodt Voltage phase angle of time period.

[0055] 6) Branch transmission power constraint

[0056]

[0057] where, is the maximum transmission power of branch .

[0058]

[0059] where, represents the minimum value of the m th shunt capacitor / reactor reactive power compensation amount; represents the maximum value of the m th shunt capacitor / reactor reactive power compensation amount, NC represents the number of shunt capacitors / reactors.

[0060] 8) Linearized total switching frequency constraint of shunt capacitors / reactors

[0061]

[0062] where, represents the maximum switchable times of the m th shunt capacitor / reactor in the period ; represents the auxiliary variable of the m th shunt capacitor / reactor in the time period t, and its calculation formula is as follows:

[0063]

[0064] where, represents the switching frequency of the m th shunt capacitor / reactor in the time period t. When t =1, t = , represents the initial switching frequency of the th shunt capacitor / reactor. m

[0065] Further, in step S5, combined with the calculation result of step S2, the total optimization period is divided into episode / M1_T sub-periods, and the model M1 is instantiated for each sub-period, and the Gurobi solver is used for serial solution in turn, and in the solving process, the switching state of the shunt capacitor / reactor at the end of the current sub-period is taken as the initial switching state of the shunt capacitor / reactor in the next sub-period.​

[0066] Further, in step S6, it is judged whether the AC power flow calculation result meets the AC feasibility requirements at the same time, and the time period that does not meet the AC feasibility requirements is added to the adjustment set F. The AC feasibility requirements include: 1) whether the node voltage amplitude is within the specified range; 2) whether the branch transmission active power is within the specified range; and 3) whether the generator set reactive power output is within the specified range.

[0067] Further, in step S9, the switching state of the discrete reactive compensation device such as the shunt capacitor / reactor obtained by fixing the first stage model M1 is taken as the objective function of the minimum generator set active power adjustment amount, and a second stage model M2 is constructed. The objective function expression in the second stage model M2 is as follows:

[0068]

[0069] In the formula, P (t) represents the active power of the t-th thermal power unit in the time period t; P (t, 0) represents the initial active power of the t-th thermal power unit in the time period t; P (t) represents the active power of the t-th new energy unit in the time period t; P (t, 0) represents the initial active power of the t-th new energy unit in the time period t; and P (t) represents the active power of the t-th shunt capacitor / reactor in the time period t. M 2 _T represents the total time period; NG represents the number of thermal power units; represents the active power of the t-th thermal power unit in the time period t; n represents the initial active power of the t-th thermal power unit in the time period t; t represents the number of new energy units; represents the active power of the t-th new energy unit in the time period t; n represents the initial active power of the t-th new energy unit in the time period t; t NR k t k t

[0070] The second stage model M2 includes the following constraint conditions: 1) upper and lower limit constraints of the thermal power unit active power; 2) upper and lower limit constraints of the thermal power unit reactive power; 3) upper and lower limit constraints of the new energy unit active power; 4) AC power flow equation constraints; 5) node voltage amplitude constraints; 6) node voltage phase angle constraints; 7) branch transmission power constraints; and 8) thermal power unit ramping constraints.

[0071] Further, in step S10, for each interval obtained in step S8, the ramping constraints between the adjacent feasible time periods at the beginning and end of the interval are considered when instantiating the second stage model M2, and the interior point method is used for parallel solving.

[0072] The application also provides a computer device.

[0073] The application also provides a computer readable storage medium.​​​​​​​​

[0074] Compared with the prior art, the present application can achieve the beneficial effects at least as follows:

[0075] The present application aims at the problem of low efficiency of power system reactive power flow generation method, and solves the reactive power flow generation problem considering the switching times limit of shunt reactive power compensation device by using a two-stage solving strategy, first, an optimization model is constructed by taking the minimization of branch active power flow deviation and branch voltage square difference as the objective function, considering the switching times limit of discrete reactive power compensation device and other constraint conditions, then the model is linearized to obtain the first-stage optimization model, which realizes the fast convergence of alternating current power flow by adjusting the generator reactive power output, terminal voltage and switching state of discrete reactive power compensation device; in the second stage, the switching state of discrete reactive power compensation device obtained in the first stage is fixed, a second-stage optimization model is constructed by taking the minimization of generator active power adjustment as the objective function, which makes the system meet the alternating current feasibility requirements such as voltage safety by adjusting the generator active power output, reactive power output and terminal voltage. The two-stage solving strategy is used to solve the reactive power flow generation problem, which can significantly reduce the solving complexity of the reactive power flow generation problem, speed up the solving efficiency, and meet the requirements of fast generation and feasibility of power system reactive power flow. BRIEF DESCRIPTION OF DRAWINGS

[0076] Figure 1 is the flowchart of the two-stage reactive power flow generation method considering the switching times of reactive power compensation device provided by the embodiment of the present application.

[0077] Figure 2 is the modified IEEE39 node system test network structure diagram in the two-stage reactive power flow generation method considering the switching times of reactive power compensation device provided by the embodiment of the present application.

[0078] Figure 3 is the active load curve diagram of each node in the two-stage reactive power flow generation method considering the switching times of reactive power compensation device provided by the embodiment of the present application.

[0079] Figure 4 is the active power output curve diagram of each generator in the two-stage reactive power flow generation method considering the switching times of reactive power compensation device provided by the embodiment of the present application.

[0080] Figure 5 is the switching state change curve diagram of shunt capacitor / reactor in the two-stage reactive power flow generation method considering the switching times of reactive power compensation device provided by the embodiment of the present application.

[0081] Figure 6 is the node voltage amplitude change curve diagram in the two-stage reactive power flow generation method considering the switching times of reactive power compensation device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0082] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.

[0083] Referring to Figure 1 , the two-stage reactive power flow generation method considering the switching times of the reactive power compensation device provided by the embodiment of the present application includes the following steps:

[0084] S1, initializing the total optimization period episode, the optimization period M1_T of the first-stage model M1, the maximum adjustment interval length M2_T_Max of the second-stage model M2, and reading the network topology data and the source and load output data of each time period in the total optimization period episode.

[0085] In one embodiment of the present application, the reactive power flow generation is performed on the IEEE39 node system. On the basis of the original IEEE39 node system, the thermal power unit at node 32 is replaced by a photovoltaic unit, and the thermal power unit at node 37 is replaced by a wind turbine. The system topology diagram is shown in Figure 2 . The total optimization period episode is set to 96, the optimization period M1_T of the first-stage model M1 is set to 24, and the maximum adjustment interval length M2_T_Max of the second-stage model M2 is set to 4. The active load curve of each load node is shown in Figure 3 . The change curve of the reactive power of the load is the same as that of the active power, and the maximum total switching times of the shunt capacitor / reactor within 24 hours is set to 20, and the switching reactive power of each group is 5 MVar.

[0086] S2, combining the source and load output data of each time period obtained in step S1 with the network topology data, and performing direct current flow calculation in parallel to obtain the node voltage phase angle and branch active power flow of each time period.

[0087] The formula of the direct current flow calculation is as follows:

[0088]

[0089] In the formula, P is the injection active power vector of each node, which can be obtained from the source and load output data; B is the node admittance matrix considering only the branch reactance, which can be obtained from the network topology data; is the voltage phase angle vector of each node.

[0090] After obtaining the voltage phase angle vector of each node based on the above formula, the branch active power flow can be calculated, and the calculation formula is as follows:

[0091]

[0092] wherein, denotes the active power flow of branch i , j denotes the susceptance of branch i , j , denotes the voltage phase angle of node i and node j

[0093] S3, taking the optimization period M1_T of the first stage model M1 as the optimization period, a model M is constructed, which takes the minimization of the branch active power flow deviation and the branch voltage square difference as the objective function.

[0094] The objective function in the model M is expressed as follows:

[0095]

[0096] wherein, NL denotes the number of branches; K denotes the branch set; denotes the branch with the start node and the end node being and denotes the AC forward active power of branch in the time period denotes the AC reverse active power of branch ) in the time period denotes the DC forward active power of branch in the time period , which is a known value; denotes the voltage amplitude of node i in the time period t denotes the voltage amplitude of node in the time period t

[0097] wherein, the calculation formula of

[0098]

[0099] wherein, , denotes the voltage phase angle of node i and node j ​​​​​​​​The electrical conductance and susceptance between them; Represents a node i and nodes j exist t Voltage phase angle difference over a time period.

[0100] Model M includes the following constraints:

[0101] 1) Upper and lower limits of reactive power output of thermal power units

[0102]

[0103] In the formula, Indicates the first n Minimum reactive power output of a thermal power unit; Indicates the first n Taiwan thermal power units t Reactive power over a time period; Indicates the first n The maximum reactive power output of the thermal power unit in Taiwan; NG This indicates the number of thermal power units.

[0104] 2) Exchange flow equation constraint

[0105]

[0106] In the formula, Represents a node i Thermal power units at t Efforts and contributions over a given period of time; Represents a node i New energy units at t Efforts and contributions over a given period of time; Represents a node i Thermal power units at t Unproductive output during a given period of time; Represents a node i Parallel capacitors / reactors at t The reactive power compensation amount over a time period is a discrete variable; U i,t , U j,t Representing nodes respectively i and nodes j exist t Voltage amplitude over a time period; N This indicates the number of communication nodes in the system.

[0107] 3) Node voltage amplitude constraints

[0108]

[0109] In the formula, Represents a nodei Minimum voltage amplitude; Represents a node i The maximum value of the voltage amplitude.

[0110] 4) Node voltage phase angle constraint

[0111]

[0112] In the formula, Represents a node i Minimum voltage phase angle; Represents a node i The maximum value of the voltage phase angle; Represents a node i exist t Voltage phase angle over a time period.

[0113] 5) Branch transmission power constraints

[0114]

[0115] In the formula, Indicates a branch 6) Maximum transmission power. (Note: The last part, "6), refers to the capacity constraints of parallel capacitors / reactors."

[0116]

[0117] In the formula, Indicates the first m Minimum value of reactive power compensation for a parallel capacitor / reactor; Indicates the section number m The maximum value of reactive power compensation for each parallel capacitor / reactor. Indicates the number of capacitors / reactors connected in parallel.

[0118] 7) Constraint on the total number of switching operations for parallel capacitors / reactors

[0119]

[0120] In the formula, Indicates the first m A parallel capacitor / reactor in t Number of throws / cuts within a time period Indicates the first m The maximum number of times a parallel capacitor / reactor can be switched within the optimization period M1_T of model M. When t When =1, = , Indicates the first m The initial number of switching operations for a parallel capacitor / reactor. In one embodiment of the invention, Set to 20.

[0121] S4, linearizing the model M, simplifying the mixed integer nonlinear programming model into a mixed integer linear programming model, to obtain a first stage model M1.

[0122] The linearization method is as follows:

[0123] 1) using a first order Tailor expansion to linearize the nonlinear terms in the model M and . The linearization process is as follows:

[0124] First, the first order Tailor expansion of and at in the alternating current flow equation is:

[0125]

[0126] Bringing the above formula into and , we can get:

[0127]

[0128] The first order Tailor expansion at point ) is:

[0129]

[0130] Bringing the above formula together, we can get:

[0131]

[0132] In the formula, represents the voltage amplitude of node i ; represents the voltage amplitude of node j ; represents the voltage phase angle difference between node i and node j ; represents the Tailor expansion point of ; represents the Tailor expansion point of ; represents the Tailor expansion point of .

[0133] Since the model M is to reasonably configure the reactive power output of the reactive power source on the basis of active power balance, the AC power flow calculation converges, and the active power flow of the operation mode is basically not changed, therefore, the node voltage phase angle difference obtained by the DC power flow calculation can be taken as the Tailor expansion point of , and the Tailor expansion point of is 1, thereby removing the non-convex and nonlinear problems caused by the trigonometric function.

[0134] Then, the linearization is performed on , and can be expanded and expressed as:

[0135]

[0136] Considering that the node voltage U is generally expressed in per unit, and the amplitude difference of the node voltages at both ends of the branch is small, the can be ignored, and therefore, the above formula can be expressed as:

[0137]

[0138] After simplification, the following formula is obtained:

[0139]

[0140] 2) In mathematics, the absolute value constraint in the form of x | C can be equivalent to C x C . The x represents a variable ,C , and the represents a constant. Based on this, the absolute value in the model M can be removed. Taking the switching times constraint of the shunt capacitor / reactor as an example for description. First, an auxiliary variable is introduced, and the following formula is obtained:

[0141]

[0142] Therefore, the total switching times constraint of the shunt capacitor / reactor can be equivalent to:

[0143]

[0144] And the inequality constraint is used to replace the above formula:

[0145]

[0146] In summary, based on the above model linearization method, the objective function of the first-stage model M1 can be expressed as:

[0147]

[0148] In the formula, This indicates the optimization period of model M1 in the first stage; and All are branch roads exist t Auxiliary variables for time period The calculation formula is as follows:

[0149]

[0150] In the formula, The calculation formula is as follows:

[0151]

[0152] In the formula, For the branch obtained by DC power flow calculation in time period t ( i, j The phase angle difference between the voltages at the two nodes is a known quantity.

[0153] Auxiliary variables The calculation formula is as follows:

[0154]

[0155] The constraints of the first-stage model M1 include upper and lower limits of reactive power output of thermal power units, linearized AC power flow equation constraints, node voltage magnitude square constraints, node voltage phase angle constraints, branch transmission power constraints, shunt capacitor / reactor capacity constraints, and linearized constraints on the total number of switching operations of shunt capacitors / reactors. Among these, the expressions for the upper and lower limits of reactive power output of thermal power units, node voltage phase angle constraints, branch transmission power constraints, and shunt capacitor / reactor capacity constraints are the same as those for the corresponding constraints in model M.

[0156] The linearized AC power flow equation constraints are as follows:

[0157]

[0158] In the formula, Represents a node i Thermal power units at t Efforts and contributions over a given period of time; Represents a node i New energy units at t Efforts and contributions over a given period of time; Represents a node i Thermal power units at tUnproductive output during a given period of time; Represents a node i Parallel capacitors / reactors at t The reactive power compensation amount over a time period is a discrete variable; U i,t , U j,t Representing nodes respectively i and nodes j exist t Voltage amplitude over a time period; N This indicates the number of communication nodes in the system.

[0159] The constraint on the square of the node voltage magnitude is as follows:

[0160]

[0161] In the formula, U i,min Represents a node i Minimum voltage amplitude; U i,max Represents a node i The maximum value of the voltage amplitude.

[0162] The total number of switching operations for the linearized parallel capacitor / reactor is constrained as follows:

[0163]

[0164] In the formula, Show the first m A parallel capacitor / reactor in the cycle The maximum number of times a cut can be made; Indicates the first m A parallel capacitor / reactor in t The auxiliary variable for the time period is calculated using the following formula:

[0165]

[0166] S5. Based on the calculation results of step S2, instantiate episode / M1_T first-stage models M1 with the optimization period M1_T as the optimization period, and use the Gurobi solver to solve them serially to obtain the terminal voltage of the thermal power unit and the switching status of the parallel capacitors / reactors within the total optimization period episode.

[0167] The specific process is as follows:

[0168] S5.1 Initialize h=1;

[0169] S5.2, before solving the hth first-stage model M1, the switching state of the shunt capacitor / reactor at the end time of the (h-1)th first-stage model M1 is taken as the initial switching state of the hth first-stage model M1. When h=1, the initial switching state is the default value artificially set. In one embodiment of the present application, the initial switching state of all shunt capacitors / reactors is set to 0, i.e. no shunt compensation device is switched at the initial time;

[0170] S5.3, the hth first-stage model M1 is instantiated in combination with the calculation result of step S2;

[0171] S5.4, the hth first-stage model M1 is solved by using the Gurobi solver;

[0172] S5.5, h=h+1;

[0173] S5.6, it is judged whether h is greater than episode / M1_T. If yes, step S5.7 is executed. If no, step S5.3 is returned to be executed;

[0174] S5.7, after all the first-stage models M1 are solved, the results of the terminal voltage of the thermal power unit and the switching state of the shunt capacitor / reactor in the total optimization period episode are obtained.

[0175] S6, based on the solving result of S5, the AC power flow calculation (which is a known method and the calculation process is not described here) is performed in parallel, and it is judged whether the AC power flow calculation result meets the AC feasibility requirement. The time period that does not meet the AC feasibility requirement is added to the adjustment set F.

[0176] The AC power flow calculation result needs to meet the following AC feasibility requirements at the same time, including: 1) whether the node voltage amplitude is within the specified range; 2) whether the branch transmission active power is within the specified range; 3) whether the generator reactive power output is within the specified range.

[0177] S7, it is judged whether the adjustment set F is empty. If yes, step S8 is executed. If no, step S6 is executed;

[0178] S8, the adjustment set F is sorted in time sequence, and is divided into several intervals according to whether the time periods are adjacent, and the length of each interval is not more than the maximum adjustment interval length M2_T_Max of the second-stage model M2;

[0179] In one embodiment of the present invention, taking K=[2,1,3,4,8,9,11] as an example, the adjustment set F is first sorted in chronological order to obtain K=[1,2,3,4,8,9,11]. Then, it is divided into several intervals according to whether the time periods are adjacent. The length of each interval does not exceed 4. The division results are: [1,2,3,4], [5], [8,9],

[11] .

[0180] S9. Taking the minimum adjustment of the generator set's active power output as the objective function, and fixing the switching states of the discrete reactive power compensation devices such as parallel capacitors / reactors obtained from the solution of the first-stage model M1, construct the second-stage model M2; the objective function expression in the second-stage model M2 is as follows:

[0181]

[0182] In the formula, M 2 _T This indicates the total time period being calculated, and its specific value is determined by the interval length obtained in step S8; NG Indicates the number of thermal power units; Indicates the first n Taiwan thermal power units t Active power over a time period; Indicates the first n Taiwan thermal power units t Initial active power over a given time period; NR This indicates the number of new energy generating units (photovoltaic, wind power); Indicates the first k Taiwan's new energy power units t Active power over a time period; Indicates the first k Taiwan's new energy power units t The initial active power over a given time period.

[0183] The constraints in the second-stage model M2 include: 1) upper and lower limits of active power output of thermal power units; 2) upper and lower limits of reactive power output of thermal power units; 3) upper and lower limits of active power output of renewable energy units; 4) AC power flow equation constraints; 5) node voltage amplitude constraints; 6) node voltage phase angle constraints; 7) branch transmission power constraints; and 8) thermal power unit ramping constraints. Except for the active power output constraints of thermal power units, renewable energy units, and thermal power unit ramping constraints, the expressions for the other constraints are the same as those for the corresponding constraints in model M.

[0184] The active power output constraint expression for thermal power units is as follows:

[0185]

[0186] In the formula, Indicates the first n The minimum active power output of a thermal power unit in Taiwan; Indicates the first n The maximum active power output of the Taiwan thermal power unit Indicates the first n Taiwan thermal power units t Active power over a given time period.

[0187] The active power output constraint expression for new energy generating units is as follows:

[0188]

[0189] In the formula, Indicates the first k The maximum active power output of the new energy unit in Taiwan.

[0190] The expression for the ramp-up constraint of thermal power units is as follows:

[0191]

[0192] In the formula, Indicates the first n The maximum uphill climbing rate of the thermal power unit; Indicates the first n The maximum downhill ramp rate of the thermal power unit.

[0193] S10. For each interval in step S8, when instantiating the second-stage model M2, the ramping constraints between the first and last feasible time periods adjacent to the beginning and end of the interval should be considered simultaneously, and then the interior point method should be used to solve in parallel.

[0194] Taking the interval [3,4,5] as an example, when instantiating the second-stage model M2, it is necessary to consider the ramping constraints between time period 2 and time period 3, as well as the ramping constraints between time period 5 and time period 6. In time period 2 and time period 6, the active power output of the thermal power unit is a constant value.

[0195] S11. Output the solution results of the second-stage model M2 to obtain the reactive power flow configuration that meets the AC feasibility requirements.

[0196] In one embodiment of the present invention, the solution results are shown in Table 1, and the corresponding switching state change curves of the parallel capacitor / reactor are shown in Table 1. Figure 5 As shown, the node voltage amplitude variation curve is as follows: Figure 6As shown in Table 1. To better verify the effectiveness of the embodiments of this invention, the two-stage reactive power flow generation method proposed in this invention is compared with the following two mainstream methods: one is a direct solution method that uses the KNITRO solver to directly solve the reactive power flow generation model; the other is a method that relaxes the discrete variables in the reactive power flow generation model, solves it using the interior point method, and discretizes the relaxed variables based on the nearest integer rounding method. The solution results of the comparative methods are shown in Table 1. The reactive power flow generation model uses the objective function of the second-stage model M2 as the objective function, while considering the constraints of both model M and the second-stage model M2. The nearest integer rounding method refers to rounding a value to its nearest integer according to the rounding rules.

[0197] Table 1. Solution results using different methods in the embodiments.

[0198]

[0199] The calculation formula for the average voltage deviation described in Table 1 is as follows:

[0200]

[0201] In the formula, N Indicates the number of communication nodes in the system; This represents the average voltage deviation within the total optimization period (episode). Represents a node i exist t The average voltage deviation is used to measure the degree to which the voltage of each node in the reactive power flow generation scheme deviates from the standard value of 1. The larger the average voltage deviation, the greater the deviation of the node voltage from the standard value, and the worse the corresponding reactive power flow configuration scheme.

[0202] The calculation formula for the active power adjustment amount described in Table 1 is as follows:

[0203]

[0204] In the formula, This represents the active power adjustment within the total optimization period (episode). NG Indicates the number of thermal power units; Indicates the first n Taiwan thermal power units t Active power over a time period; Indicates the first n Taiwan thermal power units t Initial active power over a given time period; NR This indicates the number of new energy generating units (photovoltaic, wind power); Indicates the first k Taiwan's new energy power unitst active power of the time period; represent the first k The Tai Xin energy unit is in t active power of the time period. The active adjustment amount is used to measure the influence degree of the reactive power flow generation scheme on the active power flow distribution. The greater the active adjustment amount, the stronger the disturbance of the reactive power flow generation scheme on the active power flow, and the worse the corresponding reactive power flow configuration scheme.

[0205] As shown in Table 1, compared with the direct solution method and the relaxation discrete variable solution method, the solution time of the method provided by the embodiment of the present application is shorter, the generated reactive power flow configuration scheme has smaller average voltage deviation degree, and the active output of the generator unit does not need to be adjusted, that is, the AC feasibility requirement can be met. The above results show that under the premise of meeting the AC feasibility constraint, the embodiment of the present application can efficiently generate the reactive power flow configuration scheme, and meet the actual demand of the power system on the rapid generation and solution feasibility of the reactive power flow.

[0206] In one of the embodiments of the present application, a computer device is also provided, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of the foregoing embodiment when executing the computer program.

[0207] In one of the embodiments of the present application, a computer readable storage medium is also provided, which stores a computer program, and the computer program is executed by a processor to implement the method of the foregoing embodiment.

[0208] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A two-stage reactive power flow generation method considering the switching times of reactive power compensation devices, characterized in that, The method comprises the following steps: S1, initializing a total optimization period episode, an optimization period M1_T of a first-stage model M1, a maximum adjustment interval length M2_T_Max of a second-stage model M2, and reading grid data and source load output data of each period in the total optimization period episode; S2, combining the source load output of each period with the grid data, and performing a direct current power flow calculation in parallel to obtain node voltage phase angles and branch active power flows of each period; S3, taking M1_T as the optimization period, and constructing a model M with the objective function of minimizing branch active power flow deviations and branch voltage square differences; S4, performing linearization processing on the model M to construct the first-stage model M1; S5, combining the calculation results of step S2, instantiating episode / M1_T first-stage models M1 with M1_T as the optimization period, and performing solving to obtain the switching state results of the reactive power compensation devices; S6, based on the solving results of S5, performing an alternating current power flow calculation in parallel, and judging whether the alternating current power flow calculation results of each period meet the alternating current feasibility requirements, and adding the periods that do not meet the alternating current feasibility requirements to an adjustment set F; S7, judging whether the adjustment set F is empty, if yes, taking the solving results of the first-stage model M1 as the equivalent solving results of the second-stage model M2, and performing step S11, if not, performing step S8; S8, sorting the periods in the adjustment set F in time sequence, and dividing them into several intervals according to whether the periods are adjacent, and the length of each interval is not more than M2_T_Max; S9, taking the minimum generator active power output adjustment amount as the objective function, fixing the switching state of the discrete reactive power compensation devices obtained by solving the first-stage model M1, and constructing the second-stage model M2; S10, instantiating the second-stage model M2 for each interval obtained in step S8, considering the climbing constraint between the adjacent feasible periods at the beginning and end of the interval, and performing parallel solving; S11, outputting the solving results of the second-stage model M2 to obtain the reactive power flow configuration meeting the alternating current feasibility requirements. 2.The two-stage reactive power flow generation method considering the switching times of reactive power compensation devices according to claim 1, characterized in that, In step S3, the objective function in the model M is expressed as follows: In the formula, NL represents the number of branches; K represents a branch set; represents a branch with start node and end node ; represents a branch ; represents the AC forward active power of the branch in the time period ; ) represents the AC reverse active power of the branch in the time period ; represents a branch ; represents the forward active power of the branch in the time period calculated by DC power flow ; represents the voltage amplitude of node i in the time period t ; represents the voltage amplitude of node in the time period t ; The model M comprises the following constraint conditions: 1) upper and lower limits of the reactive power output of the thermal power unit; 2) alternating current power flow equation constraints; 3) node voltage amplitude constraints; 4) node voltage phase angle constraints; 5) branch transmission power constraints; 6) parallel capacitor and reactor capacity constraints; 7) total switching times of the parallel capacitor and reactor constraints. 3.The two-stage reactive power flow generation method considering the switching times of reactive power compensation devices according to claim 1, characterized in that, In step S4, the objective function of the first-stage model M1 is: wherein denotes the optimization period of the first stage model M1 ; and are branch In the time period auxiliary variable; denotes the number of branches; denotes the set of branches.

4. The two-stage reactive power flow generation method considering the switching times of reactive power compensation devices according to claim 3, characterized in that, auxiliary variable The calculation formula is as follows: In the formula, The calculation formula is as follows: In the formula, is the power flow of the branch in the time period t is the voltage amplitude of the node is the phase angle difference between the two end nodes is the node i is the voltage amplitude of the node in the time period is the node is the voltage amplitude of the node in the time period is the node i is the node j is the phase angle difference between the two nodes t in the time period , is the conductance between the two nodes is the susceptance between the two nodes ​ auxiliary variable The calculation formula is as follows: The constraint conditions of the first-stage model M1 comprise: upper and lower limits of the reactive power output of the thermal power unit, linearized alternating current power flow equation constraints, node voltage amplitude square constraints, node voltage phase angle constraints, branch transmission power constraints, parallel capacitor and reactor capacity constraints, and linearized total switching times of the parallel capacitor and reactor constraints.

5. The two-stage reactive power flow generation method considering the switching times of reactive power compensation devices according to claim 1, characterized in that, In step S5, the Gurobi solver is used for serial solving, and in the solving process, the switching state of the parallel capacitor and reactor at the end of the current sub-period is taken as the initial switching state of the parallel capacitor and reactor in the next sub-period.

6. The two-stage reactive power flow generation method considering the switching times of reactive power compensation devices according to claim 1, characterized in that, In step S6, the AC feasibility requirements include: 1) whether the node voltage amplitude is within a specified range; 2) whether the branch transmission active power is within a specified range; and 3) whether the generator set reactive power output is within a specified range.

7. The two-stage reactive power flow generation method considering the switching times of reactive power compensation devices according to claim 1, characterized in that, In step S9, the target function expression in the second-stage model M2 is as follows: In the formula, M 2 _T denotes the total time period, NG denotes the number of thermal power units; denotes the active power of the thermal power unit No. n in the time period; t denotes the initial active power of the thermal power unit No. in the time period; n denotes the active power of the new energy unit No. t in the time period; NR denotes the number of new energy units; denotes the active power of the new energy unit No. k in the time period; t denotes the initial active power of the new energy unit No. in the time period; k denotes the initial active power of the new energy unit No. t in the time period; The second-stage model M2 includes the following constraints: upper and lower limits of the thermal power generator set active power; upper and lower limits of the thermal power generator set reactive power; upper and lower limits of the new energy generator set active power; AC power flow equation constraints; node voltage amplitude constraints; node voltage phase angle constraints; branch transmission power constraints; and thermal power generator set ramping constraints.

8. The two-stage reactive power flow generation method considering the switching times of reactive power compensation devices according to any one of claims 1-7, characterized in that, In step S10, the interior point method is used for parallel solution.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method of any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Power distribution network voltage reactive power control method based on DDQN algorithm

    CN116780562A

  • Two-stage reactive power regulation method for active power distribution network based on opportunity constraint optimization

    CN113162060A

  • Multi-time-scale reactive power scheduling method and system for power distribution network containing controllable photovoltaic

    CN115313504A