A method and device for calculating hydraulic parameters of a natural gas station

By constructing models of natural gas stations and pipelines, and refining the solutions for flow rate and pressure, the problem of inaccurate simulation modeling of natural gas stations in existing technologies has been solved, improving calculation speed and accuracy and providing data support for equipment control.

CN117906066BActive Publication Date: 2026-05-08CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNIV OF PETROLEUM (BEIJING)
Filing Date
2024-01-10
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies cannot perform detailed simulation modeling of natural gas stations, resulting in inaccurate calculations of flow and pressure data, difficulty in assessing equipment energy consumption and operating efficiency, and slow calculation speed.

Method used

Construct target natural gas station and pipeline models, calculate gas density, boundary flow rate and boundary pressure by determining compressor outlet node pressure and pipeline boundary conditions, refine the station node flow rate and pressure, correct flow rate values ​​to improve calculation accuracy, and calculate compressor power.

Benefits of technology

It enables refined modeling and simulation of natural gas stations with arbitrary topologies, improves the accuracy and speed of flow calculation, and provides a data foundation for equipment regulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117906066B_ABST
    Figure CN117906066B_ABST
Patent Text Reader

Abstract

The application provides a natural gas station hydraulic parameter calculation method and device. The method comprises the following steps: obtaining structure parameters of a target natural gas station and structure parameters of a target pipeline; constructing a target natural gas station model according to the structure parameters of the target natural gas station; constructing a target pipeline model according to the structure parameters of the target pipeline; determining a first target pressure corresponding to a compressor outlet node; determining a pipeline boundary condition corresponding to a pipeline boundary node; calculating a gas density, a boundary flow and a boundary pressure corresponding to a station boundary node according to the pipeline boundary condition; determining a first target flow corresponding to a compressor and a regulating valve and a second target pressure corresponding to a station node according to the gas density, the boundary flow and the boundary pressure; calculating a compressor power according to the first target flow corresponding to the compressor; and correcting the first target flow corresponding to the compressor by using the first target pressure corresponding to the compressor outlet node to obtain a second target flow corresponding to the compressor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This manual belongs to the field of natural gas pipeline transportation system monitoring and control technology, and in particular relates to a method and device for calculating hydraulic parameters of natural gas stations. Background Technology

[0002] Natural gas stations are the hubs of natural gas pipeline networks, containing various pressurization, depressurization, heating, and cooling equipment, such as compressors, pressure regulating valves, and filtration devices. These devices are connected to pipelines through complex series and parallel connections. Natural gas stations have a large number of internal devices, diverse connection methods, and complex processes. However, the aging of station equipment leads to increased energy consumption. On the one hand, the identification of outdated station equipment relies solely on the experience of maintenance personnel, with upgrades or replacements made gradually according to annual maintenance and renovation plans, lacking precision. On the other hand, maintenance personnel cannot scientifically and effectively determine equipment output based on its energy consumption characteristics, causing station equipment to operate below optimal energy efficiency and resulting in insufficient energy utilization. To solve these problems, it is necessary to strengthen the monitoring of equipment energy consumption during operation, identify the sources of high energy consumption, implement energy-saving management and equipment replacement, thereby reducing carbon dioxide emissions.

[0003] To understand the flow of gas within a natural gas station, assess equipment operating efficiency, and monitor energy consumption, a simulation model of the natural gas station needs to be established. This model is then used to perform simulation calculations, determining the flow and pressure data within the station to calculate equipment energy consumption. However, current technologies, when combining pipeline and station calculations, are limited by computational speed and accuracy, making it impossible to perform detailed simulation modeling of the natural gas station. Typically, the internal structure and equipment of the station are simplified, making accurate simulation calculations difficult, as is obtaining accurate flow and pressure data, and precise compressor energy consumption data.

[0004] There is currently no effective solution to the aforementioned technical problems. Summary of the Invention

[0005] This application provides a method and apparatus for calculating the hydraulic parameters of a natural gas station, which can determine the hydraulic parameters (including flow data of compressors and regulating valves, pressure data of station nodes, and compressor power) of a natural gas station with any topology.

[0006] The purpose of this application is to provide a method for calculating hydraulic parameters of a natural gas station, including:

[0007] The structural parameters of the target natural gas station and the target pipeline are obtained; a target natural gas station model is constructed based on the structural parameters of the target natural gas station; and a target pipeline model is constructed based on the structural parameters of the target pipeline. The target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves; the station nodes include internal station nodes and station boundary nodes; the internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes; the target pipeline model includes multiple pipeline nodes; the pipeline nodes include pipeline boundary nodes and pipeline internal nodes; the target natural gas station model and the target pipeline model are connected through the station boundary nodes.

[0008] Determine the first target pressure corresponding to the compressor outlet node; and determine the pipeline boundary conditions corresponding to the pipeline boundary node;

[0009] Based on the pipeline boundary conditions, calculate the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes;

[0010] Based on the gas density, the boundary flow rate, and the boundary pressure, determine the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node;

[0011] Calculate the compressor power based on the first target flow rate corresponding to the compressor;

[0012] By using the first target pressure corresponding to the compressor outlet node, the first target flow rate corresponding to the compressor is corrected to obtain the second target flow rate corresponding to the compressor.

[0013] Furthermore, in another embodiment of the method, calculating the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary node based on the pipeline boundary conditions includes:

[0014] Construct the natural gas pipeline flow equations corresponding to the target pipeline model;

[0015] Based on the pipeline boundary conditions, the natural gas pipeline flow equation is discretized and then solved to obtain the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes.

[0016] Furthermore, in another embodiment of the method, determining the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node based on the gas density, the boundary flow rate, and the boundary pressure includes:

[0017] Based on the gas density, the boundary flow rate, and the boundary pressure, solve the compressor flow-pressure equation and the control valve flow-pressure equation for the current cycle to obtain the first flow rate corresponding to the compressor and the first flow rate corresponding to the control valve for the current cycle.

[0018] Based on the first flow rate corresponding to the compressor in the current cycle, the first flow rate corresponding to the regulating valve in the current cycle, and the second pressure corresponding to the station node in the current cycle, construct the flow rate change equation for the current cycle.

[0019] Solve the flow rate change equation for the current cycle to obtain the pressure increment of the station nodes in the current cycle;

[0020] Detect whether the pressure increment of the current station node is less than the preset pressure increment accuracy threshold;

[0021] If the pressure increment of the current cycle station node is less than the preset pressure increment accuracy threshold, the first flow rate corresponding to the compressor in the current cycle is taken as the first target flow rate corresponding to the compressor; the first flow rate corresponding to the regulating valve in the current cycle is taken as the first target flow rate corresponding to the regulating valve; and the second pressure corresponding to the station node in the current cycle is taken as the second target pressure corresponding to the station node.

[0022] Furthermore, in another embodiment of the method, after detecting whether the pressure increment of the current round station node is less than a preset pressure increment accuracy threshold, the method further includes:

[0023] If the pressure increment of the current round station node is greater than or equal to the preset pressure increment accuracy threshold, the second pressure corresponding to the station node in the next round is calculated based on the pressure increment of the current round station node.

[0024] Based on the second pressure corresponding to the next station node, calculate the first flow rate corresponding to the compressor in the next round and the first flow rate corresponding to the regulating valve in the next round;

[0025] Based on the second pressure corresponding to the next station node, the first flow rate corresponding to the next compressor, and the first flow rate corresponding to the next regulating valve, the flow rate change equation is reconstructed and solved to obtain the pressure increment of the next station node;

[0026] Detect whether the pressure increment of the next station node is less than the preset pressure increment accuracy threshold.

[0027] If the pressure increment in the next round is determined to be less than the preset pressure increment accuracy threshold, the first flow rate corresponding to the compressor in the next round is taken as the first target flow rate corresponding to the compressor; the first flow rate corresponding to the regulating valve in the next round is taken as the first target flow rate corresponding to the regulating valve; and the second pressure corresponding to the station node in the next round is taken as the second target pressure corresponding to the station node.

[0028] Furthermore, in another embodiment of the method, based on the first flow rate corresponding to the compressor in the current cycle, the first flow rate corresponding to the regulating valve in the current cycle, and the second pressure corresponding to the station node in the current cycle, a flow rate change equation for the current cycle is constructed, including:

[0029] Based on the first flow rate corresponding to the compressor in the current cycle and the first flow rate corresponding to the regulating valve in the current cycle, construct the node flow balance equation for the current cycle;

[0030] Based on the second pressure corresponding to the station node in the current round, calculate the Jacobi matrix corresponding to the node flow balance equation in the current round;

[0031] Based on the current round node flow balance equation and the corresponding Jacobi matrix, the flow change equation for the current round is obtained.

