A spatio-temporal adaptive cross-correlation measurement method for ultrasonic signals of rough wall components

Through the space-time adaptive cross-correlation measurement method, the problem of echo waveform distortion in ultrasonic detection of rough wall pipes is solved, and high-precision wall thickness measurement and corrosion monitoring are realized, which is suitable for ultrasonic detection of rough wall pipes.

CN119779213BActive Publication Date: 2025-07-18SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510037773.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-07-18
Estimated Expiration
2045-01-10

AI Technical Summary

Technical Problem

In the ultrasonic detection of rough wall pipes, when the ultrasonic sensor is close to the rough wall or corrosion defect, the ultrasonic signal scattering effect causes the echo waveform to be distorted, making it difficult to accurately calculate the ultrasonic propagation time, resulting in wall thickness measurement and corrosion monitoring errors.

Method used

The space-time adaptive cross-correlation measurement method is used to process ultrasonic data through cubic spline interpolation method, set the correlation coefficient threshold, manually select the position of the first echo signal, and transmit data to the PC server through wireless communication for space-time adaptive cross-correlation calculation, and accurately find the second echo to calculate the wall thickness.

Benefits of technology

High-precision wall thickness detection of rough wall pipes is achieved, and the echo waveform distortion problem caused by the ultrasonic sensor being close to the rough surface in the traditional method can be monitored in real time, which improves measurement accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119779213B_ABST
    Figure CN119779213B_ABST
Patent Text Reader

Abstract

This application belongs to the field of ultrasonic testing, especially a method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of rough-wall components, which includes the following steps: Build an experimental system, and place the rough-wall pipeline, ultrasonic sensor device, and PC server implementing the spatio-temporal adaptive cross-correlation calculation method at fixed detection positions; The ultrasonic sensor device generates ultrasonic waves, which are transmitted to the inside of the rough-wall structure through a coupling agent, and are reflected and conducted back to the ultrasonic sensor when encountering an interface; Transmit the ultrasonic signal collected by the ultrasonic sensor device to the PC server for calculation to obtain an accurate pipeline wall thickness value. The present invention realizes the accurate calculation of the ultrasonic propagation time through spatio-temporal adaptive cross-correlation calculation, thereby detecting the change in the thickness of the rough wall, overcoming the problem that the traditional ultrasonic wave cannot detect the wall thickness due to the distortion of the echo waveform caused by the movement of the ultrasonic sensor close to the rough surface, and realizing the high-precision measurement of the wall thickness of the rough wall.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of ultrasonic testing, and in particular, to a method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of rough-wall components. Background Art

[0002] Ultrasonic testing is the most commonly used non-destructive testing technology for wall thickness. The testing principle is to use an ultrasonic probe to generate and receive ultrasonic waves, and calculate the wall thickness value of the pipeline based on the time that the ultrasonic waves propagate in the pipeline and the ultrasonic propagation speed. The types are mainly divided into two parts. The first is to move a handheld ultrasonic probe on the surface of the pipeline to detect the wall thickness values at different positions of the pipeline. The second is to fix the ultrasonic probe on the surface of a certain position of the pipeline to detect the change value of the wall thickness at that position. It is a common method for pipeline wall thickness detection and corrosion monitoring. The most crucial thing in the detection process is to calculate the propagation time of the ultrasonic waves in the pipeline through the ultrasonic signals received by the probe. However, when the handheld ultrasonic probe gradually approaches the rough wall surface during the movement on the pipeline surface or the wall surface at the installation position of the fixed ultrasonic probe changes in wall thickness due to corrosion and erosion over time, the ultrasonic wave signals are scattered when encountering the rough wall surface or corrosion defects, resulting in the inability of the conventional method to accurately obtain the propagation time of the ultrasonic waves in the pipeline, causing errors in wall thickness measurement and corrosion monitoring.

[0003] In previous studies, usually a certain peak of the ultrasonic wave was found, and the ultrasonic propagation time was calculated using the difference between the two peaks of the signal. However, due to ultrasonic attenuation and distortion, there are large errors in the judgment of the wave peaks. To address the above problems, some scholars have proposed the autocorrelation algorithm, such as (Doctoral Thesis: Key Technologies for On-line Monitoring of Ultrasonic Polymer Blending State; Journal: Application of Correlation Matching in Feature Extraction of Ultrasonic Thickness Measurement Signals). First, a standard wave of the ultrasonic signal is set, and its length and shape are determined. Then, in the subsequent ultrasonic signals, the same length is continuously used to frame and calculate the correlation coefficient with the standard wave. When the correlation reaches a certain accuracy requirement, this section of the signal is considered as the next echo signal of the ultrasonic wave. The ultrasonic propagation time is obtained by dividing the time difference between the two sections of the signal by the number of returned ultrasonic waves. By this method, the accuracy of ultrasonic thickness measurement can be significantly improved.

[0004] However, the above conventional adaptive algorithms have problems of reduced accuracy or even inability to detect when detecting rough-walled pipes. For example, when a hand-held thickness measurement device measures the thickness of a certain pipe during movement, if the thickness measurement device approaches a relatively rough part on the pipe, the ultrasonic signal will be scattered, resulting in serious waveform distortion. When calculating the autocorrelation of the first echo signal obtained from the initial manually selected position, it may be impossible to find an ultrasonic signal that meets the similarity coefficient condition, or the wrong second echo is found for wall thickness calculation, resulting in a decrease in the wall thickness detection accuracy of the rough wall; similarly, for the field of fixed ultrasonic wall thickness monitoring equipment, during long-term monitoring, the ultrasonic signal is more distorted after the wall thickness is corroded. Through the correlation algorithm of the first echo signal obtained from the initial manually selected position, it is impossible to accurately find the ultrasonic echo position or the second echo is found incorrectly, resulting in errors in the wall thickness monitoring results. Summary of the Invention

[0005] Aiming at the problem in the prior art that due to the appearance of a rough wall near the ultrasonic sensor in time or space, the second echo signal cannot be correctly judged during thickness measurement, resulting in an error in the calculation of the ultrasonic propagation time and a resulting error in wall thickness measurement, this application proposes a spatio-temporal adaptive cross-correlation measurement method for ultrasonic signals of rough wall components to improve the calculation accuracy of ultrasonic propagation time and achieve high-precision ultrasonic thickness measurement for rough walls with large gradients.

[0006] In order to achieve the above invention purpose, the technical solution adopted by the present invention is as follows:

[0007] A spatio-temporal adaptive cross-correlation measurement method for ultrasonic signals of rough wall components, comprising the following steps:

