Flow distribution method and device for natural gas pipeline network under accident conditions

By obtaining the flow demand information and user priority information of the natural gas pipeline network, and constructing a weighted graph model based on the pipeline network parameters and constraints, it solves the problem of ignoring market demand and user importance in the existing technology, and realizes natural gas pipeline network accident engineering. The optimal distribution of flow rate under various conditions improves the reliability of air supply.

CN113222230BActive Publication Date: 2024-09-24CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202110475738.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-29
Publication Date
2024-09-24
Estimated Expiration
2041-04-29

AI Technical Summary

Technical Problem

The current flow distribution method under accident conditions of natural gas pipeline networks ignores the uncertainty of market demand and the importance of users, and does not fully consider hydraulic constraints, resulting in reduced gas supply reliability and inability to effectively guarantee the gas demand of natural gas users.

Method used

By obtaining the flow demand information of the natural gas pipeline network, use the prediction model to calculate the user's gas consumption prediction information and priority information, and combine the pipeline network parameters and constraints to build a weighted graph model to calculate the maximum gas supply and flow distribution plan, taking into account the market Demand fluctuations, user importance and hydraulic constraints.

Benefits of technology

It achieves the optimal distribution of natural gas pipeline network flow under accident conditions, reduces the impact of failure events on gas supply reliability, and maximizes the gas demand of natural gas users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113222230B
    Figure CN113222230B
Patent Text Reader

Abstract

The present invention provides a method and device for distributing flow of a natural gas pipeline network under accident conditions, the method comprising: obtaining flow demand information of the natural gas pipeline network within a preset time period, and obtaining gas consumption forecast information of each demand user by calculating a preset forecast model according to the flow demand information; obtaining priority information of each user by calculating a preset weight according to the flow demand information; constructing a gas supply calculation model of the natural gas pipeline network under accident conditions by using given constraint parameters as constraint conditions of a termed weighted graph; obtaining the maximum gas supply of the natural gas pipeline network under accident conditions by calculating the gas supply calculation model and natural gas pipeline network parameters, and obtaining a flow distribution plan by calculating the maximum gas supply, priority information of each user and gas consumption forecast information of each demand user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of energy management and control, and in particular to a flow distribution method and device for a natural gas pipeline network under accident conditions. Background Art

[0002] With the rapid development of low-carbon economy, the demand for natural gas, as a clean and efficient fossil energy, is showing a trend of rapid growth. At the same time, the proportion of natural gas in the primary energy consumption structure is also increasing year by year. The natural gas pipeline network system is the link between natural gas resources and the market. It is of great significance to improve the gas supply reliability of the natural gas pipeline network system and ensure the gas demand of natural gas users.

[0003] At present, the failure events of the natural gas pipeline network system have seriously affected the supply security of natural gas, reduced the reliability of the gas supply of the natural gas pipeline network system, caused the shortage of natural gas supply to users, and caused serious public safety problems, which has brought serious adverse effects on energy security and public safety. Therefore, it is necessary and urgent to study the flow distribution scheme under the accident conditions of the natural gas pipeline network system, so as to minimize the impact of the failure event on the gas supply reliability of the pipeline network system, so as to maximize the gas demand of natural gas users.

[0004] The existing technology mainly uses graph theory algorithms to determine the flow distribution scheme under accident conditions of natural gas pipeline networks. This technology converts the calculation of gas supply flow of natural gas pipeline systems under different states into the maximum flow problem in graph theory. The specific steps are: by comprehensively considering the upper and lower limits of gas transmission capacity of each section in the pipeline network, the upper limit of gas source intake, the upper and lower limits of user gas consumption, and the node flow balance constraints, a gas supply calculation model for a complex gas transmission network is established, and the impact of unit failure on pipeline gas transmission capacity is coupled to calculate the gas supply of the pipeline network under accident conditions.

[0005] The existing natural gas pipeline network flow allocation method under accident conditions has the following two shortcomings: 1) it ignores the uncertainty of market demand and the impact of user importance on gas supply calculation; 2) it lacks consideration of the hydraulic constraints of the natural gas pipeline network. Summary of the invention

[0006] The purpose of the present invention is to provide a flow distribution method and device for a natural gas pipeline network under accident conditions, so as to fill the gap in the field and overcome the deficiencies and shortcomings of the above-mentioned existing related technologies.

