Liquid pipeline online simulation method based on multi-working condition adaptive parameter fast identification
By adopting an online simulation method for liquid pipelines based on rapid identification of adaptive parameters under multiple operating conditions, and utilizing a deep neural network surrogate model to identify the friction coefficient in real time, the problem of long simulation calculation time in existing technologies is solved, achieving efficient and accurate simulation of liquid pipelines and ensuring the safe operation of pipelines.
Patent Information
- Application Number
- CN202511788505.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2045-12-01
AI Technical Summary
Existing liquid pipeline simulation methods suffer from significant parameter uncertainty when dealing with changes in flow rate and oil properties, resulting in lengthy simulation calculations and an inability to capture parameter changes under transient conditions in a timely manner, thus affecting pipeline safety.
An online simulation method for liquid pipelines based on rapid identification of adaptive parameters under multiple operating conditions is adopted. The database is generated by offline parameter identification, a deep neural network surrogate model is trained, parameter fluctuations are monitored in real time, the friction coefficient is quickly identified, and flow and pressure simulation is realized.
It improves the efficiency and accuracy of liquid pipeline simulation calculations, reduces on-site workload, prevents accidents such as overpressure pipe bursts, and enhances the safety and stability of pipeline operation.
Smart Images

Figure CN121808865B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of liquid pipeline simulation technology, and in particular to an online simulation method for liquid pipelines based on rapid identification of adaptive parameters under multiple operating conditions. Background Technology
[0002] Liquid pipelines, such as urban water supply networks, long-distance crude oil pipelines, and refined oil pipelines, play a crucial role in the efficient and economical transportation of liquids. Liquid pipelines often employ high-pressure transportation methods. Due to factors such as fluctuations in downstream demand, distribution along the pipeline route, and planned equipment maintenance, changes in operating conditions are common during the operation of liquid pipelines. Furthermore, the slight compressibility of liquids causes instantaneous and drastic changes in pressure and flow rate during these changes. As pipelines age and corrode, the risk of pipeline failure and rupture due to these instantaneous and drastic pressure fluctuations increases further. Therefore, effectively monitoring pressure and flow rate changes at various points along the pipeline is essential for ensuring its safe operation.
[0003] Existing liquid pipeline simulation methods are typically based on discrete numerical methods. The accuracy of solving the one-dimensional water hammer equations heavily relies on accurate control equations. However, due to variations in flow rate, oil properties, and other factors, the parameters in the control equations are uncertain, necessitating the identification of precise parameter combinations. While heuristic-based parameter identification methods offer improved iterative performance, they require significant computational costs, often taking several minutes. Furthermore, they cannot simultaneously capture parameter changes at the second level under transient conditions, resulting in insufficient accuracy in online calculations. Summary of the Invention
[0004] To address the aforementioned problems, the purpose of this invention is to provide an online simulation method for liquid pipelines based on rapid identification of adaptive parameters under multiple operating conditions. Offline parameter identification can generate a large number of sample pairs of operating data and model parameters. Field personnel hope to use the identified sample data pairs to achieve rapid and synchronous identification of model parameters according to different parameter change frequencies under quasi-steady-state and transient conditions, and then introduce them into the simulation model to achieve online simulation of flow and pressure. This will effectively identify potential overpressure hazards in the pipeline and ensure the safe and stable operation of the pipeline.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, this application provides an online simulation method for liquid pipelines based on rapid identification of adaptive parameters under multiple operating conditions, the method comprising: Step (1) In advance, offline simulation and offline parameter identification are used to generate data pairs of pressure, flow rate and friction coefficient at different times at various points in the liquid pipeline, so as to build a parameter identification database; Step (2) Based on the parameter identification database, considering the pressure control boundary and flow recursion relationship, coupled liquid physical properties, a parameter identification proxy model with a two-stage physical guidance deep neural network architecture is trained. Step (3) Based on the trained parameters, identify the agent model and conduct online simulation. The process includes: Real-time monitoring of one or more parameters at the control boundary of a liquid pipeline; Based on the fluctuations in the values of one or more parameters, determine the different operating conditions corresponding to the liquid pipeline; Based on different operating conditions, parameter identification proxy models with different time steps are used to identify the optimal pipeline friction coefficient within the current time step. This coefficient is then substituted into the simulation model to calculate the parameter changes of each point in the liquid pipeline over time.
[0006] In one implementation, the process in step (1) includes: Set the initial time and simulation step size, and obtain the pressure at the inlet and outlet of the liquid pipeline at the initial time; Initialize the friction coefficient, and calculate the simulated flow rate and pressure at each point along the pipeline within the simulation step based on the hydraulic simulation model; Extract the simulated flow rates at the inlet and outlet and compare them with the actual observed values; If the set comparison rules are met, the current friction coefficient is output as the optimal friction coefficient; otherwise, the friction coefficient is updated. Continue the simulation to the next time step until the optimal friction coefficient for all time lengths within the preset time period is output. A parameter identification database for friction parameters is constructed using the inlet and outlet pressures, flow rates, and friction coefficients of the pipeline at each simulation step.
[0007] In one implementation, in step (2), the fluid properties of the liquid are coupled to a deep neural network for training to obtain a friction identification proxy model.
[0008] In one implementation, the network of the friction identification agent model includes two hidden layers: The forward propagation process of the first hidden layer information is shown in equation (1): (1) in, P It's pressure. Q It's traffic. L It is the total length of the pipeline. These are the network parameters of the first hidden layer. NN 1 represents the first hidden layer network; The loss function of the first hidden layer network is defined as the predicted value of the pipeline inlet flow rate. Export flow forecast value The mean squared error loss function can then be constructed as follows: (2) in, N It is the total number of training samples. and These are the actual values of import and export flows; A second hidden layer network is constructed to capture the nonlinear relationship between flow rate, fluid properties, and pipe friction coefficient, as mathematically expressed below: (3) (4) (5) in, and These are the hidden layer characteristics of flow rate and fluid properties, respectively. and These are the weights and biases for the fluid property mapping layer and the output layer, respectively. These are the network parameters of the first hidden layer. NN 2 represents the first hidden layer network.
[0009] In one implementation, the operating conditions include quasi-steady state and transient state.
[0010] Existing methods for identifying liquid pipeline parameters are time-consuming and struggle to quickly and timely capture the frictional resistance changes during rapid transient processes, resulting in insufficient simulation accuracy. The adaptive synchronous identification method proposed in this invention utilizes a neural network proxy identification model based on the transient and quasi-steady-state frictional resistance change frequencies to achieve efficient frictional resistance identification and accurate flow and pressure simulation. This not only significantly reduces the workload of on-site personnel but also enables precise calculation of flow and pressure at various points along the liquid pipeline, preventing safety accidents such as overpressure pipe bursts and leaks, and improving the operational safety and stability of oil pipelines. Attached Figure Description
[0011] Figure 1 This is a flowchart for identifying the coefficient of friction. Figure 2 This is a schematic diagram of a deep neural network according to an embodiment of this application; Figure 3 This is a schematic diagram of the method flow of an embodiment of this application; Figures 4(a) and (b) show a comparison of the simulated inlet and outlet flow rates of the pipeline in case 3; Figures 4(c) and (d) show a comparison of the simulated inlet and outlet flow rates of the pipeline in case 4; Figures 5(a), (b), and (c) show the comparison of simulated pressure values along the pipeline in case 3; Figures 6(a), (b), and (c) show the comparison of simulated pressure values along the pipeline in case 4. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention are within the scope of protection of the present invention.
[0013] To address the problems of existing technologies, embodiments of the present invention provide an online simulation method for liquid pipelines based on rapid identification of multi-condition adaptive parameters, the method comprising: Step (1): In advance, offline simulation and offline parameter identification are used to generate data pairs of pressure, flow rate and friction coefficient at different times at various points in the liquid pipeline, so as to build a parameter identification database; Step (2): Based on the parameter identification database, considering the pressure control boundary and flow recursion relationship, coupled with liquid physical properties, a parameter identification proxy model with a two-stage physical guidance deep neural network architecture is trained. Step (3): Based on the trained parameters, identify the agent model and conduct online simulation. The process includes: Real-time monitoring of one or more parameters at the control boundary of a liquid pipeline; Based on the fluctuations in the values of one or more parameters, determine the different operating conditions corresponding to the liquid pipeline; Based on different operating conditions, parameter identification proxy models with different time steps are adopted. The identification results are used as the optimal pipe friction coefficient in the current time step, and are substituted into the simulation model to calculate the parameter changes of each point in the liquid pipe over time.
[0014] The following section, based on the accompanying drawings, further details the process of the method provided in this application and illustrates its technical effects using a case study.
[0015] like Figure 3 As shown, a method is provided, and the specific process includes: Step (1) In advance, offline simulation and offline parameter identification are used to generate data pairs of pressure, flow rate and friction coefficient at different times at various points in the liquid pipeline, so as to build a parameter identification database.
[0016] Specifically, the parameters involved in the embodiments of this application can be based on predefined parameters, and may include flow rate, pressure, density, viscosity, etc.
[0017] During the parameter identification process, the preferred parameters include pressure, flow rate, and friction coefficient.
[0018] The friction coefficient is a parameter directly related to the Reynolds number and pipe wall roughness. Since pipe wall roughness doesn't change significantly for a given pipe over a period of time, the Reynolds number becomes the primary factor influencing the friction coefficient. The Reynolds number is mainly determined by the flow rate and fluid properties (density, viscosity). When the pipe is in a quasi-steady-state flow process, the flow rate changes little and doesn't significantly affect the friction coefficient. However, once operational conditions cause the pipe to enter a transient flow process, the flow rate will fluctuate rapidly and drastically within seconds or tens of seconds, leading to a significant change in the friction coefficient. Therefore, a friction coefficient identification model is first constructed to obtain the friction coefficient that best reflects the current hydraulic state for each time period.
[0019] like Figure 1 As shown, the simulation initial time T0 and the time length T used for friction identification are first defined. Then, considering the higher stability and reliability of pressure gauge data compared to flowmeter data, and the instability of flowmeter accuracy at the pipeline inlet and outlet due to zero-point drift and lack of periodic error calibration, the pipeline inlet and outlet pressures are defined as the simulation control boundaries. After initializing the friction coefficient, it is input into the hydraulic simulation model (existing mature technology) to obtain the simulated flow and pressure values at each point along the pipeline within time length T. The simulated flow values at the inlet and outlet are extracted and their mean square error is calculated compared with the actual instrument observation flow. It is then determined whether the mean square error is less than the set target value. If it is, the optimal friction coefficient and the corresponding hydraulic simulation result are output, and the simulation time step is updated to the next time length. This process is repeated to obtain the optimal friction coefficient for each time length. Execution... Figure 1 After the friction coefficient is identified, a set of corresponding inlet and outlet pressures, flow rates and friction coefficients can be obtained at each time step, thereby constructing a friction identification database.
[0020] After obtaining the optimal friction coefficient for each time period, the existing simulation framework uses this coefficient to calculate the pressure and flow rate for the next time period. However, due to the high time cost of this process, the time period T is typically several minutes or tens of minutes. Therefore, when the pipeline is in a fast transient state, the friction coefficient is actually changing rapidly on a second-by-second basis. If the friction coefficient from the previous time period is used to calculate the flow rate and pressure for the current time period, the simulation results will not accurately reflect the changes in flow rate and pressure within the pipe, further limiting the effectiveness of the traditional simulation framework. It is necessary to improve... Figure 1 The friction coefficient identification efficiency is shown.
[0021] Step (2) Based on the parameter identification database, considering the pressure control boundary and flow recursion relationship, coupled liquid physical properties, a parameter identification proxy model with a two-stage physical guidance deep neural network architecture is trained. The friction coefficient within a pipe is highly correlated with the Reynolds number, which is directly determined by the flow rate and fluid properties. Therefore, to construct a surrogate model for friction coefficient identification, the flow rate and fluid properties must be used as input parameters. Considering the coupling relationship between flow rate and pressure, and that pressure serves as the control boundary of the state estimation model and is the initial known condition for simulation calculations, to obtain the inlet and outlet flow rates of the pipe, the inlet and outlet flow rates are associated with the inlet and outlet pressure inputs as hidden nodes based on the friction coefficient identification surrogate model. After obtaining the flow rate result based on the known pressure control boundary, fluid properties are coupled to achieve friction coefficient identification. Figure 2 As shown.
[0022] To extract the coupling relationship between the pressure control boundary and the inlet and outlet flow rates of the pipeline, the forward propagation process of the first hidden layer information in the friction identification proxy model is shown in equation (1): (1) in, P It's pressure. Q It's traffic. L It is the total length of the pipeline. These are the network parameters of the first hidden layer. NN 1 represents the first hidden layer network: To train the first hidden layer network, a corresponding loss function needs to be constructed, defining the predicted inlet flow rate of the pipeline as... Export flow forecast value The mean squared error loss function can then be constructed as follows: (2) in, N It is the total number of training samples. and These are the actual inlet and outlet flow rates. After obtaining the inlet and outlet flow rates, fluid properties are added to construct a second hidden layer network to capture the nonlinear relationship between flow rate, fluid properties, and pipe friction coefficient. The mathematical expression is as follows: (3) (4) (5) in, and These are the hidden layer characteristics of flow rate and fluid properties, respectively. and These are the weights and biases for the fluid property mapping layer and the output layer, respectively. These are the network parameters of the first hidden layer. NN2 represents the first hidden layer network. To train this network, the mean square error between the predicted and actual friction coefficient values is constructed as the loss function, mathematically expressed as follows: (6) It is worth noting that when training the friction identification network, two different hidden layer networks need to be trained in stages. That is, the first hidden layer network is trained first using the loss function corresponding to Equation (1), and the parameters of the second hidden layer network need to be frozen at this time. After the network parameters converge, the second hidden layer is trained using the loss function corresponding to Equation (2), and the parameters of the first hidden layer network are frozen at this time. After convergence, the friction identification network can be obtained.
[0023] In this way, the calculation process of the obtained friction identification network is integrated with the established physical knowledge, and the forward transmission process of the hidden layer node information conforms to the established friction change law, which has higher physical interpretability.
[0024] Step (3) Identify the agent model based on the trained parameters and conduct online simulation.
[0025] Specifically, such as Figure 3 As shown, firstly, offline operating data from the SCADA system is collected, and the pressure control boundary data and initial flow data are extracted. Then, different time intervals corresponding to quasi-steady state and transient state are set (5 minutes for quasi-steady state and 10 seconds for transient state). For the two different operating conditions, a friction coefficient identification process based on an optimization algorithm is adopted. This yields simulation results of pressure and flow along the pipeline under different operating conditions and time intervals, as well as the corresponding optimal friction coefficient. Simulation results at the boundary are extracted, allowing the construction of a friction coefficient database, which can then be used to train a friction coefficient surrogate model.
[0026] Extract online operating data from the SCADA system and determine if the pressure fluctuation exceeds a set threshold (pressure change exceeding 3% within 5 seconds). If it does, it is considered transient; otherwise, it is calculated as quasi-steady state. Then, set the friction identification time interval T under transient conditions. TR The friction identification time interval T under quasi-steady state is set to 10s. PS The time interval is 5 minutes. It is determined whether the cumulative time since the last friction identification has exceeded the set time interval. If it has, the corresponding friction identification proxy model is activated to obtain the friction coefficient under the current state and substitute it into the state estimation model to realize flow pressure estimation; otherwise, the friction coefficient obtained from the previous time interval is used to calculate the simulation parameters.
[0027] The following case study illustrates the effectiveness of this method.
[0028] Operational data from four real liquid pipelines in a region of my country were collected to compare the accuracy of pressure-flow simulation results under transient and quasi-steady-state conditions. The pipeline characteristics and internal fluid parameters of the four liquid pipelines are shown in the table below.
[0029]
[0030] After obtaining the pipeline operation data from the four cases mentioned above, it is necessary to first collect flow rate, pressure, and friction coefficients through offline parameter identification to form a friction coefficient database. Generally, the identification proxy model in the adaptive identification framework, after offline training, needs to accurately identify the friction coefficient under different unknown operating conditions. Therefore, to simultaneously verify the simulation accuracy and generalization performance of the adaptive simulation framework under unknown operating conditions, cases 1 and 2 were used as training data to train the friction coefficient identification proxy model offline. Then, cases 3 and 4 were used as test conditions to test the online application effect of the framework in a real-time simulation manner. To illustrate the effectiveness of this adaptive synchronous identification framework, a traditional simulation framework was used as a comparative model. Simultaneously, to compare and illustrate the advantages of the physical guidance neural network over the traditional end-to-end neural network in terms of model accuracy and versatility, the proxy model in the identification framework was replaced with a traditional neural network for comparative experiments.
[0031] In Cases 4 and 5, the pipelines operate under alternating quasi-steady-state and transient conditions. In Case 4, the pipeline experienced significant hydraulic fluctuations between 1000 and 1300 seconds, resulting in substantial changes in flow rate. It was observed that the traditional simulation framework exhibited significant deviations in this scenario, with the simulated flow rate deviating considerably from the observed values. This demonstrates that the traditional simulation framework, due to its lengthy identification time under transient conditions, cannot quickly capture the changing patterns of hydraulic parameters, leading to low simulation accuracy. In contrast, the adaptive synchronous identification framework, by adjusting the identification frequency under transient and quasi-steady-state conditions and utilizing the second-level solution efficiency of neural networks, achieves rapid identification of the friction coefficient. This assists the simulation model in synchronously capturing the changing patterns of hydraulic parameters, significantly improving accuracy.
[0032] The table below shows the computational errors of several different methods. It can be seen that in both cases, the adaptive framework has a smaller overall error compared to the traditional method, and the reduction in error is most significant in transient conditions, where the transient computational error of the traditional method can even reach 3.8%. At the same time, the physical-guided neural network and the traditional neural network are more accurate in identifying the friction coefficient under unknown conditions, and can achieve more accurate simulations under various conditions.
[0033]
[0034] The attached figures and table below show a comparison of simulated pressure values and errors along the pipeline using different simulation methods. The observed values are taken from valve chambers installed along the pipeline. It is evident that under transient pipeline conditions, the hydraulic friction coefficient changes rapidly. Traditional friction identification methods using intervals of several minutes often fail to capture the changing hydraulic characteristics quickly and synchronously in the simulation model. The proposed adaptive synchronous identification framework automatically updates the identification frequency based on the current operating conditions, rapidly and efficiently capturing changes in the friction coefficient under different conditions, thereby achieving accurate simulation of pressure and flow.
[0035]
[0036] In summary, existing methods for identifying liquid pipeline parameters are time-consuming, struggle to quickly and timely capture the frictional resistance changes during rapid transient processes, and suffer from insufficient simulation accuracy. The adaptive synchronous identification method proposed in this invention utilizes a neural network proxy identification model based on the transient and quasi-steady-state frictional resistance change frequencies to achieve efficient frictional resistance identification and accurate flow and pressure simulation. This not only significantly reduces the workload of on-site personnel but also enables precise calculation of flow and pressure at various points along the liquid pipeline, preventing safety accidents such as overpressure pipe bursts and leaks, and improving the operational safety and stability of oil pipelines.
[0037] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the above-mentioned system (device) and module unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system device embodiments described above are merely illustrative. For instance, the division of the above-described module units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0038] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0039] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for online simulation of liquid pipelines based on rapid identification of adaptive parameters under multiple operating conditions, characterized in that, The method includes: Step (1): In advance, offline simulation and offline parameter identification are used to generate data pairs of pressure, flow rate and friction coefficient at different times at various points in the liquid pipeline, so as to build a parameter identification database; Step (2): Based on the parameter identification database, considering the pressure control boundary and flow recursion relationship, coupled with liquid physical properties, a parameter identification proxy model with a two-stage physical guidance deep neural network architecture is trained. Step (3): Based on the trained parameters, identify the agent model and conduct online simulation. The process includes: Real-time monitoring of one or more parameters at the control boundary of a liquid pipeline; Based on the fluctuations in the values of one or more parameters, determine the different operating conditions corresponding to the liquid pipeline; Based on different operating conditions, parameter identification proxy models with different time steps are adopted. The identification results are used as the optimal pipe friction coefficient in the current time step, and are substituted into the simulation model to calculate the parameter changes of each point in the liquid pipe over time.
2. The online simulation method for liquid pipelines based on rapid identification of multi-condition adaptive parameters according to claim 1, characterized in that, The process in step (1) includes: Set the initial time and simulation step size, and obtain the pressure at the inlet and outlet of the liquid pipeline at the initial time; Initialize the friction coefficient, and calculate the simulated flow rate and pressure at each point along the pipeline within the simulation step based on the hydraulic simulation model; Extract the simulated flow rates at the inlet and outlet and compare them with the actual observed values; If the set comparison rules are met, the current friction coefficient is output as the optimal friction coefficient; otherwise, the friction coefficient is updated. Continue the simulation to the next time step until the optimal friction coefficient for all time lengths within the preset time period is output. A parameter identification database for friction parameters is constructed using the inlet and outlet pressures, flow rates, and friction coefficients of the pipeline at each simulation step.
3. The online simulation method for liquid pipelines based on rapid identification of adaptive parameters under multiple operating conditions as described in claim 2, characterized in that, In step (2), the fluid properties of the liquid are coupled to a deep neural network for training to obtain a friction identification proxy model.
4. The online simulation method for liquid pipelines based on rapid identification of multi-condition adaptive parameters according to claim 3, characterized in that, The network of the friction identification agent model includes two hidden layers: The forward propagation process of the first hidden layer information is shown in equation (1): (1) in, P It's pressure. Q It's traffic. L It is the total length of the pipeline. These are the network parameters of the first hidden layer. NN 1 represents the first hidden layer network, T0 is the initial time of friction identification, and T is the time length used for friction identification. The loss function of the first hidden layer network is defined as the predicted value of the pipeline inlet flow rate. The export flow forecast value is The mean squared error loss function can then be constructed as follows: (2) in, N It is the total number of training samples. and These are the actual values of import and export flows; A second hidden layer network is constructed to capture the nonlinear relationship between flow rate, fluid properties, and pipe friction coefficient, as mathematically expressed below: (3) (4) (5) in, and These are the hidden layer characteristics of flow rate and fluid properties, respectively. and These are the weights and biases for the fluid property mapping layer and the output layer, respectively. These are the network parameters of the first hidden layer. NN 2 represents the first hidden layer network; This is the predicted value for the friction coefficient.
5. The online simulation method for liquid pipelines based on rapid identification of multi-condition adaptive parameters according to claim 4, characterized in that, The operating conditions include quasi-steady state and transient state.
Citation Information
Patent Citations
Product oil pipeline hydraulic parameter online calibration method and system
CN115329692A
Product oil pipeline abnormal data identification and online simulation method, system, equipment and medium
CN120542311A