Weld joint ultrasonic detection parameter optimization method based on particle swarm optimization

By optimizing the ultrasonic testing parameters of welds using the particle swarm optimization algorithm, the problems of low detection efficiency, susceptibility to noise interference, and uneven resource allocation in traditional methods are solved, thus achieving efficient and accurate weld defect detection.

CN120822076APending Publication Date: 2025-10-21SHENZHEN SHENLIAN STEEL CONSTR GRP CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510968172.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Traditional ultrasonic testing of welds relies on manual experience and process manual recommendations for parameter optimization, which is difficult to adapt to complex weld structures and various defect types. This results in low testing efficiency, signal acquisition being easily affected by background noise, a high risk of missing small defects, uneven resource allocation, and poor testing consistency.

Method used

A parameter optimization method for ultrasonic testing of welds based on particle swarm optimization is adopted. By combining an improved self-matching cubic spline interpolation method and a Latin hypercube sampling algorithm with a moving average filtering method and second derivative of curvature feature point detection, a parameter optimization focusing region is generated. A weighted matching degree function of signal-to-noise ratio and defect detection rate is constructed to drive constrained particle swarm optimization.

Benefits of technology

It significantly improves the signal-to-noise ratio and detection rate of complex weld defect detection, optimizes the allocation efficiency of detection resources in sensitive areas, enhances the matching of parameter optimization process with curvature distribution characteristics, and improves the consistency and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120822076A_ABST
    Figure CN120822076A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of nondestructive testing, in particular to a weld joint ultrasonic testing parameter optimization method based on particle swarm optimization, which comprises the following steps: acquiring a weld joint path three-dimensional coordinate sequence, combining structure prior and boundary conditions, removing abnormal points by self-matching cubic splines to regulate and control node density, generating a curvature data set, and optimizing weld joint ultrasonic testing parameters according to the curvature data set. Smooth processing is carried out to extract curvature derivative variation; a key section is screened; a parameter set is constructed and dense sampling is carried out; feature points are detected to generate a focusing area, a matching degree function is established to execute parameter optimization, and an optimal combination set is output. According to the method, on the basis of welding seam path coordinates and structure prior, self-matching cubic spline interpolation is improved to eliminate abnormal regulation density, curvature data is generated, filtering and derivative screening focusing sections, Latin sampling difference distribution parameters and derivative feature extension paths are performed, a matching degree function is constructed to drive particle swarm optimization, and parameter reinitialization matching energy is performed; the signal-to-noise ratio and the detection rate are improved, and the resource allocation efficiency is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of non-destructive testing, and in particular to a weld ultrasonic testing parameter optimization method based on a particle swarm algorithm. Background Art

[0002] The field of non-destructive testing technology belongs to the category of testing and monitoring engineering technology, and is mainly aimed at identifying, evaluating and controlling defects in materials, components or structures without destroying their integrity and performance. This technical field covers a variety of testing methods such as ultrasonic testing, radiographic testing, eddy current testing, magnetic particle testing, and penetrant testing. It obtains information on defects inside or on the surface of the object being tested through changes in physical parameters such as sound, light, electricity, and magnetism, and is widely used in industrial fields such as aerospace, energy, rail transportation, and shipbuilding. In the ultrasonic testing method, by exciting and receiving the propagation characteristics of sound waves in the medium being tested, combined with technical means such as probe layout, sound beam incident angle, frequency selection, and coupling method, internal defect detection of key parts such as welds can be achieved.

[0003] Among them, traditional weld ultrasonic testing parameter optimization methods refer to the selection and configuration of detection parameters involved in the process of identifying internal weld defects. The main problem is how to effectively collect and enhance defect signals by reasonably setting the detection frequency, beam angle, probe movement path, and coupling medium parameters in the context of complex weld structures and multiple defect types. This type of optimization method relies on manual experience based on weld material type, thickness, groove form, and defect type, or by consulting existing process manuals. Parameter setting is completed through step-by-step testing and debugging, and the process is relatively dependent on the subjective judgment and past experience of the inspector.

[0004] The optimization of traditional weld ultrasonic testing parameters relies on manual experience and recommendations in process manuals. When the weld groove forms are diverse or the material thickness varies greatly, the parameter setting needs to be adjusted through repeated experiments. The detection efficiency is subject to the technical level of the operator. The subjectivity of manual experience can easily cause the parameter configuration to deviate from the optimal range. The static parameter recommendation mode of the process manual is difficult to cover the dynamically changing weld curvature characteristics. There is a lack of quantitative identification mechanism for the sound beam incident angle and frequency sensitive areas. The detection signal acquisition is easily affected by background noise, the risk of missing minor defects is increased, and there is a tendency for uniformity in the allocation of detection resources. Insufficient detection density in key areas coexists with redundant resources in non-key areas. The consistency of detection is subject to the stability of manual operation. Summary of the Invention

[0005] In order to solve the problem that the optimization of traditional weld ultrasonic detection parameters depends on manual experience and process manual recommendations, when the weld groove forms are diverse or the material thickness varies greatly, the parameter setting needs to be adjusted through repeated experiments, the detection efficiency is subject to the technical level of the operator, the subjectivity of manual experience can easily lead to the parameter configuration deviating from the optimal range, the static parameter recommendation mode of the process manual is difficult to cover the dynamically changing weld curvature characteristics, there is a lack of quantitative identification mechanism for the sound beam incident angle and frequency sensitive areas, the detection signal acquisition is easily interfered by background noise, the risk of missing small defects is increased, the detection resource allocation has a tendency to be uniform, the detection density in key areas is insufficient and the resource redundancy in non-key areas coexists, and the detection consistency is subject to the stability of manual operation. The embodiment of the present invention provides a weld ultrasonic detection parameter optimization method based on particle swarm algorithm. The technical solution is as follows: On the one hand, a weld ultrasonic testing parameter optimization method based on a particle swarm optimization algorithm is provided, the method comprising: S1: The three-dimensional coordinate sequence of the weld path is obtained through industrial measurement equipment. Combined with the prior information of the weld structure and the boundary conditions, an improved self-matching cubic spline interpolation method is used to remove abnormal points and control the node density, and the curvature data set is output; S2: calling the curvature data set, smoothing it using a moving average filter method, extracting the absolute value of the change in the first-order derivative of the curvature of adjacent nodes, screening the segments where the absolute value of the change exceeds the curvature change amplitude threshold, and outputting the coordinate range of the key segment; S3: calling the coordinate range of the key section, constructing a candidate parameter set based on the preset parameter ranges of sound speed, incident angle, and frequency, dividing the set into basic density according to the section length ratio, allocating parameter combinations with enhanced density in the key section using the Latin hypercube sampling algorithm, and outputting an initial parameter set; S4: Call the initial set of parameters, perform feature point detection on the curvature second-order derivative sequence, locate the three-dimensional space coordinates corresponding to the derivative sign change point, expand the path length based on the three-dimensional space coordinates as the center, and generate a parameter optimization focus area.

[0006] As a further solution of the present invention, the improved self-matching cubic spline interpolation method and Latin hypercube sampling algorithm are combined with particle swarm optimization to more accurately optimize weld ultrasonic testing parameters; The parameter optimization focus area is used to constrain the particle swarm search space and drive the matching function to perform particle swarm optimization, thereby significantly improving the signal-to-noise ratio and defect detection effect; The curvature data set includes the curvature standard deviation, the node spacing standard deviation and the outlier confidence; the key section coordinate range includes the curvature change rate threshold, the curvature mutation interval length and the curvature second derivative extreme point; the initial parameter set includes the sound velocity gradient parameter, the incident angle discreteness and the frequency distribution histogram; the parameter optimization focus area includes the feature point neighborhood radius, the sound beam coverage density parameter and the focus area signal-to-noise ratio threshold.