[0007] To achieve the above-mentioned purpose, the flow distribution method of the natural gas pipeline network under accident conditions provided by the present invention specifically includes: obtaining the flow demand information of the natural gas pipeline network within a preset time period, and obtaining the gas consumption forecast information of each demand user through a preset prediction model according to the flow demand information; obtaining the priority information of each user through a preset weight calculation according to the flow demand information; constructing a gas supply calculation model of the natural gas pipeline network under accident conditions by using given constraint parameters as constraint conditions of a termed weighted graph; obtaining the maximum gas supply of the natural gas pipeline network under accident conditions according to the gas supply calculation model and the natural gas pipeline network parameters, and obtaining the flow distribution plan according to the maximum gas supply, the priority information of each user and the gas consumption forecast information of each demand user.

[0008] In the flow distribution method of the natural gas pipeline network under the above-mentioned accident conditions, preferably, obtaining the gas consumption forecast information of each demand user by calculating through a preset forecasting model according to the flow demand information includes: obtaining the gas consumption characteristics and fluctuation characteristics of each gas user according to the flow demand information; matching the preset forecasting model according to the gas consumption characteristics and the fluctuation characteristics, and obtaining the gas consumption forecast information of each demand user according to the forecasting model and the flow demand information.

[0009] In the flow distribution method of the natural gas pipeline network under the above-mentioned accident conditions, preferably, the prediction model includes a time series model, a BP neural network model, a support vector machine model and a logistic regression model; wherein, the gas consumption forecast information is calculated through the time series model for demand users whose gas consumption fluctuation amplitude is less than the first preset threshold; the gas consumption forecast information is calculated through the BP neural network model for demand users whose gas consumption fluctuation amplitude is greater than the first preset threshold and less than the second preset threshold, and the fluctuation characteristics do not conform to the preset regular conditions; the gas consumption forecast information is calculated through the support vector machine model for demand users whose gas consumption fluctuation amplitude is greater than the first preset threshold and less than the second preset threshold, and the fluctuation characteristics conform to the preset regular conditions; the gas consumption forecast information is calculated through the logistic regression model for demand users whose gas consumption fluctuation amplitude is greater than the second preset threshold.

[0010] In the flow distribution method of the natural gas pipeline network under the above-mentioned accident conditions, preferably, obtaining the priority information of each user through preset weight calculation according to the flow demand information includes: obtaining the gas usage type of each demand user according to the flow demand information; obtaining the corresponding weight according to the gas usage type; and obtaining the priority information of each user according to the weight calculation.

[0011] In the above-mentioned method for distributing the flow of the natural gas pipeline network under accident conditions, preferably, obtaining the priority information of each user according to the weight calculation includes: when the user includes multiple gas usage types, obtaining the user priority information by calculating according to the following formula:

[0012]

[0013] In the above formula, is the importance of the i-th demand point on the t-th day, i and t are positive integers; are the demand for different gas usage types on day t; is the weight of different gas usage types.

[0014] In the above-mentioned method for allocating flow of a natural gas pipeline network under accident conditions, preferably, the constraint conditions include pipeline network flow constraint, pipeline network pressure constraint and pipeline network hydraulic constraint.

[0015] In the above-mentioned method for allocating flow of a natural gas pipeline network under accident conditions, preferably, the pipeline network flow constraint comprises:

[0016]

[0017]

[0018] In the above formula, C ij (t) is the pipeline capacity of pipeline (i, j) on day t; E b Represents a collection of bidirectional pipes; y ij (t) is the binary decision variable that controls the flow direction of the bidirectional pipeline at time t; x ij (t) represents the flow from the i-th node to the j-th node at time t; E is the set of all pipelines in the natural gas pipeline network.

[0019] In the above-mentioned flow distribution method of the natural gas pipeline network under accident conditions, preferably, the pipeline network pressure constraint includes pressure constraints of each node of the pipeline network, upstream and downstream pressure constraints of the compressor station, and upstream and downstream pressure constraints of the regulating valve;

[0020] The pressure constraints of each node in the pipeline network include:

[0021] P i,min ≤P i ≤P i,max ;

[0022] The upstream and downstream pressure constraints of the compressor station include:

[0023]

[0024] The upstream and downstream pressure constraints of the regulating valve include:

[0025]

[0026]

[0027] In the above formula, Pi is the pressure of the i-th node; Pi,min and Pi,max are the upper and lower limits of the pressure of the i-th node respectively; are the upstream pressure, downstream pressure, upstream pressure limit and downstream pressure limit of the ith compressor station respectively; are the upstream pressure, downstream pressure, upstream pressure limit and downstream pressure limit of the i-th regulating valve respectively.

[0028] In the above-mentioned flow distribution method of the natural gas pipeline network under accident conditions, preferably, the pipeline network hydraulic constraints include:

[0029]

[0030]

[0031] In the above formula, pi(t) and pj(t) are the pressures of the i-th and j-th nodes at the t-th time, respectively; λ is the hydraulic friction coefficient, Z is the compression factor of natural gas under pipeline transportation conditions; Δ * The relative density of natural gas; T is the gas transmission temperature; K, L are the calculated lengths of the gas pipeline; D is the inner diameter of the gas pipeline; C0 is a constant.

[0032] The present invention also provides a flow distribution device for a natural gas pipeline network under accident conditions, the device comprising: a prediction module, a priority calculation module, a model construction module and an analysis module; the prediction module is used to obtain the flow demand information of the natural gas pipeline network within a preset time period, and obtain the gas consumption forecast information of each demand user through a preset prediction model according to the flow demand information; the priority calculation module is used to obtain the priority information of each user through a preset weight calculation according to the flow demand information; the model construction module is used to construct a gas supply calculation model of the natural gas pipeline network under accident conditions by using given constraint parameters as constraint conditions of a termed weighted graph; the analysis module is used to calculate the maximum gas supply of the natural gas pipeline network under accident conditions according to the gas supply calculation model and the natural gas pipeline network parameters, and obtain the flow distribution plan according to the maximum gas supply, the priority information of each user and the gas consumption forecast information of each demand user.

[0033] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.

[0034] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.

[0035] The beneficial technical effects of the present invention are: comprehensive consideration of market demand volatility, user importance, pipeline network transmission capacity, gas source intake upper limit, user gas consumption upper and lower limits, node flow balance, node pressure constraints and pipeline network hydraulic calculation; making up for the deficiencies of existing natural gas pipeline network flow distribution models and methods under accident conditions. The proposed method obtains historical demand data of each demand point based on the basic data provided on site, and predicts and calculates the market demand and user importance of each demand point during the duration of the accident condition; combined with the pipeline network gas supply calculation model that considers the impact of the market demand side and hydraulic calculation, the optimal distribution of pipeline network flow under accident conditions is achieved, thereby minimizing the impact of failure events on the gas supply reliability of the pipeline network system and maximizing the gas demand of natural gas users. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:

[0037] Figure 1 A flow chart of a method for distributing flow in a natural gas pipeline network under an accident condition provided by an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of a calculation flow of gas consumption prediction information provided by an embodiment of the present invention;

[0039] Figure 3 A method for calculating user priority information provided by an embodiment of the present invention;

[0040] Figure 4 A schematic diagram of piecewise linearization provided by an embodiment of the present invention;

[0041] Figure 5 A schematic diagram of the structure of a flow distribution device for a natural gas pipeline network under an accident condition provided by an embodiment of the present invention;

[0042] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following will describe the implementation methods of the present invention in detail with reference to the accompanying drawings and embodiments, so that the implementation process of how the present invention applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. It should be noted that as long as there is no conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other, and the technical solutions formed are all within the protection scope of the present invention.

[0044] In addition, the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be performed in an order different from that shown here.

[0045] Please refer to Figure 1 As shown, the flow distribution method of the natural gas pipeline network under accident conditions provided by the present invention specifically includes:

[0046] S101 obtains flow demand information of the natural gas pipeline network within a preset time period, and obtains gas consumption forecast information of each demand user through calculation using a preset forecast model according to the flow demand information;

[0047] S102 obtains priority information of each user through preset weight calculation according to the flow demand information; constructs a gas supply calculation model of the natural gas pipeline network under accident conditions by using given constraint parameters as constraint conditions of a weighted graph with terms;

[0048] S103 calculates the maximum gas supply of the natural gas network under accident conditions based on the gas supply calculation model and the natural gas network parameters, and calculates the flow distribution plan based on the maximum gas supply, the priority information of each user and the gas consumption forecast information of each demand user.

[0049] Please refer to Figure 2 As shown, in one embodiment of the present invention, the gas consumption forecast information of each demand user is obtained by calculating the gas consumption forecast information of each demand user through a preset forecast model according to the flow demand information, including:

[0050] S201 obtains the gas usage characteristics and fluctuation characteristics of each gas user according to the flow demand information;

[0051] S202 matches a preset prediction model according to the gas usage characteristics and the fluctuation characteristics, and calculates and obtains gas usage prediction information of each demand user according to the prediction model and the flow demand information.

