Optimal power flow calculation method and system based on data-driven quadratic approximation method

By constructing data-driven convex and non-convex quadratic approximation models in the power system, the problems of unsatisfactory optimization results and poor scalability in the optimal power flow calculation of the power system are solved, and the efficient solution of the model and the satisfaction of safety constraints are achieved, providing Get better power flow calculation results.

CN117833252BActive Publication Date: 2024-09-10SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311746781.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-15
Publication Date
2024-09-10
Estimated Expiration
2043-12-15

AI Technical Summary

Technical Problem

Existing data-driven methods have problems such as unsatisfactory model optimization results, lack of physical explanation, poor system scalability and limited model feasibility in the calculation of optimal power flow in power systems, especially when considering Ohm's law and Kirchhoff's voltage. law and Kirchhoff's current law.

Method used

A data-driven convex and non-convex quadratic approximation method is proposed. By constructing a data-driven optimal power flow calculation model, the branch power balance equation is used to maintain the quadratic form of the model, and explicit inequalities are generated through convex approximation or non-convex approximation. , replace the equations in the physical part, and perform power flow calculations based on historical data to form DDCAM and DDNAM models.

Benefits of technology

A balance between the model's optimized solution speed and system safety constraints is achieved. DDCAM is better than the solution speed and DDNAM is better than the feasibility. The two collaborative frameworks can complement each other and improve the performance and feasibility of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117833252B
    Figure CN117833252B
Patent Text Reader

Abstract

The present invention belongs to the technical field of power system, and provides an optimal power flow calculation method and system based on a data-driven quadratic approximation method. The scheme is as follows: a data-driven optimal power flow model based on convex and non-convex quadratic approximation is proposed, and a framework for the collaborative application of the two models is provided. The proposed data-driven convex approximation model uses a data-driven method to generate a quadratic convex envelope to approximate the original quadratic equation, and convexifies the original feasible domain on the basis of following physical laws. The proposed data-driven non-convex approximation model uses data-driven generation of quadratic non-convex equations to approximate the original quadratic equation, and retains non-convexity on the basis of maintaining the accuracy of the feasible domain. The collaborative framework of the data-driven convex approximation model and the data-driven non-convex approximation model can realize the complementary use of the two models. Finally, it is verified in the standard optimal power flow example that the proposed model is superior to the current optimal power flow calculation method in terms of optimality, feasibility, and interpretability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power systems, and in particular relates to an optimal power flow calculation method and system based on a data-driven quadratic approximation method. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] The accuracy of the power system model fundamentally depends on the precise values ​​of parameters such as impedance. Line parameters may change due to factors such as temperature, weather, material aging, frequency fluctuations, etc., resulting in differences between the mathematical model and the model of the actual system. Due to the large scale of the transmission and distribution system and the unknowable parameter changes, it is costly to accurately measure the system line parameters in real time. At the same time, data-driven methods have developed rapidly in the research of power system flow calculation and optimal power flow calculation. In the power system, in order to achieve the energy balance of the entire system, power industry organizations need to monitor the system status in real time, so they can obtain a large amount of infrastructure operation data to provide data support for the application of data-driven methods. In the field of power system flow calculation and optimal power flow calculation, data-driven methods can use historical data and prior knowledge to quickly provide accurate results and improve the economy and safety of the system.

[0004] In recent years, data-driven methods have been widely used in power system power flow calculation. Related research usually trains power flow calculation models based on the input-output mapping relationship between unknown variables and known variables. The data-driven methods used to train the models include ordinary least squares, partial least squares, least absolute shrinkage and selection operator regression, deep neural networks, superposition denoising encoders, etc. The power flow calculation models built by these data-driven methods have high accuracy, but they cannot be directly applied to optimal power flow calculation. The main reason is that the data-driven power flow calculation model is based on the input-output mapping relationship, and the optimal power flow calculation model is based on physical laws. The different mathematical forms of the two models lead to the inequality of the optimal power flow feasible domain.

[0005] In recent years, a series of progress has been made in the research on establishing linear optimal power flow models using data-driven methods. Hu Ren proposed a linear optimal power flow model based on ensemble learning, using gradient enhancement method and bagging as the base learner of the ensemble learning model to capture the linear relationship between variables. Li Huapeng proposed a linear optimal power flow model based on data-driven, using support vector regression (SVR) and ridge regression (RR) methods to train the model. Pan Xiang used deep neural networks to train deep optimal power flow models to solve the DC optimal power flow problem considering safety constraints. The focus of the above research is to use data-driven methods to train linear optimal power flow models. The process is simple, but the model inevitably loses accuracy during the linearization process. In the rectangular coordinate system of the power system, the nonlinear power flow equation is a quadratic equation. Therefore, the effect of using quadratic approximation to fit the power flow equation is better than linear approximation. Hu Ren proposed a data-driven quadratic approximate optimal power flow model based on ensemble learning methods. The quadratic optimal power flow model has obvious advantages over the linear model, but there are still some problems that will affect the performance of the model: 1) Ohm's law, Kirchhoff's voltage law (KVL) and Kirchhoff's current law (KCL) are not fully considered, resulting in unsatisfactory optimization results and lack of physical explanation; 2) When fitting the node power balance constraints, the dimension of the variable (2n, n represents the number of nodes) increases with the increase of the system scale, limiting the scalability of the system; 3) Approximation (or relaxation) usually affects the feasibility of the model and hinders the practical application of the model. Summary of the invention

