Non-convex nonlinear steady-state airflow collaborative optimization method suitable for hydrogen energy system

By employing hierarchical processing and eigenvalue optimization, the problem of computational accuracy and efficiency in non-convex gas flow distribution in hydrogen systems is solved, achieving efficient hydrogen gas flow optimization, which is applicable to steady-state gas flow co-optimization in hydrogen energy systems.

CN120995914APending Publication Date: 2025-11-21XI AN JIAOTONG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510876082.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing technologies face the challenge of balancing computational accuracy and solution efficiency when optimizing the gas flow distribution in hydrogen systems due to non-convexity. Traditional methods also suffer from unstable convergence and insufficient accuracy when dealing with non-convex Weymouth equations.

Method used

A hierarchical approach is adopted to decompose the optimization model of the hydrogen system into a centralized second-order cone programming model and a quadratic programming subproblem. The optimization is carried out through the eigenvalue subproblem, and the alternating direction multiplier method is used for information exchange until the global residual satisfies the convergence criterion, thus obtaining the optimal decision variable.

Benefits of technology

It achieves accurate modeling and solution of non-convex optimization problems of hydrogen systems with high computational efficiency, balancing engineering accuracy and computational efficiency, and is suitable for transportation scenarios with high requirements for the physical laws of hydrogen gas flow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995914A_ABST
    Figure CN120995914A_ABST
Patent Text Reader

Abstract

The invention provides a non-convex nonlinear steady-state airflow collaborative optimization method suitable for a hydrogen energy system, and the method comprises the steps: carrying out the layering processing of an original optimization model according to the structural characteristics, and constructing an upper-layer problem into a centralized second-order cone programming model which can be efficiently solved, decomposing the lower layer problem into a plurality of mutually independent quadratic programming sub-problems with a non-convex quadratic constraint; equivalently converting the quadratic programming sub-problem into a characteristic value sub-problem; estimating the optimal characteristic value of the target matrix based on the target function and the constraint condition of the characteristic value sub-problem, and performing dynamic correction by adopting transformation to obtain a lower-layer optimization variable solution; and performing information interaction between the lower-layer variable and the upper-layer decision variable on the basis of an alternating direction multiplier method framework, and performing iterative correction on the upper-layer variable by utilizing a lower-layer optimization variable solution until the global residual error meets a preset convergence criterion, thereby obtaining an optimal decision variable and an optimal value. According to the method, the solving efficiency and the physical precision are both considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydrogen network technology, and in particular to a non-convex, nonlinear, steady-state airflow collaborative optimization method suitable for hydrogen energy systems. Background Technology

[0002] As hydrogen energy plays an increasingly important role in the global energy structure, it is widely used as a zero-carbon energy carrier in transportation, industry, and energy storage. Optimizing the gas flow distribution in hydrogen pipelines has become a research hotspot to improve the operational efficiency and safety of hydrogen systems. Under steady-state conditions, the hydrogen flow pattern is typically described by nonlinear physical models such as the Weymouth equation, which is essentially a highly non-convex quadratic equation. Due to this non-convexity, traditional optimization methods often face the dilemma of balancing computational accuracy and solution efficiency.

[0003] To circumvent the nonconvexity barrier, existing research has proposed various solution strategies. For example, piecewise linearization methods construct mixed-integer linear programming (MILP) models by dividing the Weymouth equation into multiple linear intervals and introducing integer variables to represent interval selection. However, the computational complexity of such methods increases dramatically with the size of the variables, making them difficult to adapt to the real-time requirements of large systems. Another type of method uses relaxation strategies to approximate the original nonconvex constraints, such as second-order cone relaxation (SOCP), semi-definite relaxation (SDP), or convex-concave procedure (CCP), transforming the nonconvex equation into a tractable convex problem. However, these methods often suffer from relaxation errors, causing the optimal solution to deviate from the original physical model, and in severe cases, even leading to infeasible solutions. In addition, some scholars have proposed solution methods based on SDP, but SDP-based methods have a heavy computational burden in large-scale systems, making it difficult to meet the dual requirements of efficiency and accuracy in engineering practice.

[0004] Therefore, there is an urgent need for a novel optimization method that does not require the introduction of integer variables and can balance solution efficiency and physical accuracy in order to address the optimization challenges of the non-convex Weymouth equation in hydrogen systems. To address this challenge, a novel optimization method that balances physical feasibility, model accuracy, and algorithm efficiency is urgently needed. Summary of the Invention

[0005] In view of this, the present invention provides a non-convex nonlinear steady-state airflow collaborative optimization method applicable to hydrogen energy systems to solve the above problems.

[0006] This invention provides a non-convex nonlinear steady-state airflow collaborative optimization method applicable to hydrogen energy systems, comprising: performing hierarchical processing on the original optimization model according to structural characteristics; constructing the upper-level problem into a centralized second-order cone programming model that can be solved efficiently; decomposing the lower-level problem into several independent quadratic programming subproblems with a non-convex quadratic constraint; equivalently transforming the quadratic programming subproblems into eigenvalue subproblems associated with eigenvalues; estimating the optimal eigenvalues ​​of the objective matrix based on the objective function and constraints of the eigenvalue subproblems, and dynamically correcting them using a simplified transformation to obtain the lower-level optimization variable solution; based on the alternating direction multiplier method framework, performing information interaction between the lower-level variables and the upper-level decision variables; using the lower-level optimization variable solution to iteratively correct the upper-level variables until the global residual satisfies the preset convergence criterion, thereby obtaining the optimal decision variable and optimal value.