[0052] Specifically, the prediction model includes a time series model, a BP neural network model, a support vector machine model and a logistic regression model; among them, for demand users whose gas consumption fluctuation amplitude is less than a first preset threshold, the gas consumption prediction information is calculated through the time series model; for demand users whose gas consumption fluctuation amplitude is greater than the first preset threshold and less than the second preset threshold, and whose fluctuation characteristics do not conform to preset regular conditions, the gas consumption prediction information is calculated through the BP neural network model; for demand users whose gas consumption fluctuation amplitude is greater than the first preset threshold and less than the second preset threshold, and whose fluctuation characteristics conform to preset regular conditions, the gas consumption prediction information is calculated through the support vector machine model; and for demand users whose gas consumption fluctuation amplitude is greater than the second preset threshold, the gas consumption prediction information is calculated through the logistic regression model.

[0053] In actual work, the above-mentioned embodiments can predict the market demand during the duration of the accident condition and determine the importance of each demand point (distribution point) through demand-side analysis. Natural gas users are classified according to the purpose of gas use, mainly including four types of gas users, CNG users, power plant users and industrial users. Generally speaking, each distribution point of the natural gas pipeline network contains multiple and various natural gas users. The gas usage characteristics and fluctuation characteristics of each user are different, so different evaluation methods need to be used to predict their market demand. The present invention uses time series method, BP neural network, support vector machine and logistic regression model as four methods for user demand prediction for modeling. The scope of use of each method is shown in Table 1 below.

[0054] Table 1

[0055]

[0056] Please refer to Figure 3 As shown, in one embodiment of the present invention, obtaining the priority information of each user by calculating the preset weight according to the traffic demand information includes:

[0057] S301 obtains the gas usage type of each demand user according to the flow demand information;

[0058] S302 obtains a corresponding weight according to the gas usage type;

[0059] S303 obtains priority information of each user according to the weight calculation.

[0060] The step of obtaining the priority information of each user according to the weight calculation includes: when the user includes multiple gas usage types, the user priority information is obtained by calculating the following formula:

[0061]

[0062] In the above formula, is the importance of the i-th demand point on the t-th day, i and t are positive integers; are the demand for different gas usage types on day t; is the weight of different gas usage types.

[0063] In actual work, users can be classified in advance according to their gas usage purposes. The levels from high to low are urban gas users, CNG users, power plant users and industrial users, which correspond to four levels: fully guaranteed users, users with a small amount of reduction, users with reduction and users with interruption. For distribution points containing multiple and various types of users, their importance can be calculated by the following formula:

[0064]

[0065]

[0066] In the formula, is the importance of the i-th demand point on the t-th day, are the demand of city gas users, CNG users, power plant users and industrial users on day t, is the weight of users at each level. Obviously, the higher the user level, the greater the weight.

[0067] In one embodiment of the present invention, the constraint conditions include pipeline network flow constraint, pipeline network pressure constraint and pipeline network hydraulic constraint.

[0068] The pipe network flow constraints include:

[0069]

[0070]

[0071] In the above formula, C ij (t) is the pipeline capacity of pipeline (i, j) on day t; E b Represents a collection of bidirectional pipes; y ij (t) is the binary decision variable that controls the flow direction of the bidirectional pipeline at time t; x ij (t) represents the flow from the i-th node to the j-th node at time t; E is the set of all pipelines in the natural gas pipeline network.

[0072] The pipeline network pressure constraints include pressure constraints of each node of the pipeline network, upstream and downstream pressure constraints of the compressor station, and upstream and downstream pressure constraints of the regulating valve;

[0073] The pressure constraints of each node in the pipeline network include:

[0074] P i,min ≤P i ≤P i,max ;

[0075] The upstream and downstream pressure constraints of the compressor station include:

[0076]

[0077] The upstream and downstream pressure constraints of the regulating valve include:

[0078]

[0079]

[0080] In the above formula, Pi is the pressure of the i-th node; Pi,min and Pi,max are the upper and lower limits of the pressure of the i-th node respectively; are the upstream pressure, downstream pressure, upstream pressure limit and downstream pressure limit of the ith compressor station respectively; are the upstream pressure, downstream pressure, upstream pressure limit and downstream pressure limit of the i-th regulating valve respectively.

[0081] The pipe network hydraulic constraints include:

[0082]

[0083]

[0084] In the above formula, pi(t) and pj(t) are the pressures of the i-th and j-th nodes at the t-th time, respectively; λ is the hydraulic friction coefficient, Z is the compression factor of natural gas under pipeline transportation conditions; Δ * The relative density of natural gas; T is the gas transmission temperature; K, L are the calculated lengths of the gas pipeline; D is the inner diameter of the gas pipeline; C0 is a constant.

