Gas pipeline safety margin regulation method and system based on flow rate coupling
Patent Information
- Application Number
- CN202611335400.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-10-23
AI Technical Summary
该方法实现简单,但天然气管道本质上是强非线性、强时变的分布参数系统,多气源汇入、负荷频繁切换等动态工况下,固定阈值易引发漏报或误报,且只能输出越限/安全的二元信号,缺失连续性、前瞻性的风险评估维度,无法连续量化当前工况距危险边界的具体裕度,导致安全评估结果难以作为精细控制输入
本发明构建了以安全裕度为连续状态变量、以流速耦合为机理内核的天然气管道主动安全调控闭环体系,使燃气管道安全管控在快速高效的事前智能预判下提前响应。其核心优势在于:
Smart Images

Figure CN122965233A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural gas transmission technology, and more specifically to a method and system for controlling the safety margin of gas transmission pipelines based on flow velocity coupling. Background Technology
[0002] Long-distance natural gas pipelines face a critical need to transition from passive protection to active control. The current control system, centered on Supervisory Control and Data Acquisition (SCADA), still exhibits significant bottlenecks and shortcomings in practical engineering applications: Currently, under complex operating conditions (such as load fluctuations, multiple gas source inflows, and geological disturbances), long-distance natural gas transmission systems often experience drastic pressure changes, surges, and even leaks due to velocity mismatches between upstream and downstream flow. Existing systems generally employ fixed threshold alarm mechanisms, setting single upper and lower limits for parameters such as pressure and flow rate, requiring manual intervention by operators upon triggering. While this method is simple to implement, natural gas pipelines are inherently highly nonlinear and time-varying distributed parameter systems. Under dynamic conditions such as multiple gas source inflows and frequent load switching, fixed thresholds are prone to false alarms or missed alarms. Furthermore, they can only output binary signals of exceeding limits / safety, lacking a continuous and forward-looking risk assessment dimension. They cannot continuously quantify the specific margin between the current operating conditions and the danger boundary, making it difficult to use safety assessment results as input for precise control.
[0003] Hydraulic calculation models widely used in engineering are mostly based on steady-state or quasi-steady-state assumptions, ignoring nonlinear and spatial correlation characteristics, making it difficult to reflect transient flow behavior. Their parameters drift with pipe wall wear and gas quality changes. Existing online simulations lack adaptive update mechanisms, and there is a continuous deviation between the model and the actual physical field, making it difficult to track transient flow disturbances with high fidelity.
[0004] Existing PID and nonlinear control have achieved single-site closed-loop regulation, but the control law tuning relies on a locally linearized model, which is slow to respond to disturbances such as sudden changes in upstream and downstream flow and compressor start-up and shutdown, and is prone to cascading fluctuations. When multiple disturbances are superimposed, they may even lead to system instability.
[0005] Explorations in digital twins and AI prediction have largely remained at the level of offline simulation. Due to the order-of-magnitude gap between the solution speed of existing high-fidelity models and millisecond-level real-time control, they have not been integrated with the real-time control closed loop. Summary of the Invention
[0006] The present invention aims to provide a method and system for regulating the safety margin of gas transmission pipelines based on velocity coupling. The present invention constructs a dynamic modeling and regulation system with velocity coupling as the core mechanism and safety margin as the control target, so as to realize global active safety regulation of gas transmission pipelines.
[0007] The basic solution provided by this invention is: a safety margin control method for gas transmission pipelines based on flow velocity coupling, comprising: S1. Construct a velocity-pressure coupled dynamic model. Predict the pressure response information of downstream nodes by the velocity change of upstream nodes, so as to predict the disturbance propagation path and pressure fluctuation warning. It also participates in the node control of the corresponding node automatic control system as a feedforward compensation. S2, each node deploys a safety margin state variable model, dynamically calculates the node safety margin based on real-time obtained flow velocity gradient, pressure data, disturbance propagation delay time and energy residual term represented by flow velocity change, and uses it for risk early warning; S3 takes the node safety margin as the input of the corresponding node automatic control system and participates in node control when the preset conditions are met. The node automatic control system takes the safety margin deviation as the control target.
[0008] This invention also provides a method and system for regulating the safety margin of gas transmission pipelines based on velocity coupling, to execute the method for regulating the safety margin of gas transmission pipelines based on velocity coupling; the system includes: The velocity-pressure coupling module is used to construct a velocity-pressure coupled dynamic model. It predicts the pressure response information of downstream nodes by the velocity change of upstream nodes, so as to predict the disturbance propagation path and pressure fluctuation early warning, and determine the feedforward compensation. The safety margin module is used to deploy a safety margin state variable model on each node. Based on real-time obtained flow velocity gradient, pressure data, disturbance propagation delay time and energy residual term represented by flow velocity change, it dynamically calculates the node safety margin and uses it for risk warning. The node automatic control system is used to perform corresponding node control based on feedforward compensation; to perform corresponding node control based on node safety margin when preset conditions are met; and to use safety margin deviation as the control target. The global optimization module is used to construct a global optimization function with the goal of maximizing the minimum safety margin of the entire network. The distributed solution of the global optimization function using the alternating direction multiplier method is used to achieve distributed collaborative control of global nodes.
[0009] The working principle and advantages of this invention are as follows: This invention constructs a closed-loop system for proactive safety control of natural gas pipelines, with safety margin as a continuous state variable and flow velocity coupling as the core mechanism. This system enables early response and rapid, efficient, and intelligent pre-emptive prediction in gas pipeline safety management. Its core advantages are: First, a quantitative model for safety margin is constructed to visualize the operating status of gas pipelines. This breaks through the limitations of traditional binary threshold judgment and defines safety margin as a continuous dynamic variable that can be calculated, fed back, and embedded in the control loop. It integrates a multi-parameter differential evolution model with pressure, flow rate, density, and other parameters, making safety margin a quantitative signal that can be fed back in real time at the bottom layer of the algorithm.
[0010] Secondly, it solves the problem of predicting the propagation of transient flow disturbances by establishing a lightweight spatiotemporal coupled dynamic model of velocity, pressure, and mass transfer, which accurately predicts the propagation path of disturbances and pressure response. It introduces a distributed velocity coupling coefficient matrix to characterize the dynamic influence weights of upstream and downstream, enabling feedforward path tracking and response timing prediction for disturbance events such as compressor start-up and shutdown and load abrupt changes. It can issue pressure oscillation warnings 30 to 90 seconds in advance, achieving proactive preventive control. It also introduces feedforward compensation and adaptive adjustment mechanisms to improve the response speed to disturbances such as load abrupt changes and compressor start-up and shutdown (30 to 90 seconds in advance warning). Third, it features a closed-loop intelligent control architecture encompassing perception, analysis, decision-making, and execution. This architecture deeply integrates SCADA, digital twins, and PID adaptive controllers with edge computing, achieving real-time response and autonomous parameter tuning optimization at the edge in less than 200 milliseconds. Simultaneously, it achieves closed-loop fusion of digital twins and real-time control. It has completed thousands of hours of field testing and verification under extreme conditions such as mountainous areas and permafrost zones, and possesses universal applicability for expansion into new fluid networks such as hydrogen transportation, CO2 pipelines, and urban gas networks, providing a solid technological foundation for the secure interconnection of the national integrated energy system.
[0011] Fourth, based on the quantification of safety margin, a target function for maximizing the global minimum safety margin is proposed, which supports distributed collaborative control under the access of multiple gas sources and can achieve systemic safety of gas pipelines by prioritizing the weakest link.
[0012] In practice, it can be widely applied in the following typical scenarios: high-pressure trunk gas pipelines (such as the West-East Gas Pipeline), pressure control zones at the inlet and outlet of urban gas gate stations, LNG receiving terminal export systems, safety redundancy design of pipelines in mountainous areas or geologically hazardous sections, and flow coordination control at multi-source gas supply convergence nodes. In these scenarios, the flow velocity coupling mechanism can be used to identify the propagation patterns of upstream and downstream disturbances, provide early warnings of pressure fluctuations, and dynamically adjust operating parameters to maintain sufficient safety margin, thereby enhancing the disturbance resistance and cascading failure prevention capabilities of critical energy infrastructure. Deploying edge-end real-time computing (response <200ms) provides engineering-grade robustness and fault tolerance, offering underlying support for the safe control of integrated energy systems with multi-energy complementarity and inter-grid interconnection. Attached Figure Description
[0013] Figure 1 This is a schematic flowchart of the gas pipeline safety margin control method based on flow velocity coupling provided in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the evolution of the safety margin provided in an embodiment of the present invention; Figure 3 This is a schematic bar chart illustrating the coupling relationship between flow velocity change and pressure response provided in an embodiment of the present invention; Figure 4This is a stress relationship diagram of a pipeline system provided in an embodiment of the present invention; Figure 5 This is a crack propagation and fatigue life prediction curve provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the gas pipeline safety margin control system based on flow velocity coupling provided in an embodiment of the present invention. Figure 7 This is a line graph showing the distribution of safety margin along the path provided in an embodiment of the present invention. Detailed Implementation
[0014] The following detailed explanation illustrates the specific implementation methods: The basic implementation examples are as follows: Figure 1 As shown: A safety margin control method for gas transmission pipelines based on velocity coupling includes: S1. Construct a velocity-pressure coupled dynamic model. Predict the pressure response information of downstream nodes by the velocity change of upstream nodes, so as to predict the disturbance propagation path and pressure fluctuation warning. It also participates in the node control of the corresponding node automatic control system as a feedforward compensation. S2, each node deploys a safety margin state variable model, dynamically calculates the node safety margin based on real-time obtained flow velocity gradient, pressure data, disturbance propagation delay time and energy residual term represented by flow velocity change, and uses it for risk early warning; S3 takes the node safety margin as the input of the corresponding node automatic control system and participates in node control when the preset conditions are met. The node automatic control system takes the safety margin deviation as the control target.
[0015] It should be noted that S1, S2, etc. are only used to distinguish processes and do not limit the order of steps in the execution process.
[0016] In this embodiment, basic operational data of the gas pipeline is acquired through a sensing layer; a dynamic modeling layer constructs a flow velocity-pressure coupled dynamic model; an AI decision-making layer performs risk warnings using safety margin calculations and conducts collaborative control through ADMM optimization; and an execution and regulation layer completes pressure regulating valve adjustment, compressor speed regulation, etc. Specifically: In practical applications, data sources are obtained by relying on high-frequency sensor networks, data acquisition and monitoring control systems (SCADA), online corrosion probes, flow meters, etc. The data sources include real-time data such as pressure, flow rate, temperature, and density at each node, which are used for subsequent calculations. This part is the existing technology.
[0017] In S1, a lightweight, nonlinear, spatiotemporally coupled velocity-pressure dynamics model is established. Relying on a digital twin engine and a lightweight solver, it enables feedforward propagation path tracking and response timing prediction for disturbances such as compressor start-up and shutdown, and sudden load changes. In practical applications, it can provide early warning of pressure oscillation risks 30–90 seconds in advance, achieving proactive regulation. Specifically: In practical engineering applications, the process of constructing a velocity-pressure coupled dynamic model includes: Establish the governing equations (one-dimensional unsteady compressible flow):
[0018] In the formula, Gas density (unit: kg / m³) 3 ), where t represents time (in seconds); Indicates flow velocity (along the pipe axis, in m / s); Indicates the axial coordinate of the pipeline (unit: m); This indicates fluid pressure (unit: Pa (N / m²)). This represents the coefficient of friction (dimensionless). Indicates the inner diameter of the pipe (unit: m); The gas compressibility factor (dimensionless, characterizing the degree to which a real gas deviates from an ideal gas). The gas constant (unit: J / (kg·K)) depends on the type of gas; for example, air is 287 J / (kg·K)). Indicates fluid temperature (unit: K); This represents the acceleration due to gravity (≈9.81) (unit: m / s²). 2 ); Indicates the angle between the pipe and the horizontal plane (positive upwards) (unit: rad or °).
[0019] The engineering model is simplified using the linearized small perturbation method. Let:
[0020] In the formula, , These are steady-state flow velocity (reference flow velocity) and steady-state pressure (reference pressure), respectively. , These are small perturbations of flow velocity (first-order quantities) and small perturbations of pressure (first-order quantities), respectively.
[0021] The linearized small perturbation method will be adopted. and Substituting the aforementioned governing equations, subtracting the steady-state equations (which are automatically satisfied in the steady state), and ignoring the quadratic nonlinear terms, we finally obtain the approximate wave equation (i.e., a linear partial differential equation about the disturbance, which serves as the velocity-pressure coupled dynamic model):
[0022] in: This represents the isentropic speed of sound (where k is the specific heat capacity). For steady-state density, (for steady-state pressure). This indicates the damping term (energy dissipation). This represents the flow velocity disturbance driving term.
[0023] This model is used for feedforward prediction: given a sudden change in flow velocity at a node, this equation can be used to predict the peak value and time delay of the downstream pressure response. Specifically: Input the velocity change field of upstream node i (Given its spatiotemporal distribution, for example, the flow velocity at a certain node suddenly changes to Δv(t) and propagates downstream along the pipeline), steady-state flow velocity Steady-state pressure The sampling time step is set; the flow velocity change value and flow velocity change rate are calculated in real time; when the flow velocity change rate exceeds the threshold, a disturbance is determined to have occurred, and the moment of disturbance occurrence, disturbance amplitude (flow velocity change amplitude), and flow velocity change rate are extracted as disturbance feature vectors.
[0024] To solve the approximate wave equation, numerical solutions can be used (suitable for real-time engineering). The spatial x and time t are discretized, and the finite difference method (FDTD) is used to solve it directly (this part of the solution method uses existing technology and is not limited).
[0025] Extract key predictive information from the solution, including propagation delay time (i.e., the time it takes for the pressure wavefront to travel from upstream to downstream). The moment when the threshold is first exceeded (the corresponding time), peak pressure P peak (The maximum pressure that the downstream will bear), peak arrival time t peak The rising slope (the steepness of the pressure wavefront) and the decay time (the duration of the wavelength).
[0026] After extracting key predictive information, the following can be done: (1) Disturbance propagation path tracing, specifically including: Obtain the disturbance feature vector of each upstream disturbance source i, and output the prediction results of all downstream nodes j using the approximate wave equation; if the pressure peak difference exceeds the threshold, record the propagation edge ij, start from the disturbance source, spread along the propagation edge, form a tree-like or multi-branched path, and generate a propagation path map.
[0027] (2) Response timing prediction, specifically including: generating a complete time axis for each downstream node based on the propagation path map and the time of disturbance occurrence, including the wavefront arrival time, peak arrival time and wave end time; generating a timing prediction report for each node; if there are multiple upstream disturbances (different paths) at the same node, calculating the time domain superposition; if the superposition pressure is greater than the safe pressure threshold, it is marked as superposition risk.
[0028] (3) Pressure fluctuation early warning (tiered release), specifically including: based on the predicted peak pressure of each node, compare it with the system safety threshold, and carry out tiered early warning. Different levels can trigger different early warning actions.
[0029] (4) Based on key prediction information, predicted pressure peak, current pressure value, pressure corresponding to the maximum adjustment capacity of the actuator, and the lag time of the actuator, calculate the feedforward compensation amount that changes with time (e.g., how much to adjust the valve opening in the face of this disturbance) and the action time calculation (advance compensation, i.e., how much time to start the actuator before the pressure wave arrives, to ensure that the actuator is in place when the wave arrives), which is used to participate in the node control of the node automatic control system (e.g., online update of the PID controller parameters of the actuator). This part can be implemented using existing PID control technology.
[0030] like Figure 3 As shown, the bar chart (dual-axis plot) visually demonstrates the coupling relationship between the flow velocity V change and the pressure P response during the process, showing the significant pressure drop corresponding to the high flow velocity region and revealing the flow velocity coupling effect.
[0031] Furthermore, a perturbation propagation time and influence weight matrix are introduced. Specifically: Simplified propagation time model:
[0032] in, Indicates the propagation time of the disturbance (delay). , Let represent the coordinates of upstream node i and downstream node j, respectively; c(x) + v(x) is the effective propagation speed of the pressure wave in the downstream direction, c(x) represents the local isentropic speed of sound, and v(x) represents the local medium velocity.
[0033] Definition of influence weight matrix:
[0034] in: This represents the contribution of upstream node i to the pressure disturbance of downstream node j. The larger the value, the greater the responsibility / influence of i on j. This represents the pressure disturbance amplitude at the upstream node, and the measured or predicted pressure fluctuation amplitude at node i. The larger the value, the more severe the disturbance at that node and the greater the threat to the downstream. This indicates the pressure fluctuation warning line set by the pressure disturbance threshold system (e.g., 5% of normal pressure), used to... Dimensionless; The gradient at node i represents the flow rate gradient at node i, and the rate of change of the flow velocity at node i along the pipe direction. The larger the gradient, the more severe the local flow field distortion and the stronger the ability to generate pressure waves. This represents the velocity gradient threshold, a system-set velocity gradient warning line (e.g., 3 times the normal gradient), used to... Dimensionless; T represents the disturbance propagation time (delay), the time required for the pressure wave to travel from node i to node j. The smaller T is, the faster the impact travels and the higher the weight. η and μ are both attenuation adjustment parameters, usually between 0.5 and 3.0, calibrated based on engineering experience or parameter scanning, used to balance the importance of pressure magnitude and gradient magnitude. To prevent division by zero of constants.
[0035] The relationship that can be obtained is: the larger the upstream disturbance and the shorter the propagation time, the higher the influence weight is determined.
[0036] In practical applications, it is used for global node responsibility tracing and priority scheduling in multi-source / sink scenarios: (1) Tracing the source of responsibility, that is, locating the main source of disturbance, the pressure on downstream nodes is abnormal, calculating the contribution of each upstream node, i.e. the influence weight, and then accumulating the contribution of each upstream node. The greater the total contribution, the greater the responsibility of the upstream node for the abnormality.
[0037] (2) Construct a weighted mapping relationship based on the total contribution, the inverse of the propagation time and the difference in flow velocity, and calculate the priority value. The larger the priority value, the higher the priority and the priority is processed.
[0038] In S2, safety margin is defined as a state variable that can enter the control loop. Breaking through the limitations of traditional binary limit-crossing judgments, a continuous safety margin index system integrating multiple parameters such as pressure, velocity, flow rate, and density is constructed. Based on nonlinear fluid dynamics equations, a differential evolution model of the safety margin is derived, making it a real-time feedback signal in the control system and achieving the quantification of intrinsic safety. Specifically: Safety margin represents the remaining buffer capacity before instability (such as overpressure, leakage, surge) under the current operating conditions. It is a dimensionless, time-varying, spatially distributed indicator.
[0039] In practical engineering applications, the nodal safety margin at time t is calculated using the following formula. :
[0040] In the formula, ∈[0,1], 1 = completely safe, 0 = on the verge of failure; Indicates real-time pressure (unit: MPa); It indicates the upper limit of the design pressure (unit: MPa), the maximum pressure threshold, which usually represents the ultimate pressure that a material or system can withstand; The velocity gradient represents the rate of spatial change of the velocity at different locations x along the pipe at a given time t, reflecting the intensity of disturbance propagation. The value represents the disturbance propagation delay time (in seconds, typically 0.5–3 seconds), L represents the pipe length, and c represents the propagation speed of the pressure wave (disturbance) in the fluid medium (in meters per second). This indicates the reference flow velocity (unit: m / s, such as the average flow velocity under rated operating conditions). Represents the energy residue term; Indicates flow rate; It represents the rate of change of kinetic energy, indicating the instability or surge tendency of the flow; This represents the time scale normalization factor (in seconds, e.g., 1 second). , , The corresponding weight coefficients are recommended (initial settings are 0.4, 0.4, and 0.2 respectively).
[0041] The entire computational model is concise and can be computed in real time on edge devices (<10ms).
[0042] Furthermore, utilizing node security margins for risk trend early warning includes: (1) According to The range within which the circuit is located determines the corresponding level, which is used to adjust the control loop parameters. For example... This indicates low margin and high safety risk. This indicates a moderate margin of safety and moderate risk. This indicates high margin and low safety risk. This level of classification is used for adjusting control loop parameters. Specific strategies will be discussed later.
[0043] (2) Set the safety margin alarm threshold and the control threshold, when When the alarm threshold is reached, a corresponding alarm is triggered, and alarm adjustment suggestions can be provided; when When the threshold is reached, control intervention is triggered. The entire process is visualized, and a safety margin change curve is constructed, for example, as shown. Figure 2 As shown, A value of 0.8 to 1.0 indicates normal operation and can be displayed in green; a sudden increase in load indicates abnormal operation. A drop to 0.45 is indicated in yellow; disturbances such as those before compressor startup are present. A value <0.3 triggers a Level 1 alarm, recommending the initiation of adaptive voltage reduction or current limiting measures; this process provides early warning. <0.15 triggers automatic adjustment, i.e., the current value is... It participates in control until automatic regulation intervenes. The risk level has been restored to a safe range. This allows for proactive risk detection and restoration of a safe level.
[0044] In S3, the node automatic control system adopts adaptive PID control (such as PID controllers set separately for the pressure regulating valve and the compressor). Traditional PID control targets pressure or flow, but in this embodiment, the system uses safety margin deviation as the control target.
[0045] Definition of control error:
[0046] in, This represents the expected margin, which can be taken as 0.8; Indicates the actual safety margin at the current moment; This represents the control error, which is the deviation between the expected full margin and the actual full margin.
[0047] The output control quantity is expressed by the following formula:
[0048] In the formula, This indicates the output of control quantities, which are the operating parameters of the pressure regulating valve or compressor, such as the pressure regulating valve opening increment, compressor speed, etc. This indicates a proportional term, which is adjusted proportionally to the current error magnitude; the larger the error, the greater the adjustment. This represents the integral term, which responds to accumulated errors and is used to eliminate the steady-state error of the system. It represents the differential term and predicts the trend of error change (error change rate).
[0049] Dynamically adjust the gain according to the operating conditions:
[0050] in, This represents the real-time proportional gain, the proportional coefficient used in PID calculations, which changes over time (and depending on operating conditions). This represents the baseline proportional gain, a pre-set base proportional value. Indicates the gain adjustment factor, according to A piecewise function that changes (i.e.) Corresponding levels (low margin, medium margin, and high margin) determine The magnification or reduction factors are as follows:
[0051] Furthermore, it also includes S4, within the ADMM (Alternating Direction Multiplier) framework, constructing a global optimization function with the objective of maximizing the minimum safety margin of the entire network, and using the alternating direction multiplier method to perform distributed solution of this global optimization function for distributed collaborative control of global nodes. Specifically: First, we propose a conceptual objective function that maximizes the minimum security margin of the entire network: .
[0052] This algorithm employs an improved ADMM (Alternating Direction Multiplier) distributed optimization method, suitable for scenarios with multiple gas source access and topology changes. It addresses the issues of local compliance and overall instability, supporting the interconnection needs of future smart energy networks.
[0053] In practical engineering applications, for multi-gas-source and complex topology networks, an engineering-based and computable optimization objective function is constructed, as follows:
[0054] in, Indicates the average safety margin; Let S(t) represent the standard deviation of each node; γ represent the preference coefficient, ∈ [0.7, 0.9]; u represent the optimization decision variable (the optimal solution, i.e., finding the node with the smallest safety margin (most dangerous, weakest) among all nodes globally, and maximizing the minimum safety margin by adjusting the optimization decision variable u). By relaxing the conceptual objective function into a smoother, decomposable optimization objective function according to the actual working condition problem, and by adjusting the preference coefficient (weight) γ, the solution of the optimization objective function can approximate the solution of the conceptual objective function.
[0055] The ADMM algorithm is used to solve the objective function in a distributed manner, determine the optimal PID control command for each node globally and issue it, thereby realizing edge collaborative decision-making.
[0056] This also includes S5, which establishes a coupled mapping relationship between velocity gradient and local dynamic stress, and combines the material fatigue limit and Miner's cumulative damage rule to predict crack initiation locations and estimate time windows in high velocity gradient regions. Specifically: like Figure 4As shown, finite element simulation calculations are performed based on the three-dimensional mesh of the pipeline to obtain the Mises stress distribution (through the mapping relationship between the flow velocity gradient, the rate of change of the flow velocity gradient over time, and the pipeline material / geometric properties and local Mises stress). The stress cloud map is visualized and displayed according to the differences in risk level. The concentrated stress areas (typical locations include elbows, welds, support connections, and undulating sections in mountainous areas) are identified. The area with the largest Mises stress amplitude (usually exceeding the fatigue limit) is the crack initiation point. Rainflow counting is performed on the stress time history of this point, and the cumulative damage is calculated by combining it with the Miner's rule. The time when the cumulative damage is 1 is calculated as the time window estimation result.
[0057] Also includes S6, such as Figure 5 As shown, by statistically analyzing the frequency and amplitude of flow velocity fluctuations in real time, converting them into stress cycle counts, and combining this with Miner's cumulative damage rule, the fatigue damage rate is quantified, thereby predicting the remaining pipeline life and triggering graded maintenance decisions, achieving predictive maintenance. Specifically: First, environmental noise is removed by bandpass filtering to extract effective fluctuation characteristics. Then, the signal is decomposed into dominant frequency components of each order by fast Fourier transform, and their amplitude spectral density is calculated simultaneously. Subsequently, based on the material's SN curve parameters, the stress amplitude in each frequency band is mapped to the corresponding damage equivalent cycle number. The asymmetric random waveform is then identified by closed-loop cycle identification using the rainflow counting method to avoid omissions or duplicates in damage accumulation.
[0058] Under the Miner linear cumulative criterion framework, the system dynamically updates the cumulative damage index using a sliding time window and introduces environmental correction coefficients for temperature and media corrosivity to improve the field applicability of the damage rate model. When the cumulative damage slope shows a significant positive shift, an early warning is triggered. Combining the remaining life confidence interval and the available spare parts cycle, three levels of maintenance recommendations are automatically generated: Level 1 is condition maintenance, Level 2 is a planned maintenance window recommendation, and Level 3 is an emergency shutdown and replacement decision.
[0059] like Figure 6 As shown, this embodiment also provides a gas pipeline safety margin control system based on velocity coupling to execute the gas pipeline safety margin control method based on velocity coupling; the system includes: The velocity-pressure coupling module is used to construct a velocity-pressure coupled dynamic model. It predicts the pressure response information of downstream nodes by the velocity change of upstream nodes, so as to predict the disturbance propagation path and pressure fluctuation early warning, and determine the feedforward compensation. The safety margin module is used to deploy a safety margin state variable model on each node. Based on real-time obtained flow velocity gradient, pressure data, disturbance propagation delay time and energy residual term represented by flow velocity change, it dynamically calculates the node safety margin and uses it for risk warning. The node automatic control system is used to perform corresponding node control based on the feedforward compensation of the flow velocity-pressure coupling module; and to perform corresponding node control when preset conditions are met based on the node safety margin, wherein the safety margin deviation is the control target. The global optimization module is used to construct a global optimization function with the goal of maximizing the minimum safety margin of the entire network. The distributed solution of the global optimization function using the alternating direction multiplier method is used to achieve distributed collaborative control of global nodes.
[0060] It is understandable that the above system and method have the same process and effect, so they will not be described again here.
[0061] This embodiment uses the "Golden Double Line B Section" of a long-distance natural gas pipeline as an example to verify the gas pipeline safety margin control method and system based on velocity coupling provided by this invention. The basic characteristics of this pipeline section are as follows: pipe diameter Φ508mm, wall thickness 10.5mm, pipe material X65 steel grade, design pressure 10.5MPa, normal operating pressure 9.2MPa, transported medium is moist gas containing H2S, and the service life is 17 years. Pressure, velocity, and temperature sensors are deployed along the pipeline section, with a data acquisition frequency of 20Hz, and the data is aggregated to the edge computing node through a SCADA system. This embodiment focuses on the typical high-stress zone "Km+35" node in this pipeline section as the main analysis object, combining upstream and downstream node data to fully execute steps S1 to S6.
[0062] S1: Construct a velocity-pressure coupled dynamic model to predict disturbance propagation and perform feedforward compensation. First, obtain the steady-state operating parameters of this pipe section: steady-state pressure steady-state flow velocity steady-state density Specific heat capacity Pipe inner diameter coefficient of friction Calculate the isentropic speed of sound:
[0063] Damping term Flow velocity disturbance driving term .
[0064] At a certain moment, a sudden increase in load occurs at the outlet of the upstream compressor (node i), and the sensor detects a small disturbance in the flow velocity. It exhibits a step change, amplitude If the rate of change exceeds a set threshold, it is determined to be a disturbance event. Substituting the above parameters into the approximate wave equation:
[0065] The finite-difference time-domain (FDTD) method is used to discretize and solve for space x and time t, with a spatial step size of [missing information]. Time step The boundary conditions are assumed to be that the velocity disturbance at upstream node i is known, and the downstream outlet is a non-reflective boundary. The pressure disturbance response at downstream node j (km+35, 3km from the upstream station) is calculated: pressure wavefront arrival time... Peak pressure Peak arrival time The pressure rise slope is approximately 0.72 MPa / s. This prediction result is in good agreement with the subsequent SCADA system's measured data (wavefront arrival time 8.6 s, peak pressure 1.25 MPa), with an error within 4%, verifying the model's accuracy.
[0066] Based on the prediction results, the system generates the following feedforward information: Disturbance propagation path: Starting from upstream node i, it propagates along the pipeline to downstream node j, and then continues to spread further downstream through the branch structure, forming a tree-like propagation pattern.
[0067] Time series forecast report: clearly defines the arrival time of the wavefront, the peak time, and the end time of the wave at each downstream node.
[0068] Pressure fluctuation warning: The predicted peak pressure (10.5 MPa) is approaching the design pressure limit. This triggered an orange alert.
[0069] Furthermore, a disturbance propagation time model and an influence weight matrix are introduced. The time for a disturbance to propagate from node i to node j is:
[0070] (Note: The average speed of sound is used here for simplified calculation; the actual numerical solution result is 8.4s. However, due to the consideration of changes in pipeline parameters and damping effects, this embodiment uses the numerical solution result of 8.4s as the standard.) In the influence weight matrix, the pressure disturbance amplitude at upstream node i is taken. Pressure disturbance threshold (5% of normal pressure), flow rate gradient Flow gradient threshold Attenuation adjustment parameter , , Then the weights are:
[0071] This weight indicates that upstream node i contributes significantly to the pressure disturbance at downstream Km+35, making it the primary source of pressure fluctuation at that location. Accordingly, the system sets the control priority of Km+35 to "high" and sends the feedforward compensation (predicting a valve opening adjustment of approximately 8%) to the PID controller of the actuator at Km+35 in advance, ensuring it prepares for action before the pressure wave arrives.
[0072] S2: Deploy a security margin state variable model to dynamically calculate node security margins. Real-time operational data is collected at node Km+35: current pressure. Design pressure limit velocity gradient (Obtained by dividing the velocity difference between adjacent sensors by the distance between them), reference velocity Disturbance propagation delay time The rate of change of kinetic energy is calculated using numerical difference. Time scale normalization factor The weighting coefficients are taken as follows: Substituting into the safety margin calculation formula:
[0073] The calculation result at this time A value less than 0 indicates that, under the combined effects of the current high velocity gradient and residual energy, the safety margin of this node is extremely low, approaching or even exceeding the failure boundary. The system determines this result to be valid, and after mapping to the 0,1 interval, the current effective safety margin is approximately 0.21 (after engineering normalization; specifically, when the original calculated value is less than 0, the historical statistical lower limit is used for recalibration; in this embodiment, after calibration...). This value is below the alarm threshold of 0.3, triggering a Level 1 alarm. It is recommended to activate adaptive voltage reduction or current limiting measures.
[0074] S3: The node automatic control system uses safety margin deviation as the control objective and implements adaptive PID control. Set the expected safety margin Current effective safety margin Calculate the control error:
[0075] The node automatic control system uses an adaptive PID controller with a reference proportional gain. Integral gain Differential gain Based on the current safety margin level, For low margin and a strong fast response, the gain adjustment factor is selected. Then the real-time proportional gain is:
[0076] Assuming the current rate of change of error Cumulative value of integral terms Then the output control quantity is:
[0077]
[0078] This control quantity This represents the percentage increase in the pressure regulating valve opening. The system sends this command to the actuator, and simultaneously, combined with the feedforward compensation in S1 (approximately 8%), adjusts the valve opening by approximately 10.5%. After adjustment, the pressure gradually decreases, the flow rate gradient decreases, and the safety margin gradually rises to above 0.45, exiting the alarm state.
[0079] S4: Construct a global optimization function and implement ADMM distributed collaborative regulation. In this embodiment, a total of 6 key nodes (N1~N6) are set along the entire B segment of the gold double line. Within a certain coordinated control cycle, the current safety margins of each node are as follows:
[0080] Average security margin across the entire network:
[0081] Standard deviation:
[0082]
[0083]
[0084] Take the preference coefficient Construct a global optimization objective function:
[0085] In the actual implementation, the Alternating Directional Multiplier Method (ADMM) is used to solve the objective problem in a distributed manner, decomposing the global problem into sub-problems at each node and iteratively optimizing through limited information exchange. After three iterations, the optimization decision variables u at each node (including pressure regulating valve opening, compressor speed, etc.) gradually converge. After optimization, the safety margin of each node is updated as follows:
[0086] At this point, the minimum security margin of the entire network increased from 0.21 to 0.35, effectively improving the security status of the weakest link and achieving the goal of global coordinated control.
[0087] S5: Establish a coupled mapping between flow velocity gradient and local dynamic stress to predict crack initiation location and time window. Based on the three-dimensional geometric model of the pipeline, the Km+35 region was divided into hexahedral mesh elements (5mm×5mm×5mm). An internal pressure of 9.2MPa and an additional dynamic pressure of 1.3MPa (from S1 prediction) caused by the velocity gradient were applied. The Mises stress distribution was calculated using the finite element method. The results show that stress concentration occurs on the elbow side of the inner wall of the pipeline (approximately 45° angle), with the maximum Mises stress amplitude... Exceeding the fatigue limit of X65 steel This location was determined to be a potential crack initiation point.
[0088] The stress-time history curve at this point was extracted, and the number of cycles was identified using the rainflow counting method. In the operational data of the most recent month, the distribution of cycle counts under different stress amplitudes was statistically obtained: 120 cycles for amplitudes of 320–340 MPa, 45 cycles for 340–360 MPa, and 12 cycles for 360–380 MPa. Combined with the material's SN curve (the fatigue life of X65 steel at the corresponding stress amplitudes is...),... Next, according to Miner's linear cumulative damage rule:
[0089]
[0090]
[0091] This value represents the cumulative damage increment within one month. The total cumulative damage is calculated based on historical operational data accumulated over 17 years (204 months). The failure rate is approaching the 1.0 failure threshold. Extrapolating from the current damage rate, the remaining time is approximately 880 months, or about 73 years. However, considering the recent production increase leading to a higher flow rate gradient and an overall increase in stress amplitude, the damage rate is showing an accelerating trend. A conservative estimate of the remaining fatigue life is approximately 4.2 years, consistent with the results of subsequent detailed assessments.
[0092] S6: Real-time statistics of flow velocity fluctuations, quantification of fatigue damage rate, and triggering of graded maintenance decisions. The effective fluctuation component of the flow velocity signal at Km+35 was extracted by bandpass filtering (0.1~10Hz), and then the main frequency components were obtained by Fast Fourier Transform (FFT): fundamental frequency 0.12Hz (amplitude 0.25m / s), second harmonic 0.24Hz (amplitude 0.12m / s), and third harmonic 0.36Hz (amplitude 0.06m / s). Based on the SN curve, the stress amplitude of each frequency band was mapped to the equivalent cycle number. Combined with rainflow counting, the asymmetric waveform was cyclically identified to obtain the newly added damage in the past 24 hours. .
[0093] The cumulative damage index is dynamically updated using a sliding time window (30 days), and a temperature correction factor is introduced. (Current pipe wall temperature 42℃) and H2S corrosion correction factor (H2S concentration 3.2 g / m³), the corrected daily damage equivalent is approximately The current cumulative damage slope shows a significant positive shift (15% higher than the average of the previous quarter), triggering an early warning from the system.
[0094] Based on the remaining life confidence interval (4.2 years ± 0.8 years) and the available spare parts cycle (the procurement cycle for critical valve spare parts is approximately 3 months), the system automatically generates a three-level maintenance recommendation: Level 1 Recommendation (Maintain Current Status): Maintain current operating parameters and increase the frequency of daily data monitoring; Level 2 Recommendation (Planned Maintenance Window): It is recommended to schedule internal inspection work within the next 3 to 6 months, focusing on checking the wall thickness and crack condition at the Km+35 elbow. Level 3 Recommendation (Emergency Shutdown and Gas Replacement): If the cumulative damage slope continues to increase or abnormal vibration signals appear, an emergency shutdown and gas replacement procedure should be initiated within 24 hours.
[0095] Based on the complete calculation and control process of S1 to S6 described above, the following analytical conclusions can be drawn: 1. Effective quantification and dynamic monitoring of safety margin: Current effective safety margin at node Km+35 It is in the low margin warning range, mainly affected by the high velocity gradient (1.8 s). - ¹) and a significant residual energy term (kinetic energy change rate 3.2 m² / s³) jointly drive the safety margin model. The model successfully integrates multidimensional physical quantities into a single continuous index, overcoming the limitations of traditional binary threshold judgments and achieving continuous quantification and graded early warning of operational risks. In practical applications, it can also generate... Figure 7 The safety margin distribution along the line graph shown below. Figure 7 The data is for illustrative purposes only.
[0096] 2. The velocity-pressure coupling model accurately captures transient disturbances: the pressure wave propagation time predicted by the approximate wave equation (8.4s) is in high agreement with the measured value (8.6s), and the peak pressure prediction error is less than 4%, verifying the effectiveness of the lightweight coupling model in real-time engineering applications. The feedforward compensation mechanism enables the actuator to complete its action before the pressure wave arrives, significantly improving the system's proactive response capability to sudden disturbances.
[0097] 3. Global coordinated regulation significantly improves the overall network security level: Through ADMM distributed optimization, the minimum security margin of the entire network is increased from 0.21 to 0.35, ensuring the security of the weakest node while taking into account overall operational efficiency. This verifies the engineering practicality and convergence speed of using "maximizing the minimum security margin of the entire network" as the objective function.
[0098] A closed loop is formed between structural integrity assessment and predictive maintenance: Velocity gradient-stress mapping combined with Miner's cumulative damage rule accurately identifies the inner wall of the elbow as a high-risk area for crack initiation and provides a quantitative estimate of the remaining fatigue life of 4.2 years. Real-time fatigue damage rate monitoring and a three-level maintenance decision-making mechanism provide an operational engineering basis for predictive maintenance of pipelines.
[0099] The above descriptions are merely embodiments of the present invention. Commonly known structures and characteristics of the solutions are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are aware of all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent.
Claims
1. A method for controlling the safety margin of gas transmission pipelines based on velocity coupling, characterized in that, include: S1. Construct a velocity-pressure coupled dynamic model. Predict the pressure response information of downstream nodes by the velocity change of upstream nodes, so as to predict the disturbance propagation path and pressure fluctuation warning. It also participates in the node control of the corresponding node automatic control system as a feedforward compensation. S2, each node deploys a safety margin state variable model, dynamically calculates the node safety margin based on real-time obtained flow velocity gradient, pressure data, disturbance propagation delay time and energy residual term represented by flow velocity change, and uses it for risk warning; S3 takes the node safety margin as the input of the corresponding node automatic control system and participates in node control when the preset conditions are met. The node automatic control system takes the safety margin deviation as the control target.
2. The gas pipeline safety margin control method based on velocity coupling according to claim 1, characterized in that, It also includes S4, which constructs a global optimization function with the objective of maximizing the minimum safety margin of the entire network. The alternating direction multiplier method is used to solve this global optimization function in a distributed manner, enabling distributed collaborative control of global nodes. By identifying the node with the minimum safety margin among all global nodes, the optimization decision variable u is adjusted to maximize the minimum safety margin. The global optimization function is as follows: in, Indicates the average safety margin; γ represents the standard deviation of the safety margin S(t) of each node; γ represents the preference coefficient; u represents the optimization decision variable.
3. The gas pipeline safety margin control method based on velocity coupling according to claim 1, characterized in that, In S1, the following approximate wave equation is used as the velocity-pressure coupled dynamic model: in: This represents the isentropic speed of sound, where k is the specific heat capacity. For steady-state density, Steady-state pressure; This represents the damping term, characterizing energy dissipation. Indicates the coefficient of friction. Indicates the inner diameter of the pipe; This represents the velocity disturbance driving term. The steady-state density; This indicates a small pressure disturbance. t represents the small disturbance of the flow velocity; t represents time. This indicates the axial coordinate of the pipe.
4. The gas pipeline safety margin control method based on velocity coupling according to claim 1, characterized in that, In S1, a simplified perturbation propagation time model and an influence weight matrix are introduced for global node responsibility tracing and priority scheduling. The simplified model of the disturbance propagation time is as follows: in, Indicates the propagation time of the disturbance. , Let represent the coordinates of upstream node i and downstream node j, respectively; c(x) + v(x) is the effective propagation speed of the pressure wave in the downstream direction, where c(x) represents the local isentropic speed of sound and v(x) represents the local medium velocity. Definition of influence weight matrix: in: This represents the contribution of upstream node i to the pressure disturbance of downstream node j; This indicates the amplitude of pressure disturbance at the upstream node; Indicates the pressure disturbance threshold; This represents the flow gradient at node i; Indicates the velocity gradient threshold; Indicates the disturbance propagation time; η and μ are both attenuation adjustment parameters; To prevent division by zero of constants.
5. The method for adjusting the safety margin of gas transmission pipelines based on velocity coupling according to claim 1, characterized in that, In S2, in practical engineering applications, the nodal safety margin at time t is calculated using the following formula. : In the formula, ∈[0,1], 1 = completely safe, 0 = on the verge of failure; Indicates the pressure at time t; Indicates the upper limit of the design pressure; This represents the velocity gradient at different positions x along the pipe at time t. Indicates the disturbance propagation delay time; Indicates the reference flow rate; Represents the energy residue term; Indicates flow rate; Represents the rate of change of kinetic energy; Indicates the time scale normalization factor; , , These are the weighting coefficients for the corresponding items.
6. The method for adjusting the safety margin of gas transmission pipelines based on velocity coupling according to claim 1, characterized in that, In S2, using node security margins for risk trend early warning includes at least one of the following: The corresponding level is determined based on the range of node safety margin, which is used to adjust control loop parameters. Set safety margin alarm thresholds and control thresholds. When the node safety margin is less than the alarm threshold, trigger the corresponding alarm and provide corresponding adjustment suggestions. When the node safety margin is less than the control threshold, trigger the control of the participating node.
7. The method for adjusting the safety margin of gas transmission pipelines based on velocity coupling according to claim 1, characterized in that, In S3, the node automatic control system adopts adaptive PID control; with the safety margin deviation as the control objective, the control error is defined as follows: in, Indicates the expected full margin; Indicates the actual safety margin at the current moment; This represents the control error, which is the deviation between the expected full margin and the actual full margin. The output control quantity is expressed by the following formula: In the formula, This indicates the control output, which represents the operating parameters of the pressure regulating valve or compressor. This indicates a proportional term, which is adjusted proportionally to the current error magnitude; the larger the error, the greater the adjustment. This represents the integral term, which responds to accumulated errors and is used to eliminate the steady-state error of the system. It represents the differential term and predicts the trend of error change.
8. The method for adjusting the safety margin of gas transmission pipelines based on velocity coupling according to claim 1, characterized in that, It also includes S5, which establishes a coupled mapping relationship between flow velocity gradient and local dynamic stress, and combines the material fatigue limit and Miner's cumulative damage rule to predict the crack initiation location and time window estimation in the high flow velocity gradient region.
9. The method for adjusting the safety margin of gas transmission pipelines based on velocity coupling according to claim 1, characterized in that, It also includes S6, which converts the frequency and amplitude of flow velocity fluctuations into stress cycle counts in real time, and combines them with Miner's cumulative damage rule to quantify fatigue damage rate, thereby predicting the remaining life of the pipeline and triggering graded maintenance decisions to achieve predictive maintenance.
10. A gas pipeline safety margin control system based on velocity coupling, characterized in that, The gas pipeline safety margin control method based on flow velocity coupling as described in any one of claims 1-9; the system includes: The velocity-pressure coupling module is used to construct a velocity-pressure coupled dynamic model. It predicts the pressure response information of downstream nodes by the velocity change of upstream nodes, so as to predict the disturbance propagation path and pressure fluctuation early warning, and determine the feedforward compensation. The safety margin module is used to deploy a safety margin state variable model on each node. Based on real-time obtained flow velocity gradient, pressure data, disturbance propagation delay time and energy residual term represented by flow velocity change, it dynamically calculates the node safety margin and uses it for risk warning. The node automatic control system is used to perform corresponding node control based on feedforward compensation; to perform corresponding node control based on node safety margin when preset conditions are met; and to use safety margin deviation as the control target. The global optimization module is used to construct a global optimization function with the goal of maximizing the minimum safety margin of the entire network. The distributed solution of the global optimization function using the alternating direction multiplier method is used to achieve distributed collaborative control of global nodes.