Ultrasonic perception full-focus online detection method for metal components based on phase-coherent gradient inversion

CN122612752APending Publication Date: 2026-08-21EAST CHINA UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611106309.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0009]针对现有超声全聚焦检测技术依赖固定先验声速、成像伪影多、信噪比低、离线检测滞后、优化算法易局部最优、前端设备算力不足等缺陷,本发明提供一种基于相位相干梯度反演的金属构件超声感知全聚焦在线检测方法,以实现以下目标:

Benefits of technology

[0039] First, it achieves autonomous sound velocity sensing and high-precision autofocus: Abandoning the limitations of traditional total focusing imaging (TFM) which relies on a preset fixed sound velocity, it innovatively utilizes Hilbert transform to extract instantaneous phase features and constructs a phase coherence loss objective function using the slowness (s=1/c) as a variable for gradient inversion. This method can autonomously invert the true spatial sound velocity distribution within materials, effectively overcoming the sound velocity mismatch problem caused by material composition fluctuations or anisotropy, and significantly improving imaging resolution and defect location accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122612752A_ABST
    Figure CN122612752A_ABST
Patent Text Reader

Abstract

A kind of metal component ultrasonic perception full focusing online detection method based on phase coherent gradient inversion, adopts ultrasonic phased array full matrix acquisition FMC to obtain original ultrasonic echo signal of metal component, extracts signal instantaneous phase characteristics by Hilbert transform;Phase coherent index PCF is constructed by fusing minimum effective element constraint, element directivity weighting and out-of-bound path elimination;Based on PCF, a global phase coherent loss objective function is constructed;With slowness s=1 / c as the optimization variable, the gradient descent optimization algorithm of Adam optimizer combined with cosine annealing strategy is used to iteratively invert the material space sound speed field, and the real medium sound speed distribution is obtained by randomly initializing the slowness initial value global optimization;Using the high-precision sound speed field obtained by inversion, full focusing TFM delay compensation and stacking reconstruction are completed, high signal-to-noise ratio defect imaging is generated, and in-situ online nondestructive testing of metal component casting, forging and machining is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of ultrasonic nondestructive testing and intelligent manufacturing online quality monitoring technology. Specifically, it relates to an ultrasonic sensing full-focusing online inspection method for metal components based on phase coherence gradient inversion, which is applicable to in-situ nondestructive defect detection throughout the entire manufacturing process of metal load-bearing components in aerospace, nuclear power equipment, and high-end engineering machinery. Background Technology

[0002] As core load-bearing components, key metal components in the aviation and nuclear power fields are prone to problems such as cracks, porosity, slag inclusions, looseness, grain anisotropy, and residual stress during casting, forging, heat treatment, and machining. These hidden internal defects directly determine the operational safety of the equipment, making it essential to conduct high-precision non-destructive testing.

[0003] Ultrasonic phased array total focusing imaging (TFM) is currently the mainstream technology for high-precision non-destructive testing in industry. It relies on acquiring echoes from the entire phased array (FMC) and superimposing them pixel by pixel with time delay to achieve full-domain focusing, resulting in high imaging resolution. However, existing TFM technology has the following engineering bottlenecks:

[0004] First, the sound velocity parameter is highly dependent on prior calibration: the accuracy of delay superposition compensation depends entirely on the preset fixed sound velocity; fluctuations in the composition of metal materials, grain orientation, residual stress, and temperature changes will cause uneven spatial distribution of sound velocity. Moreover, the preset fixed sound velocity is mismatched with the actual medium, which will cause focus shift, energy dispersion, image artifacts, and a decrease in signal-to-noise ratio, making it impossible to identify minute defects.

[0005] Second, the offline detection mode is outdated and cannot be adapted to intelligent manufacturing production lines: Traditional detection adopts the process of "offline sampling - laboratory calibration - ultrasonic testing". Metallographic, electron microscopy and other detection methods are destructive tests that can only observe local areas. The detection cycle is long and cannot achieve real-time in-situ feedback of the processing process. Existing ultrasonic equipment has limited front-end computing power, and high-precision iterative calculation takes a long time, making it difficult to balance on-site real-time performance and imaging accuracy.

[0006] Third, severe imaging artifacts and failure of edge defect identification: The number of effective ultrasonic propagation paths is small at the edges of components and in areas with abrupt changes in thickness. Insufficient ray samples during coherent calculations result in a large number of artifacts. Large-angle oblique incident ultrasonic echoes suffer severe attenuation and low signal-to-noise ratio. Equal weighted superposition introduces a large amount of noise, further reducing the accuracy of defect identification. Existing algorithms lack physical sound field constraint mechanisms and cannot suppress invalid low signal-to-noise ratio echoes.

[0007] Fourth, the sound velocity optimization has poor optimization ability and poor convergence effect: traditional grid search and local perturbation optimization are inefficient and are prone to getting trapped in local optima; conventional fixed learning rate gradient descent has a slow convergence speed, and direct iteration of sound velocity parameters has nonlinear solution instability problems, making it impossible to achieve accurate inversion of the global sound velocity field.

[0008] Existing technologies lack integrated solutions for layered lightweight acquisition architecture, multiple physical sound field constraints, adaptive gradient optimization, and global random initial value optimization, making it difficult to meet the online, high-precision, and sampling-free real-time detection requirements of high-end metal component manufacturing lines. Summary of the Invention

[0009] To address the shortcomings of existing ultrasonic full-focusing detection techniques, such as reliance on fixed prior sound velocities, numerous imaging artifacts, low signal-to-noise ratio, offline detection lag, susceptibility to local optima in optimization algorithms, and insufficient computing power of front-end equipment, this invention provides an online ultrasonic sensing full-focusing detection method for metal components based on phase coherence gradient inversion, to achieve the following objectives:

[0010] First, a layered lightweight architecture is used, with a lightweight front-end microcontroller for data acquisition and a high-precision GPU host computer for iteration, balancing real-time performance and imaging accuracy on the production line.

[0011] The second and third physical constraints filter out invalid echoes and suppress edge artifacts and low signal-to-noise ratio large-angle echo interference.

[0012] Third, using slowness as the optimization variable, Adam+cosine annealing adaptive gradient descent and random global initial values ​​are used to achieve accurate global inversion of the sound speed field.

[0013] Fourth, it requires no destructive sampling or laboratory calibration, enabling in-situ online TFM high-quality imaging throughout the entire metal manufacturing process for precise defect localization.

[0014] The present invention provides an online ultrasonic sensing method for full-focusing detection of metallic components based on phase coherence gradient inversion, comprising the following steps:

[0015] S1. Signal acquisition steps: A multi-element ultrasonic phased array transducer is used to scan the metal component under test, and the original one-dimensional ultrasonic time-domain echo signal is obtained through full matrix acquisition FMC mode.