[0085] Specifically, in actual work, for large and complex natural gas pipeline networks, the present invention uses a directed weighted graph, G = (V, E), to characterize the pipeline network, where V represents a set of nodes in the graph, including gas source points, stations and demand points, and E represents arcs in the graph, that is, a set of natural gas pipelines. In the natural gas pipeline network system, gas sources, gas storage facilities, and LNG receiving stations are regarded as source nodes (Source), each demand point is regarded as a sink node (Sink), the compressor station is regarded as a general node, and the natural gas pipeline is regarded as a network arc containing pipeline capacity constraints. Usually, the natural gas pipeline network system contains multiple source nodes S = {s1, s2, ..., s m} and sink node D = {d1, d2, ..., d n}, and theoretically all the traffic from the source nodes can be delivered to each sink, which is the so-called multi-source multi-sink problem. It is often converted into a directed weighted graph with a single source and a single sink by setting a super source s connected to all source nodes and a super sink d connected to each sink node.

[0086] In addition, in order to consider the impact of user importance on pipeline network flow distribution, the present invention transforms the flow distribution problem of the natural gas pipeline network under accident conditions into a two-stage optimization problem. The first stage is the maximum flow problem under given constraints, and the purpose is to calculate the maximum amount of gas that the natural gas pipeline network can supply to each user under given constraints. The second stage is the optimal flow distribution problem under given constraints and maximum flow, and the purpose is to determine the pipeline network flow distribution plan for the natural gas pipeline network under given constraints and maximum flow, and considering the importance of each distribution point. The specific model is as follows:

[0087] The objective function of the first stage is: during the duration of the accident condition, the total gas volume supplied by the natural gas pipeline network to each demand point is the largest, as shown below.

[0088]

[0089] Where, T is the duration of the accident condition; day, t is the time, day; D is the set of demand points; d is the virtual sink; x id (t) represents the flow from the demand point to the virtual sink at time t, that is, the gas volume supplied by the pipeline network to the i-th demand point, 10 4 Nm 3 / day.

[0090] Constraints:

[0091] 1) Pipeline network flow constraints:

[0092] The sum of traffic entering a node is equal to the sum of traffic leaving it.

[0093]

[0094] In the formula, x ij (t) represents the flow from the i-th node to the j-th node at time t, 10 4 Nm 3 / day; (i,j) and (j,l) represent the pipeline from node i to node j and the pipeline from node j to node l, respectively.

[0095] The flow direction constraint of a bidirectional pipe means that there is at most one flow direction in the pipe.

[0096]

[0097]

[0098] In the formula, E b Represents a collection of bidirectional pipes, y ij (t) is the binary decision variable that controls the flow direction of the bidirectional pipeline at time t.

[0099] The sum of the gas volumes supplied by the gas source points is equal to the sum of the gas volumes supplied to the demand points.

[0100]

[0101] In the formula, x sj (t) represents the gas volume supplied by the jth gas source at time t, 10 4 Nm 3 / day.

[0102] The supply flow rate of the gas source point is less than the upper limit of the gas source capacity, and the flow rate supplied to the demand point is less than the demand of the demand point. The flow rate of any arc in the network will not exceed the pipeline capacity of the arc, and the flow rate cannot be negative. Here, the gas source capacity, the demand of the demand point and the pipeline capacity of the pipeline are uniformly represented by the capacity matrix C. The above constraints are shown in the following formula.

[0103]

[0104]

[0105] Where C ij (t) is the pipeline capacity of pipeline (i, j) on day t, 10 4 Nm 3 / day, which is an element of the capability matrix C.

[0106] 2) Pipeline network pressure constraints:

[0107] Pressure constraints at each node of the pipeline network.

[0108] P i,min ≤P i ≤P i,max ;

[0109] Where P i is the pressure of the ith node, MPa, P i,min and P i,max are the upper and lower limits of the pressure at the i-th node, MPa.

[0110] It should be pointed out that the upstream and downstream nodes of the compressor station and the regulating valve need to satisfy not only the node pressure constraints shown in Equation 16, but also their upstream and downstream pressure constraints.

[0111] Pressure constraints upstream and downstream of the compressor station.

[0112]

[0113] In the formula are the upstream pressure, downstream pressure, upstream pressure limit and downstream pressure limit of the ith compressor station, in MPa.

[0114] Upstream and downstream pressure constraints of regulating valves (used for interface pressure regulation of pipelines with different pressure levels).

[0115]

[0116]

[0117] In the formula Respectively, the upstream pressure and downstream pressure of the i-th regulating valve. Upstream pressure limit and downstream pressure limit, MPa.