[0008] Step S1: Build an experimental system, and place the rough-walled pipe, ultrasonic sensor device, and PC server implementing the spatio-temporal adaptive cross-correlation calculation method at a fixed detection position;

[0009] Step S2: The ultrasonic sensor device generates ultrasonic waves, which are transmitted to the inside of the rough wall structure through a coupling agent and reflected back to the ultrasonic sensor when encountering an interface;

[0010] Step S3: Transmit the ultrasonic signal collected by the ultrasonic sensor device to the PC server side for spatio-temporal adaptive cross-correlation calculation to obtain an accurate pipe wall thickness value.

[0011] Further, step S1 specifically includes:

[0012] Step S11: Keep the ultrasonic sensor device in contact with the pipe, and connect the PC server and the ultrasonic sensor wirelessly to prepare for the experiment;

[0013] The specific steps of step S2 include:

[0014] Step S21: Couple the ultrasonic sensor with the pipeline. After coupling, the amplitude of the ultrasonic echo signal is large, clear, and symmetric, and the echo delay and waveform are stable.

[0015] Step S22: Connect the ultrasonic sensor to the PC server through wireless communication. The ultrasonic sensor integrates a LoRa module to wirelessly transmit the collected data to the LoRa gateway, and the LoRa gateway then sends the data to the PC server through the IP protocol.

[0016] The specific steps of spatio-temporal adaptive cross-correlation calculation in Step S3 include:

[0017] Step S31: Preparation stage: Process the ultrasonic data through the cubic spline interpolation method, set the correlation coefficient threshold, and manually select the position of the first echo signal to provide a matching template for subsequent waveform matching and wall thickness calculation.

[0018] Specifically, Step S31 includes the following steps:

[0019] Step S311: Select the cubic spline interpolation method for interpolation operation. Build a cubic polynomial S k (u) for each pair of adjacent data points in the form of a piecewise cubic polynomial. Its general formula is:

[0020] ;

[0021] where u represents the abscissa of the original signal, u k represents the position of the k-th original signal, and a k , b k , c k and d k are undetermined coefficients determined by the following constraint conditions: Each piecewise polynomial satisfies the interpolation points at both ends of the interval, i.e., S k (u k ) = v k and S k (u k+1 ) = v k+1 , where v represents the amplitude of the original signal, and v k is the amplitude of the k-th original signal; at each connection point u k the adjacent piecewise functions S k (u) and S k+1 (u) are continuous in the first and second derivatives, i.e., S ’ k (u k+1 ) = S ’ k+1 (u k+1 ) and S ” k (uk+1 ) = S ” k+1 (u k+1 );

[0022] The piecewise function S of the final cubic spline interpolation k (u) is expressed as:

[0023]

[0024] where M k and M k+1 are the second-order derivatives at positions k and k + 1, and h k = u k+1 - u k ;