[0016] S2. Phase extraction step: Perform Hilbert transform on the original one-dimensional ultrasonic time-domain echo signal to extract the instantaneous phase features corresponding to each array element channel and construct a phase feature dataset;

[0017] S3. Steps for constructing a phase coherence loss objective function with multiple physical constraints: Discretize the imaging region into grid pixels, calculate the sound wave propagation time of flight based on the current sound speed model; sequentially introduce physical boundary rejection constraints, minimum effective element pair constraints, and element directivity weighted constraints to screen effective element pairs, calculate the weighted normalized phase coherence index PCF; construct a global loss objective function for evaluating imaging focusing quality based on all effective pixels;

[0018] S4. Intelligent inversion steps of sound velocity field gradient: Define the slowness s=1 / c as the optimization variable, and randomly generate the initial value of global random slowness; use the gradient descent optimization algorithm to iteratively calculate in the phase feature space, and output the spatial sound velocity mapping distribution map of the component under test by minimizing the global loss objective function;

[0019] S5. Self-focusing TFM defect imaging reconstruction step: Based on the high-precision spatial sound velocity field obtained by inversion in step S4, the sound wave propagation delay of each transmit-receive array element pair is recalculated; phase delay compensation and weighted superposition are performed on the original ultrasonic echo signal to complete the full-focusing TFM imaging reconstruction, generate an image of the internal defects of the metal component, and output the three-dimensional spatial positioning result of the defect.

[0020] Furthermore, the present invention also includes:

[0021] In particular, step S3 specifically includes the following sub-steps:

[0022] S301. Divide the two-dimensional imaging grid, calculate the propagation flight time from each group of transmit-receive array elements to each pixel point in combination with the current sound speed model, extract the corresponding time-time analytical signal and complete the phase normalization process.

[0023] S302. Introducing triple physical constraints to filter invalid array element pairs:

[0024] ① Physical out-of-bounds elimination constraint: Directly eliminate all array element pairs whose propagation flight time exceeds the system's preset sampling time window;

[0025] ② Minimum effective element pair constraint: A minimum effective element pair number threshold is preset. Only when the total number of effective element pairs satisfying the time-of-flight constraint of a pixel is greater than the threshold can the pixel participate in phase coherence calculation.

[0026] ③ Array element directional weighting constraint: The array element diffraction Sinc factor and the sound wave propagation tilt angle Cos factor are combined to construct an adaptive weighting coefficient, and the weight of array element pairs corresponding to large angles and long propagation paths is reduced;

[0027] S303. Based on the set of effective array element pairs filtered by triple physical constraints, calculate the weighted normalized phase coherence index PCF(r) and construct the global phase coherence loss objective function:

[0028]

[0029] In the formula, This represents the total number of valid pixels involved in the calculation. This is the weighted normalized phase coherence index corresponding to pixel r.

[0030] In particular, in step S302, the threshold value of the minimum effective array element constraint is 10 to 15, which is used to eliminate imaging artifacts caused by insufficient number of effective ray samples in the edge field of view and occluded area of ​​the component.

[0031] In step S302, the adaptive combination weighting coefficients of the array element directional weighting constraint The expression is: in, The angle between the target pixel and the normal of the corresponding array element is used as a weighting coefficient to attenuate the large tilt angle, low signal-to-noise ratio echo, forming a soft signal-to-noise ratio threshold.

[0032] In particular, in step S4, at a slow speed As the gradient inversion optimization variable, the Adam optimizer is used in combination with the cosine annealing learning rate strategy to complete the iterative update. The Adam optimizer uses the first-order momentum and second-order moment of the gradient to adaptively and dynamically adjust the parameters to update the step size. The cosine annealing mechanism makes the global learning rate decay cosinely with the iteration cycle and restart periodically, so as to achieve fast convergence in the early stage of iteration, fine local optimization in the later stage of iteration and escape from the local optimum.

[0033] In particular, in step S4, the range of the initial value of the global random slowness is preset according to the inherent sound velocity characteristics of the metal material to be tested; for approximately homogeneous metal components, there is no need to specify the nominal sound velocity, perform local perturbation initialization, and only need to perform global random initialization to quickly converge to the global optimal sound velocity of the suitable component.

[0034] In particular, in step S4, the gradient descent optimization algorithm automatically calculates the partial derivatives of the objective function with respect to the slowness model based on the chain rule; the partial derivatives include three layers of gradient propagation relationships: the gradient of the phase coherence factor with respect to the normalized phase, the gradient of the normalized phase with respect to the propagation time of flight, and the gradient of the propagation time of flight with respect to the local slowness; the gradient of the objective function with respect to the spatial slowness distribution and the slowness model are solved iteratively by using the automatic differentiation framework.

[0035] In particular, in step S4, the scalar space slowness s(r) is used as the macroscopic equivalent propagation slowness, without introducing a high-dimensional anisotropic elastic tensor model; by absorbing and compensating for the local sound velocity deviation caused by the grain orientation, residual stress, and composition fluctuation of the metal component through global gradient optimization, accurate self-focusing imaging of macroscopic defects such as cracks and pores is achieved under the premise of ensuring real-time detection computing power constraints.

[0036] In particular, after reconstruction by self-focusing full-focusing imaging in step S5, it is used to identify internal defects such as cracks, pores, inclusions, looseness, and segregation in metal components, and simultaneously outputs the three-dimensional positioning data of the defect plane coordinates and depth; the signal-to-noise ratio of the reconstructed imaging results is significantly improved compared with the traditional fixed single sound velocity TFM imaging method.

[0037] This method also features a lightweight online detection architecture with decoupled front-end and back-end computing power, simultaneously coordinating steps S1 to S5 to complete online quality judgment and real-time feedback. The front-end adopts a lightweight single-chip microcomputer processing architecture, which is only responsible for ultrasonic probe motion control, ultrasonic scanning, FMC raw echo data caching, and Ethernet data transmission. It does not perform gradient iteration and high-precision imaging calculations, and can quickly output a rough estimate of the component's sound velocity. The back-end is equipped with a GPU parallel computing industrial host computer, which centrally performs all high-precision calculations such as Hilbert phase extraction, triple-constraint objective function construction, Adam cosine annealing gradient inversion, spatial variable sound velocity TFM reconstruction, defect coordinate analysis, and production line data interaction. The time taken for a single complete sound velocity inversion and defect imaging is controlled within 10 seconds. Finally, the high-precision defect imaging results and the three-dimensional spatial coordinates of the defects are pushed to the production line control system in real time, realizing in-situ, sampling-free, real-time closed-loop online defect detection of metal components in the entire process of casting, forging, heat treatment, and machining.

[0038] Compared with existing technologies, the present invention has the following outstanding advantages:

[0039] First, it achieves autonomous sound velocity sensing and high-precision autofocus: Abandoning the limitations of traditional total focusing imaging (TFM) which relies on a preset fixed sound velocity, it innovatively utilizes Hilbert transform to extract instantaneous phase features and constructs a phase coherence loss objective function using the slowness (s=1 / c) as a variable for gradient inversion. This method can autonomously invert the true spatial sound velocity distribution within materials, effectively overcoming the sound velocity mismatch problem caused by material composition fluctuations or anisotropy, and significantly improving imaging resolution and defect location accuracy.

[0040] Second, a triple physical constraint mechanism is introduced to suppress imaging artifacts: physical boundary violation removal, minimum effective element pair constraint, and element directional weighting (Sinc and Cos factors) are incorporated into the objective function construction. This mechanism, based on the acoustic wave propagation law, deeply filters effective rays, effectively eliminates invalid data interference, removes field-of-view edge artifacts, and significantly improves the signal-to-noise ratio of small defects.

[0041] Third, the optimized inversion algorithm balances global optimization with computational stability: it employs the Adam optimizer combined with a cosine annealing learning rate strategy, along with global random slow initialization. This algorithm framework effectively avoids the pitfalls of traditional optimization methods that easily get trapped in local optima, significantly reducing the number of iterations while ensuring convergence to the global optimum, thus laying the foundation for real-time online detection.

[0042] Fourth, a layered collaborative architecture is constructed to overcome the bottleneck of online detection: a hardware and software collaborative architecture of "lightweight front-end acquisition + high-precision back-end iteration" is adopted. The front end achieves rough sound velocity estimation at the second level, while the back end relies on GPU parallel computing to complete fine inversion and imaging, compressing laboratory-level fine analysis to the second-level time acceptable to the production line, and truly realizing in-situ closed-loop quality monitoring of the entire metal manufacturing process without sampling or calibration.

[0043] Fifth, it has strong universality, covering a wide range of metal components and manufacturing processes; the number of algorithm array elements, ultrasonic frequency, and imaging grid size can be flexibly adjusted according to the thickness and material of the components; it is applicable to commonly used metals in aviation and nuclear power such as steel, aluminum, and titanium alloys, covering the entire process of casting, forging, heat treatment, and machining, and has a wide range of industrial application scenarios. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the online detection method of the present invention;

[0045] Figure 2 This is a schematic diagram illustrating the application process of the online detection method of the present invention;

[0046] Figure 3 This is a schematic diagram comparing the phase coherence vectors under different sound speed matching conditions in this invention, to show the phase superposition result;

[0047] Figure 4 This is a schematic diagram of the scanning and inspection of metal components using an ultrasonic phased array probe in this invention;

[0048] Figure 5 This is a schematic diagram of the original echo waveform acquired by the full-matrix ultrasonic acquisition in this invention, that is, the acquired original waveform curve;

[0049] Figure 6 The target loss function and the inverted sound velocity convergence curve in the gradient iteration process of this invention are shown to illustrate the results of autonomous sound velocity perception and intelligent optimization iteration.

[0050] Figure 7 This is a comparison image of the defect imaging method of the present invention and the traditional fixed sound velocity TFM, including sound velocity distribution mapping, to show the defect results detected by the self-focusing method. Detailed Implementation

[0051] The core of this invention aims to theoretically and practically solve the problems of rapid detection and in-situ feedback on modern intelligent manufacturing production lines, overcoming the lag inherent in existing models. While introducing a complete scalar slowness model, such as one with 21 independent elastic constants, would be theoretically more perfect, it would introduce an extremely large computational burden and highly complex local extremum problems, completely contradicting the original intention of this invention for online real-time processing. Therefore, this invention employs a scalar slowness model... In engineering, it should be defined as the macroscopic equivalent sound speed (Effective / Apparent Sound Speed). Through the iteration of spatial distribution, it absorbs local acoustic fluctuations in a dimensional reduction and approximation manner, which is sufficient to meet the self-focusing imaging and precise positioning requirements of large-scale macroscopic defects such as cracks and pores.

[0052] It should be noted that, in order to ensure the computational efficiency of online real-time detection in industrial settings, and to address the grain anisotropy problem present in metal forging and rolling components, this invention does not employ the computationally complex anisotropic elastic tensor model in the sound velocity inversion model. Instead, it uses spatial slowness... Defined as the macroscopic equivalent propagation slowness at the reconstructed pixel. This equivalent scalar model, optimized through global gradient descent, can absorb and compensate for macroscopic path length errors caused by local anisotropy with relatively low computational cost. When dealing with the detection of large-scale processing defects commonly found in industrial settings, such as cracks, porosity, and inclusions, this equivalent inversion strategy significantly reduces the dimensionality of the inversion problem while maintaining imaging spatial resolution, representing the optimal engineering balance between end-to-end mapping and real-time feedback.

[0053] Further research and analysis revealed that:

[0054] First, this invention chooses a simple and lightweight algorithm. Specifically, it involves performing a scan rather than iteration, and after acquiring the ultrasound data, transmitting it back to the host computer for high-precision analysis. The reason for this is that, under laboratory conditions, a host computer performing fine iterations produces results in about ten seconds on a GPU device, while in engineering, based on feasible high-precision sound velocity conditions, a microcontroller takes at least one minute to produce results, providing a rough estimate of the sound velocity.

[0055] Secondly, this invention, leveraging the convenience of integrating numerous optimizers into the code, also introduces minimum effective element pair constraints and weighted constraints based on physical element directivity. Firstly, the minimum effective element pair constraint, used in the edge noise prevention optimizer, aims to prevent severe artifacts from being introduced at reconstructed points in edge fields of view or occluded areas due to insufficient ray participation in coherent calculations. This invention introduces a minimum intersection element pair threshold constraint, such as setting the minimum number of effective element pairs to 10. Only when the number of effective element pairs satisfying the time-of-flight constraint at a focused grid point exceeds this threshold is the point allowed to participate in the calculation of the coherent objective function (PCF). Secondly, the weighted constraint based on physical element directivity, used in the signal-to-noise ratio physical proxy optimizer, does not employ equal phase coherent accumulation but instead introduces adaptive coherent weighting (W) based on the physical sound field radiation directivity. combinedBy fusing the Sinc function diffraction factor and the Cos function tilt factor of the element aperture, the weights of element pairs under large angles and long propagation paths are dynamically reduced. Since large-angle rays often involve severe ultrasonic attenuation and low signal-to-noise ratio (SNR) in actual industrial flaw detection, this directional constraint essentially acts as a soft SNR threshold, highly focusing the coherent field onto the main energy radiation region. Furthermore, a physical out-of-bounds elimination optimizer is included to forcibly isolate element pairs whose propagation time overflows the sampling window.

[0056] Third, this invention discovers that in actual backpropagation, the derivative of the slowness s (i.e., 1 / c) is used for iterative updates, rather than directly differentiating the speed of sound c. Therefore, as the core of the learning rate strategy, this invention sets the adaptive learning rate implementation as an Adam optimizer combined with a cosine annealing algorithm. Specifically, the Adam mechanism uses adaptive learning rate estimation based on the first and second moments of the objective function gradient to dynamically adjust the update step size of the slowness parameter. The cosine annealing mechanism, in conjunction with Adam, ensures that the global learning rate decays and restarts periodically as a cosine function with the number of iterations, thus guaranteeing a rapid decrease in the early stages of iteration and a finer search in later stages, while also possessing the ability to escape local optima.

