Hydrogen-containing natural gas pipeline water content monitoring method and system based on digital twinning

By constructing a digital twin physical model and combining it with Kalman filtering technology, the problem of monitoring the water content distribution along the entire hydrogen-blended natural gas pipeline was solved, enabling accurate reconstruction of the water content and risk identification along the entire pipeline, and providing reliable risk assessment support.

CN122859682BActive Publication Date: 2026-11-24NORTHWEST UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611355473.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-24
Estimated Expiration
2046-09-03

AI Technical Summary

Technical Problem

Existing monitoring methods cannot obtain the continuous water content distribution along the entire hydrogen-blended natural gas pipeline, making it difficult to identify risky sections of condensation and liquid accumulation, and thus unable to provide reliable support for corrosion and hydrogen embrittlement risk assessment.

Method used

By constructing a digital twin physical model and combining it with Kalman filtering technology, the difference between the actual and predicted values ​​is obtained through a sensor array. Parameter calibration is then performed to achieve accurate monitoring and risk identification of the water content across the entire line.

Benefits of technology

It achieves accurate reconstruction of the water content state of the entire line, can promptly identify risk areas of condensation and liquid accumulation, and provides reliable support for corrosion and hydrogen embrittlement risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122859682B_ABST
    Figure CN122859682B_ABST
Patent Text Reader

Abstract

This invention relates to the field of monitoring and digital twin technology for hydrogen-blended natural gas pipelines, specifically to a method and system for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins. The method includes: acquiring static and dynamic operating parameters of the pipeline, and constructing a digital twin physical model; the dynamic operating parameters include boundary operating parameters and operating parameters at a limited number of measuring points. Sensors are deployed to collect actual values ​​of the internal operating parameters at each measuring point. Initial time-varying boundary parameters to be inverted are preset. Combining the static and boundary operating parameters, the physical model is used to obtain a predicted value for discrete grid points along the entire pipeline, where the measuring points are subsets of the grid points. The difference between the actual and predicted values ​​at the measuring points is used to construct a residual sequence, which is then calibrated using Kalman filtering to obtain the time-varying boundary parameters. These parameters are re-input into the model for a second solution to obtain accurate values, which are then compared with a safety threshold for water content monitoring. This invention improves the accuracy of water content monitoring in hydrogen-blended natural gas pipelines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of monitoring and digital twin technology for hydrogen-blended natural gas pipelines, and particularly to a method and system for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins. Background Technology

[0002] Blending hydrogen with natural gas is an important technological approach for achieving low-carbon transmission and distribution, and utilizing existing natural gas pipelines can significantly reduce infrastructure construction costs. However, under hydrogen blending conditions, the density, viscosity, specific heat, and other physical properties of the mixed gas undergo nonlinear changes, altering the pressure and temperature distribution along the pipeline and significantly impacting the phase behavior of moisture within the pipeline. Natural gas pipelines commonly contain saturated water vapor and even small amounts of free water. Under conditions of fluctuating hydrogen blending ratios, start-up and shutdown, and load changes, water vapor easily condenses at localized cold spots in the pipeline (such as low-lying sections, bends, and near valves), forming liquid accumulation. This can lead to two-phase flow or slug flow, resulting in abnormal pressure drop, equipment vibration, and decreased metering accuracy. Simultaneously, the interaction of moisture with impurities such as CO2, H2S, and chloride ions in the gas creates an electrochemical corrosion environment on the inner wall of the pipeline. Furthermore, under high-pressure hydrogen-containing conditions, localized water film areas can exacerbate hydrogen embrittlement of steel, reducing pipeline fatigue life and making water-containing sections potentially sensitive failure sites.

[0003] Currently, existing monitoring methods mainly rely on online moisture meters, dew point meters, and offline sampling and testing, which are deployed in limited quantities at stations or at the end of pipelines. These methods can only obtain water content data at discrete measurement points and cannot cover sensorless areas along the entire line. Existing digital twin or simulation systems mainly focus on macroscopic operating conditions such as pressure and flow rate, and do not specifically model and solve the distribution of water mole fraction and dew point temperature along the pipeline. Furthermore, they lack a visual display of the water content status along the entire line. Summary of the Invention

[0004] This invention provides a method and system for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins. It addresses the problems that existing sensors, under limited deployment conditions, cannot obtain the continuous water content distribution along the entire length of the hydrogen-blended natural gas pipeline, making it difficult to identify risky sections of condensation and liquid accumulation in advance, and providing reliable support for corrosion and hydrogen embrittlement risk assessment and anomaly tracing.

[0005] The objective of this invention can be achieved through the following technical solutions:

[0006] The first aspect of this invention is to provide a method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins, comprising: Acquire static and dynamic operating parameters of the natural gas pipeline; construct a digital twin physical model; the dynamic operating parameters include operating parameters and boundary operating parameters of a limited number of measuring points inside the pipeline; deploy a sensor array and collect the actual values ​​of the internal operating parameters of each measuring point; The initial time-varying boundary parameters to be inverted in the digital twin physical model are preset, and combined with the pipeline static parameters and the boundary condition parameters at the current moment, the estimated values ​​of the internal condition parameters of the discrete grid points of the pipeline are obtained through the digital twin physical model; wherein, the set of measurement points is a subset of the set of discrete grid points; The residual sequence for each measuring point is formed by the difference between the actual value and the estimated value of the internal operating condition parameters. Based on the initial time-varying boundary parameters to be inverted and the residual sequence, calibration is performed using Kalman filtering to obtain the calibrated time-varying boundary parameters at the current time. The calibrated time-varying boundary parameters, pipeline static parameters, and boundary condition parameters at the current time are input into the digital twin physical model to obtain the precise values ​​of the internal condition parameters of the pipeline's discrete grid points. The water content of hydrogen-blended natural gas pipelines is monitored by comparing the precise values ​​of the internal operating parameters with preset safety thresholds.

[0007] Furthermore, the specific process for obtaining the residual sequence at each measurement point includes: Calculate the residual value of each measuring point at each time moment, and combine the residual values ​​of the same measuring point at several time moments into a residual sequence for each measuring point in chronological order; The residual value of each measuring point at each time point is the result of subtracting the estimated value from the actual value of the internal operating condition parameter of each measuring point.

[0008] Further, the step of calibrating using Kalman filtering based on the initial time-varying boundary parameters to be inverted and the residual sequence to obtain the calibrated time-varying boundary parameters at the current time includes: Obtain the topology from the static parameters of the natural gas pipeline; Based on the betweenness centrality, degree centrality, and proximity centrality of each node in the topology, the central importance of each node in the topology is obtained. The importance of the center of each node in the topology is obtained by interpolation through spatial nearest neighbor mapping or linear interpolation mapping. Based on the standard deviation of the data in the residual sequence of each measuring point, the central importance of each measuring point is adjusted to obtain the criticality of each measuring point; By adjusting the Kalman gain matrix in the Kalman filtering process according to the criticality of each measurement point, the adjusted weighted Kalman gain matrix is ​​obtained. The adjusted weighted Kalman gain matrix is ​​substituted into the Kalman filter for calibration to obtain the calibrated time-varying boundary parameters at the current time.

