GPU-based direct current optimal power flow problem rapid solving method and device
By reconstructing the optimal DC power flow model on a GPU and combining it with the sGS-HPR algorithm, the computational complexity and memory consumption problems of large-scale power grids are solved, achieving efficient parallel solution and improving the scheduling efficiency and security of the power system.
Patent Information
- Application Number
- CN202511724162.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-23
- Publication Date
- 2026-02-17
AI Technical Summary
Existing methods for solving optimal DC power flow have shortcomings in terms of computational performance and scalability. In particular, when dealing with large-scale power grids and high-dimensional optimization problems, the computational complexity and memory consumption increase dramatically, and it is difficult to achieve effective parallel solutions.
A GPU-based method for solving the DC optimal power flow problem is adopted. By reconstructing the model into a compact form of a linear programming model, and combining symmetric Gauss-Seidel decomposition with the Halpern Peaceman-Rachford algorithm, the dual form is solved in parallel on the GPU using the sGS-HPR algorithm, which combines symmetric Gauss-Seidel decomposition with the Halpern Peaceman-Rachford algorithm based on semidefinite proximal terms, thus achieving efficient solution for large-scale power grids.
It significantly improves computational efficiency and parallelization capabilities, reduces memory consumption, ensures numerical stability and non-ergodic convergence characteristics, and is suitable for the optimized operation of power systems with a high proportion of renewable energy and large-scale energy storage, thereby improving the dispatch efficiency and security of power systems.
Smart Images