[0007] In another implementation of the present invention, the original optimization model is expressed as:

[0008]

[0009] Where f(x) is the objective function of the hydrogen system, usually set as the output cost of the hydrogen source; x is the decision variable of the system; N is the set of nodes in the hydrogen network system; Λ p A collection of hydrogen pipelines for a hydrogen system; g w and h w These represent the convex equality constraints and convex inequality constraints for pipe w, respectively; i represents the system node index value; w represents the pipe index value; C w p represents the pipe coefficient in the Weymouth equation. w,f and p w, t represents the hydrogen pressure at the first and last nodes of pipeline w, respectively; f represents the hydrogen pressure at the first and last nodes of pipeline w. w The hydrogen gas flow is through pipe w.

[0010] In another implementation of the present invention, the upper-level problem is represented as:

[0011] upper layer:

[0012] Where P1 is the upper-level subproblem; x w Let w be the original variable vector of the pipe.

[0013] In another implementation of the present invention, the lower-level problem is represented as:

[0014] Lower layer:

[0015] Where P2 is the lower-level subproblem; y w Let w be the perspective variable vector.

[0016] In another implementation of the present invention, the eigenvalue subproblem is expressed as:

[0017]

[0018] Among them, A w B w Let be the coefficients of the quadratic terms of the objective function and constraints in standard form, respectively. T To represent the transpose of a matrix or vector, a w These are the coefficients of the linear term in the objective function in standard form.

[0019] In another implementation of the present invention, the optimal eigenvalues ​​of the target matrix are estimated using the following formula:

[0020]

[0021] Where Λ0 and Λ1 are matrices of appropriate dimensions constructed to satisfy the eigenvalue solution. For the optimal dual variable, z w This is the corresponding feature vector.

[0022] In another implementation of the present invention, the global residual is represented as:

[0023]

[0024] Where, r k+1 This represents the residual after the (k+1)th iteration, where k represents the iteration number. It represents the square of the 2-norm of a vector or matrix.

[0025] In another aspect, this invention provides a non-convex nonlinear steady-state airflow collaborative optimization system suitable for hydrogen energy systems, comprising: a problem construction module: performing hierarchical processing on the original optimization model according to structural characteristics, constructing the upper-level problem into a centralized second-order cone programming model that can be solved efficiently, and decomposing the lower-level problem into several mutually independent quadratic programming subproblems with a non-convex quadratic constraint; a problem transformation module: equivalently transforming the quadratic programming subproblems into eigenvalue subproblems associated with eigenvalues; a variable optimization module: estimating the eigenvalues ​​of the objective matrix based on the objective function and constraints of the eigenvalue subproblems, and dynamically correcting them using a simplified transformation to obtain the lower-level optimization variable solution; and a result output module: based on the alternating direction multiplier method framework, performing information interaction between the lower-level variables and the upper-level decision variables, using the lower-level optimization variable solution to iteratively correct the upper-level variables until the global residual satisfies the preset convergence criterion, thereby obtaining the optimal decision variable and optimal value.

[0026] In another aspect, the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of a non-convex nonlinear steady-state airflow collaborative optimization method applicable to hydrogen energy systems as described in any of the preceding claims.

[0027] In another aspect, the present invention provides a computer storage medium, characterized in that the computer storage medium stores a computer program, which, when executed by a processor, implements the steps of a non-convex nonlinear steady-state airflow collaborative optimization method applicable to hydrogen energy systems as described in any of the preceding claims.

[0028] This invention presents a collaborative optimization method for non-convex, nonlinear steady-state airflow in hydrogen energy systems. Addressing the non-convex and nonlinear characteristics of the Weymouth hydrogen airflow equation, it proposes a collaborative decomposition and solution framework, avoiding the convergence instability and insufficient accuracy issues of traditional methods when facing strong non-convexity. This enhances the modeling and solving capabilities for non-convex optimization problems in hydrogen systems. By uniformly transforming multiple lower-level non-convex subproblems into generalized eigenvalue problems, parallel optimization is achieved. Compared to traditional relaxation methods that may sacrifice accuracy for solvability, this method balances engineering accuracy and computational efficiency. While ensuring high computational efficiency, it effectively approximates the original non-convex equality constraints, making it suitable for transportation scenarios with high requirements for the physical laws of hydrogen airflow and providing a theoretically rigorous optimization scheme. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. By reading the detailed description of the embodiments below, the advantages and benefits of the solutions will become clear to those skilled in the art. The accompanying drawings are only for illustrating preferred embodiments and are not intended to limit the present invention. In the accompanying drawings:

[0030] Figure 1 This is a schematic diagram of a non-convex, nonlinear, steady-state airflow collaborative optimization method applicable to hydrogen energy systems, according to an embodiment of the present invention.

