Analysis method, device, electronic equipment and storage medium for natural gas transmission system
By constructing a hybrid integer nonlinear planning optimization model and using linear iterative solution method, the problem of low solution efficiency of natural gas transmission model is solved, and efficient natural gas transmission system analysis is realized, suitable for large-scale data scenarios, and operating costs are reduced.
Patent Information
- Application Number
- CN202411835845.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the solution efficiency of natural gas gas transmission model is low and cannot adapt to complex application scenarios of large-scale data.
By constructing a hybrid integer nonlinear planning optimization model that takes into account pipeline flow, flow direction, station site pressure and compressed gas station start and stop decision, and using a linear iteration-based solution method to improve the analytical efficiency of the natural gas gas transmission system.
This method significantly improves the solution time, is suitable for large-scale data application scenarios, and iteratively converges under the increasing nonlinear constraints, helps to find a more economical gas transmission solution, and reduces the cost of pipeline transmission and compressed gas station power.
Smart Images

Figure CN119761246A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of logistics and transportation technology, and in particular to an analysis method, device, electronic equipment and storage medium for a natural gas transmission system. Background Art
[0002] In the field of natural gas, the steady-state operation of natural gas pipelines is often solved using simulation software. Commonly used natural gas simulation software includes: PIPESIM, TGNET, etc. The calculation process of natural gas steady-state simulation usually includes several key steps: first, by establishing a mathematical model of the system to describe the flow characteristics of natural gas and the physical parameters of the system; second, collect and input relevant initial conditions, such as flow, pressure and temperature; then, use numerical methods (such as finite element method or finite difference method) to solve the model to obtain parameters such as natural gas flow distribution, pressure loss and temperature change in the system under steady state.
[0003] However, steady-state natural gas simulation technology focuses on the analysis and understanding of the static characteristics of the system. The simulation results are highly dependent on the input boundary conditions. Different inputs will lead to different results and the time cost is high. For complex systems, steady-state simulation may require a lot of computing resources and time. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for analyzing a natural gas transmission system, which solve the problems in the prior art of low efficiency in solving the natural gas transmission model and inability to adapt to complex application scenarios of large-scale data.
[0005] On the one hand, an embodiment of the present application provides a method for analyzing a natural gas transmission system, the method comprising:
[0006] Constructing the first gas transmission model corresponding to the natural gas transmission system; wherein the first gas transmission model includes a station model, a pipeline model and a compressor station model, and the compressor station model considers the coupling relationship between the start and stop variables of the compressor station and the inlet and outlet pressures of the natural gas;
[0007] Determine the initial flow rate and initial pressure value of the gas transported by the first gas transmission model;
[0008] Based on the initial flow rate and the initial pressure value, the constraint function in the first gas transmission model is linearly transformed to obtain the second gas transmission model; wherein the constraint function includes a hydraulic nonlinear constraint and a compressor power calculation nonlinear constraint, and the hydraulic nonlinear constraint is constructed based on the pressure reduction amount of the pressure reducing valve in the pipeline;
[0009] The natural gas transmission system is analyzed based on the second gas transmission model to obtain key operating parameter values corresponding to the natural gas transmission system.
[0010] On the one hand, an embodiment of the present application provides an analysis device for a natural gas transmission system, the device comprising:
[0011] Constructing a model for constructing a first gas transmission model corresponding to the natural gas transmission system; wherein the first gas transmission model includes a station model, a pipeline model and a compressor station model, and the compressor station model considers the coupling relationship between the start and stop variables of the compressor station and the inlet and outlet pressures of the natural gas;
[0012] Determine a model, used to determine the initial flow rate and initial pressure value of the gas transported by the first gas transmission model;
[0013] A conversion model is used to linearly convert the constraint function in the first gas transmission model based on the initial flow rate and the initial pressure value to obtain the second gas transmission model; wherein the constraint function includes a hydraulic nonlinear constraint and a compressor power calculation nonlinear constraint, and the hydraulic nonlinear constraint is constructed based on the pressure reduction amount of the pressure reducing valve in the pipeline;
[0014] The analysis model is used to analyze the natural gas transmission system based on the second gas transmission model to obtain key operating parameter values corresponding to the natural gas transmission system.
[0015] In one possible embodiment, a model is constructed for:
[0016] The station model is constructed based on the flow intervals of the gas upload and download at the station, and the balance relationship between the gas inflow and outflow at the battlefield;
[0017] Construct a pipeline model based on the absolute gas flow, gas flow direction, flow limit and hydraulic nonlinear constraints of each pipeline segment; and
[0018] A compressor station model is constructed based on the gas volume of the compressor station, the pressure and start-stop management of the compressor station, and the compressor power limitation.
[0019] In one possible embodiment, the determination model is used to:
[0020] Based on the pipeline transportation cost, ignoring the pressure value of the first gas transmission model, the flow rate and flow direction of the natural gas in the pipeline are calculated to obtain the initial flow rate; and
[0021] Based on the hydraulic parameters of the model, the squared pressure values corresponding to the gas input pressure and output pressure of the station are obtained; wherein the hydraulic parameters represent the physical relationship between pressure drop and flow rate;
[0022] Take the square root of the square of the pressure to get the initial pressure value.
[0023] In one possible embodiment, the conversion model is used to:
[0024] Based on the initial flow rate and initial pressure values, a first-order Taylor expansion corresponding to the constraint function is created;
[0025] Perform linear processing on the nonlinear terms in the first-order Taylor expansion to obtain a linear expansion;
[0026] Based on the linear expansion, the first gas transmission model is adjusted, and a penalty model is added to the objective function of the first gas transmission model to obtain a second gas transmission model; wherein the objective function is used to optimize the cost, and the penalty model is used to minimize the violation degree of nonlinear constraints.
[0027] In one possible embodiment, the analytical model is used to:
[0028] Solving the second gas transmission model, obtaining the gas pressure value, gas flow rate, gas flow direction, compressor switch and pressure reducing valve value corresponding to the second gas transmission model;
[0029] The gas pressure value, gas flow rate, gas flow direction, compressor switch and pressure reducing valve value are taken as the key operating parameter values corresponding to the natural gas transmission system.
[0030] In a possible embodiment, the device further includes:
[0031] An evaluation module, used for performing trust region evaluation on key operating parameters to obtain evaluation results;
[0032] A judgment module is used to judge whether the evaluation results meet the preset requirements;
[0033] The update module is used to take the key operating parameters as the final analysis results if the evaluation results meet the preset requirements; if the evaluation results do not meet the preset requirements, the initial flow and initial pressure values are updated, and the key operating parameters are updated based on the updated results.
[0034] On the one hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes any of the above-mentioned analysis methods for the natural gas transmission system.
[0035] On the one hand, the present application provides a computer-readable storage medium, which includes a program code. When the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute any of the above-mentioned analysis methods for a natural gas transmission system.
[0036] On the one hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; when a processor of an electronic device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the electronic device executes any of the above-mentioned natural gas transmission system analysis methods.
[0037] The beneficial effects of this application are as follows:
[0038] The analysis method of the natural gas transmission system provided in this application establishes a mixed integer nonlinear programming optimization model that takes into account pipeline flow, flow direction, station pressure, and compressor station start and stop decisions for the steady-state operation scenario of the natural gas pipeline system, and proposes a solution method based on linearization iteration. It is suitable for application scenarios with large-scale data and helps natural gas transmission planning to find more economical transmission plans.
[0039] Compared with manually setting and adjusting these decision variables, the technical solutions in this application have excellent performance in solution time. Moreover, for application scenarios where the increase in nonlinear constraints leads to an increase in the number of iterations, the algorithm iteration can also converge. In terms of pipeline transportation costs, the gas transmission model constructed in this application changes the flow rate of the pipeline section through pressure adjustment, resulting in a decrease in the overall turnover, thereby reducing the pipeline transportation costs; in terms of power, starting from the lowest energy consumption cost, the overall compressor station power of the pipeline system is reduced, and the effect is more significant for natural gas transmission systems with a total pipeline length, flow rate, and multiple compressor stations.
[0040] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0042] Figure 1 This is a schematic diagram of an application scenario in an embodiment of the present application;
[0043] Figure 2 This is a flowchart of an analysis method for a natural gas transmission system in an embodiment of the present application;
[0044] Figure 3 This is a schematic diagram of the structure of an analysis device for a natural gas transmission system in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of the hardware structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0047] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0048] The following is a brief introduction to the design concept of the embodiment of the present application:
[0049] In the field of natural gas, the solution of steady-state natural gas pipelines is often carried out using simulation software. Commonly used natural gas simulation software includes: PIPESIM, TGNET, etc. The calculation process of steady-state natural gas simulation usually includes several key steps: first, by establishing a mathematical model of the system, the flow characteristics of natural gas and the physical parameters of the system are described; second, the relevant initial conditions, such as flow, pressure and temperature, are collected and input; then, the model is solved using numerical methods (such as finite element method or finite difference method) to obtain the parameters such as natural gas flow distribution, pressure loss and temperature change of the system in steady state. However, steady-state natural gas simulation technology focuses on the analysis and understanding of the static characteristics of the system. The simulation results are highly dependent on the input boundary conditions. Different inputs will lead to differentiated results and the time cost is high. For complex systems, steady-state simulation may require a lot of computing resources and time.
[0050] In view of this, the embodiment of the present application provides an analysis method, device, electronic device and storage medium for a natural gas transmission system, constructs a first gas transmission model corresponding to the natural gas transmission system; determines the initial flow rate and initial pressure value of the gas transported by the first gas transmission model; based on the initial flow rate and the initial pressure value, linearly transforms the constraint function in the first gas transmission model to obtain a second gas transmission model; analyzes the natural gas transmission system based on the second gas transmission model to obtain the key operating parameter values corresponding to the natural gas transmission system. In this way, the analysis method for the natural gas transmission system provided by the present application establishes a mixed integer nonlinear programming optimization model that considers pipeline flow, flow direction, station pressure, and compressor station start-stop decision for the steady-state operation scenario of the natural gas pipeline system, and proposes a solution method based on linear iteration. The method has a fast solution speed and is suitable for application scenarios of large-scale data. Moreover, based on the linear transformation of the gas transmission model, the scheme can also make the algorithm iterative converge when the increase in nonlinear constraints leads to an increase in the number of iterations in the application scenario, helping the natural gas transmission planning to find a more economical gas transmission scheme.
[0051] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0052] like Figure 1 , which is a schematic diagram of an application scenario provided by an embodiment of the present application. In the schematic diagram of the application scenario, a terminal device 101 and a server 102 are included. The terminal device 101 and the server 102 communicate with each other through a communication network.
[0053] The terminal device 101 is an electronic device used by the target object, and the electronic device may be a personal computer, a mobile phone, a tablet computer, a notebook, an e-book reader, a vehicle-mounted terminal, etc. In addition, a client related to the analysis of the natural gas transmission system may be installed on the terminal device 101, and the client may be software (for example, an APP, a browser, etc.), or a web page, a small program, etc. The target object may use the above-mentioned client related to the analysis of the natural gas transmission system through the terminal device 101 to perform operations related to the analysis of the natural gas transmission system.
[0054] The server 102 may be an independent physical server or an edge device 102 in the field of cloud computing. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, cloud functions, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (English name: Content Delivery Network, abbreviated as CDN), as well as big data and artificial intelligence platforms.
[0055] There is no restriction on the number of the terminal devices 101 and / or servers 102 .
[0056] It should be noted that the analysis method of the natural gas transmission system in the embodiment of the present application can be executed by the terminal device 101 or the server 102 alone, or can be executed jointly by the terminal device 101 and the server 102. For example, when executed jointly by the terminal device 101 and the server 102, the terminal device 101 constructs a first gas transmission model corresponding to the natural gas transmission system, the first gas transmission model includes a station model, a pipeline model and a compressor station model, the server 102 calculates the initial flow rate and initial pressure value of the gas transported by the first gas transmission model, and based on the initial flow rate and initial pressure value, linearly transforms the constraint function in the first gas transmission model to obtain a second gas transmission model, analyzes the natural gas transmission system based on the second gas transmission model, and obtains the key operating parameter values corresponding to the natural gas transmission system.
[0057] The following describes the analysis method of the natural gas transmission system provided by the exemplary embodiment of the present application in combination with the above-mentioned application scenarios and with reference to the accompanying drawings. It should be noted that the above-mentioned application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation methods of the present application are not subject to any limitations in this regard.
[0058] refer to Figure 2 , is an implementation flow chart of a natural gas transmission system analysis method provided in an embodiment of the present application. Here, the server is used as the execution subject for introduction. The specific implementation process of the method is as follows:
[0059] S201, constructing a first gas transmission model corresponding to the natural gas transmission system, wherein the first gas transmission model includes a station model, a pipeline model, and a compressor station model;
[0060] S202, determining an initial flow rate and an initial pressure value of the gas transported by the first gas transmission model;
[0061] S203, based on the initial flow rate and the initial pressure value, linearly transform the constraint function in the first gas transmission model to obtain a second gas transmission model;
[0062] S204: Analyze the natural gas transmission system based on the second gas transmission model to obtain key operating parameter values corresponding to the natural gas transmission system.
[0063] In the embodiment of the present application, the analysis of the natural gas transmission system is mainly achieved based on a mathematical model created for the natural gas transmission system. By solving the created mathematical model, the key operating parameters of the natural gas transmission system can be obtained.
[0064] Assume that the natural gas pipeline system consists of stations, pipelines, and compressor stations. To represent the natural gas pipeline system, Represents the set of all stations. For all gas source stations, For all users station collection, It is a collection of gas compressor stations, where the gas source station is used to upload natural gas to the natural gas pipeline system, and the user station is used to download natural gas from the pipeline system. is the set of all pipe segments, It is a collection of pipelines connecting the same head and tail stations (i, j). In this way, the natural gas transmission system can be mathematically defined.
[0065] Based on this, a mathematical model corresponding to the natural gas transmission system is initially created (ie, a first gas transmission model is created), including the creation of a station model, a pipeline model and a compressor station model.
[0066] First, the station model is constructed based on the flow range of the gas upload and download volume of the station, and the balance relationship between the gas inflow and outflow in the battlefield.
[0067] Specifically, for station i, the upper and lower limits of the gas source station and user station are respectively and To indicate the upload amount s i and downloads i The upper and lower bounds of the variables are controlled to satisfy the following constraint formulas (1) to (2).
[0068]
[0069] At each station, according to the law of conservation of mass, the flow rate needs to be in a balanced state. Formula (3) indicates that the upload volume, download volume, inflow volume, and outflow volume of the station satisfy this balance relationship.
[0070]
[0071] Among them, fi,j,n It indicates the flow rate of the pipe segment connected to (i,j) by pipeline n. The units of both upstream and downstream flow rate are 10 6 m 3 / d, that is, trillion cubic meters per day.
[0072] Second, the pipeline model is constructed based on the absolute gas volume, gas flow direction, flow upper limit and hydraulic nonlinear constraints of each pipe section in the pipeline.
[0073] Specifically, pipeline modeling is to constrain the natural gas flow and flow direction in the pipeline. The following constraint formulas (4) to (6) represent the decision settings for the flow in the pipeline section. For a specific pipeline section, use f i,j,n and f j,i,n Represents the forward and reverse flow values of pipeline n segment (i, j). Since there can only be one flow direction, the sum of the two is 0, and the absolute value is defined represents the absolute gas flow rate of the pipe section. Constraint formulas (7) to (10) define the relationship between the forward and reverse flow rates, flow direction, and flow range. Define y i,j,n is the flow direction of pipeline n section (i, j), 1 is forward gas transmission, 0 is reverse gas transmission, where Represents the upper limit of the flow rate of pipeline segment n (i, j).
[0074]
[0075] In addition, pipeline modeling also includes the creation of steady-state constraints. In the pipeline, the physical relationship between pressure drop and flow is a nonlinear non-convex constraint equation, namely a hydraulic constraint. This constraint couples the pressure at the beginning and end of the pipeline section with the flow rate to make it conform to the physical principle of actual natural gas flow. Depending on whether the terminal station of the pipeline section is a compressor station and the flow direction of the pipeline section, this relationship can be expressed as the following constraint formulas (11) to (14). Where p i is the gas pressure at ordinary station i, is the inlet gas pressure of compressor station i, is the outlet gas pressure of compressor station i, the pressure unit is MPa (megapascal), δ i,j,n It is a hydraulic parameter, which is calculated from flow, pressure, gas properties and pipeline properties.
[0076]
[0077] The hydraulic constraint modeling method of constraint formulas (11) to (14) is affected by the station attributes and has highly nonlinear terms of variable multiplication, which is not convenient for linearization. Therefore, for each pipeline n section (i, j), the head and tail pressure variables p are introduced. i,(i,j),n With p j,(i,j),n , the pressure reducing valve pressure reduction at the beginning and end of the pipe section and The new hydraulic constraint formula (15) is obtained, and the constraint formulas (16) to (23) that couple the pressure variables at the head and tail of the pipe section with the station pressure are obtained through the flow direction variable, where M is a large number to ensure that the pressure variables at the end of the pipe section are normally coupled with the station and compressor station pressures.
[0078]
[0079] Third, the gas station model is constructed based on the gas volume of the compressor station, the pressure and start-stop management of the compressor station, and the power limit of the compressor. Considering that the natural gas pipeline system will lose pressure during the gas transmission process, there will also be a compressor station in the system for gas pressurization. The compressor station will bring energy consumption costs, so an accurate description of the compressor station can more truly reflect the actual economic benefits.
[0080] The following constraint formula (24) calculates the amount of gas flowing into the compressor station, constraint formulas (25) to (28) are the pressure coupling constraints of the compressor station, constraint formulas (25) to (26) are the upper and lower limit controls of the compressor station pressure, and constraint formulas (27) to (28) are the inlet and outlet pressure controls of the compressor station. and is the upper and lower limits of the pressure at station i, and ∈ i is the upper and lower limits of the compressor station pressure ratio, y i is the start and stop variable of the compressor station, 1 is on, 0 is off, and M is a larger number to ensure the normal coupling between the start and stop of the compressor station and the inlet and outlet pressures.
[0081]
[0082] Constraint formula (29) is the compressor shaft power calculation constraint, which is also a nonlinear constraint. Constraint formula (30) is the compressor power limit.
[0083]
[0084] Among them, w i is the compressor power of the compressor station, in units of 10 6 Watt, that is, megawatt; q i This is the amount of natural gas that needs to be pressurized at the compressor station. Since using flow direction and flow rate statistics to calculate this value will result in nonlinear terms that are difficult to solve, this value is updated during the iteration process.
[0085] Through the above process, the site model, pipeline model and compressor station model in the first gas transmission model can be built. In order to analyze the natural gas transmission system, it is also necessary to create a corresponding objective function for the first gas transmission model. The objective function provides a basis for the analysis of the model. By analyzing the properties of the objective function, appropriate mathematical methods and algorithms can be selected to solve the model.
[0086] In the implementation of this application, the objective function is used to optimize the cost C, as shown in the following formula (31), and the cost includes two parts: pipeline transportation cost and compressor station energy consumption cost.
[0087] C=Min obj1+obj2 (31)
[0088] Wherein, obj1 represents the pipeline transportation cost, which is defined as the following formula (32), that is, the total cost of gas transportation in all pipeline sections, in yuan; is the pipeline transportation rate of the geographical location of the pipeline section, in units of RMB / (thousand cubic meters·km); obj2 is the energy consumption cost, defined as the following formula (33), that is, the energy consumption cost of all compressor stations, in units of RMB; is the unit price of energy consumption of the compressor station, in Yuan / kWh. Here, the power is converted into daily energy consumption.
[0089]
[0090] Based on the above formulas (1) to (33), a complete mathematical model corresponding to the natural gas transmission system can be obtained, namely the first gas transmission model. This model belongs to the steady-state operation scenario of the natural gas pipeline system. It is a mixed integer nonlinear programming optimization model that takes into account pipeline flow, flow direction, station pressure, and compressor station start-stop decisions to help analyze the natural gas transmission system.
[0091] After the first gas transmission model is created, step S202 is further performed to determine the initial flow rate and initial pressure value of the gas transmitted by the first gas transmission model, including:
[0092] Based on the pipeline transportation cost, ignoring the pressure value of the first gas transmission model, the flow rate and flow direction of the natural gas in the pipeline are calculated to obtain the initial flow rate; that is, under the condition of the lowest injection cost, by calculating the overall natural gas flow rate and flow direction, the optimal flow rate and flow direction corresponding to constraint formula (32) when there is no pressure consideration are obtained, and this is used as the initial flow rate.
[0093] Furthermore, based on the initial flow rate and the hydraulic parameters of the first gas transmission model, the squared pressure values corresponding to the gas input pressure and output pressure of the station are obtained, wherein the hydraulic parameters characterize the physical relationship between pressure drop and flow rate, and the squared pressure value is further squared to obtain the initial pressure value.
[0094] Among them, the calculation model of the initial pressure value is as follows:
[0095]
[0096] in, and To calculate the hydraulic constraint violation value of the pressure model part using the flow value of model (II) and ensure that the hydraulic violation of the overall initial pressure is as small as possible, these two parameters satisfy the following equations:
[0097]
[0098] in, is the flow value of the optimal flow corresponding to constraint formula (32); is the flow direction constant corresponding to the optimal flow direction of constraint formula (32). In constraint formula (34), establish and For the compressor station, the maximum pressure-rising ratio relationship between the two is considered, and the square value of pressure is used to avoid introducing nonlinear terms in the model. The initial pressure of the station can be obtained by taking the square root.
[0099] Further, step S203 is performed to linearly transform the constraint function in the first gas transmission model based on the initial flow rate and the initial pressure value to obtain a second gas transmission model, including:
[0100] Based on the initial flow rate and initial pressure values, a first-order Taylor expansion corresponding to the constraint function is created; wherein the constraint function includes hydraulic nonlinear constraints and compressor power calculation nonlinear constraints, and the hydraulic nonlinear constraints are constructed based on the pressure reduction amount of the pressure reducing valve in the pipeline.
[0101] The nonlinear terms in the first-order Taylor expansion are linearly processed to obtain a linear expansion.
[0102] For example, when linearizing hydraulic nonlinear constraints, the specific implementation process is:
[0103] First, obtain the hydraulic constraint function h(f i,j,n ,p i ,p j ), specifically:
[0104]
[0105] Then, based on the initial solution The hydraulic constraint function is expanded as follows:
[0106] Finally, based on the hydraulic constraint function expansion, the linearized hydraulic constraint function is obtained as follows:
[0107]
[0108] For another example, when the nonlinear constraints of compressor power calculation are linearized, the specific implementation process is:
[0109] First, obtain the compressor power calculation constraint function Specifically:
[0110]
[0111] Then, in the initial solution Based on this, the compressor power calculation constraint function is expanded as follows:
[0112]
[0113] Finally, the constraint function is calculated based on the compressor power, and the linearized constraint form is obtained as follows:
[0114]
[0115] After obtaining the linear expansion corresponding to the constraint function, it is necessary to further approximate the original nonlinear model based on the linear expansion to adjust the first gas transmission model, and obtain the second gas transmission model by adding a penalty model to the objective function of the first gas transmission model.
[0116] Among them, the objective function is used to optimize the cost, and the penalty model is used to minimize the violation of nonlinear constraints. In the penalty model, the violation of nonlinear constraints needs to be penalized in the objective function to minimize the violation of the constraints.
[0117]
[0118] After obtaining the linearized second gas transmission model corresponding to the natural gas transmission system by the above method, the natural gas transmission system is further analyzed based on the second gas transmission model to obtain key operating parameter values corresponding to the natural gas transmission system, including:
[0119] Solve the second gas transmission model to obtain the gas pressure value, gas flow rate, gas flow direction, compressor switch and pressure reducing valve value corresponding to the second gas transmission model; use the gas pressure value, gas flow rate, gas flow direction, compressor switch and pressure reducing valve value as the key operating parameter values corresponding to the natural gas transmission system; and perform trust region evaluation on the key operating parameters to obtain evaluation results, wherein the evaluation results include trust radius, evaluation ratio, or convergence degree; determine whether the evaluation results meet the preset requirements, including whether the convergence radius meets the preset radius range, whether the evaluation ratio is within the preset ratio range, or whether the convergence degree is within the preset convergence range; if so, use the key operating parameters as the final analysis results; if not, update the initial flow rate and initial pressure values, and further update the key operating parameters based on the updated initial flow rate and initial pressure values.
[0120] Through the above method, the natural gas transmission system can be solved to obtain the key operating parameter values corresponding to the natural gas transmission system.
[0121] In order to illustrate the technical effect of the above technical solution, the following is an example of an actual natural gas transmission system in a certain region. The system includes stations, pipelines, gas source stations, user stations and compressor stations, which can upload and download the supply and demand in the region through their own pipeline topology connections and compressor stations, and realize independent operation. The pipeline and station data in the topology are derived from the actual pipeline network design file, including the pipe diameter, wall thickness, length, design pressure, etc.
[0122] The gas source station and the user station upload and download natural gas according to the principle of total supply and demand balance, that is, the upload volume of each gas source station and the download volume of the user station are fixed values, aiming to optimize and compare the pipeline transportation costs of the system; since the compressor station in the actual pipeline system may contain multiple compressors, but this model considers that each compressor station uses one compressor, therefore, the actual compressor station power is converted to an equal amount to achieve an optimized comparison of the compressor station power. The average load rate can reflect the utilization efficiency of the pipeline, and the comparison of this indicator can also indicate the feasibility of the optimization results in actual operation.
[0123] The model calculation results were compared using TGNET [full name: Pipeline Studio (Tgnet), an industry-leading pipeline management and design software developed by the British ESI (Energy Solutions International)] to simulate the given inlet gas source pressure and outlet user flow. The pressure and flow errors were both within 5%, verifying the feasibility of the model hydraulic calculation.
[0124] The solution efficiency results of two actual scenario examples are shown in Table 1. The model involves continuous variables such as pipeline flow value and station pressure, and 0-1 variables such as pipeline flow direction and compressor station start and stop. Compared with manually setting and adjusting these decision variables, the algorithm performs well in the solution time of the two pipeline systems, both less than 5 seconds. It can be seen from the results that in terms of the maximum single iteration time, since the overall number of iterations is generally small, there will not be a large time bottleneck on the scale of the current example. At the same time, it can be observed that for the area 2 pipeline system with a large number of pipeline sections and compressor stations, the increase in nonlinear constraints brings about an increase in the number of iterations, which ultimately leads to the convergence of the algorithm iterations, which also shows that the numerical model corresponding to the natural gas transmission system of this application plays a role in handling such situations.
[0125] Table 1 Algorithm results
[0126]
[0127] In terms of average load rate, for the regional 1 pipeline network, the model calculation results show that the average load rate has decreased. However, in fact, there are 5 pipeline sections that have not been put into use during the calculation process of the model, and their flow rate is 0. The average load rate of the pipeline sections put into use in the model is 67.09%, which is almost the same as the actual operation result of 68.06%. The model uses pipeline transportation cost and energy consumption as targets, which are reflected as indicators of pipeline transportation cost and total power. Compared with the actual operation, in terms of pipeline transportation cost, the model changes the flow rate of the pipeline section through pressure adjustment, resulting in a decrease in the overall turnover, thereby reducing the pipeline transportation cost. The effectiveness of algorithm optimization can be reflected in both pipeline systems; in terms of power, although the conditions for activating the compressor station are different, the model reduces the compressor station power of the pipeline system as a whole from the perspective of the lowest energy consumption cost, and the effect is more significant for the regional 2 pipeline network system with a longer total pipe length, larger flow rate, and more compressor stations.
[0128] Table 2 Index comparison results
[0129]
[0130] It can be seen that the implementation method of this application is effective and has good universality in natural gas planning problems.
[0131] Combined with the above-mentioned specific application scenarios, it can be seen that the analysis method of the natural gas transmission system provided by this application, for the steady-state operation scenario of the natural gas pipeline system, establishes a mixed integer nonlinear programming optimization model that takes into account pipeline flow, flow direction, station pressure, and compressor station start-stop decision-making, and proposes a solution method based on linear iteration to help natural gas transmission planning find a more economical gas transmission plan. Compared with the manual setting and adjustment of these decision variables, the technical solutions in this application have excellent performance in solution time, all less than 5 seconds. Moreover, for application scenarios where the increase in nonlinear constraints leads to an increase in the number of iterations, the algorithm iteration can also converge. In terms of pipeline transportation costs, the gas transmission model constructed by this application changes the flow of the pipe section through pressure adjustment, resulting in a decrease in the overall turnover, thereby reducing the pipeline transportation costs; in terms of power, starting from the lowest energy consumption cost, the overall compressor station power of the pipeline system is reduced, and for natural gas transmission systems with a total pipe length, flow, and many compressor stations, the effect is more significant.
[0132] Based on the same inventive concept, the embodiment of the present application also provides an analysis device for a natural gas transmission system. Figure 3 As shown, it is a schematic diagram of the structure of an analysis device 300 of a natural gas transmission system, which may include:
[0133] Constructing a model 301, for constructing a first gas transmission model corresponding to the natural gas transmission system; wherein the first gas transmission model includes a station model, a pipeline model and a compressor station model, and the compressor station model considers the coupling relationship between the start and stop variables of the compressor station and the inlet and outlet pressures of the natural gas;
[0134] Determine model 302, used to determine the initial flow rate and initial pressure value of the gas transported by the first gas transmission model;
[0135] A conversion model 303 is used to perform a linear conversion on the constraint function in the first gas transmission model based on the initial flow rate and the initial pressure value to obtain a second gas transmission model; wherein the constraint function includes a hydraulic nonlinear constraint and a compressor power calculation nonlinear constraint, and the hydraulic nonlinear constraint is constructed based on the pressure reduction amount of the pressure reducing valve in the pipeline;
[0136] The analysis model 304 is used to analyze the natural gas transmission system based on the second gas transmission model to obtain key operating parameter values corresponding to the natural gas transmission system.
[0137] In one possible embodiment, the model 301 is constructed to:
[0138] The station model is constructed based on the flow intervals of the gas upload and download at the station, and the balance relationship between the gas inflow and outflow at the battlefield;
[0139] Construct a pipeline model based on the absolute gas flow, gas flow direction, flow limit and hydraulic nonlinear constraints of each pipeline segment; and
[0140] A compressor station model is constructed based on the gas volume of the compressor station, the pressure and start-stop management of the compressor station, and the compressor power limitation.
[0141] In one possible embodiment, the determination model 302 is used to:
[0142] Based on the pipeline transportation cost, ignoring the pressure value of the first gas transmission model, the flow rate and flow direction of the natural gas in the pipeline are calculated to obtain the initial flow rate; and
[0143] Based on the hydraulic parameters of the model, the squared pressure values corresponding to the gas input pressure and output pressure of the station are obtained; wherein the hydraulic parameters represent the physical relationship between pressure drop and flow rate;
[0144] Take the square root of the square of the pressure to get the initial pressure value.
[0145] In a possible embodiment, the conversion model 303 is used to:
[0146] Based on the initial flow rate and initial pressure values, a first-order Taylor expansion corresponding to the constraint function is created;
[0147] Perform linear processing on the nonlinear terms in the first-order Taylor expansion to obtain a linear expansion;
[0148] Based on the linear expansion, the first gas transmission model is adjusted, and a penalty model is added to the objective function of the first gas transmission model to obtain a second gas transmission model; wherein the objective function is used to optimize the cost, and the penalty model is used to minimize the violation degree of nonlinear constraints.
[0149] In one possible embodiment, the analytical model 304 is used to:
[0150] Solving the second gas transmission model, obtaining the gas pressure value, gas flow rate, gas flow direction, compressor switch and pressure reducing valve value corresponding to the second gas transmission model;
[0151] The gas pressure value, gas flow rate, gas flow direction, compressor switch and pressure reducing valve value are taken as the key operating parameter values corresponding to the natural gas transmission system.
[0152] In a possible embodiment, the device further includes:
[0153] An evaluation module, used for performing trust region evaluation on key operating parameters to obtain evaluation results;
[0154] A judgment module is used to judge whether the evaluation results meet the preset requirements;
[0155] The update module is used to take the key operating parameters as the final analysis results if the evaluation results meet the preset requirements; if the evaluation results do not meet the preset requirements, the initial flow and initial pressure values are updated, and the key operating parameters are updated based on the updated results.
[0156] In the embodiment of the present application, the technical effects corresponding to the analysis device of the natural gas transmission system can refer to the above-mentioned analysis method and will not be repeated here.
[0157] In some possible implementations, the analysis device of the natural gas transmission system according to the present application may include at least a processor and a memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the analysis method of the natural gas transmission system according to various exemplary embodiments of the present application described in this specification. For example, the processor may execute the following steps: Figure 2 Follow the steps shown in .
[0158] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the function of the analysis method device of the above-mentioned natural gas transmission system, referring to Figure 4 , the electronic device comprises:
[0159] At least one processor 401, and a memory 402 connected to the at least one processor 401. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. Figure 4 In the example, the processor 401 and the memory 402 are connected via the bus 400. The bus 400 is Figure 4 The connection between other components is shown by bold lines, and is not intended to be limiting. The bus 400 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 401 can also be called a controller, and there is no limitation on the name.
[0160] In the embodiment of the present application, the memory 402 stores instructions that can be executed by at least one processor 401. The at least one processor 401 can execute the analysis method of the natural gas transmission system discussed above by executing the instructions stored in the memory 402. The processor 401 can implement Figure 3 The functions of each module in the device shown.
[0161] Among them, the processor 401 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 402 and calling the data stored in the memory 402, the various functions of the device and process data, the device can be monitored as a whole.
[0162] In one possible design, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0163] The processor 401 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the analysis method of the natural gas transmission system disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0164] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0165] By programming the processor 401, the code corresponding to the analysis method of the natural gas transmission system described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 2 The steps of the analysis method of the natural gas transmission system in the embodiment shown are as follows: How to design and program the processor 401 is a technology well known to those skilled in the art and will not be described in detail here.
[0166] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the analysis method of the natural gas transmission system discussed above.
[0167] In some possible embodiments, various aspects of the analysis method for the natural gas transmission system provided in the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the analysis method for the natural gas transmission system according to various exemplary embodiments of the present application described above in this specification.
[0168] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0169] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0172] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for analyzing a natural gas transmission system, characterized in that: The method comprises: Constructing a first gas transmission model corresponding to the natural gas transmission system; wherein the first gas transmission model includes a station model, a pipeline model and a compressor station model, and the compressor station model considers the coupling relationship between the start and stop variables of the compressor station and the inlet and outlet pressures of the natural gas; Determining an initial flow rate and an initial pressure value of the gas transported by the first gas transmission model; Based on the initial flow rate and the initial pressure value, a constraint function in the first gas transmission model is linearly transformed to obtain a second gas transmission model; wherein the constraint function includes a hydraulic nonlinear constraint and a compressor power calculation nonlinear constraint, and the hydraulic nonlinear constraint is constructed based on the pressure reduction amount of the pressure reducing valve in the pipeline; The natural gas transmission system is analyzed based on the second gas transmission model to obtain key operating parameter values corresponding to the natural gas transmission system.
2. The method according to claim 1, characterized in that: The step of constructing a first gas transmission model corresponding to the natural gas transmission system includes: Constructing the station model based on the flow intervals of the gas upload and download of the station, and the balance relationship between the gas inflow and outflow of the battlefield; Constructing the pipeline model based on the absolute gas flow rate, gas flow direction, flow upper limit and the hydraulic nonlinear constraint of each pipe section in the pipeline; and The compressor station model is constructed based on the gas volume of the compressor station, the pressure and start-stop management of the compressor station, and the compressor power limitation.
3. The method according to claim 1, characterized in that: The step of determining an initial flow rate and an initial pressure value of gas transported by the first gas transmission model includes: Based on the pipeline transportation fee, ignoring the pressure value of the first gas transmission model, calculating the flow rate and flow direction of the natural gas in the pipeline to obtain the initial flow rate; and Based on the hydraulic parameters of the model, the squared pressure values corresponding to the gas input pressure and output pressure of the station are obtained; wherein the hydraulic parameters represent the physical relationship between pressure drop and flow rate; The square root of the square of the pressure value is taken to obtain the initial pressure value.
4. The method according to claim 1, characterized in that: The step of performing a linear transformation on the constraint function in the first gas transmission model based on the initial flow rate and the initial pressure value to obtain a second gas transmission model includes: Based on the initial flow rate and the initial pressure value, creating a first-order Taylor expansion corresponding to the constraint function; Performing linear processing on the nonlinear terms in the first-order Taylor expansion to obtain a linear expansion; Based on the linear expansion, the first gas transmission model is adjusted, and a penalty model is added to the objective function of the first gas transmission model to obtain the second gas transmission model; wherein the objective function is used to optimize the cost, and the penalty model is used to minimize the degree of violation of nonlinear constraints.
5. The method according to claim 1, characterized in that: The analyzing the natural gas transmission system based on the second gas transmission model to obtain key operating parameter values corresponding to the natural gas transmission system includes: Solving the second gas transmission model to obtain the gas pressure value, gas flow rate, gas flow direction, compressor switch and pressure reducing valve value corresponding to the second gas transmission model; The gas pressure value, gas flow rate, gas flow direction, compressor switch and pressure reducing valve value are used as key operating parameter values corresponding to the natural gas transmission system.
6. The method according to claim 1, characterized in that: After analyzing the natural gas transmission system based on the second gas transmission model to obtain key operating parameter values corresponding to the natural gas transmission system, the method further includes: Performing a trust region evaluation on the key operating parameters to obtain an evaluation result; Determine whether the evaluation results meet the preset requirements; If yes, the key operating parameters are used as the final analysis results; If not, the initial flow rate and the initial pressure value are updated, and based on the updated result, the key operating parameters are updated.
7. An analysis device for a natural gas transmission system, characterized in that: The device comprises: A construction module is used to construct a first gas transmission model corresponding to the natural gas transmission system; wherein the first gas transmission model includes a station model, a pipeline model and a compressor station model, and the compressor station model considers the coupling relationship between the start and stop variables of the compressor station and the inlet and outlet pressures of the natural gas; A determination module, used to determine an initial flow rate and an initial pressure value of the gas transported by the first gas transmission model; A conversion module, configured to perform a linear conversion on the constraint function in the first gas transmission model based on the initial flow rate and the initial pressure value to obtain a second gas transmission model; wherein the constraint function includes a hydraulic nonlinear constraint and a compressor power calculation nonlinear constraint; An analysis module is used to analyze the natural gas transmission system based on the second gas transmission model to obtain key operating parameter values corresponding to the natural gas transmission system.
8. The device according to claim 7, characterized in that: The building blocks are used to: Constructing the station model based on the flow intervals of the gas upload and download of the station, and the balance relationship between the gas inflow and outflow of the battlefield; Constructing the pipeline model based on the absolute gas flow rate, gas flow direction, flow upper limit and the hydraulic nonlinear constraint of each pipe section in the pipeline; as well as The compressor station model is constructed based on the gas volume of the compressor station, the pressure and start-stop management of the compressor station, and the compressor power limitation.
9. An electronic device, characterized in that: The device comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes any one of the methods in claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The storage medium comprises a program code, and when the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute any one of the methods of claims 1 to 6.