A weld ultrasonic beam path correction method of a crystal grain graph neural network

By constructing a grain diagram structure and using a graph neural network to correct the acoustic beam path, the problem of insufficiently detailed acoustic beam path description in ultrasonic weld inspection is solved, achieving high-precision weld defect imaging and meeting the real-time requirements of engineering.

CN122115319APending Publication Date: 2026-05-29DATANG BOILER & PRESSURE VESSEL INSPECTION CENTER CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-04
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

The current ultrasonic testing of welds lacks precise beam path description, leading to inaccurate time-of-flight estimation, focal point shift, and pseudo-focusing, which affects the accuracy and reliability of weld defect imaging.

Method used

By constructing a grain graph structure with grains as nodes and grain boundaries as edges, and using graph neural networks to learn edge propagation time weights, combined with shortest propagation time search and neural network substitution models, the flight time is predicted and fused to perform full-focus imaging.

Benefits of technology

It significantly improves the positioning accuracy and resolution of weld defect imaging, ensuring the accuracy and reliability of defect detection and meeting the real-time requirements of engineering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115319A_ABST
    Figure CN122115319A_ABST
Patent Text Reader

Abstract

The application discloses a kind of grain map neural network's weld ultrasonic beam path correction method, it is related to the field of welding structure nondestructive testing, by obtaining the EBSD data of weld area, extract grain orientation, grain boundary type and spatial distribution characteristics, construct grain map structure, and calculate initial propagation time weight based on anisotropic sound velocity model;Using graph neural network to learn end to end for grain node and grain boundary edge features, output corrected edge propagation time weight;The time of flight from element to imaging pixel is obtained by shortest path search, and the time of flight predicted by neural network surrogate model is fused and corrected;Finally, the corrected time of flight is used to perform full focus imaging, and the weld defect image after optimizing the beam path is obtained.The method combines material microstructure characteristics and machine learning model, solves the problem that the beam path description is not fine enough in existing weld ultrasonic testing, significantly improves the accuracy and reliability of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of non-destructive testing technology for welded structures, specifically to a method for correcting the ultrasonic beam path of welds using a grain diagram neural network. Background Technology

[0002] Welded structures are widely used in energy, pressure vessels, rail transportation, and other fields, and their service safety highly depends on the reliable detection of internal defects in the welds. Phased array ultrasonic testing (PAUT) and total focusing method (TFM) have become important means of non-destructive testing of welds due to their advantages such as intuitive imaging and high resolution.

[0003] However, actual weld regions often possess complex granular structures, such as coarse columnar crystals, mixed-grain regions, segregation zones, and strongly anisotropic structures near the fusion line. These microstructures cause significant refraction, deflection, and velocity anisotropy in ultrasonic waves propagating within the weld. This results in a large deviation between the beam path calculated based on the homogeneous medium assumption or a simple layered model and the actual propagation path, leading to inaccurate time-of-flight estimation, focus point shift, and pseudo-focusing, severely impacting the accuracy and reliability of weld defect imaging.

[0004] In existing technologies, one type of method selects anisotropic sound velocity parameters based on experience or uses a simplified layered medium model to coarsely correct the sound velocity field, but it is difficult to accurately characterize the complex three-dimensional microstructure of the real weld area; another type of method uses numerical simulation or ray tracing technology to search for the shortest propagation path point by point on a fine grid. Although the accuracy is high, the computational load is huge and it is difficult to meet the near real-time detection requirements of engineering sites.

[0005] With the development of electron backscatter diffraction (EBSD) technology, detailed information such as grain orientation, grain boundary type, and misorientation angle in the weld region can be obtained at the microscopic scale, providing a foundation for constructing anisotropic propagation models based on real grain structures. However, how to effectively couple high-resolution EBSD data with ultrasonic testing data, and improve the accuracy and computational efficiency of time-of-flight prediction using machine learning methods while maintaining physical interpretability, remains a challenge in the current technological development.

[0006] On the other hand, deep learning and graph neural networks exhibit strong fitting capabilities in graph data modeling, enabling the learning of higher-order relationships between nodes and edges on graphs with complex topologies. Transforming weld EBSD data into a grain graph with grains as nodes and grain boundaries as edges, and then using graph neural networks to learn edge propagation time weights or equivalent slowness on this graph, holds promise for more accurately describing the propagation behavior of sound beams in anisotropic weld microstructures. Simultaneously, by constructing a time-of-flight substitution model, online computational overhead can be significantly reduced while maintaining accuracy, enabling rapid generation of time-of-flight lookup tables.

[0007] Therefore, it is urgent to propose a method for ultrasonic beam path correction of welds to ensure the physical rationality of flight time prediction, while also taking into account the imaging accuracy and real-time performance of complex weld areas. Summary of the Invention

[0008] The technical problem to be solved by this invention is how to address the issue of insufficient precision in the description of the sound beam path in existing ultrasonic testing of welds.