[0009] Furthermore, the central importance of each node in the topology is specifically expressed by the formula:

[0010] In the formula, This represents the number of all shortest paths from the inlet to the outlet in the pipeline's topology. This represents the nodes passed through in all shortest paths from the entrance to the exit. The number of shortest paths; Represents the relationship between nodes in the topology. The number of directly connected edges; Represents a linear normalization function. This represents the shortest distance from node v to node u. This represents the set of all nodes in the topology. This indicates the central importance of node v in the topology; This indicates the preset adjustment parameters.

[0011] Furthermore, the criticality of each measuring point is specifically expressed by the formula:

[0012] In the formula, This indicates the central importance of measuring point r. This represents the standard deviation of the data in the residual sequence at measurement point r. Represents a linear normalization function. This indicates the criticality of the measuring point r.

[0013] Furthermore, the adjusted weighted Kalman gain matrix is ​​specifically expressed by the following formula:

[0014]

[0015] In the formula, This represents the adjusted weighted Kalman gain matrix. Represents the prediction error covariance matrix; Represents the observation matrix; This is the transpose of the matrix; This represents the adjusted observation noise covariance matrix; This represents the initial value of the corresponding element in the observation noise covariance matrix for measurement point r; Indicates the criticality of measurement point r; This represents the adjustment value of the corresponding element in the observation noise covariance matrix for measurement point r. This is a preset parameter used to prevent the denominator or divisor from being 0.

[0016] Furthermore, the monitoring of the water content of the hydrogen-blended natural gas pipeline using the precise values ​​of the internal operating parameters and the preset safety threshold includes: The dew point margin is extracted from the precise values ​​of the internal operating parameters; When the dew point margin is less than the first preset safety threshold, a level 1 red alarm is issued; when the dew point margin is greater than or equal to the first preset safety threshold and less than the second preset safety threshold, a level 2 yellow warning is issued; when the dew point margin is greater than or equal to the second preset safety threshold and less than the third preset safety threshold, a level 3 blue warning is issued; when the dew point margin is greater than or equal to the third preset safety threshold, the system determines the state to be safe, no warning action is taken, and monitoring continues. The system continuously clusters the locations of discrete grid points that trigger alarms based on their corresponding mileage coordinates, outputting the range of continuous pipe segments; it highlights the alarm segments on the monitoring interface; it retrieves corresponding suggestions from a pre-set expert rule base based on the alarm type and location; and it continues monitoring at the next time point after the suggestions are issued. The continuous clustering is performed by merging elements by setting a distance threshold.

[0017] A second aspect of the present invention is to provide a digital twin-based system for monitoring the water content of hydrogen-blended natural gas pipelines, comprising: The data acquisition and model building module is used to acquire the static and dynamic operating parameters of the natural gas pipeline; construct a digital twin physical model; the dynamic operating parameters include the operating parameters and boundary operating parameters of a limited number of measuring points inside the pipeline; deploy a sensor array and collect the actual values ​​of the internal operating parameters of each measuring point; The sensor acquisition and residual sequence construction module is used to preset the initial time-varying boundary parameters to be inverted in the digital twin physical model, and combine them with the pipeline static parameters and the boundary condition parameters at the current moment to obtain the estimated values ​​of the internal condition parameters of the discrete grid points of the pipeline through the digital twin physical model; wherein, the set of measurement points is a subset of the set of discrete grid points; the residual sequence of each measurement point is formed by the difference between the actual value and the estimated value of the internal condition parameters. The parameter calibration and secondary solution module is used to calibrate the initial time-varying boundary parameters to be inverted and the residual sequence through Kalman filtering to obtain the calibrated time-varying boundary parameters at the current time; the calibrated time-varying boundary parameters, pipeline static parameters and the boundary condition parameters at the current time are input into the digital twin physical model to obtain the accurate values ​​of the internal condition parameters of the pipeline's discrete grid points; The water content monitoring module is used to monitor the water content of hydrogen-blended natural gas pipelines by comparing the precise values ​​of the internal operating parameters with preset safety thresholds.

[0018] A third aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins.

[0019] A fourth aspect of the present invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins.

[0020] Compared with existing technologies, the beneficial effects of this invention are: acquiring static and dynamic operating parameters of a natural gas pipeline; constructing a digital twin physical model; the dynamic operating parameters include operating parameters and boundary operating parameters of a finite number of measuring points inside the pipeline; deploying a sensor array and collecting the actual values ​​of the internal operating parameters of each measuring point; constructing a digital twin physical model using static and dynamic operating parameters, providing a basic computing platform for accurate reconstruction of the water-bearing state of the entire pipeline; presetting the initial time-varying boundary parameters to be inverted in the digital twin physical model, and combining the pipeline static parameters and the boundary operating parameters at the current moment, obtaining the estimated values ​​of the internal operating parameters of the discrete grid points of the pipeline through the digital twin physical model; wherein, the set of measuring points is a subset of the set of discrete grid points; using the measured values ​​of a finite number of measuring points as a calibration benchmark, and combining the boundary operating conditions to obtain the estimated values ​​of the discrete grid points along the entire pipeline, achieving full coverage of the state space under sparse sensor conditions; forming a residual sequence for each measuring point through the difference between the actual values ​​and the estimated values ​​of the internal operating parameters; and comparing the actual values ​​and the estimated values ​​of the measuring points. The residual sequence is constructed by subtraction, providing real-time deviation quantification for data assimilation and parameter calibration. Based on the initial time-varying boundary parameters to be inverted and the residual sequence, calibration is performed using Kalman filtering to obtain the calibrated time-varying boundary parameters at the current moment. The calibrated time-varying boundary parameters, pipeline static parameters, and the boundary condition parameters at the current moment are input into a digital twin physical model to obtain precise values ​​of the internal condition parameters of the pipeline's discrete grid points. Dynamic calibration of the time-varying boundary parameters using Kalman filtering and input into the model for secondary solution significantly improves the accuracy of the overall water content state reconstruction. The water content state of the hydrogen-blended natural gas pipeline is monitored using the precise values ​​of the internal condition parameters and a preset safety threshold. Comparison of the precise values ​​with the safety threshold enables real-time identification and quantitative assessment of the water content risk in the hydrogen-blended pipeline. This solves the problem that existing sensors, under limited deployment conditions, cannot obtain the continuous water content distribution of the entire hydrogen-blended natural gas pipeline, making it difficult to identify condensation and liquid accumulation risk sections in advance, and providing reliable support for corrosion and hydrogen embrittlement risk assessment and anomaly tracing. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart illustrating the steps of the method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins, as provided in this invention; Figure 2 A schematic diagram of the module flow of the hydrogen-blended natural gas pipeline water content monitoring system based on digital twin is provided for this invention. Figure 3 This is a one-dimensional trend curve chart; Figure 4 This is a partial view of a 3D GIS scene. Detailed Implementation

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

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] Addressing the existing problems in the background technology, namely, how to achieve online reconstruction of the water content state of the entire length of a hydrogen-blended natural gas pipeline under the condition of limited sensor deployment, timely identify risk sections of condensation and liquid accumulation, and provide reliable support for corrosion and hydrogen embrittlement risk assessment and water anomaly tracing, has become an urgent technical problem to be solved. Therefore, the research and design of a method and system for monitoring the water content state of hydrogen-blended natural gas pipelines based on digital twins has important practical significance.

