Echo phase error correction method facing ultrasonic C scanning detection and related device
By calculating the eigenvector and K-mean clustering algorithm of the echo waveform, classifying the ultrasonic C scan waveform, selecting the correction reference point and performing displacement processing, the problem of phase error of the echo waveform in the ultrasonic C scan is solved, and the detection accuracy is improved. Enhanced adaptability of phase correction.
Patent Information
- Application Number
- CN202411138205.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-12
AI Technical Summary
During the ultrasonic C scanning process, due to the perpendicular tolerance between the probe and the detection surface, the echo waveform produces phase error, which affects the accuracy of defect detection. The existing phase correction method is weak in adaptability and cannot be improved for various workpieces phase correction.
By calculating the echo waveform feature vectors of each sampling point in the ultrasonic C scanning plane, using the K-mean clustering algorithm to classify the waveform, and selecting the correction reference point in the generated acquisition box to calculate the displacement amount corresponding to the minimum root mean square error As the optimal displacement amount for correcting the phase error, the displacement process is performed to correct the waveform phase error.
It effectively solves the phase error problem of echo waveform caused by the perpendicular tolerance between the probe and the workpiece detection surface, improves the detection accuracy, and makes the phase correction algorithm more adaptable and can adapt to the waveform characteristics of different workpieces.
Smart Images