[0007] As a further solution of the present invention, the specific steps of S1 include: S101: Obtain a three-dimensional coordinate sequence of the weld path using industrial measurement equipment, perform boundary offset judgment on the spatial coordinates of the weld structure nodes based on the boundary coordinate range marked by the measuring instrument, filter and eliminate node coordinates outside the boundary range, and obtain a filtered abnormal node coordinate set; S102: Based on the filtered abnormal node coordinate set, an improved self-matching cubic spline interpolation method is used to calculate the spacing between adjacent node curves according to the spatial order relationship of the nodes, and nodes with spacing greater than the weld boundary reference spacing are selected, and their spacing is adjusted to be close to the reference spacing to obtain a density-adjusted node sequence; The improved self-matching cubic spline interpolation method includes a node spacing standard deviation feedback adjustment mechanism, which triggers self-matching adjustment of the interpolation coefficient when the node spacing standard deviation exceeds the reference value by 15%; S103: According to the density adjustment node sequence, the node curvature is calculated for the three-dimensional coordinates of the interpolation curve nodes using a curvature radius calculation method, and nodes with small curvature radius are screened according to the local spatial curvature of the curve and corresponding curvature values ​​are extracted to obtain a curvature data set.

[0008] As a further solution of the present invention, the specific steps of S2 include: S201: calling the curvature data set, using a moving average filter method to set a sliding window to calculate the mean of the curvature values ​​of adjacent nodes, replacing the node values ​​in the original sequence with the calculated mean, correcting the local offset fluctuations in the original curvature, and generating a smooth curvature value; The sliding window length is set to 3-7, which is determined according to the curvature fluctuation degree and the node sampling density, and the sliding step size is set to 1 by default; S202: Based on the smoothed curvature value, perform a differential operation on the curvature offsets between adjacent nodes, take the absolute value of the differential result to construct a curvature rate sequence, calculate the numerical amplitude of the curvature change of consecutive nodes, and obtain the curvature change rate value; S203: Filtering the consecutive node indexes in the sequence whose values ​​are greater than the curvature change amplitude threshold according to the curvature change rate value, extracting the start and end coordinate intervals of the corresponding nodes, and obtaining the coordinate range of the key segment; The curvature change amplitude threshold is determined to be 0.15 mm based on the ROC curve analysis of 20 groups of Q235B steel test plates.-1 The defect detection rate reaches 92.3% and the false alarm rate is ≤7.8%.

[0009] As a further solution of the present invention, the specific steps of S3 include: S301: Retrieving the segment length data within the coordinate range of the key segment, extracting the preset upper and lower limits of the three parameters of sound speed, incident angle, and frequency, converting the ratio of the segment length to the total length, mapping the ratio value to the three-dimensional parameter axis and demarcating the segment intervals, extracting discrete values ​​at equal intervals, and generating a parameter ratio set density value; The parameter ratio set density value refers to the distribution density of the discrete parameter combination extracted at equal intervals in the space after mapping the ratio of the segment length to the total length to the three-dimensional parameter space of sound speed, incident angle, and frequency; S302: Based on the parameter ratio set density value, the number of required parameter combinations is determined according to the paragraph ratio, the set is divided into a base density region and an enhanced density region, and the parameter distribution data of the key sections are combined. The Latin hypercube sampling algorithm is used to divide the parameter dimension into equal probability spaces in the enhanced density region and perform stratified sampling operations to generate a sampling parameter set for the enhanced region; The enhanced density region refers to a sub-region in the parameter space that is sensitive to the results or critical, whose length accounts for ≥20% of the total length of the critical section and the number of parameter combinations accounts for ≥30% of the total number of the initial set. In this region, the accuracy of modeling or analysis is improved by encrypted sampling; The Latin hypercube sampling algorithm is used to perform stratified equal-probability sampling in the parameter space, covering the parameter distribution of key sections, and effectively improving sampling efficiency and representativeness; S303: Based on the enhanced area sampling parameter set and the parameter dimension combination data in the basic density area, the enhanced area sampling parameter set and the parameter dimension combination data are combined and spliced ​​in index order, and a deduplication operation is performed after unifying the parameter dimension arrangement rules to obtain an initial parameter set.

[0010] As a further solution of the present invention, the specific steps of S4 include: S401: Calling the initial parameter set, obtaining curvature second-order derivative sequence data, comparing the derivative values ​​of two adjacent points in the sequence, selecting the position coordinates where the positive and negative signs of the derivatives change, and recording the change point numbers in sequence order to generate a sign change coordinate set; S402: Based on the sign change coordinate set, equal amounts of data are intercepted on both sides of the sign change coordinate as the center to construct path data, the path start and end indexes are marked, and the path data sequence format is unified to generate a path segment set; S403: Calling the path segment set, extracting statistical means, full range indices, and dispersion ratios based on the segments, calculating the dispersion concentration ratio, determining the concentration distribution state of the parameters within the segment interval, merging the segment number ranges that meet the conditions, and generating a parameter optimization focus area; The discrete concentration ratio is a statistical indicator that measures whether a parameter has low volatility and high concentration in multiple segments at the same time, and is used to identify optimized areas that exhibit stable concentration.

[0011] As a further solution of the present invention, the discrete concentration ratio is calculated using the formula: ; in, Represents the first The discrete concentration ratio of the fragments, Representative The first path segment The parameter value of the data point, Representative The average value of the parameter value of the data points in the path segments, Representative The full range of parameter values ​​in the path segments, Representative The number of data points in a path segment is a dimensionless parameter, Representative The discrete ratio of parameter values ​​in the path segments is a dimensionless parameter. 、 、 All are Min-Max normalized and processed into dimensionless parameters.

[0012] As a further embodiment of the present invention, the method includes step S5: S5: calling the parameter optimization focus area, analyzing the regional curvature distribution characteristics to establish a weighted matching function of the signal-to-noise ratio and the defect detection rate, performing iterative updates in the constrained particle swarm optimization, and when the matching improvement rate is lower than the improvement rate threshold, performing parameter reinitialization and re-evaluating the beam energy focusing matching degree, and outputting an optimized parameter combination set; The optimization parameter combination set includes an optimal acoustic impedance matching parameter, a frequency bandwidth optimization value, and a particle swarm convergence radius parameter.

[0013] As a further solution of the present invention, the specific steps of S5 include: S501: Calling the parameter optimization focus area, extracting the curvature gradient change value and calculating its distribution density based on the regional curvature distribution characteristics, constructing a weighted matching function of the signal-to-noise ratio and the defect detection rate, respectively calculating the signal-to-noise ratio value and the defect detection rate value in the area, and generating signal-to-noise ratio defect detection rate distribution data; The weighted matching function is used to comprehensively evaluate the detection quality of the image focus area and reflects its effectiveness in defect recognition by balancing the signal-to-noise ratio and the defect detection rate. S502: calling the signal-to-noise ratio defect detection rate distribution data, initializing the data set using the constrained particle swarm optimization method, setting boundary rules and performing iterative updates, selecting particle parameters with high matching evaluation values ​​by comparing matching values, and obtaining an iterative particle parameter set; S503: Based on the iterative particle parameter set, the beam focusing matching degree is calculated and the matching degree change rate is determined to be lower than the improvement rate threshold. If it is lower, the particle parameters are reset and the matching degree is re-evaluated. If it is not lower, the current parameter set is retained and verification is performed to generate an optimized parameter combination set. The improvement rate threshold was verified by 50 particle swarm optimization experiments. Setting the threshold to 1.2% can make the algorithm converge after an average of 23 iterations and the parameter stability σ<0.05.

