Material grain size distribution deep learning ultrasonic measurement method based on signal multimode space coding

Through a deep learning method based on signal multimode spatial encoding, combined with ultrasonic C-sweep and metallographic experimental data, high-precision prediction of the grain size distribution of metal materials is achieved, the efficiency and destructive problems of traditional methods are solved, and the possibility of transfer learning is provided.

CN120162649APending Publication Date: 2025-06-17BEIJING INST OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510261751.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

Traditional grain size measurement methods are time-consuming, inefficient and destructive, and cannot meet the demand for rapid detection and precise positioning of dimension defects in industrial scenarios. Existing machine learning methods have test specificity in practical applications, are sensitive to material types, geometry and ultrasonic signal characteristics, and cannot fully utilize the information in ultrasonic signals.

Method used

A deep learning prediction method for material grain size distribution based on signal multimode spatial encoding is proposed. Ultrasonic characteristic signals are collected through ultrasonic C scan, combined with metallographic experimental data, and spatial information is collected using elliptical distribution, preprocessing and feature extraction, and a deep learning model of compressed sensing network and fully connected network is constructed, spatial fusion and log-normal distribution comparison are performed to achieve high-precision prediction.

Benefits of technology

High-precision prediction and high-efficiency calculation of the grain size distribution of metal materials are realized. The intermediate network trained by the model can be used for transfer learning of other material characterization tasks, solving the shortcomings of traditional methods and existing data-driven methods in grain size measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120162649A_ABST
    Figure CN120162649A_ABST
Patent Text Reader

Abstract

The invention discloses a material grain size distribution deep learning prediction method based on multi-mode space signal coding, which comprises the following steps: firstly, collecting ultrasonic characteristic signals based on a pulse echo method, collecting space distribution signals as a single-point grain characterization characteristic set by using elliptical distribution by taking a collection point as a center, preprocessing the collection signals to extract characteristics, and carrying out multi-mode space signal coding; feature compression extraction is carried out through a detection model by using a compressed sensing network, material grain size distribution and detection point material thickness are predicted by using a full-connection network, and finally a mean value and a variance of grain size distribution are obtained through comprehensive calculation of detection point prediction results in an elliptical region by using a space fusion method. According to the method, high-precision prediction and high-efficiency calculation of grain size distribution of the metal material are realized, an intermediate network of model training is expected to be used for transfer learning of characterization tasks of other materials, and many problems of a traditional method and an existing data driving method in the aspect of grain size measurement are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of material characterization, and particularly to a deep learning prediction method for the grain size distribution of materials based on signal multi-mode space coding. Background Art

[0002] The grain size, as a key microstructure parameter of metallic materials, plays a crucial role in the properties of materials. In terms of mechanical properties, it is directly related to the strength, toughness and plasticity of materials, affecting the performance of materials when subjected to external forces; in terms of electrical properties, thermal properties and corrosion resistance, the grain size also has an influential role that cannot be ignored. Therefore, accurately measuring and controlling the grain size is of extremely important significance for the in-depth research of materials science, the effective implementation of engineering applications, and the smooth progress of industrial production.

[0003] In the traditional field of grain size measurement, methods such as metallography, scanning electron microscopy (SEM) and electron backscatter diffraction (EBSD) play important roles. With their high-precision characteristics, these methods have played important roles in material research. However, they also have many drawbacks, among which the most prominent ones are time-consuming, low efficiency and destructiveness. In industrial scenarios, such as the processing of superalloy smelting and additive manufacturing of complex parts, rapid detection of grains is required, and size defects need to be accurately located. Obviously, traditional methods cannot meet these requirements.

[0004] With the development of technology, ultrasonic signals have begun to be applied in the field of material characterization due to their unique properties, especially showing great potential in grain size measurement. Ultrasonic signals can penetrate a variety of materials and can sensitively capture subtle changes in the microstructure. Their advantages of non-destructiveness, high spatial resolution, strong real-time performance and simple operation well make up for the deficiencies of traditional material characterization methods and have become a newly emerging material characterization method that has received wide attention.

[0005] In the research of grain size measurement using ultrasonic signals, the currently common methods are mainly divided into theoretical calculation methods based on physical models and machine learning methods based on data-driven approaches. Physical model methods, such as the attenuation method, the sound velocity method, the center frequency method, etc., are based on the propagation characteristics of ultrasonic waves in materials. By analyzing characteristic parameters of ultrasonic signals such as attenuation, phase velocity, and spectrum, the calculation formula for grain size is derived. This method has high theoretical accuracy, but there are many problems in practical applications. Its characterization results have strong assumption dependence and material specificity, which means that its generality is poor under different materials or different process conditions. Moreover, these methods require high accuracy of input parameters. Once there are deviations in the input parameters, it may lead to large errors in the results. More critically, physical model methods cannot fully utilize the rich information in ultrasonic signals, and their output has limited ability to characterize materials. For example, important information such as the distribution and orientation of grain size cannot be directly obtained.

[0006] Machine learning methods are another important research direction. It constructs the mapping relationship between grain size and ultrasonic signal characteristics through a large amount of ultrasonic signal data with the help of artificial intelligence technology, so as to realize the prediction of grain size. Machine learning methods do not rely on physical models but are data-driven, which enables them to have more powerful characterization capabilities as the sample space grows. At the same time, compared with traditional methods, machine learning models have the ability of task transfer and generalization. Through appropriate model structure design, multi-task characterization can be easily achieved. However, the current machine learning methods still have obvious limitations in practical applications. Specifically, they have strong experimental specificity and are highly sensitive to factors such as the material type, geometric shape of the specimen, and ultrasonic signal characteristics. Taking the material thickness as an example, in the process of grain detection, the material thickness is one of the key factors affecting ultrasonic attenuation and sound velocity measurement. Traditional physical model methods usually use the material thickness as prior knowledge for attenuation rate calculation, while in most machine learning methods, the influence of this factor on model learning is not fully considered. In the scenario of automated detection, the thickness of the monitoring point cannot be obtained in advance as prior information. If it is not incorporated into the model prediction target and constraint conditions, the applicable range of the model will be greatly limited. In addition, the existing machine learning methods are relatively sensitive to changes in input conditions. During the ultrasonic detection process, small changes in factors such as excitation parameters, coupling conditions, and material surface roughness will have a significant impact on the signal input intensity and signal-to-noise ratio, thereby leading to a decrease in model prediction accuracy and robustness, and affecting the reliability and stability of the model in the actual complex industrial environment. Summary of the Invention