[0031] Figure 2 This is an improved 24-node hydrogen system topology diagram according to an embodiment of the present invention.

[0032] Figure 3 This is a schematic diagram of the error results of the Weymouth equation for a second-order cone relaxation technique according to an embodiment of the present invention.

[0033] Figure 4 This is a schematic diagram of the error results of the Weymouth equation using a piecewise linearization technique according to an embodiment of the present invention.

[0034] Figure 5 This is a schematic diagram of the error results of the Weymouth equation based on the eigenvalue optimization algorithm according to an embodiment of the present invention. Detailed Implementation

[0035] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art should fall within the protection scope of the present invention.

[0036] Figure 1 This is a schematic flowchart of a non-convex nonlinear steady-state airflow collaborative optimization method for hydrogen energy systems provided in an embodiment of the present invention, as shown below. Figure 1 As shown, this embodiment mainly includes:

[0037] S101. Based on the structural characteristics, the original optimization model is processed in layers. The upper-level problem is constructed into a centralized second-order cone programming model that can be solved efficiently, and the lower-level problem is decomposed into several independent quadratic programming subproblems with a non-convex quadratic constraint.

[0038] For example, by adding perspective variables, several non-convex quadratic equality constraints of the original problem are relaxed into corresponding convex quadratic inequality constraints and non-convex quadratic inequality constraints. The original problem is then expressed in its augmented Lagrangian form, and the remaining linear constraints are merged with the convex quadratic inequality constraints to form an upper-level convex optimization problem. The non-convex quadratic inequality constraints are merged with the augmented Lagrangian problem to form multiple lower-level quadratic programming (QP1QC) problems containing only a single non-convex quadratic constraint.

[0039] S102. The quadratic programming subproblem is equivalently transformed into an eigenvalue subproblem associated with the eigenvalues.

[0040] For example, the QP1QC subproblem is equivalently transformed into the generalized eigenvalue (GEP) subproblem.

[0041] S103. Based on the objective function and constraints of the eigenvalue subproblem, the optimal eigenvalues ​​of the objective matrix are estimated, and a simplified transformation is used for dynamic correction to obtain the solution of the lower-level optimization variables.

[0042] S104. Based on the alternating direction multiplier method framework, information interaction is performed between the lower-level variables and the upper-level decision variables. The solution of the lower-level optimization variables is used to iteratively correct the upper-level variables until the global residual satisfies the preset convergence criterion, thereby obtaining the optimal decision variables and optimal values.

[0043] For example, by iteratively calculating at the upper and lower levels and using the lower-level variables to modify the upper-level variables multiple times, the process of gradually satisfying the strict validity of the non-convex quadratic equality constraint can be achieved by utilizing the characteristics of distributed algorithms. The upper and lower level problems can be implemented in an appropriate language and solved and modified alternately until the constraint is satisfied.

[0044] This invention presents a collaborative optimization method for non-convex, nonlinear steady-state airflow in hydrogen energy systems. Addressing the non-convex and nonlinear characteristics of the Weymouth hydrogen airflow equation, it proposes a collaborative decomposition and solution framework, avoiding the convergence instability and insufficient accuracy issues of traditional methods when facing strong non-convexity. This enhances the modeling and solving capabilities for non-convex optimization problems in hydrogen systems. By uniformly transforming multiple lower-level non-convex subproblems into generalized eigenvalue problems, parallel optimization is achieved. Compared to traditional relaxation methods that may sacrifice accuracy for solvability, this method balances engineering accuracy and computational efficiency. While ensuring high computational efficiency, it effectively approximates the original non-convex equality constraints, making it suitable for transportation scenarios with high requirements for the physical laws of hydrogen airflow and providing a theoretically rigorous optimization scheme.

[0045] In another implementation of the present invention, the original optimization model is expressed as:

[0046]

[0047] Where f(x) is the objective function of the hydrogen system, usually set as the output cost of the hydrogen source; x is the decision variable of the system; N is the set of nodes in the hydrogen network system; Λ p A collection of hydrogen pipelines for a hydrogen system; g w and h w These represent the convex equality constraints and convex inequality constraints for pipe w, respectively; i represents the system node index value; w represents the pipe index value; C w p represents the pipe coefficient in the Weymouth equation. w,f and p w, t represents the hydrogen pressure at the first and last nodes of pipeline w, respectively; f represents the hydrogen pressure at the first and last nodes of pipeline w. w The hydrogen gas flow is through pipe w.

[0048] For example, the optimal hydrogen flow (OHF) model generally takes minimizing the output of the gas source as the objective function, and the constraints mainly include hydrogen source constraints, pipeline constraints, compressor constraints, and load constraints. This invention uses the Weymouth steady-state equation to describe the relationship between hydrogen flow and hydrogen pressure. Since this constraint is generally expressed as a quadratic equation about the difference between the square of the flow and the square of the pressure, it is a typical non-convex nonlinear constraint, which leads to the entire problem being a typical non-convex optimization problem.

[0049] The OFH problem can be represented as:

[0050]

[0051] p0 = p const (8)

