Phased array ultrasonic detection model construction method and system and medium
By constructing a model in phased array ultrasonic detection, using COMSOL and XGBoost algorithms, the inaccurate quality evaluation problem caused by manual judgment is solved, high-precision and efficient defect detection is achieved, the impact of manual experience is reduced, and an automated and standardized detection method is provided.
Patent Information
- Application Number
- CN202510416735.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, phased array ultrasonic detection relies on manual judgment to reduce the accuracy of round blank quality evaluation, and the detection results lack consistency and reliability. The traditional detection methods are greatly affected by operator skills and experience, and the sample preparation cycle of low-speed samples is long.
The phased array ultrasonic probe model is constructed by COMSOL, and the waveform feature quantity is extracted through wavelet transform denoising and normalization processing. The XGBoost algorithm is used to evaluate the importance of features, establish a detection model, and perform model verification to achieve automated and standardized defect detection.
It significantly improves the accuracy and robustness of defect detection, reduces the dependence of manual experience, provides an automated and standardized solution, and improves the accuracy and stability of detection.
Smart Images

Figure CN120337650A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ultrasonic testing, and particularly relates to a method, a system and a medium for constructing a phased array ultrasonic testing model. Background Art
[0002] With the continuous progress of technology, non-destructive testing (NDT) technology has been more and more widely used in all walks of life. Especially in the fields of steel, aerospace, energy, etc., ensuring the quality and structural reliability of products has become an increasingly important issue for enterprises.
[0003] As an intermediate product of high-quality special steel, the internal quality of the large-section continuous casting round billet of special steel directly affects the final processing qualification rate of its products. Limited by the specifications (≥Ф500mm), weight (≥1.56m / t) and internal coarse-grained structure of the round billet, the traditional handheld flaw detection equipment is used to detect its internal quality. According to the detection waveform, the quality is judged based on manual experience, and the internal quality of the round billet is further determined according to the macro sample. Based on the above detection methods, there are the following disadvantages: First, the detection results of the handheld device are greatly affected by the skills and experience of the operator. Different operators may obtain different detection results, resulting in a decrease in the stability and reliability of the detection results; Second, the macro sample has the disadvantages of a long sample preparation period and complex operation processes. Therefore, the non-destructive testing technology of phased array ultrasonic testing is adopted in the existing technology. Compared with the traditional ultrasonic testing technology, phased array ultrasonic testing performs fast scanning and imaging electronically, improving the detection efficiency. In actual operation, the detection personnel can quickly scan each angle inside the object through the phased array ultrasonic equipment and view the detection data in real time, and can accurately locate the position and size of the defect, helping engineers make more scientific and rapid judgments.
[0004] However, when the phased array ultrasonic testing technology in the existing technology is used to detect the round billet, it still needs to make a manual judgment according to the detected defect data. There are certain problems in manual defect judgment: due to the differences in professional knowledge reserves, experience levels and personal judgment habits of different detection personnel, different judgment results may be given for the same batch of defect data, resulting in a lack of consistency and reliability in the detection results and unable to provide accurate and stable basis for the quality evaluation of the round billet. Summary of the Invention
[0005] In view of the problems in the existing technology, the present invention provides a method, a system and a medium for constructing a phased array ultrasonic testing model, which solves the problem of the decrease in the accuracy of the quality evaluation of the round billet caused by relying on manual judgment when using phased array ultrasonic testing in the existing technology.
[0006] The technical solution adopted by the present invention is as follows: In a first aspect, the present application provides a method for constructing a phased array ultrasonic detection model, including the following steps: Step S1: Preset a billet model under determined defect data; Step S2: Use COMSOL to construct an acquisition model of a phased array ultrasonic probe and set simulation parameters; Step S3: Establish a three-dimensional billet model under determined defect data in the acquisition model, set defect model parameters, and perform mesh division; Step S4: Collect ultrasonic echo signals of the billet model under corresponding defect conditions in the acquisition model, and extract corresponding waveform feature quantities; Step S5: Evaluate the importance of the extracted waveform feature quantities, sort the features according to the importance and the influence degree on defect prediction, establish a feature threshold, and perform screening of the sorted features; Step S6: Establish an initial simulation model, use the screened features to train the initial simulation model to obtain a detection model, and verify the detection model.
[0007] Preferably, in step S2, it includes the following steps: Step S2-1: Construct an acquisition model of a phased array ultrasonic probe; Step S2-2: Set boundary conditions of the phased array ultrasonic probe model, including: Piezoelectric domain boundary: Set the electrode polarization direction and apply an alternating voltage to the top surface; Acoustic-solid coupling boundary: Define the piezoelectric-backing layer interface as a fully constrained boundary and the piezoelectric-matching layer interface as a continuity boundary; Radiation boundary: Establish a spherical PML layer at the outer edge of the sound field, with a thickness ≥ 3 times the maximum wavelength.
[0008] Preferably, in step S4, it includes the following steps: Step S4-1: Use the acquisition model to collect ultrasonic echo signals under corresponding defect conditions, and perform denoising on the collected ultrasonic echo signals using wavelet transform; Step S4-2: Perform normalization processing on the signals after wavelet transform denoising; Step S4-3: Extract waveform feature quantities according to the preprocessed ultrasonic echo signals. The waveform feature quantities include the mean, variance, skewness coefficient, kurtosis coefficient, maximum value, minimum value, amplitude peak value, quadratic mean, amplitude coefficient, waveform coefficient, impact coefficient, margin coefficient, and energy of the signal.
[0009] Preferably, in step S4-1, it includes the following steps: Step S4-1-1: Perform multi-scale wavelet decomposition on the ultrasonic echo signals using Symlets wavelets to obtain wavelet coefficients at different scales. The formula for wavelet decomposition is:
[0010] Among them, is the original signal, is the wavelet basis function, a is the scale parameter for controlling the wavelet dilation, b is the translation parameter for controlling the wavelet position, is the wavelet coefficient; Step S4-1-2: Perform threshold processing on the wavelet coefficients to remove the coefficients corresponding to the noise; Adopt the hard threshold processing method:
[0011] Among them is the threshold, which is determined by unbiased risk estimation or the fixed threshold method; is the wavelet coefficient after threshold processing; Step S4-1-3: Use the wavelet coefficients after threshold processing for signal reconstruction to obtain the denoised ultrasonic echo signal:
[0012] Among them, is the normalization constant of the wavelet basis function.
[0013] Preferably, in step S4-2, perform normalization processing on the signal, and the normalization formula is:
[0014] Among them, is the denoised ultrasonic echo signal after normalization, is the mean value of the signal, is the standard deviation of the signal.
[0015] Preferably, in step S5, the feature importance evaluation is performed through the gain importance in the XGBoost algorithm, and the calculation formula for the gain is:
[0016] where g represents the first-order gradient of the loss function with respect to the model prediction value;
[0017] h represents the second-order derivative of the loss function with respect to the model prediction value;
[0018] Among them is the predicted value of the initial simulation model for the denoised ultrasonic echo signal after normalization; The calculation formula for the predicted value is:
[0019] Among them, is the output value of the k-th decision tree; K is the total number of decision trees; L and R respectively represent the left child node and the right child node, which are used to correspond to different sample sets and prediction values respectively; represents the regularization parameter.
[0020] Preferably, step S6 includes the following steps: Step S6-1: Divide the simulation data set into a training set and a test set; Step S6-2: Normalize the data to ensure that the feature scales of the training set and the test set are consistent; Step S6-3: Establish an initial simulation model, use the training set to train the initial simulation model to obtain a detection model, and use the test set to verify the accuracy and stability of the detection model.
[0021] Preferably, in step S6-3, the performance evaluation of the detection model is carried out by calculating the error rates of the training set and the test set, drawing a comparison chart of the prediction results and the actual values, and generating a confusion matrix to evaluate the accuracy of the model.
[0022] In a second aspect, the present application provides a phased array ultrasonic detection system based on machine learning, including: A parameter configuration module, which is used to build an acquisition model of billet defects based on the COMSOL platform and configure material properties, boundary conditions and excitation source parameters; A signal processing and feature extraction module, which is used to collect ultrasonic echo signals, complete denoising and normalization processing, and extract multi-dimensional waveform features; A feature screening module, which is used to evaluate the importance of features and screen key features to optimize the model input; A model construction and verification module, which is used to construct and train an initial simulation model, obtain a detection model and verify the performance of the detection model.
[0023] In a third aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium includes a stored program, wherein when the program runs, it controls the device where the computer-readable storage medium is located to execute the phased array ultrasonic detection model construction method described in the first aspect.
[0024] From the above technical solutions, it can be seen that the present invention has the following advantages: 1. Through a systematic process of combining simulation modeling and experimental data, the full-cycle optimization of billet defect detection is realized. Through feature importance screening and model verification, the accuracy and robustness of defect detection are significantly improved, while reducing the dependence on traditional manual experience, providing an automated and standardized solution for industrial non-destructive testing.
[0025] 2. By parametrically defining material properties and excitation sources (such as Hanning window modulated signals), the high consistency between the simulation model and the real physical scenario is ensured, avoiding the problem of model distortion caused by parameter simplification. The refined setting of boundary conditions (such as the difference in subsurface propagation speed) further improves the accuracy of ultrasonic propagation simulation, laying a reliable foundation for subsequent feature extraction.
[0026] 3. Wavelet transform denoising effectively filters out high-frequency noise and interference components in ultrasonic signals, retaining defect-related features; normalization eliminates the dimension difference and improves the model convergence efficiency. The extraction of multi-dimensional features (such as skewness coefficient, kurtosis coefficient, etc.) covers the time domain, frequency domain and statistical characteristics of the signal, providing more comprehensive information input for defect classification; Symlets wavelet basis has approximate symmetry and compact support, which is suitable for multi-scale decomposition of non-stationary ultrasonic signals; hard threshold processing dynamically determines the threshold through unbiased risk estimation, avoiding the problem of signal over-smoothing caused by traditional soft threshold. This method significantly reduces the noise energy while retaining defect features, improving the signal-to-noise ratio (SNR).
[0027] 4. Through Z-score normalization processing, the interference of signal amplitude fluctuations under different defect conditions on model training is eliminated, ensuring the unity of feature scales. The standardized data distribution better meets the input requirements of machine learning models, accelerating the convergence speed of gradient descent and reducing the risk of overfitting at the same time.
[0028] 5. The gain importance evaluation of XGBoost comprehensively considers the first-order gradient (g) and second-order derivative (h) of the feature to the loss function, and can quantify the contribution degree of the feature in model decision-making. By controlling overfitting through the regularization parameter (λ), key features highly relevant to defect prediction are screened out, reducing redundant calculations and improving the model efficiency and generalization ability.
[0029] 6. The independent division of the training set and the test set avoids model overfitting; the secondary normalization processing (normalizing the training set and the test set separately) prevents data leakage problems and ensures the objectivity of evaluation results. Through the model verification link, the accuracy and stability of the detection model can be quantified, providing credibility guarantee for actual industrial applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the present invention, the drawings required to be used in the description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0031] Figure 1 It is a schematic flow chart of the method for constructing a phased array ultrasonic detection model in the specific embodiment of the present invention; Figure 2 This is a comparison chart of the prediction results of the training set in the method for constructing a phased array ultrasonic detection model in the specific embodiment of the present invention; Figure 3 This is a comparison chart of the prediction results of the test set in the method for constructing a phased array ultrasonic detection model in the specific embodiment of the present invention; Figure 4 This is a schematic diagram of the classification accuracy of the training set of the phased array ultrasonic detection model construction method in the specific embodiment of the present invention for four types of labels; Figure 5 This is a schematic diagram of the classification accuracy of the test set of the phased array ultrasonic detection model construction method in the specific embodiment of the present invention for four types of labels. Specific Embodiment
[0032] In the following detailed description, various embodiments of the present disclosure will be more fully described. The present disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but rather the present disclosure should be understood to cover all adjustments, equivalents, and / or alternative solutions falling within the spirit and scope of the various embodiments of the present disclosure.
[0033] The following are some noun explanations in this solution to facilitate a better understanding of this solution: 1. COMSOL Multiphysics is a multi-physics field simulation software based on the finite element method, supporting multi-physics field coupling modeling and analysis such as electromagnetics, mechanics, acoustics, heat transfer, and fluid dynamics. Through modular design (such as the acoustics module and structural mechanics module), it realizes the physical field coupling simulation of complex systems and is widely used in industrial design, scientific research experiments, and engineering optimization. Its core advantages lie in the intuitive graphical interface and flexible mathematical modeling ability, allowing users to customize partial differential equations (PDEs) and boundary conditions, and is suitable for the dynamic process simulation in fields such as ultrasonic detection, micro-electromechanical systems (MEMS), and optical devices.
[0034] 2. Wavelet basis function The wavelet basis function (Wavelet Basis Function) is a mathematical function used for signal decomposition and reconstruction in wavelet transform, having the property of finite support (time-frequency localization), and can capture the time-domain and frequency-domain characteristics of signals simultaneously. Different from the sine basis function of Fourier transform, the wavelet basis realizes multi-resolution analysis (MRA) through scale stretching and translation operations. Common types include Haar, Daubechies, Symlets, etc. Its core applications include signal denoising, feature extraction, image compression, etc., and it is especially good at processing non-stationary signals (such as transient features in ultrasonic echoes).
[0035] 3. Symlets Wavelet Symlets Wavelet is a variant of the Daubechies wavelet family, with approximate symmetry and orthogonality. Its name comes from the combination of "Symmetric" and "Wavelet". While maintaining the properties of compact support and vanishing moments, the symmetry of Symlets reduces phase distortion during signal decomposition and is suitable for scenarios requiring high-fidelity reconstruction (such as ultrasonic signal processing). For example, the Sym4 wavelet can effectively balance noise suppression and defect feature retention in ultrasonic echo denoising and is commonly used in industrial non-destructive testing and biomedical signal analysis.
[0036] 4. Unbiased Risk Estimation (URE) Unbiased Risk Estimation (URE) is a threshold selection method based on statistical theory for the adaptive estimation of noise variance in wavelet denoising.
[0037] 5. Gain Importance is an indicator used in tree models such as XGBoost to evaluate the contribution of features to the model's prediction performance. It quantifies the importance of features by calculating the gain improvement of the loss function during the decision tree splitting process.
[0038] The present invention addresses the problems in the prior art and provides a method, system, and medium for constructing a phased array ultrasonic detection model, which solves the problem of the decline in the accuracy of round billet quality assessment caused by relying on manual judgment when using phased array ultrasonic detection in the prior art.
[0039] As an intermediate product of high-quality special steel, the internal quality of the large-section continuous casting round billet of special steel directly affects the final processing qualification rate of its products. Limited by the specifications (≥Ф500mm), weight (≥1.56m / t), and internal coarse-grained structure of the round billet, it is difficult to use automated combined flaw detection equipment to detect its internal quality. Therefore, the traditional handheld flaw detection equipment is used for detection. The quality of the round billet is judged based on the detection waveform and manual experience, and the internal quality of the round billet is further determined according to the macrostructure sample. Based on the above detection methods, the following disadvantages exist: First, the detection results of the handheld equipment are greatly affected by the skills and experience of the operator, and different operators may obtain different detection results, resulting in a decrease in the stability and reliability of the detection results; second, the macrostructure sample has disadvantages such as a long sample preparation cycle and complex operation processes.
[0040] As an advanced non-destructive testing technology, phased array ultrasonic testing is rapidly replacing traditional ultrasonic testing methods and becoming the new favorite in the industry with its characteristics of high efficiency, precision, and flexibility. Compared with traditional ultrasonic testing technology, the advantage of phased array ultrasonic testing is that it does not require a mechanically moving probe, but instead performs rapid scanning and imaging electronically, greatly improving the testing efficiency. In actual operation, the tester can quickly scan various angles inside the object through the phased array ultrasonic equipment and view the detection results in real time. This electronic scanning method not only improves the testing efficiency but also can accurately locate the position, size, and nature of the defects, helping engineers make more scientific judgments.
[0041] COMSOL Multiphysics is a powerful multi-physics simulation software that supports the coupled simulation of multiple physical fields and provides convenience for the modeling and analysis of complex systems. By using COMSOL for phased array ultrasonic testing simulation, engineers can pre-analyze the characteristics such as the position, size, type, and spatial distribution of internal defects at the billet stage. Through simulation, engineers can simulate ultrasonic beams with different detection angles, frequencies, and focal lengths, optimize the detection path and reflected echo pattern, and identify potential internal defect problems in advance, avoiding the rejection of products after processing and greatly improving the product qualification rate. XGBoost (Extreme Gradient Boosting) is an efficient gradient boosting algorithm that achieves accurate prediction of complex data by optimizing the loss function and regularization term.
[0042] Example 1: The present invention addresses the problems in the prior art and provides a method for constructing a phased array ultrasonic testing model, as Figure 1 shown, including the following steps: Step S1, preset a billet model under determined defect data; Step S2, use COMSOL to construct an acquisition model of a phased array ultrasonic probe and set the simulation parameters; In step S2, it includes the following steps: Step S2-1, construct an acquisition model of a phased array ultrasonic probe; Step S2-2, set the boundary conditions of the phased array ultrasonic probe model, including: Piezoelectric domain boundary: Set the electrode polarization direction and apply an alternating voltage to the top surface; Acoustic-solid coupling boundary: Define the piezoelectric-backing layer interface as a fully constrained boundary and the piezoelectric-matching layer interface as a continuity boundary; Radiation boundary: Establish a spherical PML layer at the outer edge of the sound field, with a thickness ≥ 3 times the maximum wavelength.
[0043] Step S3: Establish a three-dimensional model of the billet under the determined defect data in the initial simulation model, set the defect model parameters, and perform mesh division; Step S4: Collect the ultrasonic echo signals of the billet model under the corresponding defect conditions in the acquisition model, and extract the corresponding waveform feature quantities; Step S5: Evaluate the importance of the extracted waveform feature quantities, sort the features according to the importance and the influence degree on defect prediction, establish a feature threshold, and perform screening on the sorted features; Step S6: Establish an initial simulation model, use the screened features to train the initial simulation model to obtain a detection model, and verify the detection model.
[0044] Through a systematic process that combines simulation modeling and experimental data, the full-cycle optimization of billet defect detection is achieved. Through feature importance screening and model verification, the accuracy and robustness of defect detection are significantly improved, while reducing the dependence on traditional manual experience, providing an automated and standardized solution for industrial non-destructive testing.
[0045] The above solution has the following remarkable advantages: High precision and high efficiency: XGBoost performs a second-order Taylor expansion on the loss function. Compared with traditional first-order Taylor expansion methods, it can provide more accurate prediction results; XGBoost supports custom loss functions and can approximate various loss functions through second-order Taylor expansion, further improving the accuracy of the model. The high efficiency of phased array ultrasonic testing: The phased array ultrasonic testing technology uses multiple independent piezoelectric wafers arranged in a specific layout, and precisely controls the excitation timing of each wafer through software programming to achieve precise control and flexible scanning of the ultrasonic beam; the detection speed is fast, the sector scanning function is powerful, and it can perform multi-angle and multi-directional scanning on workpieces with large thickness or complex shapes without a complex scanning device or probe replacement, improving the detection efficiency.
[0046] Non-destructive and visual: The phased array ultrasonic testing technology is a non-destructive testing method that will not cause any damage to the billet, overcomes the shortcomings of traditional macroetching methods, and ensures the integrity of the billet and the safety of subsequent use. Phased array ultrasonic testing can present defects in an intuitive image manner, facilitating recording and repeated detection. Moreover, it can be combined with COMSOL simulation modeling to further simulate and predict the impact of defects on the billet performance, providing strong support for the quality control and optimization of the billet.
[0047] Intelligence and Automation: As a machine learning algorithm, the XGBoost algorithm can automatically learn patterns and features from data to achieve intelligent detection. By training and optimizing the XGBoost model, the accuracy and efficiency of detection can be further improved. The COMSOL simulation software can realize the automatic modeling and simulation analysis of the billet detection model, which not only improves work efficiency but also reduces the influence of human factors on the detection results, enhancing the accuracy and reliability of detection.
[0048] In this embodiment, the defect model parameters include material properties, boundary conditions, and excitation sources. The material properties include the density, elastic modulus, and Poisson's ratio of the billet. The boundary conditions include the specified velocities of ultrasonic waves propagating in the subsurface of the material, the specified velocity at the core of the material, and the specified velocity at the material defect. The excitation source is a sine wave signal modulated by a Hann window. Among them, the frequency, period, and propagation velocity of the excitation source are defined through the function editor of COMSOL. By parametrically defining the material properties and excitation sources (such as the Hann window modulated signal), the high consistency between the simulation model and the real physical scenario is ensured, avoiding the problem of model distortion caused by parameter simplification. The refined setting of the boundary conditions (such as the difference in subsurface propagation velocities) further improves the accuracy of ultrasonic wave propagation simulation, laying a reliable foundation for subsequent feature extraction.
[0049] In this embodiment, step S4 includes the following steps: Step S4-1: Use the acquisition model to acquire the ultrasonic echo signal under the corresponding defect conditions, and perform wavelet transform denoising on the acquired ultrasonic echo signal. Step S4-2: Normalize the signal after wavelet transform denoising. Step S4-3: Extract waveform feature quantities based on the preprocessed ultrasonic echo signal. The waveform feature quantities include the mean, mean square deviation, skewness coefficient, kurtosis coefficient, maximum value, minimum value, amplitude peak value, quadratic mean, amplitude coefficient, waveform coefficient, impact coefficient, margin coefficient, and energy of the signal.
[0050] Table 1
[0051] In this embodiment, in step S4-1, it includes the following steps: Step S4-1-1: Perform multi-scale wavelet decomposition on the ultrasonic echo signal using Symlets wavelets to obtain wavelet coefficients at different scales. The formula for wavelet decomposition is:
[0052] Among them, is the original signal, is the wavelet basis function, a is the scale parameter controlling the wavelet dilation, and b is the translation parameter controlling the wavelet position. are the wavelet coefficients; Step S4-1-2: Perform threshold processing on the wavelet coefficients to remove the coefficients corresponding to noise; Adopt the hard threshold processing method:
[0053] where is the threshold, determined by unbiased risk estimation or the fixed threshold method; are the wavelet coefficients after threshold processing; Step S4-1-3: Use the wavelet coefficients after threshold processing for signal reconstruction to obtain the denoised ultrasonic echo signal:
[0054] where, is the normalization constant of the wavelet basis function.
[0055] In this embodiment, in step S4-2, the signal is normalized, and the normalization formula is:
[0056] where, is the denoised ultrasonic echo signal after normalization, is the mean value of the signal, is the standard deviation of the signal.
[0057] Wavelet transform denoising effectively filters out high-frequency noise and interference components in the ultrasonic signal and retains defect-related features; normalization processing eliminates the dimensional difference and improves the model convergence efficiency. The extraction of multi-dimensional features (such as skewness coefficient, kurtosis coefficient, etc.) covers the time domain, frequency domain, and statistical characteristics of the signal, providing more comprehensive information input for defect classification; the Symlets wavelet basis has approximate symmetry and compact support, suitable for multi-scale decomposition of non-stationary ultrasonic signals; hard threshold processing dynamically determines the threshold through unbiased risk estimation, avoiding the problem of over-smoothing of the signal caused by the traditional soft threshold. This method significantly reduces the noise energy while retaining the defect features, improving the signal-to-noise ratio (SNR); Through Z-score normalization processing, the interference of signal amplitude fluctuations under different defect conditions on model training is eliminated, ensuring the unity of feature scales. The standardized data distribution better meets the input requirements of machine learning models, accelerating the convergence speed of gradient descent and reducing the risk of overfitting at the same time.
[0058] In this embodiment, in step S3, the feature importance evaluation is performed through the gain importance in the XGBoost algorithm, and the calculation formula of the gain is:
[0059] where g represents the first-order gradient of the loss function with respect to the model prediction value;
[0060] h represents the second derivative of the loss function with respect to the model prediction value;
[0061] where is the predicted value of the initial simulation model for the normalized denoised ultrasonic echo signal; The formula for calculating the predicted value is:
[0062] where, is the output value of the k-th decision tree; K is the total number of decision trees; L and R represent the left child node and the right child node respectively, which are used to correspond to different sample sets and predicted values; represents the regularization parameter.
[0063] The gain importance evaluation of XGBoost comprehensively considers the first-order gradient (g) and the second derivative (h) of the feature with respect to the loss function, and can quantify the contribution degree of the feature in the model decision-making. Through the regularization parameter ( ), overfitting is controlled, key features highly relevant to defect prediction are screened out, redundant calculations are reduced, and the model efficiency and generalization ability are improved.
[0064] Robust feature weights are adjusted by the second derivative: ; Higher penalty weights are assigned to defect samples, and the loss function L is defined as:
[0065] The custom loss function needs to provide the first-order gradient g and the second derivative h: where
[0066] where α is the loss weight of the defect sample, β is the loss weight of the normal sample. y represents the true label, p represents the predicted probability. Through the second-order Taylor expansion, the model can more accurately optimize the fitting of the defect sample, thereby screening out features strongly related to defects (such as skewness coefficient, impact coefficient).
[0067] Model parameter settings. The number of iterations (or the number of trees) of the XGBoost model is 500; the objective function of the XGBoost model is specified as linear regression; the maximum depth of each tree is set to 5; the learning rate is set to 0.1; and the number of classes in the dataset is calculated.
[0068] In this embodiment, step S6 includes the following steps: Step S6-1: Divide the simulation dataset into a training set and a test set; Step S6-2: Normalize the data to ensure that the feature scales of the training set and the test set are consistent; Step S6-3: Establish an initial simulation model, train the initial simulation model using the training set to obtain a detection model, and verify the accuracy and stability of the detection model using the test set.
[0069] In this embodiment, in step S6-3, the performance evaluation of the detection model is performed by calculating the error rates of the training set and the test set, plotting a comparison graph of the prediction results and the actual values, and generating a confusion matrix to evaluate the accuracy of the model.
[0070] The independent division of the training set and the test set avoids overfitting of the model; the secondary normalization process (normalizing the training set and the test set separately) prevents data leakage problems and ensures the objectivity of the evaluation results. Through the model verification link, the accuracy and stability of the detection model can be quantified, providing a credibility guarantee for actual industrial applications.
[0071] Call the xgboost_train function, passing in the features of the training data, the labels of the training data, the model parameters, and the number of trees to be trained, to train an XGBoost model. After training, the trained model is stored in the model variable; use the trained XGBoost model to make predictions on the training data and the test data, and store the prediction results in the corresponding variables respectively; sort the labels of the training data and the test data, and rearrange the prediction results according to the sorting index to maintain data consistency.
[0072] Performance evaluation. Calculate the error rates of the model on the training data and the test data, plot a comparison graph of the prediction results and the actual values of the training set and the test set in MATLAB, and visually display the prediction performance of the model through the graph, such as Figure 2 、 Figure 3 As shown, the prediction accuracies of the training set and the test set are 98.75% and 94.87% respectively.
[0073] Confusion matrix. Generate and visualize the confusion matrices of the training set and the test set in MATLAB, such as Figure 4 、 Figure 5As shown in the figure. The classification accuracies of the training set and the test set for the four types of labels are 100%, 100%, 100%, 95.6% and 96.7%, 94.1%, 92.9%, 96.0% respectively.
[0074] Embodiment 2: This application provides a phased array ultrasonic detection system based on machine learning, including: A parameter configuration module, which is used to build an acquisition model of billet defects based on the COMSOL platform and configure material properties, boundary conditions, and excitation source parameters; A signal processing and feature extraction module, which is used to collect ultrasonic echo signals, complete denoising and normalization processing, and extract multi-dimensional waveform features; A feature screening module, which is used to evaluate feature importance and screen key features to optimize the model input; A model construction and verification module, which is used to construct and train an initial simulation model, obtain a detection model, and verify the performance of the detection model.
[0075] Embodiment 3: This application provides a computer-readable storage medium. The computer-readable storage medium includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute the phased array ultrasonic detection model construction method described in Embodiment 1.
[0076] It can be understood that the systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a personal digital assistant, a tablet computer, a wearable device, or a combination of any several of these devices.
[0077] It should also be noted that the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity, or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, commodity, or device. Without further limitations, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, commodity, or device including the said element.
[0078] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0079] The terms used in one or more embodiments of this specification are for the purpose of describing particular embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0080] It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "upon" or "in response to determining".
[0081] The above are only the preferred embodiments of one or more embodiments of this specification and are not intended to limit one or more embodiments of this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included within the scope of protection of one or more embodiments of this specification.
Claims
1. A method for constructing a phased array ultrasonic detection model, characterized in that It includes the following steps: Step S1: Preset a billet model under determined defect data; Step S2: Use COMSOL to construct an acquisition model of a phased array ultrasonic probe and set simulation parameters; Step S3: Establish a three-dimensional billet model under determined defect data in the acquisition model, set defect model parameters, and perform mesh division; Step S4: Collect ultrasonic echo signals of the billet model under corresponding defect conditions in the acquisition model, and extract corresponding waveform feature quantities; Step S5: Conduct importance evaluation on the extracted waveform feature quantities, sort the features according to the importance and the influence degree on defect prediction, establish a feature threshold, and perform screening of the sorted features; Step S6: Establish an initial simulation model, use the screened features to train the initial simulation model to obtain a detection model, and verify the detection model.
2. The phased array ultrasonic testing model construction method according to claim 1, wherein In step S2, it includes the following steps: Step S2-1: Construct an acquisition model of a phased array ultrasonic probe; Step S2-2: Set boundary conditions of the phased array ultrasonic probe model, including: Piezoelectric domain boundary: Set the electrode polarization direction and apply an alternating voltage to the top surface; Acoustic-solid coupling boundary: Define the piezoelectric-backing layer interface as a fully constrained boundary and the piezoelectric-matching layer interface as a continuity boundary; Radiation boundary: Establish a spherical PML layer at the outer edge of the sound field, with a thickness ≥ 3 times the maximum wavelength.
3. The phased array ultrasonic detection model construction method according to claim 1, characterized in that In step S4, it includes the following steps: Step S4-1: Use the acquisition model to collect ultrasonic echo signals under corresponding defect conditions, and perform wavelet transform denoising on the collected ultrasonic echo signals; Step S4-2: Perform normalization processing on the signals after wavelet transform denoising; Step S4-3: Extract waveform feature quantities according to the preprocessed ultrasonic echo signals. The waveform feature quantities include the mean, mean square deviation, skewness coefficient, kurtosis coefficient, maximum value, minimum value, amplitude peak value, quadratic mean, amplitude coefficient, waveform coefficient, impact coefficient, margin coefficient, and energy of the signal.
4. The method for constructing a phased array ultrasonic detection model according to claim 3, wherein In step S4-1, it includes the following steps: Step S4-1-1: Perform multi-scale wavelet decomposition on the ultrasonic echo signals using Symlets wavelets to obtain wavelet coefficients at different scales. The formula for wavelet decomposition is: Among them, is the original signal, is the wavelet basis function, a is the scale parameter controlling the wavelet dilation, b is the translation parameter controlling the wavelet position, is the wavelet coefficient; Step S4-1-2: Perform threshold processing on the wavelet coefficients to remove the coefficients corresponding to noise; Adopt the hard threshold processing method: Among them is the threshold value, which is determined by unbiased risk estimation or the fixed threshold method; are the wavelet coefficients after threshold processing; Step S4-1-3: Use the wavelet coefficients after threshold processing to perform signal reconstruction to obtain the denoised ultrasonic echo signals: Among them, is the normalization constant of the wavelet basis function.
5. The phased array ultrasonic testing model construction method according to claim 4, characterized in that In step S4-2, the normalization formula for signal normalization is: Among them, is the denoised ultrasonic echo signal after normalization, is the mean value of the signal, is the standard deviation of the signal.
6. The method for constructing a phased array ultrasonic detection model according to claim 5, wherein In step S5, the feature importance evaluation is carried out through the gain importance in the XGBoost algorithm. The formula for gain is: where g represents the first-order gradient of the loss function with respect to the model prediction value; h represents the second-order derivative of the loss function with respect to the model prediction value; Among them is the predicted value of the initial simulation model for the normalized denoised ultrasonic echo signal; The formula for the prediction value is: Among them, is the output value of the k-th decision tree; K is the total number of decision trees; L and R respectively represent the left child node and the right child node, which are used to correspond to different sample sets and prediction values respectively; Denotes the regularization parameter.
7. The method for constructing a phased array ultrasonic detection model according to claim 1, wherein Step S6 includes the following steps: Step S6-1: Divide the simulation data set into a training set and a test set; Step S6-2: Perform normalization processing on the data to ensure that the feature scales of the training set and the test set are consistent; Step S6-3: Establish an initial simulation model, train the initial simulation model using the training set to obtain a detection model, and verify the accuracy and stability of the detection model using the test set.
8. The method for constructing a phased array ultrasonic detection model according to claim 7, wherein In step S6-3, the performance evaluation of the detection model is carried out by calculating the error rates of the training set and the test set, plotting the comparison graph between the predicted results and the actual values, and generating a confusion matrix to evaluate the accuracy of the model.
9. A phased array ultrasonic testing system based on machine learning, characterized in that It includes: A parameter configuration module for constructing an acquisition model of billet defects based on the COMSOL platform and configuring material properties, boundary conditions, and excitation source parameters; A signal processing and feature extraction module for collecting ultrasonic echo signals, performing denoising and normalization processing, and extracting multi-dimensional waveform features; A feature screening module for evaluating feature importance and screening key features to optimize the model input; A model construction and verification module for constructing and training an initial simulation model to obtain a detection model and verifying the performance of the detection model.
10. A computer-readable storage medium, characterized in that, A computer-readable storage medium includes a stored program, wherein, when the program runs, it controls the device where the computer-readable storage medium is located to execute the phased array ultrasonic detection model construction method described in any one of claims 1-8.