[0032] Furthermore, in another embodiment of the method, the method further includes:

[0033] If the pressure increment of the station node in the current round is less than the preset pressure increment accuracy threshold, the updated pressure difference corresponding to the station boundary node is extracted from the second target pressure.

[0034] Based on the updated pressure difference corresponding to the station boundary node and the pipeline boundary conditions of the next time step, calculate the boundary flow and boundary pressure corresponding to the station boundary node of the next time step.

[0035] Furthermore, in another embodiment of the method, calculating the compressor power based on the first target flow rate corresponding to the compressor includes:

[0036] Calculate the compressor power using the following formula:

[0037] (1)

[0038] in, Indicates compressor power. This represents the first target flow rate corresponding to the compressor, and g represents the acceleration due to gravity. Indicates a versatile energy head. This indicates the compressor efficiency.

[0039] Furthermore, in another embodiment of the method, the step of using the first target pressure corresponding to the compressor outlet node to correct the first target flow rate corresponding to the compressor to obtain the second target flow rate corresponding to the compressor includes:

[0040] The sampling point flow rate corresponding to the sampling point is determined based on the first target flow rate corresponding to the compressor.

[0041] Calculate the pressure value corresponding to the sampling point based on the flow rate at the sampling point;

[0042] Calculate the gain matrix corresponding to the sampling point based on the flow rate at the sampling point and the calculated pressure value;

[0043] The second target flow rate corresponding to the compressor is obtained based on the pressure estimate, the gain matrix, and the first target pressure corresponding to the compressor outlet node.

[0044] The purpose of this application embodiment is to provide a device for calculating hydraulic parameters of a natural gas station, including:

[0045] A construction module is used to acquire the structural parameters of the target natural gas station and the target pipeline; and to construct a target natural gas station model based on the structural parameters of the target natural gas station; and to construct a target pipeline model based on the structural parameters of the target pipeline. The target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves; the station nodes include internal station nodes and station boundary nodes; the internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes; the target pipeline model includes multiple pipeline nodes; the pipeline nodes include pipeline boundary nodes and pipeline internal nodes; the target natural gas station model and the target pipeline model are connected through the station boundary nodes.

[0046] The determination module is used to determine the first target pressure corresponding to the compressor outlet node and to determine the pipeline boundary conditions corresponding to the pipeline boundary node.

[0047] The first calculation module is used to calculate the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary node based on the pipeline boundary conditions.

[0048] The second calculation module is used to determine the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node based on the gas density, the boundary flow rate, and the boundary pressure.

[0049] The third calculation module is used to calculate the compressor power based on the first target flow rate corresponding to the compressor;

[0050] The correction module is used to correct the first target flow rate of the compressor by using the first target pressure corresponding to the compressor outlet node, so as to obtain the second target flow rate of the compressor.

[0051] The purpose of this application embodiment is to provide a computer-readable storage medium storing computer instructions thereon, wherein when the computer-readable storage medium is executed by a processor, the above-mentioned method for calculating the hydraulic parameters of a natural gas station is implemented. Attached Figure Description

[0052] To more clearly illustrate the embodiments of this specification, the accompanying drawings used in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 A schematic diagram of one embodiment of a method for calculating hydraulic parameters of a natural gas station provided in this specification;

[0054] Figure 2 A schematic diagram of a target natural gas station model and a target pipeline model provided for embodiments of this specification;

[0055] Figure 3 A schematic diagram of the process for calculating the quasi-steady state of a station provided in the embodiments of this specification;

[0056] Figure 4 A schematic diagram of the coupled solution process for the station and pipeline network provided in the embodiments of this specification;

[0057] Figure 5 This is a schematic diagram of pressure curves corresponding to different station nodes in a specific scenario example provided in the embodiments of this specification;

[0058] Figure 6 This is a schematic diagram of the traffic flow curves for different devices in a specific scenario example provided in the embodiments of this specification;

[0059] Figure 7 This is a schematic diagram of the pressure curve corresponding to the pipeline in a specific scenario example provided in the embodiments of this specification;

[0060] Figure 8 A schematic diagram of the inlet and outlet flow velocity curves of a target natural gas station model provided in a specific scenario example of an embodiment of this specification;

[0061] Figure 9 This is a schematic diagram of the pressure measurement curves at the compressor inlet and outlet nodes, provided as a specific scenario example in the embodiments of this specification.

[0062] Figure 10 A schematic diagram of the flow curves of the compressor before and after correction, provided as a specific scenario example in the embodiments of this specification;

[0063] Figure 11 This specification provides a schematic diagram of the structure of a device for calculating hydraulic parameters of a natural gas station, as an embodiment of the present invention.

[0064] Figure 12 A schematic diagram of one embodiment of the server structure provided in this specification;

[0065] Figure 13 This is a schematic diagram of compressor power results in a specific scenario example provided in the embodiments of this specification. Detailed Implementation

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

[0067] Natural gas stations are the hubs of natural gas pipeline networks, containing various pressurization, depressurization, heating, and cooling equipment, such as compressors, pressure regulating valves, and filtration devices. These devices are connected to pipelines through complex series and parallel connections. Natural gas stations have a large number of internal devices, diverse connection methods, and complex processes. However, the aging of station equipment leads to increased energy consumption. On the one hand, the identification of outdated station equipment relies solely on the experience of maintenance personnel, with upgrades or replacements made gradually according to annual maintenance and renovation plans, lacking precision. On the other hand, maintenance personnel cannot scientifically and effectively determine equipment output based on its energy consumption characteristics, causing station equipment to operate below optimal energy efficiency and resulting in insufficient energy utilization. To solve these problems, it is necessary to strengthen the monitoring of equipment energy consumption during operation, identify the sources of high energy consumption, implement energy-saving management and equipment replacement, thereby reducing carbon dioxide emissions.

[0068] To understand the flow of gas within a natural gas station, assess equipment operating efficiency, and monitor energy consumption, a simulation model of the natural gas station needs to be established. This model is then used to perform simulation calculations, determining the flow and pressure data within the station to calculate equipment energy consumption. However, in existing technologies, when jointly calculating pipeline and natural gas station data, limitations in computational speed and accuracy prevent the creation of detailed simulation models. Typically, the internal structure and equipment of the natural gas station are simplified, making accurate simulation calculations difficult. Consequently, it is challenging to obtain accurate flow and pressure data, as well as accurate compressor energy consumption data.

[0069] Furthermore, it is also considered that in the existing technology, the natural gas station is not treated as a whole and the natural gas pipeline flow equation is not coupled for solution, which will affect the calculation speed of the first target flow rate.

[0070] To address the aforementioned problems with existing methods and the specific reasons for these problems, this application proposes a method and apparatus for calculating hydraulic parameters of natural gas stations. This method can perform refined modeling and simulation calculations on natural gas stations with arbitrary topologies while ensuring calculation speed. It can also refine the flow and pressure values ​​of each node within the natural gas station, further utilize measured pressure values ​​to correct flow values, thereby improving the accuracy of flow calculation, and further calculate compressor power, providing a data foundation for the regulation and control of natural gas stations.

[0071] Based on the above approach, this specification proposes a method for calculating the hydraulic parameters of a natural gas station. This method includes: obtaining the structural parameters of the target natural gas station and the target pipeline; constructing a target natural gas station model based on the structural parameters of the target natural gas station; and constructing a target pipeline model based on the structural parameters of the target pipeline. The target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves. The station nodes include internal station nodes and station boundary nodes. The internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes. The target pipeline model includes multiple pipeline nodes. The pipeline nodes include pipeline boundary nodes and pipeline internal nodes. The gas station model and the target pipeline model are connected through the station boundary nodes; the first target pressure corresponding to the compressor outlet node is determined; and the pipeline boundary conditions corresponding to the pipeline boundary nodes are determined; based on the pipeline boundary conditions, the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes are calculated; based on the gas density, the boundary flow rate, and the boundary pressure, the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node are determined; based on the first target flow rate corresponding to the compressor, the compressor power is calculated; using the first target pressure corresponding to the compressor outlet node, the first target flow rate corresponding to the compressor is corrected to obtain the second target flow rate corresponding to the compressor.

[0072] See Figure 1 As shown, this specification proposes a method for calculating the hydraulic parameters of a natural gas station. In practice, this method may include the following:

[0073] S101: Obtain the structural parameters of the target natural gas station and the target pipeline; construct a target natural gas station model based on the structural parameters of the target natural gas station; and construct a target pipeline model based on the structural parameters of the target pipeline; the target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves; the station nodes include internal station nodes and station boundary nodes; the internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes; the target pipeline model includes multiple pipeline nodes; the pipeline nodes include pipeline boundary nodes and pipeline internal nodes; the target natural gas station model and the target pipeline model are connected through the station boundary nodes.

