Method for reconstructing microdefect in slender rod
Technical Field
The invention relates to the technical field of ultrasonic three-dimensional imaging, in particular to a method for reconstructing micro defects in a slender rod.
Background
In the modern industry, rod-shaped workpieces are largely applied to practical engineering and have important supporting functions in relevant fields such as national economy, high and new technology, national defense construction and the like. The concrete reinforcing steel bar is not only applied to reinforcing steel bars for erecting in concrete, suspension rods of suspension bridges, pile foundations for improving the compactness of foundation soil in civil engineering, anchor rods for supporting, inhaul cables of cable-stayed bridges and the like, but also has a large amount of application in emerging industries such as aerospace industry, ship engineering and the like. In the production and manufacturing process of the rod-shaped workpiece, due to factors such as process design and manual operation, tiny defects are easy to occur in the component, the defects destroy the internal organization structure of the workpiece and are difficult to find. Therefore, in the long-term use process, the stress concentration can be caused by the tiny defects in the workpiece, and the tiny defects with the stress concentration can gradually expand to the big defects until the workpiece fails, so that serious accidents can occur.
At present, most of the existing detection of rod-shaped workpieces aims at the detection of larger-size defects in large workpieces, quantitative analysis and two-dimensional information display are carried out, and the three-dimensional structures of the defects cannot be observed visually; aiming at the tiny defects in the small slender rod workpiece, the detection difficulty is higher, and the tiny defects in the workpiece which are due to the fact that the tiny defects are not easy to observe intuitively are difficult to achieve, and therefore a solution is needed urgently.
Disclosure of Invention
In order to avoid and overcome the technical problems in the prior art, the invention provides a method for reconstructing micro defects in a slender rod. According to the invention, the three-dimensional reconstruction is completed by performing least square fitting and cubic spline interpolation processing on the data of the defect points acquired after ultrasonic detection, so that the three-dimensional image reconstruction of the microdefects in the rod-shaped workpiece is realized, the integral visualization calculation amount is small, the surface accuracy of the reconstructed image is high, and the reconstructed image is fast in speed and high in accuracy.
In order to achieve the purpose, the invention provides the following technical scheme:
a method for reconstructing micro-defects in a slender rod comprises the following steps:
s1, carrying out ultrasonic detection on the rod-shaped workpiece and storing echo signals;
s2, extracting a defect echo signal in the echo signal, and processing to obtain three-dimensional data of a defect point;
and S3, performing least square fitting and cubic spline interpolation on the data of the defect points, and finishing three-dimensional reconstruction to obtain three-dimensional imaging information.
As a further scheme of the invention: the defect is a hole-shaped defect, in step S3, the three-dimensional data of each cross-section defect point of the hole-shaped defect is first subjected to least square fitting to obtain information of each cross-section circle of the hole-shaped defect, then the center and radius of the cross-section circle are subjected to cubic spline interpolation to obtain all three-dimensional data of the hole-shaped defect, and finally three-dimensional reconstruction is performed to obtain three-dimensional imaging information.
As a still further scheme of the invention: the step S3 process is specifically as follows:
s31, setting the equation of the least square fitting cross section circle as:
(x-ak)2+(y-bk)2=R2
error eikComprises the following steps:
due to the fact that
As can be seen from the principle of least squares,
u, v and w should satisfy:
Conversion to matrix form:
can obtain the product
The fitted circle coordinate of each k-th section is thus
And then ordering:
the radius R of the cross-sectional circle is
S32, carrying out cubic spline difference on the center track and the radius of the hole-shaped defect cross-section circle;
taking the center of a circle as an example, the coordinates (x) of the centers of two adjacent sections are takeni,yi)、(xi+1,yi+1) Setting an interpolation interval [ a, b ]]For an interval S (x) e C2[a,b]Above a ═ x1<x2<···<xnB, wherein S (x)j)=yj(j ═ 1,2, ·, n), let the circle center cubic spline difference function be:
Sj(x)=ajx3+bjx2+cjx+dj,(j=1,2···,n-1)
wherein a isj,bj,cj,djAre four coefficients to be found and are made to satisfy the following conditions:
S(xj)=yj,S(xj-0)=S(xj+0),(j=2,3,···,n-1)
S'(xj-0)=S'(xj+0),S”(xj-0)=S”(xj+0),(j=2,3,···,n-1)
solving the spline function to obtain interpolation data, and setting the second derivative of S (x) as
S”(xj)=Mj(j ═ 1,2, · · n-1), according to the interpolation conditions:
twice integrating and utilizing S (x)j)=yjAnd S (x)j+1)=yj+1The expression of the resulting cubic spline function S (x) is:
wherein h isj=xj+1-xj(j. 1,2, n-1) in combination with S' (x)j+0)=S'(xj-0) available:
μjMj-1+2Mj+λjMj+1=dj
in the above formula f [ x ]j,xj+1]Is f (x) about point xj,xj+1First order difference of; f [ x ]j-1,xj,xj+1]Is f (x) with respect to point xj-1,xj,xj+1Second order mean difference of;
according to the natural boundary condition of cubic spline interpolation, formula mujMj-1+2Mj+λjMj+1=djThe matrix can be expressed as:
solving the matrix and substituting the solution into a formula
Solving an interpolation function on the interval [ a, b ], and substituting the centers of all the cross sections into the interpolation function to obtain interpolation data of the centers of all the cross section circles;
and S33, performing visualization processing on the obtained three-dimensional data, realizing defect three-dimensional reconstruction and obtaining a three-dimensional data reconstruction picture.
As a still further scheme of the invention: in step S1, longitudinal measurement lines are uniformly scribed on the surface of the workpiece in a direction parallel to the axis of the workpiece, and transverse measurement lines are uniformly scribed on the surface of the workpiece in the circumferential direction, thereby forming a grid-like region to be detected on the surface of the workpiece.
As a still further scheme of the invention: in step S1, an ultrasonic inspection system is set up, and the workpiece is subjected to ultrasonic inspection according to the ultrasonic pulse reflection method.
As a still further scheme of the invention: the ultrasonic detection system comprises an ultrasonic pulse transmitting/receiving instrument and a digital oscilloscope, wherein the ultrasonic pulse transmitting/receiving instrument and the digital oscilloscope are connected through a coaxial cable, the oscilloscope is connected with a PC (personal computer) end used for storing echo signals through a data line, an ultrasonic straight probe is connected to a transmitting/receiving end of the ultrasonic pulse transmitting/receiving instrument through the coaxial cable, and a coupling agent is coated between the ultrasonic straight probe and a workpiece to be detected.
As a still further scheme of the invention: in step S2, a spatial rectangular coordinate system is established with the center of the circle of the bottom surface of the workpiece as the origin and the axis thereof as the z-axis, and when the defect echo signal is extracted, coordinate data is converted into spatial three-dimensional coordinates (x, y, z), where x is the abscissa of the defect point, y is the ordinate of the defect point, and z is the height of the defect point, and the following coordinate conversions are performed:
ρ=R-l
x=ρ×|cosθ|
y=ρ×|sinθ|
wherein: rho is the distance between the defect point and the workpiece axis, theta is the positive included angle between the defect point and the x axis, l is the workpiece wall thickness value at the defect point, and v is the longitudinal wave velocity of the ultrasonic wave in the workpiece; t is the defect echo time of the workpiece, and R is the workpiece bottom surface radius value.
Compared with the prior art, the invention has the beneficial effects that:
1. according to the invention, the rod body of the rod-shaped workpiece is subjected to ultrasonic detection, the echo signal in the echo signal is extracted and converted into the three-dimensional data of the defect point, and after least square fitting and cubic spline interpolation processing are carried out on the data of the defect point, three-dimensional reconstruction is completed to obtain three-dimensional imaging information, so that the reconstruction of the three-dimensional image of the microdefect in the rod-shaped workpiece is realized, the integral visualization calculation amount is small, the accuracy of the reconstructed image surface is high, and the speed and the accuracy of the reconstructed image are high.
2. The invention finishes the calibration of the measuring point and improves the positioning precision of the measuring point by carrying out gridding division on the surface of the workpiece.
3. The invention carries out detection by an ultrasonic nondestructive detection method, the acquisition difficulty of sampling point data and the positioning difficulty of defects are low, the detection efficiency is high, and the positioning of micro defects is accurate.
Drawings
Fig. 1 is a schematic diagram of coordinate transformation of defect point data according to the present invention.
Fig. 2 is a diagram of the effect of three-dimensional defect imaging in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, in an embodiment of the present invention, a method for reconstructing micro defects in a thin rod includes the following steps:
s1, carrying out ultrasonic detection on the rod-shaped workpiece and storing echo signals;
in this step, for the convenience of detection, the surface of the rod-shaped workpiece is usually subjected to gridding treatment; uniformly marking longitudinal measuring lines on the surface of the workpiece along the axial direction of the workpiece, and uniformly marking transverse measuring lines on the surface of the workpiece along the circumferential direction, so that a gridded region to be detected is formed on the surface of the workpiece;
when the area to be detected is detected, the workpiece is divided into different layers by the transverse measuring line, the detection points of each layer are usually detected in sequence, and the detection points of one layer are detected in sequence after all the detection points of the next layer are detected.
In order to facilitate scribing, a rectangle which is matched with the side surface of the rod-shaped workpiece in a developed shape can be drawn in drawing software (such as Auto Cad) according to the height and the bottom surface diameter of the rod-shaped workpiece, one side length of the rectangle is equal to the height of the rod-shaped workpiece, the other side length of the rectangle is equal to the circumference of the bottom surface of the rod-shaped workpiece, the two side lengths are equally divided, the intersection point of the scribing is a detection point, taking the rod-shaped workpiece with the height of 100mm and the bottom surface diameter of 30mm as an example, the frequency of an ultrasonic straight probe is 5MHZ, when the diameter of the probe is 10mm, the two sides of the rectangle are equally divided, after the equal division, the rectangle is printed out and is attached to the surface of the workpiece, and the measurement point calibration of the surface of the rod-shaped workpiece is completed by aligning the intersection point on the rectangle drawing.
During detection, an ultrasonic detection system is set up, and ultrasonic detection is carried out on the workpiece according to an ultrasonic pulse reflection method; the ultrasonic detection system comprises an ultrasonic pulse transmitting/receiving instrument and a digital oscilloscope, wherein the Model of the ultrasonic pulse transmitting/receiving instrument is Olympus Model 5800, the Model of the digital oscilloscope is Tektronix DPO3012, the ultrasonic pulse transmitting/receiving instrument and the digital oscilloscope are connected through a coaxial cable, the oscilloscope is connected with a PC (personal computer) end for storing echo signals through a data line, an ultrasonic straight probe is connected to a transmitting/receiving end of the ultrasonic pulse transmitting/receiving instrument through the coaxial cable, the ultrasonic detection system is built, ultrasonic detection can be started after a coupling agent is convexly arranged between the ultrasonic straight probe and a workpiece to be detected, and the coupling agent is preferably white vaseline; during ultrasonic detection, information is exchanged with a PC (personal computer) terminal through an oscilloscope, and echo signals are stored on the PC.
S2, extracting a defect echo signal in the echo signal, and processing to obtain three-dimensional data of a defect point;
establishing a space rectangular coordinate system by taking the circle center of the bottom surface of the workpiece as an origin and the axis thereof as a z-axis, wherein the position of the origin is not limited, and the origin is arranged at the circle center for facilitating subsequent coordinate conversion; when a defect echo signal is extracted, converting coordinate data into a space three-dimensional coordinate (x, y, z), wherein x is a defect point horizontal coordinate, y is a defect point vertical coordinate, and z is a height value of a defect point, and performing the following coordinate conversion:
ρ=R-l
x=ρ×|cosθ|
y=ρ×|sinθ|
wherein: rho is the distance between the defect point and the workpiece axis, theta is the positive included angle between the defect point and the x axis, l is the workpiece wall thickness value at the defect point, and v is the longitudinal wave velocity of the ultrasonic wave in the workpiece; t is the defect echo time of the workpiece, and R is the workpiece bottom surface radius value.
And S3, performing least square fitting and cubic spline interpolation on the data of the defect points, and finishing three-dimensional reconstruction to obtain three-dimensional imaging information.
The micro defects which are most frequently generated on the rod-shaped workpiece under the actual working condition are hole defects, and the hole defects are taken as an example for specific explanation, so that other shape defects can be obtained by the same method;
in step S3, first, a least-squares circle-on-section fitting is performed on the three-dimensional data of each cross-sectional defect point of the hole defect, assuming the ith defect point P (a)ik,bik,cij) The distance from the center of the circle is R, because the point on the cross section where the defect point is located is notAll fall on a circle with R as the minimum fitting radius, and the error e is necessarily existedik:
The equation for the least squares fit cross-sectional circle is set as:
(x-ak)2+(y-bk)2=R2
error eikComprises the following steps:
in the above formula:
according to the least square principle, the sum of the squares of the errors
To satisfy the minimum principle, then
u, v and w should satisfy:
Conversion to matrix form:
can obtain the product
The fitted circle coordinate of the kth section is thus
And then ordering:
the radius R of the cross-sectional circle is
Thirdly, carrying out cubic spline difference on the circle center track and the radius of the hole-shaped defect cross-section circle;
taking the circle center as an example to perform interpolation, and taking the circle center coordinates (x) of two adjacent sectionsi,yi)、(xi+1,yi+1) Setting an interpolation interval [ a, b ]]For an interval S (x) e C2[a,b]Above a ═ x1<x2<···<xnB, wherein S (x)j)=yj(j ═ 1,2, ·, n), let the circle center cubic spline difference function be:
Sj(x)=ajx3+bjx2+cjx+dj,(j=1,2···,n-1)
wherein a isj,bj,cj,djAre four coefficients to be found and are made to satisfy the following conditions:
S(xj)=yj,S(xj-0)=S(xj+0),(j=2,3,···,n-1)
S'(xj-0)=S'(xj+0),S”(xj-0)=S”(xj+0),(j=2,3,···,n-1)
solving the spline function to obtain interpolation data, and setting the second derivative of S (x) as
S”(xj)=Mj(j ═ 1,2, · · n-1), according to the interpolation conditions:
twice integrating and utilizing S (x)j)=yjAnd S (x)j+1)=yj+1The expression of the resulting cubic spline function S (x) is:
wherein h isj=xj+1-xj(j. 1,2, n-1) in combination with S' (x)j+0)=S'(xj-0) available:
μjMj-1+2Mj+λjMj+1=dj
in the above formula f [ x ]j,xj+1]Is f (x) about point xj,xj+1First order difference of; f [ x ]j-1,xj,xj+1]Is f (x) with respect to point xj-1,xj,xj+1Second order mean difference of;
according to the natural boundary condition of cubic spline interpolation, formula mujMj-1+2Mj+λjMj+1=djThe matrix can be expressed as:
since the matrix satisfies λj≥0,μj≥0,λj+μjWhen the coefficient matrix is 1, the coefficient matrix is a tri-diagonal matrix and a diagonal dominance matrix, so that a unique solution exists, the solution can be solved by a pursuit method, and the obtained solution is substituted into a formula
The interpolation function on the interval [ a, b ] can be solved, and the centers of circles of all the sections are substituted into the interpolation function, so that the interpolation data of the centers of the circles of all the sections are obtained;
and finally, carrying out visualization processing on the obtained three-dimensional data to realize defect three-dimensional reconstruction and obtain a three-dimensional data reconstruction picture.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.