[0025] Furthermore, in each interval [u k , u k+1 , it is divided into smaller equal sub-intervals according to the required interpolation density. j points are inserted between every two original data points, that is, divided into j + 1 equal parts, and then the v value of the interpolation points is calculated using S k (u) at each sub-point.

[0026] Step S312: Determine the thresholds of the correlation coefficients. The thresholds of the correlation coefficients include the maximum threshold and the minimum threshold of the correlation coefficients, which are represented by variables max_threshold and min_threshold respectively. max_threshold is set to 0.95 and min_threshold is set to 0.75.

[0027] Step S313: Select the position of the first echo of the ultrasonic signal on the pipe wall after interpolation. The waveform at the selected position is used as a template to match the subsequent waveform signals for wall thickness calculation. The first echo only includes the echo signal.

[0028] Step S32: Define the correlation coefficient threshold and the traversal range, and explain the change rule of the current correlation coefficient threshold;

[0029] Specifically: Define variables i, N, and correlation_threshold; where i represents the serial number of the first data point of the waveform segment for which the correlation coefficient will be calculated currently. Use I to represent the serial number of the first data point of the first echo signal segment selected manually by the user. Then, initially, i = I; N represents the number of data points of the first echo signal segment selected manually by the user. M represents the serial number of the last data point of the entire interpolated waveform. Then, Z = M - N, and Z represents the end point for traversing backward to calculate the correlation coefficient value with the first echo signal segment selected manually by the user as the template waveform. Correlation_threshold is the current correlation coefficient threshold. Initially, the value of correlation_threshold is equal to the value of the maximum threshold max_threshold. If no second echo with a correlation coefficient value greater than or equal to the current correlation coefficient threshold, i.e., correlation_threshold, is found during the current backward traversal of the template waveform, then the value of correlation_threshold will gradually decrease, and the traversal will be performed again until the value of correlation_threshold is equal to the value of the minimum threshold min_threshold.

[0030] Step S33: By gradually increasing the matching starting point i and calculating the correlation coefficient between the template waveform and the target waveform, find the second echo that meets the threshold for subsequent wall thickness calculation; if no second echo with a correlation coefficient value greater than the current correlation coefficient threshold is found, then decrease the current correlation coefficient threshold and perform the traversal again.

[0031] Specifically: Perform an increment operation on i to simulate the serial number of the first data point of the target waveform segment for traversing backward to calculate the correlation coefficient value with the first echo signal segment selected manually by the user as the template waveform. The value range of i is (I, Z]. Determine whether the value of i is greater than Z. If not, calculate the correlation coefficient value between the template waveform and the target waveform. Use x(n) to represent the first echo signal segment selected manually by the user. The first echo signal is the template signal. Use y i (n) to represent the target signal segment that will calculate the correlation coefficient value with the template signal during the subsequent traversal. Then, the calculation formula for the correlation coefficient value is as follows:

[0032]

[0033] where y i (n)=y(i + n), i ≤ n ≤ N + i - 1, and n represents the index of the sample point of the ultrasonic signal segment. is the average value of the signal segment x(n). is the average value of the signal segment y i (n). y i(n) The new signal generated during the traversal to find the second echo with the change of the i value is a signal composed of N consecutive points selected from the original signal;

[0034] If the value of a certain r(i) is greater than or equal to the current value of correlation_threshold, then all the data points between the current i-th data point and the (i + N)-th data point are taken as the found second echo and directly enter the wall thickness value calculation stage; if the value of i is greater than the Z value during the process of continuously incrementing by one, it means that no second echo with a correlation coefficient value greater than or equal to the current correlation coefficient threshold correlation_threshold is obtained, then the value of correlation_threshold is decremented by 0.01, and then the value of i is reset to I, and the above process of traversing and calculating the correlation coefficient is performed again. If no second echo is still found under the current value of correlation_threshold, then the value of correlation_threshold is decremented by 0.01 again until the value of correlation_threshold is less than the minimum threshold min_threshold; if no second echo is still found when the value of correlation_threshold is less than min_threshold, it means that there is a problem with the waveform itself or the first waveform selection is incorrect, and it is necessary to return to the preparation stage, readjust, and then retest.

[0035] Further, the adjustment includes two types of situations. The first type is that if the first waveform is misselected, resulting in the failure to find the second echo, then it is necessary to return to the preparation stage to reselect the position of the first waveform; if the ultrasonic waveform effect is poor, then the value of min_threshold is lowered in the preparation stage. If no second echo is still found when min_threshold is less than 0.5, it means that there is a problem with the ultrasonic sensor device and it needs to be checked; the second type is that the previously measured wall thickness values are all normal, and no second echo is found in a certain subsequent measurement, which means that there is a serious corrosion defect near the ultrasonic probe, resulting in the distortion of the ultrasonic waveform, and the first echo obtained from the originally manually selected position is no longer suitable as a template, and spatio-temporal adaptive cross-correlation calculation is required.

[0036] Step S34, after finding the second echo, calculate the wall thickness value based on the time difference between it and the template waveform, the sampling frequency, and the interpolation multiple, and compare the calculation result with the reference value to verify its rationality and save it;

[0037] Specifically, if there is a value of r(i) greater than or equal to the current correlation coefficient threshold correlation_threshold, then the wall thickness value is calculated;

[0038] Use the Num variable to represent the difference between the index of the first data point of the found secondary echo and the index of the first data point of the first echo manually selected. Use the variables B and J to represent the sampling frequency and the interpolation multiple of the cubic spline interpolation method respectively. The unit of the material sound velocity q is m / s. Then the formula for wall thickness calculation is as follows:

[0039]

[0040] If the calculated wall thickness value differs from the wall thickness reference value or the generally calculated wall thickness value obtained previously by no more than ±10%, then store the wall thickness value calculated from this detection and the information of the data points of the found secondary echo; where the wall thickness reference value is the wall thickness marked when the pipeline leaves the factory; the generally calculated wall thickness value is the wall thickness value calculated using the ordinary correlation coefficient algorithm when there is no serious corrosion roughness around the ultrasonic probe.

[0041] Step S35: If the calculated wall thickness value is abnormal, since the signal is affected by defects, it is necessary to calculate through the spatio-temporal adaptive cross-correlation measurement algorithm that adjusts the template waveform.

[0042] Specifically, if the calculated wall thickness value differs from the wall thickness reference value or the generally calculated wall thickness value obtained previously by more than ±10%, it indicates that the result of the wall thickness value is abnormal, and the first echo obtained from the originally manually selected position is no longer suitable as a template.

[0043] Step S36: Use the secondary echo found at a farther distance above or at a previous time during the wall thickness calculation when the wall thickness value calculation result is within the normal range as a new waveform matching template to replace the first echo obtained from the manually selected position when the influence of corrosion defects on the initial overall waveform is small; the normal range means that the calculated wall thickness value differs from the wall thickness reference value or the generally calculated wall thickness value obtained previously by within ±10%.

[0044] Compared with the prior art, the advantages of the present invention are as follows:

[0045] 1. The present invention can realize the ultrasonic detection of the wall thickness of pipelines with rough walls, improve the measurement accuracy of its wall thickness, and can accurately calculate the ultrasonic propagation time through the spatio-temporal adaptive cross-correlation algorithm, so as to detect the change of the thickness of the rough wall, overcome the problem that traditional ultrasound cannot detect the wall thickness due to the distortion of the echo waveform caused by the ultrasonic sensor approaching the rough surface during movement, and realize the high-precision measurement of the wall thickness of the rough wall.

[0046] 2. The present invention can realize the wall thickness monitoring of pipeline walls corroded over time. When the pipeline forms an uneven surface due to corrosion, the echo waveform can be accurately found through the spatio-temporal adaptive cross-correlation algorithm to realize the accurate monitoring of the wall thickness change.

[0047] When measuring the wall thickness of a rough wall using the method of the present invention, the wall thickness measurement of a rough wall with a large gradient can be realized, the calculation is simple and fast, and the data can be processed in real time. Brief Description of the Drawings

[0048] Figure 1 It is a flow chart of the spatio-temporal adaptive cross-correlation calculation method of this application.

[0049] Figure 2 It is a schematic diagram of continuously performing ultrasonic thickness measurement on the defective pipeline with the electromagnetic ultrasonic sensor in Example 3.

[0050] Figure 3 It is a schematic diagram of the positions of the first echo manually selected and the secondary echo found by the algorithm when the distance between the sensor probe and the center of the defect is 12 mm in Example 3.

[0051] Figure 4 It is a schematic diagram showing a large deviation in the wall thickness value directly calculated at a distance of 4.7 mm in Example 3.

[0052] Figure 5 It is an effect diagram of waveform processing at 4.8 mm in Example 3.

[0053] Figure 6 It is the waveform of the secondary echo found by the algorithm at 4.8 mm in Example 3.

[0054] Figure 7 It is an effect diagram of waveform matching of the data at a distance of 4.7 mm from the center of the defect using the second waveform found by the algorithm at 4.8 mm as a template in Example 3.

[0055] Figure 8 It is a schematic diagram showing that when using the waveform at a distance of 3.9 mm from the center of the defect in Example 3, the calculated wall thickness value using the ordinary correlation algorithm is 35.343 mm.

[0056] Figure 9 It is a schematic diagram showing that when using the waveform at a distance of 3.9 mm from the center of the defect in Example 3, the cross-correlation wall thickness calculated value is 22.176 mm.

[0057] Figure 10 It is a schematic diagram showing that when using the waveform at a distance of 2.9 mm from the center of the defect in Example 3, the calculated wall thickness value using the ordinary correlation algorithm is 22.6226 mm.

[0058] Figure 11 It is a schematic diagram showing that when using the waveform at a distance of 2.9 mm from the center of the defect in Example 3, the cross-correlation wall thickness calculated value is 22.068 mm.

[0059] Figure 12Schematic diagram of directly calculating the wall thickness calculation value of 12.5664 mm using the ordinary correlation algorithm for the waveform at 2.4 mm away from the center of the defect in Example 3.

[0060] Figure 13 Schematic diagram of calculating the wall thickness calculation value of 22.053 mm using cross - correlation for the waveform at 2.4 mm away from the center of the defect in Example 3.

[0061] Figure 14 Schematic diagram of directly calculating the wall thickness calculation value of 34.0186 mm using the ordinary correlation algorithm for the waveform at 1.9 mm away from the center of the defect in Example 3.

[0062] Figure 15 Schematic diagram of calculating the wall thickness calculation value of 22.068 mm using cross - correlation for the waveform at 1.9 mm away from the center of the defect in Example 3. Detailed implementation manners

[0063] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Usually, the components of the embodiments of the present application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.

[0064] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application to be protected, but merely represents the selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without making creative efforts belong to the scope of protection of the present application.

[0065] It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0066] In the description of the present application, it should be noted that the orientation or positional relationship indicated by the terms "upper", "vertical", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of this application is usually placed during use, or the orientation or positional relationship commonly understood by those skilled in the art. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation to the present application. In addition, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0067] In the description of this application, it should also be noted that unless otherwise clearly specified and defined, the terms "set", "install", and "connect" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific situations.

