Physics-informed data-driven oil and gas pipeline network fault diagnosis method and system for type-imbalanced data scenarios
By constructing a deep generative adversarial model driven by both numerical and analog models in the fault diagnosis of oil and gas pipeline networks, the problem of imbalanced datasets is solved, fault data that conforms to real-world scenarios is generated, the diagnostic accuracy and interpretability are improved, and the risk of false alarms and missed alarms is reduced.
Patent Information
- Application Number
- PCT/CN2024/140475
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-06
- Filing Date
- 2024-12-19
- Publication Date
- 2026-02-12
AI Technical Summary
Existing intelligent fault diagnosis models suffer from overfitting and false alarm/false negative risks when processing unbalanced datasets such as oil and gas pipeline networks. Furthermore, the physical interpretability of the generated fault data is insufficient, affecting the diagnostic accuracy and practicality.
A deep generative adversarial model based on long short-term memory network is constructed. Combined with the physical model of oil and gas pipeline network, a negative pressure wave attenuation model is embedded through a series-parallel mechanism to generate fault data that conforms to the real scenario, thereby improving the physical rationality and quality of the data. The generator and discriminator are trained using the RMSProp optimizer to balance the training set.
It improves the accuracy and practicality of fault diagnosis in oil and gas pipeline networks, reduces the risk of false alarms and missed alarms, and the generated fault data conforms to the characteristics of real pipeline networks, thus enhancing the interpretability and generalization performance of the model.
Smart Images