[0057] Fourth, this invention achieves the expected results through experiments on approximately homogeneous structures, focusing on finding a single suitable sound velocity with initial random numbers, rather than optimizing by perturbation around a sound velocity.

[0058] This invention presents a complete process for an ultrasonic sensing full-focus online inspection method for metal components based on phase coherence gradient inversion. It sequentially executes six core steps: lightweight ultrasonic acquisition, phase feature extraction, construction of a multi-constrained phase coherence objective function, slow adaptive gradient inversion, full-focus autofocus imaging, and online quality output for the production line. This enables in-situ high-precision non-destructive defect detection throughout the entire metal manufacturing process.

[0059] This invention can introduce one or more of the following engineering lightweighting and acceleration strategies during the gradient optimization process:

[0060] 1. Effective Path Clipping and Physical Constraints: A minimum effective element pair threshold constraint and a physical out-of-bounds rejection mechanism are introduced. When calculating phase coherence, element pairs that exceed the sampling time window due to sound path overflow are pre-rejected. Simultaneously, only when the number of effective transmit / receive element pairs satisfying the physical time-of-flight constraint at a given imaging grid point exceeds a set threshold (e.g., 10 pairs) does that point participate in the calculation of the objective function (PCF). This can significantly filter out invalid calculations at the edges of the field of view or in occluded areas.

[0061] 2. Acceleration via Adaptive Optimizer: The gradient inversion process can employ adaptive momentum optimizers such as Adam, combined with a cosine annealing learning rate scheduling strategy. By dynamically estimating the update step size using first- and second-order momentum, the global learning rate decays periodically with each iteration. This ensures the model quickly crosses the plateau region in the early stages of iteration, performs a fine-grained search in later stages, and possesses the ability to escape local optima, effectively reducing the total number of iterations required to reach convergence.

[0062] 3. Multi-scale spatial downsampling inversion: A coarse-to-fine hierarchical iterative mechanism can be adopted. In the initial stage of inversion, a low-resolution sparse imaging grid is established for slow global search; after the objective function decreases and tends to stabilize, the coarse slow model is mapped and interpolated to a high-resolution grid for local fine optimization. This strategy can exponentially reduce the computational load of the early iterations.

[0063] 4. Anti-interference optimization of gradient calculation: The Sinc and Cos functions are combined, and an adaptive coherent weighting constraint based on the physical element orientation is introduced. Essentially, this acts as a 'soft signal-to-noise ratio threshold,' suppressing the interference of high-frequency noise and low-SNR large-angle rays on gradient calculation. Simultaneously, the first / second-order momentum mechanism of the Adam optimizer and the periodic decay of cosine annealing effectively suppress severe oscillations in the early stages of iteration, preventing overfitting noise. By eliminating invalid data and reducing noise weights through element orientation weighting, implicit regularization is incorporated, and an Adam optimizer with momentum and cosine annealing is used to resist severe oscillations.

[0064] By adopting the aforementioned optional lightweight strategy, this invention can significantly reduce memory usage and computation time without changing the core inversion logic, providing a highly flexible engineering balance solution, thereby meeting the real-time requirements of intelligent manufacturing production lines for rapid in-situ feedback of non-destructive testing.

[0065] This invention addresses the pain points of traditional ultrasonic all-focusing imaging, such as reliance on preset fixed sound velocities, image defocusing due to material anisotropy / process fluctuations, prominent edge artifacts, poor signal-to-noise ratio of large-angle echoes, offline detection lag, and the need for destructive sampling. The algorithm employs a dual architecture of lightweight front-end acquisition and high-precision iteration on a host computer GPU, balancing real-time performance and imaging accuracy. Multiple physical constraints suppress noise artifacts, and an adaptive optimizer improves convergence speed and global optimization capabilities. It eliminates the need for metallographic sampling and calibration, and can be directly embedded into closed-loop online quality inspection in metal manufacturing production lines to accurately identify and spatially locate internal defects such as cracks, pores, inclusions, and looseness.

[0066] like Figure 1 As shown, the defect detection technology for the entire metal manufacturing process based on ultrasonic autonomous sensing and focusing includes the following steps:

[0067] S1. Ultrasonic phased array data acquisition; lightweight acquisition of ultrasonic front end; scanning of the metal part under test using an ultrasonic phased array transducer to acquire raw one-dimensional ultrasonic phased array signal data.

[0068] S2. Phase feature information extraction; Hilbert transform phase extraction; Based on the original one-dimensional ultrasonic phased array signal data, the received signal is processed to extract phase feature information;

[0069] S3. Construction of the objective function for focusing evaluation; Construction of the objective function for triple physical constraints phase coherence; Based on the phase characteristic information and combined with the phase matching criterion, construct an objective function for evaluating the focusing quality of the image;

[0070] S4. Intelligent inversion and autonomous perception of sound velocity parameters; Adam+cosine annealing gradient slowness inversion; Initialize sound velocity parameters, use gradient descent optimization algorithm to perform iterative calculation in the phase feature space of the objective function, and achieve intelligent inversion and autonomous perception of the actual sound velocity parameters of the material by minimizing the objective function.

[0071] S5. Self-focusing imaging reconstruction; adaptive sound velocity full-focusing imaging and online output; based on the real-time sound velocity parameters obtained by autonomous sensing, the original one-dimensional ultrasonic phased array signal is subjected to phase delay compensation and superposition, and self-focusing imaging reconstruction is performed to generate imaging and positioning results reflecting internal processing defects and damage of metal parts.

[0072] In the application of this invention, such as Figure 2 As shown, the main contents include:

[0073] First, signal acquisition and scanning are performed. The ultrasonic phased array transducer is used to scan and detect the metal part under test. The array elements are excited sequentially through the multi-element structure of the array transducer and the echo signal is received synchronously to obtain one-dimensional raw ultrasonic phased array full matrix (FMC) signal data containing information on different combinations of transmitting and receiving array elements.

[0074] Secondly, signal processing and phase extraction are performed; based on the original signal data, the received signal is processed, such as by Hilbert transform and instantaneous phase calculation. The phase characteristic information of the echo signal is extracted by analyzing the signal, thereby obtaining phase data that can reflect the propagation path and propagation characteristics of the sound wave inside the material.

[0075] Third, a focusing evaluation function is constructed. After obtaining the phase feature information, based on the phase features and combined with the phase matching criterion, the phase consistency of the echo signals of different array elements at the same pixel position within the imaging region is analyzed, and an objective function for evaluating the imaging focusing quality is constructed. This objective function can characterize the degree of coherent superposition of array signals in space, thereby reflecting the quality of imaging focusing under the current sound speed conditions.