[0006] In order to solve at least one technical problem existing in the above-mentioned background technology, the present invention provides an optimal power flow calculation method and system based on a data-driven quadratic approximation method, which proposes two sets of data-driven optimal power flow models based on convex and non-convex quadratic approximations, and the functions of the two models can complement each other. Different from previous studies, the data of the model proposed in the present invention comes from the power flow calculation results, rather than the optimal power flow calculation results that are difficult to guarantee the global optimum.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] A first aspect of the present invention provides an optimal power flow calculation method based on a data-driven quadratic approximation method, comprising:

[0009] Obtain historical data of the power system;

[0010] Constructing a data-driven optimal power flow calculation model, the model including a data-driven part and a physical part, so that the search space of the solution of the two parts is approximately the same when solving the optimization problem;

[0011] The physical part adopts the branch power balance equation to establish the AC optimal power flow model, keeping the quadratic form of the model;

[0012] The data-driven part generates explicit convex quadratic inequalities and explicit non-convex quadratic equality equations through convex approximation or non-convex approximation, replacing equations such as branch power balance and node balance in the physical part. At the same time, the remaining inequality constraints of the physical part are retained to obtain a data-driven convex approximation model and a data-driven non-convex approximation model.

[0013] The power system power flow calculation results are obtained by combining the historical data of the power system and building a data-driven optimal power flow model.

[0014] A second aspect of the present invention provides an optimal power flow calculation system based on a data-driven quadratic approximation method, comprising:

[0015] A data acquisition module, which is used to acquire historical data of the power system;

[0016] An optimal power flow calculation model construction module is used to construct a data-driven optimal power flow calculation model, wherein the model includes a data-driven part and a physical part, so that the search space of the solution of the two parts is approximately the same when solving the optimization problem;

[0017] The physical part adopts the branch power balance equation to establish the AC optimal power flow model, keeping the quadratic form of the model;

[0018] The data-driven part generates explicit convex quadratic inequalities and explicit non-convex quadratic equality equations through convex approximation or non-convex approximation, replacing equations such as branch power balance and node balance in the physical part. At the same time, the remaining inequality constraints of the physical part are retained to obtain a data-driven convex approximation model and a data-driven non-convex approximation model.

[0019] The optimal power flow calculation module is used to combine the historical data of the power system and build a data-driven optimal power flow model to obtain the power flow calculation results of the power system.

[0020] A third aspect of the present invention provides a computer-readable storage medium.

[0021] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the optimal power flow calculation method based on the data-driven quadratic approximation method as described above.

[0022] A fourth aspect of the present invention provides a computer device.

[0023] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the optimal power flow calculation method based on the data-driven quadratic approximation method as described above are implemented.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] 1. The DDCAM and DDNAM proposed in the present invention each have their own advantages and cannot replace each other. The collaborative framework of the two models can better meet user needs. When the priority is the speed of solving the optimization model, DDCAM is easy to solve and is therefore the first choice; when the priority is the system safety constraints, DDNAM is the first choice because the model guarantees the feasibility of the AC optimal power flow solution. In addition, the framework realizes the complementarity between the two models: DDNAM can help DDCAM restore the feasibility of AC, and DDCAM can help DDNAM filter out local optimal solutions that do not meet the requirements.

[0026] 2. The present invention proposes a data-driven convex approximation model (DDCAM) to solve the first and second problems mentioned above. First, DDCAM uses a data-driven quadratic convex envelope to approximate the original equation, while ensuring the convexity of the original feasible domain and following the physical equation, thereby solving the first problem. Secondly, DDCAM is closely combined with the branch power flow rectangular voltage (BPFRV) equation in the AC-optimal power flow model to ensure that the two models are similar in optimizing the high-dimensional search space. In addition, the model integrates the NIRARV (nodal injection rectangular admittance polar voltage, NIRARV) equation, and the variable dimension in the node power balance equation that needs to be fitted during the model training process is only 2, instead of 2. n , thus solving the second problem.

[0027] 3. The present invention proposes a data-driven non-convex approximation model (DDNAM) to solve the third problem mentioned above. DDNAM uses a data-driven method to fit a quadratic non-convex equation to approximate the original quadratic equation, retaining the non-convexity of the model while maintaining the accuracy of the feasible domain, thereby solving the third problem. In addition, the interior-point line search (IPLS) method can be used to calculate DDNAM, so as to quickly obtain a feasible solution for the optimal AC power flow.

[0028] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0030] Figure 1 It is a schematic flow chart of an optimal tide solving method based on a data-driven quadratic approximation method provided by an embodiment of the present invention;

[0031] Figure 2 There are seven AC optimal power flow models;

[0032] Figure 3 It is a DDCAM and DDNAM collaboration framework provided by an embodiment of the present invention;

[0033] Figure 4(a)-Figure 4(d) It is a comparison of the M0 and M2 admittance matrices in matpower_case9 provided in an embodiment of the present invention; wherein, FIG. 4(a) is the real part of the M2 admittance matrix, FIG. 4(b) is the real part of the M0 admittance matrix, FIG. 4(c) is the imaginary part of the M2 admittance matrix, and FIG. 4(d) is the imaginary part of the M0 admittance matrix;