[0118] 3) Pipeline network hydraulic constraints:

[0119]

[0120]

[0121] In the formula, p i (t) and p j (t) are the pressures of the i-th and j-th nodes at the t-th time, MPa, λ is the hydraulic friction coefficient, Z is the compression factor of natural gas under pipeline transportation conditions, Δ * The relative density of natural gas, T is the gas transmission temperature, K, L is the calculated length of the gas pipeline, km, D is the inner diameter of the gas pipeline, m, C0 is a constant, and its value depends on the units of each parameter. The above parameters are all parameters of the pipeline between node i and node j.

[0122] Since the hydraulic constraints of the pipe network are nonlinear and contain many unknowns, in order to simplify the constraints and facilitate model solving, we try to linearize the hydraulic constraints piecewise. The specific process is as follows:

[0123] A) For a specific common pipeline, it is divided into 10 sections evenly according to its set natural gas transmission range. According to the range of starting pressure, 7 starting pressures are selected respectively.

[0124] B) In each flow range, divide it evenly into 5 sections, and take 6 flow points in total

[0125] C) According to the pipeline transportation process calculation formula, 10×6×7=420 groups of terminal pressure values ​​are solved w corresponds to a set of k l , m.

[0126] D) In ​​each flow range, there are 6×7 groups of starting pressure, end pressure and natural gas flow in the pipeline. According to the linear regression formula f(x) = Ax + b, a pipeline coefficient (A in the formula) and a constant b are fitted. Finally, a linear function of each flow range is obtained, such as Figure 4 As shown in the formula, since the formula also contains square terms, we define Represents the square of pressure.

[0127] For the optimization model, it is also necessary to convert the piecewise linear constraints into continuous linear constraints. In this case, 0-1 variables are used to convert the piecewise linear function into linear constraints. For an n-segment linear function f(x), the segmentation point is b 1 ≤ b 2 ≤...≤bn ≤ b n+1 , introduce the continuous variable w k and 0-1 variable z k , and x and f(x) are expressed as

[0128]

[0129]

[0130] Continuous variable w k and 0-1 variable z k The following constraints are met:

[0131]

[0132] Therefore, through the above method, the nonlinear hydraulic constraints of the pipe network can be can be transformed into linear constraints as follows:

[0133]

[0134]

[0135]

[0136] In the formula, the meanings of the parameters are as described above, and the subscript ij represents the pipeline from node i to node j.

[0137] It is worth noting that due to the existence of the hydraulic constraints of the bidirectional pipeline, the constraint conditions are nonlinear; therefore, in the first-stage optimization model of the present invention, the flow direction of the bidirectional pipeline is determined by first solving the maximum gas supply problem considering only the pipeline flow constraints and the pipeline pressure constraints; then the maximum gas supply problem considering the pipeline flow constraints, the pipeline pressure constraints and the pipeline hydraulic constraints is solved; by solving the optimization problem of the first stage, the maximum total gas volume Q that the natural gas pipeline network can supply to each user at each time within the duration of the accident condition under given constraints can be calculated. max (t), 10 4 Nm 3 .

[0138] Decision variable: Pipeline flow rate x ij , flow direction of bidirectional pipe y ij And the node pressure P at both ends of the pipeline i .

[0139] The optimization objective function of the second stage is: during the duration of the accident condition, under the premise of maximizing the total gas volume supplied to each demand point, the equivalent total cost of the pipeline network is minimized:

[0140]

[0141] In the formula, f i (t) is the unit equivalent transmission cost of the i-th demand point, 1 / (10 4 Nm 3 ), it is obvious that the higher the importance of the demand point, the lower its unit flow cost. Calculate unit traffic cost:

[0142]

[0143] Constraints: The difference from the first stage optimization is that the total flow constraint is added:

[0144]

[0145] In the formula, Q max (t) is the maximum air supply calculated in the first stage. Other constraints are the same as in the first stage.

[0146] In the event of an accident in the pipeline network, the failure of units in the system will cause the pipeline transport capacity of each arc in the pipeline network system to change, thereby changing the capacity matrix C of the pipeline network system and causing changes in the gas supply of the system. The impact of the failure of different types of units in the pipeline network system on the capacity matrix C is shown in Table 2, among which the impact of pipeline and compressor failure on the capacity matrix C can only be accurately determined by performing water-thermal simulation on the pipeline network system.

[0147] Table 2

[0148]

[0149] Therefore, the calculation of gas supply under accident conditions of natural gas pipeline network can be transformed into a two-stage mixed integer linear programming problem. By solving this optimization problem, the flow distribution scheme of natural gas pipeline network under accident conditions can be obtained.

