A digital-analog dual-drive oil and gas pipeline network fault diagnosis method and system for unbalanced data scenarios
Through the deep generation adversarial model of digital-analog dual-drive, combined with the series-parallel hybrid mechanism, the negative pressure wave attenuation model is embedded, which solves the overfitting problem caused by the unbalanced data set of oilfields, improves the accuracy of fault diagnosis and data generation Physical interpretability.
Patent Information
- Application Number
- CN202410449534.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-08-06
AI Technical Summary
Current intelligent fault diagnosis models are prone to overfitting problems when dealing with oilfield imbalanced data sets, resulting in a high risk of false positives and underreports. The traditional generative adversarial model reduces the physical interpretability and quality of generated fault data. .
Using digital-analog dual-driven deep generation adversarial model, by constructing a deep generation adversarial model based on long and short-term memory networks, and combining the series-parallel hybrid mechanism, the negative voltage wave attenuation model is embedded into the generator to ensure that the generated fault data is in compliance with The physical laws of real operating scenarios.
It effectively solves the overfitting problem caused by class imbalanced data sets, improves the physical interpretability and quality of generated fault data, reduces the risk of false alarms and underreports, and improves the accuracy of fault diagnosis of oil and gas pipeline networks.
Smart Images

Figure CN118797980B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a digital-analog dual-drive oil and gas pipeline network fault diagnosis method and system for quasi-unbalanced data scenarios, relates to oil and gas pipeline network fault diagnosis technology, and belongs to the technical field of mechanical fault detection and diagnosis. Background Art
[0002] As a key infrastructure for energy transportation and distribution, pipelines play an important role in promoting my country's oil and gas reserves and production and ensuring stable energy supply. In recent years, with the continuous growth of energy demand and the extension of pipeline network operation life, the safety hazards and rising maintenance costs caused by pipeline corrosion and aging have become increasingly prominent, causing great harm to people's life safety and social and economic development. Therefore, the development of high-efficiency, high-reliability, and low-cost oil and gas pipeline network fault diagnosis methods has important practical needs and great engineering significance for improving transportation reliability and safety and reducing economic losses and operation and maintenance costs.
[0003] Deep learning, as an advanced artificial intelligence technology widely used in the field of industrial fault diagnosis, relies on building and training multi-layer neural networks to imitate the information processing and learning mechanisms of the human brain. Deep learning technology can automatically extract key features from large amounts of industrial data and effectively identify complex fault patterns and trends. However, large deep learning models usually contain millions of parameters. In order to avoid overfitting and ensure that the model can effectively learn from the training data and adapt to new data, a large amount of input data is often required to support the model to capture a wider and deeper data pattern, as well as to achieve precise adjustment and optimization of network parameters. In the field of intelligent diagnosis of oil and gas pipeline networks, since fault events are relatively rare in actual operation, the amount of normal state data is much larger than the fault data. This imbalance between categories, namely the class imbalance problem, causes the deep learning model to be biased towards the more frequently occurring category, namely the normal state, during the training process, which in turn affects the model's performance in accurately identifying fault states.
[0004] In existing studies on class imbalance, generating fault data and using it to balance the dataset is a widely-regarded solution. However, a common problem is that too much attention is paid to the accuracy and similarity of the generated data with the real data in statistical indicators, while ignoring the physical interpretability of the generated fault data. Generally speaking, it is difficult for complex data-driven generative models to clearly explain their decision-making basis and operating logic, and it is possible to generate fault data that is similar to the real data in visual and statistical features, but inconsistent with the physical laws. This inconsistency will significantly increase the safety risk of generating fault data and seriously affect the accuracy of the fault diagnosis model, thereby increasing the risk of misdiagnosis and missed diagnosis.
[0005] For example, document number CN114964476B discloses a fault diagnosis method, device and equipment for oil and gas pipeline system dynamic equipment, which collects vibration signals of oil and gas pipeline system dynamic equipment to be detected; performs continuous wavelet transform on the vibration signals to obtain a two-dimensional time-frequency image; inputs the two-dimensional time-frequency image into a pre-constructed convolutional neural network fault diagnosis model, uses the convolutional neural network fault diagnosis model to perform fault diagnosis on the oil and gas pipeline system dynamic equipment to be detected, and obtains a fault diagnosis result; uses the LIME algorithm to analyze the fault diagnosis result to obtain fault analysis information, wherein the fault analysis information is to mark different energy intensities on the two-dimensional time-frequency image, and different energy intensities represent different contributions of the time-frequency region corresponding to the energy intensity to the fault diagnosis result. However, the problem of class imbalanced data sets that often appear in fault diagnosis research is not raised.
[0006] In the existing oil and gas pipeline (or pipeline network) fault diagnosis technology, no one has paid attention to the class imbalanced data set problem that often appears in fault diagnosis research and has provided targeted solutions, which affects the accuracy and practicality of oil and gas pipeline (or pipeline network) fault diagnosis. In addition, the traditional generative adversarial model built based on deep neural network is directly used in oil and gas pipeline (or pipeline network) fault diagnosis, which will reduce the physical interpretability and quality of the generated fault data, thereby affecting the accuracy of oil and gas pipeline (or pipeline network) fault diagnosis. Therefore, the overfitting problem faced by the current intelligent fault diagnosis model when processing oil field class imbalanced data sets, as well as the risk of false positives and false negatives, still exists. How to continuously improve the accuracy of oil and gas pipeline network fault diagnosis is a problem we have always faced. Summary of the invention
[0007] In view of the shortcomings of the prior art, the present invention provides a digital-analog dual-driven oil and gas pipeline fault diagnosis method and system for unbalanced data scenarios, aiming to solve the overfitting problem and the high risk of false alarms and missed alarms faced by current intelligent fault diagnosis models when processing oilfield unbalanced data sets.
[0008] The technical solution adopted by the present invention to solve the above technical problems is:
[0009] A digital-analog dual-drive oil and gas pipeline network fault diagnosis method for unbalanced data scenarios, the method comprising the following steps:
[0010] Using the oil and gas pipeline network monitoring system, the negative pressure wave parameters of the pipeline network are obtained and a training set is constructed. ,in For the Real pipeline data, The sampling points consist of For the Data labels; is the number of data;
[0011] The changing rules of the negative pressure wave characteristics of the pipeline network under the influence of the environment and external factors are analyzed, and the pipe flow equation of the pipeline network is established based on the mass conservation and momentum conservation theorems, that is, a set of hyperbolic partial differential equations constructed by the continuity equation and motion equation of the fluid:
[0012] ,
[0013] ,
[0014] in, is the fluid density, is the flow rate, It's time. It's pressure. is the acceleration due to gravity, is the pipe inclination angle, is the inner diameter of the pipe, is the friction coefficient, is the axial distance along the pipe.
[0015] The hyperbolic partial differential equations formed by formula (1) and formula (2) are solved by using the characteristic line method and the finite difference method. Combined with the pipeline leakage boundary conditions and the leakage rate, the negative pressure wave expression at the leakage point can be obtained as follows:
[0016]
[0017] in, is the pressure change at the leak point, is the pressure wave velocity, is the leakage rate, is the flow rate before the pipeline leaks.
[0018] Without considering the energy loss caused by the movement of the fluid in the pipe network, by analyzing the attenuation characteristics of the negative pressure wave during propagation, it can be concluded through multiple experimental analyses that the attenuation law of the negative pressure wave during the transmission process is approximately exponential attenuation, and the expression is:
[0019] ,
[0020] ,
[0021] in, and are the negative pressure wave pressure values at the inlet and outlet of the pipeline network, is the negative pressure wave attenuation factor, is the pipe length.
[0022] Step 3: Build a deep generative adversarial model based on long short-term memory (LSTM) network
[0023] The deep generative adversarial network (GAN) based on the LSTM network includes a generator and a discriminator (The inner diameter of the pipe and the discriminator are both 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 a data sequence similar to the real data sequence, and its formula can be expressed as:
[0024] ,
[0025] ,
[0026] in, is the generator LSTM unit at time The hidden state of is the noise input, is the generator LSTM unit at time The hidden state of and are the weight and bias of the generator respectively, To generate fault data.
[0027] In addition, the goal of the discriminator is to correctly classify real data and generated data. When the input data is real data, the discriminator formula can be expressed as:
[0028] ,
[0029] ,
[0030] in, is the discriminator LSTM unit at time The hidden state of It is real data. is the discriminator LSTM unit at time The hidden state of and are the weight and bias of the discriminator respectively. When the input data is generated data, the discriminator formula can be expressed as:
[0031] ,
[0032] ,
[0033] The ultimate goal of the neural network is to adjust and To achieve the ideal classification performance, and It is adaptively optimized according to the set loss function rather than artificially set.
[0034] Step 4: Use the serial-parallel hybrid mechanism to build a digital-analog dual-driven deep generative adversarial model, that is, a hybrid generative adversarial model
[0035] The series-parallel hybrid mechanism first embeds the attenuation model into the generator to ensure that the generated fault data conforms to the attenuation law of the negative pressure wave signal in the actual operation scenario and improves the physical rationality of the generated data. To this end, 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 Figure 1 The generator in fused physical constraint layers) and adopted the key parameter, namely the leakage rate , as the parameter for network update. Then, the mechanism uses the prediction error of the inlet and outlet pressure difference of the generated fault data and the inlet and outlet pressure difference of the real data as the regularization term to ensure that the generated fault data conforms to the real pipe network characteristics. The formula is as follows:
[0036]
[0037] in, and are the inlet and outlet pressure differences for generating fault data, respectively.
[0038] Based on formula (11), the generator loss of the hybrid generative adversarial model is:
[0039]
[0040] The discriminator loss of the hybrid generative adversarial model is:
[0041]
[0042] Step 5: Update network parameters using RMSProp optimizer
[0043] The generator and discriminator are trained alternately using the RMSProp optimizer, first fixing the generator and minimizing the discriminator loss. ; Then fix the discriminator and minimize the generator loss .
[0044] Step 6: Generate faulty data using a hybrid generative adversarial model and balance the training set
[0045] After the training of the hybrid generative adversarial model is completed, the noise in step 3 is input into the generator to generate fault data for expanding the diagnosis training set.
[0046] The pipeline fault diagnosis model is trained using the oil and gas pipeline network data set obtained in step 6 to obtain the pipeline fault category.
[0047] The present invention deeply understands the propagation and attenuation mechanism of negative pressure waves when oil and gas move in the pipeline network, and establishes a negative pressure wave attenuation physical model that reflects the operation status of the pipeline network; constructs a deep generative adversarial model suitable for processing time series data based on the long short-term memory network (LSTM); designs a reasonable series-parallel mechanism fusion physical model and a data-driven model to construct a hybrid generative adversarial model; uses the trained hybrid generative adversarial model to generate pipeline network fault data and balance the original training set; and trains an intelligent fault diagnosis model to realize pipeline fault type identification.
[0048] The present invention proposes the problem of class imbalanced data sets that often appear in fault diagnosis and provides targeted solutions, thereby improving the accuracy and practicality of oil and gas pipeline (or pipeline network) fault diagnosis. The present invention also constructs a hybrid generative adversarial model based on a series-parallel hybrid mechanism to improve the physical interpretability and quality of generated fault data, solves the overfitting problem faced by current intelligent fault diagnosis models when processing oil field class imbalanced data sets, reduces the risks of false alarms and missed alarms, and ultimately achieves the improvement of the accuracy of intelligent fault diagnosis of oil and gas pipeline networks (oil and gas pipelines).
[0049] The present invention simultaneously considers and integrates the prior knowledge from the physical model and the learning ability of the data-driven model. Compared with the pure data-driven model, the pipe network prior knowledge contained in the physical model can narrow the parameter space search domain, reduce the amount of estimated parameters, improve the interpretability and generalization performance of the deep generative model, and at the same time improve the physical rationality and feature distinguishability of the generated fault data, thereby effectively overcoming the negative impact of class imbalanced data sets on the performance of the diagnostic model, and further improving the accuracy of pipeline intelligent fault diagnosis.
[0050] The digital-analog dual-driven oil and gas pipeline fault diagnosis method for class-imbalanced data scenarios provided by the present invention has at least the following advantages and effects compared with the prior art: Different from the general intelligent fault diagnosis method based on deep learning technology, the present invention mainly focuses on the class-imbalanced data set problem that often appears in fault diagnosis research, and improves the accuracy and practicality of the intelligent fault diagnosis method by providing targeted solutions.
[0051] Different from the traditional generative adversarial model built based on deep neural network, the present invention constructs a hybrid generative adversarial model based on series-parallel hybrid mechanism. By integrating the physical model of pipeline operation characteristics and the data-driven model, it effectively narrows the parameter space search domain, reduces the parameter estimation amount, reduces the risk of overfitting, and at the same time gives physical meaning to the model, thereby improving the physical interpretability and quality of the generated fault data.
[0052] Considering the actual application of current intelligent fault diagnosis technology, this method has practical application value and has achieved certain application results. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 is a flow chart of a hybrid generative adversarial model fault diagnosis process according to an embodiment of the present invention;
[0054] Figure 2 is a visualization example diagram of generated data and real data according to an embodiment of the present invention;
[0055] Figure 3 4 is a comparison chart of the visual analysis performance of the embodiments of the present invention. DETAILED DESCRIPTION
[0056] The following is combined with Figure 1-3 The present invention will be further described:
[0057] In order to enable those 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 conjunction with the accompanying drawings in the embodiments of the present application.
[0058] Figure 1 This is a flowchart of the digital-analog dual-drive oil and gas pipeline network fault diagnosis process for class-unbalanced data scenarios in the technical solution of the present invention. The overall process is implemented by Python language programming. Figure 1 , a digital-analog dual-driven oil and gas pipeline network fault diagnosis method for class-unbalanced data scenarios, comprising the following steps:
[0059] Using the oil and gas pipeline network monitoring system, the negative pressure wave parameters of the pipeline network are obtained and a training set is constructed. ,in For the Real pipeline data, The sampling points consist of For the Data labels; is the number of data.
[0060] The changing rules of the negative pressure wave characteristics of the pipeline network under the influence of the environment and external factors are analyzed, and the pipe flow equation of the pipeline network is established based on the mass conservation and momentum conservation theorems, that is, a set of hyperbolic partial differential equations constructed by the continuity equation and motion equation of the fluid:
[0061] ,
[0062] ,
[0063] in, is the fluid density, is the flow rate, It's time. It's pressure. is the acceleration due to gravity, is the pipe inclination angle, is the inner diameter of the pipe, is the friction coefficient, is the axial distance along the pipe.
[0064] The hyperbolic partial differential equations formed by formula (1) and formula (2) are solved by using the characteristic line method and the finite difference method. Combined with the pipeline leakage boundary conditions and the leakage rate, the negative pressure wave expression at the leakage point can be obtained as follows:
[0065]
[0066] in, is the pressure change at the leak point, is the pressure wave velocity, is the leakage rate, is the flow rate before the pipeline leaks.
[0067] Without considering the energy loss caused by the movement of the fluid in the pipe network, by analyzing the attenuation characteristics of the negative pressure wave during propagation, it can be concluded through multiple experimental analyses that the attenuation law of the negative pressure wave during the transmission process is approximately exponential attenuation, and the expression is:
[0068] ,
[0069] ,
[0070] in, and are the negative pressure wave pressure values at the inlet and outlet of the pipeline network, is the negative pressure wave attenuation factor, is the pipe length.
[0071] The deep generative adversarial network (GAN) based on the LSTM network includes a generator and a discriminator The goal of the generator is to generate a data sequence similar to the real data sequence, and its formula can be expressed as:
[0072] ,
[0073] ,
[0074] in, is the generator LSTM unit at time The hidden state of is the noise input, is the generator LSTM unit at time The hidden state of and are the weight and bias of the generator respectively, To generate fault data.
[0075] In addition, the goal of the discriminator is to correctly classify real data and generated data. When the input data is real data, the discriminator formula can be expressed as:
[0076] ,
[0077] ,
[0078] in, is the discriminator LSTM unit at time The hidden state of It is real data. is the discriminator LSTM unit at time The hidden state of and are the weight and bias of the discriminator respectively. When the input data is generated data, the discriminator formula can be expressed as:
[0079] ,
[0080] ,
[0081] Step 4: Use the serial-parallel hybrid mechanism to build a digital-analog dual-driven deep generative adversarial model, that is, a hybrid generative adversarial model
[0082] The series-parallel hybrid mechanism first embeds the attenuation model into the generator to ensure that the generated fault data conforms to the attenuation law of the negative pressure wave signal in the actual operation scenario and improves the physical rationality of the generated data. To this end, it is necessary to embed the negative pressure wave attenuation model into the neural network as a physical constraint layer and use the key parameter, namely the leakage rate , as the parameter for network update. Then, the mechanism uses the prediction error of the inlet and outlet pressure difference of the generated fault data and the inlet and outlet pressure difference of the real data as the regularization term to ensure that the generated fault data conforms to the real pipe network characteristics. The formula is as follows:
[0083]
[0084] in, and are the inlet and outlet pressure differences for generating fault data, respectively.
[0085] Based on formula (11), the generator loss of the hybrid generative adversarial model is:
[0086]
[0087] The discriminator loss of the hybrid generative adversarial model is:
[0088]
[0089] Step 5: Update network parameters using RMSProp optimizer
[0090] The generator and discriminator are trained alternately using the RMSProp optimizer, first fixing the generator and minimizing the discriminator loss. ; Then fix the discriminator and minimize the generator loss .
[0091] After the training of the hybrid generative adversarial model is completed, the noise in step 3 is input into the generator to generate fault data for expanding the diagnosis training set.
[0092] The pipeline fault diagnosis model is trained using the oil and gas pipeline network data set obtained in step 6 to obtain the pipeline fault category.
[0093] In step 1, the oil and gas pipeline network monitoring system is used to collect the pipeline network negative pressure wave parameters and construct a real data set. In step 2, the pipeline 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 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 hybrid generative adversarial model adopts a series-parallel hybrid mechanism, and its implementation process is as follows: (1) First, the negative pressure wave attenuation model is embedded in the neural network as a physical constraint layer, and the key parameter, namely the leakage rate, is adopted. , as a parameter for network update; (2) Then, the mechanism uses the prediction error between the inlet and outlet pressure difference of the generated fault data and the inlet and outlet pressure difference of the real data as a regularization term to ensure that the generated fault data conforms to the real pipeline network characteristics. Example
[0094] Based on the above technical solution, the effectiveness of the method of the present invention is verified by taking the fault diagnosis of oil and gas pipeline network as an example. Figures 1 to 3 .
[0095] 1. Experimental Setup
[0096] The training data used in this invention is collected from the pressure sensor in the pipeline simulation platform (collected from the pressure sensor in the ZJ-CGGD platform, the total length of the pipeline is 180m, the pressure is 0.5Mpa, the flow rate is 10m^3 / h, and the sampling frequency is 1024Hz). The total length of the pipeline is 180m, the pressure is set to 0.5Mpa, the flow rate is 10 / h, and the sampling frequency of the signal is 1024Hz. According to the valve opening and closing degree, the generated model data set includes four health states: large leakage, medium leakage, small leakage, and normal. The total sample size is 2000, and the sample size under each health state is 500.
[0097] The hybrid generative adversarial model consists of a generator and a discriminator, both of which are composed of a 3-layer LSTM network. During the training process of the hybrid generative adversarial model, the total number of iterations is 5000; in each cycle, the discriminator is trained 10 times and the generator is trained 1 time; the batch size is 128; the optimizer used in training is RMSProp, and the learning rate is 1e-4. The algorithms mentioned in this invention are all built with the PyTorch framework and trained on the NVIDIA GEFORCE RTX 3090 GPU.
[0098] Figure 2 This is a visualization diagram of the generated data and the real data of an embodiment of the present invention: 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 graph, wherein the generated data is dark in color and the real data is light in color.
[0099] 2. Comparison of algorithms
[0100] In order to comprehensively evaluate the performance of the hybrid generative adversarial model, this paper selected 7 generative models for comparison. The detailed introduction is as follows:
[0101] VAE: Variational Autoencoder;
[0102] GAN-minmax: the original form of GAN;
[0103] LSGAN: A GAN variant that uses mean square error as the loss function;
[0104] InfoGAN: A GAN variant that controls the generation mode through input latent representation.
[0105] SeqGAN: A GAN variant that uses reinforcement learning to generate sequence data.
[0106] TTS-GAN: A GAN variant that uses Transformer to build generators and discriminators;
[0107] MAD-GAN: A GAN variant that uses LSTM-RNN to build the generator and discriminator.
[0108] 3. Visual performance evaluation
[0109] By comparing the performance of the seven generative models, the performance of the hybrid generative adversarial model can be demonstrated. The experimental results are shown in Figure 3. Figure 3 It can be seen from (a) that there is a big difference between the data generated by VAE and the actual data. Figure 3 As shown in (e)-(g), the data generated by SeqGAN, TTS-GAN and MAD-GAN are more realistic than the above methods, but contain many interferences, which may lead to lower classification accuracy. Compared with the above results, the data generated by the hybrid generative adversarial model maintains a high consistency with the real pipeline data. In addition, it is worth noting that Figure 3 The red curve in (h) is smoother than the curves in other images, which shows that the hybrid generative adversarial model in this invention is more stable than the other 7 generative models.
[0110] 4. Quantitative evaluation of metrics
[0111] In this section, the maximum mean difference indicator is used to quantify the difference between the generated data distribution and the real distribution to evaluate the similarity between the two distributions. The experimental results are shown in Table 1. It can be clearly seen that the performance of the hybrid generative adversarial model is better than other generative models. Specifically, the maximum mean difference indicator value of the hybrid adversarial generative model under large leakage, medium leakage, and small leakage states is the smallest among all algorithms, which shows 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, it is of practical significance to develop a hybrid generative adversarial model because the pipeline data distribution it generates has statistical properties similar to the real-world data distribution.
[0112] Table 1. Experimental results of quantitative evaluation of metrics
[0113]
[0114] Example: Taking the fault diagnosis of oil pipeline as an example, the effectiveness of the fault diagnosis method of the present invention is verified.
[0115] A real data set was obtained from the oil pipeline fault simulation platform. The data set contains four categories: normal, large leakage, medium leakage, and small leakage. The fault data was obtained under a pressure of 0.5MPa, and the data acquisition frequency was 1024Hz. The original data set contains 3000 normal state data, and 200 large leakage, medium leakage, and small leakage data respectively. The data of three types of faults generated by the hybrid generative adversarial model are supplemented to the original data set, that is, after the completion operation, the original data set contains 3000 four types of pipeline network data each. In order to reduce the influence of random factors and verify the reliability of the present invention, all diagnostic experiments were repeated ten times, and the mean of the ten diagnostic accuracy rates was calculated. The experimental results are shown in Tables 2 and 3. It can be found from the experimental results that: 1) sufficient and balanced pipeline network data sets significantly improve the performance of the diagnostic model; 2) compared with the other 7 generative models, the training data set constructed by the hybrid generative adversarial model has the highest accuracy.
[0116] Table 2 Fault diagnosis accuracy (1)
[0117]
[0118] Table 3 Fault diagnosis accuracy (2)
[0119]
[0120] In summary, the method proposed in the present invention generates data that not only conforms to the physical characteristics of real-world pipeline network operation, but also has better visualization performance and statistical characteristics than existing comparative methods, effectively reducing the risk of missed reports and false reports, and improving the accuracy of pipeline fault diagnosis. The method of the present invention has been verified through simulation experiments and practical applications, and the technical effects and practicality claimed by the present invention have been verified.
[0121] The algorithm (method) proposed in the present invention is the underlying technical core of the present invention, and various products can be derived based on the algorithm.
[0122] Based on the algorithm (method) proposed in the present invention, a digital-analog dual-driven oil and gas pipeline fault diagnosis system for quasi-unbalanced data scenarios is developed using a programming language. The system has program modules corresponding to the steps of the above-mentioned technical solution, and executes the steps of the above-mentioned digital-analog dual-driven oil and gas pipeline fault diagnosis method for quasi-unbalanced data scenarios during operation.
[0123] The computer program of the developed system (software) is stored on a computer-readable storage medium, and the computer program is configured to implement the steps of the above-mentioned digital-analog dual-driven oil and gas pipeline network fault diagnosis method for quasi-unbalanced data scenarios when called by a processor. That is, the present invention is materialized on a carrier to become a computer program product.
[0124] The present invention also provides an oil and gas pipeline network fault diagnosis device, the oil and gas pipeline network fault diagnosis device includes at least one processor, and a memory connected to the at least one processor in communication, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned digital-analog dual-drive oil and gas pipeline network fault diagnosis method for class-unbalanced data scenarios. The oil and gas pipeline network fault diagnosis device is used as a terminal intelligent product applied by the present invention and is applied to oil and gas pipeline network fault diagnosis.
[0125] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] The computer programs (also referred to as programs, software, software applications, or codes) of the present invention include machine instructions for programmable processors, and these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or device (e.g., disk, optical disk, memory, programmable logic device PLD) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0127] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, they are all within the scope of protection of the present invention.
Claims
1. A digital-analog dual-drive oil and gas pipeline network fault diagnosis method for unbalanced data scenarios, characterized in that: The implementation process of the oil and gas pipeline network fault diagnosis method is as follows: Step 1: Collect key parameters of the pipeline network and build a training data set Using the oil and gas pipeline network monitoring system, the negative pressure wave parameters of the pipeline network are obtained and a training set is constructed. ,in For the Real pipeline data, The sampling points consist of For the Data labels; is the number of data; Step 2: Establish a physical model for negative pressure wave attenuation The changing rules of the negative pressure wave characteristics of the pipeline network under the influence of the environment and external factors are analyzed, and the pipe flow equation of the pipeline network is established based on the mass conservation and momentum conservation theorems. A set of hyperbolic partial differential equations constructed by the continuity equation and motion equation of the fluid are as follows: , , in, is the fluid density, is the flow rate, It's time. It's pressure. is the acceleration due to gravity, is the pipe inclination angle, is the inner diameter of the pipe, is the friction coefficient, is the axial distance along the pipe, ∇ represents the gradient; The characteristic line method and finite difference method are used to solve the hyperbolic partial differential equation formed by formula (1) and formula (2). Combined with the pipeline leakage boundary conditions and leakage rate, the negative pressure wave expression at the leakage point is obtained as follows: , in, is the pressure change at the leak point, is the pressure wave velocity, is the leakage rate, is the flow rate before the pipeline leaks; Without considering the energy loss caused by the movement of the fluid in the pipe network, by analyzing the attenuation characteristics of the negative pressure wave during propagation, it is concluded that the attenuation law of the negative pressure wave during the transmission process is approximately exponential attenuation, and the expression is: , , Step 3: Build a deep generative adversarial model based on long short-term memory network The deep generative adversarial model based on long short-term memory network consists of a generator and a discriminator ; The goal of the generator is to generate a data sequence similar to the real data sequence, and its formula is expressed as: , , in, is the generator LSTM unit at time The hidden state of is the noise input, is the generator LSTM unit at time The hidden state of and are the weight and bias of the generator respectively, To generate fault data; The discriminator is used to correctly classify real data and generated data. When the input data is real data, the discriminator formula is expressed as: , , in, is the discriminator LSTM unit at time The hidden state of It is real data. is the discriminator LSTM unit at time The hidden state of and are the weight and bias of the discriminator respectively; when the input data is generated data, the discriminator formula is expressed as: , , Step 4: Use the serial-parallel hybrid mechanism to build a digital-analog dual-driven deep generative adversarial model and a hybrid generative adversarial model; The series-parallel hybrid mechanism is as follows: first, the attenuation model is embedded into the generator to ensure that the generated fault data conforms to the attenuation law of the negative pressure wave signal in the actual operation scenario and improve the physical rationality of the generated data; the negative pressure wave attenuation model is embedded into the neural network as a physical constraint layer, and key parameters, leakage rate, are used. , as the parameter for network update; then, the mechanism uses the prediction error between the inlet and outlet pressure difference of the generated fault data and the inlet and outlet pressure difference of the real data as the regularization term to ensure that the generated fault data conforms to the real pipe network characteristics. The formula is as follows: , in, and are the inlet and outlet pressure differences for generating fault data respectively; Based on formula (11), the generator loss of the hybrid generative adversarial model is: , The discriminator loss of the hybrid generative adversarial model is: , Step 5: Update network parameters using RMSProp optimizer The generator and discriminator are trained alternately using the RMSProp optimizer, first fixing the generator and minimizing the discriminator loss. ; Then fix the discriminator and minimize the generator loss ; Step 6: Generate faulty data using a hybrid generative adversarial model and balance the training set After the hybrid generative adversarial model training is completed, the noise in step 3 is input into the generator to generate fault data for expanding the diagnosis training set; Step 7: Train the diagnostic model to identify pipeline network fault types The pipeline fault diagnosis model is trained using the oil and gas pipeline network data set obtained in step 6 to obtain the pipeline fault category.
2. According to claim 1, a digital-analog dual-drive oil and gas pipeline network fault diagnosis method for unbalanced data scenarios is characterized in that: In step 1, the oil and gas pipeline network monitoring system is used to collect pipeline network negative pressure wave parameters and construct a real data set.
3. The digital-analog dual-drive oil and gas pipeline network fault diagnosis method for unbalanced data scenarios according to claim 1 is characterized in that: In step 2, the pipe flow equation of the pipe network is established 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.
4. The digital-analog dual-drive oil and gas pipeline network fault diagnosis method for unbalanced data scenarios according to claim 1 is characterized in that: In step 3, the established LSTM-based deep generative adversarial model is used to process time series data.
5. The digital-analog dual-drive oil and gas pipeline network fault diagnosis method for quasi-unbalanced data scenarios according to claim 1, 2, 3 or 4, characterized in that: The hybrid generative adversarial model adopts a serial-parallel hybrid mechanism, and its implementation process 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 parameters, leakage rate , as a parameter for network update; (2) Then, the mechanism uses the prediction error between the inlet and outlet pressure difference of the generated fault data and the inlet and outlet pressure difference of the real data as the regularization term to ensure that the generated fault data conforms to the real pipeline network characteristics.
6. The digital-analog dual-drive oil and gas pipeline network fault diagnosis method for unbalanced data scenarios according to claim 1 is characterized in that: Discriminator formula and It is obtained by adaptive optimization based on the set loss function.
7. A digital-analog dual-drive oil and gas pipeline network fault diagnosis system for unbalanced data scenarios, characterized by: The system has a program module corresponding to the steps of any one of claims 1 to 6 above, and executes the steps in the above-mentioned digital-analog dual-driven oil and gas pipeline network fault diagnosis method for class-unbalanced data scenarios when running.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of a digital-analog dual-driven oil and gas pipeline network fault diagnosis method for a quasi-unbalanced data scenario according to any one of claims 1 to 6 when called by a processor.
9. An oil and gas pipeline network fault diagnosis device, characterized in that: The oil and gas pipeline network fault diagnosis device includes at least one processor and a memory communicatively connected to 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 so that the at least one processor can execute the digital-analog dual-drive oil and gas pipeline network fault diagnosis method for quasi-unbalanced data scenarios as described in any one of claims 1-6.
Citation Information
Patent Citations
Fault diagnosis methods, devices and equipment for oil and gas pipeline system dynamic equipment
CN114964476B
Detection method of oil and gas pipeline slow leakage on basis of negative pressure wave signal sparse representation
CN105844051A
Pipeline fault diagnosis method and system, storage medium and pipeline fault diagnosis equipment
CN116701948A