[0052] Where N and Λ are sets of hydrogen nodes and hydrogen branches (including pipelines and compressors), respectively. and Let Λ represent the sets of pipes flowing into node i and the sets of pipes flowing out of node i, respectively. p and Λ c They are a combination of hydrogen pipelines and hydrogen compressors, N g It is a set of hydrogen gas sources, where (i, j) represents the pipeline from node i to node j, f ij G represents the hydrogen gas flow in pipe (i, j). i and d i These are the hydrogen supply and load values ​​for node i, respectively, and p i and p j C represents the hydrogen gas pressure at nodes i and j. ij It is the Weymouth coefficient of the pipe (i, j), which is generally a constant, Δ ij and δ ij These represent the pressure loss and pressure rise ratio of pipe (i, j), respectively. and These are the maximum and minimum output values ​​of the hydrogen source at node i, respectively. This is the maximum permissible hydrogen flow rate for pipe (i, j). and These are the minimum and maximum allowable hydrogen pressures at node i, respectively. It is easy to see that (3) is a typical non-convex quadratic equality constraint, making the problem difficult to solve.

[0053] The original problem can be expressed in its augmented Lagrange form as follows:

[0054]

[0055] Where L(x,y,ρ) is the augmented Lagrange form of the original problem, M and N are the consensus constraint coefficient matrices of the original variables and perspective variables, respectively, υ is the Lagrange multiplier vector, and ρ is the penalty factor.

[0056] In another implementation of the present invention, the upper-level problem is represented as:

[0057] upper layer:

[0058] Among them, P1 is the upper-level subproblem, containing only linear or cone constraints, which can be solved in one go; x w Let w be the original variable vector of the pipe.

[0059] In another implementation of the present invention, the lower-level problem is represented as:

[0060] Lower layer:

[0061] Among them, P2 is a lower-level subproblem, which is a quadratic programming (QP1QC) subproblem with a single constraint. It contains non-convex constraints and is difficult to solve directly; y w Let w be the perspective variable vector.

[0062] For example, to effectively decompose and equivalently relax the primal problem by pipeline, we define w as the pipeline index value, where (w,f) and (w,t) represent the first and last nodes of pipeline w, respectively. And we define x... w and y w Let represent the vectors composed of the original variables (upper-level variables) and the perspective variables (lower-level variables) of the pipe w, respectively:

[0063]

[0064] Where, x w y w These are the original variable vector and perspective variable vector of the pipe w, respectively.

[0065] The only non-convex quadratic equality constraint in the original OHF problem is equivalently relaxed to the following two inequality constraints:

[0066]

[0067] (11) Since the constraint can be converted to a second-order cone, it is convex, while (12) is non-convex. Using the original variables and perspective variables, the feasible region of the original OHF problem is divided into a convex feasible region X. w Non-convex feasible region Y w :

[0068]

[0069] Among them, X w and Y w Let represent the upper convex feasible region and the lower non-convex feasible region of pipeline w, respectively. Thus, the original problem is decomposed into two decoupled layers.

[0070] To ensure the physical meaning of the decomposed model, consensus constraints need to be established between the upper and lower layers. The original problem is represented as:

[0071]

[0072] Let the consensus constraint mentioned above be: Mx w =Ny w The augmented Lagrange form of the above problem is:

[0073]

[0074] Among them, υ w Let ρ represent the Lagrange multipliers of the variables involved in the pipeline w, and let ρ represent the penalty factor of the augmented Lagrange term.

[0075] The upper and lower level variables, Lagrange multipliers and original residuals of the original OHF problem can be updated according to (17)-(20) respectively.

[0076]

[0077]

[0078] Where k represents the number of iterations, r k+1 This represents the original residual after the (k+1)th iteration. It represents the square of the 2-norm of a vector or matrix.

[0079] Solve the upper and lower level variables in sequence, update the Lagrange multipliers and calculate the original residuals. Use the lower level variables to continuously correct the upper level variables until the residuals are less than a given threshold, and then you can get all the optimization results.

[0080] By decomposing the original problem into an upper-level SOCP problem and multiple lower-level QP1QC subproblems with unique non-convex constraints, and supplementing it with a generalized eigenvalue reconstruction mechanism, we have achieved accurate modeling and efficient solution of complex hydrogen gas flow models, significantly improving optimization feasibility and physical consistency.

[0081] In another implementation of the present invention, the eigenvalue subproblem is expressed as:

[0082]

[0083] Among them, A w B w Let be the coefficients of the quadratic terms of the objective function and constraints in standard form, respectively. T To represent the transpose of a matrix or vector, a w These are the coefficients of the linear term in the objective function in standard form.

[0084] For example, since the P2 subproblem has non-convex constraints, it is difficult and inaccurate to solve it directly. Therefore, it is transformed into an equivalent eigenvalue subproblem.

[0085] The P2 subproblem is rewritten in standard form as (21), and the coefficients can be derived from the augmented Lagrange form.

[0086]

[0087] The objective function is written in standard quadratic programming form, A w For the quadratic and linear coefficient matrices in the augmented Lagrange form of the objective function, B w Let be the coefficient of the quadratic term in the unique non-convex quadratic inequality constraint for pipe w, (·). T To represent the transpose of a matrix or vector, a w These are the coefficients of the linear term in the objective function in standard form.