[0074] In some embodiments, the hydraulic parameters of a natural gas station specifically include: the corrected flow rate corresponding to the compressor, the flow rate corresponding to the regulating valve, the pressure corresponding to the station node, and the compressor power.

[0075] In some embodiments, the structural parameters of the target natural gas station refer to the topological relationships (connection relationships) between various devices (including compressors and regulating valves) and internal pipelines within the natural gas station. The target natural gas station and the target natural gas station model have the same topological structure, and the connection relationships of their internal devices are identical.

[0076] In some embodiments, the structural parameters of the target pipeline refer to the topological relationship (connection relationship) between the natural gas station and external pipelines. The target pipeline and the target pipeline model have the same topological structure.

[0077] In some embodiments, based on their location, station nodes can be divided into: internal station nodes and station boundary nodes. Station boundary nodes refer to the inlet and outlet nodes of the target natural gas station model. Internal nodes refer to all station nodes except for the inlet and outlet nodes of the target natural gas station model.

[0078] In some embodiments, typically one compressor corresponds to one compressor inlet node and one compressor outlet node. One regulating valve corresponds to one regulating valve inlet node and one regulating valve outlet node. Further, if there are first and second devices connected in series in the target natural gas station model, and natural gas flows from the first device through the second device, then the outlet node of the first device is the inlet node of the second device. Further, if there are first and second devices connected in parallel in the target natural gas station model, then the outlet (inlet) node of the first device is the outlet (inlet) node of the second device.

[0079] In some embodiments, based on their location, pipeline nodes can be divided into: internal pipeline nodes and pipeline boundary nodes. Pipeline boundary nodes are those where natural gas enters and exits. Internal pipeline nodes are those used for transmitting natural gas and are not connected to the outside world.

[0080] In some embodiments, the number of internal nodes of the pipeline is usually multiple (more than 2). Two nodes that are connected to the target natural gas station model are selected from the internal nodes of the pipeline and used as station boundary nodes.

[0081] In a specific scenario example Figure 2This section represents the target natural gas station model and the target pipeline model. Pipe1 represents main pipeline 1, pipe2 represents main pipeline 2, and station represents the target natural gas station model. The main pipelines are located outside the target natural gas station model, and the dashed boxes indicate the specific structure of the target natural gas station model obtained by zooming in on the station. Arrows indicate the direction of natural gas flow. A1, A2, A3, and A4 represent pipeline nodes. Specifically, A1 and A4 are pipeline boundary nodes, while A2 and A3 are both internal pipeline nodes and station boundary nodes. A2 represents the inlet node of the target natural gas station model, and A3 represents the outlet node. Natural gas enters from pipeline boundary node A1, passes through pipe1, A2, station, A3, and pipe2 in sequence, and flows to the user side from pipeline boundary node A4. Simultaneously, within the station, natural gas also flows along the path from A2 to A3. V1 represents the first pressure regulating valve, V2 the second pressure regulating valve, V3 the third pressure regulating valve, V4 the fourth pressure regulating valve, V5 the fifth pressure regulating valve, V6 the sixth pressure regulating valve, V7 the seventh pressure regulating valve, V8 the eighth pressure regulating valve, V9 the ninth pressure regulating valve, V10 the tenth pressure regulating valve, V11 the eleventh pressure regulating valve, V12 the twelfth pressure regulating valve, and V13 the thirteenth pressure regulating valve. R1 represents the first filter device, R2 the second filter device, and R3 the third filter device. C1 represents the first compressor. Based on the connection relationship between the compressor and the pressure regulating valves, station nodes 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, and 13 are generated. Station boundary node A2 represents both the inlet node of the target natural gas station model and the inlet node of the regulating valve of V1. Station node 1 is the outlet node of the control valve for V1 and the inlet node of the control valves for V2, V4, and V6. Station node 2 is the outlet node of the control valve for V2. Station node 3 is the outlet node of the control valve for V4. Station node 4 is the outlet node of the control valve for V6. Station node 5 is the inlet node of the control valve for V3. Station node 6 is the inlet node of the control valve for V5. Station node 7 is the inlet node of the control valve for V7. Station node 8 is the outlet node of the control valves for V3, V5, and V7, and also the inlet node of the control valve for V8. Station node 9 is the outlet node of the control valve for V8, and also the inlet node of the control valve for V9 and V11. Station node 10 is the outlet node of the control valve for V9 and also the inlet node of the compressor for C1. Station node 11 is the outlet node of the compressor for C1 and also the inlet node of the control valve for V10. Station node 12 is the outlet node of the regulating valve of V11, and also the inlet node of the regulating valve of V12.Station node 13 is the outlet node of the regulating valves of V10 and V12, and also the inlet node of the regulating valve of V13. Station boundary node A3 is the outlet node of the regulating valve of V13. In the embodiments of this specification, the pressure-flow relationship of the first filter device, the second filter device, and the third filter device is regarded as a kind of resistance element, which is equivalent to a regulating valve with a certain opening when constructing the target natural gas station model.

[0082] Based on the above embodiments, the connection relationships between the internal equipment of the target natural gas station model in this application are consistent with the connection relationships between the internal equipment of the target natural gas station, and a refined modeling of the target natural gas station is performed.

[0083] S102: Determine the first target pressure corresponding to the compressor outlet node; and determine the pipeline boundary conditions corresponding to the pipeline boundary node.

[0084] In some embodiments, a pressure sensor is installed at the compressor outlet in the target natural gas station. The first target pressure corresponding to the compressor outlet node is collected by the pressure sensor.

[0085] In some embodiments, pipeline boundary conditions refer to the pressure and flow rates at pipeline boundary nodes. Pressure and flow sensors can be installed at the locations of these boundary nodes to collect the pipeline boundary conditions. Alternatively, pipeline boundary conditions can be set based on the average historical pressure and flow rates.

[0086] S103: Calculate the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary node based on the pipeline boundary conditions.

[0087] In some embodiments, the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary node are calculated based on the pipeline boundary conditions, specifically including:

[0088] S1: Construct the natural gas pipeline flow equations corresponding to the target pipeline model;

[0089] S2: Based on the pipeline boundary conditions, the flow equation of the natural gas pipeline is discretized and solved to obtain the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes.

[0090] In some embodiments, the boundary flow corresponding to a station boundary node refers to the flow value of the station boundary node; the boundary pressure corresponding to a station boundary node refers to the pressure value of the station boundary node.

[0091] In some embodiments, the flow equation for a natural gas pipeline can be found in the following formula:

[0092] (2)

[0093] (3)

[0094] in, Indicates gas density, t Indicates time, Indicates gas flow rate, x Indicates mileage. Indicates the coefficient of friction. D Indicates the inner diameter of the pipe. g Represents gravitational acceleration. Indicates the pipe inclination angle. p This indicates boundary pressure.

[0095] In some embodiments, the coefficient of friction can be calculated using the following formula:

[0096] (4)

[0097] (5)

[0098] in, Indicates the roughness of the pipe wall. Re represents the dynamic viscosity of the gas, and Re represents the Reynolds number of the gas flow.

[0099] In some embodiments, the flow equations for natural gas pipelines are discretized, and the results are shown in the following formula:

[0100] (6)

[0101] (7)

[0102] Where u represents the grid number after the pipeline is discretized, and u corresponds to the pipeline node at different locations. t Indicates time, The superscript # indicates the time step, and the superscript # indicates the historical moment. Indicates the moment to be solved. Indicates the step distance. Indicates historical moments, The gas density at that location, Indicates the time to be solved, Gas flow rate at that location Represents time t, The gas density at that location, Represents time t, Gas flow rate at that location This represents the gas density at point u at a historical moment. This indicates the gas velocity at point u at a given historical moment. This represents the gas velocity at time u to be solved. This represents the gas density at a historical moment, u-1. Historical moment, gas velocity at u-1 This represents the gas velocity at time u-1, which is the time to be solved. Indicates historical moments, Gas flow rate at that location This represents the pressure difference corresponding to the boundary nodes of the station area. express Gas density at time u Indicate t Gas density at time u express time, The gas density at that location, express time, Gas flow rate at that location express time, The gas density at that location, express time, The gas flow rate at that location.

[0103] In some embodiments, Equation 6 is called the pipeline momentum equation, and Equation 7 is called the pipeline mass equation.

[0104] In some embodiments, the pressure difference corresponding to the boundary node of the station refers to the result of subtracting the pressure value of the outlet node of the target natural gas station model from the pressure value of the inlet node of the target natural gas station model.