[0026] like Figure 1 As shown, the first aspect of the present invention is to provide a method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins, comprising the following steps: Step S1: Obtain the static and dynamic operating parameters of the natural gas pipeline; construct a digital twin physical model; the dynamic operating parameters include the operating parameters and boundary operating parameters of a limited number of measuring points inside the pipeline; deploy a sensor array and collect the actual values ​​of the internal operating parameters of each measuring point.

[0027] It should be noted that the physical properties of the mixed gas after hydrogen blending will change nonlinearly with the hydrogen blending ratio, pressure, and temperature. In addition, the uneven distribution of hydraulic and thermal properties is caused by the topographic undulations, pipe diameter, wall thickness, and material differences along the pipeline. Therefore, it is necessary to obtain the pipeline topology geometry, material parameters, and real-time boundary conditions in advance. Based on this, a one-dimensional digital twin physical model coupling pipe flow and phase equilibrium is constructed as the calculation base for subsequent prediction of the water content of the entire pipeline.

[0028] Specifically, static and dynamic operating parameters of the natural gas pipeline are obtained. Static parameters include the pipeline's topology, geometric dimensions, and material properties. Dynamic operating parameters include operating parameters at a limited number of measuring points within the pipeline and boundary condition parameters. Operating parameters at the limited number of measuring points within the pipeline include internal pressure, temperature, flow rate, and water mole fraction. Boundary condition parameters include pressure, temperature, flow rate, and hydrogen blending ratio at the station inlet / outlet.

[0029] A sensor array is deployed, and the actual values ​​of the internal operating parameters of each measuring point are collected. Preprocessing operations such as moving average filtering for noise reduction and Lagrange interpolation for completion (missing duration ≤ 5 min) are performed.

[0030] It should be noted that the dynamic operating conditions of the pipeline are updated once per minute. However, in this embodiment, the update frequency of the pipeline is not specifically limited, and the implementer can determine it according to the specific circumstances.

[0031] Pressure and temperature were obtained using pressure and temperature sensors, respectively; flow rate was obtained using an ultrasonic flow meter; hydrogen doping ratio was obtained using a hydrogen concentration sensor / gas chromatograph; and water mole fraction was obtained using a TDLAS (Tunable Diode Laser Absorption Spectroscopy) water vapor analyzer (measurement range 0~1000ppm, accuracy ±1ppm) or an online dew point meter (measurement range -80~20℃, accuracy ±0.1℃).

[0032] A digital twin physical model is constructed. The specific process involves establishing a one-dimensional unsteady pipe flow partial differential equation system composed of the mass conservation continuity equation, momentum equation, and energy equation, coupled with the GERG-2008 multi-element phase equilibrium equations to form a complete digital twin physical model. The time step is set to 1-5 minutes, the spatial step to Δx, and the coupled iteration convergence criterion is a residual ≤10. -4 .

[0033] The mass conservation continuity equation, momentum equation, and energy equation are the flow control equations for the mixed gas (hydrogen + natural gas) in the pipe, describing the conservation relationships of mass, momentum, and energy when the mixed gas flows in the pipe. The GERG-2008 multi-phase equilibrium equation of state is the thermodynamic equation of state for the mixed gas (each component of natural gas + hydrogen), used to describe the physical properties (density, enthalpy, entropy, etc.) and gas-liquid phase equilibrium relationships of the mixed gas under different temperatures, pressures, and compositions.

[0034] The time step, 1-5 minutes, represents the time interval for each forward step in the numerical solution, meaning a state update of the entire pipeline is calculated every 1-5 minutes. A smaller step size results in higher accuracy but also higher computational cost; 1-5 minutes represents a trade-off for real-time monitoring requirements. The spatial step size, Δx, involves discretizing the pipeline along its length into several small segments, with a computation node (or discrete grid point) set at every Δx meters. A smaller Δx results in higher spatial resolution and a more refined reconstructed distribution along the pipeline. The coupling iteration convergence criterion is a residual of ≤10. -4 Within each time step, the flow field equations and phase equilibrium equations need to be solved iteratively until both are satisfied simultaneously. The residual is the maximum relative change of all node state variables between the current iteration step and the previous iteration step. When this change is ≤10... -4 Once the iteration is deemed converged, proceed to the next time step calculation.

[0035] This method utilizes a combination of BIM (Building Information Modeling) and GIS (Geographic Information System) technologies. ANSYS SpaceClaim (a modeling software) is used to construct a 3D pipeline geometric model, including the pipe's inner wall morphology, elbow curvature, valve structure, and terrain elevation. A structured mesh is then generated to obtain a meshed 3D pipeline geometric model. In this embodiment, the mesh resolution is ≥0.1m, and the number of meshes is ≥1 million. This meshed 3D pipeline geometric model (including inner wall morphology, elbows, valves, and terrain elevation) is used as a spatial discretization computational domain for solving the one-dimensional unsteady-state pipe flow partial differential equations in the construction of the digital twin physical model.

[0036] Based on the temperature, pressure, hydrogen integral number, and mole fraction of pure natural gas components in the mixed gas, the density, viscosity, and saturated vapor pressure of the mixed gas are output through a quantum-corrected PR equation. These obtained density, viscosity, and saturated vapor pressure are then used as input parameters in the construction of the digital twin physical model for the one-dimensional unsteady-state pipe flow partial differential equations and the GERG-2008 multivariate phase equilibrium equations; specifically, they are used to assign values ​​to the coefficients in the equations and to determine the critical conditions for phase equilibrium.

[0037] Among them, the quantum modified PR (Peng-Robinson Equation of State) equation is a well-known technique, and will not be described in detail here.

[0038] Thus, the digital twin physical model has been constructed.

[0039] Step S2: Preset the initial time-varying boundary parameters to be inverted in the digital twin physical model, and combine them with the pipeline static parameters and the boundary condition parameters at the current time. Through the digital twin physical model, obtain the estimated value of the internal condition parameters of the discrete grid points of the pipeline; wherein, the set of measurement points is a subset of the set of discrete grid points; the residual sequence of each measurement point is formed by the difference between the actual value and the estimated value of the internal condition parameters.

