Disclosure of Invention
Aiming at the problems, the invention provides a numerical processing method for deformation in a pipeline, which solves the problems of analyzing the pipeline deformation and reconstructing a three-dimensional model of the pipeline according to detection data.
The invention adopts the following specific scheme:
the invention provides a numerical processing method of deformation in a pipeline, which comprises the following steps:
step 1: establishing a discrete data point column of a plurality of sections vertical to the pipeline axis in the pipeline according to the three-dimensional detection data of the deformation in the pipeline;
step 2: adding an additional point at the tail of the discrete data point array in the step 1 to obtain a processed discrete data point array of each section, so that the processed discrete data point array can form a closed curve, and the head-tail connection part of the closed curve can keep better smoothness;
and step 3: obtaining a cubic spline function of each section according to the processed discrete data point rows of each section by adopting a cubic spline fitting method, obtaining one-dimensional closed curve fitting of the pipeline section by solving the cubic spline function and obtaining the ellipticity calculation of the pipeline section;
and 4, step 4: and (3) collecting the discrete data point rows of each section to form a pipeline three-dimensional point cloud data matrix, and establishing a three-dimensional model of the pipeline according to the three-dimensional point cloud data matrix to complete numerical processing of deformation in the pipeline.
Further, step 1 comprises the steps of:
dividing the pipeline into N sections along the direction vertical to the axis according to the acquisition time sequence of the three-dimensional detection data, wherein each section has L discrete data points, and then the discrete data point column of the kth section is expressed as { S }i,k},{Si,k}={(r1,k,θ1,k),…,(ri,k,θi,k),…,(rL,k,θL,k)};
k=1,2,…,N,i=1,…,L;r1,kIs the distance from the 1 st point on the kth section contour line to the center of the section, theta1,kThe included angle between the connecting line of the 1 st point and the circle center of the section and the vertical direction is formed; r isi,kIs the distance from the ith point on the kth section contour line to the center of the section, thetai,kThe included angle between the connecting line of the ith point and the circle center of the section and the vertical direction is shown; r isL,kIs the distance from the Lth point on the k-th section contour line to the center of the section, thetaL,kIs the included angle between the connecting line of the L-th point and the center of the cross section and the vertical direction.
Further, step 2 comprises the following steps:
discrete data point column { S ] in step 1i,kThe end of the sequence is added with an additional point (r)L+1,k,θL+1,k) To obtain the processed discrete data point column { P ] of the kth sectioni,k},{Pi,k}={(r1,k,θ1,k),…,(ri,k,θi,k),…,(rL,k,θL,k),(rL+1,k,θL+1,k)};
rL+1,kIs the distance from the L +1 point on the k section contour line to the center of the section, thetaL+1,kIs the angle between the connecting line of the L +1 point and the center of the cross section and the vertical direction, and rL+1,k=r1,k,θL+1,k=θ1,k+2π。
Further, obtaining a one-dimensional closed curve of the pipeline section comprises the following steps:
step 31: discrete data point column { P) according to k section after processingi,kObtaining a cubic spline function r (theta) of a kth section by adopting a cubic spline fitting method, dividing the cubic spline function r (theta) into L-1 sections by taking L discrete data points as dividing points, and then dividing the r (theta) into [ theta ] sectionsi,k,θi+1,k]A piecewise function r ofi(theta) is represented by ri(θ)=aiθ3+biθ2+ciθ+di,i=1,…,L,ai、bi、ci、diThe number of undetermined coefficients is 4L;
due to the piecewise function ri(theta) an included angle theta between a connecting line of the ith point and the circle center of the cross section and the vertical direction must pass through discrete data pointsi,kThe distance r from the L-th point on the k-th section contour line to the center of the sectionL,kConforming to a piecewise function ri(θ),ri(θi,k)=ri,k(ii) a Respectively substituting L +1 discrete data points into riIn (θ), L +1 constraint equations can be obtained;
since the cubic spline function r (θ) must be continuous around discrete data points, there are
L-1 constraint equations in total;
since the cubic spline r (θ) must remain first-order continuous around discrete data points, then
There are L-1 constraint equations in total;
since the cubic spline r (θ) must remain second-order continuous around discrete data points, there are
There are L-1 constraint equations in total;
two end points (r) due to the curve closed by cubic spline function1,k,θ1,k)、(rL+1,k,θL+1,k) Coincidence (r)1,k,θ1,k)、(rL+1,k,θL+1,k) Two adjacent piecewise functions r1(θ1,k+0) and rL(θi,k-0) are equal, resulting in 2 constraint equations:
rL,(θi,k-0)=r1,(θ1,k+0)
rL,,(θi,k-0)=r1,,(θ1,k+0)
step 33: 4L constraint equations are obtained from step 32, so as to solve the piecewise function r on any intervaliAnd (theta) and a complete cubic spline function r (theta) to obtain a one-dimensional closed curve of the pipeline section.
Further, the ovality calculation of the pipe section comprises the following steps:
setting the center coordinates of the fitting circle as (x)0,y0) The radius of the fitting circle is R, the coordinates of any point on the fitting circle are (x, y), and the basic equation of the least square fitting circular curve is
Can be unfolded to obtain
Order to
Can obtain the product
After the formula is popularized to L discrete data points, the formula is written into a matrix form as follows
Can be obtained by calculation
Knowing xiAnd yiResolving a, b and c;
due to the fact that
Thereby obtaining the coordinates (x) of the center of the circle
0,y
0) And a fitting circle radius R, the fitting circle radius R and the original radius R of the k-th cross section before deformation
bDifference of R
bThe ratio is the ovality of the kth section.
Further, step 4 comprises the following steps:
superimposing the measured cross-section information k onto the processed discrete data point column { P } for the kth cross-sectioni,kAnd forming a pipeline three-dimensional point cloud data set Q (P) by the seti,1,Pi,2,…,Pi,k,…,Pi,NAnd inputting the three-dimensional point cloud data set Q of the pipeline into data processing software to reconstruct the curved surface of the pipeline, so as to obtain a point cloud picture of the pipeline and finish the numerical processing of the deformation in the pipeline.
Further, step 4 is followed by the steps of: writing the data format of the pipeline three-dimensional point cloud data set Q stored in the data processing software into a universal triangular grid format, and carrying out modeling display in three-dimensional modeling software to obtain a three-dimensional model of the pipeline.
Further, the numerical processing method for deformation in the pipeline further comprises the following step 5: carrying out interpolation encryption on the measurement point Q by utilizing a cubic spline function r (theta) to obtain enough data points;
step 6: and (3) collecting the encrypted discrete data point arrays of each section to form an encrypted pipeline three-dimensional point cloud data matrix, and establishing an encrypted three-dimensional model of the pipeline according to the encrypted three-dimensional point cloud data set.
Further, step 5 further comprises the following steps:
as the cubic spline function r (theta) is a one-dimensional closed curve, the theta belongs to 0,2 pi]The intra-period and end-to-end boundaries are continuous functions of second order, belonging to [0,2 π for any given]Given angle thetamFrom the cubic spline function r (theta), the angle theta at a given angle theta can be obtainedmAt a given angle thetamCorresponding given radius rm;
The encrypted column of discrete data points for the kth section is shown as
{STj,k}={(r1,k,θ1,k),(r2,k,θ2,k),…,(rj,k,θj,k),…(rM,k,θM,k)};
j is 0,1, … M, M is the number of data points after encryption, M is nxl, n is the encryption density, n is 0,1, ….
Further, step 6 comprises the steps of: inputting the encrypted discrete data point columns into data processing software to carry out pipeline curved surface reconstruction to obtain an encrypted point cloud picture of the pipeline; writing the data format of the encrypted discrete data point row stored in the data processing software into a universal triangular grid format, and carrying out modeling display in three-dimensional modeling software to obtain an encrypted three-dimensional model of the pipeline.
The invention has the beneficial effects that:
the numerical processing method for the deformation in the pipeline provided by the invention has the advantages of high modeling speed and high model precision, and can reasonably formulate the numerical processing method for the deformation detection data.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
The invention provides a numerical processing method of deformation in a pipeline, which is based on the measured data of a deformation detector, can quickly obtain the theoretical circle center of a detection section through numerical processing, carries out pipeline ovality evaluation and can realize three-dimensional reconstruction of a pipeline model according to the detection data.
The numerical processing method for the deformation in the pipeline, as shown in fig. 1, includes the following steps:
step 1: and establishing a discrete data point column of a plurality of sections in the pipeline, which are vertical to the pipeline axis, according to the three-dimensional detection data of the deformation in the pipeline.
Specifically, the step 1 includes the steps of:
making the pipeline vertical according to the acquisition time sequence of three-dimensional detection dataDividing the image into N sections in the direction of the axis, wherein each section has L discrete data points, and the discrete data point column of the kth section is expressed as { S }i,k},{Si,k}={(r1,k,θ1,k),…,(ri,k,θi,k),…,(rL,k,θL,k) Where k is 1,2, …, N, i is 1, …, L; r is1,kIs the distance from the 1 st point on the kth section contour line to the center of the section, theta1,kThe included angle between the connecting line of the 1 st point and the circle center of the section and the vertical direction is formed; r isi,kIs the distance from the ith point on the kth section contour line to the center of the section, thetai,kThe included angle between the connecting line of the ith point and the circle center of the section and the vertical direction is shown; r isL,kIs the distance from the Lth point on the k-th section contour line to the center of the section, thetaL,kIs the included angle between the connecting line of the L-th point and the center of the cross section and the vertical direction.
Step 2: and (3) obtaining a processed discrete data point column of the kth section at an additional point at the tail of the discrete data point column in the step (1), so that the processed discrete data point column can form a closed curve, and the head and tail parts of the closed curve can keep better smoothness.
Specifically, the step 2 includes the following steps:
discrete data point column { S ] in step 1i,kThe end of the sequence is added with an additional point (r)L+1,k,θL+1,k) To obtain the processed discrete data point column { P ] of the kth sectioni,k},{Pi,k}={(r1,k,θ1,k),…,(ri,k,θi,k),…,(rL,k,θL,k),(rL+1,k,θL+1,k) Wherein r isL+1,kIs the distance from the L +1 point on the k section contour line to the center of the section, thetaL+1,kIs the angle between the connecting line of the L +1 point and the center of the cross section and the vertical direction, and rL+1,k=r1,k,θL+1,k=θ1,k+2 pi, the discrete data point array after processing can form a closed curve, and the head-to-tail connection part of the closed curve can keep better smoothness.
And step 3: and obtaining a cubic spline function of the kth section by adopting a cubic spline fitting method according to the processed discrete data point column of the kth section, and obtaining one-dimensional closed curve fitting of the pipeline section and ellipticity calculation of the pipeline section by solving the cubic spline function.
Specifically, the method for obtaining the one-dimensional closed curve of the pipeline section comprises the following steps:
step 31: discrete data point column { P) according to k section after processingi,kObtaining a cubic spline function r (theta) of a kth section by adopting a cubic spline fitting method, dividing the cubic spline function r (theta) into L-1 sections by taking L discrete data points as dividing points, and then dividing the r (theta) into [ theta ] sectionsi,k,θi+1,k]A piecewise function r ofi(theta) is represented by
ri(θ)=aiθ3+biθ2+ciθ+diWherein i is 1, …, L, ai、bi、ci、diThe number of the undetermined coefficients is 4L.
Due to the piecewise function ri(theta) an included angle theta between a connecting line of the ith point and the circle center of the cross section and the vertical direction must pass through discrete data pointsi,kThe distance r from the L-th point on the k-th section contour line to the center of the sectionL,kShould also comply with the above-mentioned piecewise function ri(theta), that is, ri(θi,k)=ri,k;
Due to the processed discrete data point column { P ] at the k-th sectioni,kSubstituting L +1 discrete data points into riIn (θ), L +1 constraint equations can be obtained.
Since the cubic spline function r (θ) must be continuous around discrete data points, there are
And L-1 constraint equations in total.
Since the cubic spline r (θ) must remain continuous to the first order around discrete data points, there are
There are L-1 constraint equations in total.
Since the cubic spline r (θ) must remain second-order continuous around discrete data points, there are
There are L-1 constraint equations in total.
For a closed curve, the end-to-end endpoints coincide, i.e., (r)1,k,θ1,k)、(rL+1,k,θL+1,k) It is actually the same point, rL+1,k=r1,k,θL+1,k=θ1,k+2 π, therefore, (r)1,k,θ1,k)、(rL+1,k,θL+1,k) Two adjacent piecewise functions r1(θ1,k+0) and rL(θi,k-0) are equal, resulting in 2 constraint equations:
rL’(θi,k-0)=r1’(θ1,k+0)
rL”(θi,k-0)=r1”(θ1,k+0)
step 33: 4L constraint equations are obtained in step 32, and a piecewise function r on any interval is solvediAnd (theta), and further obtaining a complete cubic spline function r (theta), namely a one-dimensional closed curve of the pipeline section.
The ovality calculation of the pipeline section comprises the following steps:
the method for deducing and calculating the center of the fitting circle by a numerical calculation method sets the coordinates of the center of the fitting circle as (x)0,y0) The radius of the fitting circle is R, the coordinate of any point on the fitting circle is (x, y), and then the least square fitting circular curveIs based on the equation
R2=(x-x0)2+(y-y0)2-formula 1
Can be unfolded to obtain
Order to
Can obtain the product
x2+y2-ax-by + c ═ 0-formula 3
After the formula is popularized to L discrete data points, the formula is written into a matrix form as follows
Can be obtained by calculation
Knowing x
iAnd y
iA, b, c are solved because
Available x
0=a/2,y
0=b/2,
Namely obtaining the coordinates (x) of the center of the circle of the fitting circle
0,y
0) And a fitting circle radius R, the fitting circle radius R and an original radius (nominal pipe radius) R of the k-th cross section before deformation
bDifference of R
bThe ratio is the ovality of the kth cross section.
And 4, step 4: and collecting the discrete data point rows of the k sections to form a pipeline three-dimensional point cloud data matrix, and establishing a three-dimensional model of the pipeline according to the three-dimensional point cloud data matrix to complete numerical processing of deformation in the pipeline.
Specifically, the step 4 includes the following steps:
superimposing the measured cross-section information k onto the processed discrete data point column { P } for the kth cross-sectioni,kAnd forming a pipeline three-dimensional point cloud data set Q (P) by the seti,1,Pi,2,…,Pi,k,…,Pi,NAnd (4) inputting the three-dimensional point cloud data set Q of the pipeline into data processing software (for example, matlab) to carry out curved surface reconstruction of the pipeline, so as to obtain a point cloud picture of the pipeline and finish numerical processing of deformation in the pipeline.
However, since the data processing software is non-professional three-dimensional modeling software and mainly operates with code commands, the model interactivity of the obtained point cloud image of the pipeline is poor, and therefore, the step 4 further includes the following steps: writing the data format of the pipeline three-dimensional point cloud data set Q stored in the data processing software into a universal triangular grid format (such as stl), and performing modeling display in three-dimensional modeling software (such as UG) to obtain a three-dimensional model of the pipeline.
Considering that the actual single detection section has fewer detection data points, the pipeline model reconstructed by using the original detection point data is also rough, and the surface features are fuzzy, as shown in fig. 1 a. In order to better and stereoscopically present the appearance of the pipeline, the numerical processing method for deformation in the pipeline may further include step 5: the measurement point Q is interpolated using a cubic spline r (θ) to obtain a sufficient number of data points.
Specifically, the step 5 may include the steps of:
since the cubic spline function r (theta) is a one-dimensional closed curve, the cubic spline function r (theta) belongs to 0,2 pi at theta]The intra-period and end-to-end boundaries are continuous functions of second order, and thus belong to [0,2 π ] for any given]Given angle thetamThe angle theta at a given angle theta must be obtained from a cubic spline function r (theta)mAt a given angle thetamCorresponding given radius rm。
The number of data points after encryption is defined as M ═ n × L, where n is the encryption density and n is 0,1, …. The k-th section of the column of discrete data points encrypted at the encryption density n can be represented as
{STj,k}={(r1,k,θ1,k),(r2,k,θ2,k),…,(rj,k,θj,k),…(rM,k,θM,k) Where j is 0,1, … M.
In practical application, by increasing the encryption density n, the encryption data points extracted from the cubic spline function r (theta) can be increased, the encryption of the detection data is realized, and the definition of the surface characteristics of the pipeline model is improved.
For example, a 12.7 "diameter pipe, described by only 32 raw inspection point data, is blurred in its surface features as shown in FIG. 1 a. However, after the surface features are encrypted by multiple times of interpolation, the surface features are clearer. The 2-fold encryption is performed as in fig. 1b, and the 10-fold encryption is performed in fig. 1 c.
Step 6: and (3) collecting the encrypted discrete data point arrays of each section to form an encrypted pipeline three-dimensional point cloud data matrix, and establishing an encrypted three-dimensional model of the pipeline according to the encrypted three-dimensional point cloud data set.
Specifically, the step 6 includes the steps of: and inputting the encrypted discrete data point column into data processing software (for example, matlab) to carry out pipeline curved surface reconstruction, so as to obtain an encrypted point cloud picture of the pipeline.
Likewise, in order to improve the interactivity of the model, the step 6 may further include the following steps: writing the data format of the encrypted discrete data point column stored in the data processing software into a universal triangular grid format (e.g. stl), and performing modeling display in three-dimensional modeling software (e.g. UG) to obtain an encrypted three-dimensional model of the pipeline.
For example, as shown in fig. 2a, the un-encrypted acquired data reconstructed UG three-dimensional surface map, fig. 2b is the 2-times encrypted acquired data reconstructed UG three-dimensional surface map, and fig. 2c is the 10-times encrypted acquired data reconstructed UG three-dimensional surface map.
Compared with the prior art, the numerical processing method for the deformation in the pipeline provided by the embodiment has the advantages of high modeling speed and high model precision, and can reasonably formulate the numerical processing method for the deformation detection data.
While the invention has been described in detail and with reference to specific embodiments thereof, it will be apparent to one skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope thereof.