[0009] This invention solves the above-mentioned technical problems through the following technical means: a method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network, comprising: S1. Obtain EBSD data of the weld area, extract grain orientation, grain boundary type, misorientation angle and spatial distribution characteristics from the EBSD data, and construct a grain diagram structure with grains as nodes and grain boundaries as edges. S2. Calculate the initial propagation time weights of the edges in the grain diagram based on the anisotropic sound velocity model; S3. Use graph neural networks to learn the grain node features and grain boundary edge features of the grain diagram end-to-end, and output the corrected edge propagation time weights or slowness. S4. Based on the corrected propagation time weights obtained in step S3, the flight time from the array element to the imaging pixel is obtained through the shortest propagation time search method. S5. A neural network replacement model is used to predict the flight time between array elements and imaging pixels; S6. The flight time obtained in step S4 and the flight time output in step S5 are fused together to obtain the final flight time for full-focus imaging. S7. Perform full-focus imaging based on the final flight time to obtain a weld defect image after beam path correction.

[0010] Furthermore, before acquiring the EBSD data of the weld area in step S1, the process also includes weld specimen preparation, which includes the following steps: Metal samples are taken from the center and both sides of the weld along the thickness direction of the weld, and the cross-sectional dimensions of the metal samples are 10~20mm×10~30mm. The metal sample is inlaid with conductive thermosetting resin or conductive cold-setting resin to expose the weld cross-section. The cross section of the sample was mechanically ground with silicon carbide sandpaper with grit sizes ranging from 200# to 2000# until there were no obvious scratches on the surface; The sample cross-section was finely polished using suspensions with particle sizes of 5 μm and 0.5 μm. After fine polishing, the sample cross-section was finally polished using 0.05 μm silica gel to achieve a mirror-like finish. The final polished sample is then subjected to electrolytic polishing or chemical etching treatment. The treated sample was placed on a scanning electron microscope equipped with an EBSD probe, and the sample was scanned with an accelerating voltage of 15–25 kV, a sample tilt angle of 70° and a step size of 0.1–2 μm to obtain crystal orientation measurement data covering the weld area.

[0011] Furthermore, the process of constructing the grain diagram structure in S1 includes: S11. Repair unindexed or low-quality points in EBSD data through neighborhood interpolation or orientation continuity. S12. Based on crystal orientation clustering or misorientation threshold, perform grain segmentation on EBSD measurement points to obtain the grain set of the weld region. S13. Treat each grain as a node in the graph and assign node characteristics such as average orientation, phase type, area, perimeter, and local orientation distribution to the nodes. S14. Establish edge connections based on grain contact relationships, and assign edge features such as grain boundary type, misorientation angle, grain boundary length, and local propagation direction angle to each edge; form a grain diagram structure that includes the above node features and edge features.

[0012] Furthermore, S2 includes: S2.1. Based on the average grain orientation obtained from EBSD data, and combined with anisotropic elastic constants or empirical models, determine the equivalent sound velocity in different directions. S2.2 Calculate the effect of cross-boundary refraction on propagation speed at the grain boundary based on the angle between the incident direction and the grain boundary normal direction; Let the grain boundary normal direction be The unit vector of the incident direction is The incident angle is obtained from the incident direction and the grain boundary normal direction. The refraction angle is obtained according to the generalized Snell's law, and its calculation formula is as follows:

[0013] in, For the sound wave in the grain on the incident side, along the incident direction The corresponding direction-dependent equivalent speed of sound during propagation. For sound waves in the refracting grains, along the refraction direction The direction-dependent equivalent speed of sound during propagation; Angle of refraction The calculation formula is:

[0014] The formula for calculating the direction of propagation after refraction is:

[0015] The formula for calculating the directional sound velocity in a refracting grain is:

[0016] The formula for calculating the propagation time across grain boundaries is:

[0017] in, It is the equivalent propagation path length of the sound beam in the neighborhood of the grain boundary along the direction of propagation after refraction when crossing the grain boundary; S2.3. Calculate the initial estimate of the edge propagation time by combining the grain boundary length and the length of the local propagation path segment; Let the grain boundary normal be The direction of propagation after refraction The grain boundary length is The length of a local path segment can then be expressed as:

[0018] Obtain the equivalent speed of sound in the direction of refraction. Then, the initial propagation time estimate of the grain boundary edge is obtained:

[0019] S2.4. Based on the columnar or mixed crystal structure that may exist in the weld area, the initial propagation time is directionally corrected to obtain the corrected initial propagation time weight.

[0020] Furthermore, S2.4 includes: Based on step S2.3, a directionality correction term is introduced, assuming the grain principal axis direction is... The direction of propagation after refraction is The angle between the two is The directional correction of the columnar crystal region can be expressed as:

[0021] in, The initial propagation time weight after correction for the columnar crystal region. The directionality coefficient of columnar crystals; For mixed-crystal regions, a correction term is constructed by combining the local misorientation angle statistics extracted by EBSD, and its calculation formula is as follows:

[0022] in, The initial propagation time weight after correction for the mixed crystal region. The standard deviation of the neighborhood misorientation angle. This is a mixed crystal orientation correction coefficient used to characterize the influence of the degree of local grain orientation dispersion in the mixed crystal region on the ultrasonic propagation time.