[0088] By unifying multiple lower-level non-convex subproblems into a generalized eigenvalue problem (GEP), parallel processing is supported, which can significantly improve the solution efficiency in large-scale hydrogen network scenarios. It avoids the problems of variable explosion and iteration stagnation in traditional mixed integer modeling and has good scalability and practicality.

[0089] In another implementation of the present invention, the optimal eigenvalues ​​of the target matrix are estimated using the following formula:

[0090]

[0091] Where Λ0 and Λ1 are matrices of appropriate dimensions constructed to satisfy the eigenvalue solution. For the optimal dual variable, z w This is the corresponding feature vector.

[0092] For example, the core idea of ​​transforming problems like P2 into generalized eigenvalue problems is that we only need to find the optimal dual variable. Make For strictly positive definite variables, the optimal decision variable can be obtained by inverting the matrix of the first-order optimality condition after finding the optimal dual variable. Solving for this optimal dual variable can be represented as a convex eigenvalue optimization problem. Therefore, an estimate of the optimal dual variable is needed first, which can be obtained by optimizing the following problem to find the interval R containing the optimal dual variable. λ .

[0093] λ min / max :min / maxλ w

[0094]

[0095] R λ =(λ min ,λ max ) (twenty four)

[0096] Since an open interval is used, any point within the interval is selected as the estimated value, and denoted as . It can be known It must be positive definite, that is... If an inverse matrix exists, then we can define:

[0097] y(λ w )=-(A w +λ w B) -1 a w (25)

[0098]

[0099] The optimal dual variable is actually about finding a λ. w So that, At this time λ w That is, optimal

[0100] Will This is equivalently represented as a generalized eigenvalue optimization problem, and the necessary matrices are defined as follows:

[0101]

[0102] Prove the optimal It is matrix Λ0+λ w An eigenvalue of Λ1, i.e., the existence of a non-zero vector z. w , so that:

[0103]

[0104] Proof process:

[0105] For the interval R λ any λ in w Matrix Λ0+λ w The determinant of Λ1 is:

[0106]

[0107] First, transformation one: multiply the second row of the above equation by y(λ). w ) T Then add it to the first row; secondly, transformation two: multiply the second column of the result of transformation one by y(λ). w ) T Then add it to the first column; the result after the transformation is shown in (30). Then expand the determinant according to the third row to get (31).

[0108]

[0109] |Λ0+λ w Λ1|=(-1) n θ(λ w )|A w +λ w B w |2 (31)

[0110] Since Λ0+λ exists in the interval... w Λ1 is strictly positive definite, therefore the determinant |Λ0+λ w Λ1| is definitely not 0, so the above determinant only holds true if θ(λ) w This holds true only when λ = 0, at which point λ w That is, optimal

[0111] However, due to the initial estimate It is not necessarily optimal, so we use a simple transformation to approximate the optimality, and consider the following eigenvalue problem:

[0112]

[0113] It is easy to see that the eigenvalues ​​of (32) and (28) satisfy the following relationship: When y(λ) w When ) is not a constant or a constant vector, In the interval R λ The expression is strictly monotonically decreasing, and its value can be either positive or negative. According to the Mean Value Theorem, there must exist a unique optimal solution on the interval [0, 1]. Make When the estimated value Make At that time, the optimal eigenvalue of equation (28) should be greater than Big, that is Similarly, when At that time, the optimal eigenvalue of equation (28) should be greater than Small, that is Therefore, it is necessary to follow the transformation method Make appropriate increases or decreases to the original estimates to approximate the optimal dual variable. Once the optimal solution is obtained, the corresponding optimal decision variables can be calculated according to (25). Each subproblem in the lower level can be processed in parallel using this method until the optimal solutions of all subproblems are obtained, thereby completing the solution of the entire lower level model.

[0114] In another implementation of the present invention, the global residual is represented as:

[0115]

[0116] Where, r k+1 This represents the residual after the (k+1)th iteration, where k represents the iteration number. It represents the square of the 2-norm of a vector or matrix.

[0117] The specific implementation steps of the algorithm can be found in the execution flow shown in Table 1.

[0118] Table 1. A non-convex, nonlinear, steady-state gas flow co-optimization method suitable for hydrogen energy systems.

[0119]

[0120]

[0121] After implementing the collaborative optimization method involved in this invention, the following example scenario was set up for verification: an improved 24-node gas network system was used. Node 1 was set as a relaxed node with a fixed pressure of 80 bar. The system configuration and related parameters are shown in Table 2, and the system topology is as follows. Figure 2 As shown. The convergence threshold of the original residual is set to 10. -4 The maximum number of iterations is 100. To demonstrate the advantages of this invention, the examples also include a piecewise linearization (PWL) method and a second-order cone programming (SOCP) method for comparison. All numerical results were obtained on a computer equipped with an Intel(R) Core(TM) i7-8700 CPU @ 3.19GHz and 64GB of memory, and the results were obtained using the GUROBI 12.0.1 solver.