[0105] In some embodiments, the gas flow rate and the boundary flow rate have the following corresponding relationship:

[0106] (8)

[0107] in, Represents boundary mass flow rate. This represents the cross-sectional area of ​​the pipe. This indicates the density of the gas.

[0108] In some embodiments, Equations 6 and 7 are solved using pipeline boundary conditions and the pressure differences corresponding to the station boundary nodes to obtain gas velocity, gas density, and boundary pressure. Furthermore, Equation 8 is used to convert the gas velocity into boundary flow rate. Moreover, when solving Equations 6 and 7, it is not necessary to consider the detailed internal structure of the target natural gas station model; only the pressure difference between the inlet and outlet needs to be considered, with the pressure difference corresponding to the station boundary nodes used as the source term. Substitute the values ​​into the calculation.

[0109] S104: Based on the gas density, the boundary flow rate, and the boundary pressure, determine the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node.

[0110] In some embodiments, a first target flow rate corresponding to the compressor, a first target flow rate corresponding to the regulating valve, and a second target pressure corresponding to the station node are determined based on the gas density, the boundary flow rate, and the boundary pressure. Specifically, this includes:

[0111] S1: Based on the gas density, the boundary flow rate, and the boundary pressure, solve the compressor flow-pressure equation and the regulating valve flow-pressure equation for the current cycle to obtain the first flow rate corresponding to the compressor and the first flow rate corresponding to the regulating valve for the current cycle.

[0112] S2: Based on the first flow rate corresponding to the compressor in the current cycle, the first flow rate corresponding to the regulating valve in the current cycle, and the second pressure corresponding to the station node in the current cycle, construct the flow rate change equation for the current cycle;

[0113] S3: Solve the flow rate change equation for the current cycle to obtain the pressure increment of the station nodes in the current cycle;

[0114] S4: Detect whether the pressure increment of the current station node is less than the preset pressure increment accuracy threshold;

[0115] S5: If the pressure increment of the current cycle station node is less than the preset pressure increment accuracy threshold, the first flow rate corresponding to the compressor in the current cycle is taken as the first target flow rate corresponding to the compressor; the first flow rate corresponding to the regulating valve in the current cycle is taken as the first target flow rate corresponding to the regulating valve; and the second pressure corresponding to the station node in the current cycle is taken as the second target pressure corresponding to the station node.

[0116] In some embodiments, after detecting whether the pressure increment of the current station node is less than a preset pressure increment accuracy threshold, the method further includes:

[0117] S1: If the pressure increment of the station node in the current round is greater than or equal to the preset pressure increment accuracy threshold, calculate the second pressure corresponding to the station node in the next round based on the pressure increment of the station node in the current round.

[0118] S2: Based on the second pressure corresponding to the station node in the next round, calculate the first flow rate corresponding to the compressor in the next round and the first flow rate corresponding to the regulating valve in the next round;

[0119] S3: Based on the second pressure corresponding to the next round of station nodes, the first flow rate corresponding to the next round of compressors, and the first flow rate corresponding to the next round of regulating valves, reconstruct and solve the flow rate change equation to obtain the pressure increment of the next round of station nodes;

[0120] S4: Detect whether the pressure increment of the next station node is less than the preset pressure increment accuracy threshold.

[0121] S5: If it is determined that the pressure increment in the next round is less than the preset pressure increment accuracy threshold, the first flow rate corresponding to the compressor in the next round is taken as the first target flow rate corresponding to the compressor; the first flow rate corresponding to the regulating valve in the next round is taken as the first target flow rate corresponding to the regulating valve; and the second pressure corresponding to the station node in the next round is taken as the second target pressure corresponding to the station node.

[0122] In some embodiments, a flow rate change equation for the current cycle is constructed based on the first flow rate corresponding to the compressor in the current cycle, the first flow rate corresponding to the regulating valve in the current cycle, and the second pressure corresponding to the station node in the current cycle. Specifically, this includes:

[0123] S1: Based on the first flow rate of the compressor in the current cycle and the first flow rate of the regulating valve in the current cycle, construct the node flow balance equation for the current cycle;

[0124] S2: Based on the second pressure corresponding to the station node in the current round, calculate the Jacobian matrix corresponding to the node flow balance equation in the current round;

[0125] S3: Based on the current round node flow balance equation and the Jacobian matrix corresponding to the current round node flow balance equation, obtain the flow change equation for the current round.

[0126] In some embodiments, the first Each compressor satisfies the following formula:

[0127] (9)

[0128] Where d represents the number of iterations (also known as rounds). Indicates a versatile energy head. Denotes the first fitted parameters. Indicates the second fitting parameter. Indicates the third fitting parameter. Indicates the d-th iteration. The first flow rate corresponding to each compressor This indicates the compressor's current speed. Indicates the compressor's rated speed. Indicates the gas polyvariance index. This represents the compressor inlet node pressure value of the compressor in the d-th iteration. The second pressure from the d-th iteration (Extracted from), g represents gravitational acceleration. Indicates gas density, This indicates the ratio of the compressor's inlet and outlet pressures.

[0129] According to Formula 9, we can derive: the current round (assuming the current round is d) The compressor flow-pressure equations for each compressor:

[0130] (10)

[0131] In some embodiments, the first Each regulating valve satisfies the following formula:

[0132] (11)

[0133] in, This represents the pressure value at the outlet node of the control valve during the d-th iteration. This represents the pressure value at the inlet node of the regulating valve during the d-th iteration. and The second pressure from the d-th iteration (Extracted from), Z represents the average compression factor before and after the control valve. G This represents the ratio of the gas density in the pipe to the air density. This indicates the temperature at the inlet node of the regulating valve. Indicates the first The first flow rate corresponding to each regulating valve This indicates the current flow coefficient of the control valve. This indicates the unit conversion factor.

[0134] Formula 11 can be used to derive: the current round (assuming the current round is d) The flow-pressure equations for each control valve are as follows:

[0135] (12)

[0136] In some embodiments, for the station boundary nodes (the inlet node and outlet node of the target natural gas station model), the boundary flow and boundary pressure conditions set the flow and pressure values ​​for these two nodes. The pressure value of the inlet node and the flow value of the outlet node are supplementary conditions for the flow balance equation. During the station-internal iteration process, unlike the internal nodes, the pressure of the boundary pressure node and the distribution flow of the boundary flow node remain unchanged during iteration. The boundary pressure can be substituted into Equations 10 and 12 as known quantities, and combined with the second pressure of the internal nodes, the first flow rates of the compressor and regulating valve can be obtained. The boundary flow rate, i.e., the node distribution flow rate, is substituted into Equation 14 as a known quantity, combined with the first flow rates of the compressor and regulating valve, to construct the node flow balance equation.

[0137] By solving formulas 10 and 12, the first flow rate corresponding to the compressor in the current cycle and the first flow rate corresponding to the regulating valve in the current cycle can be obtained.

[0138] In some embodiments, ideally, the station nodes satisfy the flow balance equation shown in Equation 13:

[0139] (13)

[0140] Where j represents the station node number, y represents the total number of station nodes, and f represents the equipment number; This represents the first flow rate of device f connected to station node j. It takes a positive value when flowing into station node j and a negative value when flowing out of station node j. This represents the distribution flow of station node j. It takes a positive value when the flow flows from station node j into the target pipeline model and a negative value when the flow flows from station node j out of the target pipeline model.

[0141] According to Equation 13, the nodal flow balance equations corresponding to the target natural gas station model can be constructed:

[0142] (14)

[0143] in, Let d represent the flow equations, and d represent the number of iterations. This represents the sub-result of the flow equation set corresponding to node j in the station area; This represents the first flow rate of device f connected to station node j obtained in the d-th iteration; This represents the distribution flow rate at station node j during the d-th iteration.

[0144] Among them, in formula 14 It is obtained by solving formulas 9 and 11. The second pressure corresponding to the station node in the d-th iteration is a pressure value matrix composed of the pressure values ​​of each station node in the d-th iteration. , This represents the pressure value of station node j in the d-th iteration.

[0145] In some embodiments, the Jacobian matrix corresponding to the node flow balance equation (Equation 14) is calculated to obtain Equation 15:

[0146] (15)

[0147] in, express The Jacobian matrix.

[0148] Based on Equations 14 and 15, the flow rate change equation corresponding to the target natural gas station model can be obtained, as shown in Equation 16:

[0149] (16)

[0150] in, The pressure increment of the station node after the d-th iteration is represented in matrix form.

[0151] In some embodiments, , This represents the pressure increment of station node j after the d-th iteration.