[0034] Figure 5(a)-Figure 5(d) It is a comparison of the M0 and M2 admittance matrices in pglib_opf_case30_ieee provided by an embodiment of the present invention; wherein, FIG. 5(a) is the real part of the M2 admittance matrix, FIG. 5(b) is the real part of the M0 admittance matrix; FIG. 5(c) is the imaginary part of the M2 admittance matrix; and FIG. 5(d) is the imaginary part of the M0 admittance matrix;

[0035] Figure 6(a)-Figure 6(b) The feasible space projections of M0 and M2 in matpower_case9 provided in the embodiment of the present invention are compared. FIG6( a ) is the feasible space projection of M0, and FIG6( b ) is the feasible space projection of M2. PG1, PG2 and PG3 represent active power, and the five-pointed star represents the global optimum.

[0036] Figure 7(a)-Figure 7(b) pglib_opf_case14_ieee power mismatch provided by an embodiment of the present invention, FIG7(a) is active power mismatch, and FIG7(b) is reactive power mismatch;

[0037] Figure 8(a)-Figure 8(b) The pglib_opf_case30_as power mismatch provided in the embodiment of the present invention, FIG8(a) is the active power mismatch, and FIG8(b) is the reactive power mismatch. DETAILED DESCRIPTION

[0038] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0039] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0040] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0041] The present invention proposes two sets of data-driven optimal power flow models based on convex and non-convex quadratic approximation, and provides a framework for the collaborative application of the two models. The data-driven convex approximation model (DDCAM) proposed in the present invention uses a data-driven method to generate a quadratic convex envelope to approximate the original quadratic equation, and convexifies the original feasible domain on the basis of following physical laws. The data-driven non-convex approximation model (DDNAM) proposed in the present invention uses data-driven generation of quadratic non-convex equations to approximate the original quadratic equation, and retains non-convexity on the basis of maintaining the accuracy of the feasible domain. The collaborative framework of the proposed DDCAM and DDNAM can realize the complementary use of the two models. Finally, in the standard optimal power flow example, it is verified that the proposed model is superior to the current most advanced data-driven quadratic model in terms of optimality, feasibility, and interpretability.

[0042] In order to solve the first and second technical problems mentioned in the background technology of this application, the present invention proposes a data-driven convex approximation model (DDCAM), which first uses a data-driven quadratic convex envelope to approximate the original equation, while ensuring the convexity of the original feasible domain, and follows the physical equation, thereby solving the first problem mentioned. Secondly, DDCAM is closely combined with the branch power rectangular voltage (BPFRV) equation in the AC-optimal power flow model to ensure that the two models are similar in optimizing the high-dimensional search space. In addition, the model integrates the NIRARV (nodal injection rectangular admittance polarvoltage, NIRARV) equation, and the variable dimension in the node power balance equation that needs to be fitted during the model training process is only 2, instead of 2n, thereby solving the second problem.

[0043] In order to solve the third problem mentioned in the background technology of this application, the present invention proposes a data-driven non-convex approximation model (DDNAM). DDNAM uses a data-driven method to fit a quadratic non-convex equation to approximate the original quadratic equation, retaining the non-convexity of the model while maintaining the accuracy of the feasible domain, thereby solving the third problem. In addition, the interior-point line search method (IPLS) can be used to calculate DDNAM, so as to quickly obtain a feasible solution for the optimal AC power flow.

[0044] The present invention adopts a collaborative framework of the two models DDCAM and DDNAM to better meet user needs. When the priority is the speed of solving the optimization model, DDCAM is easy to solve and is therefore the first choice; when the priority is the system safety constraints, DDNAM is the first choice because the model guarantees the feasibility of the AC optimal power flow solution. In addition, the framework realizes the complementarity between the two models: DDNAM can help DDCAM restore the AC feasibility, and DDCAM can help DDNAM filter out the local optimal solution that does not meet the requirements.

[0045] Embodiment 1

[0046] This embodiment provides an optimal power flow calculation method and system based on a data-driven quadratic approximation method, comprising the following steps:

[0047] Step 1: Obtain historical data of the power system;

[0048] Step 2: Establish the optimal power flow calculation model;

[0049] Figure 1 The process of generating a data-driven optimal power flow calculation model is demonstrated. The construction process of the data-driven optimal power flow calculation model includes: closely combining the data-driven part with the physical part to ensure that the proposed model is highly consistent with the original AC optimal power flow model in mathematical representation, so that the search space of the solution of the two is approximately the same when solving the optimization problem.

[0050] The physical part uses the branch power balance equation to establish the AC optimal power flow model, keeping the quadratic form of the model;

[0051] The data-driven part generates explicit convex quadratic inequalities and explicit non-convex quadratic equality equations through convex approximation or non-convex approximation to replace equations such as branch power balance and node balance in the physical part. At the same time, the remaining inequality constraints of the physical part are retained to obtain the data-driven convex approximation model DDCAM and the data-driven non-convex approximation model DDNAM.

[0052] The data-driven convex approximation model DDCAM and the data-driven non-convex approximation model DDNAM have obvious advantages in specific situations and cannot replace each other.

[0053] A specific form of the AC optimal power flow model is chosen as the physical target for fitting by the data-driven approach.