[0150] Please refer to Figure 5As shown, the present invention also provides a flow distribution device for a natural gas pipeline network under accident conditions, the device comprising: a prediction module, a priority calculation module, a model building module and an analysis module; the prediction module is used to obtain the flow demand information of the natural gas pipeline network within a preset time period, and obtain the gas consumption forecast information of each demand user through a preset prediction model according to the flow demand information; the priority calculation module is used to obtain the priority information of each user through a preset weight calculation according to the flow demand information; the model building module is used to construct a gas supply calculation model for the natural gas pipeline network under accident conditions by using given constraint parameters as constraint conditions of a termed weighted graph; the analysis module is used to calculate the maximum gas supply of the natural gas pipeline network under accident conditions according to the gas supply calculation model and the natural gas pipeline network parameters, and obtain the flow distribution plan according to the maximum gas supply, the priority information of each user and the gas consumption forecast information of each demand user.

[0151] The beneficial technical effects of the present invention are: comprehensive consideration of market demand volatility, user importance, pipeline network transmission capacity, gas source intake upper limit, user gas consumption upper and lower limits, node flow balance, node pressure constraints and pipeline network hydraulic calculation; making up for the deficiencies of existing natural gas pipeline network flow distribution models and methods under accident conditions. The proposed method obtains historical demand data of each demand point based on the basic data provided on site, and predicts and calculates the market demand and user importance of each demand point during the duration of the accident condition; combined with the pipeline network gas supply calculation model that considers the impact of the market demand side and hydraulic calculation, the optimal distribution of pipeline network flow under accident conditions is achieved, thereby minimizing the impact of failure events on the gas supply reliability of the pipeline network system and maximizing the gas demand of natural gas users.

[0152] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.

[0153] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.

[0154] like Figure 6 As shown, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily have to include Figure 6 In addition, the electronic device 600 may also include Figure 6 For components not shown, reference may be made to the prior art.

[0155] like Figure 6As shown, the central processor 100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 100 receives inputs and controls the operations of various components of the electronic device 600.

[0156] The memory 140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 100 may execute the program stored in the memory 140 to implement information storage or processing.

[0157] The input unit 120 provides input to the CPU 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.

[0158] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 600 through the central processor 100.

[0159] The memory 140 may also include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 144 of the memory 140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0160] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processor 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0161] Based on different communication technologies, multiple communication modules 110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide an audio output via the speaker 131 and receive an audio input from the microphone 132, thereby realizing a common telecommunication function. The audio processor 130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 130 is also coupled to the central processor 100, so that the sound can be recorded on the local machine through the microphone 132, and the sound stored on the local machine can be played through the speaker 131.

[0162] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0163] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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.

[0164] 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.

[0165] 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.

[0166] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A flow distribution method for a natural gas pipeline network under accident conditions, It is characterized in that The method comprises: Obtaining the flow demand information of the natural gas pipeline network within a preset time period, and obtaining the gas consumption forecast information of each demand user through calculation using a preset forecasting model based on the flow demand information; Obtaining priority information of each user through preset weight calculation according to the traffic demand information; The gas supply calculation model of the natural gas pipeline network under accident conditions is constructed by taking the given constraint parameters as the constraint conditions of the term weighted graph; The maximum gas supply of the natural gas pipeline network under accident conditions is calculated based on the gas supply calculation model and the natural gas pipeline network parameters, and the flow distribution plan is calculated based on the maximum gas supply, the priority information of each user and the gas consumption forecast information of each demand user; The gas consumption forecast information of each demand user is obtained by calculating the gas consumption forecast information of each demand user through a preset forecast model according to the flow demand information, including: Obtaining gas usage characteristics and fluctuation characteristics of each gas user according to the flow demand information; Matching a preset prediction model according to the gas usage characteristics and the fluctuation characteristics, and calculating and obtaining gas usage prediction information of each demand user according to the prediction model and the flow demand information; Obtaining priority information of each user by calculating preset weights according to the flow demand information comprises: obtaining the gas usage type of each demand user according to the flow demand information; obtaining corresponding weights according to the gas usage type; and obtaining priority information of each user according to the weights; The priority information of each user obtained by calculating the weights includes: when the user includes multiple gas usage types, the user priority information is obtained by calculating the following formula: In the above formula, is the importance of the i-th demand point on the t-th day, i and t are positive integers; are the demand for different gas usage types on day t; The weights of different gas usage types; The prediction model includes a time series model, a BP neural network model, a support vector machine model and a logistic regression model; Among them, the demand users whose gas consumption fluctuation amplitude is less than the first preset threshold value calculate the gas consumption forecast information through the time series model; The gas consumption fluctuation amplitude is greater than the first preset threshold and less than the second preset threshold, and the fluctuation characteristics do not meet the preset regular conditions. The demand user calculates the gas consumption forecast information through the BP neural network model; The gas consumption fluctuation amplitude is greater than the first preset threshold and less than the second preset threshold, and the demand users whose fluctuation characteristics meet the preset regular conditions calculate the gas consumption forecast information through the support vector machine model; The gas consumption forecast information of demand users whose gas consumption fluctuation amplitude is greater than the second preset threshold is calculated through the logistic regression model.