Figure CN121546601A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure belongs to the field of power system optimization and high-performance parallel computing, and particularly relates to a GPU-based fast solution method and device for a direct current optimal power flow problem. BACKGROUND
[0002] As a core optimization model in power system operation and control, the direct current optimal power flow is widely used in day-ahead scheduling, intra-day scheduling, market clearing, and security-constrained unit commitment, etc. With the increasing proportion of renewable energy and the large-scale access of energy storage devices, the operation characteristics of power systems present strong dynamics and complexity. The traditional solution method based on CPU can obtain high-precision solutions for small-scale systems, but the computational complexity and memory consumption increase dramatically when facing large-scale power grids and high-dimensional optimization problems. The day-ahead and intra-day forward-looking scheduling scenarios have high requirements for the computational efficiency, convergence speed, and scalability of the solution algorithm, and there are two problems in solving large-scale direct current optimal power flow problems:
[0003] (1) The increase in variable dimension and active power operation constraints of the direct current optimal power flow model leads to an increase in computational burden. Traditional algorithms running on the CPU platform rely on the accurate solution of linear equations, such as LU decomposition in the simplex method or Cholesky decomposition in the interior point method. With the expansion of system size, even if the dimension of the problem itself can be accommodated in the system memory in theory, the intermediate results of matrix decomposition will cause a significant increase in memory occupancy, leading to a storage demand far exceeding the original matrix size and causing a "memory insufficient" error, which seriously restricts the application of direct current optimal power flow in real-time scheduling scenarios.
[0004] (2) The solution algorithm based on sequential execution logic is strictly dependent on the iteration relationship, and the task parallelization capability is limited. Taking the simplex method and the interior point method as examples, the strong dependence between iteration results makes it difficult to effectively divide the algorithm into independent parallel sub-tasks, thereby limiting the acceleration benefits that can be provided by modern GPUs and multi-core architectures. Therefore, how to solve the direct current optimal power flow model of large-scale power grids while ensuring numerical stability and convergence accuracy.
[0005] In summary, the existing direct current optimal power flow solution methods still have obvious deficiencies in computational performance and scalability. With the enhancement of the time-space coupling of power systems and the rapid penetration of renewable energy, there is an urgent need to develop an efficient, parallelizable, and suitable for large-scale power system direct current optimal power flow solution algorithm to fully exploit the potential of modern computing architectures and improve the real-time scheduling and optimization capabilities of power systems. SUMMARY
[0006] The purpose of the present disclosure is to provide a GPU-based fast solution method and device for DC optimal power flow problems to overcome the shortcomings of the prior art. The present disclosure can fully utilize the parallel computing capability of GPU to efficiently solve large-scale security-constrained power grid optimization problems, and has high application value.
[0007] The first aspect embodiment of the present disclosure provides a GPU-based fast solution method for DC optimal power flow problems, comprising:
[0008] establishing a DC optimal power flow model;
[0009] reformulating the DC optimal power flow model into a compact form of a linear programming model, and then converting it into a corresponding dual form;
[0010] solving the dual form of the DC optimal power flow model on GPU using an sGS-HPR algorithm combining symmetric Gauss-Seidel decomposition and Halpern Peaceman-Rachford algorithm based on semi-positive definite proximal terms to obtain the optimization result of the DC optimal power flow.
[0011] In one specific embodiment of the present disclosure, the establishment of the DC optimal power flow model comprises:
[0012] 1) establishing an objective function of the DC optimal power flow model;
[0013] The objective function is the minimization of the sum of the generation cost of the generator, the penalty for renewable energy curtailment and the loss cost of the energy storage system, and the expression is as follows:
[0014]
[0015]
[0016]
[0017]
[0018] wherein, is the generation cost of the generator connected to bus i, is the active power injected by the generator connected to bus i at time period t, and are the linear term and constant term coefficients of the generation cost of the generator connected to bus i, respectively, is a set consisting of all buses where the generators are located; is the curtailment cost of the renewable energy unit connected to bus i, the active power injected by the renewable generation units connected to bus i at time period t, the penalty coefficient of curtailment for renewable generation units, the maximum active power that can be output by the renewable generation units connected to bus i, the set consisting of buses where renewable generation units are located; the charging and discharging loss cost of the energy storage system connected to bus i, and the discharging and charging power of the energy storage system connected to bus i at time period t, and the discharging and charging efficiency of the energy storage system connected to bus i, the penalty coefficient of charging and discharging loss for the energy storage system, the set consisting of buses where energy storage systems are located; the set consisting of all time periods;
[0019] 2) the constraint conditions for establishing the direct current optimal power flow model, including:
[0020] power balance constraint;
[0021]
[0022] wherein, the active power demand of the load connected to bus i at time period t, the set consisting of buses where loads are located;
[0023] network constraint;
[0024]
[0025] wherein, the power transfer distribution factor of bus i on line j; the line power limit of line j; the set consisting of all lines;
[0026]
[0027]
[0028]
[0029] wherein, and the upward and downward spinning reserve capacity of the generator on bus i at time period t; and are the up and down ramp rates available to the generators at bus i, respectively; is the optimization time interval; and are the minimum and maximum active power outputs of the generators at bus i, respectively; and are the system requirements for up and down spinning reserve capacity at time t, respectively;
[0030] ramp constraints;
[0031]
[0032] renewable energy unit output constraints;
[0033]
[0034] wherein, is the minimum active power output available from the renewable energy units connected to bus i;
[0035] energy storage system operation constraints;
[0036]
[0037]
[0038]
[0039] wherein, is the initial capacity of the energy storage system connected to bus i; and are the upper and lower limits of the capacity of the energy storage system connected to bus i, respectively; and are the upper limits of the charging and discharging power of the energy storage system connected to bus i, respectively.
[0040] In one specific embodiment of the present disclosure, the re-expression of the DC optimal power flow model into a compact form of linear programming model comprises:
[0041] expressing equations (5) and (13) as equality constraints expressing equations (6), (8)-(10) and (12) as inequality constraints box constraints upper and lower bounds of the optimization variables, the DC optimal power flow model is converted into a form as shown in equation (15):
[0042]
[0043] where x is the decision variable vector, including active power output of generators and renewable energy units, start-stop state variables of generators and renewable energy units, charge-discharge power of energy storage system, charge-discharge state variables of energy storage system; c is the coefficient vector, including marginal cost coefficient of generators, loss penalty coefficient of renewable energy units' curtailment and energy storage system's charge-discharge; is a compact form of equation (1); is the coefficient matrix of equality constraints and inequality constraints; is the coefficient matrix corresponding to equality constraints in the compact form, including power balance equation, energy balance equation of energy storage system; is the coefficient matrix corresponding to inequality constraints in the compact form, including line power limit, unit output ramping constraint, unit start-stop limit, energy upper and lower limit of energy storage system; is the constant matrix of equality constraints and inequality constraints; is the constant term corresponding to equality constraints in the compact form, including load power, initial energy of energy storage system; is the constant term corresponding to inequality constraints in the compact form, including line power capacity upper limit, energy storage capacity upper and lower limit; is the box constraint set of x, and are the upper and lower limits of x, respectively, including maximum and minimum output of generators, upper limit of renewable energy unit output, upper and lower limits of energy storage charge-discharge power; n is the number of decision variables, m is the total number of constraints, m=m1+m2, m1 is the number of equality constraints, and m2 is the number of inequality constraints; is an n-dimensional real number space.
[0044] In one specific embodiment of the present disclosure, it further includes:
[0045] The linear programming model is converted into the following dual form:
[0046]
[0047] where, is the Lagrange multiplier term of the constraint; is the dual variable of the constraint, solving the y sub-problem, , is the multiplier corresponding to the equality constraint, is the multiplier corresponding to the inequality constraint; is dual variable of is indicator function on is nonnegative quadrant of indicator function of set C convex conjugate function of
[0048] In one specific embodiment of the present disclosure, the solving the dual form of the DC optimal power flow model comprises:
[0049] 1) based on the dual form of the DC optimal power flow model, the dual problem as shown in formula (16) is converted into an augmented Lagrangian function form, and the expression is as follows:
[0050]
[0051] wherein, is a Lagrangian function; is a Cartesian product space; is a penalty parameter;
[0052] 2) by introducing a symmetric Gauss-Seidel operator, a semi-proximal preconditioner is constructed based on the structure of , which separates the equality constraints and inequality constraints and the smooth terms and non-smooth terms in the objective function, and the specific steps are as follows:
[0053] 2-1) define a self-adjoint semi-definite linear operator as follows:
[0054]
[0055] wherein, the self-adjoint semi-definite linear operator is modified to so that has symmetric positive definiteness;
[0056] 2-2) the operator of step 2-1) is decomposed according to the following formula:
[0057]
[0058] wherein, is an upper triangular matrix of , and is a block diagonal matrix of ;
[0059] 2-3) the operator symmetric Gauss-Seidel operator of The expression is as follows:
[0060]
[0061] 2-4) Operator The expression is as follows:
[0062]
[0063]
[0064] 3) Based on the results of step 1), introduce the self-adjoint semi-definite linear operator obtained in step 2) in the y sub-problem , form a Halpern Peaceman-Rachford iteration framework with semi-definite proximal terms, set the penalty parameter and the convergence tolerance , select the initial point , and obtain the optimization result of by iteration, which is the direct current optimal power flow.
[0065] In one specific embodiment of the present disclosure, the process of the iteration is:
[0066] Starting from the iteration number , the following steps are executed in a loop:
[0067] 3-1) Update the z sub-problem using the augmented Lagrangian function expression of formula (17) as follows:
[0068]
[0069] 3-2) Update the solution for the x sub-problem as follows:
[0070]
[0071] 3-3) Solve the convex optimization sub-problem with semi-definite proximal terms, and the y sub-problem is expressed as , is a semi-definite proximal term, update the variable y sub-problem to the symmetric Gauss-Seidel closed-form update of y1-y2-y1, and the specific steps are as follows:
[0072] 3-3-1) Fix y2, update y1 using the augmented Lagrangian function expression of formula (17), and the optimal condition is as follows:
[0073]
[0074] wherein, ;
[0075] In the direct current optimal power flow model is expressed as follows:
[0076]
[0077] wherein, and is a diagonal matrix, , ; is an m 11 dimensional column vector with all elements equal to 1;
[0078] By block diagonal decomposition, , the explicit form is obtained:
[0079]
[0080]
[0081] 3-3-2) Fix y1, update y2;
[0082] Set , is the largest eigenvalue of , and is an m order unit matrix;
[0083]
[0084] wherein, ;
[0085] 3-3-3) Correct y1: ;
[0086] 3-4) Adopt Peaceman-Rachford update, construct an overcorrection point to accelerate iteration and improve fixed point approximation speed, expressed as follows:
[0087]
[0088] wherein, denotes the intermediate iteration point of the previous stage;
[0089] 3-5) Based on the result of step 3-4), the Halpern iteration method with a step size of The expression of the Halpern iteration method is as follows:
[0090]
[0091] wherein, is the initial iteration point;
[0092] 3-6) Determine whether the following formula is satisfied by taking the KKT residual as a measure:
[0093]
[0094] If yes, the iteration ends, and the DC optimal power flow result is output ; otherwise, let the iteration number k increase by 1, and then return to step 3-1).
[0095] The second aspect embodiment of the present disclosure proposes a GPU-based DC optimal power flow problem fast solving device, comprising:
[0096] A DC optimal power flow model construction module is configured to establish a DC optimal power flow model.
[0097] A linearization module is configured to re-express the DC optimal power flow model as a compact form of a linear programming model, and then convert it into a corresponding dual form.
[0098] A solving module is configured to utilize the sGS-HPR algorithm combining the symmetric Gauss-Seidel decomposition and the Halpern Peaceman-Rachford algorithm based on the semi-positive definite proximal term to solve the dual form of the DC optimal power flow model on the GPU in parallel, and obtain the optimization result of the DC optimal power flow.
[0099] The third aspect embodiment of the present disclosure proposes an electronic device, comprising:
[0100] At least one processor; and a memory connected in communication with the at least one processor;
[0101] The memory stores instructions executable by the at least one processor, and the instructions are configured to execute the above-mentioned GPU-based DC optimal power flow problem fast solving method.
[0102] The fourth aspect embodiment of the present disclosure proposes a computer readable storage medium, which stores computer instructions for causing the computer to execute the above-mentioned GPU-based DC optimal power flow problem fast solving method.
[0103] The features and benefits of the present disclosure are:
[0104] 1. The present disclosure has the characteristics of high efficiency, good scalability and parallelization; the sGS-HPR (symmetric Gauss-Seidel decomposition and Halpern Peaceman-Rachford iteration framework) algorithm based on GPU can realize the parallelization and acceleration of large-scale DC optimal power flow model through structured reconstruction of KKT (Karush-Kuhn-Tucker) system.
[0105] 2. The present disclosure significantly reduces the computational complexity and memory consumption; by using symmetric Gauss-Seidel decomposition technology, the memory shortage problem commonly encountered in large-scale system solution is effectively reduced, so that only matrix-vector multiplication and vector operation are required during the solution process, greatly reducing the storage demand and data transmission cost.
[0106] 3. The present disclosure utilizes the large-scale parallel computing capability of GPU for efficient parallelization and fast convergence; each sub-problem of the proposed sGS-HPR algorithm has a closed-form solution, and the calculation process consists of independent and parallel vector and matrix operations.
[0107] 4. The present disclosure has excellent numerical stability and non-ergodic optimal solution characteristics; combined with Halpern iteration theory and symmetric Gauss-Seidel decomposition, the stable KKT residual descent trend is maintained during the iteration process, and the non-ergodic convergence characteristics are also possessed, which ensures the stable solution and global repeatability of high-dimensional optimization problems.
[0108] 5. The present disclosure can be widely applied to the optimization operation scenarios of power systems containing high proportion of renewable energy, large-scale energy storage and complex security constraints. By deploying the scheme of the present disclosure in the dispatch center or energy management system, high-frequency, stable and reliable optimization decision results can be continuously output under conditions such as rapid change of power load, severe fluctuation of renewable energy and multi-scenario rolling optimization, so as to improve the safety margin, renewable energy consumption capacity and dispatching efficiency of power system operation, and realize fast, stable and large-scale scalable DC optimal power flow calculation capability. BRIEF DESCRIPTION OF DRAWINGS
[0109] Figure 1 The present disclosure is a whole flowchart of a GPU-based DC optimal power flow problem fast solution method. DETAILED DESCRIPTION
[0110] This disclosure proposes a method and apparatus for rapidly solving DC optimal power flow problems based on GPUs. The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0111] The first aspect of this disclosure proposes a fast solution method for the optimal DC power flow problem based on a GPU, including:
[0112] Establish an optimal DC power flow model;
[0113] The DC optimal power flow model is reformulated into a compact form of a linear programming model, and then transformed into the corresponding dual form.
[0114] The sGS-HPR algorithm, which combines symmetric Gauss-Seidel decomposition with the Halpern-Peaceman-Rachford algorithm based on semidefinite proximal terms, is used to solve the dual form of the DC optimal power flow model in parallel on a GPU, and the optimization results of the DC optimal power flow are obtained.
[0115] In a specific embodiment of this disclosure, the overall process of the GPU-based fast solution method for the optimal DC power flow problem is as follows: Figure 1 As shown, it includes the following steps:
[0116] 1) Establish the optimal DC power flow model. The specific steps are as follows:
[0117] 1-1) Establish the objective function of the DC optimal power flow model.
[0118] In this embodiment, the objective function of the DC optimal power flow model is to minimize the sum of the generation cost of traditional generators, the penalty for renewable energy curtailment, and the loss cost of energy storage systems, as expressed below:
[0119]
[0120]
[0121]
[0122]
[0123] in, The power generation cost of the conventional generator connected to bus i. The active power injected by the conventional generator connected to bus i during time period t. and These are the coefficients of the linear and constant terms of the power generation cost of the conventional generator connected to bus i, respectively. This is the set of all buses containing conventional generators; The cost of curtailment of electricity from renewable energy units connected to bus i. The active power injected by the renewable energy units connected to bus i during time period t. The curtailment penalty factor for renewable energy units. This represents the maximum active power that the renewable energy units connected to bus i can output. The set of buses containing renewable energy generating units; The charging and discharging loss cost of the energy storage system connected to bus i. and These represent the discharge power and charging power of the energy storage system connected to bus i during time period t, respectively. and These are the discharge efficiency and charging efficiency of the energy storage system connected to bus i, respectively. The penalty coefficient for charging and discharging losses in the energy storage system. The set of buses containing the energy storage system; It is a set consisting of all time periods.
[0124] 1-2) Constraints for establishing the optimal DC power flow model include:
[0125] Power balance constraints;
[0126]
[0127] in, The active power demand of the load connected to bus i during time period t. It is the set of busbars where the loads are located.
[0128] Network constraints;
[0129]
[0130] in, is the power transfer distribution factor of bus i on line j; For line j, the line power limit; It is a set consisting of all lines.
[0131]
[0132]
[0133]
[0134] in, and These represent the upward and downward rotational reserve capacity of the generator on bus i during time period t; and These are the uphill and downhill ramp rates available to the generator at bus i, respectively; To optimize the time interval; and These represent the minimum and maximum active power outputs of the generator at bus i, respectively. and These represent the system's requirements for upward and downward rotational reserve capacity during time period t.
[0135] Climbing constraint;
[0136]
[0137] Output constraints of renewable energy units;
[0138]
[0139] in, The minimum active power that the renewable energy unit connected to bus i can output.
[0140] Energy storage system operating constraints;
[0141]
[0142]
[0143]
[0144] in, The initial capacity of the energy storage system connected to bus i; and These are the upper and lower limits of the capacity of the energy storage system connected to bus i, respectively; and These are the upper bounds of the charging power and discharging power of the energy storage system connected to bus i, respectively.
[0145] 2) Restate the optimal DC power flow model established in step 1) into a compact form of a linear programming model, and then transform it into the corresponding dual form. The specific steps are as follows:
[0146] 2-1) Express equations (5) and (13) as equality constraints Equations (6), (8)-(10) and (12) are expressed as inequality constraints. Box-type constraint To optimize the upper and lower bounds of the variables, the model established in step 1) can be transformed into the form shown in equation (15):
[0147]
[0148] Where x is the decision variable vector, This includes: the active power output of traditional generators and renewable energy units, the start-stop state variables of traditional generators and renewable energy units, the charging and discharging power of energy storage systems, and the charging and discharging state variables of energy storage systems; c is a coefficient vector. This includes: the marginal cost coefficient of traditional generators, the power curtailment of renewable energy units, and the loss penalty coefficient for charging and discharging of energy storage systems; Let c and x be the contents, and let x be the compact expression of equation (1); This is the coefficient matrix of the equality constraints and inequality constraints; The coefficient matrix corresponding to the equality constraints in the compact form includes: power balance equation and energy balance equation of energy storage system; The coefficient matrix corresponding to the inequality constraints in the compact form includes: line power limits, unit output ramp-up constraints, unit start-up and shutdown limits, and upper and lower bounds of energy storage system energy. This is the constant matrix of equality and inequality constraints; The constant terms corresponding to the equality constraints in the compact form include: load power and initial energy of the energy storage system; For the constant terms corresponding to the inequality constraints in the compact form, including: upper limit of line power capacity and upper and lower limits of energy storage capacity; Let x be the set of box constraints. and These are the upper and lower limits of x, including: the maximum and minimum output of traditional generators, the upper limit of output of renewable energy units, and the upper and lower limits of energy storage charging and discharging power; n is the number of decision variables, m is the total number of constraints, m = m1 + m2, m1 is the number of equality constraints, and m2 is the number of inequality constraints; It is an n-dimensional real space.
[0149] 2-2) Transform the linear programming model obtained in step 2-1) into the following dual form:
[0150]
[0151] in, For constrained Lagrange multipliers; For the dual variables of the constraints, decouple the subproblem y. , For the multipliers corresponding to the equality constraints, For the multipliers corresponding to the inequality constraints; for The dual variable; for Indicator functions on, for The non-negative quadrants; Indicator functions for set C convex conjugate function.
[0152] 3) Use the sGS-HPR algorithm to solve the dual form of the DC optimal power flow model obtained in step 2) to obtain the optimization results of the DC optimal power flow.
[0153] In the embodiments of this disclosure, to address the problems of low computational efficiency, difficulty in GPU parallelization, and high memory consumption of traditional linear programming solutions in large-scale DC optimal power flow models, a sGS-HPR algorithm combining symmetric Gauss-Seidel decomposition and the Halpern-Peaceman-Rachford algorithm based on semi-positive definite proximal terms is proposed to solve step 2) to obtain the dual form of the DC optimal power flow model. This method significantly improves parallel computation efficiency while maintaining accuracy. The specific steps are as follows:
[0154] 3-1) Based on the dual form of the DC optimal power flow model obtained in step 2), the dual problem shown in equation (16) is transformed into an augmented Lagrangian function form, as expressed below:
[0155]
[0156] in, It is a Lagrange function; For Cartesian product space; For a given penalty parameter.
[0157] 3-2) By introducing the symmetric Gauss-Seidel operator, based on step 2-1) and Construct a semi-proximal preprocessing operator The specific steps for separating equality constraints and inequality constraints, as well as smooth and non-smooth terms in the objective function, are as follows:
[0158] 3-2-1) Define a self-adjoint positive semidefinite linear operator as follows:
[0159]
[0160] Among them, the self-adjoint positive semidefinite linear operator right Correction, making It has symmetric positive definiteness.
[0161] 3-2-2) The operator in step 3-2-1) Decompose according to the following formula:
[0162]
[0163] in, for an upper triangular matrix, for A block diagonal matrix.
[0164] 3-2-3) Operator Symmetric Gauss-Seidel operator The definition is as follows:
[0165]
[0166] 3-2-4) Operator The definition is as follows:
[0167]
[0168]
[0169] 3-3) Based on the results of step 3-1), the self-adjoint positive semidefinite linear operator obtained in step 3-2) is introduced into the y subproblem. This forms the Halpern Peaceman-Rachford iterative framework with positive semidefinite proximal terms, and sets the penalty parameter. and convergence tolerance Select initial point For the number of iterations Repeat the following steps:
[0170] 3-3-1) The augmented Lagrange function expression of equation (17) is used to update the z subproblem as follows:
[0171]
[0172] 3-3-2) The solution to the subproblem x is updated as follows:
[0173]
[0174] 3-3-3) Solve the convex optimization subproblem with positive semidefinite proximal terms. The y-subproblem can be expressed as: , For the positive semidefinite proximal term, step 3-2) The subproblem of updating variable y is a symmetric Gauss-Seidel closed-form update of y1-y2-y1, and the specific steps are as follows:
[0175] 3-3-3-1) Fix y2 and update y1 using the augmented Lagrangian function expression of equation (17). The optimal conditions are as follows:
[0176]
[0177] in, .
[0178] In the DC optimal power flow model It can be represented in the following form:
[0179]
[0180] in, and It is a diagonal matrix. , ; It is a dimension m 11 A column vector, where all elements are equal to 1.
[0181] By block diagonal decomposition The explicit form can be obtained:
[0182]
[0183]
[0184] 3-3-3-2) Fix y1, update y2.
[0185] set up , yes The largest eigenvalue, for An identity matrix of order 1.
[0186]
[0187] in, .
[0188] 3-3-3-3) Correct y1: .
[0189] 3-3-4) Using the Peaceman-Rachford update, an overcorrection point is constructed to accelerate iteration and improve the fixed-point approximation speed, as shown in the following expression:
[0190]
[0191] in, This indicates an intermediate iteration point in the previous stage.
[0192] 3-3-5) Based on the results of step 3-3-4), a step size of... The expression for the Halpern iteration method is as follows;
[0193]
[0194] in, This is the initial iteration point.
[0195] 3-3-6) Using the KKT residual as a metric, determine whether the following formula is satisfied:
[0196]
[0197] If yes, the iteration ends and proceeds to step 3-4; otherwise, increment the iteration count k by 1 and return to step 3-3-1.
[0198] 3-4) Output optimal DC power flow results .
[0199] Using the method described in this embodiment, by centrally arranging constraint matrices, decision variables, matrices, and vectors on a GPU, and performing parallel matrix and vector operations, vector projection, and block-based closed-loop update operations within the GPU, it is possible to achieve fast parallel solutions for large-scale DC optimal power flow. The resulting optimization results can be distributed by the power system dispatcher to new energy power plants, energy storage power plants, and related control equipment, supporting real-time control of equipment under load fluctuations and rapid changes in renewable energy, and ensuring the safety, economy, and efficiency of the entire network operation.
[0200] To implement the above embodiments, a second aspect of this disclosure proposes a GPU-based fast solution device for DC optimal power flow problems, comprising:
[0201] The DC optimal power flow model construction module is used to build DC optimal power flow models.
[0202] The linearization module is used to reformulate the DC optimal power flow model into a compact form of a linear programming model, and then transform it into the corresponding dual form;
[0203] The solution module is used to solve the dual form of the DC optimal power flow model in parallel on the GPU using the sGS-HPR algorithm, which combines symmetric Gauss-Seidel decomposition with the HalpernPeaceman-Rachford algorithm based on semi-positive definite proximal terms, to obtain the optimization results of the DC optimal power flow.
[0204] It should be noted that the foregoing explanation of an embodiment of a GPU-based method for rapidly solving DC optimal power flow problems also applies to a GPU-based device for rapidly solving DC optimal power flow problems in this embodiment, and will not be repeated here. According to the GPU-based device for rapidly solving DC optimal power flow problems proposed in this disclosure, a DC optimal power flow model is established; the DC optimal power flow model is reformulated into a compact form of a linear programming model, and then transformed into its corresponding dual form; the dual form of the DC optimal power flow model is solved in parallel on the GPU using the sGS-HPR algorithm, which combines symmetric Gauss-Seidel decomposition with the Halpern-Peaceman-Rachford algorithm based on semi-positive definite proximal terms, to obtain the optimized result of the DC optimal power flow. This fully utilizes the parallel computing power of the GPU to efficiently solve large-scale security-constrained power grid optimization problems, and has high application value.
[0205] To implement the above embodiments, a third aspect of this disclosure provides an electronic device, comprising:
[0206] At least one processor; and a memory communicatively connected to said at least one processor;
[0207] The memory stores instructions that can be executed by the at least one processor, and the instructions are configured to execute the aforementioned GPU-based method for quickly solving the optimal DC power flow problem.
[0208] To implement the above embodiments, a fourth aspect of this disclosure provides a computer-readable storage medium storing computer instructions for causing the computer to execute the above-described GPU-based method for rapidly solving the optimal DC power flow problem.
[0209] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0210] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform a GPU-based fast solution method for the optimal DC power flow problem according to the above embodiments.
[0211] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0212] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0213] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0214] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.
[0215] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0216] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0217] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0218] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0219] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A fast solution method for DC optimal power flow problem based on GPU, characterized in that, include: Establish an optimal DC power flow model; The DC optimal power flow model is reformulated into a compact form of a linear programming model, and then transformed into the corresponding dual form. The sGS-HPR algorithm, which combines symmetric Gauss-Seidel decomposition with the Halpern-Peaceman-Rachford algorithm based on semidefinite proximal terms, is used to solve the dual form of the DC optimal power flow model in parallel on a GPU, and the optimization results of the DC optimal power flow are obtained.
2. The method according to claim 1, characterized in that, The establishment of the optimal DC power flow model includes: 1) Establish the objective function of the optimal DC power flow model; The objective function is to minimize the sum of generator power generation cost, renewable energy curtailment penalty, and energy storage system loss cost, and its expression is as follows: in, The power generation cost of the generator connected to bus i. This refers to the active power injected by the generator connected to bus i during time period t. and These are the coefficients of the linear and constant terms of the power generation cost of the generator connected to bus i, respectively. The set consisting of all the busbars where the generators are located; The cost of curtailment of electricity from renewable energy units connected to bus i. The active power injected by the renewable energy units connected to bus i during time period t. The curtailment penalty factor for renewable energy units. This represents the maximum active power that the renewable energy units connected to bus i can output. The set of buses containing renewable energy generating units; The charging and discharging loss cost of the energy storage system connected to bus i. and These represent the discharge power and charging power of the energy storage system connected to bus i during time period t, respectively. and These are the discharge efficiency and charging efficiency of the energy storage system connected to bus i, respectively. The penalty coefficient for charging and discharging losses in the energy storage system. The set of buses containing the energy storage system; It is a set consisting of all time periods; 2) The constraints for establishing the optimal DC power flow model include: Power balance constraints; in, The active power demand of the load connected to bus i during time period t. The set consisting of the busbars where the loads are located; Network constraints; in, is the power transfer distribution factor of bus i on line j; For line j, the line power limit; It is the set consisting of all lines; in, and These represent the upward and downward rotational reserve capacity of the generator on bus i during time period t; and These are the uphill and downhill ramp rates available to the generator at bus i, respectively; To optimize the time interval; and These represent the minimum and maximum active power outputs of the generator at bus i, respectively. and These represent the system's requirements for upward and downward rotational reserve capacity during time period t. Climbing constraint; Output constraints of renewable energy units; in, The minimum active power that the renewable energy unit connected to bus i can output; Energy storage system operating constraints; in, The initial capacity of the energy storage system connected to bus i; and These are the upper and lower limits of the capacity of the energy storage system connected to bus i, respectively; and These are the upper bounds of the charging power and discharging power of the energy storage system connected to bus i, respectively.
3. The method according to claim 2, characterized in that, The process of restating the optimal DC power flow model into a compact linear programming model includes: Equations (5) and (13) are expressed as equality constraints. Equations (6), (8)-(10) and (12) are expressed as inequality constraints. Box-type constraint To optimize the upper and lower bounds of the variables, the DC optimal power flow model is transformed into the form shown in equation (15): Where x is the decision variable vector, This includes: the active power output of generators and renewable energy units, the start-stop state variables of generators and renewable energy units, the charging and discharging power of energy storage systems, and the charging and discharging state variables of energy storage systems; c is a coefficient vector. This includes: the marginal cost coefficient of generators, the power curtailment of renewable energy units, and the loss penalty coefficient for charging and discharging of energy storage systems; This is a compact expression of equation (1); This is the coefficient matrix of the equality constraints and inequality constraints; The coefficient matrix corresponding to the equality constraints in the compact form includes: power balance equation and energy balance equation of energy storage system; The coefficient matrix corresponding to the inequality constraints in the compact form includes: line power limits, unit output ramp-up constraints, unit start-up and shutdown limits, and upper and lower bounds of energy storage system energy. This is the constant matrix of equality and inequality constraints; The constant terms corresponding to the equality constraints in the compact form include: load power and initial energy of the energy storage system; For the constant terms corresponding to the inequality constraints in the compact form, including: upper limit of line power capacity and upper and lower limits of energy storage capacity; Let x be the set of box constraints. and These are the upper and lower limits of x, including: the maximum and minimum output of the generator, the upper limit of the output of the renewable energy unit, and the upper and lower limits of the charging and discharging power of the energy storage; n is the number of decision variables, m is the total number of constraints, m = m1 + m2, m1 is the number of equality constraints, and m2 is the number of inequality constraints; It is an n-dimensional real space.
4. The method according to claim 3, characterized in that, Also includes: The linear programming model is transformed into the following dual form: in, For constrained Lagrange multipliers; For the dual variable of the constraint, decouple the subproblem y. , For the multipliers corresponding to the equality constraints, For the multipliers corresponding to the inequality constraints; for The dual variable; for Indicator functions on, for The non-negative quadrants; Indicator functions for set C convex conjugate function.
5. The method according to claim 4, characterized in that, Solving the dual form of the optimal DC power flow model includes: 1) Based on the dual form of the DC optimal power flow model, the dual problem shown in equation (16) is transformed into the augmented Lagrangian function form, as expressed below: in, It is a Lagrange function; For Cartesian product space; For penalty parameters; 2) By introducing the symmetric Gauss-Seidel operator, based on and Construct a semi-proximal preprocessing operator The specific steps for separating equality constraints and inequality constraints, as well as smooth and non-smooth terms in the objective function, are as follows: 2-1) Define a self-adjoint positive semidefinite linear operator as follows: Among them, the self-adjoint positive semidefinite linear operator right Correction, making It has symmetric positive definiteness; 2-2) The operator in step 2-1) Decompose according to the following formula: in, for an upper triangular matrix, for A block diagonal matrix; 2-3) Operators Symmetric Gauss-Seidel operator The expression is as follows: 2-4) Operators The expression is as follows: 3) Based on the results of step 1), the self-adjoint positive semidefinite linear operator obtained in step 2) is introduced into the y subproblem. This forms the Halpern Peaceman-Rachford iterative framework with positive semidefinite proximal terms, and sets the penalty parameter. and convergence tolerance Select initial point , obtained through iteration The optimization result is the optimal DC power flow.
6. The method according to claim 5, characterized in that, The iterative process is as follows: From the number of iterations Begin by repeatedly executing the following steps: 3-1) The augmented Lagrange function expression of equation (17) is used to update the z subproblem as follows: 3-2) The solution to the subproblem x is updated as follows: 3-3) Solve the convex optimization subproblem with positive semidefinite proximal terms, the y subproblem being expressed as: , For positive semidefinite proximal terms, The subproblem of updating variable y is a symmetric Gauss-Seidel closed-form update of y1-y2-y1, and the specific steps are as follows: 3-3-1) Fix y2 and update y1 using the augmented Lagrangian function expression of equation (17). The optimal conditions are as follows: in, ; In the DC optimal power flow model It can be represented in the following form: in, and It is a diagonal matrix. , ; It is a dimension m 11 A column vector, where all elements are equal to 1; By block diagonal decomposition This yields the explicit form: 3-3-2) Fix y1, update y2; set up , yes The largest eigenvalue, for An identity matrix of order 1; in, ; 3-3-3) Correction y1: ; 3-4) Using the Peaceman-Rachford update, an overcorrection point is constructed to accelerate iteration and improve the fixed-point approximation speed, as shown in the following expression: in, This indicates an intermediate iteration point in the previous stage; 3-5) Based on the results of step 3-4), a step size of... The expression for the Halpern iteration method is as follows; in, This is the initial iteration point; 3-6) Using KKT residuals as a metric, determine whether the following formula is satisfied: If so, the iteration ends, and the optimal DC power flow result is output. Otherwise, increment the iteration count k by 1 and then return to step 3-1.
7. A GPU-based fast solution device for DC optimal power flow problems, characterized in that, include: The DC optimal power flow model construction module is used to build DC optimal power flow models. The linearization module is used to reformulate the DC optimal power flow model into a compact form of a linear programming model, and then transform it into the corresponding dual form; The solution module is used to solve the dual form of the DC optimal power flow model in parallel on the GPU using the sGS-HPR algorithm, which combines symmetric Gauss-Seidel decomposition with the HalpernPeaceman-Rachford algorithm based on semi-positive definite proximal terms, to obtain the optimization results of the DC optimal power flow.
8. An electronic device, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, the instructions being configured to perform the method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the method according to any one of claims 1-6.