[0023] Furthermore, S3 includes: S3.1. Use the average grain orientation, phase type, area, perimeter, and local orientation distribution as node input features; S3.2, use grain boundary type, misorientation angle, grain boundary length, and the included angle of local propagation direction as edge input features; S3.3. Use message-passing neural networks, GraphSAGE, GIN, or graph attention networks based on attention mechanisms to perform multi-layer information aggregation on node features and edge features; S3.4. Output the corrected edge propagation time weight or equivalent slowness of grain boundary edges in different propagation directions through the edge readout module of the graph neural network. The hidden edge vectors obtained after message passing in the graph neural network Node features associated with it and Concatenation yields the edge-level joint feature vector. A multilayer perceptron regression network, consisting of 1 to 3 linear layers and a ReLU activation function; the results obtained through the multilayer perceptron regression network... ,in, This represents the intermediate estimate of the predicted propagation time weights of the corresponding grain boundary edges between nodes u and v in the grain diagram under a specified propagation direction, obtained by graph neural network regression; the output layer outputs the corrected propagation time weights of the grain boundary edges under the specified propagation direction. ,in, To correct the subsequent propagation time weights, The weight matrix is ​​a linear transformation matrix. represents the dimension of the input features to the multilayer perceptron. This represents the intermediate latent feature vector obtained after several layers of linear transformation and activation function processing in the MLP. For bias terms; S3.5. Using the corrected initial propagation time weights obtained in step S2.4 as a supervision signal, train the graph neural network to improve the accuracy of propagation time estimation.

[0024] Furthermore, S4 includes: S4.1. Use the corrected edge propagation time weights or equivalent slowness output by the graph neural network in step S3 as the weight inputs for each edge of the grain graph structure. S4.2 Using Dijkstra's algorithm, A* search algorithm, or multi-source shortest path algorithm based on priority queue, with each element of the ultrasonic array as the starting point and each pixel of the imaging grid as the ending point, calculate the shortest propagation time from the starting point to the ending point. The shortest propagation time is the flight time from the array element to the corresponding imaging pixel. S4.3. In the process of calculating the shortest propagation time, a penalty factor is introduced; the penalty factor is determined based on the grain boundary orientation, the number of grain boundary crossings, or the local propagation angle change. S4.4 Organize the flight times from all array elements to each pixel into a flight time lookup table; the flight time lookup table is a three-dimensional array. ,in, It is an array index. These are the imaging network coordinates; the table content is the oscillating element. To pixel Shortest transmission time .

[0025] Furthermore, S5 includes: S51. The relevant parameters of the array elements and pixels in the input neural network replacement model include: the spatial position of the array elements of the ultrasonic array, the array element index, the imaging pixel coordinates, the depth, and the statistical characteristics of the average orientation and misorientation angle of the grains in the pixel neighborhood. S52. Constructing network structures for alternative neural network models: one or more combinations of multilayer perceptron, feedforward network with Fourier features, SIREN network, or coordinate-conditional Transformer network. S53. Use the flight time obtained in step S4 or the corrected side propagation time output in step S3 as the supervision signal for the neural network replacement model. S54. With the goal of minimizing the error between the predicted value and the supervision signal, train the neural network substitution model; after training, input the relevant parameters of the array elements and pixels, and output the flight time between the array elements and the imaging pixels.

[0026] Furthermore, S6 includes: S61. Normalize the flight time obtained in step S4 and the flight time obtained in step S5 respectively to make their dimensions consistent. S62. Obtain historical scan data or test data of calibration blocks, and calculate the average error of the methods in step S4 and step S5 in the data, respectively, denoted as... and ; Calculate the fusion weights using the inverse error normalization method and ,in, , The weights satisfy ; S63. The final flight time is calculated using a linear weighting, weighted average, or confidence-based nonlinear fusion method, combined with the fusion weights; the formula for linear weighting is as follows: , To represent the flight time between array elements and imaging pixels calculated based on the shortest propagation time search method, This represents the flight time between array elements and imaging pixels, as predicted by the neural network substitution model.

[0027] Furthermore, S7 includes: S71. Acquire the ultrasonic echo signals of the weld seam received by each element of the ultrasonic array. Using the final flight time obtained in step S6, perform time alignment processing on the echo signals of each element and then perform coherent superposition. S72. Using the full focusing method or its improved algorithm, calculate the sound pressure amplitude or energy distribution pixel by pixel on the imaging grid to obtain the initial imaging result; S73. In the coherent superposition process of multi-element echo signals, a weighting coefficient is introduced; the weighting coefficient is determined based on the consistency or stability of the flight time of each element. S74. Post-process the initial imaging results; the post-processing includes envelope extraction, contrast enhancement and noise suppression, to obtain a weld defect image after sound beam path correction.

[0028] The advantages of this invention are: This invention constructs a grain map structure by extracting features such as grain orientation and grain boundary type from EBSD data of the weld area, determines the initial propagation time weight by combining an anisotropic sound velocity model, corrects the edge feature parameters by using end-to-end learning of a graph neural network, and then predicts and fuses the flight time through a dual-path method of shortest propagation time search and neural network substitution model. Finally, it performs full-focus imaging based on the corrected flight time, effectively solving the problem of insufficiently detailed beam path description in existing ultrasonic weld inspection, significantly improving the positioning accuracy and resolution of weld defect imaging, ensuring the accuracy and reliability of defect detection, and providing more precise technical support for weld quality assessment. Attached Figure Description