[0076] Fourth, intelligent inversion and autonomous sensing of sound velocity parameters are performed. This includes initializing the material's sound velocity parameters and using a gradient descent optimization algorithm to iteratively calculate within the phase feature space of the objective function. By continuously updating the sound velocity parameters and minimizing the objective function, intelligent inversion and autonomous sensing of the actual sound velocity parameters of the material are achieved, enabling the sound velocity model to gradually approximate the propagation characteristics of the real medium and confirming the actual sound velocity parameters of the material.

[0077] Fifth, sound velocity field determination and self-focusing imaging reconstruction; after obtaining the optimized sound velocity parameters, the precise sound velocity field is calculated, the sound wave propagation time is recalculated based on the real-time sound velocity obtained by autonomous sensing, the phase delay compensation is performed on the original one-dimensional ultrasonic phased array signal, and the compensated signal is superimposed and reconstructed, that is, the original signal is subjected to phase delay compensation and superposition (Delay-and-Sum), and self-focusing imaging reconstruction is performed to achieve self-focusing imaging, thereby obtaining an ultrasonic image with higher focusing quality, and finally generating imaging and positioning results that reflect the internal processing defects and damage of metal parts.

[0078] In practical applications, specifically:

[0079] (1) Acquisition of ultrasonic phased array data;

[0080] First, an ultrasonic phased array testing system is used to scan and inspect the metal part under test. During the inspection, the ultrasonic phased array probe is acoustically coupled to the surface of the part under test through a couplant to ensure that the ultrasonic waves can effectively penetrate into the material. The phased array transducer used is a multi-element array structure, and each element can independently complete the transmission and reception functions. The testing system excites each element in the array to emit ultrasonic waves in a preset excitation sequence, while all elements in the array synchronously receive the echo signals from inside the material.

[0081] During this process, the system is able to obtain information from the first... Each element is launched, the first The echo signal received by each array element is represented in the time domain as follows:

[0082]

[0083] in; Represents the Hilbert transform. This represents the real part of the complex signal.

[0084] in, , , This represents the number of array elements in the transducer. By sequentially exciting all elements and receiving the echo signals, a complete set of element transmit-receive combined data can be obtained, thus forming full matrix capture (FMC) data for ultrasonic phased arrays. This data can comprehensively reflect the characteristics of sound wave propagation and scattering within materials, providing fundamental data for subsequent signal processing and imaging calculations.

[0085] (2) Phase feature information extraction;

[0086] After obtaining the raw echo signal, analytical signal processing is required to extract phase information that reflects the wave field propagation characteristics. Specifically, for each echo signal... Perform Hilbert transform to obtain its analytic signal representation:

[0087]

[0088] in, Represents the Hilbert transform operator. The imaginary unit is denoted by . An analytic signal is a complex signal, with its real part being the original signal and its imaginary part being the result of the Hilbert transform.

[0089] Based on this, the instantaneous phase information of the signal can be further calculated:

[0090]

[0091] in, This represents the phase operation function for complex signals. Through the above processing, the phase change information of the transmitted and received signals of each array element on the time axis can be obtained. Compared with the traditional method that only uses signal amplitude information, the signal phase can more sensitively reflect the changes in the sound wave propagation path and propagation mismatch, thus providing more reliable feature information for subsequent imaging quality assessment.

[0092] (3) Calculation of phase coherence and construction of objective function;

[0093] After extracting the phase information, a two-dimensional imaging grid is established within the detection area, and the detection area is divided into multiple imaging pixels. For each pixel, based on the positional relationship between the transmitting and receiving elements in the array transducer, and the currently assumed material sound velocity parameters, the propagation time of the sound wave from the transmitting element to the pixel and back to the receiving element can be calculated:

[0094]

[0095] Let the coordinates of the launch array element be... The coordinates of the receiving array element are Then the corresponding pixel point The propagation time satisfies

[0096]

[0097] in,

[0098]

[0099] In the formula: The local speed of sound along the propagation path; For the corresponding slowness; This refers to the transmission path.

[0100] This invention employs a homogeneous medium and a linear propagation model, which can be further simplified to...

[0101]

[0102] in, For uniform slowness, This represents the Euclidean distance.

[0103] Subsequently, the analytical signal value is extracted at the corresponding propagation time position, and the normalized phase is calculated:

[0104]

[0105] in, To prevent division overflow when the amplitude of the analyzed signal envelope approaches zero, the stabilization parameter is usually determined based on the signal's dynamic range, typically taken as a small positive number near the lower limit of the signal amplitude. It can be set as follows:

[0106] This ensures the numerical stability of the normalization calculation process without significantly affecting the phase calculation results. The experiments in the embodiments of this invention application uniformly used... Value selection. Through the above normalization process, the influence of signal amplitude differences can be eliminated, allowing phase information to play a dominant role in coherence analysis.

[0107] Next, the phase coherence factor (PCF) calculation formula adopts a weighted constraint based on the element directivity and introduces combined weights to statistically analyze all element paths that satisfy the propagation time constraint, thus constructing a set of effective element pairs. And calculate pixel points Phase coherence index at:

[0108]

[0109] in,

[0110] In the formula: For the directional weights of array elements; The angle between the pixel and the normal direction of the array element.

[0111] In this invention, The absolute value is taken, and the phase coherence factor (PCF) of the complex signal mean modulus is retained instead of the industry standard cross-correlation factor (CCF) or sign coherence factor (SCF). The core reason for this is to meet the requirements of lightweight and real-time algorithms in industrial settings, and to highlight the physical significance of pure phase feature extraction.

[0112] In the PyTorch high-dimensional tensor acceleration architecture used in this invention, traditional CCF usually relies on the ratio between coherent superposition energy and incoherent total energy for calculation, which requires a large number of squaring operations. The calculation results are easily affected by the signal amplitude envelope attenuation, resulting in high overall computational complexity.

[0113] In contrast, the PCF calculation process used in this invention is extremely simple.

[0114] The first step is to normalize the signal, retaining only phase information and eliminating the influence of amplitude:

[0115]

[0116] After this step, all valid signals are mapped to unit vectors on the complex plane.

[0117] The second step is to average and modulo all unit phase vectors:

[0118] .

[0119] Compared to traditional methods, this invention reduces the computational complexity from O(M²) to O(M), significantly decreasing the computational load in the full matrix acquisition (FMC) data processing. According to complex function theory, the magnitude of the mean of a complex vector can rigorously characterize the degree of directional convergence of multiple phase vectors; therefore, PCF can accurately reflect the phase consistency between ultrasound signals.

[0120] Therefore, this invention eliminates the need for extensive energy squaring calculations required by traditional CCF methods, enabling accurate evaluation of phase consistency and significantly reducing computational complexity. On a GPU platform, thousands of gradient iterations can be completed in approximately ten seconds; even on embedded lower-level machine platforms with limited computing power, reliable sound velocity estimation can be achieved in about one minute, meeting the needs of rapid in-situ detection in industrial settings.