[0152] In some embodiments, and Adding them together gives Based on the first flow rate corresponding to the compressor in the current cycle, the first flow rate corresponding to the regulating valve in the current cycle, and the second pressure corresponding to the station node in the current cycle. Construct and solve the flow change equation (Formula 16) for the current round (d-th iteration) to obtain the pressure increment of the station nodes in the current round. Then, detection Is it less than the preset pressure increment accuracy threshold? ;if Less than the preset pressure increment accuracy threshold ,illustrate The calculation accuracy has met the requirements, and the calculation results have converged. At this point, the first flow rate corresponding to the compressor in the current cycle is taken as the first target flow rate corresponding to the compressor; the first flow rate corresponding to the regulating valve in the current cycle is taken as the first target flow rate corresponding to the regulating valve; and the second pressure corresponding to the station node in the current cycle is taken as the second target pressure corresponding to the station node.

[0153] if Greater than or equal to the preset pressure increment accuracy threshold ,illustrate The calculation accuracy does not meet the requirements, the calculation results have not converged, and the number of detection iterations is insufficient. d Is it less than the preset maximum number of iterations? (i.e., detection) ),if At this point, increment the iteration count d by 1, and begin the (d+1)th iteration, using... Calculate the second pressure of the station node at the (d+1)th iteration. Then, using Combining Equations 10 and 12, we can obtain the first flow rate corresponding to the compressor in the next round (the (d+1)th iteration) and the first flow rate corresponding to the regulating valve in the next round. Based on the second pressure corresponding to the station node in the next round, the first flow rate corresponding to the compressor in the next round, and the first flow rate corresponding to the regulating valve in the next round, we can reconstruct and solve the flow rate change equation (Equation 16) to obtain the pressure increment of the station node in the next round. ; Detect the pressure increment at the next station node. Is it less than the preset pressure increment accuracy threshold? ;if Less than This indicates that the calculation accuracy meets the requirements. The first flow rate corresponding to the compressor in the next round is taken as the first target flow rate corresponding to the compressor; the first flow rate corresponding to the regulating valve in the next round is taken as the first target flow rate corresponding to the regulating valve; and the second pressure corresponding to the station node in the next round is taken as the second target pressure corresponding to the station node.

[0154] if Greater than or equal to and Then increment the iteration count d by 1 again, and start the (d+2)th iteration to calculate... Repeat the above process until the pressure increment is less than 1. or .

[0155] Based on the above embodiments, by iteratively calculating formulas 10, 12, and 16, the accuracy of pressure calculation and flow rate calculation can be continuously improved, and finally, the first target flow rate of the equipment (including compressors and regulating valves) and the second target pressure of the station node with high accuracy are obtained.

[0156] In some embodiments, the method further includes:

[0157] S1: If the pressure increment of the station node in the current round is less than the preset pressure increment accuracy threshold, the updated pressure difference corresponding to the station boundary node is extracted from the second target pressure.

[0158] S2: Based on the updated pressure difference corresponding to the station boundary node and the pipeline boundary conditions of the next time step, calculate the boundary flow and boundary pressure corresponding to the station boundary node of the next time step.

[0159] In some embodiments, assuming the current time step is t, then the next time step is... .

[0160] In some embodiments, when it is determined that the pressure increment of the current station node is less than a preset pressure increment accuracy threshold, the pressure is determined from the second target pressure. In the process, the updated pressure difference corresponding to the station boundary node is extracted. Based on the pipeline boundary conditions for the next time step, pipeline node calculations for the next time step are initiated. The current time step is updated (incremented by 1). The updated pressure difference corresponding to the station boundary node and the pipeline boundary conditions for the next time step are substituted into the natural gas pipeline flow equations. Formulas 6, 7, and 8 are solved again to calculate the boundary flow rate and boundary pressure corresponding to the station boundary node for the next time step. The boundary flow rate and boundary pressure corresponding to the station boundary node in the next time step are used to calculate the first flow rate of the compressor and the first flow rate of the regulating valve in the next time step, and then to calculate the pressure increment of the station node in the next time step.

[0161] Based on the above embodiments, the first level of iteration (external iteration) is used to calculate the boundary flow and boundary pressure corresponding to the station boundary nodes. This external iteration is an iteration for the pipeline, and the number of external iterations is denoted as m. m is changed multiple times to repeatedly calculate the boundary flow and boundary pressure of the station boundary nodes at time t. After the external iteration converges, the internal iteration is initiated. The second level of iteration (internal iteration) is used to calculate the first target flow corresponding to the compressor, the first target flow corresponding to the regulating valve, and the second target pressure corresponding to the station nodes. The pressure increment corresponding to d is changed multiple times. ,until Less than Then stop the iteration within the site.

[0162] Furthermore, based on the above embodiments, for a refined target natural gas station model, the first target flow rate corresponding to each piece of equipment within it can be calculated, as well as the second target pressure corresponding to each station node, and the compressor power can be further calculated. If the accuracy of the pressure increment calculation does not meet the requirements, in-station iteration begins to repeatedly calculate the pressure increment corresponding to d. If the accuracy of the pressure increment calculation meets the requirements, the off-site iteration begins. The current pressure values ​​of the station boundary nodes are used to update the gas density, boundary flow rate, and boundary pressure. Then, the updated gas density, boundary flow rate, and boundary pressure are used to calculate the flow rate and pressure inside the station for the next iteration. This achieves refined and high-precision flow rate calculation, pressure calculation, and gas density calculation for the target natural gas station model.

[0163] S105: Calculate the compressor power based on the first target flow rate corresponding to the compressor.

[0164] In some embodiments, the first target flow rate corresponding to the compressor is denoted as The first target flow rate of all compressors in the target natural gas station model then forms a matrix, denoted as... .

[0165] In some embodiments, the compressor also satisfies the following formula:

[0166] (17)

[0167] in, This indicates the compressor efficiency.

[0168] According to formula 11 and formula The formula for calculating compressor power can be derived from this:

[0169] (18)

[0170] in, Indicates compressor power. This represents the first target flow rate corresponding to the compressor, and g represents the acceleration due to gravity. Indicates a versatile energy head. This indicates the compressor efficiency.

[0171] S106: Using the first target pressure corresponding to the compressor outlet node, correct the first target flow rate corresponding to the compressor to obtain the second target flow rate corresponding to the compressor.

[0172] In some embodiments, the first target flow rate corresponding to the compressor obtained in step S104 is calculated based on a mechanistic model. The mechanistic model has truncation errors, and the calculation results deviate from the actual values ​​on site. Furthermore, there is a correlation between flow rate and pressure. Therefore, the first target pressure corresponding to the compressor outlet node collected by the sensor is used to correct the first target flow rate corresponding to the compressor, resulting in a corrected second target flow rate with higher accuracy.

[0173] In some embodiments, an unscented Kalman filter (UKF) is used to correct the first target flow rate corresponding to the compressor. The unscented Kalman filter consists of a prediction process and an update process.

[0174] In some embodiments, the first target flow rate corresponding to the compressor is corrected using the first target pressure corresponding to the compressor outlet node to obtain the second target flow rate corresponding to the compressor, specifically including:

[0175] S1: Determine the sampling point flow rate corresponding to the sampling point based on the first target flow rate corresponding to the compressor; wherein, the compressor and the sampling point have a corresponding relationship;

[0176] S2: Calculate the pressure value corresponding to the sampling point based on the flow rate at the sampling point;

[0177] S3: Calculate the gain matrix corresponding to the sampling point based on the flow rate at the sampling point and the calculated pressure value;

[0178] S4: Based on the pressure estimate, the gain matrix, and the first target pressure corresponding to the compressor outlet node, obtain the second target flow rate corresponding to the compressor.

[0179] In some embodiments, the gain matrix corresponding to the sampling point is calculated based on the sampling point flow rate and the calculated pressure value, specifically including:

[0180] S1: Obtain the estimated flow rate based on the flow rate at the sampling points and the first weight;

[0181] S2: Based on the calculated pressure value, obtain the estimated pressure value;

[0182] S3: Obtain the pressure covariance based on the pressure estimate and the second weight;

[0183] S4: Calculate the inverse matrix of the pressure covariance;

[0184] S5: Calculate the pressure-flow covariance based on the estimated flow rate and the estimated pressure.

[0185] S6: Determine the result of multiplying the pressure-flow covariance and the inverse matrix of the pressure covariance as the gain matrix.