[0014] As a further solution of the present invention, the matching evaluation value is calculated using the formula: ; in, Representative Daizhongdi The matching evaluation value of each particle, Representative Daizhongdi The particle Optimized parameter values, Representative The mean of the optimization parameters in the current population, Representative The standard deviation of the optimization parameters in the current population, Representative The value of the optimization parameter corresponding to the global optimal particle in the previous generation, Representative The weighted coefficients of the optimization parameters, represents the total dimension of the parameters, To avoid small positive constants with zero denominators, 、 、 、 It is the dimensionless parameter of Z-score normalization.

[0015] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: Based on the three-dimensional coordinate sequence and structural prior information of the weld path, an improved self-matching cubic spline interpolation method is used to eliminate abnormal points and regulate node density to generate a high-precision curvature dataset. Moving average filtering and threshold screening of the first-order derivative of curvature are used to accurately locate the key sections for focusing the acoustic beam energy. The segment length ratio division and Latin hypercube sampling algorithm are combined to achieve differentiated density distribution of parameter combinations. The path length is extended to generate an optimized focusing area based on the detection of feature points of the second-order derivative of curvature. A weighted matching function is constructed to drive constrained particle swarm optimization. The beam energy matching degree is dynamically balanced under the parameter reinitialization mechanism, effectively improving the signal-to-noise ratio and detection rate of complex weld defect detection, enhancing the matching of the parameter optimization process to the curvature distribution characteristics, and optimizing the allocation efficiency of detection resources in sensitive areas. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Schematic diagram of the workflow of the present invention. DETAILED DESCRIPTION

[0017] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0018] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as an "exemplary" in the present invention should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner. Furthermore, in the embodiments of the present invention, "and / or" can mean both or either of the two.

[0019] In the embodiments of the present invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, when the distinction is not emphasized, the meanings they convey are the same. The terms "of," "corresponding," and "corresponding" may sometimes be used interchangeably. It should be noted that, when the distinction is not emphasized, the meanings they convey are the same.

[0020] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.

[0021] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0022] See also Figure 1 The embodiment of the present invention provides a weld ultrasonic testing parameter optimization method based on a particle swarm algorithm. The processing flow of the method may include the following steps: S1: The three-dimensional coordinate sequence of the weld path is obtained through industrial measurement equipment. Combined with the prior information of the weld structure and the boundary conditions, an improved self-matching cubic spline interpolation method is used to remove abnormal points and control the node density, and the curvature data set is output; S2: Call the curvature data set, use the moving average filter method to smooth it, extract the absolute value of the change of the first-order derivative of the curvature of adjacent nodes, filter the segments where the absolute value of the change exceeds the curvature change amplitude threshold, and output the coordinate range of the key segment; S3: Call the coordinate range of the key section, build a candidate parameter set based on the preset parameter range of sound speed, incident angle, and frequency, divide the set into basic density according to the section length ratio, use the Latin hypercube sampling algorithm to allocate the parameter combination of enhanced density in the key section, and output the initial parameter set; S4: Call the initial set of parameters, perform feature point detection on the curvature second-order derivative sequence, locate the three-dimensional space coordinates corresponding to the derivative sign change point, expand the path length based on the three-dimensional space coordinates as the center, and generate the parameter optimization focus area; S5: Call parameter optimization focus area, analyze regional curvature distribution characteristics to establish a weighted matching function between signal-to-noise ratio and defect detection rate, perform iterative updates in constrained particle swarm optimization, and when the matching improvement rate is lower than the improvement rate threshold, perform parameter reinitialization and re-evaluate the beam energy focusing matching degree, and output the optimized parameter combination set; The curvature data set includes the curvature standard deviation, the node spacing standard deviation and the outlier confidence. The key section coordinate range includes the curvature change rate threshold, the curvature mutation interval length and the curvature second derivative extreme point. The initial parameter set includes the sound velocity gradient parameter, the incident angle discreteness and the frequency distribution histogram. The parameter optimization focus area includes the feature point neighborhood radius, the sound beam coverage density parameter and the focus area signal-to-noise ratio threshold. The optimized parameter combination set includes the optimal acoustic impedance matching parameter, the bandwidth optimization value and the particle swarm convergence radius parameter.

[0023] Specifically, the steps of S1 are: S101: Obtain a three-dimensional coordinate sequence of the weld path using industrial measurement equipment, perform boundary offset judgment on the spatial coordinates of the weld structure nodes based on the boundary coordinate range marked by the measuring instrument, filter and eliminate node coordinates outside the boundary range, and obtain a filtered abnormal node coordinate set; After obtaining the three-dimensional coordinate sequence of the weld path based on industrial measurement equipment, it is first necessary to parse the data format output by the measurement equipment and extract the three-dimensional coordinate values ​​of the weld nodes. , where the spatial position data of each node needs to be compared with the measurement boundary coordinate range marked in the device to determine whether it is within the allowed detection boundary. The comparison process needs to be done separately for The three-axis coordinates perform threshold judgment operation, that is, to judge whether each node coordinate meets the If any axis data does not meet the conditions, the node will be judged as an out-of-bounds node and removed. In actual processing, the boundary coordinate range can be set as A rectangular cubic space, combined with a set of actual coordinate node sequences : ; Judge in sequence: Node 2 Out of range, node 3 If the nodes are out of range, both are marked as abnormal nodes and data is removed. Only nodes 1 that meet the three-axis range are retained. The removal operation is implemented by logical Boolean screening, that is, constructing a judgment logic array. , the corresponding three nodes are retained, and then a new node sequence is output for subsequent processing; for scenes with large data volume, such as when the total number of points in the weld path is 3000 nodes, the total number and proportion of nodes to be removed can be counted. Assuming that 120 nodes are removed, the proportion of abnormal nodes is , the number of valid coordinate points after elimination is 2880, and a new node coordinate set is generated; this data set can be used for subsequent interpolation and curvature calculation operations. Its structure and coordinate distribution need to be renumbered after elimination and ensure the order is consistent to avoid interpolation errors.

[0024] Table 1: Example of original node coordinates and boundary judgment of weld path (unit: mm)

[0025] As shown in Table 1, nodes 2 and 3 are beyond the boundaries in the x or y direction and are therefore eliminated. Only node 1 is retained and enters the next stage of the processing flow. This elimination mechanism effectively ensures the data reliability of subsequent interpolation and curvature calculations.