[0054] There are at least seven typical expressions of AC optimal power flow model, such as Figure 2 As shown. Figure 2 In this embodiment, three characteristics (branch power flow, power flow and rectangular coordinate system voltage) are selected in sequence, and the branch power rectangular voltage (branch power flow rectangular voltage, BPFRV) equation is used as the physical target.

[0055] The specific reasons for choosing the above three features are as follows:

[0056] 1) Branch flow: The voltage variable in the branch flow equation is two-dimensional, while the voltage variable in the node injection equation is 2n-dimensional. When the system scale increases, the node injection equation will be affected by the curse of dimensionality. Therefore, the branch flow equation is better than the node injection equation.

[0057] 2) Power flow: The computation time for solving the branch power flow rectangular voltage equation is less than that for solving the branch current flow rectangular voltage (BCFRV) equation, indicating that the performance of computing the power flow equation is better than that of the current equation.

[0058] 3) Rectangular Coordinate Voltage: When the AC optimal power flow model is represented by the rectangular coordinate voltage, the AC optimal power flow model is expressed as a quadratic form, while when the AC optimal power flow model is represented by the polar coordinate voltage, the model is expressed as an expression containing trigonometric functions. Therefore, when the AC optimal power flow model is represented by the rectangular coordinate voltage, the data-driven method can achieve an accurate quadratic approximation of the AC optimal power flow model. In addition, the non-convex quadratic AC optimal power flow model can be solved by the spatial branch and bound (SBB) method, which can provide a global optimal solution.

[0059] The AC optimal power flow model in the BPFRV equation is shown in equation (1). The output power can be divided into two parts: active power and reactive power:

[0060]

[0061] In the formula, p g ,q g are the active and reactive power produced by the generator, respectively; and For p g The lower and upper limits of and for q g The lower and upper limits of is the set of generators in the network.

[0062] The branch power flow is modeled using the rectangular coordinate voltage, as shown in equation (2).

[0063]

[0064] Where P ij , Q ij is the active power and reactive power from node i to node j; and is the net conductance and susceptance of the branch from node i to node j; and are the real and imaginary parts of the voltage at node i respectively; G ij and B ij are the branch conductance and susceptance from node i to node j respectively; It is a collection of branches in the power grid.

[0065] The node power balance equation is:

[0066]

[0067]

[0068] In the formula, p d and qd are the active power and reactive power of the load at node d respectively; P nk and Q nk is the active power and reactive power from node n to node k; p n and q n is the active power and reactive power of the parallel element at node n; and is the conductance and susceptance of the parallel element at node n. For branch power flow, the thermal limit of branch power transmission is:

[0069]

[0070] In the formula, is the apparent power upper limit from node i to node j.

[0071] The voltage constraint is shown in equation (7).

[0072]

[0073]

[0074] Where V n is the square of the voltage amplitude; and V n The optimization problem based on the BPFRV equation is:

[0075]

[0076] In the formula, c 2g , c 1g and c 0g are the coefficients of the cost function of the generator g.

[0077] The process of constructing the data-driven convex approximation model includes:

[0078] The idea of ​​DDCAM modeling is to replace the non-convex equality constraints (2), (4) and (6) in the BPFRV equation with the convex hull consisting of inequality constraints fitted by quadratic polynomial regression.

[0079] First, convert equations (2), (4) and (6) into compact matrix form:

[0080]

[0081]

[0082]

[0083] Where, X ij , Xn is the voltage vector, and is a symmetric but indefinite matrix consisting of the elements of the admittance matrix; and is the symmetric matrix formed by the admittance of parallel elements; is a 2*2 dimensional matrix. Equations (2), (4), (6) and (9), (10), (11) are equivalent.

[0084] The quadratic equality constraints (9), (10), and (11) are non-convex.

[0085] In order to convexify the above equations, each equation is replaced by a convex envelope consisting of a convex quadratic lower bound and a concave quadratic upper bound. The fitted convex envelope is shown in equations (12)-(14):

[0086]

[0087]

[0088]

[0089] In the formula, and is the negative semidefinite coefficient matrix of quadratic terms; and is the positive semidefinite coefficient matrix of quadratic terms; and is the coefficient of the linear term; and is a constant term.

[0090] The coefficient matrices of equations (12)-(14) can be obtained by solving the standard semidefinite programming (SDP) problem.

[0091] For SDP problems, MOSEK, GUROBI and CPLEX solvers can be used to calculate and obtain the global optimal solution.

[0092] The present invention introduces a 1-norm penalty term in the first two terms of the objective function, i.e., formula (15), and adopts L1 regularization to reduce overfitting and improve the generalization performance of the model. At the same time, the use of L1 regularization can make a part of the parameters become 0, thereby achieving matrix sparsification and feature selection. Since the admittance matrix itself has sparsity, the use of L1 regularization can make the parameter characteristics of the fitting matrix close to the parameter characteristics of the admittance matrix in the AC optimal power flow model.

[0093] The general expression of the SDP problem is as follows:

[0094]

[0095]

[0096] In the formula, and are the coefficients of the quadratic term, linear term and constant term in the upper bounds of equations (12)-(14) respectively; A , B , c are the coefficients of the quadratic term, linear term and constant term in the lower bounds of equations (12)-(14) respectively; A i and They are A , The i-th column vector; (x (k) ,y (k) ) represents the k-th historical data; λ1, λ2 and λ3 are 1-norm penalty term coefficients, which are obtained through K-fold cross validation.