[0121] Combining the physical dimensions of the array elements with the propagation characteristics of ultrasonic waves, the directional weight of a single-sided array element is represented by the product of a non-normalized sine function (Sinc) and a cosine function, and its expression is:

[0122]

[0123] in,

[0124]

[0125] In the formula:

[0126] Let be the angle between the pixel and the normal direction of the array element, where and These are the included angles relative to the transmitting element and the receiving element, respectively; The physical width of a phased array element; The wavelength of the ultrasound wave in the medium.

[0127] The number of valid paths M is the cardinality of the set Ω of valid transmit / receive array pairs, i.e.

[0128]

[0129] The set of effective array element pairs is defined as follows:

[0130]

[0131] in:

[0132] For element i, the ultrasonic wave is emitted, and the ultrasonic wave passes through the pixel. After reflection, the corresponding round-trip propagation time of the sound wave is received by array element j; T min T is the lower limit of the sampling time window. max This is the upper limit of the sampling time window.

[0133] Therefore, M represents the total number of effective transceiver array element combinations that satisfy the sampling time window constraint and are not affected by factors such as edge occlusion.

[0134] This phase coherence index describes the degree of phase consistency of the echo signals from different array elements at a given pixel location. When the sound velocity model matches the actual propagation characteristics, the phases of the signals from each array element tend to be consistent. The value is close to 1; when the propagation model does not match the actual material properties, the phase of the signals of each array element shows obvious dispersion. The value will decrease significantly.

[0135] To evaluate the focus quality of the overall imaging area, a set of pixels is selected within the reconstructed region. And construct an objective function based on the phase coherence index:

[0136]

[0137] in, This indicates the number of pixels in the reconstructed region. For pixel set The summation of dummy variables in the equation.

[0138] This objective function can reflect the overall phase consistency of the array signal in space under the current sound speed conditions, and serve as an evaluation index for subsequent intelligent optimization of sound speed parameters.

[0139] Since this invention uses gradient descent for parameter optimization, it is necessary to clarify that the objective function has a definite lower bound and explain the physical meaning of the lower bound.

[0140] In this invention, each normalized phase vector is a unit vector with a magnitude of 1. Therefore, the magnitude of the average of multiple unit vectors must satisfy: 0 ≤ PCF(r) ≤ 1

[0141] Further define the objective function:

[0142]

[0143] Therefore, the objective function also satisfies: 0 ≤ L ≤ 1

[0144] From a mathematical perspective, gradient descent is guaranteed to have a definite and finite optimization objective.

[0145] In this invention, the normalized phase signal Let be a unit vector on the complex plane.

[0146] According to the triangle inequality for the summation of complex vectors, the magnitude of the average vector, i.e. the phase coherence factor PCF(r), strictly satisfies: 0 ≤ PCF(r) ≤ 1.

[0147] When it is assumed that the sound velocity parameter is consistent with the actual sound velocity of the material, the propagation time of each array element is perfectly matched and the phase vector direction is consistent. At this time, PCF(r) = 1.

[0148] When the sound velocity parameters are severely mismatched, the propagation times deviate significantly, and the phase vectors are randomly distributed in the complex plane, canceling each other out. At this time, PCF(r) → 0.

[0149] Therefore, the present invention constructs the following objective function:

[0150]

[0151] Its range also strictly satisfies: 0 ≤ L ≤ 1

[0152] The smaller the objective function L, the higher the overall phase consistency of the ultrasonic signal in the entire reconstruction region, meaning that the sound velocity or slowness model obtained in the current iteration is closer to the true physical state of the material.

[0153] Therefore, by using the gradient descent optimization algorithm to continuously minimize the objective function L, both mathematically and physically, it corresponds to continuously approximating the sound velocity parameters of the real material, thus forming a complete parameter optimization closed loop.

[0154] (4) Intelligent inversion and autonomous perception of sound velocity parameters;

[0155] After constructing the objective function, the material's sound velocity parameters are initialized, and the sound velocity model is iteratively updated using a gradient descent optimization algorithm. First, the relationship between sound velocity and slowness is defined:

[0156]

[0157] in, Indicates spatial location The speed of sound at that location, This indicates the corresponding slowness parameter.

[0158] During the iterative optimization process, the objective function is minimized. The slowness model is updated in the following form:

[0159]

[0160] in, Indicates the first The slow-speed model updated in the next iteration;

[0161] Indicates the first The slowness model corresponding to the next iteration;

[0162] This represents the learning rate for gradient descent;

[0163] Describe the objective function Regarding the slowness model The partial derivative of is the gradient direction corresponding to the current iteration.

[0164] in,

[0165]

[0166] in:

[0167] The target loss function is used to characterize the imaging focus quality corresponding to the current sound velocity (or slowness) distribution;

[0168] For pixels to be optimized The slowness at that point satisfies the local speed of sound.

[0169]

[0170] For an effective set of transmit and receive array elements;

[0171] This is the phase coherence factor corresponding to the pixel.

[0172] For array element Launch, array element Receive corresponding signals at pixel points Normalized phase at the location;

[0173] T i,j The propagation time of the array element pair ij corresponding to pixel point r is composed of the sum of the transmission propagation time and the reception propagation time;

[0174] This represents the gradient of the phase coherence factor with respect to the normalized phase.

[0175] It represents the normalized phase gradient with respect to propagation time, reflecting the sensitivity of the analytic signal phase to changes with propagation time;

[0176]

[0177] This represents the gradient of propagation time with respect to local slowness, which corresponds to the contribution of changes in local slowness along the propagation path to flight time.

[0178] The chained differentiation process described above can be automatically completed by, for example, the PyTorch automatic differentiation framework, thereby realizing the gradient calculation of the objective function with respect to the spatial slowness distribution and using it for subsequent gradient descent optimization.

[0179] By continuously calculating the gradient of the objective function with respect to the slowness parameter and updating the slowness model in the direction that reduces the objective function, the sound speed parameter can gradually approximate the actual propagation characteristics of the material. In practical implementation, the learning rate can be adjusted using a manually preset strategy, a piecewise adjustment strategy, or an adaptive adjustment strategy to ensure stable convergence of the algorithm.

[0180] After multiple iterative calculations, a sound velocity mapping distribution map of the area to be measured can be obtained, thereby enabling autonomous perception of the spatial variation characteristics of sound velocity within the material.

[0181] (5) Autofocusing imaging reconstruction;

[0182] After obtaining the optimized sound velocity parameters or sound velocity distribution model, the propagation time between the transmitting, pixel, and receiving array elements is recalculated, and delay compensation is applied to the original array signal. The compensated array element signals are then superimposed and reconstructed at the corresponding pixel locations to achieve autofocus imaging.