[0026] S102: Based on filtering out abnormal node coordinate sets, an improved self-matching cubic spline interpolation method is used to calculate the curve spacing of adjacent nodes according to the spatial order relationship of the nodes, and nodes with spacing greater than the weld boundary reference spacing are selected and their spacing is adjusted to be close to the reference spacing to obtain a density-adjusted node sequence; The improved self-matching cubic spline interpolation method includes a node spacing standard deviation feedback adjustment mechanism. When the node spacing standard deviation exceeds the benchmark value by 15%, the interpolation coefficient self-matching adjustment is triggered. Based on the coordinate set after the abnormal nodes have been removed, it is necessary to analyze the Euclidean distance between adjacent nodes pair by pair according to the arrangement order of each node in space, and record the distance between two adjacent points. and Spacing , for each spacing value Calculate the average value of node spacing and standard deviation If the standard deviation exceeds the benchmark value by 15% (for example, if the benchmark average spacing is set to 5.0mm, the benchmark standard deviation is set to 0.75mm), the self-matching adjustment mechanism of the interpolation coefficient is triggered, and the position of the interpolation point is corrected according to the information feedback to keep the spacing between nodes uniform. The specific processing process is: when the spacing of a certain node is When , the interval will be judged to be abnormally large, and a new transition node needs to be inserted in the interval. and Under the conditions, due to , so the insert operation is performed and the number of inserted nodes is: ; That is, a new node is inserted within the spacing, and the original curve area is reconstructed by cubic spline interpolation. The interpolation control points are set as the original two nodes in the segment. A smooth curve segment is constructed based on the continuity of the boundary curvature. The newly generated interpolation points are then inserted into the node sequence and renumbered. The interpolation coefficient is dynamically adjusted according to the distance deviation in the current segment. The initial coefficient is set to , when the standard deviation in the continuous interpolation segment does not drop below the threshold, it will automatically Reduce to 0.85, 0.75 and other levels and repeat the interpolation action until the overall spacing uniformity is met; in addition, re-count the node spacing and filter out those that are larger than the benchmark spacing The paragraph area is shortened by the self-matching interpolation process, and finally a density-adjusted node sequence is generated in which the node spacing is controlled within the reference deviation range.

[0027] S103: adjusting the node sequence according to the density, calculating the node curvature using the curvature radius calculation method for the three-dimensional coordinates of the interpolation curve nodes, screening nodes with small curvature radii according to the local spatial curvature of the curve, and extracting the corresponding curvature values ​​to obtain a curvature data set; After obtaining the node sequence after density adjustment, the curvature calculation operation needs to be performed for each spatial three-dimensional node. First, every three adjacent nodes are selected to form a local spatial three-point group. , calculate the radius of the circle formed by the three points As the curvature radius of the point, its calculation formula is: ; The modulus of the vector cross product is twice the area of ​​the triangle, reflecting the degree of curvature of the three points. If the value approaches 0 in space, the three points are close to collinear and the radius of curvature tends to infinity. On the contrary, if the value is small, it indicates that the curvature is significant. For example, the vectors are calculated as , the vector moduli are , the difference between the two vectors is , the cross product result is , substituting into the formula we get: ; After the calculation is completed, the curvature value of the node Record the curvature data set and make further judgments. If the value is less than the set threshold , it is considered that the area where the node is located changes slowly. If the curvature value is greater than , it is determined that there is a large degree of curvature; according to the threshold interval , the nodes in the high curvature area can be screened out, marked and classified into the high curvature curve area set, and finally a curvature data set is formed for weld detection path structure analysis and subsequent detection parameter partition setting.

[0028] Specifically, the steps of S2 are: S201: Call the curvature data set, use the moving average filter method to set a sliding window to calculate the mean of the curvature values ​​of adjacent nodes, replace the node values ​​in the original sequence with the calculated mean, correct the local offset fluctuations in the original curvature, and generate a smooth curvature value; The sliding window length is set to 3–7, determined by the curvature fluctuation degree and node sampling density, and the sliding step size is set to 1 by default; To call the previously completed curvature dataset, it is necessary to extract the curvature value sequence of each node in the order of the nodes, and set a sliding window to perform continuous value operations on it. For example, for the node curvature sequence If the sliding window length is set to 3, the first window covers nodes 1 to 3, and the corresponding curvature values ​​are 0.16, 0.18, and 0.23. The average of the three is , and replace the position value of the second node (i.e., the center point of the window) in the original sequence with this value, and slide the window again to cover nodes 2 to 4. The corresponding values ​​are 0.18, 0.23, and 0.21, and the average is , replace the third node value, and so on until the end of the curvature sequence. The sliding step size is 1 each time, and the node segments covered are 3, 3, and 3 overlapping subsequences respectively. The sliding average operation can effectively reduce the local offset value caused by data sampling error or transient anomaly. By calculating the average of each subsequence and replacing the original value, the initial data fluctuation is continuously corrected, and finally a new set of curvature value sequences is formed. The processing result in the example is Since the first and last nodes are not covered by the complete window, their original values ​​remain unchanged. In order to further match the node density changes in the differentiated structure path, the window length can be adjusted between 3 and 7. If the path nodes are dense or the curvature changes dramatically, a shorter window length (such as 3) can be used to retain details. Otherwise, it can be set to 5 or 7 to obtain a smoother sequence. At the same time, the mean operation within each sliding window needs to be implemented by calling the three node values ​​of the subsequence in sequence, adding them one by one and dividing them by 3. No weighting terms are used, and the average value taken is the mean value within the window. There is no need to introduce other function models or mathematical methods to judge the degree of smoothness. It is only calculated based on the original curvature value of the node, and finally the smoothed curvature sequence is constructed.

[0029] S202: Based on the smoothed curvature value, perform a differential operation on the curvature offsets between adjacent nodes, take the absolute value of the differential result to construct a curvature rate sequence, calculate the numerical amplitude of the curvature change of consecutive nodes, and obtain the curvature change rate value; Based on the above smoothed curvature value sequence, it is necessary to perform a difference operation on the curvature values ​​between two adjacent nodes to construct a curvature change rate sequence. The specific operation is to perform a subtraction operation on the curvature values ​​of two consecutive nodes in the sequence and take their absolute values. For example, for the smoothed curvature sequence First, take the curvature values ​​of node 1 and node 2 as 0.16 and 0.19, and the absolute value after subtraction is , is the first rate of change value, and then the values ​​of node 2 and node 3 are 0.19 and 0.2067, and the difference is , and so on to calculate the absolute value of the curvature difference between each pair of adjacent nodes, and finally construct the curvature rate sequence The number of nodes in this sequence is one less than that of the original curvature sequence. Since the difference operation involves two nodes, the first and last nodes do not participate in the curvature rate calculation. The curvature change rate value is composed of the smoothed curvature values ​​of the two participating nodes. The single change rate value is the absolute value of the difference between the two values. The operation does not involve any weights, coefficients or complex models. It is constructed only by conventional difference and absolute value operations. The change rate sequence is used to reflect the fluctuation amplitude of the continuous change of curvature, so as to judge whether there is a sharp turning or stable extension in the path area.

