Defect detection method based on array sensing, electronic equipment and program product
By using array sensor scanning and feature extraction, a dataset is constructed and a model is trained, solving the problem of inaccurate detection of minute defects in eddy current detection technology and achieving high-precision identification of minute defects.
Patent Information
- Application Number
- CN202511425045.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-02-13
AI Technical Summary
Existing eddy current testing technology has insufficient resolution in detecting minute defects (diameter <3mm, depth <0.3mm), causing minute defect areas to be ignored, making it difficult to meet the industrial demand for high-precision and rapid testing.
An array sensor is used to scan and acquire time-domain response signals, perform feature extraction and frequency-domain analysis, construct a dataset, and train a defect detection model to identify defect types and sizes.
It improves the detection accuracy of minute defects, overcomes the problem of insufficient resolution of a single sensor, and achieves high-precision detection of minute defects.
Smart Images

Figure CN121521985A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology, and more specifically, to a defect detection method, electronic device, and program product based on array sensing. Background Technology
[0002] In key industrial sectors such as petrochemicals, power equipment, and aerospace, conductive materials like carbon steel and aluminum alloys are widely used in core components such as pipelines, pressure vessels, and structural parts. During long-term service, these materials are prone to localized thinning defects due to corrosion and stress. If these defects are less than 3mm in diameter and less than 0.3mm in depth, they are often initially "latent," but can rapidly expand over time, leading to major safety accidents such as leaks and ruptures. Therefore, the industry urgently needs high-precision, rapid detection technologies for minute defects.
[0003] Current eddy current detection technology for corrosion thinning defects in conductive materials mainly adopts a "single sensor scanning" approach: that is, using a single-channel solenoid coil, planar coil, or sensor probe as the core, scanning the workpiece surface with fixed excitation parameters (such as 50Hz-1kHz sine wave excitation and 5V constant amplitude), and identifying defects by comparing the peak values of the time-domain signal. This technology is mature and low-cost, and is widely used for the inspection of smooth surfaces such as the outer wall of pipes.
[0004] However, existing technologies have significant technical bottlenecks in the detection of minute defects (e.g., defects with a diameter <3mm and a depth <0.1mm). The core issues are the insufficient resolution of a single sensor and the lack of system-wide collaborative optimization. Specifically, the coil size of a single sensor is generally greater than 3mm, resulting in low spatial resolution. When the defect diameter is smaller than the effective detection range of the coil, the difference in eddy current disturbance between the defect area and the normal area is "averaged," leading to a signal resolution (the signal difference between the defect and non-defect areas) of less than 30mV. This makes it impossible to effectively distinguish minute defects from background noise, easily resulting in "missed detections" and "false judgments," and failing to meet the industry's requirements for the detection of minute defects. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a defect detection method, electronic device and program product based on array sensing, which can improve the problem that in the traditional detection of small defects in conductive materials, the resolution of a single sensor is insufficient, resulting in the small defect area being ignored and the detection of small defects being inaccurate.
[0006] To achieve the above technical objectives, the technical solution adopted in this application is as follows:
[0007] In a first aspect, embodiments of this application provide a defect detection method based on array sensing, the method comprising:
[0008] Acquire the first time-domain response signal obtained by scanning defect samples using an array sensor;
[0009] Feature extraction is performed on the first time-domain response signal to obtain the first time-domain feature and the first frequency-domain feature corresponding to the first time-domain response signal;
[0010] A dataset is constructed based on the first time-domain features and the first frequency-domain features of multiple defect samples;
[0011] The initial defect detection model is trained using the dataset to obtain the trained initial defect detection model, which serves as the target defect detection model.
[0012] Acquire the second time-domain response signal obtained by scanning the sample under test through the array sensor;
[0013] Feature extraction is performed on the second time-domain response signal to obtain the second time-domain feature and the second frequency-domain feature corresponding to the second time-domain response signal;
[0014] Based on the second time-domain features and the second frequency-domain features, the defect type and size of the sample to be inspected are identified using the target defect detection model, and are used as the defect detection result.
[0015] In conjunction with the first aspect, in some optional embodiments, between acquiring the first time-domain response signal obtained by scanning defect samples using an array sensor, and extracting features from the first time-domain response signal to obtain the first time-domain features and the first frequency-domain features corresponding to the first time-domain response signal, the method further includes:
[0016] The first time-domain response signal is preprocessed to obtain a preprocessed first time-domain response signal;
[0017] Feature extraction is performed on the first time-domain response signal to obtain the first time-domain feature and the first frequency-domain feature corresponding to the first time-domain response signal, including:
[0018] Feature extraction is performed on the preprocessed first time-domain response signal to obtain the first time-domain feature and the first frequency-domain feature corresponding to the preprocessed first time-domain response signal.
[0019] In conjunction with the first aspect, in some optional implementations, feature extraction is performed on the first time-domain response signal to obtain first time-domain features and first frequency-domain features corresponding to the first time-domain response signal, including:
[0020] Based on the first time-domain response signal, time-domain features are extracted from the first time-domain response signal to obtain the first time-domain features;
[0021] Based on the first time-domain response signal, frequency domain features are extracted from the first time-domain response signal to obtain the first frequency domain features.
[0022] In conjunction with the first aspect, in some optional implementations, the time-domain feature includes at least one of the target peak value, peak time, and signal attenuation coefficient;
[0023] Based on the first time-domain response signal, time-domain features are extracted from the first time-domain response signal to obtain the first time-domain features, including:
[0024] The maximum value in the first time domain response signal is taken as the target peak value, and the time at which the target peak value is located is determined as the peak time;
[0025] Based on the target signal segment, determine the exponential fitting model:
[0026]
[0027] In the formula, This represents the time-domain response signal of the target signal segment after exponential fitting. Indicates time, Indicates the fitted amplitude. Indicates the baseline value. Indicates the signal attenuation coefficient;
[0028] Based on the target signal segment, the signal attenuation coefficient is solved using the least squares method:
[0029]
[0030] In the formula, This represents the time-domain response signal in the target signal segment. This indicates the time period corresponding to the target signal segment, which represents the set of first time-domain response signals acquired after the peak time.
[0031] In conjunction with the first aspect, in some optional implementations, the frequency domain features include characteristic frequency, harmonic amplitude ratio, and wavelet packet energy;
[0032] Based on the first time-domain response signal, frequency-domain features are extracted from the first time-domain response signal to obtain the first frequency-domain features, including:
[0033] Perform a Fourier transform on the first time-domain response signal to obtain the frequency-domain signal corresponding to the first time-domain response signal;
[0034] The characteristic frequency is determined based on the frequency domain signal;
[0035] The harmonic amplitude ratio is determined based on the characteristic frequency;
[0036] The first time-domain signal is decomposed into wavelet packets, and the wavelet packet energy is determined based on the wavelet packet decomposition.
[0037] In conjunction with the first aspect, in some alternative embodiments, before acquiring the first time-domain response signal obtained by scanning the defect sample using an array sensor, the method further includes:
[0038] Using a preset parameter tuning strategy, the optimal solution of the excitation parameters of the array sensor is determined from the preset parameter range and used as the target excitation parameters;
[0039] Acquiring the first time-domain response signal obtained by scanning defect samples using an array sensor includes:
[0040] The first time-domain response signal is obtained by running the array sensor with the target excitation parameters and scanning the defect sample.
[0041] In conjunction with the first aspect, in some optional implementations, the excitation parameters include pulse frequency, pulse amplitude, duty cycle, and rise time;
[0042] Using a preset parameter tuning strategy, the optimal solution for the excitation parameters of the array sensor is determined from a preset parameter range, and this solution is used as the target excitation parameters, including:
[0043] Based on the excitation parameters, determine the objective function and constraints;
[0044] Based on the objective function and the constraints, samples that satisfy the objective function and the constraints are selected from the preset parameter range as the objective excitation parameters.
[0045] In conjunction with the first aspect, in some optional implementations, based on the objective function and the constraints, selecting samples from the preset parameter range that satisfy the objective function and the constraints as the target excitation parameters includes:
[0046] Initialize the number of samples and generate an initial sample set based on the number of samples. Each sample in the initial sample set includes the values corresponding to the pulse frequency, the pulse amplitude, the duty cycle, and the rise time.
[0047] Based on the dominance relationship between any two samples, the initial sample set is iteratively divided into multiple subsets, and the multiple subsets are sorted according to the order of iteration.
[0048] Based on the objective function, determine the crowding degree of each sample within the subset in which the sample is located;
[0049] Based on the crowding level and the order of the multiple subsets, multiple samples are repeatedly selected from the initial sample set to serve as the parent population, wherein the number of samples in the parent population is the same as the number of samples in the initial sample set.
[0050] The multiple samples in the parent population are randomly divided into pairs of the initial number of samples / 2 sample pairs;
[0051] Based on the sample pair, generate the corresponding sample sub-pair;
[0052] The sample pairs are randomly mutated to obtain the offspring population;
[0053] The parent population and the offspring population are merged into a target population, and the target population is used as a new initial sample set. The process of iteratively dividing the initial sample set into multiple subsets according to the dominance relationship between any two samples, sorting the multiple subsets in the order of iteration, merging the parent population and the offspring population into a target population, and using the target population as a new initial sample set is repeated until a preset convergence condition is met.
[0054] In the last iteration, the samples from the top-ranked subset of the subsets are taken as the target sample set, and target samples are selected from the target sample set according to the objective function and the constraints, which are then used as the target excitation parameters.
[0055] Secondly, embodiments of this application also provide an electronic device, which includes a processor and a memory coupled to each other. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device performs the above-described method.
[0056] Thirdly, embodiments of this application also provide a computer program product, including a computer program that implements the above-described method when executed by a processor.
[0057] The invention employing the above technical solution has the following advantages:
[0058] In the technical solution provided in this application, a first time-domain response signal obtained by scanning a defect sample using an array sensor is first acquired, and features are extracted from the first time-domain response signal to obtain the first time-domain features and the first frequency-domain features corresponding to the first time-domain response signal. Then, a dataset is constructed based on the first time-domain features and the first frequency-domain features of multiple defect samples, and an initial defect detection model is trained using the dataset to obtain a target defect detection model. Next, a second time-domain response signal obtained by scanning the sample to be inspected using an array sensor is acquired, and features are extracted from the second time-domain response signal to obtain the second time-domain features and the second frequency-domain features corresponding to the second time-domain response signal. Finally, based on the second time-domain features and the second frequency-domain features, the target defect detection model is used to identify the defect type and size of the sample to be inspected, which is taken as the defect detection result. Thus, by scanning a conductive material sample with defects using an array of sensors and training a target defect detection model based on this, the target defect detection model can be used to detect minute defects in conductive materials, improving the problem in traditional conductive material minute defect detection where the resolution of a single sensor is insufficient, leading to the neglect of minute defect areas and inaccurate minute defect detection. Attached Figure Description
[0059] This application can be further illustrated by the non-limiting embodiments given in the accompanying drawings. It should be understood that the following drawings only illustrate some embodiments of this application and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained from these drawings without any inventive effort.
[0060] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0061] Figure 2 This is a flowchart illustrating the defect detection method based on array sensing provided in an embodiment of this application.
[0062] Icons: 100 - Electronic device; 101 - Processor; 102 - Memory. Detailed Implementation
[0063] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that similar or identical parts are referred to by the same reference numerals in the drawings or description. Implementations not shown or described in the drawings are forms known to those skilled in the art. In the description of this application, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0064] Please refer to Figure 1This application provides an electronic device 100 that may include a processor 101 and a memory 102. The memory 102 stores a computer program, which, when executed by the processor 101, enables the electronic device 100 to perform corresponding steps in the following array-sensor-based defect detection method.
[0065] In this embodiment, the processor 101 can be an integrated circuit chip with signal processing capabilities. The processor 101 can be a general-purpose processor. For example, the processor 101 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0066] The memory 102 can be, but is not limited to, random access memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, etc. In this embodiment, the memory 102 can be used to store a first time-domain response signal, a first time-domain feature, a first frequency-domain feature, a dataset, a target defect detection model, a second time-domain signal, a second time-domain feature, a second frequency-domain feature, defect detection results, etc. Of course, the memory 102 can also be used to store a program, which the processor 101 executes after receiving an execution instruction.
[0067] Understandable Figure 1 The electronic device 100 shown is only a schematic diagram; the electronic device 100 may also include components that are more... Figure 1 More components are shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.
[0068] In this embodiment, the electronic device 100 can be a personal computer, laptop, cloud server, etc. It is used to acquire a first time-domain response signal obtained by scanning a defect sample using an array sensor, and to extract features from the first time-domain response signal to obtain first time-domain features and first frequency-domain features corresponding to the first time-domain response signal. Then, a dataset is constructed based on the first time-domain features and first frequency-domain features of multiple defect samples, and an initial defect detection model is trained using the dataset to obtain a trained initial defect detection model, which serves as the target defect detection model. Next, a second time-domain response signal obtained by scanning the sample to be inspected using an array sensor is acquired, and features are extracted from the second time-domain response signal to obtain second time-domain features and second frequency-domain features corresponding to the second time-domain response signal. Finally, based on the second time-domain features and second frequency-domain features, the target defect detection model is used to identify the defect type and size of the sample to be inspected, which serves as the defect detection result.
[0069] Please refer to Figure 2 This application also provides a defect detection method based on array sensing, which can be applied to the aforementioned electronic device 100, and the electronic device 100 executes or implements the steps of the method. The defect detection method based on array sensing may include the following steps:
[0070] Step 210: Obtain the first time-domain response signal obtained by scanning the defect sample using an array sensor;
[0071] Step 220: Perform feature extraction on the first time-domain response signal to obtain the first time-domain feature and the first frequency-domain feature corresponding to the first time-domain response signal;
[0072] Step 230: Construct a dataset based on the first time-domain features and the first frequency-domain features of the multiple defect samples;
[0073] Step 240: Use the dataset to train the initial defect detection model to obtain the trained initial defect detection model, which serves as the target defect detection model.
[0074] Step 250: Obtain the second time-domain response signal obtained by scanning the sample under test through the array sensor;
[0075] Step 260: Extract features from the second time-domain response signal to obtain the second time-domain features and the second frequency-domain features corresponding to the second time-domain response signal;
[0076] Step 270: Based on the second time-domain features and the second frequency-domain features, the target defect detection model is used to identify the defect type and size of the sample to be inspected, which are then used as the defect detection result.
[0077] In the above implementation, firstly, a first time-domain response signal obtained by scanning a defect sample using an array sensor is acquired, and features are extracted from the first time-domain response signal to obtain the first time-domain features and the first frequency-domain features corresponding to the first time-domain response signal. Then, a dataset is constructed based on the first time-domain features and the first frequency-domain features of multiple defect samples, and the initial defect detection model is trained using the dataset to obtain a target defect detection model. Next, a second time-domain response signal obtained by scanning the sample to be inspected using an array sensor is acquired, and features are extracted from the second time-domain response signal to obtain the second time-domain features and the second frequency-domain features corresponding to the second time-domain response signal. Finally, based on the second time-domain features and the second frequency-domain features, the target defect detection model is used to identify the defect type and size of the sample to be inspected, which is taken as the defect detection result. Thus, by scanning a conductive material sample with defects using an array of sensors and training a target defect detection model based on this, the target defect detection model can be used to detect minute defects in conductive materials. This improves upon the problem in traditional conductive material minute defect detection where the resolution of a single sensor is insufficient, leading to the neglect of minute defect areas and inaccurate minute defect detection.
[0078] The steps of the defect detection method based on array sensing will be described in detail below:
[0079] In step 210, to facilitate the implementation of the above method, in this embodiment, the electronic device 100 may further include a signal generator for generating an excitation signal, a power amplifier for amplifying the excitation signal to drive the coil, an eddy current sensor array (i.e., an array sensor) for exciting and receiving eddy current signals, a data receiving card for acquiring the voltage response signal of the receiving coil, a motion control platform for driving the array sensor to scan the sample at a uniform speed, and a lift-off control module for fixing the distance between the sensor and the sample. The coil shape, size, number of sensors (a single sensor typically consists of one excitation coil and one receiving coil), and arrangement of the array sensor can be calibrated individually in preliminary experiments based on the control variable method, according to user requirements; these details are not elaborated here.
[0080] In this embodiment, the first time-domain response signal refers to the response signals received sequentially by the data receiving card according to the acquisition time. The acquisition of the first time-domain response signal can be achieved during the testing phase, where the user pre-inputs and stores it in the memory 102 of the aforementioned electronic device 100, and then invokes it based on instructions issued by the user through the processor 101 during feature extraction and dataset construction. Alternatively, the acquisition of the first time-domain response signal can also be achieved during the application phase, where the array sensor scans defect samples in real time and receives them via the data acquisition card, then uploads them to the processor 101 for subsequent feature extraction and dataset construction. The specific method for acquiring the first time-domain response signal is not limited here.
[0081] Between step 210 and step 220, the method may further include:
[0082] The first time-domain response signal is preprocessed to obtain a preprocessed first time-domain response signal;
[0083] Feature extraction is performed on the first time-domain response signal to obtain the first time-domain feature and the first frequency-domain feature corresponding to the first time-domain response signal, including:
[0084] Feature extraction is performed on the preprocessed first time-domain response signal to obtain the first time-domain feature and the first frequency-domain feature corresponding to the preprocessed first time-domain response signal.
[0085] In this embodiment, preprocessing the first time-domain response signal to obtain a preprocessed first time-domain response signal may include:
[0086] The first time-domain response signal is subjected to wavelet threshold denoising to eliminate electromagnetic interference. Specifically, the db4 wavelet can be selected, decomposed into 3 layers, and soft threshold filtering is performed. The wavelet threshold denoising shown in this embodiment is a conventional technique in the field of data processing technology, and its specific processing procedure will not be described in detail here.
[0087] Baseline correction is performed on the first time-domain response signal after wavelet threshold denoising, thereby subtracting the signal mean of the defect-free region to achieve the technical effect of eliminating background noise.
[0088] In step 220, feature extraction is performed on the first time-domain response signal to obtain the first time-domain feature and the first frequency-domain feature corresponding to the first time-domain response signal, which may include:
[0089] Based on the first time-domain response signal, time-domain features are extracted from the first time-domain response signal to obtain the first time-domain features;
[0090] Based on the first time-domain response signal, frequency domain features are extracted from the first time-domain response signal to obtain the first frequency domain features.
[0091] In this embodiment, the time-domain feature may include at least one of the target peak value, peak time, and signal attenuation coefficient;
[0092] In this embodiment, extracting time-domain features from the first time-domain response signal to obtain the first time-domain features may include:
[0093] The maximum value in the first time domain response signal is taken as the target peak value, and the time at which the target peak value is located is determined as the peak time;
[0094] Based on the target signal segment, determine the exponential fitting model:
[0095] (1)
[0096] In the formula, This represents the time-domain response signal of the target signal segment after exponential fitting. Indicates time, Indicates the fitted amplitude. Indicates the baseline value. Indicates the signal attenuation coefficient;
[0097] Based on the target signal segment, the signal attenuation coefficient is solved using the least squares method:
[0098] (2)
[0099] In the formula, This represents the time-domain response signal in the target signal segment. This indicates the time period corresponding to the target signal segment, which represents the set of first time-domain response signals acquired after the peak time.
[0100] Understandably, the larger the diameter and depth of a defect in a conductive material (i.e., the defect sample), the stronger the eddy current disturbance, and the larger the corresponding target peak value. For example, a 3mm × 0.3mm defect typically has a target peak value of 0.8V, and a 0.5mm × 0.1mm defect typically has a target peak value of 0.2V. Peak time is the sampling time corresponding to the response signal reaching the target peak value. The signal attenuation coefficient is used to characterize the response speed of the defect. That is, the greater the eddy current energy loss and the faster the attenuation rate in the defect region, the larger the defect and the larger the signal attenuation coefficient. For example, a 0.3mm deep defect has a signal attenuation coefficient of approximately 0.02μs. -1 A defect with a depth of 0.1 mm has a signal attenuation coefficient of approximately 0.01 μs. -1 .
[0101] In this embodiment, the frequency domain features may include characteristic frequency, harmonic amplitude ratio, and wavelet packet energy;
[0102] In this embodiment, extracting frequency domain features from the first time domain response signal to obtain the first frequency domain features may include:
[0103] Perform a Fourier transform on the first time-domain response signal to obtain the frequency-domain signal corresponding to the first time-domain response signal;
[0104] The characteristic frequency is determined based on the frequency domain signal;
[0105] The harmonic amplitude ratio is determined based on the characteristic frequency;
[0106] The first time-domain signal is decomposed into wavelet packets, and the wavelet packet energy is determined based on the wavelet packet decomposition.
[0107] In this embodiment, the first time-domain response signal is first subjected to a Fourier transform to obtain the frequency-domain signal. Then, based on the frequency-domain signal, the characteristic frequency is determined:
[0108] (3)
[0109] In the formula, This represents the characteristic frequency, which is the frequency with the largest amplitude in the frequency domain signal. This represents the frequency value at the k-th frequency point. This represents a frequency domain signal.
[0110] Then, based on the characteristic frequency, determine the harmonic amplitude ratio:
[0111] (4)
[0112] (5)
[0113] In the formula, Represents characteristic frequency The amplitude in the frequency domain at that point, Indicates twice the characteristic frequency The frequency domain amplitude at that point.
[0114] The larger the defect, the stronger the eddy current disturbance in the low-frequency range. The smaller the size. For example, for a 3mm defect, Approximately 2kHz; for a 0.5mm defect, The frequency is approximately 5 kHz. As the defect depth increases, the nonlinearity of the eddy current disturbance strengthens, the proportion of second harmonic energy increases, and the harmonic amplitude ratio increases positively with increasing defect depth. For example, at a defect depth of 0.33 mm, C is approximately 0.6; at a defect depth of 0.1 mm, C is approximately 0.2.
[0115] Then, the first time-domain signal is decomposed into four layers of wavelet packets, and the energy of the fourth layer high-frequency detail nodes (nodes 4 and 7, corresponding to the highest frequency band) is calculated as the wavelet packet energy:
[0116] (6)
[0117] In the formula, Represents the wavelet packet energy. Indicates sampling point time After wavelet packet decomposition, the largest time-domain coefficients are extracted from the 7th node of the 4th layer of the first time-domain signal. Among these, the eddy current disturbances of the minute defects are dominated by high-frequency components. This can enhance the distinction between minute defects and normal areas. For example, for a 0.5mm defect, the wavelet packet energy is approximately 0.05V. 2 • μs. In the defect-free state, the wavelet packet energy is approximately 0.05 V. 2 ·μs.
[0118] Thus, by extracting high-frequency detail features (energy values of high-frequency coefficients in the fourth layer) through wavelet packet decomposition (decomposition into 4 layers), the feature discrimination of small defects is enhanced, thereby improving the accuracy of subsequent small defect detection.
[0119] In step 230, multiple samples are scanned and feature extracted based on the aforementioned steps 210 and 220 to obtain the corresponding first time-domain features and first frequency-domain features, which are used as feature vectors.
[0120] For example, in this embodiment, the number of samples can be based on different types of defects (in this embodiment, four different diameters and three different depths are combined as an example, resulting in a total of 12 types of minute defects). The 12 types of minute defect samples are scanned 20 times sequentially, resulting in a total of 240 defect samples. Then, feature extraction is performed on the first time-domain response signal obtained from scanning the defect samples. Each defect sample yields a 1×7 feature vector composed of 3 time-domain features, 3 frequency-domain features, and 1 wavelet packet energy feature. Then, different defect types are assigned corresponding defect labels, including defect diameter (0.5 / 1 / 2 / 3 mm) and depth (0.1 / 0.2 / 0.3 mm), for a total of 12 label categories. The final dataset is obtained.
[0121] In step 240, after completing the dataset construction, this embodiment selects CNN (Convolutional Neural Network) as the basic structure to construct an initial defect detection model. The model input is the 1×7 feature vector from the aforementioned dataset. The network structure of the initial defect detection model can be: convolutional layer (32 3×1 convolutional kernels) → pooling layer (2×1 max pooling) → fully connected layer (64 neurons) → output layer (12 neurons, softmax activation).
[0122] After model construction is complete, this embodiment divides the dataset into training, validation, and test sets in a 7:1.5:1.5 ratio, and performs 50 rounds of iterative training until the loss does not decrease for three consecutive rounds when validated on the validation set. Adam is used as the optimizer during training, with a learning rate of 0.001 and cross-entropy loss as the loss function.
[0123] After training, classification accuracy (number of correctly identified samples in the test set / total number of samples in the test set), diameter recognition error (|detected diameter - actual diameter|), and depth recognition error (|detected depth - actual depth|) are used as evaluation metrics. For example, when the model achieves an accuracy ≥ 98%, a diameter error ≤ 0.1 mm, and a depth error ≤ 0.05 mm after training, meeting the requirements for identifying minute defects, the trained initial defect detection model is obtained and used as the target defect detection model.
[0124] In steps 250 and 260, for the sample to be inspected, the sample is scanned using an array sensor, and features are extracted from the obtained second time-domain response signal to obtain second time-domain features and second frequency-domain features. The method for acquiring the second time-domain response signal is the same as that in step 210. The methods for extracting the second time-domain features and second frequency-domain features are the same as those for extracting the first time-domain features and first frequency-domain features in step 220. The methods for acquiring the second time-domain response signal and extracting the second time-domain features and second frequency-domain features will not be described again here.
[0125] In step 270, after feature extraction is completed, the second time-domain feature and the second frequency-domain feature are input into the aforementioned target defect detection model. The defect type and size of the sample to be inspected are identified by the target defect detection model and used as the detection result.
[0126] As an optional implementation, before acquiring the first time-domain response signal obtained by scanning the defect sample using an array sensor, the method may further include:
[0127] Using a preset parameter tuning strategy, the optimal solution of the excitation parameters of the array sensor is determined from the preset parameter range and used as the target excitation parameters;
[0128] Acquiring the first time-domain response signal obtained by scanning a defect sample using an array sensor may include:
[0129] The first time-domain response signal is obtained by running the array sensor with the target excitation parameters and scanning the defect sample.
[0130] In this embodiment, the excitation parameters include pulse frequency, pulse amplitude, duty cycle, and rise time;
[0131] Using a preset parameter tuning strategy, the optimal solution for the excitation parameters of the array sensor is determined from a preset parameter range, and this solution is used as the target excitation parameter. This may include:
[0132] Based on the excitation parameters, determine the objective function and constraints;
[0133] Based on the objective function and the constraints, samples that satisfy the objective function and the constraints are selected from the preset parameter range as the objective excitation parameters.
[0134] In this embodiment, pulse frequency refers to the number of times the excitation pulse signal repeats per unit time, used to control the penetration depth (skin depth) of eddy currents in conductive materials. Pulse amplitude refers to the maximum voltage of the excitation pulse signal, used to determine the strength of the alternating magnetic field generated by the excitation coil, thus affecting the induction intensity of the eddy current. Duty cycle refers to the percentage of times the pulse signal is at a high level within a single pulse cycle, used to balance the energy accumulation of the excitation signal with signal stability. Rise time refers to the time required for the pulse signal to rise from a low level to a high level, reflecting the rate (steepness) of voltage change from low to high voltage.
[0135] In this embodiment, the objective function is determined based on the excitation parameters:
[0136] (7)
[0137] (8)
[0138] In the formula, Indicates the scanning speed. Indicates the signal-to-noise ratio. , , and These represent the pulse frequency, pulse amplitude, duty cycle, and rise time, respectively. In this embodiment, the larger the frequency, amplitude, and duty cycle, the larger v is (sufficient excitation energy and fast signal response); the longer the rise time, the smaller v is (slower signal rise, requiring a reduction in scan speed to avoid distortion). The larger the frequency and amplitude, the larger the SNR (stronger excitation signal and more obvious defect response); an excessively large duty cycle will lead to signal saturation and a decrease in SNR; an excessively short rise time will introduce interference and a decrease in SNR.
[0139] In this embodiment, through preliminary experiments, different parameters were used... and Based on the experimental data (e.g., v=6mm / s when x1=5kHz, x2=7V, SNR=28dB when x1=5kHz, x2=7V), two objective functions were fitted. In this embodiment, the objectives are to maximize the scanning speed and maximize the signal-to-noise ratio.
[0140] In this embodiment, constraints can also be determined based on excitation parameters. This is typically done in conjunction with industrial testing requirements. , , , .
[0141] In this embodiment, after determining the objective function and constraints, based on the objective function and constraints, selecting samples that satisfy the objective function and constraints from the preset parameter range as the target excitation parameters may include:
[0142] Initialize the number of samples and generate an initial sample set based on the number of samples. Each sample in the initial sample set includes the values corresponding to the pulse frequency, the pulse amplitude, the duty cycle, and the rise time.
[0143] Based on the dominance relationship between any two samples, the initial sample set is iteratively divided into multiple subsets, and the multiple subsets are sorted according to the order of iteration.
[0144] Based on the objective function, determine the crowding degree of each sample within the subset in which the sample is located;
[0145] Based on the crowding level and the order of the multiple subsets, multiple samples are repeatedly selected from the initial sample set to serve as the parent population, wherein the number of samples in the parent population is the same as the number of samples in the initial sample set.
[0146] The multiple samples in the parent population are randomly divided into pairs of the initial number of samples / 2 sample pairs;
[0147] Based on the sample pair, generate the corresponding sample sub-pair;
[0148] The sample pairs are randomly mutated to obtain the offspring population;
[0149] The parent population and the offspring population are merged into a target population, and the target population is used as a new initial sample set. The process of iteratively dividing the initial sample set into multiple subsets according to the dominance relationship between any two samples, sorting the multiple subsets in the order of iteration, merging the parent population and the offspring population into a target population, and using the target population as a new initial sample set is repeated until a preset convergence condition is met.
[0150] In the last iteration, the samples from the top-ranked subset of the subsets are taken as the target sample set, and target samples are selected from the target sample set according to the objective function and the constraints, which are then used as the target excitation parameters.
[0151] In this embodiment, the sample size is first initialized to N=50 (this number can be flexibly set according to user experience; too small a number may lead to local optima, while too large a number will increase the computational load). Then, the encoding method is determined to be real number encoding (because the decision variables are continuous values, real number encoding is more intuitive and accurate than binary encoding). The initial sample set in this embodiment can be generated using Latin hypercube sampling, producing 50 initial individuals. Each individual in the initial sample set is a 1×4 vector (i.e., [x1, x2, x3, x4], representing 4 decision variables), and each parameter in the vector is within its corresponding reasonable value range.
[0152] Then, based on the dominance relationship between any two samples in the initial sample set, the initial sample set is iteratively divided into multiple subsets, and these subsets are ordered according to the order of iteration. Specifically, when individual A satisfies... and When A dominates B, if the current individual is not dominated by any other individual in the population, then the current individual is a non-dominated solution and is assigned to the first subset. This represents the first objective function, which is the scanning speed; This represents the second objective function, namely the signal-to-noise ratio.
[0153] After clarifying the dominance relationships among the samples in the initial sample set, the samples are divided, where, for each individual... Calculate the dominance of this individual (i.e., the sample) in the initial sample set. Number of individuals And determine the initial sample set as Dominant set of individuals .like Then the individual It is assigned to the first subset. Then, in the second round of subset partitioning, each individual in the previously partitioned subset is traversed. The set it governs Each individual in ,make (i.e., individual) Decrement the dominated count by 1 and quickly search for non-dominated solutions. The corresponding individual The sample is assigned to the second subset. This process continues with the third, fourth, and so on, until all samples have been assigned to their respective subsets.
[0154] After partitioning the subsets, the crowding degree of each individual (i.e., each sample) within its subset is determined according to the objective function:
[0155] (9)
[0156] In the formula, Denotes the first objective function. Describes the second objective function. , Each represents an individual In the current subset, individuals Based on the objective function After sorting all individuals within this subset, and comparing them with adjacent individuals... Individual function values, , They represent the objective functions respectively. The maximum and minimum values within the current subset.
[0157] For example, suppose that in Front1 (Frontn is the nth subset), the range of v (scanning speed) is [5.2, 5.8] mm / s, and the range of SNR (signal-to-noise ratio) is [28, 30] dB; after individual i is sorted, the v values of adjacent individuals are 5.5 and 5.7, and the SNR values are 28.5 and 29.5, then: .
[0158] Then, two individuals A and B are randomly selected from the initial sample set. If A and B belong to different subsets: the individual with the smaller subset number is selected (e.g., A is in Front1, B is in Front2, select A); if A and B belong to the same subset: the individual with the higher crowding (e.g., A's...) is selected. B's (Choose A). Repeat 50 times to obtain 50 samples, which will be used as the parent population.
[0159] Then, multiple samples from the parent population are randomly divided into pairs of two, resulting in 25 pairs (the initial number of samples / 2). Each pair of samples... Generate corresponding sample sub-pairs :
[0160] (10)
[0161] In the formula, This represents the parameters related to the cross-distribution index. , Represents a random number within the range [0,1]. This represents the distribution index; the larger the index, the closer the sample pairs are to the original sample pair. If the values in the sample pairs exceed the range of this decision variable (e.g., ...), then the sample pairs are considered to be closer to the original sample pair. If ), then perform boundary truncation (i.e., set...). ).
[0162] For example, for sample pair A: [5.0, 7.0, 30, 3.0], B: [5.5, 6.5, 25, 3.5], u = 0.4 (≤ 0.5), then:
[0163] (11)
[0164] (12)
[0165] (13)
[0166] Calculate the other two parameters in sample subpair A in sequence to obtain the complete sample subpair A: [4.99, 6.99, 29.9, 3.01]. The calculation method for sample subpair B is the same as that for sample subpair A, referring to the above formula (10), which will not be elaborated here.
[0167] After determining the sample pairs, random mutation is performed on the sample pairs to obtain the offspring population. Specifically, this is done for each decision variable in each sample pair. Generate random numbers in the range [0,1]. ,like Then for Mutation:
[0168] (14)
[0169] (15)
[0170] In the formula, This represents the mutation probability and can be flexibly set according to user needs to control the mutation intensity. Represents the decision variable after mutation. , Let represent the maximum and minimum values of all decision variables within a sample subpair, respectively. This represents the variation distribution index, which can be flexibly set according to user needs. The larger the value, the smaller the variation. To ensure the validity of the decision variables (i.e., any one of pulse frequency, pulse amplitude, duty cycle, and rise time), if the mutated decision variables exceed a preset reasonable range, boundary truncation is performed. During the mutation process, the individuals (samples) to which the decision variables belong remain unchanged; only the values mutate, and the set of individuals with mutated values is used as the offspring population.
[0171] After determining the offspring population, the parent and offspring populations are merged into a target population, which is then used as the new initial sample set. This process is repeated, iteratively dividing the initial sample set into multiple subsets based on the dominance relationship between any two samples (with these subsets ordered according to the iteration sequence), and merging the parent and offspring populations into the target population, using the target population as the new initial sample set. This process continues until a preset convergence condition is met. The preset convergence condition can be that in the first subset (Front1) of five consecutive generations, the change in the objective function value of all individuals is less than or equal to a preset threshold (e.g., a change in scan speed less than or equal to 0.1 mm / s, a change in signal-to-noise ratio less than or equal to 0.5 dB), or the number of iterations reaches a preset maximum of 100 iterations.
[0172] After completing the population iteration, the samples in the top-ranked subset (Front1) from the multiple subsets obtained in the last iteration are taken as the target sample set. Target samples are then selected from this set based on the objective function and constraints to serve as target excitation parameters. The selection criteria prioritize samples with the highest signal-to-noise ratio, followed by those with a scan speed greater than or equal to 4 mm / s and a temperature less than or equal to 60°C. For example, if there are 12 samples in Front1 (i.e., 12 combinations of excitation parameters), the sample with the highest scan speed greater than or equal to 4 mm / s, temperature less than or equal to 60°C, and highest signal-to-noise ratio is selected as the target excitation parameter.
[0173] In this way, by selecting the optimal combination of excitation parameters, the efficiency and accuracy of defect identification can be improved.
[0174] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device described above can be referred to the corresponding steps in the aforementioned method, and will not be elaborated further here.
[0175] This application also provides a computer program product, including a computer program that, when executed by processor 101, implements the above-described array-sensor-based defect detection method.
[0176] Based on the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various implementation scenarios of this application.
[0177] In summary, this application provides a defect detection method, electronic device, and application product based on array sensing. In this technical solution, firstly, a first time-domain response signal obtained by scanning a defect sample using an array sensor is acquired, and features are extracted from the first time-domain response signal to obtain first time-domain features and first frequency-domain features corresponding to the first time-domain response signal. Then, a dataset is constructed based on the first time-domain features and first frequency-domain features of multiple defect samples, and an initial defect detection model is trained using the dataset to obtain a target defect detection model. Next, a second time-domain response signal obtained by scanning the sample to be inspected using an array sensor is acquired, and features are extracted from the second time-domain response signal to obtain second time-domain features and second frequency-domain features corresponding to the second time-domain response signal. Finally, based on the second time-domain features and second frequency-domain features, the target defect detection model is used to identify the defect type and size of the sample to be inspected, which are then used as the defect detection result. In this way, by scanning a conductive material sample with defects using an array of sensors, a target defect detection model is trained based on this data. This model is then used to detect minute defects in conductive materials, improving upon the problem in traditional conductive material minute defect detection where the resolution of a single sensor is insufficient, leading to the neglect of minute defect areas and inaccurate detection.
[0178] In the embodiments provided in this application, it should be understood that the disclosed methods can also be implemented in other ways. The method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a specified logical function. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0179] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An array-sensor-based defect detection method, characterized by, The method comprises: obtaining a first time domain response signal obtained by scanning a defect sample through an array sensor; extracting features of the first time domain response signal to obtain first time domain features and first frequency domain features corresponding to the first time domain response signal; constructing a data set according to the first time domain features and the first frequency domain features of a plurality of defect samples; training an initial defect detection model using the data set to obtain a trained initial defect detection model as a target defect detection model; obtaining a second time domain response signal obtained by scanning a sample to be detected through the array sensor; extracting features of the second time domain response signal to obtain second time domain features and second frequency domain features corresponding to the second time domain response signal; according to the second time domain features and the second frequency domain features, using the target defect detection model to identify the defect type and size of the sample to be detected as a defect detection result.
2. The method of claim 1, wherein, Between obtaining a first time domain response signal obtained by scanning a defect sample through an array sensor, and extracting features of the first time domain response signal to obtain first time domain features and first frequency domain features corresponding to the first time domain response signal, the method further comprises: preprocessing the first time domain response signal to obtain a preprocessed first time domain response signal; extracting features of the first time domain response signal to obtain first time domain features and first frequency domain features corresponding to the first time domain response signal, comprising: extracting features of the preprocessed first time domain response signal to obtain first time domain features and first frequency domain features corresponding to the preprocessed first time domain response signal.
3. The method of claim 1, wherein, extracting features of the first time domain response signal to obtain first time domain features and first frequency domain features corresponding to the first time domain response signal, comprising: extracting time domain features of the first time domain response signal according to the first time domain response signal to obtain the first time domain features; extracting frequency domain features of the first time domain response signal according to the first time domain response signal to obtain the first frequency domain features.
4. The method of claim 3, wherein, The time domain features include at least one of a target peak value, a peak time and a signal attenuation coefficient; extracting time domain features of the first time domain response signal according to the first time domain response signal to obtain the first time domain features, comprising: taking the maximum value in the first time domain response signal as the target peak value, and determining the time at which the target peak value is located as the peak time; determining an exponential fitting model based on a target signal segment: ; In the formula, denotes the time-domain response signal of the target signal segment after the exponential fitting, denotes time, denotes the fitting amplitude, denotes the baseline value, denotes the signal attenuation coefficient; solving the signal attenuation coefficient based on the target signal segment using the least square method: ; In the formula, denotes a time-domain response signal in the target signal segment, denotes a time period corresponding to the target signal segment, and the target signal segment represents a set of first time-domain response signals with the collection time after the peak time.
5. The method of claim 3, wherein, The frequency domain features include a characteristic frequency, a harmonic amplitude ratio and a wavelet packet energy; extracting frequency domain features of the first time domain response signal according to the first time domain response signal to obtain the first frequency domain features, comprising: performing Fourier transform on the first time domain response signal to obtain a frequency domain signal corresponding to the first time domain response signal; determining the characteristic frequency according to the frequency domain signal; determining the harmonic amplitude ratio according to the characteristic frequency; wavelet packet decomposition is performed on the first time domain signal, and the wavelet packet energy is determined according to the wavelet packet decomposition.
6. The method of claim 1, wherein, Before the first time domain response signal obtained by scanning the defect sample through the array sensor is acquired, the method further comprises: An optimal solution of the excitation parameter of the array sensor is determined from a preset parameter range as a target excitation parameter by using a preset parameter optimization strategy. The first time domain response signal obtained by scanning the defect sample through the array sensor is acquired, comprising: The first time domain response signal obtained by scanning the defect sample through the array sensor is acquired.
7. The method of claim 6, wherein, The excitation parameter comprises pulse frequency, pulse amplitude, duty cycle and rising edge time. An optimal solution of the excitation parameter of the array sensor is determined from a preset parameter range as a target excitation parameter by using a preset parameter optimization strategy, comprising: According to the excitation parameter, a target function and a constraint condition are determined. According to the target function and the constraint condition, samples meeting the target function and the constraint condition are screened from the preset parameter range as the target excitation parameter.
8. The method of claim 7, wherein, According to the target function and the constraint condition, samples meeting the target function and the constraint condition are screened from the preset parameter range as the target excitation parameter, comprising: The number of samples is initialized, and an initial sample set is generated based on the number of samples, each sample in the initial sample set comprising values corresponding to the pulse frequency, the pulse amplitude, the duty cycle and the rising edge time. According to the dominance relationship between any two samples, the initial sample set is iteratively divided into multiple subsets, and the multiple subsets are sorted in the order of iteration. According to the target function, the crowding degree of each sample in the subset where the sample is located is determined. According to the crowding degree and the order of the multiple subsets, multiple samples are repeatedly screened from the initial sample set as a parent population, and the number of samples in the parent population is the same as the initial number of samples. The multiple samples in the parent population are randomly divided into initial number of samples / 2 sample pairs. According to the sample pairs, sample sub-pairs corresponding to the sample pairs are generated. Random mutation is performed on the sample sub-pairs to obtain a child population. The parent population and the child population are combined into a target population, and the target population is taken as a new initial sample set, and the steps of iteratively dividing the initial sample set into multiple subsets according to the dominance relationship between any two samples, sorting the multiple subsets in the order of iteration, and combining the parent population and the child population into a target population, and taking the target population as a new initial sample set are repeated until a preset convergence condition is met. The multiple samples in the subset with the highest order in the multiple subsets in the last iteration are taken as a target sample set, and a target sample is screened from the target sample set as the target excitation parameter according to the target function and the constraint condition.
9. An electronic device, comprising: The electronic device comprises a processor and a memory coupled to each other, and the memory stores a computer program, which, when executed by the processor, causes the electronic device to perform the method of any one of claims 1-8.
10. A computer program product, characterised in that, A computer program which, when executed by a processor, implements the method of any one of claims 1-8.