[0183] When the sound velocity model matches the actual propagation characteristics of the material, the echo signals from the actual defect location can achieve highly coherent superposition in space, resulting in a concentrated energy imaging result. Signals from noise or non-defect areas are effectively suppressed due to phase inconsistency. Ultimately, ultrasonic imaging results with high focusing quality and good signal-to-noise ratio can be obtained, enabling clear imaging and accurate location of processing defects such as internal cracks, pores, and inclusions in metal parts.

[0184] Furthermore, in traditional metal manufacturing processes, internal defect detection often relies on offline testing or destructive sampling analysis, such as laboratory ultrasonic testing or metallographic sampling. These methods are time-consuming and make it difficult to obtain real-time information about the internal quality of components during manufacturing, hindering the long-term realization of online non-destructive testing. This invention introduces a phase coherence-based autonomous sound velocity sensing and intelligent optimization mechanism, enabling the ultrasonic phased array system to achieve high-quality imaging without the need for pre-calibration of material sound velocities. This makes rapid online detection of internal defects in metal components possible.

[0185] This invention acquires echo signals from an ultrasonic phased array and extracts phase feature information. It then constructs an imaging quality objective function based on a phase-matching criterion and uses a gradient descent optimization algorithm to iteratively invert the sound velocity of the material, achieving autonomous perception of the material's propagation characteristics. After obtaining optimized sound velocity parameters, the array signals are corrected for propagation time and compensated for phase, then superimposed and reconstructed to achieve self-focusing imaging. This results in clearer defect imaging and defect localization.

[0186] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0187] Example 1: Online defect detection of aerospace aluminum alloy forgings;

[0188] This embodiment uses a 64-element linear ultrasonic phased array probe. The workpiece under test is an aerospace 7075 aluminum alloy forging with a thickness of 60mm. Artificial cracks and porosity defects are pre-set inside. The probe is deployed at the online inspection station of the post-forging heat treatment production line. Step 1: Layered data acquisition; the microcontroller controls the phased array probe to perform a full-matrix FMC acquisition, buffering all 64×64 groups of transmit-receive echo raw data. The data is transmitted via Ethernet to an industrial host computer equipped with an RTX GPU. The microcontroller outputs a rough average sound velocity of 6300m / s locally for 1 minute, and the host computer initiates high-precision iteration.

[0189] Step 2: Phase extraction; The host computer performs Hilbert transform on all 4096 channels of echo signals, calculates the instantaneous phase for each channel, and constructs a full array phase feature dataset.

[0190] Step 3: Construct the multi-constraint phase coherence objective function; the imaging grid step size is 0.5 mm, and the minimum effective element pair threshold is set to 10; element pairs with propagation times exceeding 20 μs of the sampling window are removed;

[0191] The weighting coefficients are calculated by combining the Sinc diffraction factor and the Cos tilt factor. For echoes with tilt angles greater than 45°, the weight is attenuated by 50%; the PCF index is calculated pixel by pixel, and a global loss objective function L is constructed.

[0192] Step 4: Slowness gradient adaptive inversion; randomly generate initial slowness values ​​in the range of 0.00012 to 0.00018 s / m, without relying on the 6300 m / s local perturbation; the optimizer uses Adam + cosine annealing, with a total of 800 iterations; each iteration updates the gradient of the slowness field, iterating until the loss function L converges when the fluctuation is less than 1e-4; finally, a two-dimensional sound velocity map is output, with the sound velocity in the central region of the component at 6300 m / s, and the sound velocity in the edge stress region decreasing to 6150–6250 m / s.

[0193] Step 5: Self-focusing TFM imaging reconstruction; The delay of each array element is recalculated using the spatial variable sound velocity field obtained by inversion, and the weighted superposition is used to complete the full-focus imaging; The imaging clearly identifies 0.3mm micropores and 2mm deep cracks inside the workpiece, with clear defect boundaries and no obvious edge artifacts. The signal-to-noise ratio is 3.2 times higher than that of traditional fixed sound velocity TFM.

[0194] Step 6: Online feedback from the production line; Defect coordinates and sound velocity distribution images are pushed to the production line PLC system in real time, forgings are automatically graded, and unqualified parts are automatically diverted, realizing uninterrupted online quality monitoring of the heat treatment process.

[0195] Example 2: Inspection of thick-walled stainless steel castings for nuclear power plants;

[0196] The method of this invention is used to test a 12mm thick stainless steel casting. After the random global slow initial value is iterated and converged, the sound velocity in the loose area inside the casting is significantly reduced. The triple constraint effectively suppresses the large-angle echo noise of the thick-walled workpiece. The loose and slag inclusion defects are completely imaged. No offline metallographic sampling verification is required. The total detection time is 12 seconds, which meets the requirements of rapid batch quality inspection of nuclear power components.

[0197] Figure 3 The phase coherence vector diagram shows that when the sound speed is correctly matched, the phase vectors of each element are in the same direction, and the PCF value is close to 1; when the sound speed is incorrectly fixed, the phase vectors are dispersed, and the PCF is significantly reduced.

[0198] Figure 4 The diagram shows a phased array probe coupled to the upper surface of a metal component, with multiple array elements independently transmitting and receiving ultrasound.

[0199] Figure 5 Original waveform curve: Time-domain ultrasonic echo waveform acquired by multi-channel FMC.

[0200] Figure 6 The iterative convergence curve is shown on the left: the loss function L decreases continuously with the number of iterations and tends to stabilize; the inverted sound velocity gradually converges to the actual material sound velocity on the right.

[0201] Figure 7 Comparison of TFM imaging before and after optimization: The traditional fixed sound velocity TFM image on the left has a large number of artifacts and blurred defects; the defect boundary of the imaging method of the present invention on the right is clear, and the spatial sound velocity distribution cloud map of the component is simultaneously superimposed.

[0202] It should be noted that the array structure, number of array elements, operating frequency, and scanning method in the method of this invention can all be adjusted according to the working conditions; the objective function and optimization strategy can also be appropriately modified according to specific application requirements, thereby establishing a damage identification standard system based on actual conditions, thereby assisting in defect type identification and intelligent assessment.

[0203] The algorithm parameters involved in this invention can be flexibly adjusted according to the on-site working conditions: the minimum effective array element threshold can be adjusted in the range of 8 to 15; the cosine annealing iteration period and Adam initial learning rate can be adaptively modified according to the uniformity of the metal material; the number of phased array probe elements and the ultrasonic center frequency can be adapted to different detection scenarios for thin and thick parts, all of which fall within the protection scope of this invention.

Claims

