An optimization method for electro-electric coupling systems based on adaptive piecewise linearization
By using an adaptive piecewise linearization method, dynamically cutting segmented intervals and optimizing the position of segmentation points, the problem of balancing computational accuracy and efficiency in electro-pneumatic coupling systems is solved, and high-efficiency energy flow computation is achieved.
Patent Information
- Application Number
- CN202211252065.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-13
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2042-10-13
AI Technical Summary
Existing piecewise linearization techniques struggle to balance computational accuracy and efficiency in electro-pneumatic coupling systems, leading to difficulties in solving nonlinear optimization models, especially due to the large errors caused by the fixed number of segments and point positions.
An adaptive piecewise linearization method is adopted, which dynamically increases the number of segments and segmentation points by iteratively cutting the segmented intervals, optimizing the position of the segmentation points, and transforming it into a mixed integer linear programming model.
It improves computational accuracy and efficiency, reduces the difficulty of model solving, and realizes efficient energy flow calculation for electro-pneumatic coupled systems.
Smart Images

Figure CN115860168B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of energy internet optimization operation, specifically involving an optimization method for an electro-gas coupling system based on adaptive piecewise linearization. Background Technology
[0002] The energy crisis, environmental pollution, and global warming are becoming increasingly severe, posing serious challenges to human survival and sustainable development. To ensure the sustainable development of human society, it is essential to actively develop renewable energy. However, my country's current power structure, dominated by coal-fired power, struggles to meet the peak-shaving requirements of a power system with a high proportion of intermittent energy sources. Compared to coal-fired units, gas-fired units offer advantages such as high conversion efficiency, lower carbon emissions, and stronger peak-shaving capabilities, playing a crucial transitional role in my country's power structure adjustment. With the rapid development and widespread use of gas-fired units, the coupling between the power system and the natural gas system is becoming increasingly close. Research on electro-gas coupling systems has received widespread attention, becoming an important pathway to promote the consumption of new energy sources, achieve multi-energy complementarity, and realize efficient energy utilization.
[0003] Because of the non-convex nonlinear gas flow equations in electro-gas coupled systems, the optimal energy flow model is usually established as a complex nonlinear optimization model, which is difficult to solve quickly. Since piecewise linearization methods have the advantages of simple algorithms and strong versatility, existing techniques typically use piecewise linearization to linearize the gas flow equations in pipelines, thereby approximating the original non-convex nonlinear model as a mixed-integer linear programming model for solution. However, existing piecewise linearization techniques use a fixed number of segments and segmentation points, which often leads to large errors in the approximate model. To improve computational accuracy, a large number of segments needs to be added, significantly increasing the difficulty of solving the model. Therefore, how to balance computational accuracy and solution efficiency, and achieve adaptive optimal selection of the number of segments and segmentation points for piecewise linearization while ensuring computational accuracy, is a major challenge currently facing the calculation of optimal energy flow in electro-gas coupled systems. Summary of the Invention
[0004] To address the problems existing in the prior art, the present invention aims to provide an optimization method for an electro-gas coupling system based on adaptive piecewise linearization. This method dynamically divides the gas flow in a natural gas pipeline into segmented intervals through an iterative approach, gradually increasing the number of segments and segmentation points. While ensuring calculation accuracy, it introduces the minimum number of segmented intervals and determines the optimal segmentation point location, thereby improving the accuracy of calculating the square value of the gas pressure in the natural gas pipeline. This transforms the nonlinear optimization model for optimal energy flow calculation in the electro-gas coupling system into a mixed-integer linear programming model, improving the efficiency of energy flow calculation.
[0005] To achieve the above objectives, the present invention adopts the following technical solution.
[0006] This invention proposes an optimization method for an electro-aerodynamic coupling system based on adaptive piecewise linearization. The method establishes an optimal energy flow calculation model for the electro-aerodynamic coupling system, and the objective function of the model is:
[0007]
[0008] in, Represents a set of generators; P represents a collection of gas sources; Gi and c Gi G represents the active power output and unit operating cost of generator i, respectively; m and c Sm These represent the gas supply volume and unit gas supply cost of gas source m, respectively.
[0009] The constraints of the model include power system operation constraints, natural gas system operation constraints, and power system-natural gas system coupling constraints;
[0010] The power system operation constraints include generator active power output, bus voltage, and transmission line power meeting their respective upper and lower limits, and power balance.
[0011] The operating constraints of the natural gas system include compressor equations, gas source supply constraints, pipeline branch airflow constraints, compressor branch airflow constraints, node airflow balance constraints, node gas pressure constraints, and piecewise linearized pipeline airflow equations.
[0012] The power system-natural gas system coupling constraint is that the gas turbine unit provides electricity to the power system by consuming natural gas.
[0013] The above technical solution takes into account the coupled and coordinated operation of the power system and the natural gas system, which can improve the overall efficiency of the energy system through multi-energy complementarity, promote the consumption of new energy sources, and improve the safe and reliable supply of electricity and natural gas.
[0014] Typically, the gas flow equations in a natural gas pipeline are a complex set of non-convex, nonlinear equations, which can be expressed as:
[0015] π m -π n =f(Q) p,mn ) = C mn Q p,mn |Q p,mn | α-1
[0016] Where, π m and π n Let C represent the squared air pressure values at nodes m and n, respectively. mn Q represents the drag coefficient of the pipe airflow equation, where α is a constant determined by the chosen pipe airflow model.c,mn This represents the air flow rate transmitted in compressor mn; f(Q) p,mn () represents the square air pressure difference in the pipeline.
[0017] An adaptive piecewise linearization method with dynamic segmentation of intervals can transform the non-convex nonlinear gas flow equations of existing natural gas pipelines into piecewise linearized gas flow equations. Specifically, iteratively, the intervals are dynamically segmented, gradually increasing the number of segments and segmentation points. While ensuring computational accuracy, the minimum number of intervals is introduced, and the optimal segmentation point is determined. This transforms the nonlinear optimization model for optimal energy flow calculation in an electro-gas coupled system into a mixed-integer linear programming model, improving the efficiency of energy flow calculation. The steps include:
[0018] S100. For any natural gas pipeline mn, the pipeline gas flow rate Q p,mn Operating range Divided into equal parts These segmented intervals constitute a set of segmented intervals. Set value;
[0019] S200. Obtain a segment interval from the set of segment intervals that has not yet yielded a fitted line segment as the current segment interval, and denote it as...
[0020] S300, Convert the square pressure difference of the pipeline in the current segmented section into a line passing through both ends of the segmented section. and The secant equation h k (Q p,mn The approximation is made, and the error between the linearized pipe airflow value of the current segmented interval and the actual pipe airflow value is calculated according to the following formula. Add it to the piecewise linearization error set:
[0021]
[0022] S400. If there are still segmented intervals in the set of segmented intervals that have not yet obtained fitted line segments, return to step S200; otherwise, proceed to step S500.
[0023] S500: If the size of the segmented interval set is greater than the set value or the maximum segmented linearization error in the segmented linearization error set is less than the set error threshold, proceed to step S600; otherwise, divide the segmented interval corresponding to the maximum segmented linearization error into two sub-segmented intervals, replace the segmented interval corresponding to the maximum segmented linearization error in the segmented interval set with these two sub-segmented intervals, delete the maximum segmented linearization error in the segmented linearization error set, and return to S200.
[0024] S600, Using the interval in the segmented interval set as the optimal segmented interval, the pipe square pressure difference f(Q) p,mn The following piecewise linearized pipe airflow equation is used to approximate the flow as follows:
[0025]
[0026]
[0027] in: This indicates the upper limit of the allowable airflow through pipe mn, h k (Q p,mn ) represents the piecewise linear function of the airflow equation for the k-th segment of the pipe. For the introduction of auxiliary continuous variables, Q represents the gas flow rate in the i-th segment of pipe mn. p,mn N represents the gas flow rate transported in pipe mn. mn This represents the final number of segments.
[0028] As an improvement to the above technical solution, a generalized model for the compressor is proposed to describe the compressor state under different control modes, namely:
[0029]
[0030] Where, π m and π n Q represents the squared values of the air pressure at the inlet and outlet of the compressor, respectively; c,mn This indicates the air flow rate transmitted in compressor mn; and Parameters describing the compressor control method;
[0031] When the compressor operates at a constant compression ratio hour,
[0032] When the compressor operates at a constant pressure π n -π m =Δ set hour,
[0033] When the compressor operates at a constant gas flow Q c,mn =Q set hour,
[0034] When the compressor operates at a constant inlet pressure π m =π in hour,
[0035] When the compressor operates at a constant outlet pressure π m =π out hour,
[0036] r set Δ set Q set π in π out It is a positive real number.
[0037] In the above technical solution, by controlling and The values of these four parameters can flexibly describe the following five control modes of the compressor. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 The above is a schematic diagram of the adaptive piecewise linearization method for pipeline airflow equations based on dynamic segmentation of intervals;
[0040] Figure 2 The diagram illustrates the effect of adaptive piecewise linearization based on dynamic segmentation of intervals. Detailed Implementation
[0041] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The optimal energy flow calculation method for an electro-piezoelectric coupling system based on adaptive piecewise linearization is implemented through the following steps:
[0042] (1) Nonlinear optimization model for calculating the optimal energy flow of an electro-pneumatic coupling system
[0043] A nonlinear optimization model for calculating the optimal energy flow of an electro-gas coupled system is constructed, including the objective function and constraints. The objective function of the optimal energy flow model for the electro-gas coupled system is to minimize the total operating cost of the system, specifically including the generator operating cost of the power system and the gas supply cost of the natural gas system.
[0044]
[0045] in, Represents a set of generators; P represents a collection of gas sources; Gi and cGi G represents the active power output and unit operating cost of generator i, respectively; m and c Sm These represent the gas supply volume and unit gas supply cost of gas source m, respectively.
[0046] The constraints of the optimal energy flow model for the electric-gas coupled system include power system operation constraints, natural gas system operation constraints, and power-gas system coupling constraints, as detailed below:
[0047] 1) Power system operation constraints
[0048] Power system operating constraints include power balance constraints, generator active power output constraints, bus voltage constraints, and transmission line power constraints.
[0049] The power balance constraint can be expressed as:
[0050]
[0051] in, P represents the set of transmission lines connected to bus i; Li P represents the active load on bus i; ij This represents the active power flowing through the transmission line ij.
[0052] The active power output constraint of the generator set can be expressed as:
[0053]
[0054] in, and These represent the lower and upper limits of the active power output of generator set i, respectively.
[0055] Bus voltage constraint can be expressed as:
[0056]
[0057] in, and These represent the lower and upper limits of the voltage amplitude of bus i, respectively.
[0058] The power constraint of a transmission line can be expressed as:
[0059]
[0060]
[0061] Where, θ i and θ j These represent the voltage phase angles of bus i and j, respectively; This indicates the upper limit of the active power of transmission line ij.
[0062] 2) Natural gas system operation constraints
[0063] The constraints on natural gas system operation include pipeline gas flow equations, compressor equations considering multiple control methods, gas source supply constraints, pipeline branch gas flow constraints, compressor branch gas flow constraints, node gas flow balance constraints, and node gas pressure constraints.
[0064] The gas flow equations for natural gas pipelines are a complex set of non-convex, nonlinear equations, which can be expressed as:
[0065] π m -π n =f(Q) p,mn ) = C mn Q p,mn |Q p,mn | α-1 (7)
[0066] Where, π m and π n Q represents the squared values of air pressure at nodes m and n, respectively; p,mn f(Q) represents the gas flow rate transmitted in pipe mn; p,mn ) represents the square pressure difference in the pipeline; C mn α represents the drag coefficient of the duct airflow equation; α is a constant determined by the selected duct airflow model. In the Weymouth model, α is 2, in the Panhandle A model, α is 1.8545, and in the Panhandle B model, α is 1.9607.
[0067] Generally, compressors can operate in different states under different control modes. However, traditional research usually assumes that the compressor operates under a specific control mode, such as constant compression ratio or constant absolute pressure rise. To describe the operating states of the compressor under different control modes, this invention proposes a generalized model for the compressor:
[0068]
[0069] Where, π m and π n Q represents the squared values of the air pressure at the inlet and outlet of the compressor, respectively; c,mn This indicates the air flow rate transmitted in compressor mn; and These are parameters describing the compressor control mode. By controlling the values of these four parameters, various compressor control modes can be flexibly described, including constant compression ratio mode, constant pressure boost mode, constant airflow mode, constant inlet pressure mode, and constant outlet pressure mode, as follows:
[0070] Method 1: The compressor operates at a constant compression ratio hour,
[0071] Method 2: The compressor operates at a constant pressure boost π n -π m =Δ set hour,
[0072] Method 3: The compressor operates at a constant airflow Q c,mn =Q set hour,
[0073] Method 4: The compressor operates at a constant inlet pressure π m =π in hour,
[0074] Method 5: The compressor operates at a constant outlet pressure π m =π out hour,
[0075] In the above methods, r set Δ set Q set π in π out positive real number
[0076] Gas supply constraints:
[0077]
[0078] in, and These represent the lower and upper limits of the gas supply from gas source m, respectively.
[0079] Airflow constraints in pipeline branches:
[0080]
[0081] in, This indicates the upper limit of the allowable airflow through pipe branch mn.
[0082] Compressor branch airflow constraints:
[0083]
[0084] in, and These represent the lower and upper limits of the allowable flow rate of air through the compressor branch mn, respectively.
[0085] Node airflow balance constraints:
[0086]
[0087] in, and G represents the set of pipe branches and the set of compressor branches connected to node i, respectively; m and D m These represent the airflow injection rate and airflow load at node m, respectively.
[0088] Nodal pressure constraints:
[0089]
[0090] in, and These represent the squares of the lower and upper pressure limits at node m, respectively.
[0091] 3) Coupling constraints of power system-natural gas system
[0092] The natural gas system and the power system are closely coupled through gas turbine units, which provide electricity to the power system by consuming natural gas. The model is as follows:
[0093]
[0094] in, and These represent the output active power and natural gas flow rate of the gas turbine unit, respectively; μ represents the gas-to-electricity conversion coefficient of the gas turbine unit.
[0095] In summary, the objective function of the nonlinear optimization model for calculating the optimal energy flow of the electro-gas coupling system is (1), and the constraints are (2)-(14). Due to the existence of the nonlinear pipe airflow equation (7), this model is a complex non-convex nonlinear optimization model.
[0096] (2) Adaptive piecewise linearization of the pipeline airflow equation based on dynamic segmentation of segmented intervals
[0097] Since the pipeline airflow equation (7) is a non-convex nonlinear equation, it poses a significant challenge to solving the optimal energy flow model of the electro-gas coupling system. Traditional methods typically employ piecewise linearization to linearize the pipeline airflow equation, thereby approximating the original non-convex nonlinear model as a mixed-integer linear programming model for solution. However, existing piecewise linearization techniques use a fixed number of segments and segmentation point positions, often leading to significant errors in the approximate model. To improve computational accuracy, a large number of segments needs to be added, significantly increasing the difficulty of solving the model. Therefore, this invention proposes an adaptive piecewise linearization method based on dynamic segmentation interval cutting. By dynamically cutting the segmentation intervals through an iterative method, the number of segments and segmentation points are gradually increased. This method can introduce the minimum number of segmentation intervals and determine the optimal segmentation point position while ensuring computational accuracy, thus effectively balancing the solution accuracy and computational efficiency of the model. The flowchart of the adaptive piecewise linearization method for the pipeline airflow equation based on dynamic segmentation interval cutting is shown below. Figure 1 As shown, the specific steps are as follows:
[0098] S100. For any natural gas pipeline mn, the pipeline gas flow rate Q p,mn Operating range Divided into equal parts These segmented intervals constitute a set of segmented intervals. This is the set value. This indicates the upper limit of the allowable airflow through pipe branch mn.
[0099] In this step, This sets the initial number of segments for piecewise linearization of the gas flow equation in a natural gas pipeline. A maximum number of segments can be set to facilitate iteration. and target error This serves as the criterion for whether to terminate the iteration. An initial iteration count *r* is set to indicate the number of segments in the iteration. To facilitate counting the number of segments in each iteration, the initial value is r = 0.
[0100] By analyzing the airflow Q in the pipeline p,mn The operating range is divided into equal parts. After dividing the intervals into segments, an initial linearized segmented interval is formed.
[0101] S200. Obtain a segment interval from the set of segment intervals that has not yet yielded a fitted line segment as the current segment interval, and denote it as...
[0102] S300, Convert the square pressure difference of the pipeline in the current segmented section into a line passing through both ends of the segmented section. and The secant equation h k (Qp,mn The approximation is made, and the error between the linearized pipe airflow value of the current segmented interval and the actual pipe airflow value is calculated according to the following formula. Add it to the piecewise linearization error set:
[0103]
[0104] In this step, the nonlinear term f(Q) in the pipe airflow equation... p,mn Use a line passing through the left and right ends of the interval as the segmentation point. and The secant approximation, corresponding to the piecewise linear function, is expressed as:
[0105]
[0106] Among them, h k (Q p,mn ) represents the piecewise linear function of the airflow equation for the k-th segment of the pipeline.
[0107] Find the linearized pipe airflow equation h within each segmented interval. k (Q p,mn ) and the original nonlinear pipe airflow equation f(Q) p,mn Error between ) The calculation formula is as follows:
[0108]
[0109] S400. If there are still segmented intervals in the set of segmented intervals that have not yet obtained fitted line segments, return to step S200; otherwise, proceed to step S500.
[0110] In this step, for the initial number of segments, if there are no segments in the set of segment intervals for which no fitted line segment has been obtained, then the following can be obtained: Piecewise linearization error of each segmented interval For the intermediate iteration process, we can obtain Piecewise linearization error of each segmented interval Let be the number of segmented intervals in the r-th iteration.
[0111] S500: If the size of the segmented interval set is greater than the set value or the maximum segmented linearization error in the segmented linearization error set is less than the set error threshold, proceed to step S600; otherwise, divide the segmented interval corresponding to the maximum segmented linearization error into two sub-segmented intervals, replace the segmented interval corresponding to the maximum segmented linearization error in the segmented interval set with these two sub-segmented intervals, delete the maximum segmented linearization error in the segmented linearization error set, and return to S200.
[0112] This step increases the number of segmented intervals by 1 if the iteration does not terminate. The above example demonstrates dividing the segmented interval corresponding to the maximum piecewise linearization error into two sub-segmented intervals. Alternatively, the segmented interval corresponding to the maximum piecewise linearization error can be divided into three sub-segmented intervals, or other interpolation methods, such as cubic or multi-cubic B-splines, can be used to reduce the error of piecewise linear fitting.
[0113] In the return step S200, the segment intervals in the segment interval count that did not obtain a fitted line segment are newly added sub-segment intervals. The maximum piecewise linearization error is re-obtained from the piecewise linearization error set.
[0114] This dynamic segmentation method involves progressively increasing the number of segments until the optimal number of segments and the optimal segmentation point position are obtained.
[0115] S600, Using the interval in the segmented interval set as the optimal segmented interval, the pipe square pressure difference f(Q) p,mn The following piecewise linearized pipe airflow equation is used to approximate the flow as follows:
[0116]
[0117]
[0118] in: For the introduction of auxiliary continuous variables, Q represents the gas flow rate in the i-th segment of pipe mn. p,mn N represents the gas flow rate transported in pipe mn. mn This represents the final number of segments.
[0119] Finally, the optimal number of segments is obtained by dynamically dividing the segmented intervals. Here, the value of r is the value from the last iteration. The iteration terminates, and the segmentation point corresponding to the optimal segmentation interval is obtained. Using these optimal segmentation points as poles, the nonlinear term f(Q) in the pipe airflow equation... p,mn The linear convex combination form of ) is shown in formulas (17)-(18).
[0120] The adaptive piecewise linearization effect based on dynamic segmentation of intervals proposed in this invention is shown in the figure below. Figure 2 As shown, it can be seen that by iteratively increasing the number of segments, the number of segments can be reduced to the minimum while achieving the optimal arrangement of segment points.
[0121] (3) Mixed-integer linear programming model for optimal energy flow calculation of electro-pneumatic coupled systems
[0122] Using the adaptive piecewise linearization method based on dynamic segmentation of segmented intervals proposed in step (2), the original non-convex nonlinear pipe airflow equation (7) is approximated as a convex combination of a series of linear functions, as shown below:
[0123]
[0124]
[0125] Therefore, the nonlinear optimization of the optimal energy flow calculation of the electro-gas coupled system is transformed into a mixed-integer linear programming model, with the objective function being (1) and the constraints consisting of (2)-(6), (7)-(14), and (19)-(20). The model is efficiently solved using existing commercial optimization solvers such as Gurobi and Cplex, and the optimal energy flow results of the electro-gas coupled system are obtained, including the optimal operating cost of the power system, the optimal output of the generator set, the bus voltage and phase angle, and the active power of the transmission line; as well as the optimal operating cost of the natural gas system, the optimal gas supply of the gas source, the pipeline gas flow rate, and the node gas pressure.
[0126] Through the above description of the embodiments, those skilled in the art will clearly understand that the methods of this disclosure can be implemented using software plus necessary general-purpose hardware, or they can be implemented using dedicated hardware, including dedicated integrated circuits, dedicated CPUs, dedicated memory, dedicated components, etc. Generally, any function performed by a computer program can be easily implemented using corresponding hardware, and the specific hardware structure used to implement the same function can be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for the purposes of this disclosure, software implementation is often a preferred implementation method.
[0127] In summary, this invention considers the coupled and coordinated operation of power and natural gas systems, which can improve the overall efficiency of the energy system through multi-energy complementarity, promote the consumption of new energy sources, and enhance the safe and reliable supply of electricity and natural gas. During the calculation process, a linearized pipeline airflow equation is obtained through adaptive piecewise linearization. The number of segments is determined adaptively, specifically by dynamically cutting the segment intervals using an iterative method, gradually increasing the number of segments and segmentation points. This approach, while ensuring computational accuracy, introduces the minimum number of segment intervals and determines the optimal segmentation point location. Furthermore, the optimal energy flow calculation of the electro-gas coupled system is transformed into a mixed-integer linear programming model, achieving an effective trade-off between solution accuracy and computational efficiency. Ultimately, this provides a feasible and efficient technical means for the optimal energy flow analysis of electro-gas coupled systems.
[0128] Although embodiments of the present invention have been described above in conjunction with the accompanying drawings, the present invention is not limited to the specific embodiments and application fields described above. The specific embodiments described above are merely illustrative and instructive, and not restrictive. Those skilled in the art can make many other forms based on the guidance of this specification and without departing from the scope of protection of the claims of the present invention, and all of these are within the scope of protection of the present invention.
Claims
1. A method for optimal control of electro-mechanical coupled systems based on adaptive piecewise linearization, characterized by, The method establishes an optimal energy flow calculation model of an electro-gas coupling system, a target function of the model being: wherein, represents a set of generators; represents a set of gas sources; P Gi and c Gi represent the active power output and the unit operating cost of generator i, respectively; G m and c Sm represent the gas supply amount and the unit gas supply cost of gas source m, respectively; The constraint conditions of the model include power system operation constraints, natural gas system operation constraints and power system-natural gas system coupling constraints; The power system operation constraints include that active power output of a generator unit, bus voltage and power of a power transmission line meet respective upper and lower limits and power balance is met; The natural gas system operation constraints include a compressor equation, gas supply amount constraint of a gas source, gas flow constraint of a pipeline branch, gas flow constraint of a compressor branch, node gas flow balance constraint, node gas pressure constraint and a segmented linearization pipeline gas flow equation; The power system-natural gas system coupling constraint is that a gas turbine unit provides electric energy for the power system by consuming natural gas; Wherein: the segmented linearization pipeline gas flow equation is obtained through the following steps: S100、for any natural gas pipeline mn, the pipeline gas flow Q p,mn of the operating range is equally divided into segment intervals, constituting a segment interval set, is a set value, represents the upper limit of the allowable gas flow through the pipeline mn; S200, obtaining a segmented interval without a fitted line segment from the segmented interval set as a current segmented interval, denoted as S300, square the pipe pressure difference of the current segment interval approximate the line equation h through the two end segment points of the interval with a line equation h k (Q p,mn ) and calculate the error between the linearized pipe flow value of the current segment interval and the true pipe flow value according to the following formula add it to the segment linearization error set: S400, if there are still segmented intervals in the segmented interval set that have not obtained a fitted line segment, return to step S200; otherwise, go to step S500; S500, if the size of the segmented interval set is greater than a set value or the maximum segmented linearization error in the segmented linearization error set is less than a set error threshold, go to step S600; otherwise, divide the segmented interval corresponding to the maximum segmented linearization error into two sub-segmented intervals, replace the segmented interval corresponding to the maximum segmented linearization error in the segmented interval set with the two sub-segmented intervals, delete the maximum segmented linearization error in the segmented linearization error set, and return to S200; S600, using the interval in the segmented interval set as the optimal segmented interval, the pipeline square gas pressure difference f(Q p,mn ) is approximated by using the following segmented linearization pipeline gas flow equation: where: represents the upper limit of the flow rate of gas allowed to flow through the pipeline mn, h k (Q p,mn ) represents a piecewise linear function of the kth piecewise interval pipeline gas flow equation, is an auxiliary continuous variable introduced, represents the gas flow rate in the i-th interval of the pipeline mn, Q p,mn represents the gas flow rate transmitted in the pipeline mn, N mn is the final number of pieces.
2. The method of claim 1, wherein, The compressor equation is represented by the following model: wherein, π m and π n respectively represent the square value of the air pressure at the inlet and outlet of the compressor mn; Q c,mn represents the air flow rate transmitted in the compressor mn; and are parameters for describing the control mode of the compressor. When the compressor is operated at a constant compression ratio , When the compressor operates in constant pressure ratio π n -π m = Δ set , When the compressor is operated at constant airflow Q c,mn = Q set , When the compressor operates at a constant inlet air pressure π m = π in , When the compressor operates at a constant outlet air pressure π m = π out , r set 、Δ set 、Q set 、π in 、π out is a positive real number.
3. The method of claim 1, wherein, The real pipeline gas flow value is calculated by the following formula: π m -π n = f(Q p,mn ) = C mn Q p,mn |Q p,mn | α-1 where, π m and π n respectively represent the square value of the air pressure of nodes m and n, C mn represents the resistance coefficient of the pipeline air flow equation; and α is a constant determined by the selected pipeline air flow model.
4. An adaptive segmented linearization method for a natural gas pipeline gas flow equation, characterized in that: S100、for any natural gas pipeline mn, the pipeline gas flow Q p,mn of the operating range is equally divided into segment intervals, constituting a segment interval set, is a set value, represents the upper limit of the allowable gas flow through the pipeline mn; S200, obtaining a segmented interval without a fitted line segment from the segmented interval set as a current segmented interval, denoted as S300, square the pipe pressure difference of the current segment interval approximate the secant line equation h and through the two end segment points of the interval with a line k (Q p,mn ) and calculate the error between the linearized pipe flow value of the current segment interval and the true pipe flow value according to the following formula add it to the segment linearization error set: S400, if there are still segmented intervals in the segmented interval set that have not obtained a fitted line segment, return to step S200; otherwise, go to step S500; S500, if the size of the segmented interval set is greater than a set value or the maximum segmented linearization error in the segmented linearization error set is less than a set error threshold, go to step S600; otherwise, divide the segmented interval corresponding to the maximum segmented linearization error into two sub-segmented intervals, replace the segmented interval corresponding to the maximum segmented linearization error in the segmented interval set with the two sub-segmented intervals, delete the maximum segmented linearization error in the segmented linearization error set, and return to S200; S600, using the interval in the segmented interval set as the optimal segmented interval, the pipeline square gas pressure difference f(Q p,mn ) is approximated by using the following segmented linearization pipeline gas flow equation: where: h k (Q p,mn ) represents the piecewise linear function of the kth segment interval pipe flow equation, is an auxiliary continuous variable introduced, represents the gas flow rate of the ith segment interval in the pipe mn, Q p,mn represents the gas flow rate transmitted in the pipe mn, N mn is the final segment number.
5. The method of claim 4, wherein, The real pipeline gas flow value is calculated by the following formula: π m -π n = f(Q p,mn ) = C mn Q p,mn |Q p,mn | α-1 where, π m and π n respectively represent the square value of the air pressure of nodes m and n, C mn represents the resistance coefficient of the pipeline air flow equation; and α is a constant determined by the selected pipeline air flow model.
Citation Information
Patent Citations
Distributed collaborative optimization calculation method of electricity-gas energy flow based on target cascade analysis
CN107368927A
Piecewise linearization optimal power flow calculation method for electricity-gas coupling system
CN110601203A