[0040] It should be noted that since the predicted values ​​of a single forward-solving model (digital twin physical model, i.e., a pure theoretical calculation model without data assimilation calibration) will inevitably have biases, and the measured values ​​at a limited number of measurement points can reflect the local true state but cannot cover the entire line, it is necessary to compare the measured values ​​and predicted values ​​at the measurement points hour by hour to quantify the spatiotemporal evolution of the model bias in the form of residuals, so as to provide an error evolution benchmark for the data assimilation parameter calibration in subsequent steps.

[0041] Specifically, the initial time-varying boundary parameters to be inverted in the digital twin physical model are preset, and the preset initial values ​​are as follows: the preset initial value of the soil comprehensive heat transfer coefficient is 2.0 W / (m²·K); the preset initial value of the equivalent inner wall roughness is 0.02 mm; and the preset initial value of the transport correction coefficient is 1.0.

[0042] Based on the initial time-varying boundary parameters to be inverted, the pipeline static parameters, and the boundary condition parameters at the current moment, the estimated values ​​of the internal condition parameters of the pipeline's discrete grid points are obtained through a digital twin physical model. The discrete grid points of the pipeline are determined by a spatial step size Δx—the pipeline is divided into equal intervals along its length using a fixed spatial step size, with each step endpoint being a discrete grid point. The total number of discrete points = total pipeline length / Δx + 1. Δx is determined by a comprehensive trade-off between computational accuracy and real-time requirements, and is not specifically limited in this embodiment; implementers can determine it according to specific circumstances.

[0043] The residual sequence for each measuring point is formed by the difference between the actual and estimated values ​​of the internal operating parameters; specifically including: The actual and estimated values ​​of each measuring point at the current time and several previous times are obtained using the above method; the residual value of each measuring point at each time is calculated, and the residual values ​​of the same measuring point at several times are arranged in chronological order to form the residual sequence of each measuring point; The residual value of each measuring point at each time point is the result of subtracting the estimated value from the actual value of the internal operating condition parameter of each measuring point.

[0044] The specific solution process for the digital twin physical model is as follows: The current boundary condition parameters (inlet / outlet pressure, temperature, total flow rate, and hydrogen doping ratio) are substituted into the digital twin physical model (a one-dimensional unsteady pipe flow partial differential equation system + GERG-2008 state equation coupling body), and the implicit difference method is used for numerical solution. The estimated values ​​of pressure, temperature and moisture mole fraction at all internal measuring points along the line at the current moment are obtained by calculation.

[0045] At this point, the residual sequence of each measuring point at the current moment is obtained.

[0046] Step S3: Based on the initial time-varying boundary parameters to be inverted and the residual sequence, perform calibration using Kalman filtering to obtain the calibrated time-varying boundary parameters at the current time; input the calibrated time-varying boundary parameters, pipeline static parameters, and the boundary condition parameters at the current time into the digital twin physical model to obtain the precise values ​​of the internal condition parameters of the pipeline's discrete grid points.

[0047] It should be noted that due to the uncertainty of time-varying boundary parameters in the purely theoretical digital twin model (such as fluctuations in soil heat transfer coefficient and changes in pipe wall roughness), prediction biases occur. Furthermore, the prediction biases at different measuring points have varying degrees of impact on the accuracy of the overall system's water content reconstruction. Therefore, it is necessary to use the weighting factor of the criticality of each measuring point as the basis for adjusting the calibration priority. The boundary parameters are then weighted and corrected using the measured values ​​as observation constraints through a data assimilation algorithm and fed back to the model to minimize the reconstruction error at critical locations.

[0048] Specifically, the topology of the natural gas pipeline is obtained from its static parameters; based on the betweenness centrality, degree centrality, and proximity centrality of each node in the topology, the central importance of each node in the topology is obtained.

[0049] The central importance of each node in the topology is obtained by interpolation through spatial nearest neighbor mapping or linear interpolation mapping. The central importance of each measurement point is then adjusted according to the standard deviation of the data in the residual sequence of each measurement point to obtain the criticality of each measurement point.

[0050] By adjusting the Kalman gain matrix in the Kalman filtering process according to the criticality of each measurement point, the adjusted weighted Kalman gain matrix is ​​obtained. The adjusted weighted Kalman gain matrix is ​​then substituted into the Kalman filter for calibration to obtain the calibrated time-varying boundary parameters at the current time.

[0051] The central importance of each node in the topology is obtained based on its betweenness centrality, degree centrality, and proximity centrality; specifically, this is expressed by the following formula:

[0052] In the formula, This represents the number of all shortest paths from the inlet to the outlet in the pipeline's topology. This represents the nodes passed through in all shortest paths from the entrance to the exit. The number of shortest paths; Represents the relationship between nodes in the topology. The number of directly connected edges; Represents a linear normalization function. This represents the shortest distance from node v to node u. This represents the set of all nodes in the topology. This indicates the central importance of node v in the topology; This represents a preset adjustment parameter. The purpose of setting the preset adjustment parameter is to prevent the shortest path that does not pass through the node from affecting the subsequent degree centrality and proximity centrality judgment analysis; in this embodiment... In this embodiment, the preset adjustment parameters are not specifically limited, and the implementer can determine them according to the specific circumstances.

[0053] in, Indicates the betweenness centrality of each node. Indicate the degree centrality of each node. This represents the proximity centrality of each node. The greater the betweenness centrality, degree centrality, and proximity centrality of each node, the greater the central importance of each node in the topology.

[0054] The specific process of interpolation using spatial nearest neighbor mapping or linear interpolation mapping is as follows: Nearest neighbor mapping: Associating a measurement point with the nearest topological node, the central importance of the measurement point is directly equal to the central importance of the nearest topological node.

[0055] Linear interpolation mapping: When a measurement point is located between two adjacent topological nodes, weights are assigned through distance weighting (based on the reciprocal of the distance to the two end topological nodes). The specific formula for the central importance of the measurement point is:

[0056] in , The distance from the measurement point to the topological nodes at both ends is... , The importance of the center of the topological nodes at both ends; This indicates the central importance of the measuring point r.

[0057] Specifically, the central importance of each measuring point is adjusted based on the standard deviation of the data in the residual sequence of each measuring point to obtain the criticality of each measuring point; this is expressed by the following formula:

[0058] In the formula, This indicates the central importance of measuring point r. This represents the standard deviation of the data in the residual sequence at measurement point r. Represents a linear normalization function. This indicates the criticality of the measuring point r.

[0059] It should be noted that during data assimilation and parameter calibration, the residual between the model's prior predictions and the measured values ​​at the measurement points reflects the model's approximation of the true physical state at that location. When the standard deviation of the residual sequence at a measurement point is large, it means that the model's prediction bias fluctuates drastically at that point, the model's adaptability at that location is poor, or it is significantly affected by boundary perturbations. In this case, the measurement point is a weak link with "high uncertainty" in the state reconstruction of the entire system. According to the principle of "prioritizing calibration at the point with the scarcest information" in data assimilation theory, such measurement points should be given higher calibration priority in Kalman filtering to maximize the transmission of the correction effect to the entire system; therefore, their criticality is greater.