1. A method for online ultrasonic sensing full-focusing inspection of metallic components based on phase coherence gradient inversion, characterized in that, Includes the following steps: S1. Signal acquisition steps: A multi-element ultrasonic phased array transducer is used to scan the metal component under test, and the original one-dimensional ultrasonic time-domain echo signal is obtained through the full matrix acquisition FMC mode. S2. Phase extraction step: Perform Hilbert transform on the original one-dimensional ultrasonic time-domain echo signal to extract the instantaneous phase features corresponding to each array element channel and construct a phase feature dataset; S3. Steps for constructing a phase coherence loss objective function with multiple physical constraints: Discretize the imaging region into grid pixels, calculate the sound wave propagation time of flight based on the current sound speed model; sequentially introduce physical boundary rejection constraints, minimum effective element pair constraints, and element directivity weighted constraints to screen effective element pairs, calculate the weighted normalized phase coherence index PCF; construct a global loss objective function for evaluating imaging focusing quality based on all effective pixels; S4. Intelligent inversion steps of sound velocity field gradient: Define the slowness s=1 / c as the optimization variable, and randomly generate the initial value of global random slowness; use the gradient descent optimization algorithm to iteratively calculate in the phase feature space, and output the spatial sound velocity mapping distribution map of the component under test by minimizing the global loss objective function; S5. Self-focusing TFM defect imaging reconstruction step: Based on the high-precision spatial sound velocity field obtained by inversion in step S4, the sound wave propagation delay of each transmit-receive array element pair is recalculated; phase delay compensation and weighted superposition are performed on the original ultrasonic echo signal to complete the full-focusing TFM imaging reconstruction, generate an image of the internal defects of the metal component, and output the three-dimensional spatial positioning result of the defect.

2. The method for online ultrasonic sensing full-focusing inspection of metal components based on phase coherence gradient inversion according to claim 1, characterized in that, Step S3 specifically includes the following sub-steps: S301. Divide the two-dimensional imaging grid, calculate the propagation flight time from each group of transmit-receive array elements to each pixel based on the current sound speed model, extract the corresponding time-time analytical signal and complete the phase normalization process. S302. Introducing triple physical constraints to filter invalid array element pairs: ① Physical out-of-bounds elimination constraint: Directly eliminate all array element pairs whose propagation flight time exceeds the system's preset sampling time window; ② Minimum effective element pair constraint: A minimum effective element pair number threshold is preset. Only when the total number of effective element pairs satisfying the time-of-flight constraint of a pixel is greater than the threshold can the pixel participate in phase coherence calculation. ③ Array element directional weighting constraint: The array element diffraction Sinc factor and the sound wave propagation tilt angle Cos factor are combined to construct an adaptive weighting coefficient, and the weight of array element pairs corresponding to large angles and long propagation paths is reduced; S303. Based on the set of effective array element pairs filtered by triple physical constraints, calculate the weighted normalized phase coherence index PCF(r) and construct the global phase coherence loss objective function: In the formula, This represents the total number of valid pixels involved in the calculation. For pixels The corresponding weighted normalized phase coherence index.

3. The method for online ultrasonic sensing full-focusing inspection of metal components based on phase coherence gradient inversion according to claim 2, characterized in that, In step S302, the threshold value of the minimum effective array element constraint is 10 to 15, which is used to eliminate imaging artifacts caused by insufficient number of effective ray samples in the edge field of view and occluded area of ​​the component.

4. The method for online ultrasonic sensing full-focusing detection of metallic components based on phase coherence gradient inversion according to claim 2, characterized in that, In step S302, the adaptive combination weighting coefficients of the array element directional weighting constraint The expression is: in, The angle between the target pixel and the normal of the corresponding array element is used to attenuate the large tilt angle, low signal-to-noise ratio echo, forming a soft signal-to-noise ratio threshold.

5. The method for online ultrasonic sensing full-focusing inspection of metal components based on phase coherence gradient inversion according to claim 1, characterized in that, In step S4, at a slow speed As the gradient inversion optimization variable, the Adam optimizer is used in combination with a cosine annealing learning rate strategy to complete the iterative update. The Adam optimizer uses the first-order momentum and second-order moment of the gradient to adaptively and dynamically adjust the parameters to update the step size. The cosine annealing mechanism causes the global learning rate to decay cosinely with the iteration cycle and restart periodically.

6. The method for online ultrasonic sensing full-focusing inspection of metallic components based on phase coherence gradient inversion according to claim 5, characterized in that, In step S4, the range of the initial value of the global random slowness is preset according to the inherent sound velocity characteristics of the metal material to be tested.

7. The method for online ultrasonic sensing full-focusing inspection of metallic components based on phase coherence gradient inversion according to claim 1, characterized in that, This method also features a lightweight online inspection architecture with decoupled front-end and back-end computing power, synchronously cooperating with steps S1 to S5 to complete online quality judgment and real-time feedback. The front-end adopts a lightweight single-chip microcomputer processing architecture, which is only responsible for ultrasonic probe motion control, ultrasonic scanning, FMC raw echo data caching and Ethernet data transmission, without performing gradient iteration and high-precision imaging calculations, and can output a rough estimate of the component's sound velocity within 1 minute. The back-end is equipped with a GPU parallel computing industrial host computer, which centrally completes all high-precision calculations such as Hilbert phase extraction, triple-constraint objective function construction, Adam cosine annealing gradient inversion, spatial variable sound velocity TFM reconstruction, defect coordinate analysis and production line data interaction. The time for a single complete sound velocity inversion and defect imaging is controlled within 10 seconds. Finally, the high-precision defect imaging results and the three-dimensional spatial coordinates of the defect are pushed to the production line control system in real time.

8. The method for online ultrasonic sensing full-focusing inspection of metal components based on phase coherence gradient inversion according to claim 1, characterized in that, In step S4, the gradient descent optimization algorithm automatically calculates the partial derivatives of the objective function with respect to the slowness model based on the chain rule. The partial derivatives include three layers of gradient propagation relationships: the gradient of the phase coherence factor with respect to the normalized phase, the gradient of the normalized phase with respect to the propagation time of flight, and the gradient of the propagation time of flight with respect to the local slowness. The automatic differentiation framework is used to complete the gradient solution of the objective function with respect to the spatial slowness distribution and the iterative update of the slowness model.

9. The method for online ultrasonic sensing full-focusing inspection of metallic components based on phase coherence gradient inversion according to claim 1, characterized in that: In step S4, the scalar space slowness s(r) is used as the macroscopic equivalent propagation slowness, without introducing a high-dimensional anisotropic elastic tensor model; by absorbing and compensating for the local sound velocity deviation caused by the grain orientation, residual stress, and composition fluctuation of the metal component through global gradient optimization, accurate self-focusing imaging of macroscopic defects such as cracks and pores is achieved under the premise of ensuring real-time detection computing power constraints.

10. The method for online ultrasonic sensing full-focusing inspection of metal components based on phase coherence gradient inversion according to claim 1, characterized in that, In step S5, after reconstruction by autofocusing full-focusing imaging, it is used to identify internal defects such as cracks, pores, inclusions, looseness, and segregation in metal components, and simultaneously outputs the plane coordinates and three-dimensional positioning data of the defects.