[0122] Table 2. Parameter configuration information for the improved 24-node hydrogen network system.

[0123]

[0124] (1) Analysis of gas source output and cost results

[0125] Under the above configuration information, with the goal of minimizing the hydrogen output cost, the system was optimized using PWL, SOCP and the method described in this invention, respectively. The resulting supply of each gas source node and the overall output cost of the system are shown in Table 3.

[0126] Table 3. Hydrogen source node output and total system cost

[0127]

[0128] From the perspective of total system cost, the SOCP method superficially achieves the lowest value of 36,717.6 yuan, slightly better than the proposed method's 36,963.92 yuan and the PWL method's 37,060.03 yuan. However, this cost advantage is based on severely relaxing physical constraints. Because the SOCP method relaxes the highly nonlinear Weymouth equation into a convex form, it greatly sacrifices the equation's ability to express the non-convex coupling relationship between pressure difference and flow rate, resulting in calculation results that deviate significantly from the physically feasible region. This is particularly evident in the gas source output distribution: the SOCP method pushes the output of node 13 to 738 m³. 3At the same time, the output of node 17 is reduced to 124.97m. 3 This results in a flow pattern that does not conform to the natural flow characteristics of the pipeline network. In contrast, the method proposed in this invention achieves superior cost performance while maintaining physical consistency. For example, the output at node 17 is 638.14 m³. 3 At node 13, it is 224.84m. 3 This distribution not only better reflects the actual flow characteristics of the pipeline network but also effectively mitigates the risks of local pressure fluctuations and pipeline overload, demonstrating the good approximation capability of this method for Weymouth non-convex constraints. Although the total system cost is slightly higher than the SOCP method, this cost increase is achieved under strict physical constraints. As for the traditional PWL method, its output distribution structure is similar to the method of this invention at some nodes (such as nodes 1 and 19), but because it uses a fixed piecewise approximation for non-convex constraints, the overall model is relatively coarse, resulting in output offset when coordinating the output of nodes 13 and 17 (e.g., node 13 is only 109.55m). 3 Node 17, however, reached 720m. 3 The limit value reflects the limitation of the optimal solution in responding to the system state.

[0129] In summary, while the SOCP method has the lowest cost, its solution results deviate significantly from the Weymouth physical constraints, making it unfeasible in engineering. The PWL method is feasible, but its solution accuracy and consistency are poor, making it difficult to adapt to complex system scheduling. The method proposed in this invention achieves a low-cost, high-balance optimization solution while maintaining strict satisfaction of physical constraints, demonstrating superior engineering applicability and model accuracy.

[0130] (2) Error analysis of the Weymouth equation

[0131] Furthermore, to quantify the feasibility of different methods for handling nonconvex gas flow equations, the absolute constraint infeasibility (ACI) for arbitrary pipe w is introduced. w The concepts of relative constraint infeasibility (RCI) and the overall system are as follows.

[0132]

[0133] Based on the two defined feasibility calculation methods, the ACI of all pipelines in the improved 24-node hydrogen system was calculated using PWL, SOCP, and the method of this invention, respectively. w The results for the overall RCI of the system are as follows: Figure 3 , Figure 4 , Figure 5 As shown in Table 4.

[0134] Table 4 Infeasibility Indicators of Global Constraints in the System Weymouth

[0135]

[0136] From three methods in ACI w index Figure 3 , Figure 4 , Figure 5 The results clearly show significant differences in the ability of different modeling strategies to control physical consistency. The PWL method exhibits large constraint infeasibility values ​​across multiple pipelines, with the highest value appearing in pipeline 1 at 537037.04. In pipelines 11 and 12, the infeasibility values ​​also reach 585959.34 and 299282.35 respectively. This widespread distribution of constraint infeasibility indicates that the method, due to its piecewise linear approximation, produces significant approximation errors, especially at discontinuities near pressure or flow intervals, making it difficult to accurately characterize the nonlinear physical properties of the Weymouth equation. The SOCP method's ACI... w The deviations are even greater, with constraint infeasibility values ​​for pipes 2 and 4 reaching as high as 1,788,851.96 and 2,655,855.94 respectively. The absolute constraint infeasibility values ​​for multiple pipes exceed the million-level, severely deviating from the physical equation. This indicates that while the SOCP form possesses a certain degree of mathematical solvability, its expressive power for non-convex constraints in hydrogen networks is poor, resulting in extremely low physical consistency of the overall solution. In contrast, the method of this invention exhibits extremely fine residual control across all pipes. For example, the constraint infeasibility values ​​for pipes 1, 2, and 3 are only 3.43, 3.20, and 0.90 respectively, with most pipe residuals controlled in single digits, and the maximum residual not exceeding 36.79. This result demonstrates that the fitting accuracy of this method for nonlinear gas flow equations during modeling is far superior to PWL and SOCP, and it can more realistically reflect the physical process.