[0097] The principle of K-fold cross validation is to randomly divide the collected data into K parts, select K-1 parts as training data sets each time, and the rest as test data sets, and then select the coefficient corresponding to the minimum average error in the test.

[0098] The AC optimal power flow problem based on DDCAM can be expressed as:

[0099]

[0100] The construction process of the data-driven non-convex approximation model is as follows:

[0101] Earlier studies on data-driven optimal power flow modeling focused on convex model construction because convex models are traceable. However, in most cases, convexification of the model (including relaxation and convex approximation) inevitably loses model accuracy. Therefore, nonconvex approximation of the model can retain the accuracy of the feasible domain. In addition, nonlinear solvers (such as interior point optimizers) can be used to effectively solve high-order nonconvex equations.

[0102] To this end, in this embodiment, DDNAM is introduced to replace the non-convex equality constraints (Equations (2) and (4)) in the BPFRV equation using non-convex equality constraint polynomials. The non-convex constraints are as follows:

[0103]

[0104]

[0105] In the formula, and is the coefficient matrix of the quadratic terms; and is the coefficient matrix of the linear terms; and is a constant term. It should be noted that equation (6) does not need to be replaced because it does not contain network parameters.

[0106] The matrix coefficients in (18) and (19) can be obtained by solving typical quadratic programming (QP) problems, which can be solved using solvers such as MOSEK, GUROBI and CPLEX.

[0107] Similar to formula (15), the present invention adds a 1-norm penalty term to the objective function and adds L1 regularization to reduce overfitting and improve the generalization performance of the model. The QP problem expression is as follows:

[0108]

[0109] In the formula, and are the coefficients of the quadratic term, linear term and constant term in equations (18) and (19) respectively; A i for The i-th column vector of ; and are the coefficients of the 1-norm penalty term, which can be determined by K-fold cross validation.

[0110] The QP problem represented by equation (20) is simpler than the SDP problem corresponding to equation (15) because the first two semidefinite constraints in equation (16) are not required in the non-convex approximation. In addition, DDNAM directly fits the equality constraint and does not require the convex hull (double inequality constraint), so the third constraint in equation (16) is not required in DDNAM. The time required to solve equation (20) is less than the time required to solve equation (15), so the time to train DDNAM is less than the time to train DDCAM.

[0111] The expression of AC optimal power flow based on DDNAM is:

[0112]

[0113] Specific analysis of the collaboration framework between DDCAM and DDNAM:

[0114] Model Differences

[0115] Feasibility: Since the non-convexity of the model is preserved, the feasible domain of DDNAM is closer to the feasible domain of the original AC optimal power flow model. Therefore, it is more feasible to use DDNAM to calculate the AC optimal power flow. Due to the convexification, the feasible domain of DDCAM is not accurate, so in practical applications, the DDCAM solution needs to be further processed.

[0116] Optimality: Due to the non-convexity of DDNAM, solving DDNAM can only guarantee local optimality in theory. In the present invention, the difference between the local optimal solution and the global optimal solution is small in multiple examples. DDCAM has a global optimal solution, but its feasible domain is not accurate and the practicality of the solution cannot be guaranteed. After further recovery of the feasible solution, the optimality quality of the solution may be reduced.

[0117] Troubleshooting: DDCAM is a convex model, so it is easy to solve. DDNAM is a non-convex model and can be solved by the IPOPT solver (internal IPLS algorithm). The IPLS algorithm can handle large-scale nonlinear optimization problems.

[0118] Differences in application scenarios

[0119] According to the characteristics of DDCAM and DDNAM, this paper proposes a collaborative framework of the two models, such as Figure 3 As shown in the figure. In the collaborative process, it is necessary to balance the system feasibility requirements and optimality requirements to select the model. Generally speaking, when system optimality is given priority, the DDCAM model is preferred, and when system feasibility is given priority, the DDNAM model is preferred.

[0120] The application scenarios of DDCAM and DDNAM are:

[0121] DDCAM application scenarios: In the calculation process of AC optimal power flow model, solving convex problems takes less time than solving non-convex problems. For mixed integer programming problems, solving mixed integer convex programming problems is easier than solving mixed integer non-convex programming problems.

[0122] DDNAM application scenarios: When grid reliability is a priority, DDNAM should be used first because the model fully considers the constraints of the system and can obtain the global optimal solution of the system. In addition, DDNAM does not require further recovery of the feasible solution, so this model is preferred when time is limited.

[0123] In practical applications, DDCAM and DDNAM cannot work in isolation, and the two models need to cooperate with each other to achieve the optimal optimization goal. Figure 3 In this paper, we provide two modules to show how DDCAM and DDNAM cooperate with each other.

[0124] DDNAM helps DDCAM restore the feasibility of the AC model: When the parameters of the AC optimal power flow model are uncertain, DDNAM can provide DDCAM with a feasible region close to the exact solution, thereby helping the DDCAM solution to be closer to the true solution of the AC optimal power flow model.

