A Deep Learning-Based Method for Denoising and Adaptive Temperature Compensation of Ultrasonic Inspection Signals for Pipe Welds
By using the ERDFNet YOLO network and Transformer encoder based on deep learning, efficient noise reduction and temperature adaptive compensation of ultrasonic inspection signals of weld seams in long-distance metal pipelines were achieved. This solved the shortcomings of noise suppression and temperature compensation in traditional methods, and improved the detection accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGTZE UNIVERSITY
- Filing Date
- 2026-04-07
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies for ultrasonic testing of weld seams in long-distance metal pipelines, traditional filtering methods lead to waveform distortion and are difficult to effectively remove complex environmental noise. Physical model methods have poor generalization ability in temperature compensation and are difficult to achieve accurate compensation across operating conditions.
A deep learning-based approach is adopted to identify noisy targets and perform local smooth reconstruction using the ERDFNet YOLO network, combined with a Transformer encoder for temperature compensation, thus constructing an adaptive signal denoising and temperature compensation system.
It significantly improves noise suppression capability and temperature compensation accuracy, enabling high-precision signal compensation under different temperatures, pipe diameters, and defect types, thereby improving the reliability of detection and the efficiency of on-site detection in engineering projects.
Smart Images

Figure CN122306962A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent nondestructive testing technology, specifically to a method for denoising and temperature adaptive compensation of ultrasonic testing signals for pipeline welds based on deep learning. Background Technology
[0002] Long-distance metal pipelines often operate in complex outdoor environments with huge temperature differences. Drastic changes in ambient temperature (such as -30℃ to 50℃) not only introduce severe background noise, causing the effective signal to be masked, but also change the physical properties of the piezoelectric sensor and the pipeline metal, causing significant phase shifts and amplitude fluctuations in the ultrasonic detection signal, which seriously affects the quantitative identification of weld defects.
[0003] Existing technologies have significant limitations in dealing with such problems: In terms of noise reduction, traditional filtering methods are prone to waveform distortion and are difficult to effectively remove complex environmental noise while preserving the characteristics of minute defects; In terms of temperature compensation, commonly used physical model methods (such as the Optimal Reference Selection Method (OBS) and the Reference Signal Extension Method (BSS)) usually rely on a large reference database and have strict limitations on the compensation temperature range. They have poor generalization ability when facing different pipe diameters and complex defect types, and it is difficult to achieve accurate compensation across operating conditions. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the present invention aims to provide a deep learning-based method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds, thereby solving the problems mentioned in the background. This invention acquires high signal-to-noise ratio ultrasonic inspection signals for welds by identifying noise targets in the image domain and reconstructing local smoothness. Then, it utilizes a temperature compensation model based on a Transformer encoder to accurately compensate signals for different temperatures, pipe diameters, and defect types. Compared with traditional methods, this method has higher accuracy, robustness, and cross-condition generalization ability.
[0005] To achieve the above objectives, the present invention provides a method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning, comprising the following steps:
[0006] Step 1: Acquire raw ultrasonic test signals of pipe welds under variable temperature environment: Build a test platform including an artificial weather simulation box, an automatic sliding rail mechanism, an ultrasonic flaw detector and a data acquisition module. Place the welded pipe to be tested in the artificial weather simulation box and adjust the ambient temperature to vary from -30℃ to 50℃. Control the automatic sliding rail equipped with a PZT 5H piezoelectric probe to move along the circumference of the weld. Acquire raw time series signals of ultrasonic A-scan including weld defects under different temperature conditions.
[0007] Step 2: Preprocessing and Gram angle field conversion of the raw ultrasound signal: The acquired raw time series signal is normalized in amplitude and time aligned. The normalized one-dimensional sequence is then mapped into a two-dimensional image using the Gram angle field method.
[0008] Step 3: Noisy target recognition based on ERDFNet YOLO network: Input the obtained GAF image into the improved YOLO target detection network containing the ERDFNet multi-scale feature fusion module to detect and locate targets in the noisy regions of the image, and convert the detected noisy target regions into a set of noise intervals on the time axis.
[0009] Step 4: Local smooth reconstruction denoising based on waveform constraints: Based on the noise intervals obtained in Step 3, for the signal sampling points in each noise interval, an interpolation function is constructed using the adjacent effective sampling points before and after the noise interval. Only the sampling points in the noise interval are reconstructed by linear interpolation or spline interpolation, while the other sampling points remain unchanged, thereby obtaining the denoised ultrasonic time series signal.
[0010] Step 5: Constructing the input embedding and position encoding of the denoised signal: The denoised time series signal is input into the embedding layer and mapped to a feature vector sequence of a preset dimension, and a position encoding composed of sine and cosine functions is superimposed to explicitly inject time position information;
[0011] Step 6: Temperature compensation feature extraction and signal reconstruction based on Transformer encoder: Input the feature vector sequence containing position encoding into the Transformer encoder which is composed of multiple stacked coding units. Each coding unit includes a multi-head self-attention sub-layer and a feedforward network sub-layer. Residual connections and layer normalization are set after each sub-layer. The long-distance temporal dependence and phase and amplitude drift features caused by temperature change are learned by using the multi-head self-attention mechanism. The compensation signal corresponding to the reference temperature is obtained by global average pooling and output layer reconstruction.
[0012] Step 7: Model Training and Application Based on Mean Square Error Loss Function: Select the denoised signal at the reference temperature as the label, and use the denoised signal at the same defect location at other temperatures as the input. Train the Transformer temperature compensation model using mean square error as the loss function. After training, use the model to perform temperature adaptive compensation on the ultrasonic detection signal of the weld under unknown temperature conditions, and output the pure signal at the reference temperature.
[0013] Furthermore, the Gram angle field transformation in step two specifically includes: processing the normalized time series... Calculate polar angle and radius And construct the cosine-type Gram angular field matrix. As a GAF image.
[0014] Furthermore, the ERDFNet-YOLO network in step three includes: introducing an ERDFNet multi-scale feature fusion module into the backbone feature extraction part and feature pyramid part of the YOLOv8 network, which enhances the detection capability of small-sized noisy targets and weak defect echo regions through depthwise separable convolution and feature reuse structure.
[0015] Furthermore, the local smooth reconstruction in step four adopts the following unified form: for time positions At the sampling point, define a one-dimensional mask. The marker indicates whether a point is noise; the reconstructed value within the noise interval is... The denoised signal is then ,in The values are obtained by linear interpolation or spline interpolation based on the effective sampled values at the beginning and end of the noise interval.
[0016] Furthermore, the position encoding in step five takes the following form: for sequence position and dimensional index Location coding The components of each dimension are:
[0017] , ,in For the embedded vector dimension.
[0018] Furthermore, the multi-head self-attention mechanism in step six maps the input feature sequence to a query matrix Q, a key matrix K, and a value matrix V, and calculates the output according to the following scaled dot product attention formula:
[0019]
[0020] in The dimension of the key vector.
[0021] Furthermore, in step six, the feature sequence output by the Transformer encoder is first averaged and reduced in time dimension by a global average pooling layer, and then reconstructed into a time-series compensation signal corresponding to the reference temperature by a fully connected output layer linear transformation.
[0022] Furthermore, in applications of the trained model on pipe specimens of different diameters and different weld defect types, the mean square error between the compensated signal and the reference temperature signal is less than the preset threshold of 2.000, which characterizes the temperature compensation accuracy and cross-condition generalization ability of the method. The defect types include incomplete fusion, porosity, cracks, and inclusions.
[0023] Furthermore, it also includes a processing system used in the adaptive compensation method, the processing system comprising an ultrasonic signal acquisition device, which is used to control an automatic slide rail and a PZT 5H probe to perform circumferential scanning of the pipe weld and acquire the original ultrasonic A-scan signal in a variable temperature environment; and a data processing device, which is used to perform the preprocessing, GAF conversion, ERDFNet YOLO noise identification, local smoothing reconstruction and temperature compensation based on the Transformer encoder steps described in any one of claims 1 to 7, and output the compensation signal at the reference temperature.
[0024] Furthermore, the processing system also includes a clean signal output device, which is used to receive the compensation signal output by the data processing device, and to display, store or provide the compensated clean signal to the subsequent defect identification and evaluation module.
[0025] The beneficial effects of this invention are:
[0026] 1. The deep learning-based method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds adopts a denoising strategy of "GAF image conversion + ERDFNet YOLO noise target detection + local smoothing reconstruction". It only performs localization processing on the detected noise interval. Compared with traditional global filtering, wavelet thresholding and other methods, it can significantly improve the noise suppression capability, while preserving the true characteristics of the weld defect echo in terms of time location and amplitude shape to the greatest extent, thus improving the reliability of subsequent analysis.
[0027] 2. This deep learning-based method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipe welds inputs the denoised signal into a temperature compensation model based on a Transformer encoder. Through a multi-head self-attention mechanism, it captures long-distance temporal dependencies and subtle phase / amplitude changes caused by temperature. Without the need to establish a large benchmark database, it achieves adaptive high-precision compensation for inspection signals of different temperatures, pipe diameters, and various weld defects. The compensation error (MSE) can be controlled below a preset threshold of 2.000. Compared with traditional OBS, BSS, and Hilbert physical compensation methods, it has stronger generalization and robustness.
[0028] 3. This deep learning-based ultrasonic testing signal denoising and temperature adaptive compensation method for pipeline welds, combined with an automatic sliding rail testing device and antifreeze coupling technology, can stably acquire full-circumferential ultrasonic data of welds within a wide temperature range of 30℃ to 50℃. Through the rapid inference capability of the deep learning denoising and temperature compensation model, it enables online weld quality assessment of long-distance pipelines under complex climatic conditions, significantly improving the efficiency of on-site testing and the accuracy of quantitative identification. Attached Figure Description
[0029] Figure 1This is a schematic diagram of the system structure of the present invention;
[0030] Figure 2 This is a flowchart of a method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning, according to the present invention. Detailed Implementation
[0031] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0032] Please see Figures 1 to 2 The present invention provides the following technical solution: a method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning, comprising the following steps:
[0033] Step 1: Construct a variable-temperature automated testing platform and acquire raw ultrasonic signals from the weld. The testing platform includes an artificial weather simulation system, an ultrasonic flaw detector, and an automatic sliding rail device. The welded pipe to be tested is placed inside the artificial weather simulation system housing. The PZT-5H piezoelectric probe is held against the outer wall of the pipe by the automatic sliding rail device with magnetic adsorption wheels and moved circumferentially along the weld. Raw time-series ultrasonic A-scan signals, including typical weld defects such as incomplete fusion, porosity, cracks, and slag inclusions, are acquired within a temperature range of -30℃ to 50℃. Antifreeze is used as a coupling agent during the acquisition process to ensure stable acoustic coupling over a wide temperature range. Each acquired signal is set as follows:
[0034]
[0035] Step 2: Temporal-to-image mapping based on Gram Angular Field (GAF);
[0036] The amplitude of the original signal is normalized to make Mapping a one-dimensional time series to polar coordinates
[0037]
[0038] And construct the cosine-type Gram angular field matrix
[0039]
[0040] Obtain a two-dimensional image As input to the subsequent noise recognition network, it enables explicit encoding of the ultrasonic temporal structure in the image domain.
[0041] Step 3: Noisy target recognition and temporal noise interval extraction based on ERDFNet-YOLO;
[0042] An ERDFNet multi-scale feature fusion module is introduced into the YOLOv8 network to construct an ERDFNet-YOLO noise recognition model. This model is used to detect and locate targets in noisy regions of GAF images, resulting in a set of noisy target bounding boxes.
[0043]
[0044] Based on the GAF construction and task requirements, the two-dimensional noise region is mapped to a set of noise intervals on the time axis.
[0045]
[0046] And define a one-dimensional binary mask sequence
[0047]
[0048] Used to distinguish between noise sampling points to be reconstructed and valid sampling points that remain unchanged.
[0049] Step 4: Time-domain smooth reconstruction and denoising based on constraints of preceding and following waveforms;
[0050] For each noise interval Let the valid sampling points at both ends of the interval be denoted as .
[0051]
[0052] Linear interpolation or cubic spline interpolation based on the preceding and following waveforms is used to smoothly reconstruct the noise segment. In the case of linear interpolation, [the following is done]: The reconstructed value is
[0053]
[0054] The overall denoising results are uniformly represented as
[0055]
[0056] Obtain the denoised ultrasonic detection signal
[0057]
[0058] This process maintains a one-to-one correspondence between the sampling points and the propagation order of the original signal on the time axis, thus avoiding defective waveform distortion caused by global filtering.
[0059] Step 5: Construct the input embedding and position encoding of the denoised signal;
[0060] Will As input to the temperature compensation model, it is mapped to a linear embedding. After the feature space is 3D, a position encoding matrix is introduced. Explicitly inject time and location information. Let... For sequence position, If it is a dimension index, then we have
[0061]
[0062]
[0063] Finally, the input embedding is obtained.
[0064]
[0065] This allows subsequent Transformers to still perceive the temporal structure of the ultrasonic wave during parallel processing.
[0066] Step 6: Temperature-compensated feature extraction and signal reconstruction based on the Transformer encoder; [The sequence is then...] The input to the Transformer coding layer first undergoes a nonlinear transformation through a fully connected layer.
[0067]
[0068] The system then moves to the multi-head self-attention mechanism module, which maps the input to a query. ,key ,value Calculate the output based on the scaled dot product attention.
[0069]
[0070] in The key vector dimension is used. The multi-head self-attention mechanism can adaptively allocate weights across the entire sequence, highlighting positions related to phase drift and amplitude changes caused by temperature variations, while suppressing residual noise and irrelevant background components. Residual connections and layer normalization are introduced after the self-attention sub-layer and the feedforward sub-layer.
[0071]
[0072] To improve the stability of deep network training, the encoder output is reduced in dimensionality using a global average pooling layer.
[0073]
[0074] Obtain the feature vector The temperature-compensated signal is then reconstructed through the output layer.
[0075]
[0076] Step 7: Model training and cross-condition validation based on MSE loss;
[0077] Select the denoised signal at a reference temperature (e.g., 25℃) As a baseline label, the denoised signal of the corresponding defect at other temperatures As input, mean squared error (MSE) is used as the loss function:
[0078]
[0079] By updating network parameters through backpropagation and optimization algorithms, adaptive temperature compensation can be achieved for signals with different temperatures, pipe diameters, and weld defect types after training. Tests on specimens with different diameters ranging from 200mm to 600mm and various defect data such as incomplete fusion, porosity, cracks, and inclusions show that the MSE of the compensated signal and the reference signal can be stably controlled below the preset threshold of 2.000, verifying the model's cross-condition generalization ability.
[0080] In this embodiment, in step two, a Gram angle field is used to map a one-dimensional time series signal into a two-dimensional image, so that noise pulses, background clutter and defect reflection echoes present different texture patterns in the image domain, which makes it easier to use the target detection network to explicitly distinguish noise areas from defect areas. In step three, the ERDFNet multi-scale feature fusion module is introduced to enhance the expression of high-resolution detail features, thereby improving the detection capability of small noise blocks and weak defect echoes.
[0081] In this embodiment, in step four, the noise segment is locally smoothed and reconstructed by linear interpolation or cubic spline interpolation based on the healthy waveform before and after the noise. This achieves continuity in the sense of time axis and first derivative, which suppresses noise while maintaining the physical propagation characteristics of the defective waveform, providing high-quality input data for subsequent temperature compensation.
[0082] In this embodiment, steps five to seven constitute a temperature compensation module based on a Transformer encoder. Position encoding, through periodic variations of sine and cosine functions, enables the model to learn the relative positional features within the ultrasonic wave pattern, for a fixed length spacing. ,have can be Linear representation improves the model's adaptability to ultrasound sequences of different lengths.
[0083] This embodiment has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention.
[0084] This embodiment also provides an adaptive compensation system used in the above compensation method. The system includes three parts: an ultrasonic signal acquisition device, a data processing device, and a clean signal output device. The system is used to perform ultrasonic testing on welds in long-distance pipelines under varying temperature conditions and outputs a clean detection signal under reference temperature conditions. The process of executing the above compensation method through this system is as follows:
[0085] Step 1: The ultrasonic signal acquisition device is used to acquire the raw ultrasonic A-scan signals of the pipe weld under different temperature conditions. This device includes:
[0086] The artificial weather simulation chamber is used to provide a preset ambient temperature, preferably ranging from -30℃ to 50℃, which can be adjusted in stages and maintained at a constant temperature;
[0087] The automatic slide rail mechanism adopts a magnetic adsorption wheel structure, which can be adsorbed on the outer wall of the pipe and move at a constant speed along the circumference of the weld. The slide rail is equipped with a drive motor and a position encoder to control the scanning speed and record the probe position.
[0088] The piezoelectric ultrasonic probe is preferably a longitudinal wave straight probe made of PZT-5H material, which is connected to an automatic slide rail mechanism through a probe bracket;
[0089] An ultrasonic flaw detector and data acquisition module are used to excite ultrasonic pulses and acquire echo signals.
[0090] During testing, the welded pipe to be tested is placed inside an artificial weather simulation chamber. After adjusting the chamber temperature to a predetermined value and maintaining it at this temperature for a period of time, antifreeze coupling agent is applied to the contact point between the probe and the outer wall of the pipe to ensure good coupling between the probe and the outer surface of the pipe. The automatic sliding rail mechanism is activated, causing the probe to move circumferentially along the weld. Multiple sets of raw ultrasonic A-scan signals containing different defect types are collected at each temperature gradient, and the signals and their corresponding information, such as temperature, pipe diameter, and weld location, are sent to the data processing device.
[0091] Step Two: The acquired data undergoes a data preprocessing device to preprocess, denoise, and compensate for the temperature of the raw ultrasonic signals, ultimately obtaining a clean signal at a reference temperature. This device can be implemented using an industrial computer or server, and it integrates a preprocessing module, a denoising module, and a temperature compensation module sequentially.
[0092] The preprocessing module receives the raw A-scan signal from the ultrasonic signal acquisition device and performs amplitude normalization and time alignment on the signal. A given raw signal is denoted as... First, the data is normalized to the [-1, 1] interval, and then interpolated or cropped according to the sampling frequency for signals under different temperature conditions to ensure consistent sequence length. Subsequently, the preprocessing module uses the Gram angle field (GAF) method to map the one-dimensional time series into a two-dimensional image. Specifically, the polar angles of the normalized sequence are calculated. ,radius And construct a cosine-type GAF matrix. The generated two-dimensional matrix serves as the input for the subsequent denoising module.
[0093] The denoising module uses an improved ERDFNet-YOLO network to identify and locate noisy regions in GAF images, and performs local smoothing reconstruction of noisy segments in the temporal domain. Specifically, it includes:
[0094] A target detection network with ERDFNet multi-scale feature fusion structure is used to perform forward inference on the input GAF image and output the category and bounding box coordinates of noisy targets.
[0095] The two-dimensional noise region is mapped to several noise intervals on the time axis. For each noise interval, an interpolation function is constructed based on the effective sampling points before and after it.
[0096] Linear interpolation or cubic spline interpolation is used to smoothly reconstruct the sampling points within the noise interval, replacing only the sampling points identified as noise, while keeping the original values unchanged at the remaining positions.
[0097] The above processing yields the denoised time series. This sequence significantly suppresses random noise and coupling noise caused by temperature changes while preserving the original defect echo timing and amplitude shape.
[0098] The temperature compensation module, based on the Transformer encoder structure, performs temperature-adaptive compensation on the denoised signal. Specifically, it includes:
[0099] Input embedding and positional encoding: This involves embedding the denoised sequence... The temporal location information is explicitly introduced by mapping the linear transformation to a fixed-dimensional feature vector sequence and superimposing a positional code composed of sine and cosine functions.
[0100] The Transformer encoder employs several layers of coding units, each layer including a multi-head self-attention sublayer and a feedforward network sublayer. Residual connections and layer normalization are applied after each sublayer. The multi-head self-attention mechanism is used to learn long-range temporal dependencies and phase and amplitude drift features caused by temperature changes across the entire sequence.
[0101] Global average pooling and output layer: The feature sequence output by the encoder is compressed into a fixed-length vector by global average pooling, and then the standard ultrasonic signal corresponding to the reference temperature (e.g., 25℃) is reconstructed by the output layer.
[0102] During the model training phase, the measured signal at the reference temperature is used as the label, and the denoised signal at other temperatures is used as the input. The network parameters are optimized through the mean squared error loss function, enabling the network to learn the mapping relationship from "variable temperature denoised signal" to "reference temperature standard signal". After training, the temperature compensation module can perform end-to-end compensation for the denoised signal under any temperature condition.
[0103] The clean signal output device is used to receive the weld inspection clean signal output by the data processing device after noise reduction and temperature compensation, and to display, store, or interact with the subsequent defect identification system. Specifically, the clean signal output device may include:
[0104] The display terminal is used to display the standard waveform, defect echo location, amplitude, and waveform comparison before and after compensation at the reference temperature.
[0105] The storage unit is used to store the pure signal and its corresponding information such as temperature, pipe diameter, and weld location for a long period of time.
[0106] An optional alarm interface is provided, which can issue an alarm via sound, light, or network when the subsequent defect identification module determines that a serious defect exists.
[0107] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for denoising and adaptive temperature compensation of ultrasonic inspection signals for pipe welds based on deep learning, characterized in that, Includes the following steps: Step 1: Acquire raw ultrasonic test signals of pipe welds under variable temperature environment: Build a test platform including an artificial weather simulation box, an automatic sliding rail mechanism, an ultrasonic flaw detector and a data acquisition module. Place the welded pipe to be tested in the artificial weather simulation box and adjust the ambient temperature to vary from -30℃ to 50℃. Control the automatic sliding rail equipped with a PZT 5H piezoelectric probe to move along the circumference of the weld. Acquire raw time series signals of ultrasonic A-scan including weld defects under different temperature conditions. Step 2: Preprocessing and Gram angle field conversion of the raw ultrasound signal: The acquired raw time series signal is normalized in amplitude and time aligned. The normalized one-dimensional sequence is then mapped into a two-dimensional image using the Gram angle field method. Step 3: Noisy target recognition based on ERDFNet YOLO network: Input the obtained GAF image into the improved YOLO target detection network containing the ERDFNet multi-scale feature fusion module to detect and locate targets in the noisy regions of the image, and convert the detected noisy target regions into a set of noise intervals on the time axis. Step 4: Local smooth reconstruction denoising based on waveform constraints: Based on the noise intervals obtained in Step 3, for the signal sampling points in each noise interval, an interpolation function is constructed using the adjacent effective sampling points before and after the noise interval. Only the sampling points in the noise interval are reconstructed by linear interpolation or spline interpolation, while the other sampling points remain unchanged, thereby obtaining the denoised ultrasonic time series signal. Step 5: Constructing the input embedding and position encoding of the denoised signal: The denoised time series signal is input into the embedding layer and mapped to a feature vector sequence of a preset dimension, and a position encoding composed of sine and cosine functions is superimposed to explicitly inject time position information; Step 6: Temperature compensation feature extraction and signal reconstruction based on Transformer encoder: Input the feature vector sequence containing position encoding into the Transformer encoder which is composed of multiple stacked coding units. Each coding unit includes a multi-head self-attention sub-layer and a feedforward network sub-layer. Residual connections and layer normalization are set after each sub-layer. The long-distance temporal dependence and phase and amplitude drift features caused by temperature change are learned by using the multi-head self-attention mechanism. The compensation signal corresponding to the reference temperature is obtained by global average pooling and output layer reconstruction. Step 7: Model Training and Application Based on Mean Square Error Loss Function: Select the denoised signal at the reference temperature as the label, and use the denoised signal at the same defect location at other temperatures as the input. Train the Transformer temperature compensation model using mean square error as the loss function. After training, use the model to perform temperature adaptive compensation on the ultrasonic detection signal of the weld under unknown temperature conditions, and output the pure signal at the reference temperature.
2. The method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning according to claim 1, characterized in that: The Gram angle field transformation in step two specifically includes: processing the normalized time series... Calculate polar angle and radius And construct the cosine-type Gram angular field matrix. As a GAF image.
3. The method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning according to claim 1, characterized in that: The ERDFNet-YOLO network in step three includes: introducing an ERDFNet multi-scale feature fusion module into the backbone feature extraction part and feature pyramid part of the YOLOv8 network, which enhances the detection capability of small-sized noisy targets and weak defect echo regions through depthwise separable convolution and feature reuse structure.
4. The method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning according to claim 1, characterized in that: The local smooth reconstruction in step four adopts the following unified form: for time positions At the sampling point, define a one-dimensional mask. The marker indicates whether a point is noise; the reconstructed value within the noise interval is... The denoised signal is then ,in The values are obtained by linear interpolation or spline interpolation based on the effective sampled values at the beginning and end of the noise interval.
5. The method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning according to claim 1, characterized in that: The position encoding in step five takes the following form: for sequence position and dimensional index Location coding The components of each dimension are: , ,in For the embedded vector dimension.
6. The method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning according to claim 1, characterized in that: The multi-head self-attention mechanism in step six maps the input feature sequence to a query matrix Q, a key matrix K, and a value matrix V, and calculates the output according to the following scaled dot product attention formula: in The dimension of the key vector.
7. The method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning according to claim 6, characterized in that: In step six, the feature sequence output by the Transformer encoder is first averaged and reduced in time dimension by a global average pooling layer, and then reconstructed into a time-series compensation signal corresponding to the reference temperature by a fully connected output layer linear transformation.
8. The method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning according to claim 1, characterized in that: After training, the model was applied to pipe specimens of different diameters and different weld defect types. The mean square error between the compensated signal and the reference temperature signal was less than the preset threshold of 2.
000. This was used to characterize the temperature compensation accuracy and cross-condition generalization ability of the method. The defect types included incomplete fusion, porosity, cracks and inclusions.
9. The method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning according to claim 1, characterized in that: It also includes a processing system used in the adaptive compensation method, the processing system comprising an ultrasonic signal acquisition device, which is used to control an automatic slide rail and a PZT 5H probe to perform circumferential scanning of the pipe weld and acquire the original ultrasonic A-scan signal in a variable temperature environment; and a data processing device, which is used to perform the preprocessing, GAF conversion, ERDFNet YOLO noise identification, local smoothing reconstruction and temperature compensation based on the Transformer encoder steps as described in any one of claims 1 to 7, and output the compensation signal at the reference temperature.
10. A method for denoising and temperature adaptive compensation of ultrasonic inspection signals for pipeline welds based on deep learning, as described in claim 9, characterized in that: The processing system also includes a clean signal output device, which is used to receive the compensation signal output by the data processing device, and to display, store or provide the compensated clean signal to the subsequent defect identification and evaluation module.