[0068] Embodiment 1

[0069] A method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of a rough wall component, comprising the following steps:

[0070] Step S1: Set up an experimental system, and place a rough wall pipeline, ultrasonic sensor equipment, and a PC server implementing the spatio-temporal adaptive cross-correlation calculation method at fixed detection positions;

[0071] The experimental system in step S1 includes: a pipeline with a rough wall or defects, ultrasonic sensor equipment, and a PC server. Keep the ultrasonic sensor equipment in contact with the pipeline, and connect the PC server and the ultrasonic sensor through wireless communication to prepare for the experiment.

[0072] Step S2: The ultrasonic sensor equipment generates ultrasonic waves, which are transmitted through a coupling agent to the inside of the rough wall structure, and are reflected and conducted back to the ultrasonic sensor when encountering an interface;

[0073] Step S21: A good coupling should be maintained between the ultrasonic sensor and the pipeline. After coupling, the ultrasonic echo signal has a large amplitude, is clear and symmetric, and the echo delay and waveform are stable, which helps for more accurate measurement and defect detection, and ensures the effective acquisition of detection data;

[0074] Step S22: The ultrasonic sensor is connected to the PC server through a wireless communication method to ensure the stability of the data transmission process. The ultrasonic sensor wirelessly transmits the collected data to the LoRa gateway through an integrated LoRa module, and the LoRa gateway then sends the data to the PC server for processing and analysis through the IP protocol.

[0075] Step S3: Transmit the ultrasonic signal collected by the ultrasonic sensor equipment to the PC server side for spatio-temporal adaptive cross-correlation calculation to obtain an accurate pipeline wall thickness value.

[0076] Step S3 is mainly completed by a program deployed on the server. The specific steps of spatio-temporal adaptive cross-correlation calculation include:

[0077] Step S31, Preparation stage: Process the ultrasonic data through cubic spline interpolation to ensure data smoothness and continuity. At the same time, set the correlation coefficient thresholds (max_threshold and min_threshold), and manually select the position of the first echo signal to provide a matching template for subsequent waveform matching and wall thickness calculation;

[0078] Step S32, Define the correlation coefficient thresholds and traversal range, and explain the change rule of the current correlation coefficient threshold;

[0079] Step S33, By gradually increasing the matching starting point i and calculating the correlation coefficient between the template waveform and the target waveform, find the second echo that meets the threshold for subsequent wall thickness calculation; if no second echo with a correlation coefficient value greater than the current correlation coefficient threshold is found, then decrement the current correlation coefficient threshold and traverse again;

[0080] Step S34, After successfully finding the second echo, calculate the wall thickness value based on the time difference between it and the template waveform, the sampling frequency, the interpolation multiple, etc., and compare the calculation result with the reference value to verify its rationality and save it;

[0081] Step S35, If the calculated wall thickness value is abnormal, it is very likely that the signal is affected by defects, and it is necessary to calculate through the spatio-temporal adaptive cross-correlation measurement algorithm that adjusts the template waveform;

[0082] Step S36, For this situation, the present invention proposes a spatio-temporal adaptive cross-correlation measurement algorithm. That is, if the corrosion roughness of the pipe wall near the ultrasonic sensor gradually affects the overall waveform of the ultrasonic signal due to changes in space or time, and the first echo obtained at the position manually framed when the initial overall waveform is less affected by corrosion defects is no longer suitable as a template for traversal detection of the second echo, then use the wall thickness value calculation result at a farther distance in the previous normal range or the second echo found during the wall thickness calculation at the previous time as a new waveform matching template to replace the first echo obtained at the position manually framed when the initial overall waveform is less affected by corrosion defects; the normal range means that the calculated wall thickness value differs from the wall thickness reference value or the generally obtained wall thickness value in the previous calculation by within ±10%.

[0083] Embodiment 2

[0084] A method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of rough wall components, comprising the following steps:

[0085] Step S1, Build an experimental system, and place the rough wall pipe, the ultrasonic sensor device, and the PC server implementing the spatio-temporal adaptive cross-correlation calculation method at fixed detection positions;

[0086] Step S2: The ultrasonic sensor device generates ultrasonic waves, which are transmitted through a coupling agent to the inside of the rough wall surface. When encountering an interface, they are reflected and conducted back to the ultrasonic sensor.

[0087] Step S3: Transmit the ultrasonic signal collected by the ultrasonic sensor device to the PC server for spatio-temporal adaptive cross-correlation calculation to obtain the accurate pipe wall thickness value.

[0088] Further, step S1 specifically includes:

[0089] Step S11: In step S1, the experimental system includes: a pipe with a rough wall surface or containing defects, an ultrasonic sensor device, and a PC server. Keep the ultrasonic sensor device in contact with the pipe, and connect the PC server and the ultrasonic sensor through wireless communication to prepare for the experiment.

[0090] The specific steps of step S2 include:

[0091] Step S21: A good coupling should be maintained between the ultrasonic sensor and the pipe. After coupling, the ultrasonic echo signal has a large amplitude, is clear and symmetric, and the echo delay and waveform are stable, which helps for more accurate measurement and defect detection and ensures the effective acquisition of detection data.

[0092] Step S22: The ultrasonic sensor is connected to the PC server through wireless communication to ensure the stability of the data transmission process. The ultrasonic sensor integrates a LoRa module to wirelessly transmit the collected data to the LoRa gateway, and the LoRa gateway then sends the data to the PC server for processing and analysis through the IP protocol.

[0093] Step S3 is mainly completed by a program deployed on the server. The specific steps of the spatio-temporal adaptive cross-correlation calculation include:

[0094] Step S31: Preparation stage: Process the ultrasonic data through the cubic spline interpolation method to ensure the smoothness and continuity of the data. At the same time, set the relevant coefficient thresholds (max_threshold and min_threshold), and manually select the position of the first echo signal to provide a matching template for subsequent waveform matching and wall thickness calculation.