[0007] In view of the various limitations of traditional methods and existing data-driven methods, the present invention proposes a deep learning prediction method for the grain size distribution of materials based on signal multimodal space coding that performs implicit space learning and expression of key material properties. It can comprehensively utilize ultrasonic signal information while achieving high-precision prediction and high-efficiency calculation of the grain size distribution of metal materials, and the intermediate network of model training is expected to be used for transfer learning of other material characterization tasks.

[0008] The present invention provides a deep learning prediction method for the grain size distribution of materials based on signal multimodal space coding, comprising the following steps:

[0009] A deep learning prediction method for the grain size distribution of materials based on signal multimodal space coding, comprising the following steps:

[0010] Step 1, perform ultrasonic C-scan on the material based on the pulse-echo method to collect n×m ultrasonic feature signals with uniform distribution;

[0011] Step 2, select s metallographic measurement regions, conduct metallographic experiments on the plane formed by the major axis of the ultrasonic propagation discovery and sampling ellipse regions to obtain label data of the logarithmic normal distribution of the grain size of the material, and pair it with the ultrasonic feature signals obtained in Step 1 to construct an original dataset;

[0012] Step 3, taking the center point of each metallographic measurement region selected in Step 2 as a reference, collect k signals in space using an elliptical distribution as a single-point grain characterization feature set, and label all ultrasonic signals within the ellipse with the same grain distribution label, that is, s×k ultrasonic signals in the original dataset constructed in Step 2 carry grain distribution labels;

[0013] Step 4, preprocess the s×k ultrasonic signals with grain distribution labels in Step 3 to obtain s×k time-frequency feature maps, and divide the obtained s×k time-frequency feature maps into a training set, a validation set, and a test set according to a ratio;

[0014] Step 5, construct a deep learning network, and use the training set in Step 4 to train the constructed deep learning network, then use the validation set to monitor the network training process, judge the network training effect and the timing of ending the training, and finally use the test set to test the generalization performance and the final effect of the model to obtain a deep learning network model;

[0015] Step 6, use the deep learning network model to predict the s×k time-frequency feature maps in Step 4, and perform spatial fusion on the k signals within the ellipse region to obtain the mean and standard deviation of the grain size distribution;

[0016] Step 7, based on the log-normal distribution, the grain size distribution obtained in step 6 is compared with the actual distribution, and whether the training effect and prediction accuracy of the deep learning network model obtained in step 5 meet the requirements is determined according to the comparison result. If both the training effect and the prediction accuracy meet the requirements, the deep learning network model obtained in step 5 is the detection model, and the weight parameters of the network training are output; otherwise, that is, either the training effect or the prediction accuracy is not satisfied, return to step 3, adjust the elliptical distribution size, preprocessing parameters, and deep learning network hyperparameters in the subsequent steps, until both the training effect and the prediction accuracy meet the requirements, obtain the detection model, and output the weight parameters of the network training;

[0017] Step 8, using the detection model obtained in step 7 to perform an ultrasonic C scan on the test area of ​​the test material to collect uniformly distributed ultrasonic characteristic signals;

[0018] Step 9, taking the center point of each ultrasonic characteristic signal obtained in step 8 as a reference, using an elliptical distribution to collect k signals in the space;

[0019] Step 10, preprocessing the k signals obtained in step 9 to obtain k time-frequency feature graphs;

[0020] Step 11, input the k time-frequency characteristic graphs obtained in step 10 into the detection model obtained in step 7 to obtain the material grain size distribution.

[0021] In step 2, the lognormal distribution P(D) is:

[0022]

[0023] Where D is the actual measured grain size, μ is the logarithmic mean of the size, and σ d is the logarithmic standard deviation of the size, is the mean of the measured value D, σ D is the standard deviation of the measured value D.

[0024] In step 4, preprocessing refers to first aligning the signal base wave, then filtering and denoising, and finally using wavelet transform to obtain the time-frequency feature map.

[0025] In step 4, the process of aligning the primary bottom wave of the signal is as follows:

[0026] Align the signals based on the zero-crossing point between the peak-to-peak values of the first bottom wave, and align the first bottom wave echo signal as the start of the signal. The specific alignment method is as follows: Use the autoregressive method to find the positive peak point of the signal in the time domain, and then extract the second peak as the first bottom wave echo signal. The first peak is the head wave signal on the upper surface of the material. Based on the zero-crossing point between the positive and negative peaks of the first bottom wave, shift forward by t time instants as the new signal start point. Normalize the shifted signal based on the absolute value of the current maximum amplitude to eliminate the influence caused by the difference in initial pulse energy.

[0027] In step 4, the method for filtering and noise reduction is as follows: Use a 4th-order Butterworth filter to perform band-pass filtering on the frequency band of the region of interest to effectively filter out the noise signals outside the target frequency band. Subsequently, use the db4 wavelet to perform soft threshold filtering, and set the threshold to a.