[0030] S203: Filter the consecutive node indexes in the sequence that are greater than the curvature change amplitude threshold according to the curvature change rate value, extract the start and end coordinate intervals of the corresponding nodes, and obtain the key segment coordinate range; The curvature change amplitude threshold is determined to be 0.15 mm based on the ROC curve analysis of 20 groups of Q235B steel test plates. -1 The defect detection rate reaches 92.3% and the false alarm rate is ≤7.8%; Based on the curvature change rate sequence, it is necessary to perform interval judgment on the rate value, filter out the continuous node index range whose change rate value is greater than the specified threshold, and map the index to the original three-dimensional coordinate sequence to extract the coordinate interval to form a key segment. For example, in the above change rate sequence , set the threshold to 0.015mm -1 , then each rate value is judged item by item: the first item is 0.03>0.015, which meets the conditions, the second item is 0.0167>0.015, which meets the conditions, the third item is 0.0034<0.015, which does not meet the conditions, and the fourth item is 0.03>0.015, which meets the conditions. Based on this rule, the node pairs that meet the conditions are (1, 2), (2, 3), (4, 5), and (5, 6). By merging the adjacent overlapping node indexes, continuous segments (13) and (46) are constructed. The start and end indexes of the nodes in the corresponding original coordinate sequence are the start and end coordinate ranges of the key segment. The corresponding actual coordinate examples are as follows: the coordinates of node 1 are (10, 10, 10), and the coordinates of node 3 are (14, 13, 11). Then the coordinate range of the key segment corresponding to this paragraph is After the segment coordinates that meet the conditions are extracted, they are added to the key segment list for subsequent path construction and processing. The threshold value is set based on the ROC analysis of 20 groups of samples in the Q235B steel weld inspection path data. The threshold value of 0.15mm is selected when the defect detection rate is 92.3% and the false alarm rate is not higher than 7.8%. -1 For reasonable reference, no fuzzy interval is set when making judgments. Any value greater than or equal to 0.15 is considered to meet the screening criteria. The following is an example. See the data sample listed in Table 2.

[0031] Table 2: Example of curvature change rate

[0032] As shown in Table 2, by comparing the change rate value of each node pair with the threshold, the node segments that meet the high curvature change rate are obtained and the corresponding spatial coordinate range is extracted to form the key segment.

[0033] Specifically, the steps of S3 are: S301: Calling the segment length data within the key segment coordinate range, extracting the preset upper and lower limits of the three parameters of sound speed, incident angle, and frequency, converting the ratio of the segment length to the total length, mapping the ratio value to the three-dimensional parameter axis and delineating the segment intervals, extracting discrete values ​​at equal intervals, and generating the parameter ratio set density value; The parameter ratio set density value refers to the distribution density of the discrete parameter combination extracted at equal intervals in the space after mapping the ratio of the segment length to the total length to the three-dimensional parameter space of sound speed, incident angle, and frequency; When calling the segment length data in the key segment coordinate range, it is necessary to first extract the key geometric segments in the weld structure model in the detection interval and mark the starting and ending coordinate points. For example, if the total length of the weld is set to 150mm and the key segment is set to between 35mm and 85mm, the length of the key segment is 50mm. Then, according to the ultrasonic propagation speed corresponding to the differentiated material weld in the material database, the fixed incident angle of the sensor probe, and the operating frequency, the upper and lower limit value ranges of the parameters in the three-dimensional parameter space need to be set. For example, the sound speed is set to [5000, 6300] m / s, the incident angle is set to [30°, 60°], and the frequency is set to [1MHz, 10MHz]. Then, the ratio of the key segment length to the total length is calculated as follows: , the ratio will be used for the mapping operation in three-dimensional space. When performing the mapping, the ratio value is used as the axial weight, and the mapping range of each segment with a length of 0.333 is delineated in the three-dimensional space. For example, taking the speed of sound axis as an example, a ratio of 0.333 is taken on its interval [5000, 6300], and the corresponding range is [5000, 5209]. The other two axes are also taken according to the ratio to form a three-dimensional cube space. Next, the sampling density is set according to the equal interval of each axis. For example, each axis is divided into 5 intervals, and 6 discrete points with equal intervals are obtained respectively, and a total of 100 points are generated. parameter combination points, each of which represents a discrete ultrasonic detection configuration, indicating the specific values ​​of sound velocity, incident angle, and frequency, forming a parameter ratio set density value. To further illustrate the mapping process, some parameter combination examples can be introduced as follows: Table 3: Example table of parameter ratio mapping combinations

[0034] As shown in Table 3, the sound velocity parameters are subdivided proportionally and increased in sequence. The incident angle and frequency are also arranged in the same equidistant manner to form a discrete set of parameters covering the critical section proportion. In the above operations, the mapping of the proportional values ​​must ensure that they match the physical detection boundaries to avoid the occurrence of out-of-bounds errors. When setting the parameter interval, a balance must be maintained between coverage completeness and computational feasibility. The density value of the parameter proportional set represents the density of discrete combinations in three-dimensional space, that is, the uniform distribution density of the 216 combinations in this mapping area, providing the input basis for the subsequent sampling strategy.

[0035] S302: Based on the parameter ratio set density value, the required number of parameter combinations is determined according to the paragraph ratio. The set is divided into a base density region and an enhanced density region. Combined with the key section parameter distribution data, the Latin hypercube sampling algorithm is used to divide the parameter dimension into equal probability spaces in the enhanced density region and perform stratified sampling operations to generate a sampling parameter set for the enhanced region. The enhanced density region refers to a sub-region in the parameter space that is sensitive to the results or critical. Its length accounts for ≥20% of the total length of the critical section and the number of parameter combinations accounts for ≥30% of the total number of the initial set. In this region, the accuracy of modeling or analysis is improved by dense sampling. The Latin hypercube sampling algorithm is used to perform stratified equal-probability sampling in the parameter space, covering the parameter distribution of key sections and effectively improving sampling efficiency and representativeness; According to the parameter ratio set density value, after obtaining 216 sets of parameter combinations, the number of parameter combinations required for sampling needs to be determined according to the proportion of the weld section to the total length. Assuming that the total sampling points are set to 120, the length of the key section is 33.3% of the total length, and the corresponding sampling number is The three-dimensional parameter space is divided into two parts, and the densely distributed sub-region in the key segment is selected as the enhanced density region. For example, when the incident angle is between 35° and 45°, the frequency is between 3MHz and 6MHz, and the sound speed is between 5083m / s and 5166m / s, the region accounts for 50% of the key segment and meets the requirements of region length ≥ 20% and number of combinations ≥ 30%. It can be defined as the enhanced density region, and the rest are basic density regions. Then, the Latin hypercube sampling operation is performed in the enhanced density region, and the three-dimensional space of the region is divided into 6 equal unit blocks. Stratified random sampling is performed, and 216 small cubic blocks of 6×6×6 are obtained after equal division on each axis. 40 groups of non-repeated parameter point combinations are randomly selected from the medium probability. For example, on the incident angle axis, it is divided as follows: [35°, 36.67°, 38.33°, 40°, 41.67°, 43.33°, 45°]; In each sampling, only one point value is extracted from each small interval of the multi-axis. For example, from the sound speed interval [5083, 5166] m / s, points 5089, 5104, 5119, 5134, 5149, and 5164 are selected according to the above method, and a complete sampling set is formed after combination. Since Latin hypercube sampling ensures that each dimension of the parameter space can be evenly sampled, its combination result can more effectively cover the sensitive areas of the key sections. For example, the following enhanced area parameter combinations: sound speed of 5119 m / s, incident angle of 41.67°, frequency of 5.2 MHz, sound speed of 5149 m / s, incident angle of 43.33°, frequency of 4.1 MHz, sound speed of 5164 m / s, incident angle of 44.5°, frequency of 3.3 MHz, etc., are all derived from the multidimensional partitioning results of Latin hypercube sampling. Each set of data represents a representative set of sampling points in the enhanced area and is used as input in the subsequent parameter model establishment stage.

