A method, device, equipment, medium and product for analyzing a natural gas transmission system
Patent Information
- Application Number
- CN202610673627.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-15
- Publication Date
- 2026-08-07
AI Technical Summary
[0005]本发明提供了一种天然气输气系统的分析方法、装置、设备、介质及产品,解决现有技术中,对天然气输气模型求解效率低,不能适应大规模数据的复杂应用场景的问题
Smart Images

Figure CN122528733A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural gas pipeline transportation technology, and in particular to an analysis method, apparatus, equipment, medium, and product for a natural gas transmission system. Background Technology
[0002] In natural gas transmission engineering and pipeline operation and management, gas flow in pipelines follows the laws of fluid mechanics and thermodynamics. The pipeline network contains multiple coupled units, and there are complex constraints between flow rate, pressure, pressure drop and energy consumption, making manual calculation and solution quite difficult.
[0003] In the natural gas field, the steady-state operation of natural gas pipelines is often solved using simulation software. Commonly used natural gas simulation software includes PIPESIM and TGNET. The calculation process for natural gas steady-state simulation typically includes several key steps: First, a mathematical model of the system is established to describe the flow characteristics of natural gas and the physical parameters of the system; second, relevant initial conditions, such as flow rate, pressure, and temperature, are collected and input; subsequently, numerical methods (such as the finite element method or the finite difference method) are used to solve the model to obtain parameters such as the natural gas flow distribution, pressure loss, and temperature change under steady-state conditions.
[0004] However, steady-state natural gas simulation technology focuses on the analysis and understanding of the system's static characteristics. The simulation results are highly dependent on the input boundary conditions, and different inputs will lead to different results, resulting in high time costs. For complex systems, steady-state simulation may require a large amount of computational resources and time. Summary of the Invention
[0005] This invention provides an analysis method, apparatus, equipment, medium, and product for natural gas transmission systems, solving the problems of low efficiency in solving natural gas transmission models and inability to adapt to complex application scenarios with large-scale data in the prior art.
[0006] In a first aspect, the present invention provides an analysis method for a natural gas transmission system, comprising:
[0007] Obtain basic data from the natural gas transmission system to be analyzed;
[0008] Based on the aforementioned basic data, a first gas transmission model is constructed, which includes a station model, a pipeline model, and a compressor station model.
[0009] Determine the initial flow rate and initial pressure value of the gas transported by the first gas transport model;
[0010] Based on the initial flow rate and the initial pressure value, the nonlinear part of the first gas transmission model is linearly transformed to obtain the second gas transmission model.
[0011] Based on the second gas transmission model, the key operating parameters corresponding to the natural gas transmission system to be analyzed are determined.
[0012] Secondly, the present invention provides an analysis apparatus for a natural gas transmission system, comprising:
[0013] The data acquisition module is used to acquire basic data of the natural gas transmission system to be analyzed.
[0014] The model building module is used to build a first gas transmission model based on the basic data. The first gas transmission model includes a station model, a pipeline model, and a compressor station model.
[0015] The initial value determination module is used to determine the initial flow rate and initial pressure value of the gas transported by the first gas transport model;
[0016] The model conversion module is used to perform a linear conversion on the nonlinear part of the first gas transmission model based on the initial flow rate and the initial pressure value to obtain a second gas transmission model.
[0017] The system analysis module is used to determine the key operating parameters corresponding to the natural gas transmission system to be analyzed based on the second gas transmission model.
[0018] Thirdly, the present invention provides an electronic device, the electronic device comprising:
[0019] At least one processor; and
[0020] A memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the analysis method for the natural gas transmission system according to any embodiment of the present invention.
[0022] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the analysis method for the natural gas transmission system according to any embodiment of the present invention.
[0023] Fifthly, embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the analysis method for a natural gas transmission system according to any embodiment of the present invention.
[0024] The technical solution of this invention involves acquiring basic data of the natural gas transmission system to be analyzed; constructing a first transmission model based on the basic data and determining the initial flow rate and initial pressure values of the transmitted gas; linearly transforming the nonlinear part of the first transmission model based on the initial values to obtain a second transmission model; and solving the second transmission model to obtain the key result parameters of the natural gas transmission system to be analyzed. By optimizing the flow direction of the natural gas pipeline network through the constructed pipeline model, the overall system turnover and energy consumption are reduced, fundamentally reducing pipeline transportation costs and operating costs. This provides decision support for key aspects such as pipeline planning and layout and gas distribution scheme analysis, achieving efficient resource allocation and rational infrastructure layout, and further improving the system's energy utilization efficiency and economy.
[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a flowchart of an analysis method for a natural gas transmission system according to Embodiment 1 of the present invention;
[0028] Figure 2 This is a schematic diagram of the structure of an analysis device for a natural gas transmission system according to Embodiment 2 of the present invention;
[0029] Figure 3 This is a schematic diagram of the structure of an electronic device that implements an embodiment of the present invention. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 without creative effort should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] Example 1
[0033] Figure 1 This is a flowchart illustrating an analysis method for a natural gas transmission system according to Embodiment 1 of the present invention. This embodiment is applicable to the overall scheme analysis of complex natural gas pipeline transmission systems. The method can be executed by a natural gas transmission system analysis device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0034] S110. Obtain basic data of the natural gas transmission system to be analyzed.
[0035] In this embodiment, the basic information of the natural gas transmission system used to build the model includes data such as station type and interface parameters, pipeline physical properties, compressor station equipment and energy consumption parameters, supply and demand load, design standards and safety constraints.
[0036] Specifically, the processor can collect all the basic data of the natural gas transmission system to be analyzed, covering the physical and operational parameters of stations, pipelines, and compressor stations, as well as supply and demand data, safety constraints, industry standards, and historical operational data, providing complete input for model building.
[0037] S120. Based on the basic data, construct the first gas transmission model, which includes a station model, a pipeline model, and a compressor station model.
[0038] In this embodiment, the first gas transmission model can be understood as a mixed-integer nonlinear programming model built on the natural gas transmission system. It is composed of three sub-models: a station model, a pipeline model, and a compressor station model, which fully represent the system structure, operating logic, and nonlinear physical constraints. The station model is designed for various stations in the natural gas transmission system (such as loading stations, distribution stations, and connecting stations). It abstracts the core functions of the stations, such as resource loading, distribution, and transfer, and clarifies key attributes such as gas input and output interface parameters, capacity limits, and operating thresholds, ensuring that the model accurately reflects the actual operating status of the stations. The pipeline model is based on the physical characteristics of the pipeline (such as pipe diameter, length, wall thickness, and friction coefficient) and fluid mechanics principles. It constructs a model describing the gas flow law within the pipeline, covering the calculation of pressure loss, flow transmission relationship, and the influence of temperature on gas parameters, laying the foundation for subsequent analysis of pipeline gas transmission capacity. The compressor station model focuses on the pressurization function of the compressor station, integrates the equipment parameters, energy consumption calculation methods and pressure regulation range of the compressor station, clarifies the impact of compressor station start-up and shutdown switching on the gas transmission system, and ensures that the model can reflect the core role of the compressor station in the gas transmission process.
[0039] Specifically, the processor can build and integrate three types of sub-models based on the basic data, including building a station model to describe flow balance and interface constraints; building a pipeline model to characterize flow rate, flow direction and hydraulic nonlinear relationships; and building a compressor station model to realize pressurization, power and energy consumption constraints; and finally forming a first gas transmission model containing nonlinear constraints, which fully maps the operating characteristics of the gas transmission system.
[0040] S130. Determine the initial flow rate and initial pressure value of the gas transported by the first gas transport model.
[0041] In this embodiment, the initial flow rate can be understood as the initial gas flow rate value of the pipeline and station determined by combining gas load, gas source capacity, historical data, and industry standards. The initial pressure value can be understood as the initial pressure used to characterize the key nodes of the station, pipeline, and compressor station.
[0042] Specifically, the processor can use the first gas transmission model as a basis, combined with the actual operating requirements of the natural gas transmission system (such as user gas load and gas supply capacity), historical operating data (such as pipeline flow records under the same operating conditions during the same period), and industry standard requirements, to determine the initial gas flow values at each pipeline and station interface in the first gas transmission model, ensuring that the initial flow meets the actual gas transmission requirements of the system. Based on the design standards of the natural gas transmission system (such as the maximum allowable pressure of pipelines and the pressure control range of stations), safety operation requirements (such as avoiding gas transmission interruptions due to excessively low pressure and safety risks caused by excessively high pressure), and historical pressure monitoring data, the processor can determine the initial pressure values at each station inlet and outlet, key pipeline nodes, and compressor station inlet and outlet, ensuring that the initial pressure is within a reasonable range for safe and stable system operation.
[0043] S140. Based on the initial flow rate and initial pressure value, the nonlinear part in the first gas transmission model is linearly transformed to obtain the second gas transmission model.
[0044] In this embodiment, the nonlinear part can be understood as the part that cannot be described by a simple linear relationship in the first gas transmission model. The second gas transmission model can be understood as a linear programming model obtained by linear transformation of the first gas transmission model, retaining the original model structure and objective, reducing solution complexity, and improving computational efficiency.
[0045] Specifically, since the constraint functions in the first gas transmission model, which involve physical processes such as gas flow and pressure changes, are mostly nonlinear (e.g., pressure loss formulas based on fluid mechanics, and nonlinear relationships between flow rate and pressure), direct solutions are difficult and inefficient. The server needs to perform linear transformations on these nonlinear constraint functions based on predetermined initial flow rate and pressure values. The processor can use the initial flow rate and pressure values as a reference point, employing mathematical methods such as Taylor expansion and piecewise linearization to approximate the nonlinear constraint functions into linear functions. This ensures that the transformed linear functions accurately approximate the characteristics of the original nonlinear constraints within the operating conditions corresponding to the initial parameters. The linearly transformed constraint functions are then reintegrated with the linear constraints, sub-model structures, and objective functions in the first gas transmission model to form the second gas transmission model, significantly reducing the complexity of subsequent model solutions and improving solution efficiency.
[0046] S150. Based on the second gas transmission model, determine the key operating parameters of the natural gas transmission system to be analyzed.
[0047] In this embodiment, key operating parameters are used to characterize the core operating parameters of the natural gas transmission system, such as the actual operating flow rate of each pipeline, the control pressure at the inlet and outlet of each station, the start / stop status and operating power of the compressor station, and the gas distribution amount at each distribution node.
[0048] Specifically, the processor can use the linearized second gas transmission model as its core, and through model solving and analysis, output the key operating parameters required for the operation of the natural gas transmission system. For example, a linear programming algorithm can be used to solve the second gas transmission model, and combined with the optimization objectives of the gas transmission system, the optimal solution of the model can be calculated under the premise of satisfying all constraints, thus obtaining the key operating parameters. The second gas transmission model is solved to obtain the corresponding gas pressure, gas flow rate, gas flow direction, compressor on / off status, and pressurization status. These parameters are then used as key operating parameters for the natural gas transmission system. A trust region assessment is performed on these key operating parameters to obtain the assessment results, which include the trust radius, assessment ratio, or convergence. The assessment results are then evaluated to determine if they meet preset requirements, including whether the convergence radius meets a preset range, whether the assessment ratio is within a preset range, or whether the convergence is within a preset convergence range. If yes, the key operating parameters are used as the final analysis results. If not, the initial flow rate and initial pressure values are updated, and the key operating parameters are further updated based on these updated values.
[0049] The technical solution of this invention optimizes the flow direction of natural gas pipeline network by building a pipeline transportation model, thereby reducing the overall system turnover and energy consumption, fundamentally reducing pipeline transportation costs and operating costs, providing decision support for key aspects such as pipeline planning and layout and gas transmission and distribution scheme analysis, realizing efficient allocation of resources and rational layout of infrastructure, and further improving the energy utilization efficiency and economy of the system.
[0050] Furthermore, the basic data includes the system's directed finite diagram, station input data, pipeline input data, and compressor station input data. Accordingly, the steps for constructing the first gas transmission model based on the basic data can be refined as follows:
[0051] Based on the directed finite graph of the system, the set of stations, the set of pipeline segments, and the set of compressor stations are determined; based on the station input data and the station set, the station model is determined; based on the pipeline input data and the set of pipeline segments, the pipeline model is determined; based on the compressor station input data and the compressor station set, the compressor station model is constructed; an objective function is established with the sum of pipeline turnover and compressor station energy consumption costs as the optimization cost; based on the station model, pipeline model, compressor station model, and objective function, the first gas transmission model of the natural gas transmission system to be analyzed is determined.
[0052] In this embodiment, the directed finite graph of the system can be understood as a mathematical graph structure representing the natural gas transmission system, composed of nodes (stations) and directed edges (pipe segments), clearly expressing the pipeline network topology connections. The set of stations can be understood as the set of all loading stations, distribution stations, connecting stations, etc., representing the node units of the pipeline network. The set of pipe segments can be understood as the set of all pipeline units connecting stations, representing the natural gas transmission path. The set of compressor stations can be understood as the set of all compressor stations with pressurization functions, used to compensate for pipeline pressure losses. The objective function can be understood as a mathematical expression aiming to minimize the pipeline transmission cost combined with the compressor station energy consumption cost, representing the direction of model optimization.
[0053] Specifically, the processor can extract and partition all station nodes, all pipe segment paths, and all booster station nodes based on the directed finite graph representing the pipeline network topology, forming station sets, pipe segment sets, and compressor station sets respectively, thus completing the mathematical definition of the pipeline network structure. The processor can combine data such as the upper and lower limits of flow rate, supply and demand load, and inflow / outflow balance constraints of the stations to establish flow balance equations and upper and lower bound constraints for each station in the station set, forming a station model capable of characterizing gas receiving, distribution, and storage functions. Based on data such as pipe segment length, pipe diameter, friction coefficient, and hydraulic parameters, the processor can establish flow rate, flow direction, and pressure loss constraints for each pipeline in the pipe segment set, characterizing the nonlinear hydraulic relationship of gas flow within the pipe, thus forming a pipeline model. Finally, combining data such as compressor station inlet and outlet pressures, pressure ratios, start / stop states, compressor power, and energy consumption calculation methods, the processor can establish booster constraints, power constraints, and energy consumption calculation logic for each compressor station in the compressor station set, forming a compressor station model. The processor can optimize the overall operating cost by adding the pipeline gas transmission cost and the compressor station energy consumption cost to construct a cost-minimizing objective function, which serves as the optimization objective for the entire model. The established sub-models for stations, pipelines, and compressor stations are then integrated with the objective function to form a mixed-integer nonlinear programming model that includes linear constraints as well as nonlinear hydraulic and power constraints—the first gas transmission model.
[0054] For example, assume the natural gas transmission system to be analyzed consists of stations, pipelines, and compressor stations. A directed finite graph is used. To represent a natural gas transmission system, where, This represents the set of all stations. For all upload stations, For all distribution stations, This is a collection of compressor stations, where the loading stations are used to load natural gas into the natural gas transmission system, and the distribution stations unload natural gas from the pipeline system. Meanwhile, For the set of all pipe segments, To connect the same first and last stations The collection of pipelines allows for a mathematical definition of the natural gas transmission system.
[0055] Based on the above embodiments, the steps for determining the station model according to the station input data and the station set can be refined as follows:
[0056] Based on the upper and lower limits of the loading and unloading volumes and pressure limits of the loading and unloading volumes in the station set and the distribution stations in the station input data, the station constraint set is determined; for each station in the station set, the flow balance condition is determined based on the station's loading volume, unloading volume, inflow volume and outflow volume; based on the station constraint condition and the flow balance condition, the station model is determined.
[0057] In this embodiment, the loading station can be understood as a station that inputs natural gas into the pipeline network, responsible for gas loading. The distribution station can be understood as a station that draws natural gas from the pipeline network, responsible for gas unloading. Station input data includes parameters such as station number, type, upper and lower flow limits, loading range, unloading range, and pressure control range. The upper and lower limits of the station can be understood as the maximum and minimum allowable values for the gas loading and unloading at the station, used to constrain the safe operating range. The loading volume is the volume of natural gas input from the loading station into the pipeline network. The unloading volume is the volume of natural gas output from the distribution station into the pipeline network. Station constraint set: a set of constraints composed of the station's upper and lower limits, loading constraints, and unloading constraints. The flow balance condition can be understood as the conservation equation satisfied by the loading, unloading, inflow, and outflow of the station based on the law of conservation of mass. Inflow / outflow can be understood as the gas flow rate entering the station through the pipeline and exiting the station.
[0058] Specifically, the processor can distinguish between loading stations and distribution stations from the set of stations. Based on their respective upper / lower limits, it imposes range constraints on the loading capacity of loading stations and the download capacity of distribution stations, forming a set of constraints that define the operational boundaries of the stations. For each station, the processor can establish an equation according to the law of conservation of mass: the total inflow of gas (including loading) and the total outflow (including download) within the station remain equal, obtaining the flow balance condition and ensuring that no gas is created or disappeared out of thin air in the pipeline network. Integrating the above set of station constraints and the flow balance condition forms a complete station model, used to accurately describe the operational laws of gas reception, distribution, storage, and flow conservation at the stations.
[0059] For example, the station model is constructed based on the flow ranges where the gas loading and unloading volumes of the station are located, and the balance between gas inflow and outflow. For the station... In other words, the upper and lower limits of the loading station and the distribution station are respectively used , , and To indicate the number of downloads and downloads The upper and lower bounds of the variables are controlled to satisfy the following set of station constraints (1)~(2).
[0060] (1)
[0061] (2)
[0062] According to the law of conservation of mass, the flow needs to be in a balanced state at each station. Formula (3) indicates that the load, download and inflow of the station meet the flow balance condition.
[0063] (3)
[0064] in, Indicates pipeline connect The flow rate of the pipe section. Both upload / download volume and flow rate are in units of... That is, megacubes per day.
[0065] Based on the above embodiments, the steps for determining the pipeline model according to the pipeline input data and the set of pipe segments can be refined as follows:
[0066] For each pipe segment in the pipe segment set, the pipe segment constraint condition set is determined based on the natural gas flow rate, flow direction, and constraint data in the pipeline input data; the hydraulic constraint condition set is constructed based on the station attributes of the endpoints of the pipe segment and the pressure and flow rate at the beginning and end of the pipe segment; the pipe segment station pressure constraint set is determined based on the pressure at the beginning and end of the pipe segment and the station pressure; and the pipeline model is determined based on the pipeline constraint condition set, the hydraulic constraint condition set, and the pipe segment station pressure constraint set.
[0067] In this embodiment, natural gas flow rate is the volume of natural gas transported per unit time within the pipeline segment, including both forward and reverse flow. Flow direction is the direction of natural gas transport within the pipeline segment, represented by 0-1 variables indicating forward or reverse gas transport. Constraint data consists of pipeline physical properties and operational limitations, including pipe diameter, length, flow limit, and flow uniqueness constraints. The pipeline segment constraint set is a set of constraints composed of flow constraints, flow direction constraints, and flow limit constraints. End-point station attributes are the types of stations connected at both ends of the pipeline segment, categorized as ordinary stations and compressor stations. Head and tail pressures are the pressures at the starting and ending stations of the pipeline segment. The hydraulic constraint set describes the nonlinear physical relationship between pressure loss and flow rate during natural gas flow within the pipeline segment. The pipeline segment station pressure constraint set is a set of constraints that couples and binds the head and tail pressure variables of the pipeline segment with the station pressure, ensuring that the pipeline segment pressure and station pressure remain consistent.
[0068] Specifically, the processor can traverse each pipe segment in the pipe segment set, and limit the forward flow, reverse flow, absolute gas transmission volume, flow direction, and flow limit of the pipe segment according to pipeline constraints, ensuring that there is only one transmission direction for the same pipe segment at any given time, and summarizing all the constraints into a pipe segment constraint set. Based on the different attributes of the stations at both ends of the pipe segment—whether they are ordinary stations or compressor stations—and combining the starting pressure, ending pressure, and flow rate of the pipe segment, a pressure-flow coupling relationship for natural gas flow within the pipeline is established, forming a hydraulic constraint set that reflects the real fluid dynamics laws. The processor can bind the starting pressure of the pipe segment to the corresponding starting station pressure, and the ending pressure of the pipe segment to the corresponding ending station pressure, establishing coupling constraints between pipe segment pressure and station pressure, forming a pipe segment station pressure constraint set. The processor integrates the pipe segment constraint set, the hydraulic constraint set, and the pipe segment station pressure constraint set to form a complete pipeline model, used to simultaneously characterize the flow direction rules of the pipe segment, the physical laws of pressure loss, and the pressure coupling relationship between the pipe segment and the station.
[0069] For example, pipeline modeling involves constraining the flow rate and direction of natural gas in the pipeline. The following constraint formulas (4) to (6) represent the decision settings for the flow rate in the pipeline segment. For a specific pipeline segment, the following formulas are used: and Represents pipeline Pipe section The forward and reverse flow values, since there can only be one flow direction, have a sum of 0, and are defined as absolute values. The absolute gas transmission capacity of the pipe section is represented by the constraint formulas (7) to (10), which define the relationship between the forward and reverse flow rates, the flow direction, and the flow range. For pipelines Pipe section The direction of gas flow is indicated by 1 for forward gas flow and 0 for reverse gas flow. Indicates pipeline Pipe section The flow rate limit is as follows: The following is the set of constraints for the pipe section:
[0070] (4)
[0071] (5)
[0072] (6)
[0073] (7)
[0074] (8)
[0075] (9)
[0076] (10)
[0077] In addition, pipeline modeling also includes the creation of steady-state constraints. In the pipeline, the physical relationship between pressure drop and flow rate is a nonlinear and non-convex constraint equation, i.e., hydraulic constraint. This constraint couples the pressure and flow rate at the beginning and end of the pipeline segment to conform to the physical principles of actual natural gas flow. Depending on whether the pipeline end station is a compressor station and the flow direction of the pipeline segment, this relationship can be expressed as the following set of hydraulic constraint conditions (11)~(14). For ordinary stations gas pressure, For compressor station The pressure of the inlet gas. For compressor station The outlet gas pressure, with the pressure unit being MPa (megapascals). These are hydraulic parameters, calculated from flow rate, pressure, gas properties, and pipeline characteristics.
[0078] (11)
[0079] (12)
[0080] (13)
[0081] (14)
[0083] Among them, the hydraulic constraint modeling method of constraint formulas (11) to (14) is affected by the station attributes and has highly nonlinear terms of variable multiplication, which is not convenient for linearization. Therefore, for each pipeline Pipe section Introducing the first and last pressure variables and Pressure drop at the beginning and end of the pipe section and The new hydraulic constraint formula (15) is obtained and added to the hydraulic constraint condition set. The pipe section and station pressure constraint set (16)~(23) is determined by the flow direction variable, which couples the pipe section pressure variables with the station pressure. It should be a relatively large number to ensure that the pressure variables at the pipe end points are properly coupled with the pressures at the station and compressor station.
[0084] (15)
[0085] (16)
[0086] (17)
[0087] (18)
[0088] (19)
[0089] (20)
[0090] (twenty one)
[0091] (twenty two)
[0092] (twenty three)
[0093] Based on the above embodiments, the steps for constructing a compressor station model according to the compressor station input data and the compressor station set can be refined as follows:
[0094] Based on the input data of the compressor station, determine the amount of gas flowing into the compressor station; based on the input data of the compressor station, determine the pressure coupling constraint set of the compressor station; based on the gas amount and the compressor power limit in the compressor station input data, determine the power constraint set of the compressor; based on the gas amount, the pressure coupling constraint set, and the power constraint set, construct the compressor station model.
[0095] In this embodiment, the amount of gas flowing into the compressor station can be understood as the total flow rate of natural gas entering the compressor station and requiring pressurization, obtained from pipeline flow direction and flow statistics. The pressure coupling constraint set is a set of constraints used to constrain the pressure relationship between the compressor station's inlet and outlet, pressure ratio range, and start / stop and pressure linkage relationships. The compressor power limit is the maximum allowable power upper limit for compressor operation, used to limit energy consumption and equipment safety. The power constraint set is a set of constraints composed of the compressor shaft power calculation formula and the power upper limit, used to control energy consumption and operational safety.
[0096] Specifically, the processor can calculate the total flow rate of all natural gas entering the compressor station based on the flow rate and direction of the pipelines connected to the compressor station, thus obtaining the amount of gas requiring pressurization, providing a basis for power calculation. Based on the upper and lower limits of the compressor station's inlet and outlet pressures, pressure ratio range, and start / stop state variables, it establishes inlet and outlet pressure coupling relationships, pressure ratio constraints, and start / stop linkage constraints, forming a pressure coupling constraint set to ensure that the pressurization process conforms to physical laws and equipment limitations. Using the amount of gas flowing into the compressor station and the inlet and outlet pressures, the compressor shaft power is calculated, and then combined with power limits to establish an upper power limit constraint, forming a power constraint set to achieve energy consumption control and equipment safety protection. Integrating the inflow gas volume, pressure coupling constraint set, and power constraint set forms a complete compressor station model, used to accurately characterize the compressor station's pressurization capacity, pressure regulation logic, and energy consumption characteristics.
[0097] For example, the gas station model is built based on the gas volume of the compressor station, the pressure and start / stop management of the compressor station, and the power limit of the compressor. Considering the pressure loss during the gas transmission process of the natural gas transmission system, there are also compressor stations in the system to pressurize the gas. Compressor stations will incur energy costs, so an accurate characterization of the compressor station can more realistically reflect the actual economic benefits.
[0098] The following constraint formula (24) calculates the amount of gas flowing into the compressor station, constraint formulas (25) to (28) are pressure coupling constraints for the compressor station, constraint formulas (25) to (26) are upper and lower limit control of the compressor station pressure, and constraint formulas (27) to (28) are control of the compressor station inlet and outlet pressures. and For the station The upper and lower limits of pressure, and These are the upper and lower limits of the pressure ratio for the compressor station. This is the start / stop variable for the compressor station; 1 indicates it's on, and 0 indicates it's off. It should be a relatively large number to ensure proper coupling between the compressor station's start-up and shutdown and the inlet / outlet pressure.
[0099] (twenty four)
[0100] (25)
[0101] (26)
[0102] (27)
[0103] (28)
[0104] Constraint formula (29) is the constraint for calculating the compressor shaft power. This constraint is also a nonlinear constraint. Constraint formula (30) is the power limit for the compressor.
[0105] (29)
[0106] (30)
[0107] in, The compressor power of the air compressor station is expressed in units of... That is, megawatts; γ represents the amount of natural gas that the compressor station needs to pressurize. Since using flow direction and flow statistics for this value introduces nonlinear terms that are difficult to solve, this value is updated during the iteration process. γ1 and γ2 are compressor correction coefficients.
[0108] For example, through the above process, the station model, pipeline model and compressor station model in the first gas transmission model can be built. In order to analyze the natural gas transmission system, it is also necessary to create a corresponding objective function for the first gas transmission model. This objective function provides the basis for the model analysis. By analyzing the properties of the objective function, appropriate mathematical methods and algorithms can be selected to solve the model.
[0109] In this invention, the objective function is used to optimize the cost C, as shown in equation (31) below. The cost includes two parts: pipeline transportation costs and compressor station energy consumption costs.
[0110] (31)
[0111] in, The pipeline transportation cost is defined by the following formula (32), which is the total cost of gas transportation in all pipeline segments, in yuan. The pipeline transportation rate is based on the geographical location of the pipeline section, and the unit is yuan / (thousand cubic meters·kilometers); Energy consumption cost is defined by the following formula (33), which is the energy consumption cost of all compressor stations, in yuan; This represents the unit price of energy consumption at the compressor station, expressed in yuan per kilowatt-hour. Here, power consumption is converted to daily energy consumption. This represents the length of the pipe between nodes i and j.
[0112] (32)
[0113] (33)
[0114] Based on the above formulas (1) to (33), the complete mathematical model corresponding to the natural gas transmission system can be obtained, namely the first transmission model. This model is a mixed integer nonlinear programming optimization model that considers pipeline flow, flow direction, station pressure, and compressor station start-up and shutdown decisions for the steady-state operation scenario of the natural gas transmission system, in order to help analyze the natural gas transmission system.
[0115] For example, after creating the first gas transmission model, the initial flow rate and initial pressure value of the gas transmitted by the first gas transmission model are determined, including: based on the pipeline transportation cost, without ignoring the pressure value of the first gas transmission model, the flow rate and direction of natural gas in the pipeline are calculated to obtain the initial flow rate; that is, under the condition of the lowest pipeline transportation cost, by calculating the overall natural gas flow rate and direction, the optimal flow rate and direction corresponding to the constraint formula (32) without pressure consideration are obtained, and this is used as the initial flow rate.
[0116] Furthermore, based on the initial flow rate and the hydraulic parameters of the first gas transmission model, the square values of the pressure corresponding to the gas input pressure and output pressure of the station are obtained. The hydraulic parameters characterize the physical relationship between pressure drop and flow rate. The square root of the pressure square value is then taken to obtain the initial pressure value.
[0117] The calculation model for the initial pressure value is as follows:
[0118] (34)
[0119] in, and To calculate the hydraulic constraint violation values for the pressure model using flow rate values, and to ensure that the overall initial pressure hydraulic violation is minimized, these two parameters satisfy the following equation:
[0120] (35)
[0121] (36)
[0122] (37)
[0123] (38)
[0124] in, The flow rate setpoint corresponding to the optimal flow rate in constraint formula (32); The flow direction is set as the optimal flow direction corresponding to constraint formula (32). In constraint formula (34), a flow direction is established for all stations. and For compressor stations, the maximum pressure increase ratio relationship between the two is considered, and the square value of the pressure is used to avoid introducing nonlinear terms into the model. The initial pressure of the station can be obtained by taking the square root.
[0125] Furthermore, based on the above embodiments, the steps of linearly transforming the first gas transmission model according to the initial flow rate and initial pressure value to obtain the second gas transmission model can be refined as follows:
[0126] Based on the initial flow rate and initial pressure values, a first-order Taylor expansion of the nonlinear constraints in the first gas transmission model is constructed; the nonlinear terms in the first-order Taylor expansion are linearized to obtain a linear expansion; the first gas transmission model is approximated based on the linear expansion to obtain an intermediate gas transmission model; a penalty model is added to the objective function of the intermediate gas transmission model to obtain a second gas transmission model.
[0127] In this embodiment, nonlinear constraints can be understood as nonlinear, nonconvex equations such as hydraulic constraints and compressor power constraints in the first gas transmission model. The first-order Taylor expansion can be understood as an expression that performs a first-order linear approximation of the nonlinear function based on the initial flow rate and initial pressure. The nonlinear terms are the parts of the expansion that cannot be directly solved linearly, such as variable multiplication, squaring, and higher-order terms. The linear expansion can be understood as the fully linear constraint expression obtained after first-order Taylor expansion and linearization. The intermediate gas transmission model is an approximate linear model obtained by replacing the original nonlinear constraints with the linear expansion. The penalty model incorporates a penalty term in the objective function to minimize the degree of constraint violation caused by linearization, ensuring approximation accuracy.
[0128] Specifically, the processor can construct first-order Taylor expansions for the hydraulic nonlinear constraints and compressor power nonlinear constraints in the first gas transmission model, based on the determined initial flow rate and initial pressure, to achieve local linear approximation of the nonlinear functions. The remaining nonlinear parts, such as variable products and higher-order terms, in the first-order Taylor expansions are linearized to eliminate all nonlinear characteristics, resulting in purely linear constraint expressions. The original nonlinear constraints in the first gas transmission model are completely replaced with the linear expansions, preserving the model structure, linear constraints, and objective function, forming an intermediate gas transmission model containing only linear constraints. A constraint violation penalty term is added to the cost optimization objective function of the intermediate gas transmission model to minimize the error caused by linearization, ultimately forming a stable and quickly solvable second gas transmission model.
[0129] For example, the specific implementation process for linearizing hydraulic nonlinear constraints is as follows:
[0130] First, obtain the hydraulic constraint function. Specifically:
[0131] (39)
[0132] Then, based on the initial solution The hydraulic constraint function can be expanded as follows:
[0133]
[0134] Finally, based on the expansion of the hydraulic constraint function, the linearized hydraulic constraint function is obtained as follows:
[0135] (40)
[0136] in, The variable is a positive relaxation variable, representing the positive deviation in the hydraulic violation penalty. The negative slack variable represents the negative bias in the hydraulic violation penalty.
[0137] For example, when linearizing the nonlinear constraints in compressor power calculation, the specific implementation process is as follows:
[0138] First, obtain the compressor power calculation constraint function. Specifically:
[0139] (41)
[0140] Then, in the initial solution Based on this, the compressor power calculation constraint function is expanded as follows:
[0141]
[0142] Finally, based on the compressor power calculation constraint function, the linearized constraint form is obtained as follows:
[0143] (42)
[0144] in, represents the positive relaxation variable of the pressure constraint at station i, and represents the deviation of the actual pressure value from the linear approximation. This represents the negative slack variable of the pressure constraint, indicating the deviation of the actual pressure value from the linear approximation.
[0145] After obtaining the linear expansion of the constraint function, it is necessary to further approximate the original nonlinear model based on the linear expansion in order to adjust the first gas transmission model. Furthermore, by adding a penalty model to the objective function of the first gas transmission model, the second gas transmission model is obtained.
[0146] In this model, the objective function optimizes the cost, while the penalty model minimizes the degree of violation of nonlinear constraints. In the penalty model, violations of nonlinear constraints are penalized within the objective function to minimize the degree of constraint violation.
[0147] (43)
[0148] in, This is the penalty coefficient for the linearization error of the pipeline hydraulic constraints. This is the penalty coefficient for the linearization error of the pressure constraint.
[0149] The technical solution of this invention, through the construction of a natural gas transmission pipeline network optimization model, reduces the overall system turnover by optimizing the system flow direction, thereby fundamentally reducing pipeline transportation costs. It converts the nonlinear part of the first transmission model into a linear one, resulting in excellent solution time performance and significantly shortening the calculation cycle of the natural gas transmission system optimization scheme. Furthermore, even in application scenarios where increased nonlinear constraints lead to a higher number of iterations, it still ensures algorithm convergence, guaranteeing a stable and efficient optimization process. Aiming for the lowest energy consumption cost, it reduces the overall compressor station power of the pipeline system, thus reducing energy consumption. This effect is even more pronounced in complex natural gas transmission systems with longer pipelines, larger flow rates, and more compressor stations, further improving the system's energy utilization efficiency and economy.
[0150] For example, a real natural gas transmission system in a certain region is used as an example. This system includes stations, pipelines, loading stations, distribution stations, and compressor stations. Each station can independently operate by loading and unloading supply and demand within the region through its own pipeline topology and compressor station connections. The pipeline and station data in the topology comes from the actual pipeline network design documents, including pipeline diameter, wall thickness, length, and design pressure. Loading and distribution stations load and unload natural gas according to the principle of overall supply and demand balance; that is, the loading capacity of each loading station and the unloading capacity of each distribution station are constant, aiming to optimize and compare the pipeline transportation costs of the system. Since compressor stations in a real pipeline system may contain multiple compressors, this model considers each compressor station to use one compressor. Therefore, the actual compressor station power is converted to an equivalent value to optimize and compare compressor station power. The average load rate reflects the pipeline utilization efficiency, and the comparison of this indicator can also indicate the feasibility of the optimization results in actual operation.
[0151] The model calculation results can be compared with the simulation results of the inlet air source pressure and the outlet user flow rate given by TGNET (full name Pipeline Studio (Tgnet)). The pressure and flow rate errors are both within 5%, which verifies the feasibility of the hydraulic calculation of the model.
[0152] The solution efficiency results for the two practical scenario examples are shown in Table 1. The model involves continuous variables such as pipeline flow rate and station pressure, and 0-1 variables such as pipeline flow direction and compressor station start / stop. Compared with manually setting and adjusting these decision variables, the algorithm performs well in terms of solution time for both pipeline systems, both less than 5 seconds. The results show that, in terms of maximum single iteration time, since the overall number of iterations is generally small, there is no significant time bottleneck in the current scale of the examples. It can also be observed that for the Region 2 pipeline system with a large number of pipeline segments and compressor stations, the increase in nonlinear constraints leads to an increase in the number of iterations, ultimately causing the algorithm to converge. This also demonstrates that the model corresponding to the natural gas transmission system of this invention is effective in handling this type of situation.
[0153] Table 1 Algorithm Results
[0154]
[0155] Regarding the average load factor, the model calculations for the Region 1 pipeline network indicate a decrease in the average load factor. However, in reality, five pipeline segments were not in use during the calculation process, with a flow rate of 0. The average load factor of the operational segments in the model was 67.09%, which is almost identical to the actual operating result of 68.06%. The model uses turnover and energy consumption as objectives, reflected in pipeline transportation costs and total power indicators. Comparing with actual operation, regarding pipeline transportation costs, the model reduces overall turnover by adjusting the flow rate of pipeline segments through pressure adjustments, thereby reducing pipeline transportation costs. The effectiveness of the algorithm optimization is evident in both pipeline systems. Regarding power, although the use of compressor stations differs, the model, starting from the lowest energy consumption cost, reduces the overall compressor station power of the pipeline system. The effect is more significant for the Region 2 pipeline network system, which has a longer total pipeline length, larger flow rate, and more compressor stations.
[0156] Table 2 Comparison Results of Indicators
[0157]
[0158] It can be seen that the implementation method of the present invention is effective and has good universality in natural gas planning problems.
[0159] Based on the specific application scenarios described above, the analysis method for natural gas transmission systems provided by this invention establishes a mixed-integer nonlinear programming optimization model considering pipeline flow rate and direction, station pressure, and compressor station start-up and shutdown decisions for the steady-state operation of natural gas transmission systems. It proposes a solution method based on linearized iteration to help natural gas transmission planning find more economical transmission schemes. Compared to manually setting and adjusting these decision variables, the technical solution in this invention exhibits superior solution time, all less than 5 seconds. Furthermore, it ensures algorithm convergence even in application scenarios where increased nonlinear constraints lead to an increase in the number of iterations. Regarding pipeline transportation costs, the transmission model built in this invention reduces overall turnover by adjusting the flow rate of pipeline segments through pressure adjustments, thereby reducing pipeline transportation costs. In terms of power, starting from the lowest energy consumption cost, it reduces the overall compressor station power of the pipeline system, and the effect is more significant for natural gas transmission systems with long total pipelines, high flow rates, and numerous compressor stations.
[0160] Example 2
[0161] Figure 2 This is a schematic diagram of the structure of an analysis device for a natural gas transmission system provided in Embodiment 2 of the present invention. Figure 2 As shown, the device includes:
[0162] Data acquisition module 21 is used to acquire basic data of the natural gas transmission system to be analyzed;
[0163] The model building module 22 is used to build a first gas transmission model based on the basic data. The first gas transmission model includes a station model, a pipeline model, and a compressor station model.
[0164] The initial value determination module 23 is used to determine the initial flow rate and initial pressure value of the transported gas based on the first gas transport model.
[0165] Model conversion module 24 is used to perform linear conversion on the first gas transmission model according to the initial flow rate and the initial pressure value to obtain the second gas transmission model;
[0166] The system analysis module 25 is used to solve and determine the key operating parameters of the natural gas transmission system to be analyzed based on the second gas transmission model.
[0167] The technical solution of this invention optimizes the flow direction of natural gas pipeline network by building a pipeline transportation model, thereby reducing the overall system turnover and energy consumption, fundamentally reducing pipeline transportation costs and operating costs, providing decision support for key aspects such as pipeline planning and layout and gas transmission and distribution scheme analysis, realizing efficient allocation of resources and rational layout of infrastructure, and further improving the energy utilization efficiency and economy of the system.
[0168] Furthermore, the basic data includes the system directed finite diagram, station input data, pipeline input data, and compressor station input data. Correspondingly, the model construction module 22 includes:
[0169] The first determining unit is used to determine the set of stations, the set of pipelines, and the set of compressor stations based on the directed finite graph of the system.
[0170] The second determining unit is used to determine the station model based on the station input data and the station set;
[0171] The third determining unit is used to determine the pipeline model based on the pipeline input data and the pipeline segment set;
[0172] The fourth determining unit is used to construct the compressor station model based on the compressor station input data and the compressor station set;
[0173] The fifth determining unit is used to establish an objective function for optimizing costs, which is the sum of pipeline gas transmission costs and compressor station energy consumption costs.
[0174] The sixth determining unit is used to determine the first gas transmission model of the natural gas transmission system to be analyzed based on the station model, the pipeline model, the compressor station model and the objective function.
[0175] Specifically, the second determining unit is used for:
[0176] Based on the upload stations and fractional stations in the station set, and combined with the station upper and lower limits, upload volume and download volume in the station input data, determine the station constraint condition set;
[0177] For each station in the set of stations, the flow balance conditions are determined based on the station's upload volume, download volume, inflow volume, and outflow volume.
[0178] The station model is determined based on the station constraints and the flow balance conditions.
[0179] Specifically, the third determining unit is used for:
[0180] For each pipe segment in the set of pipe segments, a set of pipe segment constraint conditions is determined based on the natural gas flow rate and direction of the pipe segment and the pipeline constraints in the pipeline input data.
[0181] Based on the station attributes of the endpoints to which the pipe segment belongs, as well as the pressure and flow rate at the beginning and end of the pipe segment, a set of hydraulic constraint conditions is constructed;
[0182] Based on the initial and final pressures of the pipeline segment and the station pressure, determine the pressure constraint set for the pipeline segment and station.
[0183] The pipeline model is determined based on the pipeline constraint set, the hydraulic constraint set, and the pipeline section station pressure constraint set.
[0184] Specifically, the fourth determining unit is used for:
[0185] Based on the input data from the compressor station, determine the amount of gas flowing into the compressor station;
[0186] Based on the input data of the compressor station, determine the pressure coupling constraint set of the compressor station;
[0187] Based on the gas quantity and the compressor power limit in the compressor station input data, determine the compressor power constraint set;
[0188] The compressor station model is constructed based on the gas quantity, the pressure coupling constraint set, and the power constraint set.
[0189] Furthermore, the model conversion module 24 is specifically used for:
[0190] Based on the initial flow rate and the initial pressure value, determine the first-order Taylor expansion of the nonlinear constraints in the first gas transmission model;
[0191] The nonlinear terms in the first-order Taylor expansion are linearized to obtain a linear expansion.
[0192] Based on the linear expansion, the first gas transmission model is approximated to obtain the intermediate gas transmission model;
[0193] By adding a penalty model to the objective function of the intermediate gas transmission model, a second gas transmission model is obtained.
[0194] The analysis device for the natural gas transmission system provided in the embodiments of the present invention can execute the analysis method for the natural gas transmission system provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0195] Example 3
[0196] Figure 3 A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0197] like Figure 3 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 and a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded from storage unit 48 into the RAM 43. The RAM 43 can also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0198] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0199] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as the analysis methods for natural gas transmission systems.
[0200] In some embodiments, the analysis method for the natural gas transmission system may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the analysis method for the natural gas transmission system described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the analysis method for the natural gas transmission system by any other suitable means (e.g., by means of firmware).
[0201] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0202] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0203] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0204] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0205] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0206] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0207] In one embodiment, the present invention further includes a computer program product, which includes a computer program that, when executed by a processor, implements the analysis method of the natural gas transmission system of any embodiment of the present invention.
[0208] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0209] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0210] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An analytical method for a natural gas transmission system, characterized in that, include: Obtain basic data from the natural gas transmission system to be analyzed; Based on the aforementioned basic data, a first gas transmission model is constructed, which includes a station model, a pipeline model, and a compressor station model. Determine the initial flow rate and initial pressure value of the gas transported by the first gas transport model; Based on the initial flow rate and the initial pressure value, the nonlinear part of the first gas transmission model is linearly transformed to obtain the second gas transmission model. Based on the second gas transmission model, the key operating parameters corresponding to the natural gas transmission system to be analyzed are determined.
2. The method according to claim 1, characterized in that, The basic data includes a system directed finite diagram, station input data, pipeline input data, and compressor station input data. Correspondingly, constructing the first gas transmission model based on the basic data includes: Based on the directed finite graph of the system, determine the set of stations, the set of pipeline segments, and the set of compressor stations; The station model is determined based on the station input data and the station set. The pipeline model is determined based on the pipeline input data and the pipeline segment set; Based on the compressor station input data and the compressor station set, the compressor station model is constructed; Establish an objective function for optimizing costs, using the sum of pipeline turnover and compressor station energy consumption costs. Based on the station model, the pipeline model, the compressor station model, and the objective function, the first gas transmission model of the natural gas transmission system to be analyzed is determined.
3. The method according to claim 2, characterized in that, The step of determining the station model based on the station input data and the station set includes: Based on the upper and lower limits of the loading and unloading capacity and the pressure in the station input data, the station constraint condition set is determined according to the loading station and the distribution station in the station set. For each station in the set of stations, the flow balance conditions are determined based on the station's upload volume, download volume, inflow volume, and outflow volume. The station model is determined based on the station constraints and the flow balance conditions.
4. The method according to claim 2, characterized in that, The step of determining the pipeline model based on the pipeline input data and the pipeline segment set includes: For each pipe segment in the set of pipe segments, a set of pipe segment constraint conditions is determined based on the natural gas flow rate and direction of the pipe segment and the constraint data in the pipeline input data; Based on the station attributes of the endpoints to which the pipe segment belongs, as well as the pressure and flow rate at the beginning and end of the pipe segment, a set of hydraulic constraint conditions is constructed; Based on the initial and final pressures of the pipeline segment and the station pressure, determine the pressure constraint set for the pipeline segment and station. The pipeline model is determined based on the pipeline constraint set, the hydraulic constraint set, and the pipeline section station pressure constraint set.
5. The method according to claim 2, characterized in that, The step of constructing the compressor station model based on the compressor station input data and the compressor station set includes: Based on the compressor station input data, determine the amount of gas flowing into the compressor stations in the compressor station set; Based on the input data of the compressor station, determine the pressure coupling constraint set of the compressor station; Based on the gas quantity and the compressor power limit in the compressor station input data, determine the compressor power constraint set; The compressor station model is constructed based on the gas quantity, the pressure coupling constraint set, and the power constraint set.
6. The method according to claim 1, characterized in that, The step of linearizing the nonlinear component of the first gas transmission model based on the initial flow rate and the initial pressure value to obtain the second gas transmission model includes: Based on the initial flow rate and the initial pressure value, construct the first-order Taylor expansion of the nonlinear constraints in the first gas transmission model; The nonlinear terms in the first-order Taylor expansion are linearized to obtain a linear expansion. Based on the linear expansion, the first gas transmission model is approximated to obtain the intermediate gas transmission model; By adding a penalty model to the objective function of the intermediate gas transmission model, a second gas transmission model is obtained.
7. An analytical apparatus for a natural gas transmission system, characterized in that, include: The data acquisition module is used to acquire basic data of the natural gas transmission system to be analyzed. The model building module is used to build a first gas transmission model based on the basic data. The first gas transmission model includes a station model, a pipeline model, and a compressor station model. The initial value determination module is used to determine the initial flow rate and initial pressure value of the gas transported by the first gas transport model; The model conversion module is used to perform a linear conversion on the nonlinear part of the first gas transmission model based on the initial flow rate and the initial pressure value to obtain a second gas transmission model. The system analysis module is used to determine the key operating parameters corresponding to the natural gas transmission system to be analyzed based on the second gas transmission model.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the analysis method for the natural gas transmission system according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the analysis method for the natural gas transmission system according to any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the analysis method for the natural gas transmission system according to any one of claims 1-6.