[0028] In step 4, the method for wavelet transform is as follows: Use the cgau8 wavelet to perform continuous wavelet transform to convert the filtered time-domain signal into a time-frequency signal. Split the obtained complex time-frequency diagram into two time-frequency diagrams, namely the amplitude time-frequency diagram and the phase time-frequency diagram. Among them, the size of each time-frequency diagram is m×n, where m represents the number of divisions in the frequency domain and n represents the number of scales in the time domain;

[0029]

[0030] where: x(t) is the original signal, Ψ * represents the complex conjugate of the wavelet function, a is the scale parameter, which controls the stretching of the wavelet, and b is the translation parameter, which controls the position of the wavelet;

[0031] a×f=F s ×wcf

[0032] where, F s is the sampling frequency, and wcf is the center frequency of the wavelet, which is determined by the wavelet family.

[0033] In step 5, the constructed deep learning network consists of a compressive sensing encoding part and a fully connected decoding part.

[0034] In step 5, constructing the deep learning network is divided into two parts: encoding and decoding. In the encoding part, design a compressive sensing network to continuously compress the pixel space, fuse the pixel space information, and finally represent the signal features through different channels, fully extracting the correlation information between different time-frequency blocks. The image feature extraction is based on a double convolutional layer. This layer does not change the size of the pixel space, but will further represent the features through channel changes, and then realize the compression process of the pixel space through the pooling layer;

[0035] According to the convolutional deformation formula:

[0036]

[0037] and the pooling transformation formula:

[0038]

[0039] where K is the size of the pooling window, S is the stride, and P is the padding size;

[0040] Design the convolutional kernel of the convolutional layer to be (3,3), the stride size to be (1,1), the convolutional kernel of the pooling layer to be (x,x), and the stride size to be (x,x). The pixel space will be compressed to 1 / x of the original. A double convolutional layer and a Pool layer form a compressive sensing block. Through the stacking of compressive sensing blocks, the pixel space is finally compressed into a single feature scalar;

[0041] In the decoding part, design a fully connected network to represent the material features. This representation process captures the conversion relationship from the ultrasonic signal to the material features and the correlation relationship between the features in the hidden layer;

[0042] Take the thickness representation as one of the prediction items for learning.

[0043] In step 5, the weighted loss function during training is:

[0044]

[0045] where: N is the batch size, and represent the predicted value and the true value of the i-th sample and the j-th feature respectively, and E is the number of features; label_weights (i) is the weight of the i-th sample;

[0046] Set the weight of the data with fewer samples to w1, and the rest to w2 by default, where w1 is greater than w2;

[0047] Use the Adam optimizer during training, with an initial learning rate of 0.001. Use CosineAnnealingLR to adjust the learning rate, set T_max to 32, set the maximum number of training epochs to n, and set an early stopping mechanism. When the validation set loss does not decrease for k consecutive epochs, stop training and save the training result of the model with the minimum validation set loss.

[0048] In step 6, the method of spatial fusion is:

[0049] Step 6-1, let the distance between any point in the elliptical region and the center point be x, and set the spatial distribution function to P(x). Then the expressions of the parameters of the final grain size distribution after spatial fusion are as follows:

[0050]

[0051] Among them, y represents the fused result, the detection result predicted by the detection model, and k is the number of discrete ultrasonic signal detection points included in the elliptical region;

[0052] In the said step 7, the method for comparison is:

[0053] Step 7-1, draw a histogram based on the log-normal distribution expression in step 2, observe the distribution overlap degree and calculate the KL divergence between the overlap curves. The KL divergence measures the difference between two probability distributions. The closer the KL divergence is to 0, the more similar the two distributions are, that is, the better the model training effect. Specifically, for the normal distribution, the KL divergence is calculated using the following formula:

[0054]

[0055] In the formula, we stipulate that p is the target distribution and q is the predicted distribution. Therefore, p corresponds to the expectation and standard deviation of μ p and σ p , and q corresponds to the expectation and standard deviation of μ q and σ q .

[0056] Step 7-2, verify the extraction effect of the model on the material thickness characteristics through the mean square error of the thickness prediction value.

[0057] Beneficial effects

[0058] The present invention obtains a large number of ultrasonic signals related to the surface spatial distribution through ultrasonic C-scan, and incorporates spatial information in the way of central point elliptical sampling, that is, expands the training sample data set, and at the same time incorporates spatial information into the detection model with higher confidence under full consideration of the metallographic experiment measurement conditions, and then performs metallographic fusion calculation on the prediction results within the metallographic measurement range of the same grain by the method of spatially distributed weighted expectation, further improving the accuracy and practicability of detection.

[0059] The present invention eliminates factors such as input energy difference and background noise through preprocessing, extracts the time-frequency diagram of selectable frequency bands and time domains using the cgau8 wavelet, and obtains a time-frequency feature data set with both amplitude and phase information expression, maximizing the extraction and retention of ultrasonic signal features related to grain measurement.

[0060] The present invention designs an encoder-decoder deep learning network model composed of a compressive sensing network and a fully connected network, combined with a specially designed WMSE loss function, which not only solves the detection requirements of signal coding and characterization, but also well solves the problem of data bias, and improves the generalization ability of the model.

[0061] The present invention proposes the idea of key material feature encoding in the network. By predicting the thickness, the network learns the relationship between material feature parameters that are difficult to obtain a priori and the characterization task in the latent space, which has great application value for the online detection of the model and the application of less a priori information in more actual scenarios.

[0062] The network encoding layer of the present invention abstractly expresses signal features. It can not only be used for the grain size characterization task, but also be further migrated and applied to other applications related to ultrasonic detection, such as thickness measurement, defect detection, etc. The prediction output quantity of the network decoding layer is not limited to the grain size of this task, and it can further characterize parameters such as the elastic modulus of the material. That is, the deep learning model designed by the present invention has extremely strong scene generalization ability and highly flexible adjustment ability, and has high practical value.