Figure CN2024140475_12022026_PF_FP_ABST
Abstract
Description
A numerical and analog dual-drive oil and gas pipeline network fault diagnosis method and system for class imbalance data scenarios TECHNICAL FIELD
[0001] The present application relates to a numerical and analog dual-drive oil and gas pipeline network fault diagnosis method and system for class imbalance data scenarios, relates to the fault diagnosis technology of oil and gas pipeline network, and belongs to the technical field of mechanical fault detection and diagnosis. BACKGROUND
[0002] As a key infrastructure for energy transportation and distribution, pipelines play an important role in promoting oil and gas production and ensuring stable energy supply. In recent years, with the continuous growth of energy demand and the extension of pipeline operation period, the safety hazards and maintenance cost caused by pipeline corrosion and aging have become increasingly prominent, which has brought great harm to people's life safety and social economic development. Therefore, developing an efficient, reliable and low-cost oil and gas pipeline network fault diagnosis method is of great practical demand and engineering significance for improving the reliability and safety of transportation and reducing economic losses and maintenance costs.
[0003] Deep learning, as an advanced artificial intelligence technology widely used in industrial fault diagnosis, relies on building and training multi-layer neural networks to mimic the information processing and learning mechanism of the human brain. Deep learning technology can automatically extract key features from a large amount of industrial data and effectively identify complex fault patterns and trends. However, large deep learning models usually contain millions of parameters, and in order to avoid overfitting and ensure that the model can effectively learn from training data and adapt to new data, a large amount of input data is often needed to support the model to capture more extensive and in-depth data regularities, as well as to realize the precise adjustment and optimization of network parameters. In the field of intelligent diagnosis of oil and gas pipeline network, due to the relative rarity of fault events in actual operation, the amount of normal state data is much larger than that of fault data. This imbalance between classes, i.e. the class imbalance problem, causes the deep learning model to be biased towards the more frequent class, i.e. the normal state, during the training process, thereby affecting the model's performance in accurately identifying fault states.
[0004] In existing research on class imbalance problems, generating fault data and balancing the dataset with it is a widely concerned solution. However, a common problem is that too much attention is paid to the accuracy and similarity of generated data and real data in statistical indicators, while the physical interpretability of generated fault data is ignored. Generally speaking, data-driven generation models with complex structures are difficult to clearly explain their decision basis and operation logic, and may generate fault data that is similar to real data in visual and statistical features but inconsistent in physical laws. This inconsistency significantly increases the safety risk of generated fault data and seriously affects the accuracy of fault diagnosis models, thereby increasing the risk of misdiagnosis and missed diagnosis.
[0005] For example, document No. CN114964476B discloses a fault diagnosis method, device and equipment of oil and gas pipeline system moving equipment, vibration signals of the oil and gas pipeline system moving equipment to be detected are collected; a two-dimensional time-frequency image is obtained by performing continuous wavelet transform on the vibration signals; the two-dimensional time-frequency image is input into a pre-constructed convolutional neural network fault diagnosis model, the convolutional neural network fault diagnosis model is used to perform fault diagnosis on the oil and gas pipeline system moving equipment to be detected, and a fault diagnosis result is obtained; the fault diagnosis result is analyzed by using a LIME algorithm, and fault analysis information is obtained, wherein the fault analysis information is marked with different energy intensities on the two-dimensional time-frequency image, and different energy intensities represent different contribution degrees of the time-frequency region corresponding to the energy intensity to the fault diagnosis result. However, no solution is proposed for the class imbalance data set problem frequently occurring in fault diagnosis research.
[0006] In the existing fault diagnosis technology for oil and gas pipelines (or pipe networks), no one has paid attention to the class imbalance data set problem frequently occurring in fault diagnosis research and given a targeted solution, which affects the accuracy and practicality of oil and gas pipeline (or pipe network) fault diagnosis. In addition, the traditional generative adversarial model based on a deep neural network directly used in oil and gas pipeline (or pipe network) fault diagnosis will reduce the physical interpretability and quality of generated fault data, thereby affecting the accuracy of oil and gas pipeline (or pipe network) fault diagnosis. Therefore, the overfitting problem of the current intelligent fault diagnosis model in processing oilfield class imbalance data sets, as well as the risk of false positives and false negatives still exist, and how to continuously improve the accuracy of oil and gas pipe network fault diagnosis is a problem we always face. SUMMARY
[0007] In view of the deficiencies of the prior art, the present application provides a digital-analog dual-drive oil and gas pipe network fault diagnosis method and system for class imbalance data scenarios, aiming to solve the problem of high risk of overfitting and false positives and false negatives of the current intelligent fault diagnosis model in processing oilfield class imbalance data sets.
[0008] The technical scheme adopted by the present application to solve the above technical problems is: a digital-analog dual-drive oil and gas pipe network fault diagnosis method for class imbalance data scenarios, the method comprising the following steps:
[0009] Using an oil and gas pipe network monitoring system to obtain pipe network negative pressure wave parameters and construct a training set Wherein is the i-th real pipe data, which is composed of N sampling points; is the i-th data label; n r is the number of data;
[0010] The variation law of the negative pressure wave characteristics of the pipe network under the influence of environmental and external factors was analyzed, and the pipe flow equation of the pipe network was established based on the mass conservation and momentum conservation theorem, i.e., a set of hyperbolic partial differential equations constructed by the continuity equation and the motion equation of the fluid
[0011] wherein ρ is the fluid density, v is the flow rate, t is the time, p is the pressure, g is the gravitational acceleration, θ is the pipe inclination angle, D is the pipe inner diameter, λ is the friction coefficient, and x is the axial distance along the pipe.
[0012] The hyperbolic partial differential equations composed of formula (1) and formula (2) were solved by using the method of characteristics and the finite difference method, and in combination with the pipe leakage boundary condition and the leakage rate, the expression of the negative pressure wave at the leakage point was obtained as follows:
[0013] wherein Δp is the pressure change at the leakage point, α s is the pressure wave velocity, m is the leakage rate, and v0 is the flow rate before the pipe leakage.
[0014] Without considering the energy loss caused by the movement of the fluid in the pipe network, the attenuation characteristics of the negative pressure wave during the transmission were analyzed, and it was found through multiple experimental analyses that the attenuation law of the negative pressure wave during the transmission was approximately exponential attenuation, and the expression was as follows:
[0015] wherein p i and p o are the negative pressure wave pressure values at the inlet and outlet of the pipe network, respectively, β is the negative pressure wave attenuation factor, and l is the pipe length.
[0016] Step 3: Constructing a deep generative adversarial model based on a long short-term memory (LSTM) network The deep generative adversarial network (GAN) constructed based on the LSTM network includes a generator G and a discriminator D (both the pipe diameter and the discriminator are represented by the letter D because the full name of the discriminator is discriminator, and the full name of the radius is diameter, and it is not appropriate to use other letters to represent it). The goal of the generator is to generate data sequences similar to the real data sequences, and its formula can be expressed as:
[0017] wherein h is the hidden state of the generator LSTM unit at time t, z t is a noise input, and D is the hidden state of the generator LSTM unit at time t-1, W g and b g are the weights and bias of the generator, respectively, x f is the generated failure data.
[0018] In addition, the objective of the discriminator is to correctly classify the real data and the generated data. When the input data is real data, the discriminator formula can be expressed as: h′ t = LSTM(x r , h′ t-1 ) (8), D r = sigmoid(W d h′ t + b d ) (9),
[0019] where h′ t is the hidden state of the discriminator LSTM unit at time t, x r is the real data, h′ t-1 is the hidden state of the discriminator LSTM unit at time t-1, W d and b d are the weights and bias of the discriminator, respectively. When the input data is generated data, the discriminator formula can be expressed as: h′ t = LSTM(x f , h′ t-1 ) (10), D f = sigmoid(W d h′ t + b d ) (11),
[0020] The ultimate goal of the neural network is to achieve ideal classification performance by adjusting W d and b d , so W d and b d are adaptively optimized according to the set loss function, rather than being manually set.
[0021] Step 4: Construct a numerical model double-drive deep generative adversarial model using a series-parallel hybrid mechanism, that is, the series-parallel hybrid mechanism of the hybrid generative adversarial model first embeds the attenuation model into the generator, so as to ensure that the generated fault data conforms to the attenuation law of the negative pressure wave signal in the real running scene, and improve the physical rationality of the generated data. For this purpose, it is necessary to embed the negative pressure wave attenuation model into the neural network (long short-term memory network) as a physical constraint layer (referring to the generator fusion physical constraint layer in Figure 1), and adopt the key parameter, that is, the leakage rate m, as the network update parameter. Then, the mechanism takes the prediction error of the outlet pressure difference of the generated fault data and the real data as a regularization term to ensure that the generated fault data conforms to the real pipe network characteristics, and the formula is as follows:
[0022] wherein, and are the outlet pressure difference of the generated fault data.
[0023] Based on formula (11), the generator loss of the hybrid generative adversarial model is:
[0024] The discriminator loss of the hybrid generative adversarial model is:
[0025] Step 5: Update the network parameters using the RMSProp optimizer The RMSProp optimizer is used to alternately train the generator and the discriminator. First, fix the generator to minimize the discriminator loss L D ; then fix the discriminator to minimize the generator loss L G .
[0026] Step 6: Generate fault data using the hybrid generative adversarial model, and balance the training set After the hybrid generative adversarial model is trained, the noise in step 3 is input into the generator to generate fault data, which is used to expand the diagnostic training set.
[0027] The oil and gas pipeline network data set obtained in step 6 is used to train a pipeline fault diagnosis model, and the pipeline fault type is obtained.
[0028] The present application deeply understands the propagation and attenuation mechanism of negative pressure wave when oil and gas moves in the pipe network, establishes a negative pressure wave attenuation physical model reflecting the running state of the pipe network, constructs a deep generative adversarial model suitable for processing time series data based on a long short-term memory network (Long short-term memory, LSTM), designs a reasonable series-parallel mechanism to fuse the physical model and the data-driven model, and constructs a hybrid generative adversarial model. The trained hybrid generative adversarial model is used to generate pipe network fault data, balance the original training set, train an intelligent fault diagnosis model, and realize pipeline fault type identification.
[0029] The application proposes a class imbalance data set problem often occurring in fault diagnosis and gives a targeted solution, thereby improving the accuracy and practicality of oil and gas pipeline (or pipe network) fault diagnosis, and the application also constructs a hybrid generative adversarial model based on a series-parallel hybrid mechanism, improves the physical interpretability and quality of generated fault data, solves the overfitting problem of current intelligent fault diagnosis models when processing oil field class imbalance data sets, reduces the risk of false positives and false negatives, and finally realizes the improvement of the accuracy of oil and gas pipe network (oil and gas pipeline) intelligent fault diagnosis.
[0030] The application simultaneously considers and integrates prior knowledge from a physical model and learning ability of a data-driven model, compared with a pure data-driven model, the pipe network prior knowledge contained in the physical model can reduce the parameter space search domain, reduce the estimated parameter amount, improve the explainability and generalization performance of the deep generative model, and simultaneously improve the physical rationality and feature distinguishability of the generated fault data, thereby effectively overcoming the negative influence of the class imbalance data set on the performance of the diagnosis model, and further improving the accuracy of the pipe intelligent fault diagnosis.
[0031] The oil and gas pipe network fault diagnosis method for class imbalance data scenarios provided by the application has at least the following advantages and effects compared with the prior art: unlike general intelligent fault diagnosis methods based on deep learning technology, the application mainly focuses on the class imbalance data set problem often occurring in fault diagnosis research, and by providing a targeted solution, the accuracy and practicality of the intelligent fault diagnosis method are improved.
[0032] Unlike traditional generative adversarial models based on deep neural networks, the application constructs a hybrid generative adversarial model based on a series-parallel hybrid mechanism, effectively reduces the parameter space search domain by fusing a pipe network operation characteristic physical model and a data-driven model, reduces the parameter estimation amount, reduces the overfitting risk, simultaneously gives the model physical meaning, and improves the physical interpretability and quality of the generated fault data.
[0033] Considering the actual application situation of current intelligent fault diagnosis technology, the method has practical application value and has achieved certain application results. DETAILED DESCRIPTION
[0034] Fig. 1 is a hybrid generative adversarial model fault diagnosis flowchart according to an embodiment of the application; Fig. 2 is a visualization example diagram of generated data and real data according to an embodiment of the application; and Fig. 3 is a visualization analysis performance comparison diagram according to an embodiment of the application. DETAILED DESCRIPTION
[0035] The technical solutions in the present application will be further described below in combination with Figs. 1-3: In order to enable the person skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application.
[0036] Fig. 1 is a flow chart of a numerical-analytical dual-driven oil and gas pipeline network fault diagnosis process in a class imbalance data scenario in the technical solutions of the present application, and the overall process is realized by programming in Python language. Referring to Fig. 1, a numerical-analytical dual-driven oil and gas pipeline network fault diagnosis method in a class imbalance data scenario comprises the following steps:
[0037] Using an oil and gas pipeline network monitoring system, acquiring pipeline network negative pressure wave parameters, and constructing a training set Wherein is the i-th real pipeline data, which is composed of N sampling points; is the i-th data label; n r is the number of data.
[0038] Analyzing the change law of the pipeline network negative pressure wave characteristics under the influence of the environment and external factors, establishing the pipe flow equation of the pipeline network based on the mass conservation and momentum conservation theorem, that is, a set of hyperbolic partial differential equations constructed by the continuity equation and the motion equation of the fluid
[0039]
[0040] Wherein, p is the fluid density, v is the flow rate, t is the time, p is the pressure, g is the gravitational acceleration, theta is the pipe inclination angle, D is the pipe inner diameter, lambda is the friction coefficient, and x is the axial distance along the pipe.
[0041] The hyperbolic partial differential equations composed of formula (1) and formula (2) are solved by using the method of characteristics and the finite difference method, and in combination with the pipe leakage boundary condition and the leakage rate, the negative pressure wave expression at the leakage point can be obtained as:
[0042] Wherein, Delta p is the pressure change at the leakage point, alpha s is the pressure wave velocity, m is the leakage rate, and v0 is the flow rate before the pipe leaks.
[0043] Without considering the energy loss caused by the movement of the fluid in the pipeline network, the attenuation characteristics of the negative pressure wave during transmission are analyzed, and through multiple experimental analyses, it can be concluded that the attenuation law of the negative pressure wave during transmission is approximately exponential decay, and the expression is:
[0044] Wherein, p i and p oare the negative pressure wave pressure values at the pipe network inlet and outlet respectively, β is the negative pressure wave attenuation factor, and l is the pipe length.
[0045] The deep generative adversarial model (GAN) constructed based on the LSTM network includes a generator G and a discriminator D. The objective of the generator is to generate data sequences similar to the real data sequences, and the formula thereof can be expressed as:
[0046]
[0047] wherein, is the hidden state of the generator LSTM unit at time t, z t is a noise input, is the hidden state of the generator LSTM unit at time t-1, W g and b g are the weights and bias of the generator respectively, x f is the generated fault data.
[0048] In addition, the objective of the discriminator is to correctly classify the real data and the generated data. When the input data is the real data, the formula of the discriminator can be expressed as: h′ t = LSTM(x r , h′ t-1 ) (8), D r = sigmoid(W d h′ t + b d ) (9),
[0049] wherein, h′ t is the hidden state of the discriminator LSTM unit at time t, x r is the real data, h′ t-1 is the hidden state of the discriminator LSTM unit at time t-1, W d and b d are the weights and bias of the discriminator respectively. When the input data is the generated data, the formula of the discriminator can be expressed as: h′ t = LSTM(x f , h′ t-1 ) (10), D f = sigmoid(W d h′ t + b d) (11),
[0050] Step 4: Construct a numerical model double-drive deep generative adversarial model using a series-parallel hybrid mechanism, i.e., a hybrid generative adversarial model series-parallel hybrid mechanism. First, the decay model is embedded into the generator to ensure that the generated fault data conforms to the decay law of the real operating scenario negative pressure wave signal, thereby improving the physical rationality of the generated data. To this end, it is necessary to embed the negative pressure wave decay model into the neural network as a physical constraint layer, and use the key parameter, i.e., the leakage rate m, as the network update parameter. Then, the mechanism will use the prediction error of the outlet pressure difference and the real data outlet pressure difference as the regularization term to ensure that the generated fault data conforms to the real pipe network characteristics, and the formula is as follows:
[0051] wherein, and are the outlet pressure difference and the inlet pressure difference of the generated fault data, respectively.
[0052] Based on formula (11), the generator loss of the hybrid generative adversarial model can be obtained as follows:
[0053] The discriminator loss of the hybrid generative adversarial model is as follows:
[0054] Step 5: Update the network parameters using the RMSProp optimizer. The generator and the discriminator are alternately trained using the RMSProp optimizer. First, fix the generator and minimize the discriminator loss L D ; then fix the discriminator and minimize the generator loss L G .
[0055] After the hybrid generative adversarial model is trained, the noise in step 3 is input into the generator to generate fault data, which is used to expand the diagnostic training set.
[0056] The oil and gas pipeline network data set obtained in step 6 is used to train the pipeline fault diagnosis model to obtain the pipeline fault category.
[0057] In step 1, the oil and gas pipeline network monitoring system is used to collect pipeline negative pressure wave parameters and construct a real data set. In step 2, the pipe flow equation of the pipeline network is established by using the continuity equation and the motion equation, and the negative pressure wave attenuation model is constructed by combining the characteristic line method and the finite difference method. In step 3, the established LSTM-based deep generative adversarial model is used to process time series data. The series-parallel hybrid mechanism adopted by the hybrid generative adversarial model is as follows: (1) first, the negative pressure wave attenuation model is embedded into the neural network as a physical constraint layer, and the key parameter, i.e., the leakage rate m, is used as the parameter for network updating; (2) then, the mechanism takes the prediction error of the generated fault data inlet and outlet pressure difference and the real data inlet and outlet pressure difference as a regularization term to ensure that the generated fault data meet the characteristics of the real pipeline network.
[0058] Based on the above technical solution, the effectiveness of the method of the present application is verified by taking the fault diagnosis of the oil and gas pipeline network as an example, as shown in FIGS. 1 to 3.
[0059] 1. Experimental setup The training data used in the present application is collected from the pressure sensors in the pipeline simulation platform (collected from the ZJ-CGGD platform, the total length of the pipeline is 180 m, the pressure is 0.5 Mpa, the flow rate is 10 m^3 / h, and the sampling frequency is 1024 Hz). The total length of the pipeline is 180 m, and the pressure is set to 0.5 Mpa, the flow rate is set to 10 m 3 / h, and the sampling frequency of the signal is 1024 Hz. According to the valve opening degree, the model data set includes four health states of large leakage, medium leakage, small leakage and normal, and the total sample size is 2000, and the sample size under each health state is 500.
[0060] The hybrid generative adversarial model is composed of a generator and a discriminator, both of which are composed of 3-layer LSTM networks. In the training process of the hybrid generative adversarial model, the total number of iterations is 5000; in each cycle, the number of discriminator training is 10, and the number of generator training is 1; the batch size is 128; the optimizer used in training is RMSProp, and the learning rate is 1e-4. The algorithms mentioned in the present application are built by the PyTorch framework and trained on the NVIDIA GEFORCE RTX 3090 GPU.
[0061] FIG. 2 is a visualization diagram of the generated data and the real data of the embodiment of the present application: the generated data and the real data obtained through the above steps are plotted in the same coordinate system in the form of a line chart, wherein the generated data is dark, and the real data is light.
[0062] 2. Comparative algorithm In order to comprehensively evaluate the performance of the hybrid generative adversarial model, the present application selects seven generative models for comparison. Details are as follows: VAE: variational autoencoder; GAN-minmax: original form of GAN; LSGAN: GAN variant using mean square error as loss function; InfoGAN: GAN variant that controls the generation mode by inputting latent representation; SeqGAN: GAN variant that uses reinforcement learning to generate sequence data; TTS-GAN: GAN variant that uses Transformer to construct generator and discriminator; MAD-GAN: GAN variant that uses LSTM-RNN to construct generator and discriminator.
[0063] 3. Visualization performance evaluation By comparing the performance of the seven generative models, the performance of the hybrid generative adversarial model can be demonstrated, and the experimental results are shown in Figure 3. As can be seen from Figure 3(a), there is a large difference between the data generated by VAE and the actual data. In addition, as shown in Figures 3(e)-(g), the data generated by SeqGAN, TTS-GAN and MAD-GAN is more realistic than the above methods, but contains a lot of interference, which may lead to lower classification accuracy. Compared with the above results, the data generated by the hybrid generative adversarial model in the present application maintains a high consistency with the real pipeline data. In addition, it is worth noting that the red curve in Figure 3(h) is smoother than the curves in other images, which indicates that the hybrid generative adversarial model in the present application is more stable than the other seven generative models.
[0064] 4. Quantitative evaluation of metric indicators In this part, the maximum mean difference index is used to quantify the difference between the generated data distribution and the real distribution, so as to evaluate the similarity between the two distributions. The experimental results are shown in Table 1, and it can be clearly seen that the performance of the hybrid generative adversarial model is better than that of other generative models. Specifically, the maximum mean difference index value of the hybrid adversarial generative model in the large leakage, medium leakage and small leakage states is the smallest among all algorithms, which indicates that the hybrid generative adversarial model has an advantage in restoring the obvious characteristics of the real-world distribution. In contrast, other models can only generate data that partially reflects the characteristics of pipeline data, because they are largely affected by training instability. Therefore, the development of a hybrid generative adversarial model has practical significance, because the distribution of the pipeline data generated by it has similar statistical characteristics to the real-world data distribution.
[0065] Table 1 Experimental results of quantitative evaluation of metric indicators
[0066] Example: Taking the fault diagnosis of a petroleum pipeline as an example, the effectiveness of the fault diagnosis method of the present application is verified.
[0067] A real dataset is obtained from an oil pipeline fault simulation platform. The dataset contains four categories: normal, large leakage, medium leakage, and small leakage. The fault data is obtained at a pressure of 0.5 MPa, and the data acquisition frequency is 1024 Hz. The original dataset contains 3000 normal state data, and 200 data for each of large, medium, and small leakage. The data of the three fault types generated by the hybrid generative adversarial model is supplemented to the original dataset, that is, after the padding operation, the original dataset contains 3000 data of each of the four types of pipeline network data. In order to reduce the influence of random factors and verify the reliability of the application, all the diagnosis experiments are repeated ten times, and the average of the diagnosis accuracy of ten times is calculated. The experimental results are shown in Tables 2 and 3. From the experimental results, it can be found that: 1) sufficient and balanced pipeline network dataset significantly improves the performance of the diagnosis model; 2) compared with other seven generation models, the training dataset constructed by the hybrid generative adversarial model has the highest accuracy.
[0068] Table 2 Fault diagnosis accuracy (1)
[0069] Table 3 Fault diagnosis accuracy (2)
[0070] In summary, the method proposed in the application generates data that not only meets the physical characteristics of real-world pipeline operation, but also has better visualization performance and statistical characteristics than existing comparative methods, effectively reducing the risk of false positives and false negatives, and improving the accuracy of pipeline fault diagnosis. The method described in the application has been verified through simulation experiments and practical applications, and the claimed technical effects and practicality of the application have been verified.
[0071] The algorithm (method) proposed in the application is the underlying technical kernel of the application. Based on the algorithm, various products can be derived.
[0072] Based on the algorithm (method) proposed in the application, a numerical and analog dual-driven oil and gas pipeline network fault diagnosis system for class imbalance data scenarios is developed using a program language. The system has program modules corresponding to the steps of the above technical solutions, and when running, it executes the steps in the numerical and analog dual-driven oil and gas pipeline network fault diagnosis method for class imbalance data scenarios.
[0073] The computer program of the developed system (software) is stored on a computer readable storage medium, and the computer program is configured to realize the steps of the numerical and analog dual-driven oil and gas pipeline network fault diagnosis method for class imbalance data scenarios when called by a processor. That is, the application is materialized on a carrier to become a computer program product.
[0074] The application further provides an oil and gas pipeline network fault diagnosis device, comprising at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned numerical and model dual-driven oil and gas pipeline network fault diagnosis method for class imbalance data scenarios. The oil and gas pipeline network fault diagnosis device is a terminal intelligent product for application of the application and is applied to oil and gas pipeline network fault diagnosis.
[0075] Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, specially designed ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0076] Computational procedures (also referred to as programs, software, software applications, or code) in the application include machine instructions executable by a programmable processor, and can be implemented using a high-level procedural and / or object-oriented programming language, and / or an assembly / machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus and / or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.
[0077] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the application. For example, the steps recited in the application can be executed in parallel, executed in sequence, or executed in different orders, as long as the desired results of the technical solutions disclosed in the application are achieved, which are within the protection scope of the application.
Claims
1. A digital-analog dual drive oil and gas pipeline network fault diagnosis method for class imbalance data scenarios, characterized by, The implementation process of the oil and gas pipeline network fault diagnosis method is as follows: Step 1: Collecting pipeline key parameters and constructing a training data set The oil and gas pipeline network monitoring system is used to obtain pipeline network negative pressure wave parameters, and a training set is constructed wherein For the i-th real pipe data, consisting of N sampling points; is the ith data label; n r is the number of data Step 2: Establishing a negative pressure wave attenuation physical model The variation law of the negative pressure wave characteristics of the pipe network under the influence of the environment and external factors is analyzed, and a pipe flow equation of the pipe network is established based on the mass conservation and momentum conservation theorem, that is, a set of hyperbolic partial differential equations constructed by the continuity equation and the motion equation of the fluid: Wherein, ρ is the fluid density, v is the flow rate, t is the time, p is the pressure, g is the gravitational acceleration, θ is the pipeline inclination angle, D is the pipeline inner diameter, λ is the friction coefficient, x is the axial distance along the pipeline, and represents the gradient; The hyperbolic partial differential equation constituted by formula (1) and formula (2) is solved by using the method of characteristic line and the finite difference method, and in combination with pipeline leakage boundary conditions and leakage rate, the expression of the negative pressure wave at the leakage point is obtained as follows: where Δp is the pressure change at the leak point, a s is the pressure wave speed, m is the leak rate, and v0is the flow velocity before the leak. Without considering the energy loss caused by the fluid motion in the pipe network, by analyzing the attenuation characteristics of the negative pressure wave propagation, it is concluded that the attenuation law of the negative pressure wave in the transmission process is approximately exponential decay, and the expression is: Step 3: Constructing a deep generative adversarial model based on a long short-term memory network The deep generative adversarial model constructed based on the long short-term memory network comprises a generator G and a discriminator D; the target of the generator is to generate a data sequence similar to a real data sequence, and a formula thereof can be represented as: wherein is the hidden state of the generator LSTM unit at time t, z t is a noise input, is the hidden state of the generator LSTM unit at time t-1, W g and b g are the generator's weights and bias, respectively, x f is the generated failure data; The discriminator is used to correctly classify real data and generated data. When the input data is real data, the discriminator formula is represented as: h′ t = LSTM(x r , h′ t-1 ) (8), D r = sigmoid(W d h′ t +b d ) (9), Where, h′ t It is the hidden state of the discriminator LSTM unit at time t, x r It's real data, h′ t-1 W is the hidden state of the discriminator LSTM unit at time t-1. d and b d These represent the weights and biases of the discriminator, respectively; when the input data is generated data, the discriminator formula can be expressed as: h′ t = LSTM(x f , h′ t-1 ) (10), D f = sigmoid(W d h′ t +b d ) (11), Step 4: Construct a numerical double-drive deep generative adversarial model using a series-parallel hybrid mechanism, i.e., a hybrid generative adversarial model. The series-parallel hybrid mechanism is as follows: first, embed the attenuation model into the generator to ensure that the generated fault data conforms to the attenuation law of the real operating scene negative pressure wave signal and improves the physical rationality of the generated data; embed the negative pressure wave attenuation model into the neural network as a physical constraint layer, and use the key parameter, i.e., the leakage rate m, as the network update parameter; then, the mechanism takes the prediction error of the outlet pressure difference of the generated fault data and the outlet pressure difference of the real data as a regularization term to ensure that the generated fault data conforms to the real pipe network characteristics, and the formula is as follows: wherein and The inlet and outlet pressure differences of the generated fault data are respectively Based on formula (11), the generator loss of the hybrid generative adversarial model can be obtained as: The discriminator loss of the hybrid generative adversarial model is: Step 5: Updating network parameters using the RMSProp optimizer The generator and discriminator are alternately trained using the RMSProp optimizer, first fixing the generator and minimizing the discriminator loss L D ; Then the discriminator is fixed, and the generator loss L is minimized G ; Step 6: Generating fault data using the hybrid generative adversarial model to balance the training set After the hybrid generative adversarial model is trained, the noise in step 3 is input into the generator to generate fault data, which is used to expand the diagnostic training set. Step 7: Training the diagnostic model to realize pipeline fault type recognition The oil and gas pipeline network data set obtained in step 6 is used to train the pipeline fault diagnosis model, and the pipeline fault category is obtained.
2. The method according to claim 1, wherein, In step 1, the oil and gas pipeline network monitoring system is used to collect pipeline negative pressure wave parameters and construct a real data set.
3. The method according to claim 1, wherein, In step 2, the pipe flow equation of the pipeline network is established using the continuity equation and the motion equation, and the negative pressure wave attenuation model is constructed using the characteristic line method and the finite difference method.
4. The method according to claim 1, wherein, In step 3, the deep generative adversarial model based on LSTM is used to process time series data.
5. The numerical-analytical dual-driven fault diagnosis method for oil and gas pipeline networks according to claim 1, 2, 3 or 4, characterized in that, The series-parallel hybrid mechanism adopted by the hybrid generative adversarial model has the following implementation process: (1) First, embed the negative pressure wave attenuation model into the neural network as a physical constraint layer, and use the key parameter, i.e., the leakage rate m, as the network update parameter; (2) Then, the mechanism takes the prediction error of the generated fault data inlet and outlet pressure difference and the real data inlet and outlet pressure difference as a regularization term to ensure that the generated fault data conforms to the real pipeline characteristics.
6. The method according to claim 1, wherein, Discriminator formula D r W in d and b d are obtained by adaptive optimization according to a set loss function.
7. A digital-analog dual drive oil and gas pipeline network fault diagnosis system for class imbalance data scene, characterized in that: The system has program modules corresponding to the steps of any one of claims 1-6, and when running, executes the steps of the above-mentioned numerical and model dual-driven oil and gas pipeline network fault diagnosis method for class imbalance data scenarios.
8. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program configured to implement the steps of the numerical and model dual-driven oil and gas pipeline network fault diagnosis method for class imbalance data scenarios of any one of claims 1-6 when called by the processor.
9. An oil and gas pipeline network fault diagnostic device characterized by comprising: The oil and gas pipeline network fault diagnosis device includes at least one processor and a memory in communication with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the numerical and model dual-driven oil and gas pipeline network fault diagnosis method for class imbalance data scenarios of any one of claims 1-6.
Citation Information
Patent Citations
Self-adaptive dynamic compensation positioning method for pipeline leakage based on negative pressure wave attenuation driving
CN113188055A
Pipeline fault diagnosis method and system, storage medium and pipeline fault diagnosis equipment
CN116701948A
Fault migration diagnosis method based on balanced hybrid adversarial and smooth suppression label
CN117195062A
Digital-analog dual-drive oil and gas pipe network fault diagnosis method and system oriented to class imbalance data scene
CN118797980A
Method and system for generating test inputs for fault diagnosis
US20240070041A1