[0060] It should be further noted that the node center importance calculated solely based on topology is a static structural indicator, reflecting the inherent importance under the geometric connection relationship of the pipeline network. It cannot perceive the differences in the degree to which each measuring point is affected by boundary condition fluctuations during actual operation, resulting in insufficient representation ability in dynamic scenarios and a lack of adaptability to real-time changes in operating conditions. Therefore, it is necessary to dynamically weight and correct the static topology center importance using the actual prediction deviation fluctuation represented by the standard deviation of the residual sequence at each node. This ensures that the final criticality retains the basic importance at the structural level while incorporating real-time changes in operational data, thereby obtaining a more accurate criticality assessment of each node under current operating conditions.

[0061] It should be noted that, since time-varying boundary parameters (heat transfer coefficient, roughness, and output correction coefficient) exist in the digital twin physical model and cannot be obtained through direct measurement, and there is a dynamic deviation between the measured values ​​at a limited number of measurement points and the model predictions, it is necessary to use the Kalman filter algorithm. The measured values ​​are used as observation constraints, and the observation residuals are transformed into the optimal correction amount for the above-mentioned uncertain parameters through the weighted gain matrix. This achieves dynamic closed-loop calibration of the model boundary parameters, so that the digital twin continuously approximates the real state of the physical entity in each time step.

[0062] Specifically, the initial covariance matrix is ​​preset in the Kalman filtering process; the initial covariance matrix, the initial time-varying boundary parameters to be inverted, and the residual sequence are calibrated by Kalman filtering to obtain the calibrated time-varying boundary parameters at the current time; the calibrated time-varying boundary parameters, pipeline static parameters, and boundary condition parameters at the current time are input into the digital twin physical model to obtain the accurate values ​​of the internal condition parameters of the pipeline's discrete grid points.

[0063] The specific formula for the Kalman gain matrix in existing methods for calibration via Kalman filtering is as follows:

[0064] In the formula, This represents the Kalman gain matrix, used to balance the weights of predicted and measured values; Let represent the prediction error covariance matrix, and let represent the prediction accuracy up to time k. This represents the observation matrix, which maps the state vectors in the state space to the observation space. It is used to combine observations during the update phase. This is the transpose of the matrix; The observation noise covariance matrix represents the error and uncertainty during the observation process.

[0065] It should be noted that the observation noise covariance matrix is ​​an invariant value, and the values ​​in the observation noise covariance matrix are set empirically.

[0066] In the process of calibration via Kalman filtering, the rows and columns of the matrix are as follows: The number of rows equals the total number of measurement points × 3 (each measurement point has three observation values: pressure, temperature, and moisture), and the number of columns equals the dimension of the state vector (3 time-varying boundary parameters to be inverted).

[0067] By using the criticality of each measurement point as a critical weight, the observation noise covariance matrix is ​​adjusted to obtain the adjusted observation noise covariance matrix, which is also the adjusted Kalman gain matrix, denoted as the weighted Kalman gain matrix; specifically expressed by the formula:

[0068]

[0069] In the formula, This represents the adjusted weighted Kalman gain matrix. Represents the prediction error covariance matrix; Represents the observation matrix; This is the transpose of the matrix; This represents the adjusted observation noise covariance matrix; This represents the initial value of the corresponding element in the observation noise covariance matrix for measurement point r; Indicates the criticality of measurement point r; This represents the adjustment value of the corresponding element in the observation noise covariance matrix for measurement point r. These are preset parameters used to prevent the denominator or divisor from being zero. The value is 0.05.

[0070] It should be noted that the logic for adjusting the observation noise covariance matrix is ​​as follows: at the same update time, the measurement points with higher criticality have higher centrality and residual volatility in the topology, and thus have greater information constraint value for the reconstruction of the water-bearing state of the entire line. Compared with measurement points with lower criticality, they should be assigned higher observation confidence to reduce their equivalent observation noise, thereby occupying a higher weight in the Kalman gain matrix. This allows their measured values ​​to play a dominant role in the state update, driving the boundary parameters to be adjusted preferentially in the direction of eliminating the deviation of the critical location. Ultimately, this achieves differentiated allocation of calibration resources among different measurement points, prioritizing the reconstruction accuracy of weak links.

[0071] Thus, the precise values ​​of the internal operating parameters of the discrete grid points of the pipeline are obtained.

[0072] Step S4: Monitor the water content of the hydrogen-blended natural gas pipeline by using the precise values ​​of the internal operating parameters and the preset safety threshold.

[0073] It should be noted that since the precise values ​​of the internal operating parameters of the discrete grid points obtained after the secondary solution have fully characterized the water content along the pipeline, and the precise values ​​have undergone data assimilation and calibration, they can truly reflect the current water content situation; therefore, it is necessary to compare them point by point with the preset safety threshold to identify the safety status of the water content in each section of the entire line, promptly detect potential hazards such as condensate accumulation risk, pipe hydrogen embrittlement corrosion risk, or excessive moisture content, and provide data support and decision-making basis for subsequent early warning and control and operating condition regulation.

[0074] Specifically, the dew point margin is extracted from the precise values ​​of the internal operating parameters; where the dew point margin is the result of subtracting the dew point temperature from the pipe wall operating temperature; where the pipe wall operating temperature is the calculated pipe temperature, and the dew point temperature is a derived quantity calculated from the mole fraction of water using the equation of state.

[0075] When the dew point margin is less than the first preset safety threshold, a level 1 red alarm is issued; when the dew point margin is greater than or equal to the first preset safety threshold and less than the second preset safety threshold, a level 2 yellow warning is issued; when the dew point margin is greater than or equal to the second preset safety threshold and less than the third preset safety threshold, a level 3 blue warning is issued; when the dew point margin is greater than or equal to the third preset safety threshold, the system determines the state to be safe, no warning action is taken, and monitoring continues.

[0076] The discrete grid points that trigger alarms are continuously clustered based on their corresponding mileage coordinates, outputting the range of continuous pipe segments. Alarm segments are highlighted on the monitoring interface. Based on the alarm type and location, corresponding suggestions are retrieved from a pre-set expert rule base. After a suggestion is issued, the system continues running and monitoring continues for the next time step. The continuous clustering is performed by setting a distance threshold, where the set distance threshold is one spatial step size Δx.

[0077] In this embodiment, the first preset safety threshold is 0℃; the second preset safety threshold is 2℃; and the third preset safety threshold is 5℃. In this embodiment, the first, second, and third preset safety thresholds are not specifically limited, and the implementer can determine them according to the specific circumstances.