[0029] Figure 1 This is a flowchart of a weld ultrasonic beam path correction method using a grain diagram neural network according to Embodiment 1 of the present invention; Figure 2This is a schematic diagram of the weld geometry and phased array element arrangement in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the weld EBSD data acquisition process in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the grain distribution and orientation of the weld cross-section derived from EBSD data in Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of the propagation path of the sound beam in the weld seam based on grain diagram and GNN correction in Embodiment 1 of the present invention; Figure 6 This is a schematic diagram of the TFM imaging region and time-of-flight lookup table pixel grid in Embodiment 1 of the present invention; Figure 7 This is a schematic diagram of the grain diagram, graph neural network structure, and edge weight regression of Embodiment 1 of the present invention; Figure 8 This is a diagram showing the input and output of the neural network substitution model in Embodiment 1 of the present invention; Figure 9 This is a schematic diagram of the time-of-flight fusion process in Embodiment 1 of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0031] Example 1 like Figure 1 As shown, a method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network includes: S1. Obtain EBSD data of the weld area, extract grain orientation, grain boundary type, misorientation angle and spatial distribution characteristics from the EBSD data, and construct a grain diagram structure with grains as nodes and grain boundaries as edges.

[0032] Specifically, such as Figure 2 and Figure 3As shown, this embodiment selects a typical thick plate butt weld, and cuts a cross-sectional sample of approximately 15mm × 25mm from the middle of the weld along the plate thickness direction. The sample is mechanically cut and the stress concentration areas of the weld toe and root are trimmed. Conductive thermosetting resin is used for embedding, placing the weld cross-section at the center of the embedding block for easy clamping and tilting. The sample is then ground sequentially using 200#, 400#, 800#, 1200#, and 2000# silicon carbide sandpaper under running water conditions, with the grinding direction alternating each time the sandpaper is changed. Subsequently, 5μm and 0.5μm diamond suspensions are used for rough polishing and fine polishing, and finally, 0.05μm silica gel is used for final polishing to obtain a mirror finish. To improve the quality of the EBSD pattern, short-time electrolytic polishing or light etching can be performed to weaken the processing deformation layer. The sample was subjected to surface scanning in a scanning electron microscope equipped with an EBSD probe at an accelerating voltage of 15–25 kV, an inclination angle of approximately 70°, and a step size of 0.1–2 μm to obtain raw EBSD data including crystal orientation (Euler angle), phase identification, and signal quality indicators.

[0033] S11. Repair unindexed or low-quality points in EBSD data through neighborhood interpolation or orientation continuity. The criteria for judging low-quality points are: compare the crystal orientation of the measured point with the crystal orientation of multiple successfully indexed points in its neighborhood. If the misorientation angle between the orientation of the point and the average orientation of the neighborhood exceeds a preset threshold, it is judged as a low-quality point.

[0034] S12. Based on crystal orientation clustering or misorientation threshold, the EBSD measurement points are segmented into grains to obtain the grain set of the weld region.

[0035] S13. Treat each grain as a node in the graph and assign node characteristics such as average orientation, phase type, area, perimeter, and local orientation distribution to the nodes.

[0036] S14. Establish edge connections based on grain contact relationships, and assign edge features such as grain boundary type, misalignment angle, grain boundary length, and the angle between local propagation directions to each edge; forming a grain diagram structure that includes the above-mentioned node features and edge features. For example... Figure 4 As shown.

[0037] S2. Calculate the initial propagation time weights of edges in the grain diagram based on the anisotropic sound velocity model.

[0038] Specifically, S2.1, based on the average grain orientation obtained from the EBSD results, the equivalent sound velocity in different directions is determined in combination with the anisotropic elastic constants or empirical models.

[0039] For metal weld materials exhibiting anisotropic characteristics, the grains can typically be considered as anisotropic elastic bodies. The elastic constant matrix of the material is known. And grain orientation (Euler angles or orientation matrix obtained from EBSD) Therefore, the speed of sound propagating in any direction can be calculated using Christoffel's equations.

[0040] Rotate the material's elastic constants to the grain coordinate system: based on the average grain orientation measured by EBSD. The elastic constant matrix in the global coordinate system Rotate to the local coordinate system of the grain:

[0041] in, The average grain orientation measured by EBSD This is the elastic constant matrix in the global coordinate system.

[0042] Let the direction of sound wave propagation be a unit vector. The Christoffel tensor is constructed based on the local elasticity constant matrix. The Christoffel tensor is: ,in, This represents the fourth elastic constant of the material in the grain coordinate system. and These are the unit vectors representing the direction of sound wave propagation. In the local coordinate system of the grain The component and the first Each component. For a density of... The material was used to obtain the wave velocities of different modes by solving the characteristic equation. ,in Defined as: This leads to three sets of wave velocities: ,in, The eigenvalues ​​are the characteristic values ​​of the characteristic equation; the set of wave velocities closest to the actual sound beam propagation direction is selected as the directional sound velocities of the grain.