2. The flow distribution method of the natural gas pipeline network under accident conditions according to claim 1, It is characterized in that The constraints include pipe network flow constraints, pipe network pressure constraints and pipe network hydraulic constraints.

3. The flow distribution method of the natural gas pipeline network under accident conditions according to claim 2, It is characterized in that The pipe network flow constraints include: In the above formula, C ij (t) is the pipeline capacity of pipeline (i, j) on day t; E b Represents a collection of bidirectional pipes; y ij (t) is the binary decision variable that controls the flow direction of the bidirectional pipeline at time t; x ij (t) represents the flow from the i-th node to the j-th node at time t; E is the set of all pipelines in the natural gas pipeline network.

4. The flow distribution method of the natural gas pipeline network under accident conditions according to claim 2, It is characterized in that The pipeline network pressure constraints include pressure constraints of each node of the pipeline network, upstream and downstream pressure constraints of the compressor station, and upstream and downstream pressure constraints of the regulating valve; The pressure constraints of each node in the pipeline network include: P i,min ≤P i ≤P i,max ; The upstream and downstream pressure constraints of the compressor station include: The upstream and downstream pressure constraints of the regulating valve include: In the above formula, P i is the pressure of the ith node; P i,min and P i,max are the upper and lower limits of the pressure at the i-th node respectively; are the upstream pressure, downstream pressure, upstream pressure limit and downstream pressure limit of the ith compressor station respectively; are the upstream pressure, downstream pressure, upstream pressure limit and downstream pressure limit of the i-th regulating valve respectively.

5. The flow distribution method of the natural gas pipeline network under accident conditions according to claim 2, It is characterized in that The pipe network hydraulic constraints include: In the above formula, pi(t) and pj(t) are the pressures at the i-th and j-th nodes at the t-th time, respectively; λ is the hydraulic friction coefficient, Z is the compression factor of natural gas under pipeline transportation conditions; Δ * The relative density of natural gas; T is the gas transmission temperature; K, L is the calculated length of the gas pipeline; D is the inner diameter of the gas pipeline; C 0 is a constant.

6. A flow distribution device for a natural gas pipeline network under accident conditions, applicable to the flow distribution method for a natural gas pipeline network under accident conditions as claimed in any one of claims 1 to 5, It is characterized in that The device comprises: a prediction module, a priority calculation module, a model building module and an analysis module; The prediction module is used to obtain the flow demand information of the natural gas pipeline network within a preset time period, and obtain the gas consumption prediction information of each demand user through calculation based on the flow demand information through a preset prediction model; The priority calculation module is used to obtain the priority information of each user through preset weight calculation according to the traffic demand information; The model building module is used to build a gas supply volume calculation model of the natural gas pipeline network under accident conditions by using given constraint parameters as constraint conditions of a weighted graph with terms; The analysis module is used to calculate the maximum gas supply of the natural gas pipeline network under accident conditions according to the gas supply calculation model and the natural gas pipeline network parameters, and calculate the flow distribution plan according to the maximum gas supply, the priority information of each user and the gas consumption forecast information of each demand user; The prediction module also includes: obtaining the gas usage characteristics and fluctuation characteristics of each gas user according to the flow demand information; matching a preset prediction model according to the gas usage characteristics and the fluctuation characteristics, and calculating and obtaining the gas usage prediction information of each demand user according to the prediction model and the flow demand information.

7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program for causing a computer to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Large power grid load prediction method based on comprehensive evaluation of analog-meteorological subareas

    CN106408119A

  • Method and device for performance evaluation of natural gas pipeline network

    CN107274081A

  • Gas supply reliability evaluation method and system for natural gas pipeline system

    CN109345080A

  • A natural gas pipe network intelligent operation scheduling method based on user priority

    CN109784673A

  • Electrical integrated energy system scheduling method based on information gap decision theory

    CN110135631A