[0078] Optionally, further early warning can be provided by using the precise value of the internal operating condition parameter, the water mole fraction; specifically, a red alarm is issued when the water mole fraction is higher than a preset safety threshold; wherein, the preset safety threshold is 50 mg / m³, and in this embodiment, the preset safety threshold is not specifically limited, but can be determined by the implementer according to the specific circumstances.

[0079] The graded early warning system uses dew point margin as the sole primary criterion, with Level 3 (blue), Level 2 (yellow), and Level 1 (red) corresponding to different stages of condensate accumulation risk from low to high. However, the risk of hydrogen embrittlement corrosion and excessive moisture content in pipes are not directly determined by dew point margin, but rather by whether the molar fraction of moisture exceeds the upper limit of the standard.

[0080] Based on the precise values ​​of internal operating parameters, a one-dimensional trend curve and a partial view in a 3D GIS scene are plotted, and the current status (green safety → blue / yellow warning → red risk alarm) is rendered and displayed synchronously. The one-dimensional trend curve is shown below. Figure 3 As shown; a partial view of the 3D GIS scene is shown below. Figure 4 As shown.

[0081] The implementation process and verification data are detailed below: This embodiment uses a hydrogen-blended natural gas pipeline in actual operation as an example to apply the method of the present invention for water content monitoring.

[0082] Initial values ​​of time-varying boundary parameters to be inverted: soil comprehensive heat transfer coefficient 2.0 W / (m²·K), equivalent inner wall roughness 0.02 mm, and transport correction factor 1.0.

[0083] 1. Implementation process and data: (1) Forward prediction stage; At time t0, the boundary condition parameters are input into the digital twin physical model for forward solving to obtain the estimated values ​​of pressure, temperature and moisture mole fraction at 229 discrete grid points along the entire line.

[0084] (2) Residual sequence construction; The estimated and measured data for 30 consecutive time points before t0 (i.e., within the past 90 minutes) are taken, and the residual values ​​for each measuring point are calculated point by point according to the method of this invention to form a residual sequence for each measuring point. Taking the measuring point at 12.4 km as an example, the standard deviation of its moisture residual sequence σ = 3.8 ppm.

[0085] (3) Calculation of the criticality of the measuring point; Based on the pipeline topology, calculate the central importance Z of each node. v Taking the node at 12.4km as an example, this node is located in the middle of the pipeline, near a low-lying section, and has a high betweenness centrality, with a calculated Z=0.72. Combined with the standard deviation of the residual sequence at this measuring point σ=3.8ppm, the criticality G=0.68 is calculated after normalization.

[0086] Similarly, the six measuring points along the entire line are ranked from highest to lowest importance as follows: 12.4km (G=0.68), 28.7km (G=0.62), 39.2km (G=0.55), 22.5km (G=0.48), 5.2km (G=0.35), and 45.6km (G=0.30).

[0087] (4) Kalman filter weighted calibration; Based on the criticality of each measurement point, the observation noise covariance matrix R is weighted and adjusted. Measurement points with higher criticality have lower equivalent observation noise, thus achieving higher gain in the Kalman filter. Taking a 12.4km measurement point as an example, its R value is adjusted from the initial empirical value of 0.5 to R'=0.5 / (0.68+0.05)=0.685. After adjustment, the Kalman filter recursive formula is entered to calibrate the time-varying boundary parameters to be inverted in real time. The overall soil heat transfer coefficient was calibrated from the initial 2.0 W / (m²·K) to 2.35 W / (m²·K); The equivalent inner wall roughness was calibrated from the initial 0.02 mm to 0.027 mm; The output correction factor was calibrated from the initial 1.0 to 0.97.

[0088] (5) Secondary solution and accuracy verification; The calibrated time-varying boundary parameters were re-input into the digital twin physical model for a second solution to obtain accurate values ​​of the internal working parameters of the discrete grid points along the entire line. Table 1 shows a comparison of the errors at each measuring point before and after calibration.

[0089] Table 1 Comparison of model prediction errors before and after calibration

[0090] Table 1 is a comparison using a measuring point at 12.4 km as an example.

[0091] For all 229 discrete grid points along the entire line, after calibration, the average relative error of pressure decreased from 0.95% to 0.25%, the average relative error of temperature decreased from 2.90% to 0.65%, and the average relative error of moisture mole fraction decreased from 4.46% to 0.89%.

[0092] (6) Water content monitoring and early warning; The dew point margin (pipe wall operating temperature minus dew point temperature) of each discrete grid point is extracted from the secondary solution results. Taking the low-lying section at 12.4 km as an example, the pipe wall temperature at this point after the secondary solution is 13.6℃. The dew point temperature is calculated as 12.8℃ using the GERG-2008 equation of state based on the water mole fraction of 77.8 ppm, and the dew point margin is 0.8℃.

[0093] According to the tiered early warning criteria of this invention: a value greater than or equal to 0℃ and less than 2℃ triggers a level-two yellow warning. Combining the dew point margin data of adjacent grid points, continuous clustering outputs a warning pipeline section range of 12.1km~12.8km. This section is highlighted on the monitoring interface, and suggestions are output based on the preset expert rule base: "It is recommended to check the integrity of the insulation layer of this section, appropriately increase the inlet temperature by 1~2℃, or reduce the operating pressure by 0.1~0.2MPa to reduce water separation." The system continues to run and monitors the next moment without stopping.

[0094] 2. Validation Data and Effect Analysis To verify the technical effectiveness of the method of the present invention, continuous online monitoring for 720 hours (30 days) was carried out on the pipeline of the embodiment. The main verification data are as follows: (1) Verification of the accuracy of water content state reconstruction across the entire line; The precise value of the total water mole fraction output by the method of this invention was compared with the test data obtained by manual sampling (temporary sampling points were set up every 2 km along the pipeline, for a total of 23 sampling points) during the pipeline shutdown and maintenance period. The results show that: (11) The average absolute deviation of the moisture mole fraction at the 23 sampling points was 1.2 ppm, and the maximum absolute deviation was 2.8 ppm (occurring near the bend at 28.7 km). (12) The distribution trend of moisture mole fraction along the entire line is consistent with the results of manual sampling, with a correlation coefficient R² = 0.97; (13) The pipeline dew point temperature prediction was compared with the measured value by a cold mirror dew point meter (accuracy ±0.1℃). The average deviation was 0.15℃ and the maximum deviation was 0.4℃.

[0095] (2) Verification of the effectiveness of the early warning; During the 720-hour verification period, the system triggered 47 warnings at various levels. This was verified on-site. The Level 1 Red Alert was triggered twice (both located in the 28.7km low-lying section). Manual inspection confirmed that there was a significant condensation film on the inner wall of the pipe in this section, and the verification results were consistent with the alert. The Level II Yellow Alert was triggered 28 times, of which 26 were manually confirmed to show initial signs of fluid accumulation, resulting in an alert accuracy rate of 92.9%. The Level III blue alert was triggered 17 times, of which 14 were confirmed by manual verification of the risk of condensation, resulting in an alert accuracy rate of 82.4%.