[0125] There are generally three methods to restore the feasibility of the AC model: 1) Introduce a penalty term in the objective function of the relaxed AC optimal power flow problem to tighten the relaxation; 2) Use a heuristic algorithm to iteratively update the relaxation or approximation of the AC optimal power flow model to achieve local optimality; 3) Obtain constants from the relaxed or approximate optimization problem, and then perform power flow calculations to obtain variable values ​​that conform to the AC power flow equation.

[0126] The DDCAM model helps DDNAM remove unsatisfactory local optimal solutions: DDNAM can efficiently solve and calculate through local solvers. The standard power system AC optimal power flow problem is calculated using nonlinear solvers such as IPOPT, and the solutions obtained are all global optimal situations. However, in IEEE9, 39, 118 and 300 node systems, the load or generator constraints are changed, and the calculated solution is a local optimal solution. Through case testing, it is found that local optimal solutions obtained by solving the AC optimal power flow problem under different load conditions do exist, but their gap with the global optimal solution is small. In order to prevent the solution obtained by solving DDNAM from being significantly suboptimal, this embodiment uses the AC feasible solution obtained by calculating DDCAM to filter out unsatisfactory local solutions of DDNAM. In other words, if it is found that the target value of the final result of DDCAM is better than the preliminary result of DDNAM, the target value is used to replace the final result of DDNAM.

[0127] Example verification

[0128] 1. Example description

[0129] 1) Data generation: The model proposed in this invention is obtained by a data-driven method. The training data comes from the power system flow calculation data. The training set and test set data are generated by MATPOWER. The injected power value is the reference value multiplied by a normal distribution function of 0.8 to 1.2. The training set and test set data volumes are 1000 and 300, respectively.

[0130] 2) Comparison method: The present invention uses the following five models to verify the superiority of the method proposed in the present invention: M0: an accurate AC optimal power flow model based on the BPFRV equation, and its result is used as a benchmark value;

[0131] M1: DDCAM model;

[0132] M2: DDNAM model;

[0133] M3: Data-driven linear optimal power flow model;

[0134] M4: Data-driven quadratic optimal power flow model;

[0135] 3) Simulation environment: The simulation platform is MATLAB2020a, and the simulation environment is Intel Core i5-7400CPU@3.00GHz 16GB RAM. The optimization program is written using the YALMIP toolbox. The nonlinear programming solver used in the present invention is IPOPT, and GUROBI is used to solve the non-convex quadratic model.

[0136] By calculating the AC optimal power flow model corresponding to M1-M4, the optimality and feasibility of the obtained results are compared. In the present invention, the optimality gap is used to evaluate the quality of the inexact solution obtained by convex relaxation or approximation. It is worth noting that for the inexact optimal power flow model obtained by convex relaxation / approximation, the optimality gap of the calculated solution is 0, which cannot guarantee that the obtained solution is a feasible solution. For example, the optimality gap of the relaxed / approximate model is less than 1%, but the model violates the physical constraints, which indicates that the optimality gap cannot fully guarantee the feasibility of the model.

[0137] The optimality gap of the feasible solution of the AC optimal power flow model cannot be directly used to evaluate the quality of the solution obtained. Therefore, in the present invention, a power flow solver is used to restore the feasible solution of the AC optimal power flow model to a physically meaningful working point, thereby obtaining a feasible power flow solution of the system. The implementation method is: through the feasible solution of the AC optimal power flow model previously calculated, the injected active power and node voltage on the generator bus are determined, and the power flow calculation is performed on this basis. The difference between the power flow feasible solution and the AC optimal power flow feasible solution is that the former strictly abides by the AC system power flow equation (equality constraints, such as Ohm's law, KCL and KVL equations), and the latter satisfies all constraints of the AC optimal power flow model (equality and inequality constraints). On this basis, two new indicators can be obtained, namely, the power flow feasible optimality gap and the cumulative normalized constraint violation, which are used to quantify the optimality and feasibility of different model solutions.

[0138] The calculation method of the power flow feasible optimality gap xgap is as follows:

[0139]

[0140] In the formula, is the target value obtained through power flow calculation; It is the global optimal solution of the original AC optimal power flow model. It can be calculated by using a global non-convex solver (such as GUROBI, SCIP). GUROBI, SCIP and other solvers are based on the SBB algorithm, which can ensure the optimality of the solution of the non-convex AC optimal power flow model based on the rectangular coordinate system. The calculated solution can be used as a criterion for evaluating the optimality of other model solutions. The SBB algorithm is still in the research stage, and the convergence speed is quite slow when used to deal with large-scale AC optimal power flow problems. Therefore, only small and medium-sized examples are selected for analysis in this paper.

[0141] Each variable x in the power system: = {P G ,Q G ,|V|,θ ij ,S ij}Existence constraints, cumulative normalization constraints x viol It can be expressed as:

[0142]

[0143] In the formula, represents the variable value calculated by the power flow, The maximum and minimum constraints of the variables are respectively and express.

[0144] The present invention uses a solver to calculate the non-convex AC optimal power flow model (i.e., M0), and uses its solution as the benchmark value, i.e., the exact value. IPOPT3.14.11 is used to solve the four models M1-M4, and the feasible optimality gap of the power flow solution, the cumulative normalized constraint violation, and the solution time are compared to determine the performance of each model.

[0145] The results are shown in Table 1, and the conclusions are as follows:

[0146] Table 1 Optimization results of different models in multiple pglib_opf examples

[0147]

[0148] 1) The feasible optimality gap of the M2 model corresponding to the power flow solution is almost 0, and the cumulative normalized constraint violation is negligible, indicating that its solution is almost the same as the global optimal solution. However, due to the non-convexity of the model, it is theoretically impossible to guarantee the global optimal solution. The indicators of M2 are better than those of other models, indicating that the model is optimal and feasible.