[0063] Based on the conclusion of the material grain size distribution of the lognormal distribution, the present invention designs a model test method based on the similarity of probability distributions, and uses the KL divergence to quantitatively express the similarity degree. Compared with the single-parameter result comparison of other methods, it comprehensively expresses the unified prediction effect of the model on the mean and standard deviation, and has more representative results.

[0064] The present invention discloses a deep learning prediction method for material grain size distribution based on multi-mode space signal encoding. First, it collects ultrasonic feature signals based on the pulse echo method, and uses an elliptical distribution to collect spatial distribution signals centered on the acquisition points as a single-point grain characterization feature set. It preprocesses the collected signals to extract features, then uses a detection model to first perform feature compression extraction using a compressive sensing network, and then uses a fully connected network to predict the material grain size distribution and the thickness of the material at the detection point. Finally, a spatial fusion method is used to comprehensively calculate the prediction results of the detection points within the elliptical region to obtain the mean and variance of the grain size distribution, realizing high-precision prediction and high-efficiency calculation of the metal material grain size distribution. Moreover, the intermediate network of model training is expected to be used for transfer learning of other material characterization tasks, solving many problems existing in the traditional method and the existing data-driven method in grain size measurement. Brief Description of the Drawings

[0065] Figure 1 It is a schematic diagram of the ultrasonic signal acquisition process of the present invention;

[0066] Figure 2 It is a 3D model structure diagram of the motion control system;

[0067] Figure 3 It is a schematic diagram of collecting ultrasonic A-scan signals, where (a) is the A-scan signal of the (50, 50) region; (b) is the four-time echo attenuation signal diagram of the four regions of (50, 50), (20, 50), (50, 20), and (20, 20);

[0068] Figure 4 Schematic diagram of the selection of metallographic experiment sites and the metallographic images of some sites

[0069] Figure 5 Schematic diagram of signal sampling based on elliptical spatial distribution

[0070] Figure 6 Schematic diagram of the signal preprocessing and feature extraction process and the processing effect

[0071] Figure 7 Schematic diagram of the network structure of the deep learning characterization model for the grain size of materials

[0072] Figure 8 Schematic diagram of the network training process

[0073] Figure 9 Comparison diagram of the lognormal distribution of the prediction effect of the detection model

[0074] Figure 10 Schematic diagram of the thickness prediction deviation Specific implementation manner

[0075] The present invention will be described in detail below with reference to the accompanying drawings and by way of examples.

[0076] The present invention proposes a deep learning prediction method for the grain size distribution of materials based on signal multi-mode space coding, which performs implicit space learning and expression of the key characteristics of materials. The core lies in: collecting ultrasonic feature signals near the area to be measured of the material based on the pulse echo method; taking the acquisition point as the center, collecting spatially distributed signals using an elliptical distribution as a single-point grain characterization feature set; preprocessing the acquired signals to extract features, first performing signal alignment, then filtering and denoising, and finally obtaining its time-frequency feature map using wavelet transform; passing the single-point features through a detection model to first perform feature compression and extraction using a compressive sensing network, then using a fully connected network to predict the grain size distribution of the material and the thickness of the material at the detection point, and finally using a spatial fusion method to comprehensively calculate the prediction results of all detection points within the elliptical region and finally obtain the mean and standard deviation of the grain size distribution.

[0077] It can be seen that the present invention has significant economy, representativeness and practicality through the physical model of ultrasonic material grain detection and signal attenuation, combined with experimental data and advanced deep learning technology. First, by selecting representative detection points for metallographic experiments and obtaining grain distribution data, not only the economy of the experiment is ensured, but also the representativeness of the data is guaranteed. In terms of signal processing, ultrasonic C-scan technology is used to obtain ultrasonic signals related to the spatial distribution of the surface, the training sample data set is expanded, and the spatial information is integrated into the detection model, further improving the accuracy and practicality of the detection. In order to eliminate the interference of input energy differences and background noise, CGAU8 wavelet is used to extract the time-frequency diagram, from which the amplitude and phase information are extracted to maximize the retention of ultrasonic signal characteristics related to grain measurement. This process significantly improves the reliability of the detection results.

[0078] In the design of the deep learning model, the present invention combines the compressed sensing network and the fully connected network, and adopts a specially designed WMSE loss function to solve the detection requirements of signal encoding and characterization, and effectively deal with the problem of data deviation, thereby improving the generalization ability of the model. In addition, the network uses the key material feature encoding idea to learn the relationship between material feature parameters and characterization tasks in the latent space, which greatly enhances the practical value of the model in online detection and applications with little prior information. This deep learning model can not only be used for grain size characterization, but also has the potential for migration applications in other ultrasonic testing fields (such as thickness measurement and defect detection). The output of the decoding layer is not limited to grain size, but can also further characterize parameters such as the elastic modulus of the material, reflecting the high flexibility and adaptability of the model in multiple scenarios.

[0079] Finally, based on the conclusion of grain size distribution of lognormal distribution, the present invention designs a model verification method based on probability distribution overlap. Compared with the single parameter comparison of the traditional method, it can more comprehensively reflect the prediction effect of the model on the mean and standard deviation, making the test results more representative. Overall, the technical solution designed by the present invention has strong innovation, broad application prospects and high practical value in the field of ultrasonic material testing.

[0080] Figure 1 It is an ultrasonic microscopic detection system. Based on this system, this example implements the material grain size deep learning method detection model construction and application implementation example for the additive material nickel-based alloy GH4099 test block, which specifically includes the following steps:

[0081] Step 1: Perform ultrasonic C scanning on the material based on the pulse echo method to collect evenly distributed n×m ultrasonic characteristic signals. The 3D model structure of the motion control system is as follows: Figure 2 shown.