[0095] Specifically, step S31 includes the following steps:

[0096] Step S311: Select the cubic spline interpolation method for interpolation operation. By means of piecewise cubic polynomials, construct a cubic polynomial S k (u) for each pair of adjacent data points, and its general formula is:

[0097] ;

[0098] where u represents the abscissa of the original signal, uk represents the position of the k-th original signal, a k , b k , c k and d k are coefficients to be determined, which are determined by the following constraints: Each piecewise polynomial satisfies the interpolation points at both ends of the interval, i.e., S k (u k ) = v k and S k (u k+1 ) = v k+1 , where v represents the amplitude of the original signal, and v k is the amplitude of the k-th original signal; at each connection point u k , the first and second derivatives of the adjacent piecewise functions S k (u) and S k+1 (u) are continuous, i.e., S ’ k (u k+1 ) = S ’ k+1 (u k+1 ) and S ” k (u k+1 ) = S ” k+1 (u k+1 );

[0099] The piecewise function S k (u) of the final cubic spline interpolation is expressed as:

[0100]

[0101] where M k and M k+1 are the second derivatives at positions k and k + 1, and h k = u k+1 - u k ; Cubic spline interpolation can ensure the continuity of the interpolation result and the continuity of the first and second derivatives, avoid unnecessary oscillations, and provide good smoothness when dealing with data with a more complex shape.