[0036] S303: Based on the enhanced area sampling parameter set and the parameter dimension combination data in the basic density area, the parameters are combined and spliced ​​in index order, and a duplicate removal operation is performed after unifying the parameter dimension arrangement rules to obtain an initial parameter set; After the generation of the enhanced area sampling parameter set is completed, it is merged with the parameter combination obtained in the basic density area. During the merging operation, the index number is used as the splicing identifier of the parameter row. For example, the parameter group number in the enhanced area is 140, and the parameter group number in the basic area is 41120. They are spliced ​​into a 120-dimensional combination sequence in the order of numbers. After splicing, the arrangement order of the three-dimensional parameter axes needs to be unified to ensure that the combined data are output in a fixed order of "sound speed-incident angle-frequency". Then, deduplication operation is performed on all 120 groups of data to search whether there are the same three-dimensional parameter combination points. If there are completely repeated data rows (for example, sound speed = 5149m / s, incident angle = 40°, frequency = 5MHz, which exist in both areas), one of the records is retained and the duplicates are removed to ensure the uniqueness of the initial set of parameters. When performing duplicate detection in this process, the three-dimensional parameter fields need to be called separately and the values ​​compared. The judgment accuracy range is set. For example, the sound speed difference does not exceed ±0.1m / s, the incident angle difference does not exceed ±0.1°, and the frequency difference does not exceed ±0.01MHz, which are considered duplicates. The comparison logic is as follows: If there is a sound speed difference of , incident angle difference , frequency difference , it is classified as a duplicate record; the final output of this step is a unique initial set of parameters, including sampling points for subsequent ultrasound modeling and parameter optimization, to ensure the integrity and non-redundancy of the data structure. For example, the final unique initial set of parameters is 114 groups of data, with a deduplication rate of 5%.

[0037] Specifically, the steps of S4 are: S401: Call the initial parameter set to obtain the curvature second-order derivative sequence data, compare the derivative values ​​of two adjacent points in the sequence, select the position coordinates where the positive and negative signs of the derivatives change, and record the change point numbers in sequence order to generate a sign change coordinate set; Call the initial set of parameters. First, according to the curvature change signal data obtained during the ultrasonic detection of the weld, the corresponding second-order derivative sequence is obtained. In this process, the spatial position coordinates on the weld scanning path are first used as the independent variable, and the waveform curvature change shown in the detection signal is selected as the dependent variable. The second-order derivative value at each point is calculated by numerical differentiation. For example, a set of curvature sequences representing the weld echo signal response is collected at 0.1mm intervals. , use the central difference calculation method to obtain the corresponding second-order derivative sequence , and then traverse the two adjacent points in the derivative sequence in turn, for example By comparing the sign values ​​of the two points, we can identify whether there is a zero-crossing point that changes from positive to negative or from negative to positive. If so, we can determine the current position. For the sign change point, record the coordinate value of the point in the original sequence. For example, the 13th point change is recorded as coordinate 13. Add the sign change points in sequence to a change coordinate set array, for example , and further assign unique numbers to the coordinate points to mark the order in which the sign changes occur; among them, the standard for judging the "positive and negative sign transformation of the derivative" is: if , that is, when the product of the second-order derivative values ​​is less than zero, there is a sign change; in application, when the weld echo curvature produces a sudden change before and after the defect area, the derivative sequence shows a trend of alternating positive and negative values. This is used as a reference for subsequent path segment extraction, and finally a set of sign change point coordinates is generated. , used for subsequent fragment path construction operations.

[0038] S402: Based on the set of symbol change coordinates, equal amounts of data on both sides of the symbol change coordinates are intercepted to construct path data, the path start and end indexes are marked, and the sequence format of the path data is unified to generate a set of path segments; Coordinate set according to sign change , at each change point The path interception center is intercepted at its left and right sides, and the same number of derivative sequence data are intercepted on both sides to form path segments. The length of each segment is set according to the sampling accuracy of the detection equipment and the width of the data analysis window. For example, if 10 points are taken on the left and right sides, the actual length of the single segment path sequence is 21, that is, the starting point of the path is , the end point is In this way, the path data extraction task is performed on the symbol change points respectively to form multiple segments. For example, when the change points are 13, 26, 42, and 59, the path segments are respectively At the same time, the start and end index numbers of each path segment are marked, such as "Segment 1 start point: 3, end point: 23". The arrangement direction of multiple segments of data is unified from the start point to the end point, forming a path segment set. To ensure the representativeness of the path interception process and avoid the problem of missing boundary data, it is necessary to perform effective data correction or discard operations on the path segments that exceed the original sequence boundary. For example, if a change point is within the first 10 points or outside the last 10 points, it is necessary to discard the point or fill it with zeros. For example, when a change point is the 6th, the data in front of it is less than 10 points, which does not meet the interception criteria and is eliminated. The above operations standardize the path segments and save them as a structure array. The path segment length is fixed to 21 points, and each point corresponds to the normalized parameter value. In specific applications, if the ultrasound data after Min-Max normalization is used, its path data is shown in Table 4.

[0039] Table 4: Example values ​​for path segments

[0040] As shown in Table 4, the data of each point in the path segment are normalized derivative value data, and the segment set provides the basis for subsequent centralized distribution calculation and parameter focusing.

[0041] S403: Calling the path segment set, extracting the statistical mean, full range index and dispersion ratio based on the segments, calculating the dispersion concentration ratio, determining the concentration distribution state of the parameters within the segment interval, merging the segment number ranges that meet the conditions, and generating the parameter optimization focus area; The dispersion concentration ratio is a statistical indicator that measures whether a parameter has low volatility and high concentration in multiple segments at the same time. It is used to identify the optimization area with stable concentration. Call multiple path data segments in the path segment set, calculate the index of the normalized parameter value in each path segment segment by segment, and extract the average value respectively , full range , and the discrete ratio ,in is the segment standard deviation, and the discrete concentration ratio is calculated for each segment of data For example, for path segment 1, the fragment data is as follows: , through the Min-Max normalization formula: ; in , , the normalized data is: ; The average value , full range , standard deviation ,but , the amount of data in this segment , calculate the discrete concentration ratio, using the formula: ; in, Represents the first The discrete concentration ratio of the fragments, Representative The first path segment The parameter value of the data point, Representative The average value of the parameter value of the data points in the path segments, Representative The full range of parameter values ​​in the path segments, Representative The number of data points in a path segment is a dimensionless parameter, Representative The discrete ratio of parameter values ​​in the path segments is a dimensionless parameter. 、 、 All are Min-Max normalized and processed into dimensionless parameters.

[0042] Substitute the above parameters into the calculation: ; First calculate the numerator: ; 1; In this way, the corresponding path segments are calculated , then set the threshold to judge the degree of concentration. For example, if the threshold is set to 0.005, then The path segments of are considered to have concentrated parameter value distribution. The segment number range is recorded and adjacent segments are merged. If the consecutive numbers of path segments 2 and 3 meet the concentration criteria, the path segment number range is merged into segment 2-3. Finally, the path segment number set that meets the criteria is determined and recorded as , this set is the parameter optimization focus area. This result shows that in the path segment with a small D value, the parameters have a concentrated distribution feature within the segment interval, which meets the prior conditions for constructing the subsequent optimization model.