[0043] S2.2 Calculate the effect of cross-boundary refraction on propagation speed at the grain boundary based on the angle between the incident direction and the grain boundary normal.

[0044] At grain boundaries, due to the difference in directional sound velocities between the grains on either side, the sound beam refracts as it crosses the grain boundary. Let the grain boundary normal direction be... The unit vector of the incident direction is The incident angle is obtained from the incident direction and the grain boundary normal direction. The refraction angle is obtained according to the generalized Snell's law, and its calculation formula is as follows:

[0045] in, For sound waves in the incident grain (or medium), along the incident direction The corresponding direction-dependent equivalent speed of sound during propagation. For sound waves in the refracting grain (or adjacent grain), along the refraction direction The equivalent sound speed corresponding to the direction of propagation.

[0046] Angle of refraction The calculation formula is:

[0047] The formula for calculating the direction of propagation after refraction is:

[0048] The formula for calculating the directional sound velocity in a refracting grain is:

[0049] The formula for calculating the propagation time across grain boundaries is:

[0050] in, It is the equivalent propagation path length of the sound beam in the neighborhood of the grain boundary along the direction of propagation after refraction when it crosses a certain grain boundary.

[0051] S2.3. Calculate the initial estimate of the edge propagation time by combining the grain boundary length and the length of the local propagation path segment.

[0052] The local propagation path length refers to the equivalent propagation distance of a sound beam along the actual propagation direction near a grain boundary when it crosses that boundary. Its length is determined by the angle between the propagation direction and the grain boundary normal. Let the grain boundary normal be... The direction of propagation after refraction The grain boundary length is The length of a local path segment is then expressed as:

[0053] Obtain the equivalent speed of sound in the direction of refraction. Then, the initial propagation time estimate of the grain boundary edge is obtained:

[0054] S2.4. Based on the columnar or mixed crystal structure that may exist in the weld area, the initial propagation time is directionally corrected to obtain the corrected edge initial propagation time weight.

[0055] In columnar or mixed-grain regions of the weld, the sound velocity varies with the propagation direction due to the significant orientation of the grains. To improve the adaptability of the initial propagation time to this type of complex structure, a directionality correction term is introduced based on step S2.3, assuming the grain principal axis direction is... The direction of transmission is The angle between the two is The directional correction of the columnar crystal region can be expressed as:

[0056] in, The initial propagation time weight after correction for the columnar crystal region. This represents the directionality coefficient of columnar crystals.

[0057] For mixed-crystal regions, a correction term is constructed by combining the local misorientation angle statistics extracted by EBSD, and its calculation formula is as follows:

[0058] in, The initial propagation time weight after correction for the mixed crystal region. The standard deviation of the neighborhood misorientation angle. This is a mixed crystal orientation correction coefficient used to characterize the influence of the degree of local grain orientation dispersion in the mixed crystal region on the ultrasonic propagation time.

[0059] S3. A graph neural network is used to perform end-to-end learning of the grain node features and grain boundary edge features of the grain diagram, and the corrected edge propagation time weights or slowness are output. For example... Figure 7 As shown.

[0060] Specifically, in S3.1, the average orientation, phase type, area, perimeter, and local orientation distribution of grains are used as node input features.

[0061] S3.2. Grain boundary type, misorientation angle, grain boundary length, and the included angle of local propagation direction are used as edge input features.

[0062] S3.3. Use message-passing neural networks, GraphSAGE, GIN, or graph attention networks based on attention mechanisms to perform multi-layer information aggregation on node features and edge features.

[0063] S3.4. Output the corrected edge propagation time weights or equivalent slowness of grain boundary edges in different propagation directions through the edge readout module of the graph neural network.

[0064] The hidden edge vectors obtained after message passing in the graph neural network Node features associated with it and Concatenation yields the edge-level joint feature vector. A multilayer perceptron regression network, consisting of 1 to 3 linear layers and a ReLU activation function; the results obtained through the multilayer perceptron regression network... ,in, This represents the intermediate estimate of the predicted propagation time weights of the corresponding grain boundary edges between nodes u and v in the grain diagram under a specified propagation direction, obtained by graph neural network regression; the output layer outputs the corrected propagation time weights of the grain boundary edges under the specified propagation direction. ,in, To correct the subsequent propagation time weights, The weight matrix is ​​a linear transformation matrix. represents the dimension of the input features to the multilayer perceptron. This represents the intermediate latent feature vector obtained after several layers of linear transformation and activation function processing in the MLP. This is a bias term.

[0065] S3.5. Using the corrected initial propagation time weights obtained in step S2.4 as a supervision signal, train the graph neural network to improve the accuracy of propagation time estimation.

[0066] S4. Based on the corrected propagation time weights obtained in step S3, the flight time from the array element to the imaging pixel is obtained through the shortest propagation time search method.

[0067] Specifically, in step S4.1, the corrected propagation time weight or equivalent slowness output by the graph neural network in step S3 is used as the weight input for each side of the grain graph structure.

[0068] S4.2 Using Dijkstra's algorithm, A* search algorithm, or multi-source shortest path algorithm based on priority queue, take each element of the ultrasonic array as the starting point and each pixel of the imaging grid as the ending point, calculate the shortest propagation time from the starting point to the ending point respectively. The shortest propagation time is the flight time from the array element to the corresponding imaging pixel.