[0096] (3) Kalman filter convergence verification; The stability of the filter was verified by monitoring the convergence of the time-varying boundary parameters during the Kalman filtering process. The overall soil heat transfer coefficient rapidly converged from 2.0 W / (m²·K) to the range of 2.30~2.45 W / (m²·K) within the first 15 time periods, and then remained stable. The equivalent inner wall roughness converged from 0.02 mm to the range of 0.025~0.029 mm within the first 20 time periods, and then fluctuated slightly with the operating conditions thereafter. The output correction coefficient converges from 1.0 to the range of 0.95 to 0.99 within the initial 10 time intervals, and the response speed meets the requirements of real-time monitoring.

[0097] (4) Operational efficiency indicators; The average time taken for the complete calculation process (forward prediction → residual calculation → Kalman filter calibration → secondary solution) is 47.3 seconds, which is much less than the 3-minute time step and has real-time monitoring capability. The update delay between the one-dimensional trend curve and the three-dimensional GIS scene rendering on the monitoring interface is less than 1 second, which meets the needs of engineering visualization.

[0098] (5) Comparative verification (compared with existing methods); To demonstrate the superiority of this invention over existing methods, the method of this invention is compared with the following two comparative methods: Comparison Method 1: Pure digital twin physical model without Kalman filter calibration; Comparison Method 2: The calibration scheme using the standard Kalman filter.

[0099] Under the same operating conditions, using the moisture mole fraction test values ​​from all 23 sampling points along the entire route as true values, the prediction accuracy of the three methods is compared as follows: Table 2 Comparison of the accuracy of moisture prediction using different methods

[0100] The verification results show that the method of the present invention improves the overall accuracy by 71.4% compared with the pure model method (comparison method 1) and by 50.0% compared with the standard Kalman filter method (comparison method 2). The accuracy improvement in key sections (low-lying sections, near bends) is more significant, and the false alarm rate of the warning is greatly reduced. This fully demonstrates the effectiveness of the present invention in prioritizing the calibration of key positions through weighted Kalman filtering.

[0101] In summary, this embodiment fully discloses the entire process from parameter acquisition, model construction, sensor acquisition, data assimilation and calibration to water content monitoring. Verification data shows that the method of this invention can achieve high-precision online reconstruction of the water content of the entire hydrogen-blended natural gas pipeline under limited sensor deployment conditions. The dew point margin prediction deviation is ≤0.4℃, the average deviation of the water mole fraction across the entire pipeline is ≤1.2 ppm, and the early warning accuracy rate is over 82%. It effectively solves the technical problem that existing technologies cannot obtain the water content distribution across the entire pipeline under sparse sensor conditions, and has the feasibility and reliability for industrial applications.

[0102] This concludes the embodiment.

[0103] like Figure 2 As shown, a second aspect of the present invention is to provide a digital twin-based system for monitoring the water content of hydrogen-blended natural gas pipelines, comprising: The data acquisition and model building module 101 is used to acquire the static parameters and dynamic operating parameters of the natural gas pipeline; construct a digital twin physical model; the dynamic operating parameters include the operating parameters and boundary operating parameters of a limited number of measuring points inside the pipeline; deploy a sensor array and collect the actual values ​​of the internal operating parameters of each measuring point; The sensor acquisition and residual sequence construction module 102 is used to preset the initial time-varying boundary parameters to be inverted in the digital twin physical model, and combine the pipeline static parameters and the boundary condition parameters at the current moment to obtain the estimated values ​​of the internal condition parameters of the discrete grid points of the pipeline through the digital twin physical model; wherein, the set of measuring points is a subset of the set of discrete grid points; the residual sequence of each measuring point is formed by the difference between the actual value and the estimated value of the internal condition parameters. The parameter calibration and secondary solution module 103 is used to calibrate the initial time-varying boundary parameters to be inverted and the residual sequence through Kalman filtering to obtain the calibrated time-varying boundary parameters at the current time; and input the calibrated time-varying boundary parameters, pipeline static parameters and the boundary condition parameters at the current time into the digital twin physical model to obtain the accurate values ​​of the internal condition parameters of the discrete grid points of the pipeline. The water content monitoring module 104 is used to monitor the water content of hydrogen-blended natural gas pipelines by using the precise values ​​of the internal operating parameters and preset safety thresholds.

[0104] A third aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins.

[0105] A fourth aspect of the present invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements a method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins.

[0106] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.

[0107] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, systems, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0108] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0109] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for monitoring the water content of a hydrogen-doped natural gas pipeline based on digital twinning, characterized in that, include: Acquire static and dynamic operating parameters of the natural gas pipeline; construct a digital twin physical model; the dynamic operating parameters include operating parameters and boundary operating parameters of a limited number of measuring points inside the pipeline; deploy a sensor array and collect the actual values ​​of the internal operating parameters of each measuring point; The initial time-varying boundary parameters to be inverted in the digital twin physical model are preset, and combined with the pipeline static parameters and the boundary condition parameters at the current moment, the estimated values ​​of the internal condition parameters of the discrete grid points of the pipeline are obtained through the digital twin physical model; wherein, a subset of the discrete grid point set constitutes the measurement point set; The residual sequence for each measuring point is formed by the difference between the actual value and the estimated value of the internal operating condition parameters. Based on the initial time-varying boundary parameters to be inverted and the residual sequence, calibration is performed using Kalman filtering to obtain the calibrated time-varying boundary parameters at the current time, including: Obtain the topology from the static parameters of the natural gas pipeline; Based on the betweenness centrality, degree centrality, and proximity centrality of each node in the topology, the central importance of each node in the topology is obtained. The importance of the center of each node in the topology is obtained by interpolation through spatial nearest neighbor mapping or linear interpolation mapping. Based on the standard deviation of the data in the residual sequence of each measuring point, the central importance of each measuring point is adjusted to obtain the criticality of each measuring point; By adjusting the Kalman gain matrix in the Kalman filtering process according to the criticality of each measurement point, the adjusted weighted Kalman gain matrix is ​​obtained. Substitute the adjusted weighted Kalman gain matrix into the Kalman filter for calibration to obtain the calibrated time-varying boundary parameters at the current time. The central importance of each node in the topology is specifically expressed by the following formula: wherein, denotes the number of all shortest paths from the inlet to the outlet in the topology of the pipeline; denotes the number of shortest paths from the inlet to the outlet that pass through node ; denotes the number of edges in the topology that are directly connected to node ; denotes a linear normalization function, denotes the shortest distance from node v to node u, denotes the set of all nodes in the topology, denotes the central importance of node v in the topology; denotes a preset adjustment parameter; The importance of the center of the measuring point is specifically expressed by the formula: wherein , is the distance from the measuring point to the two-end topology node, , is the central importance of the two-end topology node; denotes the central importance of the measuring point r; The criticality of each measuring point is specifically expressed by the following formula: In the formula, This indicates the central importance of measuring point r. This represents the standard deviation of the data in the residual sequence at measurement point r. Represents a linear normalization function. Indicates the criticality of measurement point r; The adjusted weighted Kalman gain matrix is ​​specifically expressed by the following formula: In the formula, This represents the adjusted weighted Kalman gain matrix. Represents the prediction error covariance matrix; Represents the observation matrix; This is the transpose of the matrix; This represents the adjusted observation noise covariance matrix; This represents the initial value of the corresponding element in the observation noise covariance matrix for measurement point r; Indicates the criticality of measurement point r; This represents the adjustment value of the corresponding element in the observation noise covariance matrix for measurement point r. These are preset parameters used to prevent the denominator or divisor from being zero; The calibrated time-varying boundary parameters, pipeline static parameters, and current boundary condition parameters are input into the digital twin physical model to obtain the precise values ​​of the internal condition parameters of the pipeline's discrete grid points. The water content of hydrogen-blended natural gas pipelines is monitored by comparing the precise values ​​of the internal operating parameters with preset safety thresholds.

