Artificial intelligence identification method for natural gas pipeline leakage signal
Technical Field
The invention belongs to the field of a natural gas pipeline leakage early warning system with high sulfur content, and particularly relates to a natural gas pipeline leakage signal artificial intelligence identification method which takes an innovative distributed optical fiber sensing technology as a core and performs deep learning based on CNN.
Background
In the analysis and processing of the leakage sensing signal of the distributed optical fiber natural gas pipeline, due to factors such as long distance, all weather and complex environment, the problems that data collected at the later stage are huge, complex and various, signals are difficult to distinguish manually and the like are caused, so that machine learning becomes a necessary technology for processing the leakage sensing signal of the distributed optical fiber natural gas pipeline.
In the last decade, machine learning plays an important role in the analysis and processing of leakage sensing signals of distributed optical fiber natural gas pipelines, and flow processing methods of data preprocessing, feature extraction and pattern recognition tend to be mature; however, when a machine learning algorithm is applied, distinguishable features of signals need to be manually extracted, which often requires a large amount of manpower and material resources, however, leakage signals acquired by the system change with changes of application scenes and places, which causes that feature engineering needs to be updated again, and the generalization is extremely low. With the popularity of deep learning, researchers use the characteristic that a Convolutional Neural Network (CNN) integrates feature extraction and recognition and classification, and avoid a large amount of repeated labor by performing operations such as cleaning, feature extraction, feature selection, model training, discriminant analysis and the like on a natural gas pipeline leakage sensing signal, so that preliminary results are obtained at present.
Disclosure of Invention
The invention aims to provide an artificial intelligence identification method for natural gas pipeline leakage signals, which can effectively carry out operations such as cleaning, feature extraction, feature selection, model training, discriminant analysis and the like on natural gas pipeline leakage sensing signals through deep learning and can better complete signal analysis and processing.
The technical scheme of the invention is as follows:
a CNN-based natural gas pipeline leakage signal artificial intelligence identification method for deep learning comprises the following steps: (1) constructing a distributed optical fiber leakage early warning data set; (2) data segmentation; (3) defining an event label; (4) denoising the wavelet packet; (5) CNN network structure design and realization; (6) and (5) CNN network training.
The distributed optical fiber leakage early warning data set refers to an external environment interference event faced by the leakage monitoring of the gathering and transportation pipeline;
the data segmentation refers to triggering each spatial sampling point along with the light pulse period, longitudinally accumulating the transverse spatial signals acquired in each light pulse triggering period along a time axis, continuously accumulating N acquired original signal tracks, and constructing to obtain a space-time signal matrix with space dimensions of N and time dimensions of M;
the event label definition refers to that a real label of a short-time event signal sample obtained by segmentation is attached to the sample and added into a database, and the whole data set is divided into a training set and a testing set according to the proportion of 7: 3;
the wavelet packet denoising refers to the fact that various noises are mixed in an original short-time signal, and the later classification and identification performance is greatly influenced, so that the denoising of the original signal is necessary, and the wavelet decomposition or the wavelet packet decomposition is generally used in practice;
the CNN network structure is based on an optical fiber pipeline event data set, and monitoring and identification suitable for leakage signals of a natural gas gathering and transportation pipeline are realized by using deep learning open source framework tensorflow and python languages;
the CNN network training is based on the basic CNN structure and the initial setting parameters.
Specifically, in order to comprehensively consider the performance of the leakage monitoring system, the distributed optical fiber leakage early warning data set separately detects and identifies leakage-related events, and various events are respectively acquired during field data acquisition, so that no aliasing condition exists, and mixed event signal identification is not involved;
specifically, the wavelet decomposition is based on the idea of unilateral decomposition, after the low-frequency part and the high-frequency part of the signal are obtained through the first decomposition, only the low-frequency part is decomposed for the second time, the high-frequency part is discarded, and the subsequent operations are repeated;
specifically, the wavelet packet decomposition is similar to the growth of a binary tree, high and low frequency parts can be decomposed at the same time each time, and relatively, provided information is richer, so that the method is more suitable for optical fiber sensing signals with both high and low frequencies;
specifically, the CNN grid structure combines the structural characteristics of a phi-OTDR one-dimensional signal, the input directly adopts the one-dimensional signal, the intermediate convolution calculation is also one-dimensional convolution, and a classifier uses a full-connection network;
specifically, the CNN mesh training needs to perform network training through a large amount of data, the training data is subjected to network to obtain a predicted class label, the predicted class label is compared with a sample real class label to obtain a loss value, a gradient is calculated to update network parameters, the network parameters include a weight matrix and a bias variable, and after the parameters are updated, data is input again, and the above processes are repeated to obtain a trained CNN model.
The invention has the beneficial effects that: the CNN-based natural gas pipeline leakage signal artificial intelligence recognition method for deep learning can automatically recognize leakage signals and other interference signals through the learning of a large number of simulated leakage samples, eliminates the interference of other interference signals to an early warning system, establishes a distributed optical fiber leakage early warning model, and achieves the model recognition accuracy rate of 90%.
Drawings
Fig. 1 is a flow chart of an artificial intelligence identification method for a natural gas pipeline leakage signal according to an embodiment of the present invention;
fig. 2 is a flowchart of a specific CNN network training method illustrated in fig. 1.
Detailed Description
In order to describe the method for identifying the leakage signal of the natural gas pipeline in more detail, the following description further describes the method through specific embodiments.
Example of the implementation
As shown in fig. 1, the artificial intelligence identification method for natural gas pipeline leakage signals provided by the invention adopts the following steps: (1) constructing a distributed optical fiber leakage early warning data set; (2) data segmentation; (3) defining an event label; (4) denoising the wavelet packet; (5) CNN network structure design and realization; (6) and (5) CNN network training.
The implementation process of the artificial intelligent identification method for the natural gas pipeline leakage signal provided by the embodiment is as follows:
external environment interference faced by gathering and transportation pipeline leakage monitoring mainly comprises manual excavation, vehicle running, landslide and rockfall and the like; in order to comprehensively consider the performance of the leakage monitoring system, the project divides the leakage related events into five types, namely manual excavation, vehicle driving, landslide and rockfall, leakage signals and background noise; the current recognition target is the independent detection and recognition of the five types of event signals, and various types of events are respectively collected during field data collection, so that the aliasing condition is avoided, and the mixed event signal recognition is not involved.
The data acquisition process of the distributed optical fiber sensing system comprises the following steps: triggering along with the light pulse period at each space sampling point, longitudinally accumulating the transverse space signals collected in each light pulse triggering period along a time axis, continuously accumulating N collected original signal tracks, and constructing a space-time signal matrix with space dimension N and time dimension M, namely an instant space-time two-dimensional response matrix.
When in division, firstly, the space-time response signal matrix obtained by accumulation is divided along a space axis to obtain the optical fiber sensing one-dimensional time sequence signal of each monitoring point, and then the event signal with the time length of L in the one-dimensional time sequence signal is sequentially intercepted and used as a short-time event signal sample which is recorded as a short-time event signal sampleX1,XThe 2 … project defines the event types of manual excavation, vehicle driving, landslide and rockfall, leakage signal, background noise and the like as 1, 2, 3, 4 and 5 respectively, and divides the obtained short-time event signal sample according to the definitionsX1,X2 …, attaching real labels thereof and adding the labels to a database, completing the construction of a data training set of five types of typical event signals, and dividing the whole data set into a training set and a test set according to a 7:3 ratio.
Five types of typical event data sets constructed based on signal samples acquired on a pipeline leakage monitoring site are shown in table 1 and comprise signal sample numbers of various types of event signal training sets and testing sets and labels artificially defined by different events.
Various noises are mixed in the original short-time signal, so that the later classification and identification performances are greatly influenced, and therefore, the noise reduction of the original signal is necessary.
In practice, wavelet decomposition or wavelet packet decomposition is generally used, the former is based on the idea of unilateral decomposition, after the low-frequency part and the high-frequency part of a signal are obtained by first decomposition, only the low-frequency part is decomposed for the second time, the high-frequency part is discarded, and the subsequent operations are repeated; the wavelet packet is similar to the growth of a binary tree, high and low frequency parts can be decomposed at the same time each time, relatively more information is provided, and the method is more suitable for optical fiber sensing signals with both high and low frequencies.
The project is based on an optical fiber pipeline event data set, and a CNN structure suitable for distributed optical fiber leakage monitoring and identification of a natural gas gathering and transportation pipeline is realized by using deep learning open source framework tensorflow and python languages.
By combining the structural characteristics of phi-OTDR one-dimensional signals, the overall structure is a network structure with 10 layers of input layers, namely a convolutional layer C1-a pooling layer P1-a convolutional layer C2-a pooling layer P2-a convolutional layer C3-a pooling layer P3-a full-connection layer FC 1-a full-connection layer FC 2-an output layer, one-dimensional signals are directly adopted for input, and the middle convolution calculation is also one-dimensional convolution; the classifier uses a fully connected network.
For subsequent network training adjustment, initial parameters of the CNN, including the size, number, and step size of the convolution kernel, structural parameters such as the size and step size of the pooling kernel, and hyper-parameters such as the learning rate, need to be determined, and are set according to prior experience as shown in table 2.
The results of the parameter calculation for each layer of CNN according to the basic parameter settings of table 2 are shown in table 3, and are not shown since the number of parameters of the pooled cores is small and relatively negligible.
Based on the constructed basic CNN structure and the initial setting parameters, network training needs to be carried out through a large amount of data, the training data are subjected to network to obtain a prediction class label, a loss value is obtained by comparing the prediction class label with a sample real class label, the network parameters are updated by calculating a gradient, the network parameters comprise a weight matrix and a bias variable, and the process is repeated by inputting data again after the parameters are updated to obtain a trained CNN model.
The initialization state determines the starting point of network training, and in order to make the network easy to converge, a truncation normal distribution method is adopted to initialize the network parameters.
Inputting training data to complete the forward propagation process.
Backward propagation is carried out for network tuning; and calculating a loss function according to the classification output, and continuously striving to update and optimize the constructed CNN network.