[0149] 2) The performance of M1 is better than that of M3 and M4, but worse than that of M2. The reason is that the model is convex, which inevitably makes the feasible domain inaccurate, thereby increasing the optimality gap of the feasible solution of the power flow and the constraint violation.

[0150] 3) M3 and M4 cannot converge in some examples, so there is no corresponding feasible solution for the power flow. In most cases with feasible solutions, the optimality gap and cumulative normalized constraint violation of the feasible solutions of M3 and M4 are significantly higher than that of M1. The reason for the decline in M3 performance is that the model linearization processing makes the M3 model inaccurate. At the same time, the linear convexification of the model is not as effective as the quadratic convexification in M2. Although M4 uses quadratic convexification, it does not fully follow the physical equations, making the model performance the lowest.

[0151] 4) Comparing the calculation time of each model, it can be seen that M3 takes the shortest time because it is a linear model with the lowest calculation difficulty. M1 is a convex quadratic model and its calculation time is slightly longer than M3. Due to the non-convexity of the model, the calculation time of M2 is longer than that of M1 and M3. However, thanks to the powerful function of the interior point nonlinear solver, the calculation time of M2 is within an acceptable range.

[0152] DDNAM Feasibility Analysis

[0153] Further verification that DDNAM can provide a nearly exact feasible domain for DDCAM, the collaborative framework such as Figure 3 shown.

[0154] 1) Compare the admittance matrices: The equations of M0 and M2 are similar, and the admittance matrix in M0 is based on the system parameters, while the admittance matrix in M2 can be generated based on the quadratic coefficients. Compare the admittance matrices of M0 and M2 in matpower_case9 and pglib_opf_case30_ieee, and the results are as follows: Figure 4(a)-Figure 4(d) Yes and Figure 5(a)-Figure 5(d) shown.

[0155] from Figure 4(a)-Figure 4(d) Yes and Figure 5(a)-Figure 5(d) It can be seen that the real and imaginary parts of the admittance matrices of M2 and M0 are almost the same, indicating that although M2 is derived by quadratic approximation, the quadratic terms obtained by its approximation have physical meaning.

[0156] Figure 6(a)-Figure 6(b) is the feasible space of M0 and M2. It can be seen from the figure that the feasible spaces of the two are almost the same, indicating that DDNAM can provide a nearly accurate AC feasible domain, thereby helping DDCAM to further restore the feasibility of AC.

[0157] Local optimal judgment

[0158] Further verify whether the solution of M2 is likely to be a local optimal solution. In the standard example, the solution of M2 is proved to be the global optimal solution, and the results are shown in Table 1. However, M2 is a non-convex model. When the IPLS algorithm is used to solve M2, the calculated solution can only guarantee the local optimal solution in theory. Therefore, it is necessary to study whether M2 has a local optimal situation and determine the possibility of a suboptimal solution.

[0159] In this test, a global bilinear solver (GUROBI 10.0) was used to solve M0, and a local nonlinear solver (IPOPT 3.14.11) was used to solve M2. The solution obtained by solving M0 is the global optimal solution, which is used as the benchmark value. M0 and M2 were solved 100 times each, and the load was 0.8 to 1.1 times the standard value. The results are shown in Table 2. It should be emphasized that only small-scale power systems were used for testing in this study, because the calculation time of using a global bilinear solver to solve M0 increases exponentially with the increase of system size.

[0160] By analyzing the data in Table 2, we can draw the following conclusions:

[0161] 1) Using the SBB algorithm to calculate M0 takes a long time to calculate, and its calculation time increases exponentially with the increase of system scale. Solving this model can obtain the global optimal solution, but for large-scale systems, this method takes a long time to calculate and has a low cost-effectiveness. In contrast, solving M2 takes less time to calculate.

[0162] 2) The optimal power flow feasibility gap is the same as the power flow feasibility gap, which proves that the calculation results of M2 are feasible. In addition, the cumulative normalized constraint violation of the M2 solution is small, which proves the feasibility of M2.

[0163] 3) Three of the five examples used in the test have local optimal solutions. For most local optimal situations, the optimality gap is small. The maximum optimality gap occurs in the pglib_opf_case3_lmbd example, with a value of 0.17%.

[0164] 4) The number of test cases in this invention is limited, and it cannot be guaranteed that there will not be a larger optimality gap in actual application. In this case, the calculation results of DDCAM can help DDNAM filter out unsatisfactory local optimal solutions. The collaborative framework is as follows: Figure 3 shown.

[0165] Node power mismatch

[0166] It is verified that M1 and M2 strictly comply with the physical constraints and thus can provide physically meaningful solutions. In this section, we choose node power mismatch to quantify the degree of violation of the model to formula (3), which represents KCL, KVL and the law of conservation of energy. M1, M2, and M4 are used to test the two examples pglib_opf_case14_ieee and pglib_opf_case30_as. The results are shown in Figure 2. Figure 7(a)-Figure 7(b) , Figure 8(a)-Figure 8(b) shown.