[0069] With array elements Corresponding equivalent incident node Starting from the imaging pixels corresponding target node If the endpoint is an array element, then the flight time from the array element to the imaging pixel is defined as:

[0070] in, Indicates starting from the node To the destination node One of the transmission paths, This represents the edges of the grain map traversed along the path. For graph neural network output nodes and nodes The propagation time weights are adjusted accordingly.

[0071] S4.3 In the process of calculating the shortest propagation time, a penalty factor is introduced; the penalty factor is determined based on the grain boundary orientation, the number of grain boundary crossings, or the change in local propagation angle.

[0072] In step S4.3, to suppress physically irrational paths, a penalty factor is introduced into the edge weights during the shortest propagation time search process. The corrected edge weights are expressed as follows:

[0073] in, This is a penalty term related to grain boundary directionality. This is a penalty term related to the number of times a grain boundary is crossed. For penalties related to changes in the angle of local propagation direction, These are the corresponding weighting coefficients.

[0074] S4.4 Organize the flight times from all array elements to each pixel into a flight time lookup table; the flight time lookup table is a three-dimensional array. ,in, It is an array index. These are the imaging network coordinates; the table content is the oscillating element. To pixel Shortest transmission time .

[0075] Shortest propagation time search and TOF lookup table generation Figure 5 and Figure 6 In this embodiment, the corrected weights output by the GNN are assigned to each edge of the grain diagram to form a weighted graph. Using the equivalent incident points of each array element as the source and the imaging grid pixels as the target, the shortest propagation time from the array element to the imaging pixel is calculated using the Dijkstra algorithm, A* search algorithm, or multi-source shortest path algorithm. If necessary, penalty terms are set for the number of grain boundary crossings and abrupt changes in propagation angle to enhance robustness. Repeated traversal yields a three-dimensional array tof_table[element, z, x] and corresponding grid coordinates, forming a time-of-flight lookup table.

[0076] S5. A neural network substitution model is used to predict the flight time between array elements and imaging pixels. For example... Figure 8 As shown.

[0077] Specifically, the input parameters of the S51 neural network replacement model include: the spatial location of the array elements of the ultrasonic array, the array element index, the imaging pixel coordinates, and the statistical characteristics of the average orientation and misorientation angle of the grains in the pixel neighborhood.

[0078] S52. Construct network structures for alternative neural network models: one or more combinations of multilayer perceptron, feedforward network with Fourier features, SIREN network, or coordinate-conditional Transformer network.

[0079] S53. The supervision signal is the flight time obtained in step S4 or the corrected propagation time output in step S3, which is used as the supervision signal for the neural network replacement model.

[0080] S54. With the goal of minimizing the error between the predicted value and the supervision signal, train the neural network substitution model; after training, input the relevant parameters of the array elements and pixels, and output the corresponding flight time.

[0081] S6. The flight time obtained in step S4 and the flight time output in step S5 are fused together to obtain the final flight time for full-focus imaging.

[0082] Specifically, S61, the flight time obtained in step S4 and the flight time obtained in step S5 are normalized to make their dimensions consistent.

[0083] S62. Obtain historical scan data or test data of calibration blocks, and calculate the average error in the data for both the method in step S4 and the method in step S5, denoted as . and ; Calculate the fusion weights using the inverse error normalization method and ,in, , The weights satisfy .

[0084] S63. The final flight time is calculated using a linear weighting, weighted average, or confidence-based nonlinear fusion method, combined with the fusion weights; the formula for linear weighting is as follows: ,in, To represent the flight time between array elements and imaging pixels calculated based on the Shortest Path method, This represents the flight time between array elements and imaging pixels, as predicted by the neural network substitution model.

[0085] The weld area is divided into zones for analysis. If the zone is characterized by large error fluctuations or dense grain boundaries, the fusion weight is adjusted accordingly. Increase; if it is a region with uniform grains, keep the fusion weight unchanged.

[0086] S7. Perform full-focus imaging based on the final flight time to obtain a weld defect image after beam path correction. For example... Figure 9 As shown.

[0087] Specifically, in step S71, the ultrasonic echo signals of the weld seam received by each element of the ultrasonic array are collected. Using the final flight time obtained in step S6, the echo signals of each element are time-aligned and then coherently superimposed.

[0088] S72. Using the full focusing method or its improved algorithm, calculate the sound pressure amplitude or energy distribution pixel by pixel on the imaging grid to obtain the initial imaging result.

[0089] S73. In the coherent superposition process of multi-element echo signals, a weighting coefficient is introduced; the weighting coefficient is determined based on the consistency or stability of the flight time of each element.

[0090] Specifically, for a pixel in the imaging grid, the final flight time of all array elements is counted, and the mean and variance or standard deviation of the flight time of each array element at that pixel are calculated. When the flight time of an array element deviates little from the mean, the echo signal of that array element is considered to have high consistency or stability at that pixel, and its corresponding weight coefficient is taken as a larger value; when the deviation is large, its corresponding weight coefficient is taken as a smaller value.