2. The method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins according to claim 1, characterized in that, The specific process for obtaining the residual sequence at each measurement point includes: Calculate the residual value of each measuring point at each time moment, and combine the residual values ​​of the same measuring point at several time moments into a residual sequence for each measuring point in chronological order; The residual value of each measuring point at each time point is the result of subtracting the estimated value from the actual value of the internal operating condition parameter of each measuring point.

3. The method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins according to claim 1, characterized in that, The monitoring of water content in hydrogen-blended natural gas pipelines using precise values ​​of internal operating parameters and preset safety thresholds includes: The dew point margin is extracted from the precise values ​​of the internal operating parameters; When the dew point margin is less than the first preset safety threshold, a level 1 red alarm is issued; when the dew point margin is greater than or equal to the first preset safety threshold and less than the second preset safety threshold, a level 2 yellow warning is issued; when the dew point margin is greater than or equal to the second preset safety threshold and less than the third preset safety threshold, a level 3 blue warning is issued; when the dew point margin is greater than or equal to the third preset safety threshold, the system determines the state to be safe, no warning action is taken, and monitoring continues. The system continuously clusters the locations of discrete grid points that trigger alarms based on their corresponding mileage coordinates, outputting the range of continuous pipe segments; it highlights the alarm segments on the monitoring interface; it retrieves corresponding suggestions from a pre-set expert rule base based on the alarm type and location; and it continues monitoring at the next time point after the suggestions are issued. The continuous clustering is performed by merging elements by setting a distance threshold.

4. A digital twin-based water content monitoring system for hydrogen-blended natural gas pipelines, used to implement the digital twin-based water content monitoring method for hydrogen-blended natural gas pipelines as described in any one of claims 1-3, characterized in that, include: The data acquisition and model building module is used to acquire the static and dynamic operating parameters of the natural gas pipeline; construct a digital twin physical model; the dynamic operating parameters include the operating parameters and boundary operating parameters of a limited number of measuring points inside the pipeline; deploy a sensor array and collect the actual values ​​of the internal operating parameters of each measuring point; The sensor acquisition and residual sequence construction module is used to preset the initial time-varying boundary parameters to be inverted in the digital twin physical model, and combine them with the pipeline static parameters and the boundary condition parameters at the current moment to obtain the estimated values ​​of the internal condition parameters of the discrete grid points of the pipeline through the digital twin physical model; wherein, a subset of the discrete grid point set forms the measurement point set; and the residual sequence of each measurement point is formed by the difference between the actual value and the estimated value of the internal condition parameters. The parameter calibration and secondary solution module is used to calibrate the initial time-varying boundary parameters to be inverted and the residual sequence using Kalman filtering to obtain the calibrated time-varying boundary parameters at the current time, including: Obtain the topology from the static parameters of the natural gas pipeline; Based on the betweenness centrality, degree centrality, and proximity centrality of each node in the topology, the central importance of each node in the topology is obtained. The importance of the center of each node in the topology is obtained by interpolation through spatial nearest neighbor mapping or linear interpolation mapping. Based on the standard deviation of the data in the residual sequence of each measuring point, the central importance of each measuring point is adjusted to obtain the criticality of each measuring point; By adjusting the Kalman gain matrix in the Kalman filtering process according to the criticality of each measurement point, the adjusted weighted Kalman gain matrix is ​​obtained. Substitute the adjusted weighted Kalman gain matrix into the Kalman filter for calibration to obtain the calibrated time-varying boundary parameters at the current time. The central importance of each node in the topology is specifically expressed by the following formula: In the formula, This represents the number of all shortest paths from the inlet to the outlet in the pipeline's topology. This represents the nodes passed through in all shortest paths from the entrance to the exit. The number of shortest paths; Represents the relationship between nodes in the topology. The number of directly connected edges; Represents a linear normalization function. This represents the shortest distance from node v to node u. This represents the set of all nodes in the topology. This indicates the central importance of node v in the topology; Indicates the preset adjustment parameters; The importance of the center of the measuring point is specifically expressed by the formula: in , The distance from the measurement point to the topological nodes at both ends is... , The importance of the center of the topological nodes at both ends; This indicates the central importance of the measuring point r; The criticality of each measuring point is specifically expressed by the following formula: In the formula, This indicates the central importance of measuring point r. This represents the standard deviation of the data in the residual sequence at measurement point r. Represents a linear normalization function. Indicates the criticality of measurement point r; The adjusted weighted Kalman gain matrix is ​​specifically expressed by the following formula: In the formula, This represents the adjusted weighted Kalman gain matrix. Represents the prediction error covariance matrix; Represents the observation matrix; This is the transpose of the matrix; This represents the adjusted observation noise covariance matrix; This represents the initial value of the corresponding element in the observation noise covariance matrix for measurement point r; Indicates the criticality of measurement point r; This represents the adjustment value of the corresponding element in the observation noise covariance matrix for measurement point r. These are preset parameters used to prevent the denominator or divisor from being zero; The calibrated time-varying boundary parameters, pipeline static parameters, and current boundary condition parameters are input into the digital twin physical model to obtain the precise values ​​of the internal condition parameters of the pipeline's discrete grid points. The water content monitoring module is used to monitor the water content of hydrogen-blended natural gas pipelines by comparing the precise values ​​of the internal operating parameters with preset safety thresholds.

5. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins as described in any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method for monitoring the water content of hydrogen-blended natural gas pipelines based on digital twins as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Method, system and equipment for predicting running state of full-length natural gas hydrogen mixing pipeline and storage medium

    CN121598836A

  • Pipeline internal flow modeling and corrosion evolution prediction method

    CN122046966A