[0043] Specifically, the steps of S5 are: S501: Parameter optimization is called to focus on the area. Based on the regional curvature distribution characteristics, the curvature gradient change value is extracted and its distribution density is calculated. A weighted matching function of the signal-to-noise ratio and the defect detection rate is constructed. The signal-to-noise ratio value and the defect detection rate value of the area are calculated respectively to generate the signal-to-noise ratio defect detection rate distribution data. The curvature distribution data in the parameter optimization focus area is called. First, the curvature sequence value is collected for each path segment. Each segment is discretized into several measuring points according to the distance interval. The gradient change value sequence is constructed based on the absolute value of the difference between the curvature at each measuring point and the curvature of its adjacent measuring points. For example, a total of 5 sampling points are set in the path segment [15–35], and the measured curvature sequence is , perform difference operation on adjacent points, and get the gradient change value sequence as ,Right now , and then take the mean of the series as Then, the number of changes exceeding the mean value within the unit length is counted. In this section with a length of 1mm, there are three gradient change values ​​greater than 0.0325, so the curvature gradient change density is 3mm. -1, repeat the above process to traverse the path segments in the focus area, obtain the curvature gradient change density of each segment, and then use the density value of each path segment as the preliminary screening basis for the subsequent signal-to-noise ratio weighted calculation. Then, extract the signal-to-noise ratio data and defect detection rate data of the corresponding path segment from the known ultrasonic testing experiment. Taking the path segment [15–35] as an example, its signal-to-noise ratio is 25dB and the defect detection rate is 89%. The weighted coefficients of the signal-to-noise ratio and the defect detection rate are set to 0.6 and 0.4 respectively, and its comprehensive evaluation value is , this value is used as an indicator to characterize the quality of the path segment and is included in the signal-to-noise ratio defect detection rate distribution table. At the same time, the above process is repeated for the remaining path segments to obtain data sets. For example, the signal-to-noise ratios of path segments [42–58] and [67–83] are measured to be 28dB and 22dB, respectively, and the defect detection rates are 92% and 85%. The comprehensive values ​​are calculated by weighting. , , construct a signal-to-noise ratio defect detection rate data table, and use it as the data input basis for subsequent optimization modules.

[0044] Table 5: Signal-to-noise ratio-defect detection rate distribution table

[0045] As shown in Table 5, the comprehensive evaluation value of the path segment is used to judge the quality level of the parameter optimization focus segment and is used for initialization of the particle swarm optimization algorithm in the next stage.

[0046] S502: Call the signal-to-noise ratio defect detection rate distribution data, use the constrained particle swarm optimization method to initialize the data set, set the boundary rules and perform iterative updates, select the particle parameters with high matching evaluation values ​​by comparing the matching values, and obtain the iterative particle parameter set; Read the path segment number with a comprehensive evaluation value greater than 50 as the basis for generating the initial population. Take each path segment as a reference target and set the search range of sound speed, incident angle, and frequency in the parameter space as m / s, 、 MHz, the sampling range of each dimension is evenly distributed, and 50 initial particles are randomly generated. Each particle has a three-dimensional parameter combination. For example, the parameters of particle 1 are (5200m / s, 35°, 3MHz), and those of particle 2 are (5800m / s, 45°, 6MHz). These 50 particles are standardized, and the mean and standard deviation of each dimension are calculated. Assume that the mean of the sound speed dimension is 5650m / s, the standard deviation is 320m / s, and the standardized value of particle 1 is The frequency dimension and the angle dimension are standardized in the same way to obtain the standardized value sequence of particle 1: 862, set the three-dimensional weighting coefficient to , = , the current population mean , global optimal particle previous generation parameters , using small positive numbers to avoid denominators of 0 , calculate the matching evaluation value, using the formula: ; in, Representative Daizhongdi The matching evaluation value of each particle, Representative Daizhongdi The particle Optimized parameter values, Representative The mean of the optimization parameters in the current population, Representative The standard deviation of the optimization parameters in the current population, Representative The value of the optimization parameter corresponding to the global optimal particle in the previous generation, Representative The weighted coefficients of the optimization parameters, represents the total dimension of the parameters, To avoid small positive constants with zero denominators, 、 、 、 It is the dimensionless parameter of Z-score normalization.

[0047] Substitute the above parameters into the calculation: ; The numerator part is calculated as: ; The denominator is calculated as: ; The final matching value is: ; Particles with a matching value greater than 0.5 are retained in the next generation and their positions and velocities are updated, and recalculated in each iteration. 、 、 , repeat the above normalization and matching evaluation operations, select the top 10% of the matching values ​​of each generation to form the optimal solution set of the new generation, and form a complete iterative particle parameter set for subsequent matching evaluation.

[0048] S503: Based on the iterative particle parameter set, the beam focusing matching degree is calculated and the matching degree change rate is determined to be lower than the improvement rate threshold. If it is lower, the particle parameters are reset and the matching degree is re-evaluated. If it is not lower, the current parameter set is retained and verification is performed to generate an optimized parameter combination set. The improvement rate threshold was verified by 50 particle swarm optimization experiments. Setting the threshold to 1.2% enables the algorithm to converge after an average of 23 iterations and the parameter stability σ<0.05. After obtaining the iterative particle parameter set, the beam focusing match is calculated for each particle group, measured as the distance error between the theoretical focus position and the actual focus. For example, if the particle parameters (5600 m / s, 40°, 5 MHz) are calculated to have an actual focus position offset of 0.12 mm, the match value is set to this distance deviation. By setting a fixed improvement rate threshold of 1.2%, the average match change rate of five generations of particles is continuously tested. The average change rates for the 15th to 19th generations are set to be 1.1%, 1.0%, 0.9%, 0.7%, and 0.8%, respectively. The average value is 0.9% < 1.2%, which meets the reset condition. 10% of new particles are regenerated and added to the existing population to form a new population structure. If the change rate is ≥ 1.2%, the original parameter set is retained unchanged, and normalization and match evaluation are re-performed. After 50 complete iterations, the optimal match particle set is selected. Its parameter standard deviation σ converges to 0.03, satisfying the set stability threshold σ < 0.05. Finally, the optimized parameter combination that meets the matching accuracy requirements is obtained.

[0049] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A weld ultrasonic testing parameter optimization method based on particle swarm optimization is characterized by: The following steps are involved: S1: The three-dimensional coordinate sequence of the weld path is obtained through industrial measurement equipment. Combined with the prior information of the weld structure and the boundary conditions, an improved self-matching cubic spline interpolation method is used to remove abnormal points and control the node density, and the curvature data set is output; S2: calling the curvature data set, smoothing it using a moving average filter method, extracting the absolute value of the change in the first-order derivative of the curvature of adjacent nodes, screening the segments where the absolute value of the change exceeds the curvature change amplitude threshold, and outputting the coordinate range of the key segment; S3: calling the coordinate range of the key section, constructing a candidate parameter set based on the preset parameter ranges of sound speed, incident angle, and frequency, dividing the set into basic density according to the section length ratio, allocating parameter combinations with enhanced density in the key section using the Latin hypercube sampling algorithm, and outputting an initial parameter set; S4: Call the initial set of parameters, perform feature point detection on the curvature second-order derivative sequence, locate the three-dimensional space coordinates corresponding to the derivative sign change point, expand the path length based on the three-dimensional space coordinates as the center, and generate a parameter optimization focus area.

2. The weld ultrasonic testing parameter optimization method based on particle swarm optimization according to claim 1, characterized in that: The curvature data set includes the curvature standard deviation, the node spacing standard deviation and the outlier confidence; the key section coordinate range includes the curvature change rate threshold, the curvature mutation interval length and the curvature second derivative extreme point; the initial parameter set includes the sound velocity gradient parameter, the incident angle discreteness and the frequency distribution histogram; the parameter optimization focus area includes the feature point neighborhood radius, the sound beam coverage density parameter and the focus area signal-to-noise ratio threshold.