[0091] S74. Post-process the initial imaging results; post-processing includes envelope extraction, contrast enhancement and noise suppression to obtain the weld defect image after beam path correction.

[0092] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network, characterized in that, include: S1. Obtain EBSD data of the weld area, extract grain orientation, grain boundary type, misorientation angle and spatial distribution characteristics from the EBSD data, and construct a grain diagram structure with grains as nodes and grain boundaries as edges. S2. Calculate the initial propagation time weights of the edges in the grain diagram based on the anisotropic sound velocity model; S3. Use graph neural networks to learn the grain node features and grain boundary edge features of the grain diagram end-to-end, and output the corrected edge propagation time weights or slowness. S4. Based on the corrected propagation time weights obtained in step S3, the flight time from the array element to the imaging pixel is obtained through the shortest propagation time search method. S5. A neural network replacement model is used to predict the flight time between array elements and imaging pixels; S6. The flight time obtained in step S4 and the flight time output in step S5 are fused together to obtain the final flight time for full-focus imaging. S7. Perform full-focus imaging based on the final flight time to obtain a weld defect image after beam path correction.

2. The method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network according to claim 1, characterized in that, Before obtaining EBSD data of the weld area in step S1, the process also includes weld specimen preparation, which includes the following steps: Metal samples are taken from the center and both sides of the weld along the thickness direction of the weld, and the cross-sectional dimensions of the metal samples are 10~20mm×10~30mm. The metal sample is inlaid with conductive thermosetting resin or conductive cold-setting resin to expose the weld cross-section. The cross section of the sample was mechanically ground with silicon carbide sandpaper with grit sizes ranging from 200# to 2000# until there were no obvious scratches on the surface; The sample cross-section was finely polished using suspensions with particle sizes of 5 μm and 0.5 μm. After fine polishing, the sample cross-section was finally polished using 0.05 μm silica gel to achieve a mirror-like finish. The final polished sample is then subjected to electrolytic polishing or chemical etching treatment. The treated sample was placed on a scanning electron microscope equipped with an EBSD probe, and the sample was scanned with an accelerating voltage of 15–25 kV, a sample tilt angle of 70° and a step size of 0.1–2 μm to obtain crystal orientation measurement data covering the weld area.

3. The method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network according to claim 1, characterized in that, The process of constructing the grain diagram structure in S1 includes: S11. Repair unindexed or low-quality points in EBSD data through neighborhood interpolation or orientation continuity. S12. Based on crystal orientation clustering or misorientation threshold, perform grain segmentation on EBSD measurement points to obtain the grain set of the weld region. S13. Treat each grain as a node in the graph and assign node characteristics such as average orientation, phase type, area, perimeter, and local orientation distribution to the nodes. S14. Establish edge connections based on grain contact relationships, and assign edge features such as grain boundary type, misorientation angle, grain boundary length, and local propagation direction angle to each edge; form a grain diagram structure that includes the above node features and edge features.

4. The method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network according to claim 1, characterized in that, S2 includes: S2.

1. Based on the average grain orientation obtained from EBSD data, and combined with anisotropic elastic constants or empirical models, determine the equivalent sound velocity in different directions. S2.2 Calculate the effect of cross-boundary refraction on propagation speed at the grain boundary based on the angle between the incident direction and the grain boundary normal direction; Let the grain boundary normal direction be The unit vector of the incident direction is The incident angle is obtained from the incident direction and the grain boundary normal direction. The refraction angle is obtained according to the generalized Snell's law, and its calculation formula is as follows: in, For the sound wave in the grain on the incident side, along the incident direction The corresponding direction-dependent equivalent speed of sound during propagation. For sound waves in the refracting grains, along the refraction direction The direction-dependent equivalent speed of sound during propagation; Angle of refraction The calculation formula is: The formula for calculating the direction of propagation after refraction is: The formula for calculating the directional sound velocity in a refracting grain is: The formula for calculating the propagation time across grain boundaries is: in, It is the equivalent propagation path length of the sound beam in the neighborhood of the grain boundary along the direction of propagation after refraction when crossing the grain boundary; S2.

3. Calculate the initial estimate of the edge propagation time by combining the grain boundary length and the length of the local propagation path segment; Let the grain boundary normal be The direction of propagation after refraction The grain boundary length is The length of a local path segment can then be expressed as: Obtain the equivalent speed of sound in the direction of refraction. Then, the initial propagation time estimate of the grain boundary edge is obtained: S2.

4. Based on the columnar or mixed crystal structure that may exist in the weld area, the initial propagation time is directionally corrected to obtain the corrected initial propagation time weight.

5. The method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network according to claim 4, characterized in that, S2.4 includes: Based on step S2.3, a directionality correction term is introduced, assuming the grain principal axis direction is... The direction of propagation after refraction is The angle between the two is The directional correction of the columnar crystal region can be expressed as: in, The initial propagation time weight after correction for the columnar crystal region. The directionality coefficient of columnar crystals; For mixed-crystal regions, a correction term is constructed by combining the local misorientation angle statistics extracted by EBSD, and its calculation formula is as follows: in, The initial propagation time weight after correction for the mixed crystal region. The standard deviation of the neighborhood misorientation angle. This is a mixed crystal orientation correction coefficient used to characterize the influence of the degree of local grain orientation dispersion in the mixed crystal region on the ultrasonic propagation time.

