Oil and gas transmission system model correction method and system based on data-mechanism hybrid drive
Through a data-mechanism hybrid driven approach, the oil and gas transmission system is decoupled into a unit equipment model. Through data processing and neural network optimization, the flow and temperature in the model are corrected, solving the problem of insufficient precision and accuracy of the existing oil and gas transmission system model and achieving higher model accuracy and adaptability.
Patent Information
- Application Number
- CN202510737229.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-23
AI Technical Summary
The existing oil and gas transportation system model has a low precision and accuracy due to the incomplete match between the empirical parameters of the mechanism formula and engineering practice, making it difficult to conform to actual working conditions.
A data-mechanism hybrid driven method is adopted to decouple the oil and gas transmission system into a unit equipment model. Through data processing and neural network optimization, the flow and temperature in the model are corrected to construct a data-mechanism hybrid oil and gas transmission system model.
It improves the accuracy and adaptability of the oil and gas transportation system model, reduces the model error, realizes the pertinence and adaptability to the complex characteristics of different processes, and is simple and convenient to operate.
Smart Images

Figure CN120688345A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil and gas transportation simulation, and in particular to a method and system for correcting an oil and gas transportation system model based on data-mechanism hybrid drive. Background Art
[0002] With the rapid development and deep integration of next-generation information technologies such as artificial intelligence and digital twins, the oil and gas industry is placing increasing demands on digital and intelligent gas field construction and pipeline transportation. Chemical process simulation enables comprehensive analysis and optimization of oil and gas production and transportation processes, including calculation of material properties, design of process equipment, and safety assessments. Existing simulation models are typically based on the principles of conservation of mass, momentum, and energy. They first construct a unit equipment model, then build a process system model. Dynamic simulation using this system model, combined with real-world field data, provides accurate simulation and prediction of the production process.
[0003] During the model building process, the simulation model may deviate from the actual results due to the incomplete match between the empirical parameters of the mechanism formula and the actual engineering, and the reasonable assumptions and simplifications of the system, which will reduce the precision, accuracy and reliability of the oil and gas system model. Summary of the Invention
[0004] In response to the above problems, the purpose of the present invention is to provide a method and system for correcting an oil and gas transmission system model based on a data-mechanism hybrid drive, which overcomes the difficulty of model error caused by the difficulty of some parameters in a single oil and gas transmission system mechanism model to conform to actual working conditions, and improves the accuracy of the oil and gas transmission system model.
[0005] To achieve the above-mentioned purpose, the present invention adopts the following technical solutions: a method for correcting an oil and gas transmission system model based on a data-mechanism hybrid drive, which comprises: decoupling the actual oil and gas transmission system into a unit equipment model, constructing an oil and gas transmission system mechanism model according to the actual oil and gas transmission system, wherein the unit equipment models included in the oil and gas transmission system mechanism model include a feed model, a separator model, a regulating valve model, a stop valve model, a single-phase pipeline model, a three-phase pipeline model and a discharge model; connecting the feed model, the separator model, the regulating valve model, the stop valve model, the single-phase pipeline model, the three-phase pipeline model and the discharge model according to the actual oil and gas transmission system; setting the components of the feed model and the proportion of each component; The feed model transmits the components, proportions of each component, temperature, pressure and flow to the separator model through connections. According to the connections, the components, proportions of each component, temperature, pressure and flow are transmitted in single phase in all unit equipment models. During the transmission process, the mass conservation, energy conservation and momentum conservation calculations are performed when passing through the separator model, regulating valve model, stop valve model, single-phase pipeline model and three-phase pipeline model to obtain the components, proportions of each component, temperature, pressure and flow after passing through each model, and the flow, gas phase flow and temperature of the discharge model are corrected. A data-driven model for the oil and gas transmission system is constructed, and the oil and gas transmission system is corrected using the data-driven model for the oil and gas transmission system. The flow rate, gas phase flow rate and temperature of the discharge model of the system mechanism model are measured. The data-driven model of the oil and gas transmission system includes a data processing model, a data testing model and a data prediction model. The data processing model includes an input eigenvalue processing model and an output eigenvalue processing model. The input eigenvalue processing model processes the input eigenvalues, and the output eigenvalue processing model processes the output eigenvalues. The test set composed of the input eigenvalues and the output eigenvalues is used to optimize the BP neural network topology through the data testing model. The data testing model and the data processing model are connected, and the output eigenvalues calculated by the test set of the data testing model are processed by the data processing model, where the calculated output eigenvalues are consistent with the output of the test set. The result with the smallest eigenvalue error is the optimal result, and the BP neural network topology structure is determined by the optimal result; a data prediction model is constructed based on the determined BP neural network topology structure, and the prediction set composed of input eigenvalues is used to obtain the output eigenvalues of the prediction set through the data prediction model; a data mechanism hybrid oil and gas transportation system model is constructed, and the data mechanism hybrid oil and gas transportation system model includes a total input model and a total output model; the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model are connected to the data mechanism hybrid oil and gas transportation system model to realize the transmission of input eigenvalues and output eigenvalues between models; the flow rate, gas phase flow rate, and temperature after the output eigenvalue correction are restored through the total output model.
[0006] Furthermore, the feed model has one connection port, the separator model has three connection ports, the regulating valve model has two connection ports, the stop valve model has two connection ports, the single-phase pipeline model has two connection ports, the three-phase pipeline model has two connection ports, and the discharge model has one connection port; all models are mechanism models.
[0007] Furthermore, the connection of the oil and gas transmission system mechanism model is done manually by dragging and dropping, or by using the Modelica language; The manual graphic connection is to drag the images of the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, and three-phase pipeline model to the specified connection position, and draw lines between the connection ports.
[0008] Furthermore, a data-driven model for the oil and gas transmission system is constructed, including the construction of a data processing model, a data testing model, and a data prediction model, including: The data processing model includes an input characteristic value processing model and an output characteristic value processing model. The input characteristic value processing model processes input characteristic values, and the input characteristic values are the measured input characteristic temperature, input characteristic pressure, input characteristic regulating valve opening, and input characteristic stop valve opening collected on site. The output eigenvalue processing model is used to process the output eigenvalues in the test set and the prediction set. The output eigenvalues are the difference between the flow rate, gas phase flow rate, and temperature actually collected on site and the flow rate, gas phase flow rate, and temperature of the discharge model in the oil and gas transmission system mechanism model. Use the test set to optimize the BP neural network topology by testing the model with data, including activation function, number of hidden layers, number of hidden layer nodes, initial learning rate, random initialization weight seed, and random initialization bias; Connect the data test model and the data processing model, process the output characteristic values of the test set through the data processing model, obtain the difference between flow rate, gas phase flow rate and temperature, and determine the BP neural network topology structure through the optimal result; Construct a data prediction model based on the BP neural network topology structure, and pass the prediction set through the data prediction model to obtain the output feature value of the prediction set; The oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model are connected to the data-mechanism hybrid oil and gas transmission system model to realize the transmission of input eigenvalues and output eigenvalues between models.
[0009] Furthermore, the data processing model has two connection ports, the data testing model has two connection ports, and the data prediction model has two connection ports, and all models are data models.
[0010] Furthermore, a data-mechanism hybrid oil and gas transportation system model is constructed, including a total input model and a total output model, which specifically includes the following steps: receiving input characteristic values and output characteristic values of the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model through the total input model; The output eigenvalue processing model is used to process the output eigenvalues in the test set and the prediction set. The output eigenvalues are the difference between the flow rate, gas phase flow rate, and temperature actually collected on site and the flow rate, gas phase flow rate, and temperature of the discharge model in the oil and gas transmission system mechanism model. Connect the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data-mechanism hybrid oil and gas transmission system model to achieve the transfer of input eigenvalues and output eigenvalues between models; The total output model is used to restore the flow rate, gas phase flow rate, and temperature after output characteristic value correction.
[0011] Furthermore, the restored output characteristic value corrected flow rate, gas phase flow rate, and temperature correspond to the flow rate, gas phase flow rate, and temperature at the actual pipeline end point on site.
[0012] Furthermore, the total input model has two connection ports, and the total output model has one connection port; One interface of the total input model is connected to the oil and gas transmission system mechanism model, another interface is connected to the oil and gas transmission system data drive model, and the total output model interface is connected to the oil and gas transmission system data drive model.
[0013] Furthermore, the input characteristic values transmitted by the oil and gas transmission system mechanism model are consistent with the input characteristic values of the oil and gas transmission system data-driven model.
[0014] A data-mechanism hybrid-driven oil and gas transmission system model correction system includes: a mechanism model construction module, which decouples the actual oil and gas transmission system into unit equipment models, and constructs an oil and gas transmission system mechanism model according to the actual oil and gas transmission system. The unit equipment models included in the oil and gas transmission system mechanism model include a feed model, a separator model, a regulating valve model, a stop valve model, a single-phase pipeline model, a three-phase pipeline model and a discharge model; a model connection module, which connects the feed model, the separator model, the regulating valve model, the stop valve model, the single-phase pipeline model, the three-phase pipeline model and the discharge model according to the actual oil and gas transmission system; a correction module, which sets the components of the feed model, the proportion of each component, the temperature, the pressure and the flow rate. The feed model transfers the components, proportions of each component, temperature, pressure and flow to the separator model through connection, and transfers the components, proportions of each component, temperature, pressure and flow in single phase in all unit equipment models according to the connection. During the transfer process, the mass conservation, energy conservation and momentum conservation calculations are performed when passing through the separator model, regulating valve model, stop valve model, single-phase pipeline model and three-phase pipeline model to obtain the components, proportions of each component, temperature, pressure and flow after passing through each model, and correct the flow, gas phase flow and temperature of the discharge model; data-driven model construction module, constructs the oil and gas transmission system data-driven model, and uses the oil and gas transmission system data-driven model to correct the flow, gas phase flow and temperature of the discharge model of the oil and gas transmission system mechanism model. Phase flow, temperature, oil and gas transmission system data-driven model includes data processing model, data testing model and data prediction model; neural network optimization module, the data processing model includes input eigenvalue processing model and output eigenvalue processing model, the input eigenvalue processing model processes input eigenvalues, the output eigenvalue processing model processes output eigenvalues, and the test set composed of input eigenvalues and output eigenvalues is used to optimize the BP neural network topology structure through the data testing model; the neural network structure determination module connects the data testing model and the data processing model, and processes the output eigenvalues calculated by the test set of the data testing model through the data processing model, where the error between the calculated output eigenvalues and the output eigenvalues of the test set is minimized. The optimal result is determined by the optimal result. The BP neural network topology structure is determined by the optimal result. The data prediction module constructs a data prediction model according to the determined BP neural network topology structure, and obtains the output characteristic value of the prediction set composed of input characteristic values through the data prediction model. The hybrid model construction module constructs a data mechanism hybrid oil and gas transportation system model. The data mechanism hybrid oil and gas transportation system model includes a total input model and a total output model. The output module connects the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data mechanism hybrid oil and gas transportation system model to realize the transmission of input characteristic values and output characteristic values between models; the total output model is used to restore the flow rate, gas phase flow rate and temperature after the output characteristic value correction.
[0015] The present invention has the following advantages due to the adoption of the above technical solution: 1. The oil and gas transmission system model correction method based on data-mechanism hybrid drive adopted by the present invention overcomes the difficulty of model error caused by the difficulty of some parameters in the single oil and gas transmission system mechanism model to conform to the actual working conditions, thereby reducing the inaccuracy of the oil and gas transmission system model.
[0016] 2. The present invention adopts a data-mechanism hybrid modeling method to achieve the fusion of actual data and mechanism data, and can provide a more targeted and adaptable oil and gas transportation system model based on the complex characteristics of different processes.
[0017] 3. The modeling process of the present invention is simple to operate and easy to use, and does not require additional operator assistance during the specific real-time process.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a flow chart of a calculation method for a mechanism model of an oil and gas transmission system according to an embodiment of the present invention; Figure 2 This is a flow chart of a calculation method for a data-driven model of an oil and gas transmission system according to an embodiment of the present invention; Figure 3 It is a flow chart of the calculation method of the data mechanism mixed oil and gas transportation system model in an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to overcome the problems of low precision, accuracy and reliability of oil and gas system models in the existing technology, the present invention provides a method, system, medium and equipment for correcting oil and gas transmission system models based on data-mechanism hybrid drive, which includes: constructing an oil and gas transmission system mechanism model, the oil and gas transmission system mechanism model includes a feed model, a separator model, a regulating valve model, a stop valve model, a single-phase pipeline model, a three-phase pipeline model, and a discharge model, to realize the transmission of various components, proportions of various components, temperature, pressure and flow between the oil and gas transmission system mechanism models; constructing an oil and gas transmission system data-driven model, the oil and gas transmission system data-driven model includes a data processing model, a data measurement model Test model, data prediction model; use the test set to determine the BP neural network topology through the data test model, build a data prediction model based on the BP neural network topology, and pass the prediction set through the data prediction model to obtain the output eigenvalue of the prediction set; build a data mechanism hybrid oil and gas transportation system model, the data mechanism hybrid oil and gas transportation system model includes a total input model and a total output model; connect the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data mechanism hybrid oil and gas transportation system model to realize the transfer of input eigenvalues and output eigenvalues between models; restore the flow rate, gas phase flow rate, and temperature after the output eigenvalue correction through the total output model.
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present invention.
[0022] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0023] In one embodiment of the present invention, a method for modifying an oil and gas transportation system model based on a data-mechanism hybrid drive is provided. Figure 1 As shown, the method includes the following steps: 1) Decouple the actual oil and gas transmission system into unit equipment models and construct an oil and gas transmission system mechanism model based on the actual oil and gas transmission system. The unit equipment models included in the oil and gas transmission system mechanism model include the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, three-phase pipeline model, and discharge model; 2) Connect the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, three-phase pipeline model, and discharge model according to the actual oil and gas transmission system; In this embodiment, the connection can be made manually by dragging and dropping, or by using the Modelica language. The manual graphical connection method is to drag the images of the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, and three-phase pipeline model to the designated connection positions, and then draw lines between the connection ports to connect them. 3) Set the components, proportions of each component, temperature, pressure and flow rate of the feed model, and transfer the components, proportions of each component, temperature, pressure and flow rate to the separator model through the feed model through the connection. According to the connection, the components, proportions of each component, temperature, pressure and flow rate are transferred in a single phase in all unit equipment models. During the transfer process, the mass conservation, energy conservation and momentum conservation calculations are performed when passing through the separator model, regulating valve model, stop valve model, single-phase pipeline model and three-phase pipeline model to obtain the components, proportions of each component, temperature, pressure and flow rate after passing through each model, and the flow rate, gas phase flow rate and temperature of the discharge model are corrected; 4) Construct a data-driven model for the oil and gas transmission system. Use this model to correct the flow rate, gas flow rate, and temperature of the discharge model of the oil and gas transmission system mechanism model. The data-driven model includes a data processing model, a data testing model, and a data prediction model. 5) The data processing model includes an input eigenvalue processing model and an output eigenvalue processing model. The input eigenvalue processing model processes input eigenvalues, which are the measured input characteristic temperature, input characteristic pressure, input characteristic regulating valve opening, and input characteristic shut-off valve opening collected on site. The output eigenvalue processing model processes output eigenvalues, which are the difference between the flow rate, gas phase flow rate, and temperature actually collected on site and the flow rate, gas phase flow rate, and temperature of the discharge model in the oil and gas transmission system mechanism model. The test set consists of input eigenvalues and output eigenvalues. The test set is used to optimize the BP neural network topology structure through the data testing model. The BP neural network topology structure includes the activation function, number of hidden layers, number of hidden layer nodes, initial learning rate, randomly initialized weight seed, and randomly initialized bias. The data testing model and the data prediction model use the same BP neural network topology structure. 6) Connect the data testing model and the data processing model, and use the data processing model to process the output eigenvalues calculated by the test set of the data testing model. The result with the smallest error between the calculated output eigenvalue and the output eigenvalue of the test set is the optimal result, and the BP neural network topology structure is determined by the optimal result; 7) The prediction set consists of input feature values. A data prediction model is constructed based on the determined BP neural network topology structure. The prediction set is passed through the data prediction model to obtain the output feature values of the prediction set. 8) Construct a data-mechanism hybrid oil and gas transportation system model, which includes a total input model and a total output model; 9) Connect the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data-mechanism hybrid oil and gas transmission system model to achieve the transfer of input and output eigenvalues between models; 10) Restore the flow rate, gas phase flow rate, and temperature after output characteristic value correction through the total output model.
[0024] In step 1) above, the feed model has one connection port, the separator model has three connection ports, the regulating valve model has two connection ports, the stop valve model has two connection ports, the single-phase pipeline model has two connection ports, the three-phase pipeline model has two connection ports, and the discharge model has one connection port; all models are mechanism models and are built using the Modelica language.
[0025] In step 2) above, set the components, proportions of each component, temperature, pressure and flow rate of the feed model. Specifically: In this embodiment, the feed model components are set to water, nitrogen, carbon dioxide, methane, ethane, propane, n-butane, isobutane, n-pentane, n-hexane, n-heptane, n-octane, n-nonane, n-decane, petroleum virtual component 1, petroleum virtual component 2 and petroleum virtual component 3. The molar fractions of each component are 0.000173, 0.023507, 0.050144, 0.689942, 0.128042, 0.066522, 0.008602, 0.017888, 0.003585, 0.004565, 0.004027, 0.001762, 0.000626, 0.000409, 0.00019, 0.000014, 0.000001, and 0.000002, respectively. The temperature is 353.15K and the pressure is 25 bar.
[0026] In step 2) above, mass conservation, energy conservation, and momentum conservation calculations are performed in the separator model, regulating valve model, stop valve model, single-phase pipeline model, and three-phase pipeline model. Specifically: The separator model, regulating valve model, stop valve model, and single-phase pipeline model all comply with the laws of conservation of mass, energy, and momentum.
[0027] The specific formula for conservation of mass is: ; The specific formula for energy conservation is: ; The specific formula for conservation of momentum is: ; in, Acceleration due to gravity , drag coefficient and flow rate related.
[0028] The single-phase pipeline model uses the ideal gas state equation, the specific formula is PM= RT; The specific formula of the gas phase mass conservation equation of the three-phase pipeline model is:
[0029] The specific formula of the liquid phase mass conservation equation is:
[0030]
[0031] in, represents the interphase mass exchange rate per unit length in the control body.
[0032] The specific formula of the liquid phase momentum conservation equation is:
[0033] The specific formula of the gas phase momentum conservation equation is:
[0034] The Beggs-Brill method is used to calculate the pressure drop. The specific formula is:
[0035] In step 3) above, the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, three-phase pipeline model, and discharge model are connected to realize the transmission of components, component proportions, temperature, pressure, and flow between the oil and gas transmission system mechanism models. Specifically: In this embodiment, connections can be made manually using a drag-and-drop graphical method or through the Modelica language. Manual graphical connections involve dragging the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, or three-phase pipeline model to the designated connection locations and then drawing lines between the connections.
[0036] In the above step 4), if Figure 2 As shown in the figure, a data-driven model for the oil and gas transmission system is constructed, including the construction of a data processing model, a data testing model, and a data prediction model. Specifically: 4.1) The data processing model includes an input eigenvalue processing model and an output eigenvalue processing model. The input eigenvalue processing model processes input eigenvalues, which are the measured input characteristic temperature, input characteristic pressure, input characteristic regulating valve opening, and input characteristic stop valve opening collected on site. Specifically, the input characteristic values are the input characteristic temperatures corresponding to the separator model temperature, single-phase pipeline model temperature, and three-phase pipeline model temperature under actual on-site conditions; the input characteristic pressures corresponding to the single-phase pipeline model pressure and three-phase pipeline model pressure; the input characteristic regulating valve opening corresponding to the regulating valve model opening; and the input characteristic shut-off valve opening corresponding to the shut-off valve model opening.
[0037] 4.2) The output eigenvalue processing model processes the output eigenvalues of the test set and the prediction set. The output eigenvalues are the differences between the flow rate, gas phase flow rate, and temperature actually collected on site and the flow rate, gas phase flow rate, and temperature of the discharge model in the oil and gas transmission system mechanism model. Specifically, the flow rate, gas phase flow rate, and temperature actually collected on site are the flow rate, gas phase flow rate, and temperature at the actual pipeline end point corresponding to the three-phase pipeline model.
[0038] 4.3) Use the test set to test the model and optimize the BP neural network topology, including the activation function, number of hidden layers, number of hidden layer nodes, initial learning rate, random initialization weight seed, and random initialization bias; Specifically, the BP neural network topology is debugged by optimizing the activation function, number of hidden layers, number of hidden layer nodes, initial learning rate, randomly initialized weight seed, and randomly initialized bias through the test set to obtain the output eigenvalues under different topological structures.
[0039] 4.4) Connect the data test model and the data processing model. Use the data processing model to process the output characteristic values of the test set to obtain the difference between flow rate, gas phase flow rate, and temperature. Determine the BP neural network topology based on the optimal result. Specifically, the data testing model uses K-fold cross validation to debug the BP neural network topology structure through the difference between the flow rate, gas phase flow rate, and temperature in the validation set and the test set.
[0040] 4.5) Construct a data prediction model based on the BP neural network topology and pass the prediction set through the data prediction model to obtain the output feature value of the prediction set; Specifically, the data prediction model has the same activation function, number of hidden layers, number of hidden layer nodes, initial learning rate, randomly initialized weight seed, and randomly initialized bias as the determined BP neural network topology.
[0041] 4.6) Connect the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data-mechanism hybrid oil and gas transmission system model to achieve the transfer of input eigenvalues and output eigenvalues between models.
[0042] In this embodiment, a data processing model, a data testing model and a data prediction model are constructed. Specifically: the data processing model has two connection ports, the data testing model has two connection ports, and the data prediction model has two connection ports. All models are data models.
[0043] In the above step 8), if Figure 3 As shown, a data mechanism hybrid oil and gas transportation system model is constructed, including a total input model and a total output model. Specifically: 8.1) Receive input eigenvalues and output eigenvalues of the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model through the total input model; Specifically, the input characteristic values of the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model are the input characteristic temperatures corresponding to the separator model temperature, the single-phase pipeline model temperature, and the three-phase pipeline model temperature under actual on-site conditions; the input characteristic pressures corresponding to the single-phase pipeline model pressure and the three-phase pipeline model pressure; the input characteristic regulating valve opening corresponding to the regulating valve model opening; and the input characteristic shut-off valve opening corresponding to the shut-off valve model opening.
[0044] 8.2) Process the output eigenvalues of the test set and prediction set using the output eigenvalue processing model. The output eigenvalues are the differences between the flow rate, gas phase flow rate, and temperature actually collected on-site and the flow rate, gas phase flow rate, and temperature of the discharge model in the oil and gas transmission system mechanism model. Specifically, the flow rate, gas phase flow rate, and temperature actually collected on site are the flow rate, gas phase flow rate, and temperature at the actual pipeline end point corresponding to the three-phase pipeline model.
[0045] 8.3) Connect the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data-mechanism hybrid oil and gas transmission system model to achieve the transfer of input and output eigenvalues between the models; Specifically, the input characteristic values transmitted by the oil and gas transmission system mechanism model are consistent with the input characteristic values of the oil and gas transmission system data-driven model.
[0046] 8.4) Restore the output characteristic value corrected flow rate, gas phase flow rate, and temperature through the total output model; Specifically, the restored output characteristic value corrected flow rate, gas phase flow rate, and temperature correspond to the flow rate, gas phase flow rate, and temperature at the actual pipeline end point on site.
[0047] In this embodiment, the overall input model has two connection ports, and the overall output model has one connection port. One port of the overall input model is connected to the oil and gas transmission system mechanism model, and the other port is connected to the oil and gas transmission system data-driven model. The overall output model port is connected to the oil and gas transmission system data-driven model.
[0048] In one embodiment of the present invention, a data-mechanism hybrid-driven oil and gas transportation system model correction system is provided, which includes: The mechanism model construction module decouples the actual oil and gas transmission system into unit equipment models and constructs the oil and gas transmission system mechanism model according to the actual oil and gas transmission system. The unit equipment models included in the oil and gas transmission system mechanism model include feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, three-phase pipeline model and discharge model; The model connection module connects the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, three-phase pipeline model and discharge model according to the actual oil and gas transmission system; The correction module sets the components, proportions of each component, temperature, pressure and flow of the feed model. The feed model transfers the components, proportions of each component, temperature, pressure and flow to the separator model through connections. According to the connections, the components, proportions of each component, temperature, pressure and flow are transferred in a single phase among all unit equipment models. During the transfer process, the mass conservation, energy conservation and momentum conservation calculations are performed when passing through the separator model, regulating valve model, stop valve model, single-phase pipeline model and three-phase pipeline model to obtain the components, proportions of each component, temperature, pressure and flow after passing through each model, and the flow, gas phase flow and temperature of the discharge model are corrected. A data-driven model construction module is used to construct a data-driven model for the oil and gas transmission system. The data-driven model is used to correct the flow rate, gas flow rate, and temperature of the oil and gas transmission system mechanism model and the discharge model. The data-driven model for the oil and gas transmission system includes a data processing model, a data testing model, and a data prediction model. The neural network optimization module, the data processing model includes an input eigenvalue processing model and an output eigenvalue processing model, the input eigenvalue processing model processes the input eigenvalue, the output eigenvalue processing model processes the output eigenvalue, and the test set consisting of the input eigenvalue and the output eigenvalue is used to optimize the BP neural network topology structure through the data test model; The neural network structure determination module connects the data test model and the data processing model, and processes the output eigenvalues calculated by the test set of the data test model through the data processing model. The result with the smallest error between the calculated output eigenvalue and the output eigenvalue of the test set is the optimal result, and the BP neural network topology structure is determined by the optimal result. The data prediction module builds a data prediction model based on the determined BP neural network topology structure, and obtains the output feature value of the prediction set through the data prediction model. A hybrid model building module is used to build a data-mechanism hybrid oil and gas transportation system model, which includes a total input model and a total output model. The output module connects the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data-mechanism hybrid oil and gas transmission system model to realize the transmission of input eigenvalues and output eigenvalues between models; and restores the flow rate, gas phase flow rate, and temperature after the output eigenvalue correction through the total output model.
[0049] In the above embodiment, the feed model has one connection port, the separator model has three connection ports, the regulating valve model has two connection ports, the stop valve model has two connection ports, the single-phase pipeline model has two connection ports, the three-phase pipeline model has two connection ports, and the discharge model has one connection port; all models are mechanism models.
[0050] In the above embodiment, the connection of the oil and gas transmission system mechanism model is performed manually by dragging and dropping graphically, or by using the Modelica language; The manual graphic connection is to drag the images of the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, and three-phase pipeline model to the specified connection position, and draw lines between the connection ports.
[0051] In the above embodiment, building a data-driven model for the oil and gas transmission system includes building a data processing model, a data testing model, and a data prediction model, including: The data processing model includes an input characteristic value processing model and an output characteristic value processing model. The input characteristic value processing model processes input characteristic values, and the input characteristic values are the measured input characteristic temperature, input characteristic pressure, input characteristic regulating valve opening, and input characteristic stop valve opening collected on site. The output eigenvalue processing model is used to process the output eigenvalues in the test set and the prediction set. The output eigenvalues are the difference between the flow rate, gas phase flow rate, and temperature actually collected on site and the flow rate, gas phase flow rate, and temperature of the discharge model in the oil and gas transmission system mechanism model. Use the test set to optimize the BP neural network topology by testing the model with data, including activation function, number of hidden layers, number of hidden layer nodes, initial learning rate, random initialization weight seed, and random initialization bias; Connect the data test model and the data processing model, process the output characteristic values of the test set through the data processing model, obtain the difference between flow rate, gas phase flow rate and temperature, and determine the BP neural network topology structure through the optimal result; Construct a data prediction model based on the BP neural network topology structure, and pass the prediction set through the data prediction model to obtain the output feature value of the prediction set; The oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model are connected to the data-mechanism hybrid oil and gas transmission system model to realize the transmission of input eigenvalues and output eigenvalues between models.
[0052] In the above embodiment, the data processing model has two connection ports, the data testing model has two connection ports, and the data prediction model has two connection ports, and all models are data models.
[0053] In the above embodiment, the data-mechanism hybrid oil and gas transportation system model is constructed, including a total input model and a total output model, and specifically includes the following steps: receiving input characteristic values and output characteristic values of the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model through the total input model; The output eigenvalue processing model is used to process the output eigenvalues in the test set and the prediction set. The output eigenvalues are the difference between the flow rate, gas phase flow rate, and temperature actually collected on site and the flow rate, gas phase flow rate, and temperature of the discharge model in the oil and gas transmission system mechanism model. Connect the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data-mechanism hybrid oil and gas transmission system model to achieve the transfer of input eigenvalues and output eigenvalues between models; The total output model is used to restore the flow rate, gas phase flow rate, and temperature after output characteristic value correction.
[0054] In the above embodiment, the restored output characteristic value corrected flow rate, gas phase flow rate, and temperature correspond to the flow rate, gas phase flow rate, and temperature at the actual pipeline end point on site.
[0055] In the above embodiment, the total input model has two connection ports, and the total output model has one connection port; One interface of the total input model is connected to the oil and gas transmission system mechanism model, another interface is connected to the oil and gas transmission system data drive model, and the total output model interface is connected to the oil and gas transmission system data drive model.
[0056] In the above embodiment, the input characteristic values transmitted by the oil and gas transmission system mechanism model are consistent with the input characteristic values of the oil and gas transmission system data-driven model.
[0057] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.
[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A data-mechanism hybrid driven oil and gas transportation system model correction method, characterized in that: include: The actual oil and gas transmission system is decoupled into unit equipment models, and an oil and gas transmission system mechanism model is constructed according to the actual oil and gas transmission system. The unit equipment models included in the oil and gas transmission system mechanism model include feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, three-phase pipeline model and discharge model; Connect the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, three-phase pipeline model and discharge model according to the actual oil and gas transmission system; Set the components, proportions of each component, temperature, pressure, and flow rate of the feed model. The feed model transfers the components, proportions of each component, temperature, pressure, and flow rate to the separator model through connections. According to the connections, the components, proportions of each component, temperature, pressure, and flow rate are transferred in a single phase among all unit equipment models. During the transfer process, mass conservation, energy conservation, and momentum conservation calculations are performed when passing through the separator model, regulating valve model, stop valve model, single-phase pipeline model, and three-phase pipeline model to obtain the components, proportions of each component, temperature, pressure, and flow rate after passing through each model, and the flow rate, gas phase flow rate, and temperature of the discharge model are corrected. Construct a data-driven model for the oil and gas transmission system, and use it to correct the flow rate, gas flow rate, and temperature of the oil and gas transmission system mechanism model and discharge model. The data-driven model includes a data processing model, a data testing model, and a data prediction model. The data processing model includes an input eigenvalue processing model and an output eigenvalue processing model. The input eigenvalue processing model processes input eigenvalues, and the output eigenvalue processing model processes output eigenvalues. A test set consisting of input eigenvalues and output eigenvalues is used to optimize the BP neural network topology structure through the data testing model. The data testing model and the data processing model are connected, and the output eigenvalues calculated by the test set of the data testing model are processed by the data processing model. The result with the smallest error between the calculated output eigenvalue and the output eigenvalue of the test set is the optimal result, and the BP neural network topology structure is determined by the optimal result; A data prediction model is constructed based on the determined BP neural network topology structure, and the prediction set composed of input feature values is passed through the data prediction model to obtain the output feature value of the prediction set; Constructing a data-mechanism hybrid oil and gas transportation system model, which includes a total input model and a total output model; The oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model are connected to the data-mechanism hybrid oil and gas transmission system model to realize the transfer of input eigenvalues and output eigenvalues between models; the flow rate, gas phase flow rate and temperature after the output eigenvalue correction are restored through the total output model.
2. The oil and gas transportation system model correction method based on data-mechanism hybrid drive according to claim 1 is characterized in that: The feed model has one connection port, the separator model has three connection ports, the regulating valve model has two connection ports, the stop valve model has two connection ports, the single-phase pipeline model has two connection ports, the three-phase pipeline model has two connection ports, and the discharge model has one connection port; all models are mechanism models.
3. The oil and gas transportation system model correction method based on data-mechanism hybrid drive according to claim 1 is characterized in that: The connection of the oil and gas transmission system mechanism model is done manually by dragging and dropping, or by using the Modelica language. The manual graphic connection is to drag the images of the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, and three-phase pipeline model to the specified connection position, and draw lines between the connection ports.
4. The oil and gas transportation system model correction method based on data-mechanism hybrid drive according to claim 1 is characterized in that: Build a data-driven model for the oil and gas transmission system, including building a data processing model, a data testing model, and a data prediction model, including: The data processing model includes an input characteristic value processing model and an output characteristic value processing model. The input characteristic value processing model processes input characteristic values, and the input characteristic values are the measured input characteristic temperature, input characteristic pressure, input characteristic regulating valve opening, and input characteristic stop valve opening collected on site. The output eigenvalue processing model is used to process the output eigenvalues in the test set and the prediction set. The output eigenvalues are the difference between the flow rate, gas phase flow rate, and temperature actually collected on site and the flow rate, gas phase flow rate, and temperature of the discharge model in the oil and gas transmission system mechanism model. Use the test set to optimize the BP neural network topology by testing the model with data, including activation function, number of hidden layers, number of hidden layer nodes, initial learning rate, random initialization weight seed, and random initialization bias; Connect the data test model and the data processing model, process the output characteristic values of the test set through the data processing model, obtain the difference between flow rate, gas phase flow rate and temperature, and determine the BP neural network topology structure through the optimal result; Construct a data prediction model based on the BP neural network topology structure, and pass the prediction set through the data prediction model to obtain the output feature value of the prediction set; The oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model are connected to the data-mechanism hybrid oil and gas transmission system model to realize the transmission of input eigenvalues and output eigenvalues between models.
5. The oil and gas transportation system model correction method based on data-mechanism hybrid drive according to claim 1 is characterized in that: The data processing model has two connection ports, the data testing model has two connection ports, and the data prediction model has two connection ports. All models are data models.
6. The oil and gas transportation system model correction method based on data-mechanism hybrid drive according to claim 1 is characterized in that: Constructing a data-mechanism hybrid oil and gas transportation system model, including a total input model and a total output model, specifically includes the following steps: receiving input characteristic values and output characteristic values of the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model through the total input model; The output eigenvalue processing model is used to process the output eigenvalues in the test set and the prediction set. The output eigenvalues are the difference between the flow rate, gas phase flow rate, and temperature actually collected on site and the flow rate, gas phase flow rate, and temperature of the discharge model in the oil and gas transmission system mechanism model. Connect the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data-mechanism hybrid oil and gas transmission system model to achieve the transfer of input eigenvalues and output eigenvalues between models; The total output model is used to restore the flow rate, gas phase flow rate, and temperature after output characteristic value correction.
7. The oil and gas transportation system model correction method based on data-mechanism hybrid drive according to claim 6 is characterized in that: The restored output characteristic value corrected flow rate, gas phase flow rate, and temperature correspond to the flow rate, gas phase flow rate, and temperature at the actual pipeline end point on site.
8. The oil and gas transportation system model correction method based on data-mechanism hybrid drive according to claim 6 is characterized in that: The total input model has two connectors, and the total output model has one connector; One interface of the total input model is connected to the oil and gas transmission system mechanism model, another interface is connected to the oil and gas transmission system data drive model, and the total output model interface is connected to the oil and gas transmission system data drive model.
9. The oil and gas transportation system model correction method based on data-mechanism hybrid drive according to claim 6 is characterized in that: The input characteristic values transmitted by the oil and gas transmission system mechanism model are consistent with the input characteristic values of the oil and gas transmission system data-driven model.
10. A data-mechanism hybrid driven oil and gas transportation system model correction system, characterized in that: include: The mechanism model construction module decouples the actual oil and gas transmission system into unit equipment models and constructs the oil and gas transmission system mechanism model according to the actual oil and gas transmission system. The unit equipment models included in the oil and gas transmission system mechanism model include feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, three-phase pipeline model and discharge model; The model connection module connects the feed model, separator model, regulating valve model, stop valve model, single-phase pipeline model, three-phase pipeline model and discharge model according to the actual oil and gas transmission system; The correction module sets the components, proportions of each component, temperature, pressure and flow of the feed model. The feed model transfers the components, proportions of each component, temperature, pressure and flow to the separator model through connections. According to the connections, the components, proportions of each component, temperature, pressure and flow are transferred in a single phase among all unit equipment models. During the transfer process, the mass conservation, energy conservation and momentum conservation calculations are performed when passing through the separator model, regulating valve model, stop valve model, single-phase pipeline model and three-phase pipeline model to obtain the components, proportions of each component, temperature, pressure and flow after passing through each model, and the flow, gas phase flow and temperature of the discharge model are corrected. A data-driven model construction module is used to construct a data-driven model for the oil and gas transmission system. The data-driven model is used to correct the flow rate, gas flow rate, and temperature of the oil and gas transmission system mechanism model and the discharge model. The data-driven model for the oil and gas transmission system includes a data processing model, a data testing model, and a data prediction model. The neural network optimization module, the data processing model includes an input eigenvalue processing model and an output eigenvalue processing model, the input eigenvalue processing model processes the input eigenvalue, the output eigenvalue processing model processes the output eigenvalue, and the test set consisting of the input eigenvalue and the output eigenvalue is used to optimize the BP neural network topology structure through the data test model; The neural network structure determination module connects the data test model and the data processing model, and processes the output eigenvalues calculated by the test set of the data test model through the data processing model. The result with the smallest error between the calculated output eigenvalue and the output eigenvalue of the test set is the optimal result, and the BP neural network topology structure is determined by the optimal result. The data prediction module builds a data prediction model based on the determined BP neural network topology structure, and obtains the output feature value of the prediction set through the data prediction model. A hybrid model building module is used to build a data-mechanism hybrid oil and gas transportation system model, which includes a total input model and a total output model. The output module connects the oil and gas transmission system mechanism model and the oil and gas transmission system data-driven model to the data-mechanism hybrid oil and gas transmission system model to realize the transmission of input eigenvalues and output eigenvalues between models; and restores the flow rate, gas phase flow rate, and temperature after the output eigenvalue correction through the total output model.