A pipeline crack accurate positioning method, system, terminal and storage medium thereof
Through the combination of Bayesian neural network and acoustic emission technology, the cross-correlation time difference and position relationship of acoustic emission signals are used to solve the problem of inaccurate positioning of pipeline cracks in the existing technology and achieve high-precision positioning of pipeline cracks without positioning error. Control within 1cm.
Patent Information
- Application Number
- CN202211014642.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing pipeline crack location methods have the problem of inaccurate location. The time difference location method, energy location method and regional location method all have large deviations, making it impossible to achieve efficient and accurate online real-time detection.
Bayesian neural network combined with acoustic emission technology is used to locate the position through the functional relationship between the cross-correlation time difference of the acoustic emission signal and the position. The powerful nonlinear fitting ability of the Bayesian neural network is used to achieve high-precision pipeline crack positioning.
It achieves precise positioning of cracks on the pipeline, and the positioning accuracy is controlled within 1cm, which simplifies the signal processing process and improves the accuracy and efficiency of detection.
Smart Images

Figure CN115436470B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pipeline crack positioning, and is based on Bayesian neural network and acoustic emission technology, and specifically relates to a pipeline crack accurate positioning method, system, terminal and storage medium thereof. Background Art
[0002] Pipeline transportation is one of the five major transportation industries along with highway, railway, water and shipping, and has a wide range of irreplaceable applications around the world. The pipeline system has become the main equipment for storing and transporting fluid materials in various fields due to its advantages of low pollution, high efficiency, economy and safety. The pipeline itself will be damaged to a certain extent during production, manufacturing or installation. During service, if it is subjected to long-term high temperature and high pressure or the combined effects of internal and external factors such as the transport medium, the pipeline will suffer various forms of failure such as corrosion, aging or cracking, among which cracks are the most common and most dangerous. Once a problem occurs in the pipeline system, it may cause casualties, environmental pollution and huge economic losses. Therefore, the use of scientific and efficient detection methods to accurately locate the location where cracks may or have occurred in the pipeline and to check the health of the pipeline is conducive to the maintenance and repair of the pipeline system, and is of great significance for ensuring the safety and stability of the pipeline during service.
[0003] Currently, the commonly used pipeline non-destructive testing methods include X-ray testing, ultrasonic testing, eddy current testing, magnetic flux leakage testing, and acoustic emission testing.
[0004] Acoustic Emission, also known as stress wave emission, refers to the phenomenon that the material releases strain energy in the form of elastic waves under stress. For example, earthquake waves are a very familiar type of acoustic emission wave. In addition, when we put a piece of tin next to our ear and slowly bend it with force, there will be a crackling sound, which is also a common acoustic emission wave. The acoustic emission signals generated by different materials due to different mechanisms cover a wide range of frequencies, ranging from infrasound frequencies as low as a few Hz, audio frequencies of 20Hz to 20KHz, to ultrasonic frequencies of several MHz.
[0005] When a material or structure is subjected to internal or external forces, stress concentration will occur locally, resulting in uneven stress distribution. Once the strain energy in this unstable state accumulates to a certain extent, cracks or phase changes will occur to reach a stable low-energy state. In this process, elastic waves will be generated to release the accumulated energy. This phenomenon is acoustic emission. We call this structural change that causes energy release an acoustic emission source. When a solid material undergoes local deformation, the acoustic emission wave will appear and propagate in two ways: transverse waves and longitudinal waves. The acoustic emission wave will propagate along the solid medium, part of which reaches the surface of the solid medium and is received by the receiving device installed on the equipment, becoming a detection signal. Another part will be refracted and returned to the inside of the material, and another part will form Rayleigh waves. After performing relevant signal processing on the received detection signal, we can locate the acoustic emission source and infer its properties, and even conduct damage research and evaluation on the material. This is the complete acoustic emission detection technology.
[0006] Deep learning: Deep learning technology is an algorithm that attempts to use multiple processing layers containing complex structures or composed of multiple nonlinear transformations to perform high-level abstraction of data. So far, there are several deep learning frameworks, such as convolutional neural networks, deep belief networks, and recursive neural networks, which have been applied in computer vision, speech recognition, natural language processing, audio recognition, and bioinformatics, and have achieved excellent results.
[0007] Bayesian neural network: It is an advanced artificial neural network. Bayesian neural network regards weights as obeying a Gaussian distribution with a mean of μ and a variance of σ. Each weight obeys a different Gaussian distribution. The back propagation network optimizes the weights, while the Bayesian neural network optimizes the mean and variance of the weights. Compared with ordinary back propagation networks, Bayesian neural networks are less prone to overfitting and have better stability.
[0008] At present, the commonly used pipeline non-destructive testing methods include X-ray detection, ultrasonic detection, eddy current detection, magnetic flux leakage detection, etc. The X-ray detection method has low detection sensitivity for certain types of defects and is harmful to the human body. Although the ultrasonic detection method has high sensitivity, the detection process is relatively complicated and the cost is high. The magnetic flux leakage detection method has cumbersome operation process and causes greater pollution. These non-destructive testing methods have different shortcomings. They can often only judge whether there is a certain defect in the pipeline and the approximate location of the defect. They cannot achieve efficient and accurate online real-time detection and cannot accurately locate defects such as cracks. As a dynamic online monitoring method, acoustic emission technology has high sensitivity to the activity of defects and does not require the inspected object to be conductive. The detection process is simple to operate and can provide real-time and continuous defect information of the pipeline. In addition, since cracks will also generate acoustic emission signals during the expansion process, the use of acoustic emission technology can also realize the judgment and positioning of the possible emission crack position, but acoustic emission technology also has the problem of inaccurate positioning. The existing time difference positioning method, energy positioning method, and regional positioning method based on acoustic emission technology have certain limitations, and there will be large deviations when directly applied to pipeline crack positioning. (The principle of the time difference positioning method is simple, but the positioning accuracy is very low; in energy positioning, the energy attenuation of the acoustic emission wave is very easily affected by factors such as the type of structural material, building geometry and wave mode, resulting in unstable positioning; the regional positioning method is simple to implement and not prone to mispositioning, but the positioning accuracy is low and cannot give the exact location of the acoustic emission source.) Therefore, it is very necessary to use more advanced intelligent positioning technology to efficiently and accurately locate the crack position on the pipeline. Summary of the invention
[0009] In view of the problem of inaccurate pipeline crack positioning in the prior art, the present invention provides a precise pipeline crack positioning method, system, terminal and storage medium thereof, which utilizes the powerful nonlinear fitting ability of the Bayesian neural network to achieve positioning by finding the functional relationship between the cross-correlation time difference of the acoustic emission signal and the position. High-precision positioning can be achieved by simply processing the collected signals.
[0010] The present invention is achieved through the following technical solutions:
[0011] A method for accurately locating pipeline cracks comprises the following steps:
[0012] Obtain the acoustic emission signal of pipeline crack propagation;
[0013] Preprocessing the acquired acoustic emission signals of pipeline crack propagation to obtain fitting data; and dividing the fitting data into training set fitting data and test set fitting data;
[0014] A Bayesian neural network model is established, and the parameters of the Bayesian neural network model are initialized. The training set fitting data is input into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data rendering diagram, and the pipeline crack is located by the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering diagram; the test set fitting data is input into the Bayesian neural network model for testing to obtain a pipeline crack location test set fitting data rendering diagram. When the time difference-pipeline crack position in the pipeline crack location test set fitting data rendering diagram meets the error condition of the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering diagram, the pipeline crack is accurately located.
[0015] Preferably, the preprocessing process of the acquired acoustic emission signal of pipeline crack propagation is as follows:
[0016] The acoustic emission signals of the two sensors are read, and the Wavelet-EMD joint denoising method is used to denoise the read acoustic emission signals. The denoised signals are cross-correlated to obtain the time difference from the signal to the two sensors. The data set is labeled according to the correspondence between the signal time difference and the pipeline crack position. The signal time difference data and the pipeline crack position are modified to the same order of magnitude, and the data is cleaned to remove obvious abnormal sample points in the data set. Finally, all the obtained data sets are classified into training set fitting data and test set fitting data.
[0017] Preferably, the parameters of the Bayesian neural network model are initialized, including the mean and variance of the weight nodes and bias nodes, that is, the mean value of the weight node w μ , weight node variance w σ , bias node mean b μ and the bias node variance b σ ; Randomly sample the Gaussian distribution to obtain the weight node sampling w ε and bias node sampling b ε ; Through the weight node mean w μ , weight node variance w σ and weight node sampling w ε Calculate the weight value w used to connect each node by biasing the node mean b μ , bias node variance b σ and bias node sampling b ε Calculate the bias value b of each node, and finally calculate the prior probability, posterior probability and maximum likelihood estimate of the weight value w and the bias value b for subsequent calculation of the loss value.
[0018] Preferably, the process of establishing the Bayesian neural network model is as follows:
[0019] Set the number of network layers and nodes, and derive and write the loss function of the model by initializing the parameters of the Bayesian neural network model and calculating the prior probability, posterior probability and maximum likelihood estimation of the weight value w and bias value b. Select the Adam optimizer for optimization, and compare the undefined optimal hyperparameters to obtain the Bayesian neural network model.
[0020] Furthermore, the Bayesian neural network model structure includes an input layer, a hidden layer and an output layer, wherein the input feature is the time difference of the signal reaching the sensor, and the input layer is set to 1 node; the hidden layer is set to 32 nodes; the output feature is the crack position, and the output layer is set to 1 node.
[0021] Preferably, the training set fitting data is input into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data effect diagram, and the time difference-pipeline crack position and loss value in the fitting result are observed. When the time difference-pipeline crack position and loss value in the fitting result do not meet the pipeline crack location requirements, the Bayesian neural network model parameters are adjusted and the training set fitting data is input into the adjusted Bayesian neural network model again for training to obtain the pipeline crack location training set fitting data effect diagram, until the time difference-pipeline crack position and loss value in the fitting result meet the pipeline crack location requirements, the pipeline crack location is completed.
[0022] Preferably, the error condition between the time difference-pipeline crack position in the pipeline crack location test set fitting data effect diagram and the time difference-pipeline crack position in the pipeline crack location training set fitting data effect diagram is to satisfy the error within 1 cm.
[0023] A pipeline crack accurate positioning system, comprising:
[0024] An acquisition module, used for acquiring acoustic emission signals of pipeline crack propagation;
[0025] The first processing module is used to preprocess the acquired acoustic emission signal of pipeline crack propagation to obtain fitting data; and divide the fitting data into training set fitting data and test set fitting data;
[0026] The second processing module is used to establish a Bayesian neural network model, initialize the parameters of the Bayesian neural network model, input the training set fitting data into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data rendering, and locate the pipeline crack through the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering; input the test set fitting data into the Bayesian neural network model for testing to obtain a pipeline crack location test set fitting data rendering; when the time difference-pipeline crack position in the pipeline crack location test set fitting data rendering meets the error condition of the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering, the pipeline crack is accurately located.
[0027] A mobile terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for accurately locating pipeline cracks when executing the computer program.
[0028] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for accurately locating a pipeline crack are implemented as described above.
[0029] Compared with the prior art, the present invention has the following beneficial technical effects:
[0030] The present invention provides a precise method for locating pipeline cracks, which uses a Bayesian neural network to perform regression prediction on the collected acoustic emission signals of pipeline crack expansion, so as to locate the specific position of the crack on the pipeline. First, an acoustic emission instrument is needed to collect the acoustic emission signals of pipeline crack expansion, and then the signals are appropriately preprocessed; then a Bayesian neural network is designed and the processed data is input into the network; finally, the network fits the relationship between the time difference of the acoustic emission signal reaching the sensor and the crack position, so as to accurately locate the crack position on the pipeline according to the collected signal. The present invention uses an intelligent positioning method, and utilizes the powerful nonlinear fitting ability of the Bayesian neural network to achieve positioning by finding the functional relationship between the cross-correlation time difference of the acoustic emission signal and the position. High-precision positioning can be achieved by simply processing the collected signal.
[0031] Furthermore, the present invention combines deep learning technology with acoustic emission technology to design a new pipeline crack location method. It only needs to use an acoustic emission sensor to measure the acoustic emission signal of pipeline crack expansion, and then through simple cross-correlation processing, the Bayesian neural network can realize the location of expanding and potential cracks on the pipeline. Experiments show that the positioning accuracy can be controlled within 1 cm. This method is simple to implement and has high positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a flow chart of the method for accurately locating pipeline cracks in the present invention;
[0033] Figure 2 This is a principle structure diagram of the pipeline crack accurate positioning system in the present invention;
[0034] Figure 3 It is an overall flow chart of the pipeline crack accurate positioning method in an embodiment of the present invention;
[0035] Figure 4 A flow chart for reading data and preprocessing development in an embodiment of the present invention;
[0036] Figure 5 A flow chart for initializing the parameters of a Bayesian neural network model according to an embodiment of the present invention;
[0037] Figure 6 A schematic diagram of the Bayesian neural network model structure in an embodiment of the present invention;
[0038] Figure 7 A development flow chart of the Bayesian neural network model structure in an embodiment of the present invention;
[0039] Figure 8 A flow chart for model training and testing development in an embodiment of the present invention;
[0040] Fig. 9 This is a fitting result diagram after 500 rounds of training in an embodiment of the present invention;
[0041] Fig.10 This is a fitting result diagram after 1000 rounds of training in an embodiment of the present invention;
[0042] Fig.11 This is a fitting result diagram after 1500 rounds of training in an embodiment of the present invention;
[0043] Fig.12 This is a fitting result diagram after 2000 rounds of training in an embodiment of the present invention;
[0044] Fig.13 This is a fitting result diagram after testing in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0047] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0048] The present invention provides a precise pipeline crack positioning method, system, terminal and storage medium thereof, which utilize the powerful nonlinear fitting capability of a Bayesian neural network to achieve positioning by finding the functional relationship between the cross-correlation time difference and position of acoustic emission signals, and can achieve high-precision positioning by simply processing the collected signals.
[0049] Specifically, according to Figure 1 As shown, the pipeline crack accurate positioning method comprises the following steps:
[0050] S1. Obtaining acoustic emission signals of pipeline crack propagation;
[0051] S2. Preprocessing the acquired acoustic emission signal of pipeline crack propagation to obtain fitting data; and dividing the fitting data into training set fitting data and test set fitting data;
[0052] Specifically, the acoustic emission signals of the two sensors are read, and the read acoustic emission signals are denoised by using the Wavelet-EMD joint denoising method. The denoised signals are cross-correlated to obtain the time difference between the signals and the two sensors. The data set is labeled according to the correspondence between the signal time difference and the pipeline crack position, the signal time difference data and the pipeline crack position are modified to the same order of magnitude, and the data is cleaned to remove obvious abnormal sample points in the data set. Finally, all the obtained data sets are classified into training set fitting data and test set fitting data.
[0053] S3. Establish a Bayesian neural network model, initialize the parameters of the Bayesian neural network model, input the training set fitting data into the Bayesian neural network model for training to obtain the pipeline crack location training set fitting data effect diagram, and locate the pipeline crack through the time difference-pipeline crack position in the pipeline crack location training set fitting data effect diagram; input the test set fitting data into the Bayesian neural network model for testing to obtain the pipeline crack location test set fitting data effect diagram, when the time difference-pipeline crack position in the pipeline crack location test set fitting data effect diagram meets the error condition of the time difference-pipeline crack position in the pipeline crack location training set fitting data effect diagram, the pipeline crack is accurately located.
[0054] Specifically, the parameters of the Bayesian neural network model are initialized, including the mean and variance of the weight nodes and bias nodes, that is, the mean value of the weight node w μ , weight node variance w σ , bias node mean b μ and the bias node variance b σ ; Randomly sample the Gaussian distribution to obtain the weight node sampling w ε and bias node sampling b ε ; Through the weight node mean w μ , weight node variance w σ and weight node sampling w ε Calculate the weight value w used to connect each node by biasing the node mean b μ , bias node variance b σ and bias node sampling b ε Calculate the bias value b of each node, and finally calculate the prior probability, posterior probability and maximum likelihood estimate of the weight value w and the bias value b for subsequent calculation of the loss value.
[0055] Specifically, the process of establishing the Bayesian neural network model is as follows:
[0056] Set the number of network layers and nodes, and derive and write the loss function of the model by initializing the parameters of the Bayesian neural network model and calculating the prior probability, posterior probability and maximum likelihood estimation of the weight value w and bias value b. Select the Adam optimizer for optimization, and compare the undefined optimal hyperparameters to obtain the Bayesian neural network model.
[0057] Among them, the Bayesian neural network model structure includes an input layer, a hidden layer and an output layer, where the input feature is the time difference between the signal reaching the sensor, and the input layer is set to 1 node; the hidden layer is set to 32 nodes; the output feature is the crack position, and the output layer is set to 1 node.
[0058] Specifically, the training set fitting data is input into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data effect diagram, and the time difference-pipeline crack position and loss value in the fitting results are observed. When the time difference-pipeline crack position and loss value in the fitting results do not meet the pipeline crack location requirements, the Bayesian neural network model parameters are adjusted and the training set fitting data is input into the adjusted Bayesian neural network model again for training to obtain the pipeline crack location training set fitting data effect diagram, until the time difference-pipeline crack position and loss value in the fitting results meet the pipeline crack location requirements, the pipeline crack location is completed.
[0059] Specifically, the error condition between the time difference-pipeline crack position in the pipeline crack location test set fitting data effect diagram and the time difference-pipeline crack position in the pipeline crack location training set fitting data effect diagram is to satisfy the error within 1 cm, that is, the time difference-pipeline crack position in the pipeline crack location test set fitting data effect diagram is close to the time difference-pipeline crack position in the pipeline crack location training set fitting data effect diagram.
[0060] Example
[0061] according to Figure 3 As shown, a method for accurately locating pipeline cracks is provided, comprising the following steps:
[0062] Step 1: Obtain the acoustic emission signal of pipeline crack propagation.
[0063] The acoustic emission signal acquisition system is used for collection. The PAC-II system of the American Acoustic Physics Company is used, which consists of an acoustic emission sensor, a preamplifier and an acoustic emission instrument. The sensor is an R15a acoustic emission acquisition sensor. The R15a sensor has a wide adaptability and is the most commonly used sensor in acoustic emission detection. It belongs to a piezoelectric resonant acoustic emission sensor. The center frequency of the sensor is 150KHz, the resonant frequency is 70KHz, and the operating frequency range is 50-200KHz. The preamplifier is a 2 / 4 / 6 amplifier of PAC. Its excitation voltage is DC28V; to meet different needs, there are three types of gain: 20dB, 40dB and 60dB, of which the most commonly used is 40dB gain. During the installation of the sensor, a coupling agent is usually used to couple the sensor and the pipe wall to improve the coupling between them. The coupling agent can reduce the gap between the sensor surface and the pipe wall surface, and play a transition role, reducing the acoustic impedance between the two surfaces, thereby reducing the energy loss caused by interface reflection. When installing the sensor, apply a proper amount of coupling agent to the area polished to a metallic luster, and place the sensor in the area coated with the coupling agent so that the sensor surface is well coupled with the tank wall surface.
[0064] Step 2: Data preprocessing, data reading and preprocessing development process as follows Figure 4 As shown;
[0065] After the acoustic emission data of pipeline crack propagation is collected by the acoustic emission instrument, it needs to be processed in a certain way before it can be used as an effective input for fitting in the Bayesian neural network.
[0066] The acoustic emission signal emitted when a specimen is damaged is usually very weak. At the same time, the external environment and the acquisition system will introduce background noise and various interferences. Therefore, the weak acoustic emission signal that characterizes the damage properties of the composite pipeline must be extracted from the noisy signal. Simple denoising methods such as median filtering, mean filtering and limiting filtering can only remove pulse interference caused by accidental factors, but are powerless for other complex noises.
[0067] The noise sources of acoustic emission signals mainly include the following two aspects: ① The noise generated inside the material being tested, which seems to be randomly distributed in the time domain, making it difficult to detect defects; ② The acoustic emission signal may bring noise in each link of the transmission to the acquisition system, mainly various loop noises, such as the electronic noise of the acoustic emission sensor preamplifier, the friction noise of the loading device during the loading test, etc. The electronic noise of the amplifier, the friction noise of the loading device during the loading test, etc. These complex noises seriously reduce the signal-to-noise ratio of the collected acoustic emission signals, which seriously restricts the reliability of acoustic emission detection and evaluation. Therefore, before using acoustic emission signals for damage location and identification, effectively removing the noise in the acoustic emission signals and improving the signal-to-noise ratio are indispensable steps in acoustic emission signal processing.
[0068] At present, the denoising methods of acoustic emission signals are mainly concentrated on wavelet denoising and EMD (empirical mode decomposition) denoising. However, wavelet denoising also has some disadvantages, such as the denoising effect is closely related to the signal characteristics and the selection of wavelet basis functions. When the signal-to-noise ratio is relatively small, the denoising effect is not ideal. Although the EMD denoising method overcomes the disadvantage that wavelet denoising needs to select basis functions, the overall denoising effect is not as good as wavelet denoising. In this embodiment, a wavelet-EMD joint denoising method is used to denoise the signal, that is, the signal is first subjected to wavelet threshold denoising, and then the denoised signal is subjected to empirical mode decomposition, and denoising is performed on each mode to achieve the best denoising effect.
[0069] The signals obtained by the two sensors after denoising are cross-correlated to obtain the time difference between the signals reaching the two sensors, which is used as the benchmark for locating the crack position in the subsequent model. The cross-correlation function reflects the degree of correlation between two stable mechanical signals. For two random signals with different frequencies, the cross-correlation function is zero, that is, they are not correlated. However, for two homologous signals, cross-correlation processing can be performed to detect the time difference between the two signals. According to the property of cross-correlation, the sound wave signals emitted by the same sound source (crack) can be cross-correlated. When the cross-correlation function has the maximum peak, it means that the two signals are most correlated at the time of the maximum peak, which reflects the time difference △t between the two sensors receiving the acoustic emission signals. The cross-correlation function reflects the degree of correlation between the two random signals. If the two signals are not correlated, the cross-correlation function is zero. Only the signals emitted by the same signal source are the most correlated. Therefore, the cross-correlation function has the characteristic of filtering interference signals. No special filtering is required to eliminate interference during measurement. This is also one of the characteristics of correlation analysis, that is, anti-interference characteristics, which is particularly suitable for signal detection in harsh environments such as underground pipelines.
[0070] In order to facilitate subsequent training, the data set is labeled according to the correspondence between the signal time difference and the crack position, and the signal time difference data and the crack position are modified to the same magnitude. This process is to establish a reasonable data set so that the signal time difference and the crack position correspond to each other, so as to facilitate the fitting of the subsequent model.
[0071] Next, data cleaning is performed, that is, obvious abnormal sample points in the data set are removed to ensure that the subsequent Bayesian neural network can fit the functional relationship between the time difference and the crack position well; finally, all the obtained data sets are divided into training set and test set in a ratio of 1:4.
[0072] Step 3: Initialize the Bayesian neural network model parameters. Figure 5 As shown;
[0073] The data to be fitted has been prepared, and the next step is to design a Bayesian neural network model. Since the value of each weight and bias node of the Bayesian neural network is not fixed, but is regarded as obeying a Gaussian distribution with a mean of μ and a variance of σ, and in each iteration, the transmitted weight and bias node values are obtained by sampling the Gaussian distribution values, so each transmission is equivalent to a back-propagation neural network.
[0074] First, you need to initialize the network parameters, including the mean and variance of the weight nodes and bias nodes, that is, the mean value of the weight node w μ , weight node variance w σ , bias node mean b μ and the bias node variance b σ ; Randomly sample the Gaussian distribution to obtain the weight node sampling wε and bias node sampling b ε ; Through the weight node mean w μ , weight node variance w σ and weight node sampling w ε Calculate the weight value w used to connect each node by biasing the node mean b μ , bias node variance b σ and bias node sampling b ε Calculate the bias value b of each node, and finally calculate the prior probability, posterior probability and maximum likelihood estimate of the weight value w and the bias value b for subsequent calculation of the loss value.
[0075] Step 4: Establishment of Bayesian neural network model Figure 7 As shown;
[0076] Neural networks generally consist of three parts: input layer, hidden layer, and output layer. A network can contain several hidden layers, and each layer can have several nodes. The number of nodes in the input layer is determined by the number of features of the input data; the number of nodes in the hidden layer needs to be designed according to the specific situation. The more nodes there are, the stronger the computing power of the model, but the corresponding amount of calculation will increase significantly, resulting in slower training speed; the number of nodes in the output layer is determined by the number of output requirements. The network structure design is as follows:
[0077] Considering the complexity of the mathematical relationship between input features and output data, and while ensuring positioning accuracy, the Bayesian neural network designed for this positioning system adopts a three-layer structure, namely an input layer, a hidden layer, and an output layer. The input feature is the time difference between the signal reaching the two sensors, so the input layer is set to 1 node; the hidden layer is set to 32 nodes; the output feature is the crack position, so the output layer is set to 1 node, such as Figure 6 shown.
[0078] Define the loss function and optimizer for model training
[0079] According to variational inference (VI) and evidence lower bound (ELBO), the loss function of the model is derived and written by the prior probability, posterior probability and maximum likelihood estimation of w and b. Adam is selected as the optimizer in the training process. The optimal hyperparameters are selected by comparison and the model training rounds are set to 2000 times.
[0080] Step 5: Model training and testing development flow chart as shown below Figure 8 Shown
[0081] The Bayesian neural network of this positioning system has been designed. Next, the training set is input into the network model for training, and a fitting effect diagram on the training set is made to observe the fitting results and loss values. In the process, the network model parameters are appropriately adjusted to obtain the best fitting effect.
[0082] After the network model training is completed, the test set is input into the model for fitting, and a fitting effect diagram on the test set is made to evaluate the network model's positioning accuracy for the crack position. If it does not meet the requirements, the model is adjusted appropriately and the test is continued. If the fitting effect of the test set is good, the crack position can be located based on the time difference of the signal.
[0083] The system can also give the maximum and minimum errors and their locations during the positioning process, as well as the size of the average error.
[0084] The training set is input into the Bayesian neural network model for training. The training rounds are set to 2000 rounds. The fitting effect diagram after 500 rounds is as follows: Fig. 9 As shown; the fitting effect diagram after 1000 training rounds is as follows Fig.10 As shown; the fitting effect diagram after 1500 training rounds is as follows Fig.11 As shown; the fitting effect diagram after 2000 training rounds is as follows Fig.12 As shown;
[0085] The point distribution is the true value of the pipeline crack, and the line distribution is the fitting curve. The model can successfully fit the functional relationship between the time difference and the location of the pipeline crack.
[0086] Finally, the test set is verified. The test set has 40 points, such as Fig.13 As shown in the figure, the fitting curve of the test results is well fitted. After calculation, the average positioning error of the 40 test points is 0.592cm. The overall positioning accuracy is high, the maximum error is 2.42cm, the minimum error is 0.029cm, and the stability is high, achieving the goal of controlling the error within 1cm.
[0087] In summary, the method for accurately locating cracks in a pipeline provided by the present invention can realize the accurate positioning of cracks on the pipeline or cracks that may appear. It is based on Bayesian neural network (a deep network in deep learning technology) and acoustic emission technology (a non-destructive testing method). The purpose to be achieved is: by using an acoustic emission sensor to collect the acoustic emission signal generated when the crack of the pipeline expands, and then using a Bayesian neural network to process the collected acoustic emission signal, analyzing the information carried in the signal, to realize the positioning of the crack on the pipeline, so that the positioning error of the crack is controlled within 1 cm.
[0088] like Figure 2As shown, the present invention also provides a pipeline crack accurate positioning system, including an acquisition module, a first processing module and a second processing module;
[0089] An acquisition module, used for acquiring acoustic emission signals of pipeline crack propagation;
[0090] The first processing module is used to preprocess the acquired acoustic emission signal of pipeline crack propagation to obtain fitting data; and divide the fitting data into training set fitting data and test set fitting data;
[0091] The second processing module is used to establish a Bayesian neural network model, initialize the parameters of the Bayesian neural network model, input the training set fitting data into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data rendering, and locate the pipeline crack through the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering; input the test set fitting data into the Bayesian neural network model for testing to obtain a pipeline crack location test set fitting data rendering; when the time difference-pipeline crack position in the pipeline crack location test set fitting data rendering meets the error condition of the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering, the pipeline crack is accurately located.
[0092] The present invention also provides a mobile terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, such as a pipeline crack precise positioning program.
[0093] When the processor executes the computer program, the steps of the above pipeline crack accurate positioning method are implemented, for example:
[0094] Obtain the acoustic emission signal of pipeline crack propagation;
[0095] Preprocessing the acquired acoustic emission signals of pipeline crack propagation to obtain fitting data; and dividing the fitting data into training set fitting data and test set fitting data;
[0096] A Bayesian neural network model is established, and the parameters of the Bayesian neural network model are initialized. The training set fitting data is input into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data rendering diagram, and the pipeline crack is located by the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering diagram; the test set fitting data is input into the Bayesian neural network model for testing to obtain a pipeline crack location test set fitting data rendering diagram. When the time difference-pipeline crack position in the pipeline crack location test set fitting data rendering diagram meets the error condition of the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering diagram, the pipeline crack is accurately located.
[0097] Alternatively, when the processor executes the computer program, the functions of each module in the above system are realized, for example:
[0098] An acquisition module, used for acquiring acoustic emission signals of pipeline crack propagation;
[0099] The first processing module is used to preprocess the acquired acoustic emission signal of pipeline crack propagation to obtain fitting data; and divide the fitting data into training set fitting data and test set fitting data;
[0100] The second processing module is used to establish a Bayesian neural network model, initialize the parameters of the Bayesian neural network model, input the training set fitting data into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data rendering, and locate the pipeline crack through the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering; input the test set fitting data into the Bayesian neural network model for testing to obtain a pipeline crack location test set fitting data rendering; when the time difference-pipeline crack position in the pipeline crack location test set fitting data rendering meets the error condition of the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering, the pipeline crack is accurately located.
[0101] Exemplarily, the computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the mobile terminal. For example, the computer program may be divided into an acquisition module, a first processing module, and a second processing module; the specific functions of each module are as follows:
[0102] An acquisition module, used for acquiring acoustic emission signals of pipeline crack propagation;
[0103] The first processing module is used to preprocess the acquired acoustic emission signal of pipeline crack propagation to obtain fitting data; and divide the fitting data into training set fitting data and test set fitting data;
[0104] The second processing module is used to establish a Bayesian neural network model, initialize the parameters of the Bayesian neural network model, input the training set fitting data into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data rendering, and locate the pipeline crack through the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering; input the test set fitting data into the Bayesian neural network model for testing to obtain a pipeline crack location test set fitting data rendering; when the time difference-pipeline crack position in the pipeline crack location test set fitting data rendering meets the error condition of the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering, the pipeline crack is accurately located.
[0105] The mobile terminal may be a computing device such as a desktop computer, a notebook, a palm computer, a cloud server, etc. The mobile terminal may include, but is not limited to, a processor and a memory.
[0106] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the mobile terminal, and uses various interfaces and lines to connect various parts of the entire mobile terminal.
[0107] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the mobile terminal by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0108] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0109] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for accurately locating pipeline cracks are implemented.
[0110] If the module / unit integrated in the mobile terminal is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0111] Based on such understanding, the present invention implements all or part of the processes in the above method, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above pipeline crack accurate positioning method can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc.
[0112] The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0113] It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for accurately locating pipeline cracks, characterized in that: The steps include: Obtain the acoustic emission signal of pipeline crack propagation; Preprocessing the acquired acoustic emission signals of pipeline crack propagation to obtain fitting data; and dividing the fitting data into training set fitting data and test set fitting data; The preprocessing process of the acquired acoustic emission signal of pipeline crack propagation is as follows: The acoustic emission signals of the two sensors are read, and the Wavelet-EMD joint denoising method is used to denoise the read acoustic emission signals. The denoised signals are cross-correlated to obtain the time difference from the signal to the two sensors. The data set is labeled according to the correspondence between the signal time difference and the pipeline crack position. The signal time difference data and the pipeline crack position are modified to the same order of magnitude, and the data is cleaned to remove obvious abnormal sample points in the data set. Finally, all the obtained data sets are classified into training set fitting data and test set fitting data. A Bayesian neural network model is established, and the parameters of the Bayesian neural network model are initialized. The training set fitting data is input into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data rendering diagram, and the pipeline crack is located by the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering diagram; the test set fitting data is input into the Bayesian neural network model for testing to obtain a pipeline crack location test set fitting data rendering diagram. When the time difference-pipeline crack position in the pipeline crack location test set fitting data rendering diagram meets the error condition of the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering diagram, the pipeline crack is accurately located.
2. A pipeline crack accurate positioning method according to claim 1, characterized in that: Initialize the parameters of the Bayesian neural network model, including the mean and variance of the weight nodes and bias nodes, that is, the mean value of the weight node w μ , weight node variance w σ , bias node mean b μ and the bias node variance b σ ; Randomly sample the Gaussian distribution to obtain the weight node sampling w ε and bias node sampling b ε ; Through the weight node mean w μ , weight node variance w σ and weight node sampling w ε Calculate the weight value w used to connect each node by biasing the node mean b μ , bias node variance b σ and bias node sampling b ε Calculate the bias value b of each node, and finally calculate the prior probability, posterior probability and maximum likelihood estimate of the weight value w and the bias value b for subsequent calculation of the loss value.
3. A pipeline crack accurate positioning method according to claim 1, characterized in that: The process of establishing the Bayesian neural network model is as follows: Set the number of network layers and nodes, and derive and write the loss function of the model by initializing the parameters of the Bayesian neural network model and calculating the prior probability, posterior probability and maximum likelihood estimation of the weight value w and bias value b. Select the Adam optimizer for optimization, and compare the undefined optimal hyperparameters to obtain the Bayesian neural network model.
4. A pipeline crack accurate positioning method according to claim 3, characterized in that: The Bayesian neural network model structure includes an input layer, a hidden layer and an output layer, wherein the input feature is the time difference between the signal reaching the sensor, the input layer is set to 1 node, and the hidden layer is set to 32 nodes; The output feature is the crack location, and the output layer is set to 1 node.
5. A pipeline crack accurate positioning method according to claim 1, characterized in that: The training set fitting data is input into the Bayesian neural network model for training to obtain the pipeline crack location training set fitting data effect diagram, and the time difference-pipeline crack position and loss value in the fitting results are observed. When the time difference-pipeline crack position and loss value in the fitting results do not meet the pipeline crack location requirements, the Bayesian neural network model parameters are adjusted and the training set fitting data is input into the adjusted Bayesian neural network model again for training to obtain the pipeline crack location training set fitting data effect diagram, until the time difference-pipeline crack position and loss value in the fitting results meet the pipeline crack location requirements, the pipeline crack location is completed.
6. A pipeline crack accurate positioning method according to claim 1, characterized in that: The error condition between the time difference-pipeline crack position in the effect diagram of the fitting data of the pipeline crack location test set and the time difference-pipeline crack position in the effect diagram of the fitting data of the pipeline crack location training set is that the error is within 1 cm.
7. A pipeline crack accurate positioning system, characterized in that: include: An acquisition module, used for acquiring acoustic emission signals of pipeline crack propagation; The first processing module is used to preprocess the acquired acoustic emission signal of pipeline crack propagation to obtain fitting data; and divide the fitting data into training set fitting data and test set fitting data; The second processing module is used to establish a Bayesian neural network model, initialize the parameters of the Bayesian neural network model, input the training set fitting data into the Bayesian neural network model for training to obtain a pipeline crack location training set fitting data rendering, and locate the pipeline crack through the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering; input the test set fitting data into the Bayesian neural network model for testing to obtain a pipeline crack location test set fitting data rendering; when the time difference-pipeline crack position in the pipeline crack location test set fitting data rendering meets the error condition of the time difference-pipeline crack position in the pipeline crack location training set fitting data rendering, the pipeline crack is accurately located.
8. A mobile terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for accurately locating a pipeline crack as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a method for accurately locating a pipeline crack as described in any one of claims 1 to 6 are implemented.