Figure CN118937498A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of ultrasonic nondestructive testing, and in particular relates to an echo phase error correction method for ultrasonic C-scan testing and a related device. Background Art
[0002] In the modern industrial field, the continuous progress and development of technology has made non-destructive testing technology more mature and widely used. Among them, ultrasonic flaw detection technology has played an irreplaceable role in non-destructive testing in the industrial field due to its advantages such as high sensitivity, strong penetration, high work efficiency, low cost, and no radiation pollution. At present, people generally use ultrasonic methods to evaluate workpiece defects. Among them, ultrasonic C scanning is a quantitative positioning detection method with high accuracy, which can realize the detection of internal defects of workpieces. Compared with traditional ultrasonic flaw detection, it has greatly improved detection sensitivity, resolution and automation.
[0003] In the actual ultrasonic C-scanning process, due to the flatness tolerance of the platform surface and the errors in the assembly process of the ultrasonic probe and its fixture, a large verticality tolerance may be generated between the ultrasonic probe and the detection surface of the workpiece. Therefore, there are differences in the distance between the probe and the detection surface at different positions, and the collected echo waveforms will be advanced or delayed, resulting in phase errors. When the received echo signal has a phase error, the set sampling gate cannot completely capture the defect echo signals of all the collection points on the scanning plane, affecting the normal detection of defects.
[0004] At present, the phase error of echo waveform can be corrected by optimizing the correlation between the estimated signal phase deviation and the contrast ultrasonic echo A scan, and establishing the corresponding optimized estimation function to correct the phase distortion caused by inhomogeneous media; there is also a method to realize the correction of the detection echo signal phase deviation by using the signal covariance analysis method. The experimental results show that this method can effectively correct the phase deviation of each channel echo signal and improve the detection accuracy. However, in the actual ultrasonic detection process, the workpieces to be detected are diverse. Even the A-scan waveform morphology collected at different positions of the same workpiece may be very different. The current phase correction method has weak adaptability and cannot perform perfect phase correction for various workpieces. Summary of the invention
[0005] In order to overcome the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide an echo phase error correction method and related devices for ultrasonic C-scan detection. The present invention can classify the waveforms of ultrasonic echo signals, thereby performing displacement processing on waveforms with similar waveform characteristics respectively, so as to achieve the effect of correcting the waveform phase error.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for correcting echo phase errors in ultrasonic C-scan detection includes the following steps:
[0008] Calculate the characteristic vector of the echo waveform of each sampling point in the ultrasonic C-scan plane;
[0009] Taking the feature vectors of all sampling points as data sets, classifying the echo waveforms of the sampling points according to the morphology of the echo waveforms of the sampling points, and obtaining the echo waveform classification results;
[0010] Generate an acquisition frame in the ultrasonic C-scanning plane, so that the acquisition frame simultaneously contains sampling points of various echo waveforms, and select correction reference points of various echo waveforms in the acquisition frame;
[0011] The minimum root mean square error between the echo waveform of each sampling point and the echo waveform of the correction reference point of each sampling point within the maximum displacement range is calculated, and the displacement corresponding to the minimum root mean square error is used as the optimal displacement for correcting the phase error.
[0012] Preferably, the feature vector is:
[0013] (W1,W2,W3,W4,M) T
[0014] Wherein, W1, W2, W3, and W4 are respectively the energy densities of the echo waveform in its four sections, the four sections are four sections into which each group of echo waveforms is evenly divided in the time domain, and M is the energy moment of the echo waveform;
[0015] The energy moment M is determined by the following formula:
[0016]
[0017] The energy densities W1, W2, W3, and W4 of the echo waveform in the four sections are determined by the following formula:
[0018]
[0019] Wherein: x(n) is the sampling value of the echo waveform, which is the amplitude of the echo waveform; k is the sampling number of the echo waveform; and n is a sampling point on the echo waveform.
[0020] Preferably, the process of taking the feature vectors of all sampling points as a data set and classifying the echo waveforms of the sampling points according to the morphology of the echo waveforms of the sampling points to obtain the echo waveform classification results includes:
[0021] The feature vectors of all sampling points are used as clustering data sets, and the K-means clustering algorithm is used to classify the echo waveforms of the sampling points according to their morphologies.
[0022] Preferably, when the K-means clustering algorithm is used to classify the sampling point echo waveforms according to their morphology:
[0023] The elbow method is used to select the K value, and the Mahalanobis distance is selected as the distance measurement method to perform the K-means clustering algorithm on the data set.
[0024] Preferably, when generating the acquisition frame in the ultrasonic C-scan plane, it is assumed that there is no phase error between waveforms in a small area of the specimen scanned by ultrasonic C-scanning, and the acquisition frame is generated in a random manner.
[0025] Preferably, when randomly generating an acquisition frame in the ultrasonic C scanning plane, if the acquisition frame generated with the initial side length contains all categories of echo waveforms, correction reference points of each category of echo waveform are selected in the acquisition frame, and the number of correction reference points of each category of echo waveform selected in the acquisition frame is equal to the number of categories of echo waveform; if the acquisition frame generated with the initial side length does not contain the correction reference points of each category of echo waveform, a new acquisition frame is generated again and it is re-determined whether the generated acquisition frame contains all categories of echo waveforms; if the number of times a new acquisition frame is generated reaches the set maximum number of updates, the side length is increased by the side length expansion coefficient, and a new acquisition frame is generated again and it is determined whether the newly generated acquisition frame contains all categories of echo waveforms.
[0026] Preferably, when calculating the minimum root mean square error between the echo waveform of each sampling point and the echo waveform of the correction reference point of each sampling point within the maximum displacement range:
[0027] The echo waveform of each sampling point is displaced within the maximum displacement range, and the root mean square error is calculated at each displacement, and the displacement with the minimum root mean square error is found within the maximum displacement range.
[0028] The present invention also provides an echo phase error correction system for ultrasonic C-scan detection, comprising:
[0029] Feature calculation module: used to calculate the feature vector of the echo waveform of each sampling point in the ultrasonic C-scan plane;
[0030] Classification module: It is used to classify the echo waveforms of the sampling points according to the morphology of the echo waveforms of the sampling points, taking the feature vectors of all sampling points as data sets, and obtain the echo waveform classification results;
[0031] A calibration reference point determination module is used to generate an acquisition frame in the ultrasonic C-scan plane, so that the acquisition frame contains sampling points of various echo waveforms at the same time, and select calibration reference points of various echo waveforms in the acquisition frame;
[0032] Calculation module: used to calculate the minimum root mean square error between the echo waveform of each sampling point and the echo waveform of the correction reference point of each sampling point within the maximum displacement range, and use the displacement corresponding to the minimum root mean square error as the optimal displacement for correcting the phase error.
[0033] The present invention also provides an electronic device, comprising:
[0034] one or more processors;
[0035] a storage device having one or more programs stored thereon;
[0036] When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the echo phase error correction method for ultrasonic C-scan detection as described above in the present invention.
[0037] The present invention further provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the echo phase error correction method for ultrasonic C-scan detection as described above in the present invention.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The present invention is directed to an echo phase error correction method for ultrasonic C-scan detection. The ultrasonic C-scan echo signal is classified according to the waveform characteristics of the echo waveforms of the sampling points in the ultrasonic C-scan plane, and the waveforms with similar waveform characteristics are respectively subjected to displacement processing to achieve the effect of correcting the phase error. In summary, the present invention effectively solves the phenomenon that the echo waveforms at different acquisition points in the C-scan process generate phase errors due to the verticality tolerance between the probe and the detection surface of the workpiece. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic flow chart of a method for correcting echo phase errors in ultrasonic C-scan detection according to an embodiment of the present invention;
[0041] Figure 2 This is a distorted image caused by an echo phase error in an embodiment of the present invention;
[0042] Figure 3 A line graph of different K values and the sum of squares of total inter-cluster distances according to an embodiment of the present invention;
[0043] Figure 4 This is a classification result diagram of the K-means clustering algorithm of an embodiment of the present invention;
[0044] Figure 5 A flowchart of selecting a reference point for phase error correction according to an embodiment of the present invention;
[0045] Figure 6 is a reference point waveform diagram of an embodiment of the present invention;
[0046] Figure 7 This is an echo imaging diagram after phase error correction according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0048] like Figure 2 The figure shows the imaging result of using ultrasonic C-scanning to detect weld defects of an IGBT component. Due to the verticality tolerance between the ultrasonic probe and the detection surface, the echo waveform received during the C-scan process has a phase error, which in turn causes image distortion and affects the normal detection of weld defects. Figure 2 The image data shown is an object, and this embodiment is described with respect to the ultrasonic C-scan phase error problem of an IGBT component.
[0049] Reference Figure 1 The present embodiment provides a method for correcting echo phase errors in ultrasonic C-scan detection, comprising the following steps:
[0050] S1: Calculate the characteristic vector of the echo waveform of each sampling point in the ultrasound C scanning plane;
[0051] Wherein, each group of received echo waveforms is evenly divided into four sections in the time domain, and the characteristic vector of the echo waveform is a five-dimensional vector, which includes the energy moment and the energy density of the waveform in the four sections;
[0052] The five-dimensional feature vector expression is as follows:
[0053] (W1,W2,W3,W4,M) T
[0054] The energy moment of the echo waveform is determined by the following formula:
[0055]
[0056] The energy densities W1, W2, W3, and W4 of the echo waveform in the four sections of its time domain waveform are determined by the following formula:
[0057]
[0058] Wherein: x(n) is the sampling value of the echo waveform, which is the amplitude of the echo waveform; k is the sampling number of the echo waveform; and n is a sampling point on the echo waveform.
[0059] S2: Taking the feature vectors of all sampling points as the data set, the K-means clustering algorithm is used to classify the echo waveforms according to their morphology;
[0060] The elbow method is used to select the K value. The elbow usually indicates that when the number of clusters increases, the rate of error decreases significantly. Choosing this point can often obtain better clustering effects. The sum of squared distances between total clusters is selected as the measure of clustering effect.
[0061] The total inter-cluster distance sum of squares SSE is determined by the following formula:
[0062]
[0063] Where: C i is the i-th cluster, m i is the i-th centroid, p is the number of cells belonging to C i data points.
[0064] Use the above formula to find the SSE when K is between 2 and 10, and plot it as a graph, such as Figure 3 As shown in Figure 2, according to the elbow method, the optimal number of clusters is 6, so the K value is 6 for clustering operation.
[0065] In this method, a five-dimensional vector (W1, W2, W3, W4, M) is selected T As the features of waveform classification, W1, W2, W3, and W4 are the energy densities of the echo waveform in the four segments respectively, and M is the energy moment of the echo waveform. Due to the difference in the magnitude of the energy moment and the energy density, the Mahalanobis distance is selected for data clustering, which can effectively eliminate the influence of the differences in the scales of each feature and make the classification results more accurate.
[0066] The Mahalanobis distance Determined by the following formula:
[0067]
[0068] in: and is the characteristic vector of the waveform to be corrected and the cluster center.
[0069] Therefore, we take K value as 6, convergence threshold as 10, maximum number of iterations as 100, select Mahalanobis distance as distance measurement, and use K-means clustering algorithm to classify the data set. The classification results are as follows: Figure 4 As shown, each sampling point on the C-scan plane is well classified according to its waveform morphology. To facilitate the display of the classification results, the pixel points corresponding to the waveform of the same type are displayed in the same color.
[0070] S3: randomly generating an acquisition frame in the scanning plane until the acquisition frame contains sampling points of each type of waveform at the same time, and selecting calibration reference points of each type of waveform in the acquisition frame;
[0071] The flowchart of reference point selection is as follows Figure 5 As shown in the figure, a collection frame is randomly generated in the scanning plane, and the number of selected reference points should be equal to the number of waveform categories (i.e., K). If the collection frame generated with the initial side length contains all categories of waveforms, reference points of each category can be selected in the collection frame; if the collection frame does not contain all categories of waveforms, a new collection frame needs to be generated again and re-judged; if the number of times the collection frame is generated reaches the set maximum number of updates, the side length should be increased by the side length expansion coefficient, and then re-generated and judged. This process requires the assumption that there is no phase error between waveforms in a small area of the specimen. Based on this assumption, it can be considered that there is no phase error between the reference points of each category selected from the collection frame.
[0072] The initial side length is 30, the maximum number of updates is 20, the side length expansion coefficient is 1.5, and the K value (number of clusters) selected above is 6. Therefore, 6 reference points of different categories need to be selected in the acquisition frame. The final reference point waveform is as follows: Figure 6 shown.
[0073] S4: Calculate the minimum root mean square error between the waveform of each sampling point and its reference point waveform within the maximum displacement range, and use the corresponding displacement as the optimal displacement for correcting the phase error.
[0074] Take the maximum displacement as 100, make the echo waveform of each point perform displacement operation within this range, select the root mean square error between the echo waveform and its reference point waveform as the judgment index of the waveform phase correction degree; and calculate the root mean square error between the echo waveform and its reference point waveform under each displacement respectively, and find the displacement that minimizes the root mean square error within this range, which is taken as the optimal displacement of phase correction;
[0075] The root mean square error RMSE is:
[0076]
[0077] Among them: x(n) and y(n) are the sampling values of the waveform to be corrected and the reference point waveform, that is, the waveform amplitude; k is the sampling number of the echo waveform.
[0078] The obtained optimal displacement is used to perform phase correction on the echo waveform of each point, and the corrected echo waveform is imaged and displayed. The correction result of the ultrasonic C-scan image is shown as follows: Figure 7 As shown, the imaging result obtained after correction is no longer distorted, and normal weld defect detection can be performed.
[0079] The present invention also provides an echo phase error correction system based on the ultrasonic C-scan detection as described above, comprising:
[0080] Feature calculation module: used to calculate the feature vector of the echo waveform of each sampling point in the ultrasonic C-scan plane;
[0081] Classification module: It is used to classify the echo waveforms of the sampling points according to the morphology of the echo waveforms of the sampling points, taking the feature vectors of all sampling points as data sets, and obtain the echo waveform classification results;
[0082] A calibration reference point determination module is used to generate an acquisition frame in the ultrasonic C-scan plane, so that the acquisition frame contains sampling points of various echo waveforms at the same time, and select calibration reference points of various echo waveforms in the acquisition frame;
[0083] Calculation module: used to calculate the minimum root mean square error between the echo waveform of each sampling point and the echo waveform of the correction reference point of each sampling point within the maximum displacement range, and use the displacement corresponding to the minimum root mean square error as the optimal displacement for correcting the phase error.
[0084] The embodiments of the present invention also provide corresponding electronic devices and computer-readable storage media for implementing the solutions provided by the embodiments of the present invention.
[0085] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device performs the echo phase error correction method for ultrasonic C-scan detection described in any embodiment of the present application.
[0086] The storage medium stores a computer program, wherein the computer program, when executed by the processor, implements the echo phase error correction method for ultrasonic C-scan detection described in any embodiment of the present application.
[0087] It can be seen from the above scheme that the present invention classifies ultrasonic echo signals according to waveform characteristics, and performs displacement processing on waveforms with similar waveform characteristics respectively, so as to achieve the effect of correcting phase errors. The method uses energy moment and energy density in four segments as the characteristics of waveform classification. These five characteristics can reflect the amplitude of the echo waveform at different times and can accurately extract the essential characteristics of the waveform; through the K-means clustering algorithm, echoes with similar waveform characteristics are classified into one category, and phase correction is performed on a category basis, which can not only greatly improve the accuracy of phase correction, but also make the algorithm adaptive. In the face of workpieces with complex echo waveform types, the waveforms can still be classified through the clustering algorithm and phase correction can be performed separately.
[0088] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited thereto. After considering the specification and practicing the invention disclosed herein, those skilled in the art will easily think of other embodiments of the present invention. Within the technical concept of the present invention, the technical solution of the present invention can be subjected to a variety of simple modifications, including the combination of various specific technical features in any suitable manner. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations. However, these simple modifications and combinations should also be regarded as the contents disclosed by the present invention, and all belong to the protection scope of the present invention.
Claims
1. A method for correcting echo phase error in ultrasonic C-scan detection, characterized in that: The process includes the following: Calculate the characteristic vector of the echo waveform of each sampling point in the ultrasonic C-scan plane; Taking the feature vectors of all sampling points as data sets, classifying the echo waveforms of the sampling points according to the morphology of the echo waveforms of the sampling points, and obtaining the echo waveform classification results; Generate an acquisition frame in the ultrasonic C-scanning plane, so that the acquisition frame simultaneously contains sampling points of various echo waveforms, and select correction reference points of various echo waveforms in the acquisition frame; The minimum root mean square error between the echo waveform of each sampling point and the echo waveform of the correction reference point of each sampling point within the maximum displacement range is calculated, and the displacement corresponding to the minimum root mean square error is used as the optimal displacement for correcting the phase error.
2. The echo phase error correction method for ultrasonic C-scan detection according to claim 1, characterized in that: The feature vector is: <h2 style=";text-align:left;direction:ltr">(W1,W2,W3,W4,M)<h2 style=";text-align:left;direction:ltr"> T Wherein, W1, W2, W3, and W4 are respectively the energy densities of the echo waveform in its four sections, the four sections are four sections into which each group of echo waveforms is evenly divided in the time domain, and M is the energy moment of the echo waveform; The energy moment M is determined by the following formula: The energy densities W1, W2, W3, and W4 of the echo waveform in the four sections are determined by the following formula: Wherein: x(n) is the sampling value of the echo waveform, which is the amplitude of the echo waveform; k is the sampling number of the echo waveform; and n is a sampling point on the echo waveform.
3. The echo phase error correction method for ultrasonic C-scan detection according to claim 1, characterized in that: The characteristic vectors of all sampling points are used as data sets, and the echo waveforms of the sampling points are classified according to the morphology of the echo waveforms of the sampling points. The process of obtaining the echo waveform classification results includes: The feature vectors of all sampling points are used as clustering data sets, and the K-means clustering algorithm is used to classify the echo waveforms of the sampling points according to their morphologies.
4. The echo phase error correction method for ultrasonic C-scan detection according to claim 3, characterized in that: When using the K-means clustering algorithm to classify the sampling point echo waveforms according to their morphology: The elbow method is used to select the K value, and the Mahalanobis distance is selected as the distance measurement method to perform the K-means clustering algorithm on the data set.
5. The echo phase error correction method for ultrasonic C-scan detection according to claim 1, characterized in that: When generating the acquisition frame in the ultrasonic C-scan plane, it is assumed that there is no phase error between waveforms in a small area of the specimen scanned by ultrasonic C-scan, and the acquisition frame is generated in a random manner.
6. The echo phase error correction method for ultrasonic C-scan detection according to claim 5, characterized in that: When randomly generating an acquisition frame in an ultrasonic C scanning plane, if the acquisition frame generated with an initial side length includes echo waveforms of all categories, correction reference points of various echo waveforms are selected in the acquisition frame, and the number of correction reference points of various echo waveforms selected in the acquisition frame is equal to the number of categories of echo waveforms; if the acquisition frame generated with an initial side length does not include correction reference points of various echo waveforms, a new acquisition frame is generated again and it is re-determined whether the generated acquisition frame includes echo waveforms of all categories; if the number of times a new acquisition frame is generated reaches a set maximum number of updates, the side length is increased by a side length expansion coefficient, and a new acquisition frame is generated again and it is determined whether the newly generated acquisition frame includes echo waveforms of all categories.
7. The echo phase error correction method for ultrasonic C-scan detection according to claim 1, characterized in that: When calculating the minimum root mean square error between the echo waveform of each sampling point and the echo waveform of the calibration reference point of each sampling point within the maximum displacement range: The echo waveform of each sampling point is displaced within the maximum displacement range, and the root mean square error is calculated at each displacement, and the displacement with the minimum root mean square error is found within the maximum displacement range.
8. An echo phase error correction system for ultrasonic C-scan detection, characterized in that: include: Feature calculation module: used to calculate the feature vector of the echo waveform of each sampling point in the ultrasonic C-scan plane; Classification module: It is used to classify the echo waveforms of the sampling points according to the morphology of the echo waveforms of the sampling points, taking the feature vectors of all sampling points as data sets, and obtain the echo waveform classification results; A calibration reference point determination module is used to generate an acquisition frame in the ultrasonic C-scan plane, so that the acquisition frame contains sampling points of various echo waveforms at the same time, and select calibration reference points of various echo waveforms in the acquisition frame; Calculation module: used to calculate the minimum root mean square error between the echo waveform of each sampling point and the echo waveform of the correction reference point of each sampling point within the maximum displacement range, and use the displacement corresponding to the minimum root mean square error as the optimal displacement for correcting the phase error.
9. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the echo phase error correction method for ultrasonic C-scan detection as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the echo phase error correction method for ultrasonic C-scan detection according to any one of claims 1 to 7 is implemented.