[0186] In some embodiments, the Unscented Kalman Filter (UKF) introduces the Unscented Transform (UT) to handle the nonlinear propagation problem of probability density mean and covariance based on the Kalman Filter (KF). Compared to the Extended Kalman Filter (EKF), which linearizes the nonlinear system through a first-order Taylor expansion, the Unscented Kalman Filter (UKF) approximates the nonlinear system from the perspective of the probability density function. The fundamental purpose of Bayesian filtering is to obtain the posterior distribution of the system at the current time. If the system is nonlinear, even if the prior is a Gaussian distribution, the posterior will have a very complex form. For nonlinear systems, there are usually two intuitive approaches: the first is to simplify the system itself, such as the EKF using a first-order Taylor expansion to locally linearize the system; the other is to simplify the posterior distribution by using some parametric model. The Unscented Transform uses a set of sampling points called Sigma Points to represent the posterior probability distribution after the nonlinear transformation.

[0187] In a specific scenario example, the steps for correcting the first target flow rate of the compressor based on unscented Kalman filtering are explained in detail.

[0188] Step 1: Based on the compressor's first target flow rate, generate a series of Sigma Points and determine the flow rate corresponding to each Sigma Point.

[0189] (19)

[0190] (20)

[0191] (twenty one)

[0192] in, This represents the first target flow rate corresponding to the compressor; k represents the number of iterations in UKF. This represents the sampling point flow rate at iteration k-1. This represents the sampling point flow rate at the k-th iteration, where n represents the number of states and i represents the sampling point number. Represents the coefficients of the sampling points. This represents the flow covariance at the (k-1)th iteration.

[0193] Step 2, set the first weight and the second weight:

[0194] (twenty two)

[0195] (twenty three)

[0196] (twenty four)

[0197] in, Indicates the first weight. Indicates the second weight. This indicates that the weights are generated for the first sampling point. This indicates the weight generated at the second sampling point.

[0198] Step 3: Calculate the estimated flow rate based on the first weight and the flow rate at the sampling point.

[0199] (25)

[0200] in, This represents the estimated flow rate.

[0201] Step 4: Calculate the prior covariance of the flow rate based on the first weight, the flow rate at the sampling point, and the estimated flow rate.

[0202] (26)

[0203] in, This represents the prior covariance of the flow.

[0204] Step 5: Obtain the calculated pressure value based on the flow rate at the sampling point.

[0205] (27)

[0206] in, This represents the calculated pressure value. This indicates the pressure value at the compressor inlet node, from It was extracted from [the source].

[0207] Step 6: Based on the second weight and the calculated pressure value, obtain the estimated pressure value:

[0208] (28)

[0209] in, This represents the estimated pressure value.

[0210] Step 7: Based on the second weight, the calculated pressure value, and the estimated pressure value, obtain the pressure covariance:

[0211] (29)

[0212] in, This represents the pressure covariance.

[0213] Step 8: Based on the first weight, the sampling point flow rate, the estimated flow rate, the calculated pressure value, and the estimated pressure value, obtain the flow rate-pressure covariance:

[0214] (30)

[0215] in, This represents the flow pressure covariance.

[0216] Step 9: Calculate the gain matrix based on the flow-pressure covariance and the pressure covariance.

[0217] (31)

[0218] in, Represents the gain matrix. This represents the inverse matrix of the pressure covariance.

[0219] Step 10: Using the flow rate estimate, gain matrix, first target pressure, and pressure estimate, calculate the second target flow rate corresponding to the compressor.

[0220] (32)

[0221] in, This indicates the second target flow rate corresponding to the compressor. This indicates the first target pressure corresponding to the compressor outlet node.

[0222] Step 11: Calculate the flow covariance at the k-th iteration based on the gain matrix, flow covariance, and pressure covariance. :

[0223] (33)

[0224] Steps 1 to 9 above belong to the prediction process, while steps 10 and 11 belong to the update process.

[0225] Based on the above embodiments, a target natural gas station model is established and coupled with a target pipeline model. A transient simulation of the pipeline network is performed on the target natural gas station model to obtain the boundary flow rate, boundary pressure, and gas density of the target natural gas station model (Equations 6, 7, and 8). Based on the boundary flow rate, boundary pressure, and gas density, through quasi-steady-state calculations of the station, the pressure changes of station nodes over time, the flow rate changes of equipment over time (Equations 9 to 16), and the compressor power can also be calculated (Equation 18). This helps users understand the station node pressure, station node flow rate, equipment flow rate, compressor power, and gas flow direction within the station, facilitating real-time monitoring of gas flow status within the station. Using the UKF algorithm, the compressor flow rate data is corrected using the actually measured first target pressure (Equations 19 to 33), which can correct errors caused by equipment aging and environmental noise. The compressor flow rate data can be updated in real-time and online along with the pressure data.

[0226] In a specific scenario example Figure 3 This is a flowchart illustrating the quasi-steady-state calculation process at the station. First, the iteration number d=0 is set. Based on the pipeline boundary conditions, the gas density, boundary flow rate, and boundary pressure are obtained and calculated. Then, the flow rates of the regulating valve and compressor are expressed in terms of nodal pressures, using these parameters to construct the flow balance equation. Finally, the throttling residual is calculated. ,calculate The corresponding Jacobian matrix Construct and solve a system of linear equations ,get ;if Less than the preset pressure increment accuracy threshold Then, the equipment power (compressor power) is calculated using the compressor's first target flow rate, and the station iteration ends. If Greater than or equal to the preset pressure increment accuracy threshold ,and Then let d = d + 1, and update the second pressure of the station node. Received updated second pressure reuse Construct and solve a system of linear equations Calculate the value corresponding to d+1 .if d Not satisfied If the iteration fails, the computation will not converge. Less than the preset pressure increment accuracy threshold You can also from Extract the updated pressure difference at the station boundary nodes This is used for calculating pipeline nodes in the next time step.

[0227] In a specific scenario example, pipeline network calculations can be performed as follows: the natural gas pipeline flow equations for the target pipeline model are discretized and solved using the SIMPLE algorithm, quasi-steady-state calculations are performed at the station, and online compressor flow correction is performed based on the UKF algorithm.