[0137] As shown in Table 4 of the RCI results, the proposed method exhibits the best performance in terms of RCI, at only 0.3199%, significantly lower than the 11.1361% of the PWL method and the 201.2943% of the SOCP method. This fully demonstrates that the proposed method can effectively approximate and strictly satisfy the constraints of the non-convex Weymouth equations during the solution process, resulting in a highly feasible and accurate final solution in engineering applications. It is worth noting that while the SOCP method boasts high computational speed and superficially achieves the lowest system output cost (as analyzed above), its RCI value exceeds 200%, indicating that its solution severely violates actual physical laws. In contrast, although the PWL method fails to achieve completely accurate modeling, its RCI is controlled at around 11%, still possessing a certain degree of physical feasibility. However, due to its inherent use of linear piecewise approximation to handle non-convex constraints, its modeling accuracy is insufficient, making it difficult to effectively maintain the stability and accuracy of the solution in large-scale systems.

[0138] From the overall RCI index perspective, PWL and SOCP are 11.14% and 201.29% respectively, while the method of this invention is only 0.32%, further verifying its significant advantage in system-level precision control. Therefore, although the computational complexity of this method is slightly higher than that of PWL, it has obvious advantages in physical consistency, modeling accuracy, and engineering feasibility, and is particularly suitable for hydrogen transmission and distribution system optimization scheduling tasks with high requirements for result accuracy.

[0139] In summary, the following conclusions can be drawn from the above practical examples: 1) For the Weymouth non-convex equality constraint problem, the proposed method can decompose the original problem into a main problem and an eigenvalue approximation subproblem through an alternating optimization strategy, achieving high-precision solution within the convergence range; 2) Compared with the traditional piecewise linearization (PWL) and second-order cone relaxation (SOCP) methods, the proposed method performs better in terms of system feasibility, physical consistency, and modeling accuracy. It can significantly reduce the infeasibility of RCI constraints, while taking into account computational efficiency and engineering feasibility, demonstrating good potential for promotion and application value.

[0140] Another aspect of the present invention provides a non-convex nonlinear steady-state airflow cooperative optimization system suitable for hydrogen energy systems, comprising:

[0141] Problem construction module: Based on the structural characteristics, the original optimization model is processed in layers. The upper-level problem is constructed into a centralized second-order cone programming model that can be solved efficiently, and the lower-level problem is decomposed into several independent quadratic programming subproblems with a non-convex quadratic constraint.

[0142] Problem transformation module: Transforms the quadratic programming subproblem into an eigenvalue subproblem associated with the eigenvalue.

[0143] Variable optimization module: Based on the objective function and constraints of the eigenvalue subproblem, the optimal eigenvalues ​​of the objective matrix are estimated, and a simplified transformation is used for dynamic correction to obtain the solution of the lower-level optimization variables.

[0144] The results output module, based on the alternating direction multiplier method framework, performs information interaction between lower-level variables and upper-level decision variables. It uses the solution of the lower-level optimization variables to iteratively correct the upper-level variables until the global residual satisfies the preset convergence criterion, thus obtaining the optimal decision variables and optimal values.

[0145] This invention presents a non-convex, nonlinear steady-state airflow collaborative optimization system for hydrogen energy systems. Addressing the non-convex and nonlinear characteristics of the Weymouth hydrogen airflow equation, it proposes a collaborative decomposition and solution framework, avoiding the convergence instability and insufficient accuracy issues of traditional methods when facing strong non-convexity, thus enhancing the modeling and solving capabilities of non-convex optimization problems in hydrogen systems. By uniformly transforming multiple lower-level non-convex subproblems into generalized eigenvalue problems, parallel optimization is achieved. Compared to traditional relaxation methods that may sacrifice accuracy for solvability, this system balances engineering accuracy and computational efficiency, effectively approximating the original non-convex equality constraints while ensuring high computational efficiency. It is suitable for transportation scenarios with high requirements for the physical laws of hydrogen airflow and provides a theoretically rigorous optimization scheme.

[0146] In another aspect of the present invention, the electronic device includes: a processor, a memory, and a communication bus and a communication interface.

[0147] in:

[0148] The processor, memory, and communication interface communicate with each other via a communication bus.

[0149] A communication interface is used to communicate with other electronic devices or servers.

[0150] The processor is used to execute programs, specifically, to perform any of the steps of the non-convex nonlinear steady-state gas flow collaborative optimization method applicable to hydrogen energy systems in the above embodiments.

[0151] Specifically, the program may include program code, which includes computer operation instructions.

[0152] The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.

[0153] Memory is used to store programs. Memory may include high-speed RAM, and may also include non-volatile memory, such as at least one disk drive.

[0154] Specifically, the program can be used to cause the processor to execute the steps of any of the non-convex nonlinear steady-state airflow collaborative optimization methods applicable to hydrogen energy systems described in the embodiments. The specific implementation of each step in the program can be found in the corresponding descriptions of the steps and units executed in any of the aforementioned non-convex nonlinear steady-state airflow collaborative optimization methods applicable to hydrogen energy systems, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments.

[0155] An exemplary embodiment of this application also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods of various embodiments of this application.

[0156] The methods described above according to embodiments of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.

[0157] Specific embodiments of the present invention have now been described. Other embodiments are within the scope of the appended claims. In some cases, the actions described in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result.