[0082] In this embodiment, the object to be detected is four cubic specimens made of GH4099 with a thickness of 5 mm. Two of them have a length and width of 45 mm × 50 mm, and the other two have dimensions of 38 mm × 50 mm. Using the immersion ultrasonic microscopy system as shown in Figure 1 , ultrasonic C-scan of the material is performed based on the pulse-echo method to collect uniformly distributed ultrasonic signals. The probe frequency is 20 MHz, the scanning step distance is 0.5 mm, the ultrasonic signal acquisition time for each measurement point is 25 μs, and the sampling frequency is 100 MHz. For the specimens with dimensions of 45 mm × 50 mm, 90 × 100 sampling points can be obtained. The collected ultrasonic signals and their attenuation conditions are as shown in Figure 3 .

[0083] Step 2: Select s metallographic measurement regions, conduct metallographic experiments on the plane formed by the major axis of the ultrasonic propagation discovery and sampling ellipse regions, obtain the labeled data of the logarithmic normal distribution of the material grain size, and pair it with the ultrasonic characteristic signals obtained in Step 1 to construct the original dataset.

[0084] In this embodiment, as shown in Figure 4 , 30 metallographic measurement points are selected.

[0085] The metallographic sample preparation is carried out by mechanical grinding, polishing and etching. First, the metallographic surface is polished with 180#, 600#, 1000#, 1500#, 2000#, 3000# sandpapers, the metallographic specimen is polished to a mirror surface with diamond polishing paste, etched with a mixed solution of 10% concentration HCl and 2% FeCl2, and the sample is detected using an optical microscope. The grain size test obtained from the metallographic photos is measured by quantitative metallography method using Image-Pro-Plus software to determine the grain size for comparison with the grain size evaluation model.

[0086] For the grain distribution data obtained by metallography in the above examples, statistical conversion is performed based on the following logarithmic normal distribution formula.

[0087]

[0088] where D represents the actually measured grain size, μ is the mean value after logarithmic conversion of the size, σ d is the standard deviation after logarithmic conversion of the size, is the mean value of the measured value D, and σ D is the standard deviation of the measured value D.

[0089] The grain size labels of the last part of the region are shown in Table 1:

[0090] Table 1 Grain size labels of partial regions

[0091]

[0092] Step 3: Taking the center point of each metallographic measurement area selected in Step 2 as a reference, collect k signals in space using an elliptical distribution as a single-grain characterization feature set, and label all ultrasonic signals within the ellipse with the same grain distribution label. That is, there are s×k ultrasonic signals in the original dataset constructed in Step 2 with grain distribution labels.

[0093] In this embodiment, an elliptical spatial distribution sampling as shown in Figure 5 is adopted. Set the length of the horizontal major axis to 3, the length of the vertical minor axis to 2. A total of 19 discrete points are included in a single ellipse. That is, finally, 30×19 ultrasonic signals are obtained, corresponding to 30 grain size labels, and the size of the dataset is 570.

[0094] Step 4: Preprocess the s×k ultrasonic signals with grain distribution labels in Step 3 to obtain s×k time-frequency feature maps, and divide the obtained s×k time-frequency feature maps into a training set, a validation set, and a test set according to a ratio.

[0095] In this embodiment, signal preprocessing and feature extraction are performed. The complete signal processing process and extraction effect are as shown in Figure 6 . Specifically, this step includes the following sub-steps:

[0096] Step 4-1: Perform data alignment by aligning the first bottom echo signal to the start of the signal. The specific alignment method is as follows: Use the autoregressive method to find the positive peak point in the time domain of the signal, and then extract the second peak as the first bottom echo signal (the first peak is the head wave signal on the upper surface of the material). Based on the zero-crossing moment between the positive peak and the negative peak of the first bottom echo, shift forward 100 time instants (the amplitude at this point is close to 0 and can be regarded as a resting signal unrelated to the first head wave) as the new signal start point.

[0097] Step 4-2: Normalize the shifted signal based on the absolute value of the current maximum amplitude to eliminate the influence brought by the initial pulse energy difference.

[0098] Step 4-3: Use a fourth-order Butterworth filter to perform band-pass filtering on the frequency band of the region of interest. The band-pass range is 1 MHz to 20 MHz to effectively filter out noise signals outside the target frequency band. Subsequently, use the db4 wavelet to perform soft-threshold filtering, and the threshold is set to 0.15.

[0099] Step 4-4: Use the cgau8 wavelet to perform continuous wavelet transform to convert the filtered time-domain signal into a time-frequency signal, and split the obtained complex time-frequency diagram into two time-frequency diagrams of amplitude and phase, namely, the amplitude time-frequency diagram and the phase time-frequency diagram. Among them, the size of each time-frequency diagram is m×n, where m represents the number of divisions in the frequency domain, and n represents the number of scales in the time domain. The frequency value represented by each scale in the frequency domain is generated by the following formula.

[0100]

[0101] where: x(t) is the original signal, Ψ * represents the complex conjugate of the wavelet function, a is the scale parameter that controls the stretching and shrinking of the wavelet, and b is the translation parameter that controls the position of the wavelet.

[0102] a×f = F s ×wcf

[0103] where F s is the sampling frequency, wcf is the center frequency of the wavelet, which is determined by the wavelet family and has nothing to do with the data itself. Calculate the scale coefficient of the wavelet transform according to this formula, that is, substitute the frequency value into f in formula (2).

[0104] In this example, both n and m are taken as 1024, that is, 1024 frequency points from 1 MHz to 20 MHz are extracted at equal intervals, and then the data of the first 1024 time points are intercepted to obtain a 1024 * 1024 wavelet phase and amplitude time-frequency diagram, as Figure 6 shown in the signal feature diagram. The upper diagram is the amplitude time-frequency diagram, and the lower diagram is the phase time-frequency diagram.