[0228] In a specific scenario example Figure 4 This is a schematic diagram of the coupled solution process for the station and pipeline network. First, the calculation time step is determined ( ) and distance step ( In the solution process, the SIMPLE algorithm is used to first provide an assumed pipeline node pressure field at any round of pipeline iteration (pipeline iteration is also known as off-site iteration) solution. (m represents the number of off-site iterations), substituting these values ​​into the discrete equation of the pipeline momentum equation yields the corresponding velocity field. Substituting the velocity field into the discrete equation of the pipeline mass equation, we obtain the corrected pressure increment at the pipeline nodes. If the assumed pressure field does not converge, and does not satisfy... ( (Indicates the preset pipeline iteration accuracy threshold), and updates the pipeline node pressure field, letting The gas flow velocity is recalculated using the updated pressure field, and a new round of solutions is performed. If the assumed pressure field converges and satisfies... Then, the pressure and flow rate at the pipeline nodes are used to solve for the station pressure difference. Finally, the first target pressure corresponding to the compressor outlet node is used for online model correction, and the first target flow rate corresponding to the compressor is corrected to obtain the second target flow rate corresponding to the compressor. It is then checked whether the time t is greater than the preset calculation time threshold totalTime. If t is less than or equal to totalTime, the pipeline boundary conditions are updated. If t is greater than totalTime, then the calculation stops.

[0229] In a specific scenario example, with Figure 2 Taking the target natural gas station model and target pipeline model as examples, the calculation is performed. The pressure at the pipeline inlet node is 9 MPa and the pipeline outlet user flow rate is 320 kg / s. Under this condition, a quasi-steady-state calculation is performed, and then the compressor speed is adjusted, with the speed increasing linearly by 1200 rpm. Figure 5 This represents the pressure curves corresponding to different station nodes. Figure 6 This represents the flow rate curves corresponding to different devices. Figure 7 This represents the pressure curve corresponding to the pipeline. Figure 8 The inlet and outlet flow velocity curves represent the target natural gas station model. The inlet flow velocity is the flow velocity at the inlet node A2 of the target natural gas station model, and the outlet flow velocity is the flow velocity at the outlet node A3 of the target natural gas station model. Figure 9 This represents the pressure measurement curves at the compressor's inlet and outlet nodes. Figure 10 This indicates the flow rate curves before and after compressor correction. The flow rate can be corrected in real time based on pressure measurements before and after changes in operating conditions. Figure 13 The curve represents the change in compressor power of compressor C1 over time.

[0230] Based on the above-described method for calculating the hydraulic parameters of natural gas stations, this specification also provides an embodiment of a device for calculating the hydraulic parameters of natural gas stations, see reference. Figure 11 As shown, the calculation device for the hydraulic parameters of the natural gas station specifically includes the following modules: construction module 1101, determination module 1102, first calculation module 1103, second calculation module 1104, third calculation module 1105, and correction module 1106.

[0231] The construction module 1101 is used to acquire the structural parameters of the target natural gas station and the target pipeline; and to construct a target natural gas station model based on the structural parameters of the target natural gas station; and to construct a target pipeline model based on the structural parameters of the target pipeline. The target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves. The station nodes include internal station nodes and station boundary nodes. The internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes. The target pipeline model includes multiple pipeline nodes. The pipeline nodes include pipeline boundary nodes and pipeline internal nodes. The target natural gas station model and the target pipeline model are connected through the station boundary nodes.

[0232] The determining module 1102 is used to determine the first target pressure corresponding to the compressor outlet node and to determine the pipeline boundary conditions corresponding to the pipeline boundary node.

[0233] The first calculation module 1103 is used to calculate the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary node based on the pipeline boundary conditions.

[0234] The second calculation module 1104 is used to determine the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node based on the gas density, the boundary flow rate, and the boundary pressure.

[0235] The third calculation module 1105 is used to calculate the compressor power based on the first target flow rate corresponding to the compressor;

[0236] The correction module 1106 is used to correct the first target flow rate of the compressor by using the first target pressure corresponding to the compressor outlet node, so as to obtain the second target flow rate of the compressor.

[0237] In some embodiments, the first calculation module 1103 is specifically used to construct the natural gas pipeline flow equation corresponding to the target pipeline model; and to solve the natural gas pipeline flow equation after discretization based on the pipeline boundary conditions to obtain the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes.

[0238] In some embodiments, the second calculation module 1104 is specifically used to solve the compressor flow-pressure equation and the regulating valve flow-pressure equation for the current cycle based on the gas density, the boundary flow rate, and the boundary pressure, to obtain the first flow rate corresponding to the compressor and the first flow rate corresponding to the regulating valve for the current cycle; construct the flow rate change equation for the current cycle based on the first flow rate corresponding to the compressor, the first flow rate corresponding to the regulating valve, and the second pressure corresponding to the station node for the current cycle; solve the flow rate change equation for the current cycle to obtain the pressure increment of the station node for the current cycle; detect whether the pressure increment of the station node for the current cycle is less than a preset pressure increment accuracy threshold; if it is determined that the pressure increment of the station node for the current cycle is less than the preset pressure increment accuracy threshold, take the first flow rate corresponding to the compressor for the current cycle as the first target flow rate corresponding to the compressor; take the first flow rate corresponding to the regulating valve for the current cycle as the first target flow rate corresponding to the regulating valve; and take the second pressure corresponding to the station node for the current cycle as the second target pressure corresponding to the station node.

[0239] In some embodiments, the second calculation module 1104 is specifically configured to: calculate the second pressure corresponding to the next round station node based on the pressure increment of the current round station node when the pressure increment of the current round station node is greater than or equal to a preset pressure increment accuracy threshold; calculate the first flow rate corresponding to the next round compressor and the first flow rate corresponding to the next round regulating valve based on the second pressure corresponding to the next round station node; reconstruct and solve the flow change equation based on the second pressure corresponding to the next round station node, the first flow rate corresponding to the next round compressor, and the first flow rate corresponding to the next round regulating valve to obtain the pressure increment of the next round station node; detect whether the pressure increment of the next round station node is less than a preset pressure increment accuracy threshold; if the pressure increment of the next round is less than the preset pressure increment accuracy threshold, use the first flow rate corresponding to the next round compressor as the first target flow rate corresponding to the compressor; use the first flow rate corresponding to the next round regulating valve as the first target flow rate corresponding to the regulating valve; and use the second pressure corresponding to the next round station node as the second target pressure corresponding to the station node.

[0240] In some embodiments, the third calculation module is specifically used to calculate the compressor power according to the following formula:

[0241] (34)

[0242] In some embodiments, the correction module 1106 is specifically configured to: determine the sampling point flow rate corresponding to the sampling point based on the first target flow rate corresponding to the compressor; calculate the pressure calculation value corresponding to the sampling point based on the sampling point flow rate; calculate the gain matrix corresponding to the sampling point based on the sampling point flow rate and the pressure calculation value; and obtain the second target flow rate corresponding to the compressor based on the pressure estimate, the gain matrix, and the first target pressure corresponding to the compressor outlet node.

[0243] It should be noted that the units, devices, or modules described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. For ease of description, the above devices are described by dividing them into various modules according to their functions. Of course, in implementing this specification, the functions of each module can be implemented in one or more software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection between the devices or units shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0244] This specification also provides a computer storage medium for a method of calculating hydraulic parameters of a natural gas station. The computer storage medium stores computer program instructions, which, when executed by a processor, implement the following: obtaining structural parameters of a target natural gas station and structural parameters of a target pipeline; constructing a target natural gas station model based on the structural parameters of the target natural gas station; and constructing a target pipeline model based on the structural parameters of the target pipeline. The target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves. The station nodes include internal station nodes and station boundary nodes. The internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes. The target pipeline model includes multiple pipeline nodes; each pipeline node includes a pipe... The system includes: boundary nodes and internal nodes of the pipeline; the target natural gas station model and the target pipeline model are connected through the station boundary nodes; the first target pressure corresponding to the compressor outlet node is determined; and the pipeline boundary conditions corresponding to the pipeline boundary nodes are determined; based on the pipeline boundary conditions, the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes are calculated; based on the gas density, the boundary flow rate, and the boundary pressure, the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node are determined; based on the first target flow rate corresponding to the compressor, the compressor power is calculated; using the first target pressure corresponding to the compressor outlet node, the first target flow rate corresponding to the compressor is corrected to obtain the second target flow rate corresponding to the compressor.

[0245] In this embodiment, the storage medium includes, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), Cache, Hard Disk Drive (HDD), or Memory Card. The memory can be used to store computer program instructions. The network communication unit can be an interface configured according to standards specified in the communication protocol for network connection communication.

[0246] In this embodiment, the specific functions and effects implemented by the program instructions stored in the computer storage medium can be explained in comparison with other implementation methods, and will not be repeated here.

[0247] This specification also provides a server, including a processor and a memory for storing processor-executable instructions. In a specific implementation, the processor can perform the following steps according to the instructions: obtaining structural parameters of a target natural gas station and structural parameters of a target pipeline; constructing a target natural gas station model based on the structural parameters of the target natural gas station; and constructing a target pipeline model based on the structural parameters of the target pipeline. The target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves. The station nodes include internal station nodes and station boundary nodes. The internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes. The target pipeline model includes multiple pipeline nodes. The pipeline nodes include pipeline boundary nodes and pipe... The target natural gas station model and the target pipeline model are connected through the station boundary nodes; the first target pressure corresponding to the compressor outlet node is determined; and the pipeline boundary conditions corresponding to the pipeline boundary nodes are determined; based on the pipeline boundary conditions, the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes are calculated; based on the gas density, the boundary flow rate, and the boundary pressure, the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node are determined; based on the first target flow rate corresponding to the compressor, the compressor power is calculated; using the first target pressure corresponding to the compressor outlet node, the first target flow rate corresponding to the compressor is corrected to obtain the second target flow rate corresponding to the compressor.

[0248] To execute the above instructions more accurately, please refer to... Figure 12 As shown in the embodiments of this specification, another specific server is also provided, wherein the server includes a network communication port 1201, a processor 1202 and a memory 1203, and the above structures are connected by internal cables so that the various structures can perform specific data interaction.

[0249] Specifically, the network communication port 1201 can be used to obtain the structural parameters of the target natural gas station and the structural parameters of the target pipeline.

[0250] The processor 1202 is specifically configured to construct a target natural gas station model based on the structural parameters of the target natural gas station; and to construct a target pipeline model based on the structural parameters of the target pipeline. The target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves. The station nodes include internal station nodes and station boundary nodes. The internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes. The target pipeline model includes multiple pipeline nodes. The pipeline nodes include pipeline boundary nodes and pipeline internal nodes. The target natural gas station model and the target pipeline model are connected via the station boundary nodes. The process involves: connecting the compressor outlet node; determining the first target pressure corresponding to the compressor outlet node; determining the pipeline boundary conditions corresponding to the pipeline boundary node; calculating the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary node based on the pipeline boundary conditions; determining the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node based on the gas density, the boundary flow rate, and the boundary pressure; calculating the compressor power based on the first target flow rate corresponding to the compressor; and correcting the first target flow rate corresponding to the compressor using the first target pressure corresponding to the compressor outlet node to obtain the second target flow rate corresponding to the compressor.

[0251] The memory 1203 can be used to store the corresponding instruction program.

[0252] In this embodiment, the network communication port 1201 can be a virtual port bound to different communication protocols, thereby enabling the sending or receiving of different data. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. Furthermore, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM or CDMA; it can also be a Wi-Fi chip; or it can be a Bluetooth chip.