[0167] By Figure 7(a)-Figure 7(b) , Figure 8(a)-Figure 8(b)It can be seen that in both examples, the solution calculated by M4 has obvious node power mismatch in both active and reactive power variables. In contrast, the power node mismatch of M1 and M2 solutions is 0. This is because the proposed M1 and M2 replace the original equality constraints by approximate equations and convex envelopes to ensure the power balance of each bus. The M4 model only uses a single inequality to approximate the original equality constraints, and the constructed model is very different from the original model.

[0168] Table 2 Pglib_opf example M2 local optimal situation test

[0169]

[0170] Embodiment 2

[0171] The present invention provides an optimal power flow calculation system based on a data-driven quadratic approximation method, comprising:

[0172] A data acquisition module, which is used to acquire historical data of the power system;

[0173] An optimal power flow calculation model construction module is used to construct a data-driven optimal power flow calculation model, wherein the model includes a data-driven part and a physical part, so that the search space of the solution of the two parts is approximately the same when solving the optimization problem;

[0174] The physical part adopts the branch power balance equation to establish the AC optimal power flow model, keeping the quadratic form of the model;

[0175] The data-driven part generates explicit convex quadratic inequalities and explicit non-convex quadratic equality equations through convex approximation or non-convex approximation, replacing equations such as branch power balance and node balance in the physical part. At the same time, the remaining inequality constraints of the physical part are retained to obtain a data-driven convex approximation model and a data-driven non-convex approximation model.

[0176] The optimal power flow calculation module is used to combine the historical data of the power system and build a data-driven optimal power flow model to obtain the power flow calculation results of the power system.

[0177] Embodiment 3

[0178] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the optimal power flow calculation method based on the data-driven quadratic approximation method as described above are implemented.

[0179] Embodiment 4

[0180] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the optimal power flow calculation based on the data-driven quadratic approximation method as described above are implemented.

[0181] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0182] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0183] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0184] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0185] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0186] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. The optimal power flow calculation method based on the data-driven quadratic approximation method is characterized by: include: Obtain historical data of the power system; A data-driven optimal power flow calculation model is constructed, in which three characteristics, namely branch power flow, power flow and rectangular coordinate voltage, are selected in turn, and the branch power rectangular voltage equation is used to establish the AC optimal power flow model, maintaining the quadratic form of the model; Generate explicit convex quadratic inequality and explicit non-convex quadratic equality equations through convex approximation or non-convex approximation to replace branch power balance and node balance equations in branch power rectangular voltage equations; At the same time, the remaining inequality constraints in the branch power rectangular voltage equation are retained to obtain a data-driven convex approximation model and a data-driven non-convex approximation model; Combining the historical data of the power system with the constructed data-driven optimal power flow model, the power flow calculation results of the power system are obtained; The process of constructing the data-driven convex approximation model includes: The non-convex equality constraints in the branch power rectangular voltage equations are transformed into compact matrix form; Replace each equation in compact matrix form with a convex envelope consisting of a convex quadratic lower bound and a concave quadratic upper bound; The global solution is obtained by solving the standard semidefinite programming problem as the coefficient matrix of the convex envelope, and a data-driven convex approximation model is constructed based on the coefficient matrix of the convex envelope. The process of constructing the data-driven non-convex approximation model includes: The non-convex equality constraint polynomial is used to replace the non-convex equality constraint in the branch power rectangular voltage equation; The coefficient matrix of non-convex equality constraints is obtained by solving typical quadratic programming problems, and a data-driven non-convex approximation model is constructed based on the coefficient matrix of non-convex equality constraints. When constructing data-driven convex approximation models and data-driven non-convex approximation models, a 1-norm penalty term is introduced. L1 regularization can be used to make some parameters become 0 to achieve matrix sparsification and feature selection. L1 regularization is used to make the parameter characteristics of the fitting matrix close to the parameter characteristics of the admittance matrix in the AC optimal power flow model. According to different application scenarios, select the corresponding model to calculate the optimal power flow; If the optimality of the system is given priority, the data-driven convex approximation model is preferred; if the feasibility of the system is given priority, the data-driven non-convex approximation model is preferred; The data-driven convex approximation model and the data-driven non-convex approximation model assist each other. When the parameters of the AC optimal power flow model are uncertain, the data-driven non-convex approximation model provides a feasible region close to the exact solution for the data-driven convex approximation model, thereby assisting the data-driven convex approximation model solution to be closer to the true solution of the AC optimal power flow model. The data-driven convex approximation model helps the data-driven non-convex approximation model to remove unsatisfactory local optimal solutions.

2. A system for the optimal power flow calculation method based on the data-driven quadratic approximation method of claim 1, characterized in that: include: A data acquisition module, which is used to acquire historical data of the power system; An optimal power flow calculation model construction module, which is used to construct a data-driven optimal power flow calculation model; The optimal power flow calculation module is used to combine the historical data of the power system with the constructed data-driven optimal power flow model to obtain the power flow calculation results of the power system.

3. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the optimal power flow calculation method based on the data-driven quadratic approximation method as claimed in claim 1 are implemented.

4. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the optimal power flow calculation method based on the data-driven quadratic approximation method as claimed in claim 1 are implemented.