[0105] Step 5: Construct a deep learning network, and use the training set in Step 4 to train the constructed deep learning network. Then use the validation set to monitor the network training process, judge the network training effect and the timing of ending the training. Finally, use the test set to test the generalization performance and the final effect of the model to obtain the deep learning network model.

[0106] In this embodiment, a deep learning characterization network model for the grain size of materials as shown in Figure 7 is designed. The specific content of the design and use of this network model includes the following sub-steps:

[0107] Step 5-1: The network design is divided into two parts: encoding and decoding. In the encoding part, a compressive sensing network is designed, referring to the U-Net network structure, continuously compressing the pixel space, fusing the pixel space information, and finally characterizing the signal features through different channels, fully extracting the correlation information between different time-frequency blocks. The image feature extraction is based on a double convolutional layer. This layer does not change the size of the pixel space, but will further characterize the features through channel changes, and then the pixel space compression process is realized through the pooling layer.

[0108] For this purpose, according to the convolutional deformation formula:

[0109]

[0110] and the pooling deformation formula:

[0111]

[0112] Among them, K is the size of the pooling window, S is the stride, and P is the padding size.

[0113] In this embodiment, the convolutional kernel of the convolutional layer is designed to be (3, 3), the stride size is (1, 1), the convolutional kernel of the pooling layer is (4, 4), and the stride size is (4, 4). The pixel space will be compressed to 1 / 4 of the original. A double convolutional layer and a Pool layer form a compressive sensing block. Through the stacking of compressive sensing blocks, the pixel space is finally compressed into a single feature scalar, such as Figure 7 The input image size is 1024×1024×2, and the change process of the number of channels is set to be 2->16->32->64->128->256, that is, the encoding layer finally obtains a feature scalar set of 1×1×256.

[0114] Step 5-2: Design a fully connected network in the decoding part to represent the material features. This representation process can capture the conversion relationship from the ultrasonic signal to the material features and the correlation relationship between features in the hidden layer. Especially for the prediction target with actual physical meaning, incorporating the constraints of physical information may contribute to the generalization and convergence of the model.

[0115] In particular, in the present invention, the direct prediction objects are the average logarithmic grain size of the material and the corresponding standard deviation, because the ultrasonic characterization of the grain size is related to factors such as the material type and the thickness of the detection point. Considering the important significance of material thickness perception for grain size characterization and practical applications, the present invention proposes a modeling method for a grain size prediction network model considering thickness characterization. Considering that the thickness is an unknown quantity in the automated detection process, the present invention designs to learn the thickness characterization as one of the prediction items, and the relationship between the thickness and the grain size is learned by the model itself in the hidden layer.

[0116] Step 5-3: In the training process, to solve the problem of sample bias, the present invention proposes a weighted loss function based on the number of labels, and its expression is as follows:

[0117]

[0118] Where:

[0119] N is the Batch Size

[0120] and respectively represent the predicted value and the true value of the i-th sample and the j-th feature.

[0121] label_weights (i)is the weight of the i-th sample, which is applied to all features of this sample. In this example, the weight of fewer samples is set to 100, and the rest are set to 1.

[0122] Step 5-4: The model is trained using the Adam optimizer with an initial learning rate of 0.001. The learning rate is adjusted using CosineAnnealingLR, and T_max is set to 32. In this example, the maximum number of training epochs is set to 2000, and an early stopping mechanism is set. When the validation set loss does not decrease for 200 consecutive epochs, the training stops, and the model training result with the minimum validation set loss is saved.

[0123] The calculation results of the loss function during the training process are as Figure 8 shown. The initial Loss and WMSE of the model are extremely large. After quickly converging to smaller values, the validation set experiences a period of oscillation, and then gradually and steadily decreases after 800 epochs. Finally, the minimum values of the validation set MSE and Loss are reached at the 1225th round, that is, MSE is equal to 0.0009 and Loss is equal to 0.0026. At this time, the Train Loss is 0.0017 and the Train MSE is 0.0006. Based on the early stopping strategy, the final training ends at the 1375th round.

[0124] The generalization ability of the model is tested using the above optimal model on the test set. The MSE on the test set is 0.0010 and the Loss is 0.0030. It can be seen that the model has a certain generalization ability, and the loss of generalization accuracy on the test set is not large.

[0125] Step 6: Use the deep learning network model to predict the s×k time-frequency feature maps in Step 4, and perform spatial fusion on the k signals within the elliptical region to obtain the mean and standard deviation of the grain size distribution.

[0126] In this embodiment, let the distance between any point within the elliptical region and the center point be x, and set the spatial distribution function as P(x). Then, the expressions of the parameters of the final grain size distribution after spatial fusion are as follows:

[0127]

[0128] where y represents the fused result, Detect the model prediction result, and k is the number of discrete ultrasonic signal detection points included in the elliptical region.

[0129] In this example, P(x) is selected as a uniform distribution, k is equal to 19, and the model prediction results of some regions are shown in Table 2:

[0130] Table 2 Model Prediction Results of Some Regions

[0131]

[0132]

[0133] Step 7: Based on the lognormal distribution, compare the grain size distribution obtained in Step 6 with the actual distribution, and judge whether the training effect and prediction accuracy of the deep learning network model obtained in Step 5 meet the requirements according to the comparison results. If both the training effect and prediction accuracy meet the requirements, the deep learning network model obtained in Step 5 is the detection model, and the weight parameters of the network training are output; otherwise, if either the training effect or the prediction accuracy does not meet the requirements, return to Step 3 to adjust the elliptical distribution size, preprocessing parameters, and deep learning network hyperparameters in the subsequent steps until both the training effect and prediction accuracy meet the requirements, obtain the detection model, and output the weight parameters of the network training.

[0134] In this embodiment, this step can be divided into the following sub-steps:

[0135] Step 7-1: Draw a histogram based on the lognormal distribution expression in Step 2, as Figure 9 shown, observe the distribution coincidence degree and calculate the Kullback-Leibler (KL) divergence between the coincidence curves. The KL divergence measures the difference between two probability distributions. The closer the KL divergence is to 0, the more similar the two distributions are, that is, the better the model training effect. Specifically, for the normal distribution, the KL divergence is calculated using the following formula:

[0136]

[0137] In the formula, we stipulate that p is the target distribution and q is the predicted distribution. Therefore, p corresponds to the expectation and standard deviation of μ p and σ p , and q corresponds to the expectation and standard deviation of μ q and σ q .

[0138] The KL divergence calculation results for some regions are shown in Table 3 below;

[0139] Table 3 KL divergence values for some regions

[0140]

[0141]

[0142] Step 7-2: Observe the mean square error of the predicted material thickness for the predicted material thickness. The prediction deviation is as Figure 10 shown. It can be seen that the model predicts the thickness well, and it can be considered that the model has learned the thickness characteristics and associated the relationship between the thickness and the grain size distribution in the hidden layer.

[0143] Through the above process, a verified detection model is established. This model can quickly predict the grain size distribution of materials with high precision and perform stably on the entire dataset. The detection model can be used to predict the grain size distribution of the GH4099 additive test block in engineering practice. The steps are as follows:

[0144] Step S1: Use water immersion ultrasonic and pulse echo method to collect ultrasonic characteristic signals near the area to be measured of the material.

[0145] Step S2: With the acquisition point as the center, collect spatially distributed signals using an elliptical distribution as a single-point grain characterization feature set.

[0146] Step S3: Preprocess the collected signals to extract features. First, perform signal alignment, then filter and denoise, and finally use wavelet transform to obtain its time-frequency feature map.

[0147] Step S4: Through the detection model, first use the compressive sensing network to compress and extract features for single-point features, then use the fully connected network to predict the grain size distribution of the material and the thickness of the material at the detection point. Finally, use the spatial fusion method to comprehensively calculate the prediction results of all detection points in the elliptical area and finally obtain the mean and standard deviation of the grain size distribution.

[0148] The deep learning prediction method for the grain size distribution of materials based on signal multi-mode space coding proposed in the present invention establishes a deep learning prediction model for the grain size distribution of materials with signal multi-mode space coding through multiple iterative trainings of ultrasonic data for paired metallographic measurement of grain size, realizing high-precision prediction and high-efficiency calculation of the grain size distribution of the GH4099 test block of metal additive materials. Moreover, the intermediate network of model training is expected to be used for transfer learning of other material characterization tasks.

[0149] In summary, the above are only the preferred embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A deep learning prediction method for material grain size distribution based on signal multi-mode spatial coding, characterized in that The following steps are involved: Step 1, performing ultrasonic C scanning on the material based on the pulse echo method to collect n×m uniformly distributed ultrasonic characteristic signals; Step 2, select s metallographic measurement areas, perform metallographic experiments on the plane formed by the long axis of the ultrasonic propagation discovery and sampling ellipse area, obtain label data of the logarithmic normal distribution of the material grain size, and pair them with the ultrasonic characteristic signal obtained in step 1 to construct the original data set; Step 3, taking the center point of each metallographic measurement area selected in step 2 as the reference, using k signals in the elliptical distribution collection space as the single-point grain characterization feature set, and marking all ultrasonic signals within the elliptical range with the same grain distribution label, that is, there are s×k ultrasonic signals with grain distribution labels in the original data set constructed in step 2; Step 4, preprocessing the s×k ultrasonic signals with grain distribution labels in step 3 to obtain s×k time-frequency feature maps, and dividing the obtained s×k time-frequency feature maps into a training set, a validation set, and a test set according to a ratio; Step 5, build a deep learning network, and use the training set in step 4 to train the constructed deep learning network, then use the validation set to monitor the network training process, judge the network training effect and the timing of ending the training, and finally use the test set to test the generalization performance and final effect of the model to obtain a deep learning network model; Step 6, using the deep learning network model to predict the s×k time-frequency feature maps in step 4, spatially fuse the k signals in the elliptical area, and obtain the mean and standard deviation of the grain size distribution; Step 7, based on the log-normal distribution, the grain size distribution obtained in step 6 is compared with the actual distribution, and whether the training effect and prediction accuracy of the deep learning network model obtained in step 5 meet the requirements is determined according to the comparison result. If both the training effect and the prediction accuracy meet the requirements, the deep learning network model obtained in step 5 is the detection model, and the weight parameters of the network training are output; otherwise, that is, either the training effect or the prediction accuracy is not satisfied, return to step 3, adjust the elliptical distribution size, preprocessing parameters, and deep learning network hyperparameters in the subsequent steps, until both the training effect and the prediction accuracy meet the requirements, obtain the detection model, and output the weight parameters of the network training; Step 8, using the detection model obtained in step 7 to perform an ultrasonic C scan on the test area of ​​the test material to collect uniformly distributed ultrasonic characteristic signals; Step 9, taking the center point of each ultrasonic characteristic signal obtained in step 8 as a reference, using an elliptical distribution to collect k signals in the space; Step 10, preprocessing the k signals obtained in step 9 to obtain k time-frequency feature graphs; Step 11, input the k time-frequency characteristic graphs obtained in step 10 into the detection model obtained in step 7 to obtain the material grain size distribution.

2. According to claim 1, a deep learning prediction method for material grain size distribution based on signal multi-mode spatial coding is characterized by: In step 2, the lognormal distribution P(D) is: Where D is the actual measured grain size, μ is the logarithmic mean of the size, and σ d is the logarithmic standard deviation of the size, is the mean of the measured value D, σ D is the standard deviation of the measured value D.