[0253] In this embodiment, the processor 1202 can be implemented in any suitable manner. For example, the processor can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc. This specification is not limiting.

[0254] In this embodiment, the memory 1203 may include multiple layers. In a digital system, anything that can store binary data can be a memory. In an integrated circuit, a circuit with storage function but no physical form is also called a memory, such as RAM, FIFO, etc. In a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.

[0255] While this specification provides the steps of operation for the methods described in the embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or client product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded. The terms "first," "second," etc., are used to denote names and do not indicate any particular order.

[0256] Those skilled in the art will also know that, besides implementing the controller using purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller function as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices within it used to implement various functions can also be considered structures within that hardware component. Alternatively, the devices used to implement various functions can be considered as both software modules implementing the method and structures within a hardware component.

[0257] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0258] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this specification can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of this specification can essentially be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments of this specification.

[0259] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. This specification can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices, etc.

[0260] Although this specification has been described by way of examples, those skilled in the art will recognize that many variations and modifications are possible without departing from the spirit of this specification, and it is intended that the appended claims cover such variations and modifications without departing from the spirit of this specification.

Claims

1. A method for calculating hydraulic parameters of a natural gas station, characterized in that, include: Obtain the structural parameters of the target natural gas station and the target pipeline; And based on the structural parameters of the target natural gas station, a model of the target natural gas station is constructed; And based on the structural parameters of the target pipeline, a target pipeline model is constructed; The target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves; the station nodes include internal station nodes and station boundary nodes; the internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes; the target pipeline model includes multiple pipeline nodes; the pipeline nodes include pipeline boundary nodes and pipeline internal nodes; the target natural gas station model and the target pipeline model are connected through the station boundary nodes; Determine the first target pressure corresponding to the compressor outlet node; and determine the pipeline boundary conditions corresponding to the pipeline boundary node; Based on the pipeline boundary conditions, calculate the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes; Based on the gas density, the boundary flow rate, and the boundary pressure, determine the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node; Calculate the compressor power based on the first target flow rate corresponding to the compressor; By using the first target pressure corresponding to the compressor outlet node, the first target flow rate corresponding to the compressor is corrected to obtain the second target flow rate corresponding to the compressor.

2. The method according to claim 1, characterized in that, Based on the pipeline boundary conditions, calculate the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes, including: Construct the natural gas pipeline flow equations corresponding to the target pipeline model; Based on the pipeline boundary conditions, the natural gas pipeline flow equation is discretized and then solved to obtain the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary nodes.

3. The method according to claim 1, characterized in that, Based on the gas density, the boundary flow rate, and the boundary pressure, determine the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node, including: Based on the gas density, the boundary flow rate, and the boundary pressure, solve the compressor flow-pressure equation and the control valve flow-pressure equation for the current cycle to obtain the first flow rate corresponding to the compressor and the first flow rate corresponding to the control valve for the current cycle. Based on the first flow rate corresponding to the compressor in the current cycle, the first flow rate corresponding to the regulating valve in the current cycle, and the second pressure corresponding to the station node in the current cycle, construct the flow rate change equation for the current cycle. Solve the flow rate change equation for the current cycle to obtain the pressure increment of the station nodes in the current cycle; Detect whether the pressure increment of the current station node is less than the preset pressure increment accuracy threshold; If the pressure increment of the current cycle station node is less than the preset pressure increment accuracy threshold, the first flow rate corresponding to the compressor in the current cycle is taken as the first target flow rate corresponding to the compressor; the first flow rate corresponding to the regulating valve in the current cycle is taken as the first target flow rate corresponding to the regulating valve; and the second pressure corresponding to the station node in the current cycle is taken as the second target pressure corresponding to the station node.

4. The method according to claim 3, characterized in that, After detecting whether the pressure increment of the current station node is less than a preset pressure increment accuracy threshold, the method further includes: If the pressure increment of the current round station node is greater than or equal to the preset pressure increment accuracy threshold, the second pressure corresponding to the station node in the next round is calculated based on the pressure increment of the current round station node. Based on the second pressure corresponding to the next station node, calculate the first flow rate corresponding to the compressor in the next round and the first flow rate corresponding to the regulating valve in the next round; Based on the second pressure corresponding to the next station node, the first flow rate corresponding to the next compressor, and the first flow rate corresponding to the next regulating valve, the flow rate change equation is reconstructed and solved to obtain the pressure increment of the next station node; Detect whether the pressure increment of the next station node is less than the preset pressure increment accuracy threshold. If the pressure increment in the next round is determined to be less than the preset pressure increment accuracy threshold, the first flow rate corresponding to the compressor in the next round is taken as the first target flow rate corresponding to the compressor; the first flow rate corresponding to the regulating valve in the next round is taken as the first target flow rate corresponding to the regulating valve; and the second pressure corresponding to the station node in the next round is taken as the second target pressure corresponding to the station node.

5. The method according to claim 3, characterized in that, Based on the first flow rate corresponding to the compressor in the current cycle, the first flow rate corresponding to the regulating valve in the current cycle, and the second pressure corresponding to the station node in the current cycle, construct the flow rate change equation for the current cycle, including: Based on the first flow rate corresponding to the compressor in the current cycle and the first flow rate corresponding to the regulating valve in the current cycle, construct the node flow balance equation for the current cycle; Based on the second pressure corresponding to the station node in the current round, calculate the Jacobi matrix corresponding to the node flow balance equation in the current round; Based on the current round node flow balance equation and the corresponding Jacobi matrix, the flow change equation for the current round is obtained.

6. The method according to claim 3, characterized in that, The method further includes: If the pressure increment of the station node in the current round is less than the preset pressure increment accuracy threshold, the updated pressure difference corresponding to the station boundary node is extracted from the second target pressure. Based on the updated pressure difference corresponding to the station boundary node and the pipeline boundary conditions of the next time step, calculate the boundary flow and boundary pressure corresponding to the station boundary node of the next time step.

7. The method according to claim 1, characterized in that, Calculate the compressor power based on the first target flow rate corresponding to the compressor, including: Calculate the compressor power using the following formula: in, Indicates compressor power. This represents the first target flow rate corresponding to the compressor, and g represents the acceleration due to gravity. Indicates a versatile energy head. This indicates the compressor efficiency.

8. The method according to claim 1, characterized in that, Using the first target pressure corresponding to the compressor outlet node, the first target flow rate corresponding to the compressor is corrected to obtain the second target flow rate corresponding to the compressor, including: The sampling point flow rate corresponding to the sampling point is determined based on the first target flow rate corresponding to the compressor. Calculate the pressure value corresponding to the sampling point based on the flow rate at the sampling point; Based on the flow rate at the sampling point and the calculated pressure value, calculate the gain matrix corresponding to the sampling point; based on the calculated pressure value, obtain the pressure estimate. The second target flow rate corresponding to the compressor is obtained based on the pressure estimate, the gain matrix, and the first target pressure corresponding to the compressor outlet node.

9. A device for calculating hydraulic parameters of a natural gas station, characterized in that, include: The module is used to obtain the structural parameters of the target natural gas station and the target pipeline; Based on the structural parameters of the target natural gas station, a model of the target natural gas station is constructed; and based on the structural parameters of the target pipeline, a model of the target pipeline is constructed. The target natural gas station model includes multiple station nodes, multiple compressors, and multiple regulating valves; the station nodes include internal station nodes and station boundary nodes; the internal station nodes include: compressor inlet nodes, compressor outlet nodes, regulating valve inlet nodes, and regulating valve outlet nodes; the target pipeline model includes multiple pipeline nodes; the pipeline nodes include pipeline boundary nodes and pipeline internal nodes; the target natural gas station model and the target pipeline model are connected through the station boundary nodes; The determination module is used to determine the first target pressure corresponding to the compressor outlet node and the pipeline boundary conditions corresponding to the pipeline boundary node. The first calculation module is used to calculate the gas density, boundary flow rate, and boundary pressure corresponding to the station boundary node based on the pipeline boundary conditions. The second calculation module is used to determine the first target flow rate corresponding to the compressor, the first target flow rate corresponding to the regulating valve, and the second target pressure corresponding to the station node based on the gas density, the boundary flow rate, and the boundary pressure. The third calculation module is used to calculate the compressor power based on the first target flow rate corresponding to the compressor; The correction module is used to correct the first target flow rate of the compressor by using the first target pressure corresponding to the compressor outlet node, so as to obtain the second target flow rate of the compressor.

10. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Pipe network system dynamic and online simulation modeling method for parallel computing

    CN111428320A

  • Natural gas pipeline operation optimization method under carbon neutralization target

    CN113642184A