6. The method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network according to claim 1, characterized in that, S3 includes: S3.

1. Use the average grain orientation, phase type, area, perimeter, and local orientation distribution as node input features; S3.2, use grain boundary type, misorientation angle, grain boundary length, and the included angle of local propagation direction as edge input features; S3.

3. Use message-passing neural networks, GraphSAGE, GIN, or graph attention networks based on attention mechanisms to perform multi-layer information aggregation on node features and edge features; S3.

4. Output the corrected edge propagation time weight or equivalent slowness of grain boundary edges in different propagation directions through the edge readout module of the graph neural network. The hidden edge vectors obtained after message passing in the graph neural network Node features associated with it and Concatenation yields the edge-level joint feature vector. A multilayer perceptron regression network, consisting of 1 to 3 linear layers and a ReLU activation function; the results obtained through the multilayer perceptron regression network... ,in, This represents the intermediate estimate of the predicted propagation time weights of the corresponding grain boundary edges between nodes u and v in the grain diagram under a specified propagation direction, obtained by graph neural network regression; the output layer outputs the corrected propagation time weights of the grain boundary edges under the specified propagation direction. ,in, To correct the subsequent propagation time weights, The weight matrix is ​​a linear transformation matrix. represents the dimension of the input features to the multilayer perceptron. This represents the intermediate latent feature vector obtained after several layers of linear transformation and activation function processing in the MLP. For bias terms; S3.

5. Using the corrected initial propagation time weights obtained in step S2.4 as a supervision signal, train the graph neural network to improve the accuracy of propagation time estimation.

7. The method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network according to claim 1, characterized in that, S4 includes: S4.

1. Use the corrected edge propagation time weights or equivalent slowness output by the graph neural network in step S3 as the weight inputs for each edge of the grain graph structure. S4.2 Using Dijkstra's algorithm, A* search algorithm, or multi-source shortest path algorithm based on priority queue, with each element of the ultrasonic array as the starting point and each pixel of the imaging grid as the ending point, calculate the shortest propagation time from the starting point to the ending point. The shortest propagation time is the flight time from the array element to the corresponding imaging pixel. S4.

3. In the process of calculating the shortest propagation time, a penalty factor is introduced; the penalty factor is determined based on the grain boundary orientation, the number of grain boundary crossings, or the local propagation angle change. S4.4 Organize the flight times from all array elements to each pixel into a flight time lookup table; the flight time lookup table is a three-dimensional array. ,in, It is an array index. These are imaging network coordinates; the table content is the oscillating element. To pixel Shortest propagation time .

8. The method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network according to claim 1, characterized in that, S5 includes: S51. The relevant parameters of the array elements and pixels in the input neural network replacement model include: the spatial position of the array elements of the ultrasonic array, the array element index, the imaging pixel coordinates, the depth, and the statistical characteristics of the average orientation and misorientation angle of the grains in the pixel neighborhood. S52. Constructing network structures for alternative neural network models: one or more combinations of multilayer perceptron, feedforward network with Fourier features, SIREN network, or coordinate-conditional Transformer network. S53. Use the flight time obtained in step S4 or the corrected side propagation time output in step S3 as the supervision signal for the neural network replacement model. S54. With the goal of minimizing the error between the predicted value and the supervision signal, train the neural network substitution model; after training, input the relevant parameters of the array elements and pixels, and output the flight time between the array elements and the imaging pixels.

9. The method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network according to claim 1, characterized in that, S6 includes: S61. Normalize the flight time obtained in step S4 and the flight time obtained in step S5 respectively to make their dimensions consistent. S62. Obtain historical scan data or test data of calibration blocks, and calculate the average error of the methods in step S4 and step S5 in the data, respectively, denoted as... and ; Calculate the fusion weights using the inverse error normalization method and ,in, , The weights satisfy ; S63. The final flight time is calculated using a linear weighting, weighted average, or confidence-based nonlinear fusion method, combined with the fusion weights; the formula for linear weighting is as follows: , To represent the flight time between array elements and imaging pixels calculated based on the shortest propagation time search method, This represents the flight time between array elements and imaging pixels, as predicted by the neural network substitution model.

10. The method for correcting the ultrasonic beam path of a weld seam using a grain diagram neural network according to claim 1, characterized in that, S7 includes: S71. Acquire the ultrasonic echo signals of the weld seam received by each element of the ultrasonic array. Using the final flight time obtained in step S6, perform time alignment processing on the echo signals of each element and then perform coherent superposition. S72. Using the full focusing method or its improved algorithm, calculate the sound pressure amplitude or energy distribution pixel by pixel on the imaging grid to obtain the initial imaging result; S73. In the coherent superposition process of multi-element echo signals, a weighting coefficient is introduced; the weighting coefficient is determined based on the consistency or stability of the flight time of each element. S74. Post-process the initial imaging results; the post-processing includes envelope extraction, contrast enhancement and noise suppression, to obtain a weld defect image after sound beam path correction.