[0102] Furthermore, to meet the requirements of different resolutions and the computing power conditions of different platforms, the algorithm can flexibly adjust the number of interpolation points in each interval. In each interval [u k , u k+1 , it is divided into smaller equal sub-intervals according to the required interpolation density, j points are inserted between every two original data points, i.e., divided into j + 1 equal parts, and then S k(u) Calculate the v value of the interpolation point. Since the original ultrasonic waveform itself has a certain continuity, compared with high-order polynomial interpolation, cubic spline interpolation reduces the risk of overfitting by using piecewise low-order polynomials to fit the data, and can more truly reflect the trend of the data.

[0103] Step S312: Then, it is necessary to determine the threshold of the correlation coefficient, which includes the maximum threshold and the minimum threshold of the correlation coefficient. The role of the threshold of the correlation coefficient itself is to ensure that the matched target waveform and the template waveform have sufficient similarity, thereby improving the reliability of the matching. By setting the maximum threshold and the minimum threshold of the correlation coefficient, the algorithm is allowed to dynamically adjust the matching requirements according to the actual situation of the signal quality, enhancing the robustness while ensuring the accuracy. For the convenience of subsequent description, they are respectively represented by the variables max_threshold and min_threshold; these two values need to be determined according to the specific working conditions of the ultrasonic wall thickness detection. Generally speaking, in the case where the ambient temperature is not extreme and the equipment processes the ultrasonic signal well, the variables max_threshold and min_threshold can be set relatively high. When the environment where the pipeline is located is relatively harsh and the quality of the ultrasonic signal is poor, the variables max_threshold and min_threshold can be appropriately lowered. Generally, max_threshold is set to 0.95 and min_threshold is set to 0.75.

[0104] Step S313: The visualization tool of the waveform can be used in the ultrasonic thickness measurement data processing software program on the PC side to manually select the position of the first echo of the ultrasonic signal of the pipe wall after interpolation. Since the waveform at the selected position will be used as a template to match the subsequent waveform signals for wall thickness calculation, it is necessary to try to select a clean waveform that does not mix the excitation signal as the first echo, and the range only needs to include the echo signal. Otherwise, it is easy to include irrelevant waveforms and affect the subsequent matching effect.

[0105] Step S32: Define the correlation coefficient threshold and the traversal range, and explain the change rule of the current correlation coefficient threshold;

[0106] Specifically: Define variables i, N, and correlation_threshold. Here, i represents the serial number of the first data point of the waveform segment for which the correlation coefficient is to be calculated currently. Use I to represent the serial number of the first data point of the first echo signal segment selected manually. Initially, i = I. N represents the number of data points in the first echo signal segment selected manually, M represents the serial number of the last data point of the entire interpolated waveform. Then Z = M - N, and Z represents the end point for backward traversal of the first echo signal segment selected manually as the template waveform to calculate the correlation coefficient value. Correlation_threshold is the current correlation coefficient threshold. Initially, the value of correlation_threshold is equal to the value of the maximum threshold max_threshold. If no second echo with a correlation coefficient value greater than or equal to the current correlation coefficient threshold, i.e., correlation_threshold, is found during the backward traversal of the template waveform this time, then the value of correlation_threshold will gradually decrease and traversal will be performed again until the value of correlation_threshold is equal to the value of the minimum threshold min_threshold.

[0107] S33. By gradually increasing the matching starting point i and calculating the correlation coefficient between the template waveform and the target waveform, find the second echo that meets the threshold for subsequent wall thickness calculation. If no second echo with a correlation coefficient value greater than the current correlation coefficient threshold is found, then decrease the current correlation coefficient threshold and perform traversal again.

[0108] Specifically: Perform an increment operation on i to simulate the serial number of the first data point of the target waveform segment for backward traversal to calculate the correlation coefficient value with the first echo signal segment selected manually as the template waveform. For example, if the range of the first echo signal segment selected manually is from the 3000th data point to the 5000th data point, then the first waveform segment for which the correlation coefficient is to be calculated with this segment as the template waveform is the data segment composed of the 3001st data point to the 5001st data point, the second is the data segment composed of the 3002nd data point to the 5002nd data point, and so on. It can be seen that the value range of i is (I, Z]. Determine whether the value of i is greater than Z. If not, calculate the correlation coefficient value between the template waveform and the target waveform. Use x(n) to represent the first echo signal selected manually, and the first echo signal is the template signal. Use y i (n) to represent the target signal segment for which the correlation coefficient value is to be calculated when the template signal traverses backward. Then the calculation formula for the correlation coefficient value is as follows:

[0109]

[0110] where yi y(n)=y(i + n), where i ≤ n ≤ N + i - 1, and n represents the index of the sample points of the ultrasonic signal segment. is the average value of the signal segment x(n). is the average value of the signal segment y i (n), and y i (n) is a new signal generated during the traversal to find the second echo as the value of i changes. It is a signal composed of N consecutive points selected from the original signal.

[0111] If the value of a certain r(i) is greater than or equal to the current value of correlation_threshold, then all data points between the current i-th data point and the (i + N)-th data point are taken as the found second echo and directly enter the wall thickness value calculation stage. The reason for not using the waveform corresponding to the i value with the largest correlation coefficient result as the second echo is that the waveform corresponding to the i value with the largest correlation coefficient result may not be the real second echo on the waveform image. In some cases, the subsequent third or fourth echo may have a correlation coefficient value slightly larger than that of the real second echo calculated with the template signal segment. If the third or fourth echo signal is mistakenly used as the second echo signal to calculate the wall thickness, it will cause the wall thickness value to suddenly become twice or even three times the original wall thickness. If the value of i exceeds the Z value during the process of incrementing by one, it means that no second echo with a correlation coefficient value greater than or equal to the current correlation coefficient threshold correlation_threshold is obtained. Then, the value of correlation_threshold is decreased by 0.01 (the specific step size of the decrease can be customized according to the situation), and then the value of i is reset to I, and the above process of traversing and calculating the correlation coefficient is repeated. If no second echo is still found under the current value of correlation_threshold, the value of correlation_threshold is decreased by 0.01 again until the value of correlation_threshold is less than the minimum threshold min_threshold. If no second echo is found when the value of correlation_threshold is less than min_threshold, it means that there is a problem with the waveform itself or the first waveform selection is incorrect, and it is necessary to return to the preparation stage to make corresponding adjustments and then retest.

[0112] Furthermore, the adjustment includes two types of situations. The first type is when calculating the wall thickness using the correlation coefficient algorithm for a new pipe with a non-severely corroded and rough surface for the first time. If the first waveform is misselected due to, for example, incomplete selection of the waveform or inclusion of a lot of irrelevant waveforms, resulting in the inability to find the second echo, it is necessary to return to the preparation stage to reselect the position of the first waveform. If the ultrasonic waveform effect is poor, the value of min_threshold can be considered to be lowered in the preparation stage to see if the second echo can be successfully found. If the second echo still cannot be found when min_threshold is less than 0.5, it indicates that there is a problem with the ultrasonic sensor device and troubleshooting is required. The second type is that the previously measured wall thickness values were all normal, but suddenly the second echo cannot be found in a subsequent measurement. This indicates that a relatively serious corrosion defect has occurred near the ultrasonic probe, resulting in distortion of the ultrasonic waveform. The first echo obtained from the originally manually selected position is no longer suitable as a template, and the spatio-temporal adaptive cross-correlation algorithm mentioned later needs to be used for calculation.

[0113] Step S34: After successfully finding the second echo, calculate the wall thickness value based on the time difference between it and the template waveform, the sampling frequency, the interpolation multiple, etc., and compare the calculated result with the reference value to verify its rationality and save it.

[0114] Specifically, if the value of r(i) is greater than or equal to the current correlation coefficient threshold correlation_threshold, the wall thickness value is calculated.

[0115] Use the Num variable to represent the difference between the index of the first data point of the found second echo and the index of the first data point of the first echo manually selected. Use the variables B and J to represent the sampling frequency and the interpolation multiple of the cubic spline interpolation method respectively. The unit of the material sound velocity q is m / s. Then the formula for wall thickness calculation is:

[0116]

[0117] If the calculated wall thickness value differs from the wall thickness reference value or the generally calculated wall thickness value obtained previously by no more than ±10%, then the wall thickness value calculated in this detection and the information of the data points of the found second echo are stored. The wall thickness reference value is the wall thickness marked when the pipe leaves the factory. This marked wall thickness at the factory is the wall thickness reference value. The generally calculated wall thickness value is the wall thickness value calculated using the ordinary correlation coefficient algorithm when there is no relatively serious corrosion and roughness around the ultrasonic probe. These wall thickness values may change as the ultrasonic probe moves or with the passage of time, but the changes will be slow and smooth, and there will be no sudden mutation exceeding 10% or more of the original wall thickness value of the pipe.

[0118] Step S35. If the calculated wall thickness value is abnormal, it is very likely that the signal is affected by defects, and it is necessary to calculate by adjusting the spatio-temporal adaptive cross-correlation measurement algorithm of the template waveform;

[0119] Specifically, if the calculated wall thickness value differs from the wall thickness reference value or the generally calculated wall thickness value obtained previously by more than ±10%, it indicates that the result of the wall thickness value has become abnormal. It is very likely that there are obvious defects near the position where the ultrasonic signal of the pipeline is collected, resulting in the scattering effect of the ultrasonic signal. The first echo obtained from the originally manually selected position is no longer suitable as a template; generally speaking, if the difference between the wall thickness value calculated in a certain calculation and the wall thickness reference value or the generally calculated wall thickness value obtained previously suddenly reaches 10% or more, it means that the calculation result of the wall thickness value is incorrect, because the pipeline with a fixed diameter that is qualified for factory production will not have such a large diameter error, and even if the wall thickness changes, it will not be so drastic.

[0120] Step S36. In view of this situation, the present invention proposes a spatio-temporal adaptive cross-correlation measurement algorithm. That is, if the corrosion roughness of the pipeline wall near the ultrasonic sensor gradually affects the overall waveform of the ultrasonic signal due to changes in space or time, and the first echo obtained from the position manually selected when the initial overall waveform is less affected by corrosion defects is no longer suitable as a template for traversing and detecting the second echo, then the second echo found during the wall thickness calculation at a farther distance in the previous step within the normal range of the wall thickness value calculation result or at the previous time is used as a new waveform matching template to replace the first echo obtained from the position manually selected when the initial overall waveform is less affected by corrosion defects; the normal range means that the difference between the calculated wall thickness value and the wall thickness reference value or the generally calculated wall thickness value obtained previously is within ±10%.

[0121] Embodiment 3

[0122] As Figure 1 shown is the flow chart of the spatio-temporal adaptive cross-correlation calculation of the present application. Taking a pipeline with a defect of 5 mm radius as an example, as Figure 2 shown, the actual wall thickness value is 22 mm, there is a hemispherical defect with a radius of 5 mm at a certain place on the pipeline, and the electromagnetic ultrasonic sensor is attached to the wall surface of the pipeline and moves from far to near the defect and continuously performs ultrasonic thickness measurement.

[0123] Initially, the electromagnetic ultrasonic sensor is far from the defect, and the first echo obtained from the manually selected position can be used to normally measure the wall thickness by the correlation coefficient method. The following figure shows the ultrasonic waveform when the sensor probe is 12 mm away from the center of the defect. Figure 3 The first echo between the two left dotted lines in it is manually selected, and the second echo between the two right dotted lines is found by the algorithm described above. The finally calculated wall thickness value is 22.037 mm, and the error is within the allowable range.

[0124] The sensor continuously moves towards the direction close to the defect, and the preliminary wall thickness calculation is carried out at different distances from the center of the defect in the vertical direction using the correlation coefficient algorithm described above. The test results are as follows in the table:

[0125]

[0126] It can be seen that when the distance from the center of the defect in the vertical direction is less than 4.8 mm, there is a large gap between the calculated value of the wall thickness, the reference value of the wall thickness, and the general value of the wall thickness calculated previously. View the waveform processing diagram at a distance of 4.7 mm as Figure 4 shown. It can be seen that at this time, the overall waveform has undergone a large distortion compared to when the distance between the sensor probe and the center of the defect in the vertical direction is far. The position of the "secondary echo" matched with the first echo manually boxed originally is not the real secondary echo, resulting in a large gap between the calculated wall thickness value and the actual wall thickness value.

[0127] In this embodiment, when the distance from the center of the defect in the vertical direction is 4.8 mm, the calculated value of the wall thickness is 22.1298 mm, which is still within the normal range. The waveform processing effect diagram is as Figure 5 shown. Extract the waveform of the secondary echo found and saved by it ( Figure 6 ).

[0128] That is, use the second waveform found by the program at a distance of 4.8 mm from the center of the defect as a template to match the data at a distance of 4.7 mm from the center of the defect, and take the position with the largest calculated correlation coefficient value as the position of the secondary echo of the waveform at a distance of 4.7 mm from the center of the defect. Since the Num variable represents the difference between the index of the first data point of the found secondary echo and the index of the first data point of the first echo manually boxed, and the position of the first echo manually boxed is fixed and unchanged, the wall thickness value can be calculated. However, due to the severe deformation of the waveform after gradually approaching the defect, the position with the largest correlation coefficient value may not be the position of the secondary echo we want to find. Therefore, a limiting condition is added. If the difference between the wall thickness value calculated at the position with the largest correlation coefficient value and the previously measured wall thickness value is greater than 10%, it will be discarded, and the wall thickness value at the position with the second largest correlation coefficient value will be calculated, and so on. The waveform processing result is as Figure 7 , and the output wall thickness value is 22.1452 mm, proving that the matching effect is good.

[0129] To further prove the effectiveness of the adaptive cross algorithm proposed by the present invention, tests with multiple groups of different data were carried out.

[0130] The second waveform found using the program at 4.0 mm from the center of the defect matches the waveform at 3.9 mm from the center of the defect. When directly calculating the wall thickness using the ordinary correlation algorithm, the calculated value is 35.343 mm. Now, the cross-correlation calculated wall thickness value is 22.176 mm. The comparison of the effects is as Figure 8 and Figure 9 , for the second waveform found using the program at 3.0 mm from the center of the defect that matches the waveform at 2.9 mm from the center of the defect, the normal calculated wall thickness value is 22.6226 mm. Now, the cross-correlation calculated wall thickness value is 22.068 mm. The comparison of the effects is as Figure 10 and Figure 11 shown.

[0131] For the second waveform found using the program at 2.5 mm from the center of the defect that matches the waveform at 2.4 mm from the center of the defect, the normal calculated wall thickness value is 12.5664 mm. Now, the cross-correlation calculated wall thickness value is 22.053 mm. The comparison of the effects is as Figure 12 and Figure 13 shown.

[0132] For the second waveform found using the program at 2.0 mm from the center of the defect that matches the waveform at 1.9 mm from the center of the defect, the normal calculated wall thickness value is 34.0186 mm. Now, the cross-correlation calculated wall thickness value is 22.068 mm. The comparison of the effects is as Figure 14 and Figure 15 shown.

Claims

1. An ultrasonic signal spatio-temporal adaptive cross-correlation measurement method for rough wall components, characterized in that It includes the following steps: Step S1: Set up an experimental system, and place the rough-wall pipeline, ultrasonic sensor device, and a PC server implementing the spatio-temporal adaptive cross-correlation calculation method at fixed detection positions; Step S2: The ultrasonic sensor device generates ultrasonic waves, which are transmitted through a coupling agent into the rough-wall component. When encountering an interface, they are reflected and conducted back to the ultrasonic sensor; Step S3: Transmit the ultrasonic wave signals collected by the ultrasonic sensor device to the PC server side for spatio-temporal adaptive cross-correlation calculation to obtain an accurate pipeline wall thickness value; The specific steps of the spatio-temporal adaptive cross-correlation calculation in Step S3 include: Step S31: Preparation stage: Process the ultrasonic data through cubic spline interpolation. At the same time, set the maximum threshold of the correlation coefficient and the minimum threshold of the correlation coefficient, and manually select the position of the first echo signal to provide a matching template for subsequent waveform matching and wall thickness calculation; Step S32: Define the current correlation coefficient threshold and traversal range, and describe the change rule of the current correlation coefficient threshold; Step S33: By gradually increasing the matching starting point and calculating the correlation coefficient between the template waveform and the target waveform, find the second echo that meets the current correlation coefficient threshold for subsequent wall thickness calculation; if no second echo with a correlation coefficient value greater than or equal to the current correlation coefficient threshold is found, then decrease the current correlation coefficient threshold and re-traverse; Step S34: After finding the second echo, calculate the wall thickness value based on the time difference between it and the template waveform, the sampling frequency, and the interpolation multiple, and compare the calculation result with the reference value to verify its rationality and save it; Step S35: If the calculated wall thickness value is abnormal, since the signal is affected by defects, it is necessary to calculate by adjusting the spatio-temporal adaptive cross-correlation measurement algorithm of the template waveform; Step S36: Use the second echo found at a farther distance in the previous step where the calculated wall thickness value is within the normal range or at the previous time during the wall thickness calculation process as a new waveform matching template to replace the first echo obtained at the position manually framed when the initial overall waveform is less affected by corrosion defects; the normal range means that the difference between the calculated wall thickness value and the wall thickness reference value or the generally calculated wall thickness value before is within ±10%; 2. The ultrasonic signal spatio-temporal adaptive cross-correlation measurement method for a rough wall component according to claim 1, characterized in that Step S1 specifically includes: Step S11: Keep the ultrasonic sensor device in contact with the pipeline, connect the PC server and the ultrasonic sensor wirelessly, and prepare for the experiment.

3. A method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of a rough wall component according to claim 1, characterized in that The specific steps of Step S2 include: Step S21: Couple between the ultrasonic sensor and the pipeline. After coupling, the ultrasonic echo signal has a large amplitude, is clear and symmetric, and the echo delay and waveform are stable; Step S22: Connect the ultrasonic sensor to the PC server through wireless communication. The ultrasonic sensor integrates a LoRa module to wirelessly transmit the collected data to the LoRa gateway, and the LoRa gateway then sends the data to the PC server through the IP protocol.

4. A method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of a rough wall component according to claim 1, characterized in that Step S31 includes the following steps: Step S311: Select the cubic spline interpolation method for interpolation operation. By means of piecewise cubic polynomials, construct a cubic polynomial S k (u), whose general formula is: ; where \(u\) represents the abscissa of the original signal, \(u\) k represents the position of the \(k\) -th original signal, \(a\) k , \(b\) k , \(c\) k and \(d\) k are undetermined coefficients, which are determined by the following constraints: Each piecewise polynomial satisfies the interpolation points at both ends of the interval, that is, \(S\) k (u k ) = \(v\) k and \(S\) k (u k+1 ) = \(v\) k+1 , where \(v\) represents the amplitude of the original signal, \(v\) k is the amplitude of the \(k\) -th original signal; at each connection point \(u\) k , the first - order and second - order derivatives of the adjacent piecewise functions \(S\) k (u) and \(S\) k+1 (u) are continuous, that is, \(S\) ’ k (u k+1 ) = \(S\) ’ k+1 (u k+1 ) and \(S\) ” k (u k+1 ) = \(S\) ” k+1 (u k+1 ); The piecewise function S k (u) of the final cubic spline interpolation is expressed as: ; where M k and M k+1 are the second derivatives at positions k and k + 1, h k = u k+1 - u k ; In each interval [u k , u k+1 , it is divided into smaller equal - sized sub - intervals according to the required interpolation density. j points are inserted between every two original data points, that is, it is divided into j + 1 equal parts. Then, at each sub - point, S k (u) is used to calculate the y - value of the interpolation point; Step S312: Determine the threshold of the correlation coefficient. The threshold of the correlation coefficient includes the maximum threshold and the minimum threshold of the correlation coefficient, which are represented by variables max_threshold and min_threshold respectively. max_threshold is set to 0.95, and min_threshold is set to 0.75; Step S313: Select the first echo position of the ultrasonic signal of the pipe wall after interpolation. The waveform at the selected position is used as a template to match the subsequent waveform signals for wall thickness calculation. The first echo only includes the echo signal.

5. A method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of a rough wall component according to claim 4, characterized in that Step S32 is specifically as follows: Define variables i, N, and correlation_threshold; where i represents the serial number of the first data point of the waveform segment for which the correlation coefficient is to be matched and calculated currently. Use I to represent the serial number of the first data point of the first echo signal segment selected manually. Then initially, i = I; N represents the number of data points in the first echo signal segment selected manually, M represents the serial number of the last data point of the entire interpolated waveform. Then Z = M - N, and Z represents the end point for traversing backward to calculate the correlation coefficient value using the first echo signal segment selected manually as the template waveform. correlation_threshold is the current correlation coefficient threshold. Initially, the value of correlation_threshold is equal to the value of the maximum threshold max_threshold. If the second echo with a correlation coefficient value greater than or equal to the current correlation coefficient threshold, that is, correlation_threshold, is not found during the backward traversal of the template waveform this time, then the value of correlation_threshold will gradually decrease and the traversal will be repeated until the value of correlation_threshold is equal to the value of the minimum threshold min_threshold.

6. A method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of a rough wall component according to claim 5, characterized in that, Step S33 specifically is: increment i by one, simulate the first echo signal segment selected manually by box selection as the first data point serial number of the target waveform segment for traversing backward to calculate the correlation coefficient value with the template waveform; the value range of i is (I, Z], determine whether the value of i is greater than Z, if not, calculate the correlation coefficient value between the template waveform and the target waveform; use x(n) to represent the first echo signal selected manually by box selection, and the first echo signal is the template signal, use y i (n) represents the target signal segment that will traverse backward from the template signal to calculate the correlation coefficient value with it, and the calculation formula of the correlation coefficient value is as follows: ; where y i (n) = y(i + n), i ≤ n ≤ N + i - 1, where n represents the index of the sample points of the ultrasonic signal segment, is the average value of the signal segment x(n), is the average value of the signal segment y i (n), and y i (n) is a new signal generated with the change of the i value during the process of traversing to find the secondary echo, and it is a signal composed of N consecutive points selected from the original signal; If the value of a certain r(i) is greater than or equal to the current value of correlation_threshold, then all data points between the current i-th data point and the (i + N)-th data point are used as the found second echo and directly enter the wall thickness value calculation stage; If the value of i is greater than the value of Z during the process of continuously incrementing by one, it indicates that no second echo with a correlation coefficient value greater than or equal to the current correlation coefficient threshold correlation_threshold is obtained. Then, the value of correlation_threshold is decremented by 0.01, and the value of i is reset to I, and the above process of traversing and calculating the correlation coefficient is performed again. If no second echo is found under the current value of correlation_threshold, the value of correlation_threshold is decremented by 0.01 again until the value of correlation_threshold is less than the minimum threshold min_threshold; if no second echo is found when the value of correlation_threshold is less than min_threshold, it indicates that there is a problem with the waveform itself or the first waveform box selection is incorrect, and it is necessary to return to the preparation stage, readjust, and then retest.

7. A method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of a rough wall component according to claim 6, characterized in that Step S34 is specifically as follows: If there is a value of r(i) greater than or equal to the current correlation coefficient threshold correlation_threshold, then the wall thickness value is calculated; Use the Num variable to represent the difference between the index of the first data point of the found second echo and the index of the first data point of the first echo manually boxed. Use the variables B and J to represent the sampling frequency and the interpolation multiple of the cubic spline interpolation method respectively. The unit of the material sound velocity q is m / s. Then the formula for wall thickness calculation is: ; If the calculated wall thickness value differs from the wall thickness reference value or the generally calculated wall thickness value obtained previously by within ±10%, then the wall thickness value calculated in this detection and the information of the found second echo data points are stored; where the wall thickness reference value is the wall thickness marked when the pipeline leaves the factory; The generally calculated wall thickness value is the wall thickness value calculated using the ordinary correlation coefficient algorithm when there is no severe corrosion and roughness around the ultrasonic probe.

8. A method for spatio-temporal adaptive cross-correlation measurement of ultrasonic signals of a rough wall component according to claim 7, characterized in that Step S35 is specifically as follows: If the calculated wall thickness value differs from the wall thickness reference value or the generally calculated wall thickness value obtained previously by more than ±10%, it indicates that the wall thickness value result is abnormal, and the first echo obtained from the originally manually boxed position is no longer suitable as a template.

Citation Information

Patent Citations

  • High-temperature pipeline wall thickness monitoring device and method capable of achieving rapid fixing and centering

    CN116336979A

  • Method for external ultrasonic nondestructive testing of pipeline pressure

    CN116839796A