3. The weld ultrasonic testing parameter optimization method based on particle swarm optimization according to claim 1, characterized in that: The specific steps of S1 include: S101: Obtain a three-dimensional coordinate sequence of the weld path using industrial measurement equipment, perform boundary offset judgment on the spatial coordinates of the weld structure nodes based on the boundary coordinate range marked by the measuring instrument, filter and eliminate node coordinates outside the boundary range, and obtain a filtered abnormal node coordinate set; S102: Based on the filtered abnormal node coordinate set, a self-matching cubic spline interpolation method is used to calculate the curve spacing of adjacent nodes according to the spatial order relationship of the nodes, and nodes with spacing greater than the weld boundary reference spacing are selected, and their spacing is adjusted to be close to the reference spacing to obtain a density-adjusted node sequence; S103: According to the density adjustment node sequence, the node curvature is calculated for the three-dimensional coordinates of the interpolation curve nodes using a curvature radius calculation method, and nodes with small curvature radius are screened according to the local spatial curvature of the curve and corresponding curvature values ​​are extracted to obtain a curvature data set.

4. The weld ultrasonic testing parameter optimization method based on particle swarm optimization according to claim 3, characterized in that: The specific steps of S2 include: S201: calling the curvature data set, using a moving average filter method to set a sliding window to calculate the mean of the curvature values ​​of adjacent nodes, replacing the node values ​​in the original sequence with the calculated mean, correcting the local offset fluctuations in the original curvature, and generating a smooth curvature value; S202: Based on the smoothed curvature value, perform a differential operation on the curvature offsets between adjacent nodes, take the absolute value of the differential result to construct a curvature rate sequence, calculate the numerical amplitude of the curvature change of consecutive nodes, and obtain the curvature change rate value; S203: According to the curvature change rate value, the continuous node indexes in the sequence that are greater than the curvature change amplitude threshold are screened, and the start and end coordinate intervals of the corresponding nodes are extracted to obtain the key segment coordinate range.

5. The weld ultrasonic testing parameter optimization method based on particle swarm optimization according to claim 4, characterized in that: The specific steps of S3 include: S301: Retrieving the segment length data within the coordinate range of the key segment, extracting the preset upper and lower limits of the three parameters of sound speed, incident angle, and frequency, converting the ratio of the segment length to the total length, mapping the ratio value to the three-dimensional parameter axis and demarcating the segment intervals, extracting discrete values ​​at equal intervals, and generating a parameter ratio set density value; S302: Based on the parameter ratio set density value, the number of required parameter combinations is determined according to the paragraph ratio, the set is divided into a base density region and an enhanced density region, and the parameter distribution data of the key sections are combined. The Latin hypercube sampling algorithm is used to divide the parameter dimension into equal probability spaces in the enhanced density region and perform stratified sampling operations to generate a sampling parameter set for the enhanced region; S303: Based on the enhanced area sampling parameter set and the parameter dimension combination data in the basic density area, the enhanced area sampling parameter set and the parameter dimension combination data are combined and spliced ​​in index order, and a deduplication operation is performed after unifying the parameter dimension arrangement rules to obtain an initial parameter set.

6. The weld ultrasonic testing parameter optimization method based on particle swarm optimization according to claim 5, characterized in that: The specific steps of S4 include: S401: Calling the initial parameter set, obtaining curvature second-order derivative sequence data, comparing the derivative values ​​of two adjacent points in the sequence, selecting the position coordinates where the positive and negative signs of the derivatives change, and recording the change point numbers in sequence order to generate a sign change coordinate set; S402: Based on the sign change coordinate set, equal amounts of data are intercepted on both sides of the sign change coordinate as the center to construct path data, the path start and end indexes are marked, and the path data sequence format is unified to generate a path segment set; S403: Call the path segment set, extract the statistical mean, full range index and discrete ratio based on the segments, calculate the discrete concentration ratio, determine the concentrated distribution state of the parameters within the segment interval, merge the segment number ranges that meet the conditions, and generate the parameter optimization focus area.

7. The weld ultrasonic testing parameter optimization method based on particle swarm optimization according to claim 6, characterized in that: The discrete concentration ratio is calculated using the formula: ; in, Represents the first The discrete concentration ratio of the fragments, Representative The first path segment The parameter value of the data point, Representative The average value of the parameter value of the data points in the path segments, Representative The full range of parameter values ​​in the path segments, Representative The number of data points in a path segment is a dimensionless parameter, Representative The discrete ratio of parameter values ​​in the path segments is a dimensionless parameter. 、 、 All are Min-Max normalized and processed into dimensionless parameters.

8. The weld ultrasonic testing parameter optimization method based on particle swarm optimization according to claim 1, characterized in that: The method comprises step S5: S5: calling the parameter optimization focus area, analyzing the regional curvature distribution characteristics to establish a weighted matching function of the signal-to-noise ratio and the defect detection rate, performing iterative updates in the constrained particle swarm optimization, and when the matching improvement rate is lower than the improvement rate threshold, performing parameter reinitialization and re-evaluating the beam energy focusing matching degree, and outputting an optimized parameter combination set; The optimization parameter combination set includes an optimal acoustic impedance matching parameter, a frequency bandwidth optimization value, and a particle swarm convergence radius parameter.

9. The weld ultrasonic testing parameter optimization method based on particle swarm optimization according to claim 8, characterized in that: The specific steps of S5 include: S501: Calling the parameter optimization focus area, extracting the curvature gradient change value and calculating its distribution density based on the regional curvature distribution characteristics, constructing a weighted matching function of the signal-to-noise ratio and the defect detection rate, respectively calculating the signal-to-noise ratio value and the defect detection rate value in the area, and generating signal-to-noise ratio defect detection rate distribution data; S502: calling the signal-to-noise ratio defect detection rate distribution data, initializing the data set using the constrained particle swarm optimization method, setting boundary rules and performing iterative updates, selecting particle parameters with high matching evaluation values ​​by comparing matching values, and obtaining an iterative particle parameter set; S503: Based on the iterative particle parameter set, calculate the beam focusing matching degree and determine whether the matching degree change rate is lower than the improvement rate threshold. If it is lower, reset the particle parameters and re-evaluate the matching degree. If it is not lower, retain the current parameter set and perform verification to generate an optimized parameter combination set.

10. The weld ultrasonic testing parameter optimization method based on particle swarm optimization according to claim 9, characterized in that: The matching evaluation value is calculated using the formula: ; in, Representative Daizhongdi The matching evaluation value of each particle, Representative Daizhongdi The particle Optimized parameter values, Representative The mean of the optimization parameters in the current population, Representative The standard deviation of the optimization parameters in the current population, Representative The value of the optimization parameter corresponding to the global optimal particle in the previous generation, Representative The weighted coefficients of the optimization parameters, represents the total dimension of the parameters, To avoid small positive constants with zero denominators, 、 、 、 It is the dimensionless parameter of Z-score normalization.

Citation Information

Cited By

  • Automatic sewing identification method and system based on image identification

    CN121504932A

  • Cleaning method and device for fan operation data, electronic equipment and storage medium

    CN121658796A

  • Method and system for testing electromagnetic radiation immunity of part

    CN121878356A

  • Test methods and systems for electromagnetic radiation immunity of components

    CN121878356B