[0158] It should be noted that all directional indications (such as up, down, left, right, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship between the components in a certain specific order (as shown in the figure). If the specific order changes, the directional indication will also change accordingly.

[0159] In the description of this invention, the terms "first" and "second" are used only for convenience in describing different components or names, and should not be construed as indicating or implying a sequential relationship, relative importance, or implicitly specifying the number of technical features indicated. Thus, a feature defined with "first" and "second" may explicitly or implicitly include at least one of that feature.

[0160] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0161] It should be noted that although specific embodiments of the present invention have been described in detail with reference to the accompanying drawings, this should not be construed as limiting the scope of protection of the present invention. Various modifications and variations that can be made by those skilled in the art without inventive effort within the scope described in the claims still fall within the scope of protection of the present invention.

[0162] The examples of the embodiments of the present invention are intended to concisely illustrate the technical features of the embodiments of the present invention, so that those skilled in the art can intuitively understand the technical features of the embodiments of the present invention, and are not intended to be an improper limitation of the embodiments of the present invention.

[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A non-convex, nonlinear, steady-state gas flow cooperative optimization method suitable for hydrogen energy systems, characterized in that, include: Based on the structural characteristics, the original optimization model is processed in layers. The upper-level problem is constructed into a centralized second-order cone programming model that can be solved efficiently, and the lower-level problem is decomposed into several independent quadratic programming subproblems with a non-convex quadratic constraint. The quadratic programming subproblem is equivalently transformed into an eigenvalue subproblem associated with the eigenvalues; Based on the objective function and constraints of the eigenvalue subproblem, the optimal eigenvalues ​​of the objective matrix are estimated, and a simplified transformation is used for dynamic correction to obtain the solution of the lower-level optimization variables. Based on the alternating direction multiplier method framework, information interaction is performed between lower-level variables and upper-level decision variables. The solutions of the lower-level optimization variables are used to iteratively correct the upper-level variables until the global residuals meet the preset convergence criteria, thereby obtaining the optimal decision variables and optimal values.

2. The method according to claim 1, characterized in that, The original optimization model is expressed as follows: Where f(x) is the objective function of the hydrogen system, usually set as the output cost of the hydrogen source; x is the decision variable of the system; N is the set of nodes in the hydrogen network system; Λ p A collection of hydrogen pipelines for a hydrogen system; g w and h w These represent the convex equality constraints and convex inequality constraints for pipe w, respectively; i represents the system node index value; w represents the pipe index value; C w p represents the pipe coefficient in the Weymouth equation. w,f and p w, t represents the hydrogen pressure at the first and last nodes of pipeline w, respectively; f represents the hydrogen pressure at the first and last nodes of pipeline w. w The hydrogen gas flow is through pipe w.

3. The method according to claim 2, characterized in that, The higher-level problem is represented as: upper layer: Where P1 is the upper-level subproblem; x w Let w be the original variable vector of the pipe.

4. The method according to claim 2, characterized in that, The lower-level problem is represented as follows: Lower layer: Where P2 is the lower-level subproblem; y w Let w be the perspective variable vector.

5. The method according to claim 4, characterized in that, The eigenvalue subproblem is expressed as: Among them, A w B w Let be the coefficients of the quadratic terms of the objective function and constraints in standard form, respectively. T To represent the transpose of a matrix or vector, a w These are the coefficients of the linear term in the objective function in standard form.

6. The method according to claim 5, characterized in that, Also includes: The optimal eigenvalues ​​of the target matrix are estimated using the following formula: Where Λ0 and Λ1 are matrices of appropriate dimensions constructed to satisfy the eigenvalue solution. For the optimal dual variable, z w This is the corresponding feature vector.

7. The method according to claim 6, characterized in that, The global residual is represented as: Where, r k+1 This represents the residual after the (k+1)th iteration, where k represents the iteration number. It represents the square of the 2-norm of a vector or matrix.

8. A non-convex nonlinear steady-state airflow cooperative optimization system suitable for hydrogen energy systems, characterized in that, include: Problem construction module: Based on structural characteristics, the original optimization model is processed in layers. The upper-level problem is constructed into a centralized second-order cone programming model that can be solved efficiently, and the lower-level problem is decomposed into several independent quadratic programming subproblems with a non-convex quadratic constraint. Problem transformation module: Transforms the quadratic programming subproblem into an eigenvalue subproblem associated with the eigenvalues; Variable optimization module: Based on the objective function and constraints of the eigenvalue subproblem, the optimal eigenvalues ​​of the objective matrix are estimated, and a simplified transformation is used for dynamic correction to obtain the solution of the lower-level optimization variables; The results output module, based on the alternating direction multiplier method framework, performs information interaction between lower-level variables and upper-level decision variables. It uses the solution of the lower-level optimization variables to iteratively correct the upper-level variables until the global residual satisfies the preset convergence criterion, thus obtaining the optimal decision variables and optimal values.

9. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a non-convex nonlinear steady-state airflow collaborative optimization method for hydrogen energy systems as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, implements the steps in the non-convex nonlinear steady-state airflow collaborative optimization method applicable to hydrogen energy systems as described in any one of claims 1 to 7.