3. According to claim 1, a deep learning prediction method for material grain size distribution based on signal multi-mode spatial coding is characterized by: In step 4, preprocessing refers to first aligning the signal base wave, then filtering and denoising, and finally using wavelet transform to obtain the time-frequency feature map.

4. The method for deep learning prediction of material grain size distribution based on signal multi-mode spatial coding according to claim 1, characterized in that: In step 4, the process of aligning the primary bottom wave of the signal is as follows: The signal is aligned based on the zero point between the peak values ​​of the primary bottom wave, and the primary bottom wave echo signal is aligned to the beginning of the signal. The specific alignment method is: use the autoregressive method to find the time domain positive peak point of the signal, and then extract the second peak, which is the primary bottom wave echo signal. The first peak is the head wave signal on the surface of the material. The zero point between the positive peak and negative peak of the primary bottom wave is shifted forward by t moments as the new signal starting point. The shifted signal is normalized based on the current maximum amplitude absolute value to eliminate the influence of the initial pulse energy difference.

5. The method for deep learning prediction of material grain size distribution based on signal multi-mode spatial coding according to claim 1, characterized in that: In step 4, the method for filtering and denoising is: using a 4th-order Butterworth filter to perform bandpass filtering on the frequency band of the region of interest to effectively filter out noise signals that are not in the target frequency band, and then using the db4 wavelet to perform soft threshold filtering, with the threshold set to a.

6. The method for deep learning prediction of material grain size distribution based on signal multi-mode spatial coding according to claim 1, characterized in that: In step 4, the method for performing wavelet transform is: using cgau8 wavelet to perform continuous wavelet transform to convert the filtered time domain signal into a time-frequency signal, splitting the obtained complex time-frequency graph into two time-frequency graphs of amplitude and phase, namely, amplitude time-frequency graph and phase time-frequency graph, wherein the size of each time-frequency graph is m×n, m represents the number of divisions in the frequency domain, and n represents the number of scales in the time domain; Where: x(t) is the original signal, Ψ * It represents the complex conjugate of the wavelet function, a is the scale parameter, which controls the expansion and contraction of the wavelet, and b is the translation parameter, which controls the position of the wavelet; a×f=F s ×wcf Among them, F s is the sampling frequency, wcf is the center frequency of the wavelet, which is determined by the wavelet family.

7. The method for deep learning prediction of material grain size distribution based on signal multi-mode spatial coding according to claim 1, characterized in that: In step 5, the constructed deep learning network consists of a compressed sensing encoding part and a fully connected decoding part.

8. The method for deep learning prediction of material grain size distribution based on signal multi-mode spatial coding according to claim 1, characterized in that: In step 5, the construction of the deep learning network is divided into two parts: encoding and decoding. In the encoding part, a compressed sensing network is designed to continuously compress the pixel space, fuse the pixel space information, and finally characterize the signal features through different channels, fully extracting the correlation information between different time-frequency blocks. The image feature extraction is based on a double convolution layer, which does not change the size of the pixel space, but further characterizes the features through channel changes, and then realizes the compression process of the pixel space through the pooling layer; According to the convolution deformation formula: And the pooling deformation formula: Among them, K is the size of the pooling window, S is the stride, and P is the padding size; The convolution kernel of the convolution layer is designed to be (3,3) with a stride size of (1,1). The convolution kernel of the pooling layer is designed to be (x,x) with a stride size of (x,x). The pixel space will be compressed to 1 / x of the original. A double convolution layer and a Pool layer form a compressed sensing block. By stacking compressed sensing blocks, the pixel space is finally compressed into a single feature scalar. In the decoding part, a fully connected network is designed to characterize the material characteristics. This characterization process captures the conversion relationship from ultrasonic signals to material characteristics and the correlation between each feature in the hidden layer. The thickness representation is learned as one of the prediction terms.

9. The method for deep learning prediction of material grain size distribution based on signal multi-mode spatial coding according to claim 1, characterized in that: In step 5, the weighted loss function during training is: Where: N is the batch size, and They represent the predicted value and true value of the i-th sample and the j-th feature, respectively, and E is the number of features; label_weights (i) is the weight of the i-th sample; Set the weight of the data with fewer samples to w1, and the rest to w2 by default, where w1 is greater than w2; The Adam optimizer is used for training, the initial learning rate is 0.001, the CosineAnnealingLR is used to adjust the learning rate, T_max is set to 32, the maximum training epoch is set to n, and the early stopping mechanism is set. When the validation set loss does not decrease for k consecutive epochs, the training is stopped and the model training result with the smallest validation set loss is saved.

10. The method for deep learning prediction of material grain size distribution based on signal multi-mode spatial coding according to claim 1, characterized in that: In step 6, the method of spatial fusion is: Step 6-1, assuming that the distance between any point in the elliptical region and the center point is x, and the spatial distribution function is set to P(x), then the parameter expressions of the final grain size distribution after spatial fusion are as follows: Among them, y represents the result after fusion, The detection model prediction results, k is the number of discrete ultrasonic signal detection points contained in the elliptical area; In step 7, the comparison method is: Step 7-1, draw a histogram based on the lognormal distribution expression in step 2, observe the distribution overlap and calculate the KL divergence between the overlapped curves. The KL divergence measures the difference between two probability distributions. The closer the KL divergence is to 0, the more similar the two distributions are, which means the better the model training effect is. Specifically, for the normal distribution, the KL divergence is calculated using the following formula: In the formula, we define p as the target distribution and q as the predicted distribution, so the corresponding expectation and standard deviation of p are μ p and σ p , q corresponds to the expected and standard deviation μ q and σ q ; Step 7-2: Verify the model's effect on extracting material thickness features through the mean square error of the thickness prediction value.

Citation Information

Cited By

  • Metal material rapid annealing effect detection method based on acoustic response

    CN120668794A