Pipeline ovality calculation method and device, storage medium and computer equipment

By obtaining the median and standard deviation of cross-sectional sampling points in pipeline deformation detection, deleting outliers, and performing ellipse fitting, the problem of inaccurate ellipticity calculation caused by noise interference in traditional methods is solved, and more accurate ellipticity calculation is achieved.

CN121256189AActive Publication Date: 2026-01-02NORTHEASTERN UNIV CHINA
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511133426.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2026-01-02
Estimated Expiration
2045-08-13

AI Technical Summary

Technical Problem

Traditional methods for calculating pipe ellipticity cannot effectively avoid noise interference, leading to inaccurate ellipticity calculation results. This is especially true in pipe deformation detection, where directly using the maximum and minimum values ​​of deformation data for calculation cannot determine the extreme values, thus affecting the accuracy of the calculation.

Method used

By acquiring multiple cross-sectional sampling points of the pipeline in a preset plane coordinate system, calculating the median and standard deviation of the cross-sectional sampling points, deleting outliers with discriminant values ​​greater than the standard value, performing ellipse fitting, calculating the ellipse coefficients, and finally determining the ellipticity of the pipeline.

Benefits of technology

It effectively eliminates outliers, reduces noise interference, improves the accuracy of ellipticity calculation, and ensures that the calculation results are closer to the actual pipe ellipticity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121256189A_ABST
    Figure CN121256189A_ABST
Patent Text Reader

Abstract

The invention discloses a pipeline ovality calculation method and device, a storage medium and computer equipment. The method comprises the following steps: acquiring a plurality of section sampling points of a pipeline under a preset plane coordinate system; calculating discriminant values of the section sampling points based on the median values and the standard deviation of the plurality of section sampling points; deleting the section sampling points of which the discriminant values are greater than the standard value from the plurality of section sampling points to obtain target sampling points; performing ellipse fitting on the target sampling point, and calculating an ellipse coefficient of the section ellipse of the pipeline; and calculating the ellipticity of the pipeline based on the ellipticity coefficient. According to the method, the problem that the judgment standard is deviated due to abnormal points in the inner diameter data filtering process is effectively eliminated, the elimination effect on the abnormal points in the pipeline radius data is improved, interference of the abnormal points on follow-up ellipse fitting is avoided, and the filtering accuracy is improved. Even if the center point deviates relative to the center point of the pipeline ellipse during sampling of the detector, the ellipticity closer to the actual result can be calculated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of pipeline measurement, and in particular to a pipeline ovality calculation method and device, a storage medium and a computer device. BACKGROUND

[0002] In the process of pipeline geometric deformation detection, the calculation of the ovality of the pipeline is one of the work focuses. Long oil and gas pipelines may be subjected to accidental impact during manufacturing, transportation and long-term use, which may cause local deformation of the pipeline. Once local buckling occurs, it will propagate along the axial direction of the pipeline, thereby seriously affecting the normal transportation of the pipeline. In some cases, the pipeline may even experience local buckling instability, causing serious economic losses and natural disasters.

[0003] The traditional ovality calculation method directly selects the maximum value in the deformation detection data as the maximum value of the radius of the pipeline cross section, and collects the data of the detection arm corresponding to the maximum value at 180° apart in the circumferential direction as the other radius of the maximum value. The sum of the two is the maximum diameter. Finally, the maximum diameter and the minimum diameter of the pipeline cross section obtained by the above method are brought into the ovality calculation formula to obtain the ovality of the pipeline cross section, that is:

[0004]

[0005] However, the in-pipeline detector may be disturbed during data collection in the submarine pipeline. The traditional method cannot avoid the interference of noise, which may lead to incorrect judgment of the ovality of the pipeline. Moreover, directly bringing the maximum and minimum values of the radius in the deformation data into the ovality formula for calculation cannot determine that the longest axis and the shortest axis obtained by calculation are the actual maximum values of the ellipse, which affects the accuracy of the ovality calculation. SUMMARY

[0006] Therefore, the present application provides a pipeline ovality calculation method, device, storage medium and computer device, which can eliminate abnormal points in the deformation detection data and avoid interference of the abnormal points with the ovality calculation result.

[0007] According to one aspect of the present application, a pipeline ovality calculation method is provided, comprising:

[0008] Obtaining a plurality of cross section sampling points of the pipeline in a preset plane coordinate system;

[0009] Calculating a discriminant value of the cross section sampling points based on the median and the standard deviation of the plurality of cross section sampling points;

[0010] Deleting the cross section sampling points with a discriminant value greater than a standard value from the plurality of cross section sampling points to obtain target sampling points, wherein the standard value is determined based on the number of the plurality of cross section sampling points and a significance coefficient.

[0011] performing ellipse fitting on the target sampling points to calculate an ellipse coefficient of a cross-sectional ellipse of the pipeline;

[0012] calculating an ellipticity of the pipeline based on the ellipse coefficient.

[0013] Optionally, the pipeline is provided with a deformation detector, and the obtaining of the plurality of cross-sectional sampling points of the pipeline in a preset plane coordinate system comprises:

[0014] calculating a change angle between the detection arm and a horizontal direction based on a physical signal of the detection arm collected by a sensor of the deformation detector;

[0015] calculating a pipeline cross-sectional inner diameter corresponding to the detection arm based on the change angle;

[0016] projecting the sampling points of the detection arm to the preset plane coordinate system based on the pipeline cross-sectional inner diameter to obtain the cross-sectional sampling points.

[0017] Optionally, the calculating of the pipeline cross-sectional inner diameter corresponding to the detection arm based on the change angle comprises:

[0018] calculating an offset height of the detection arm projected to a vertical direction based on the change angle and a length of the detection arm;

[0019] calculating the pipeline cross-sectional inner diameter by summing up the offset height, a radius of a main body of the deformation detector, a radius of a detection probe on the detection arm, and a height of a support structure of the detection arm.

[0020] Optionally, the performing of the ellipse fitting on the target sampling points to calculate the ellipse coefficient of the cross-sectional ellipse of the pipeline comprises:

[0021] constructing a quadratic curve equation of the target sampling points, and adding an equality constraint condition to the quadratic curve equation, wherein the equality constraint condition is used to represent that the curve is an ellipse;

[0022] establishing a Lagrange function based on the quadratic curve equation, with a target of minimizing a sum of squares of distances from the target sampling points to a specified ellipse;

[0023] taking a partial derivative of the Lagrange function and setting it to zero to obtain a generalized eigenvalue problem;

[0024] solving the generalized eigenvalue problem to obtain the ellipse coefficient;

[0025] wherein the quadratic curve equation is represented as: F(x, y) = ax 2 +bxy+cy 2 +dx+ey+f = 0.

[0026] The equation constraint condition is represented as: 4ac-2b 2 =1;

[0027] The Lagrange function is represented as:

[0028] The generalized eigenvalue problem is represented as:

[0029] In the formula, x, y represent the coordinates of the target sampling points, F(x, y) represents the distance from the target sampling point to the specified ellipse, a, b, c, d, e, f represent the ellipse coefficients, represents an ellipse coefficient vector, D represents a data matrix of the target sampling points, C represents a constraint matrix under the equation constraint condition, and the constraint matrix is a singular matrix, and λ represents a Lagrange multiplier.

[0030] Optionally, the solving of the generalized eigenvalue problem to obtain the ellipse coefficients comprises:

[0031] Constructing a scatter point matrix based on a polynomial of the data matrix;

[0032] Decomposing the ellipse coefficient vector, the scatter point matrix, and the constraint matrix in the generalized eigenvalue problem to obtain a decomposed eigenvalue problem;

[0033] Solving the decomposed eigenvalue problem to obtain the ellipse coefficients;

[0034] In the formula, S represents a scatter point matrix, S1, S2, S3 represent decomposed scatter point matrices, T D;

[0035] The decomposed eigenvalue problem is represented as

[0036] In the formula, S represents a scatter point matrix, S1, S2, S3 represent decomposed scatter point matrices, represents a decomposed ellipse coefficient vector, and C1 represents a decomposed constraint matrix.

[0037] Optionally, the calculating of the ellipticity of the pipeline based on the ellipse coefficients comprises:

[0038] Calculating a short axis length and a long axis length of a fitting ellipse of the pipeline based on the ellipse coefficients;

[0039] Calculating a difference value between the short axis length and the long axis length;

[0040] Calculating a quotient of the difference value and the long axis length to determine the ellipticity;

[0041] In the formula, the formula for calculating the short axis length and the long axis length is:

[0042]

[0043] wherein, l min represents the length of the short axis, l max represents the length of the long axis, a, b, c, d, e, f represent the elliptical coefficients.

[0044] Optionally, the deformation detector comprises:

[0045] a main body, a sensor arranged in the main body, the sensor being configured to collect a physical signal of a detection arm;

[0046] a plurality of detection arms, one end of each detection arm being connected to the main body via a support structure, the other end of each detection arm being rotatably connected to a detection probe, the detection arms being uniformly distributed along the circumference of the main body and forming a double-layer distribution structure along the axial direction of the main body, the detection arms in different layers being staggered along the circumference of the main body, and the end portion of the detection probe being in the shape of a circular arc.

[0047] According to another aspect of the present application, there is provided an apparatus for calculating the ellipticity of a pipeline, comprising:

[0048] a measurement module configured to obtain a plurality of cross-sectional sampling points of the pipeline in a preset plane coordinate system;

[0049] a filtering module configured to calculate a discriminant value of the cross-sectional sampling points based on the median and the standard deviation of the plurality of cross-sectional sampling points, and delete the cross-sectional sampling points with a discriminant value greater than a standard value from the plurality of cross-sectional sampling points to obtain target sampling points, wherein the standard value is determined based on the number of the plurality of cross-sectional sampling points and a significance coefficient;

[0050] a fitting module configured to perform elliptical fitting on the target sampling points to calculate the elliptical coefficients of the cross-sectional ellipse of the pipeline;

[0051] an ellipticity calculation module configured to calculate the ellipticity of the pipeline based on the elliptical coefficients.

[0052] Optionally, the measurement module is specifically configured to calculate the change angle between the detection arm and the horizontal direction based on the physical signal of the detection arm collected by the sensor of the deformation detector, calculate the cross-sectional inner diameter of the pipeline corresponding to the detection arm based on the change angle, and project the sampling points of the detection arm to the preset plane coordinate system based on the cross-sectional inner diameter of the pipeline to obtain the cross-sectional sampling points.

[0053] Optionally, the measuring module is specifically configured to calculate an offset height of the detection arm projected to a vertical direction based on the change angle and a length of the detection arm; and determine the inner diameter of the pipeline cross section by adding a sum of the offset height, a radius of a main body of the deformation detector, a radius of a detection probe on the detection arm, and a height of a support structure of the detection arm.

[0054] Optionally, the fitting module is specifically configured to construct a quadratic curve equation of the target sampling points, and add an equality constraint condition to the quadratic curve equation, wherein the equality constraint condition is used to represent that the curve is an ellipse; establish a Lagrange function based on the quadratic curve equation with a target of minimizing a square sum of distances from the target sampling points to a specified ellipse; obtain a generalized eigenvalue problem by taking partial derivatives of the Lagrange function and setting them to zero; and solve the generalized eigenvalue problem to obtain the ellipse coefficients.

[0055] The quadratic curve equation is represented as: F(x, y) = ax 2 +bxy+cy 2 +dx+ey+f = 0.

[0056] The equality constraint condition is represented as: 4ac-2b 2 = 1.

[0057] The Lagrange function is represented as:

[0058] The generalized eigenvalue problem is represented as:

[0059] wherein x and y represent coordinates of the target sampling points, F(x, y) represents a distance from the target sampling points to the specified ellipse, a, b, c, d, e, and f represent ellipse coefficients, represents an ellipse coefficient vector, D represents a data matrix of the target sampling points, C represents a constraint matrix under the equality constraint condition, the constraint matrix is a singular matrix, and λ represents a Lagrange multiplier.

[0060] Optionally, the fitting module is specifically configured to construct a scatter point matrix based on a polynomial of the data matrix; decompose the ellipse coefficient vector, the scatter point matrix, and the constraint matrix in the generalized eigenvalue problem to obtain a decomposed eigenvalue problem; and solve the decomposed eigenvalue problem to obtain the ellipse coefficients.

[0061] The scatter point matrix is represented as S = D T D.

[0062] The decomposed eigenvalue problem is represented as

[0063] In the formula, S represents a scatter matrix, S1, S2, and S3 represent decomposed scatter matrices, represents a decomposed ellipse coefficient vector, and C1 represents a decomposed constraint matrix.

[0064] Optionally, the ellipticity calculation module is specifically configured to calculate a short axis length and a long axis length of a fitting ellipse of the pipeline based on the ellipse coefficients; calculate a difference between the short axis length and the long axis length; and calculate a quotient of the difference and the long axis length to determine the ellipticity.

[0065] In the formula, l

[0066]

[0067] In the formula, l min represents the short axis length, and l max represents the long axis length, and a, b, c, d, e, and f represent ellipse coefficients.

[0068] According to still another aspect of the present application, a readable storage medium is provided, which has a program or instructions stored thereon, and the program or instructions are executed by a processor to implement the steps of the ellipticity calculation method of the pipeline.

[0069] According to still another aspect of the present application, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the ellipticity calculation method of the pipeline when executing the program.

[0070] By the above technical solution, the median value is used to calculate a discrimination value, and the abnormal sampling points are deleted based on the discrimination value. While reducing the noise and abnormal data, the abnormal point judgment is more in line with the distribution characteristics of the sampling data. The problem of deviating from the judgment standard due to the abnormal points in the inner diameter data filtering process is effectively eliminated, the effect of removing the abnormal points in the pipeline radius data is improved, and the interference of the abnormal points on the subsequent ellipse fitting is avoided. Even if the center point of the detector is offset relative to the center point of the pipeline ellipse during sampling, the ellipticity closer to the actual result can be calculated.

[0071] The above description is only a summary of the technical solutions of the present application. In order to more clearly understand the technical means of the present application, the content of the specification can be implemented, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS

[0072] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:

[0073] Figure 1 A flow diagram of a pipeline ovality calculation method provided by an embodiment of the application is shown;

[0074] Figure 2 A schematic diagram of a detection arm structure provided by an embodiment of the application is shown;

[0075] Figure 3 A schematic diagram of a pipeline cross-section inner diameter calculation provided by an embodiment of the application is shown;

[0076] Figure 4 A schematic diagram of a cross-section sampling point provided by an embodiment of the application is shown;

[0077] Figure 5 A structural block diagram of a pipeline ovality calculation device provided by an embodiment of the application is shown;

[0078] Figure 6 An electronic structure schematic diagram of a computer device provided by an embodiment of the application is shown. DETAILED DESCRIPTION

[0079] Hereinafter, the application will be described in detail with reference to the accompanying drawings and in conjunction with embodiments. It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other without conflict.

[0080] The embodiments of the application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are only used to explain the application, and cannot be interpreted as a limitation on the application.

[0081] Those skilled in the art can understand that, unless specifically stated, the singular form "a", "an", "said" and "the" used herein can also include the plural form. It should be further understood that the phrase "comprising" used in the specification of the application means that the features, integers, steps, operations, elements and / or components exist, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we say an element is "connected" or "joined" to another element, it can be directly connected or joined to the other element, or there can be intermediate elements. In addition, "connected" or "joined" used herein can include wireless connection or wireless connection. The phrase "and / or" used herein includes all or any single unit and all combinations of the associated listed items.

[0082] Exemplary embodiments according to this application will now be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein. It should be understood that these embodiments are provided so that the disclosure of this application is thorough and complete, and that the concept of these exemplary embodiments is fully conveyed to those skilled in the art.

[0083] This embodiment provides a method for calculating the ellipticity of a pipe, such as... Figure 1 As shown, the method includes:

[0084] Step 101: Obtain multiple cross-sectional sampling points of the pipeline in a preset planar coordinate system.

[0085] The cross-sectional sampling points can be detected by deformation detectors deployed inside the pipeline. Specifically, the deformation detector includes a main body and multiple detection arms. A sensor is installed in the main body to sense the physical signals generated by the displacement of the detection arms. These physical signals can be strain signals, voltage signals, etc., depending on the sensor type. For ease of pipeline inner diameter measurement, the main body can adopt a disc structure. One end of each detection arm is connected to the main body via a support structure. Multiple detection arms are evenly distributed along the circumference of the main body to ensure consistent deformation detection in all directions. When the pipeline deforms (e.g., bending, compression), the detection arms are compressed, resulting in corresponding mechanical displacement or rotation. A detection probe is installed on each detection arm; this probe is at least partially arc-shaped to reduce impact on the detection arm during displacement.

[0086] It is worth mentioning that, such as Figure 2 As shown, multiple detection arms 202 form a double-layer distribution structure along the axial direction of the main body 201, with the detection arms 202 in different layers staggered along the circumference of the main body 201. This double-layer distribution structure helps reduce detection blind spots and improves overall detection accuracy. Simultaneously, the staggered arrangement can also, to some extent, offset errors caused by external factors such as ambient temperature and vibration, improving measurement stability and reliability. Viewed from the detector's emission direction, even-numbered sensors (i.e., variations 2, 4, 6, ..., 36) are arranged in front, and odd-numbered sensors (i.e., variations 1, 3, 5, ..., 35) are arranged behind. Furthermore, the spacing between the front and rear layers of detection arms can be determined based on the actual application scenario and measurement requirements.

[0087] In practical applications, step 101, which involves obtaining multiple cross-sectional sampling points of the pipeline in a preset planar coordinate system, specifically includes the following steps:

[0088] Step 101-1: Calculate the change angle between the detection arm and the horizontal direction based on the physical signal of the detection arm collected by the sensor of the deformation detector.

[0089] Step 101-2, calculating the pipe section inner diameter corresponding to the detection arm based on the change angle.

[0090] Specifically, step 101-2 specifically comprises: based on the change angle and the length of the detection arm, calculating the offset height of the detection arm projected to the vertical direction; calculating the sum of the offset height, the radius of the main body of the deformation detector, the radius of the detection probe on the detection arm, and the height of the support structure of the detection arm, to determine the pipe section inner diameter.

[0091] Step 101-3, projecting the sampling points of the detection arm to a preset plane coordinate system based on the pipe section inner diameter, to obtain section sampling points.

[0092] Among them, the preset plane coordinate system can be a two-dimensional coordinate system with the center of the pipe section as the origin.

[0093] In this embodiment, the physical signal is accurately converted into the change angle of the detection arm with the horizontal direction through the mapping relationship between the physical signal and the angle. The physical deformation of the detection arm is reflected through the change angle, and the pipe section inner diameter can be calculated through the trigonometric function. Projecting the sampling points of each detection arm to the preset plane coordinate system can convert the scattered inner diameter data into an ordered coordinate point set, eliminating the positional deviation between different detection arms, especially in the case of a double-layer distributed structure of the deformation detector, making the section profile data consistent and comparable.

[0094] For example, as shown in the figure, Figure 3 The sensor directly connected to the detection arm is an angle sensor, which collects the up and down change angle of the detection arm, and then calculates it through the following formula. The initial data such as the length of the detection arm and the height of the support structure are necessary prior conditions. The formula for calculating the pipe section inner diameter using deformation detection data is:

[0095]

[0096] H=l p ×sinα;

[0097] R=R0+H s +R1+H;

[0098] In the formula, V represents the voltage signal collected by the deformation detector, V0 represents the initial voltage of the detector, V gain represents the voltage gain of the detection, α represents the included angle between the direction of the detection arm and the horizontal direction (change angle), l p represents the length of the detection arm, H represents the height of the detection arm projected to the vertical direction (offset height), R0 represents the radius of the internal main body of the detector, H s represents the height of the support structure, R1 represents the radius of the detection probe, and R represents the calculated pipe section inner diameter data.

[0099] To perform refined fitting of the pipe data to its inner diameter, further calculations of the pipe inner diameter data are required. Currently, the known data are the inner diameter data of the pipe cross-section and the angular information between each inner diameter. To eliminate positional deviations between different detection arms, these pipe cross-section inner diameter data need to be further converted into coordinate points on a planar coordinate system.

[0100] Suppose that the number of detection arms arranged in a circumferential ring around the detector is n, and the detection arms are evenly distributed, with the circumferential angle between adjacent detection arms being 360 / n. For example... Figure 4 As shown, let the radial direction of the first sensor be the positive y-axis of the planar coordinate system. The other detection arms are arranged sequentially in a clockwise direction with equal spacing. The inner diameter data corresponding to the sensor on each detection arm will be projected onto this planar coordinate system. The formula for projecting the inner diameter onto the coordinate point is:

[0101]

[0102] x i =R i ×sinα;

[0103] y i =R i ×cosα;

[0104] In the formula, i represents the i-th sensor arranged in a clockwise circumferential direction, and θ i R represents the angle between the calculated inner diameter of the i-th pipe section and the positive y-axis. i Let x represent the inner diameter of the i-th pipe section. i y i This represents the projected coordinates (cross-sectional sampling point) of the sampling point corresponding to the i-th inner diameter.

[0105] Step 102: Calculate the discriminant value of the cross-sectional sampling points based on the median and standard deviation of multiple cross-sectional sampling points.

[0106] Step 103: Delete the cross-sectional sampling points with discriminant values ​​greater than the standard value from multiple cross-sectional sampling points to obtain the target sampling points.

[0107] The standard value is determined based on the number of sampling points across multiple cross sections and the significance coefficient.

[0108] In this embodiment, the data collected by the pipe deformation detector is not all feasible, and there may be abnormal points in between. Abnormal points, i.e. sampling points with sudden changes in radius, may be caused by data anomalies due to detector abnormalities, or may be caused by data generated by pipe abnormalities such as protrusions or depressions. If all deformation detection data is directly brought into the pipe inner diameter fitting, the final fitted ellipse may deviate from the overall shape exhibited by most data due to the influence of the weight of these data, so the embodiment of the present application proposes to verify whether the deformation detection data of the sampling points conforms to the normal distribution to improve the accuracy of the pipe inner diameter fitting. Specifically, the median is used instead of the mean to calculate the discriminant value, and the abnormal sampling points are deleted based on the discriminant value. While reducing noise and abnormal data, the abnormal point judgment is more in line with the distribution characteristics of the sampling data. The problem of deviating from the judgment standard due to abnormal points in the inner diameter data filtering process is effectively eliminated, the effect of removing abnormal points in the pipe radius data is improved, and the interference of abnormal points on subsequent ellipse fitting is avoided, i.e. even if the center point of the detector is offset relative to the center point of the pipe ellipse during sampling, the ellipticity calculated is closer to the actual result.

[0109] For example, when removing abnormal points from the data of a certain sampling point, first arrange the radii of the cross-section sampling points in order from small to large, calculate the median R g and the standard deviation s. Then bring the radius data into the discriminant formula one by one to determine whether the value is abnormal data. When the absolute value of the residual error of a certain cross-section sampling point (discriminant value) is greater than the standard value, it is considered that the cross-section sampling point has a large error, and the point coordinates should be removed. Otherwise, it is retained. The standard deviation and the discriminant value formula are as follows:

[0110]

[0111] |v i |=λ(n,α)σ;

[0112] In the formula, v i represents the residual error (discriminant value) of the cross-section sampling point, and λ(n,β)σ represents the standard value, which can be matched according to the number of repeated measurements n and the detection level β, and β can be reasonably set according to the screening confidence probability of the abnormal point. The confidence probability P=(1-β), the smaller the β, the greater the confidence probability, and the stricter the screening requirement.

[0113] Table 1

[0114]

[0115] Step 104, ellipse fitting is performed on the target sampling point to calculate the ellipticity coefficient of the cross-section ellipse of the pipe.

[0116] In this embodiment, the ellipse fitting can completely describe the geometric characteristics of the cross-sectional profile, avoiding the local deviation caused by measuring a few points (such as a single point diameter), and ensuring the objectivity and quantitative accuracy of the ellipticity calculation.

[0117] In an actual application scenario, step 104, that is, the ellipse fitting of the target sampling points to calculate the ellipticity coefficient of the cross-sectional ellipse of the pipeline, specifically includes the following steps:

[0118] Step 104-1, constructing a quadratic curve equation of the target sampling points, and adding an equality constraint condition to the quadratic curve equation.

[0119] The quadratic curve equation is represented as: F(x, y) = ax 2 +bxy+cy 2 +dx+ey+f = 0. The equality constraint condition is used to represent that the curve is an ellipse, and the equality constraint condition can be represented as: 4ac-2b 2 =1.

[0120] In this embodiment, the conventional inequality constraint of the quadratic curve equation is converted into an equality constraint. After introducing the equality constraint, the fitting result is more consistent with the actual deformation parameters, so as to ensure the uniqueness of the obtained ellipse solution, avoid the occurrence of arbitrary conic curves such as hyperbola and parabola, and ensure that the result is consistent with the actual physical form of the pipeline cross-sectional deformation.

[0121] Step 104-2, minimizing the sum of squares of distances from the target sampling points to the specified ellipse as the target, and establishing a Lagrange function based on the quadratic curve equation.

[0122] Step 104-3, taking the partial derivative of the Lagrange function and setting it to zero to obtain a generalized eigenvalue problem.

[0123] Specifically, the Lagrange function is represented as: The generalized eigenvalue problem is represented as:

[0124] In the formula, x and y represent the coordinates of the target sampling points, F(x, y) represents the distance from the target sampling point to the specified ellipse, a, b, c, d, e, and f represent the ellipticity coefficients, represents an ellipticity coefficient vector, that is, D represents a data matrix of the target sampling points, C represents a constraint matrix under the equality constraint condition, and the constraint matrix is a singular matrix, and λ represents a Lagrange multiplier.

[0125] For example, the ellipse is a special case of a general quadratic curve, and the general form equation is F(x, y) = ax 2 +bxy+cy 2 +dx+ey+f = 0. In addition, the ellipse needs to satisfy the constraint condition: b2 -4ac < 1.

[0126] By introducing a vector: The polynomial of a general conic can be rewritten in vector form:

[0127] The fitting of a conic to cross-section sampling points (x i ,y i ), i = 1...N can be approximated by finding the minimum of the sum of squared distances of the cross-section sampling points to the conic, which is denoted by the coefficient ε:

[0128]

[0129] The above equation can be solved directly by least squares, but the result of the fitting is a general conic, not an ellipse. To ensure that the solution is unique, the ellipse constraint equation must be considered. Such a system is not easy to solve. In a suitable scale, the inequality constraint of the ellipse can be transformed into an equality constraint: 4ac - 2b 2 = 1.

[0130] The special fitting problem of an ellipse can be reformulated as:

[0131]

[0132]

[0133] Where the data matrix D of the target sampling points is an N x 6 matrix, and the constraint matrix C is a 6 x 6 matrix, which is expressed as follows:

[0134]

[0135] Construct the Lagrange function: And take the partial derivative and set it to 0 to get: That is

[0136] Step 104-4, solve the generalized eigenvalue problem to get the ellipse coefficients.

[0137] In this embodiment, the constraint condition is integrated into the objective function by Lagrange multiplier method to convert the fitting problem from a constrained optimization to a solvable generalized eigenvalue problem, so as to weaken the interference of individual noise points, avoid complex nonlinear optimization iteration process, prevent the problem of non-unique solution caused by constraint relaxation or boundary ambiguity, and make the fitting result closer to the real profile of the pipeline section. Thus, the influence of the center point deviation of the internal detector during sampling on the calculation result of the ellipticity is eliminated, and the accuracy of the ellipticity calculation under the condition that the detector center and the pipeline center are not coincident is ensured.

[0138] Further, in an embodiment, the step 104-4 specifically comprises: solving the generalized eigenvalue problem to obtain the elliptic coefficient, comprising: constructing a scatter point matrix based on the polynomial sum of the data matrix; decomposing the elliptic coefficient vector, the scatter point matrix and the constraint matrix in the generalized eigenvalue problem to obtain a decomposed eigenvalue problem; and solving the decomposed eigenvalue problem to obtain the elliptic coefficient.

[0139] Wherein, the scatter point matrix is represented as S=D T D;

[0140] The decomposed eigenvalue problem is represented as

[0141] In the formula, S represents the scatter point matrix, S1, S2 and S3 represent the decomposed scatter point matrix, represents the decomposed elliptic coefficient vector, and C1 represents the decomposed constraint matrix.

[0142] In this embodiment, the elliptic coefficient vector, the scatter point matrix and the constraint matrix are decomposed into sub-matrices or sub-vectors, irrelevant variables can be stripped, the high-dimensional generalized eigenvalue problem is converted into a low-dimensional sub-problem, and the calculation amount is greatly reduced. Moreover, the inverse operation or singular matrix processing can be effectively avoided, and the stability and accuracy of numerical calculation are improved.

[0143] For example, the scatter point matrix S of the matrix D is defined as S, which is a 6*6 scatter point matrix, represented as the polynomial sum of xy, that is,

[0144]

[0145] The optimal solution is obtained as The condition is: That is,

[0146] In the above established equation, the matrix C is a singular matrix, and the matrix S is also approximately singular (if all coordinate points are accurately located on the ellipse, then the matrix S is singular). Since the matrix S and the matrix C are of special structure, the following decomposition can be performed to make the process of finding the eigenvalue simpler.

[0147] Divide matrix D into two parts: D = (D1|D2), specifically:

[0148]

[0149] The scatter matrix S, the constraint matrix C, and the vector Similarly, by splitting, we obtain:

[0150]

[0151] Based on the above breakdown It can be rewritten as:

[0152]

[0153] After solving, we can obtain the following two equations:

[0154]

[0155]

[0156] Since matrix S3 is a regular matrix, the formula can be... Convert to use The formula can be obtained as follows:

[0157]

[0158] Define a matrix M of size 3×3.

[0159] Therefore, finding the minimum fitting function is equivalent to solving:

[0160]

[0161] Solving the above formula will yield the result. and through Sure Finally, the formula is used. Calculate That is, the coefficients of the fitted pipe cross-section ellipse equation.

[0162] Step 105: Calculate the ellipticity of the pipeline based on the elliptic coefficient.

[0163] In practical applications, step 105, which involves calculating the ellipticity of the pipeline based on the elliptic coefficient, specifically includes the following steps:

[0164] Step 105-1: Calculate the minor axis length and major axis length of the fitted ellipse of the pipeline based on the elliptic coefficient.

[0165] Step 105-2, calculate the difference between the short axis length and the long axis length.

[0166] Step 105-3, calculate the quotient of the difference and the long axis length to determine the ellipticity.

[0167] In this embodiment, after the elliptical fitting is performed on the pipe inner diameter data, the longest axis and the shortest axis of the ellipse that better fits the actual deformation of the pipe can be obtained. By quantifying the difference between the long axis and the short axis to calculate the ellipticity, the calculated ellipticity is closer to the actual result.

[0168] Specifically, the formula for calculating the short axis length and the long axis length is as follows:

[0169]

[0170]

[0171] In the formula, l min represents the short axis length, l max represents the long axis length, and a, b, c, d, e, and f represent the elliptical coefficients.

[0172] The pipe ellipticity calculation method provided by the embodiments of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in the terminal or the server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc. The server can be configured as a standalone physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform.

[0173] It should be noted that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0174] Further, as shown in Figure 5 as a specific implementation of the above pipe ellipticity calculation method, the embodiments of the present application provide a pipe ellipticity calculation device 300, which comprises a measurement module 301, a filtering module 302, a fitting module 303, and an ellipticity calculation module 304.

[0175] The measurement module 301 is configured to obtain a plurality of cross-section sampling points of the pipe in a preset plane coordinate system.

[0176] The filtering module 302 is configured to calculate a discriminant value of the cross-section sampling point based on a median value and a standard deviation of the plurality of cross-section sampling points, and delete a cross-section sampling point with a discriminant value greater than a standard value from the plurality of cross-section sampling points to obtain a target sampling point, wherein the standard value is determined based on a number of the plurality of cross-section sampling points and a significance coefficient;

[0177] The fitting module 303 is configured to perform elliptical fitting on the target sampling point to calculate elliptical coefficients of a cross-section ellipse of the pipeline.

[0178] The ellipticity calculation module 304 is configured to calculate the ellipticity of the pipeline based on the elliptical coefficients.

[0179] Further, the measuring module 301 is specifically configured to calculate a change angle between the detection arm and a horizontal direction based on a physical signal of the detection arm collected by a sensor of the deformation detector, calculate a pipeline cross-section inner diameter corresponding to the detection arm based on the change angle, and project the sampling points of the detection arm to a preset plane coordinate system to obtain the cross-section sampling points based on the pipeline cross-section inner diameter.

[0180] Further, the measuring module 301 is specifically configured to calculate an offset height of the detection arm projected to a vertical direction based on the change angle and a length of the detection arm, and determine the pipeline cross-section inner diameter based on a sum of the offset height, a radius of a main body of the deformation detector, a radius of a detection probe on the detection arm, and a height of a support structure of the detection arm.

[0181] Further, the fitting module 303 is specifically configured to construct a quadratic curve equation of the target sampling points, and add an equality constraint condition to the quadratic curve equation, wherein the equality constraint condition is used to represent that the curve is an ellipse, establish a Lagrange function based on the quadratic curve equation with a minimum distance square sum of the target sampling points to a specified ellipse as a target, obtain a generalized eigenvalue problem by taking partial derivatives of the Lagrange function and setting zero, and obtain the elliptical coefficients by solving the generalized eigenvalue problem.

[0182] The quadratic curve equation is represented as: F(x, y) = ax 2 +bxy+cy 2 +dx+ey+f = 0.

[0183] The equality constraint condition is represented as: 4ac-2b 2 = 1.

[0184] The Lagrange function is represented as:

[0185] The generalized eigenvalue problem is represented as:

[0186] In the formula, x and y represent coordinates of the target sampling points, F(x, y) represents a distance of the target sampling points to the specified ellipse, a, b, c, d, e, and f represent the elliptical coefficients. represents an ellipse coefficient vector, D represents a data matrix of target sampling points, C represents a constraint matrix under an equation constraint condition, the constraint matrix is a singular matrix, and λ represents a Lagrange multiplier.

[0187] Further, the fitting module 303 is specifically configured to construct a scatter matrix based on a polynomial of the data matrix; decompose the ellipse coefficient vector, the scatter matrix and the constraint matrix in the generalized eigenvalue problem to obtain a decomposed eigenvalue problem; and solve the decomposed eigenvalue problem to obtain the ellipse coefficient.

[0188] The scatter matrix is represented as S = D T D.

[0189] The decomposed eigenvalue problem is represented as

[0190] In the formula, S represents the scatter matrix, S1, S2 and S3 represent the decomposed scatter matrix, represents the decomposed ellipse coefficient vector, and C1 represents the decomposed constraint matrix.

[0191] Further, the ellipticity calculation module 304 is specifically configured to calculate a minor axis length and a major axis length of the fitting ellipse of the pipeline based on the ellipse coefficient; calculate a difference value between the minor axis length and the major axis length; and calculate a quotient of the difference value and the major axis length to determine the ellipticity.

[0192] In the formula, the formula for calculating the minor axis length and the major axis length is:

[0193]

[0194] In the formula, l min represents the minor axis length, l max represents the major axis length, and a, b, c, d, e and f represent the ellipse coefficient.

[0195] The specific limitation of the pipeline ellipticity calculation device can be referred to the limitation of the pipeline ellipticity calculation method in the foregoing, and will not be described here. Each module in the pipeline ellipticity calculation device can be realized by software, hardware and a combination thereof in whole or in part. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so as to be called and executed by the processor to perform the operation corresponding to each module.

[0196] Based on the method as shown in the foregoing Figure 1 , correspondingly, the embodiment of the present application further provides a readable storage medium, which stores a computer program, and the program is executed by a processor to realize the pipeline ellipticity calculation method as shown in the foregoing Figure 1 .

[0197] Based on such understanding, the technical scheme of the present application can be embodied in the form of a software product, which can be stored in a nonvolatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.), and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in various implementation scenarios of the present application.

[0198] Based on the above method as Figure 1 indicated, and Figure 5 the virtual device embodiment as Figure 6 indicated, in order to achieve the above-mentioned purpose, the embodiments of the present application also provide a computer device, which comprises a processor 401 and a memory 402, and the memory 402 stores a program or instructions which can be run on the processor 401, and the program or instructions are executed by the processor 401 to realize the pipe ellipticity calculation method as Figure 1 indicated above.

[0199] The memory 402 can be used to store software programs and various data. The memory 402 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 402 can include a volatile memory or a non-volatile memory, or the memory 402 can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 402 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.

[0200] The processor 401 can include one or more processing units; optionally, the processor 401 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 401.

[0201] The computer device can specifically be a personal computer, a server, a network device, and the like.

[0202] Optionally, the computer device can further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface can include a display screen, an input unit such as a keyboard, and the like. Optionally, the user interface can further include a USB interface, a card reader interface, and the like. The network interface can optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), and the like.

[0203] Those skilled in the art can understand that the computer device structure provided by the embodiment does not constitute a limitation on the computer device, and can include more or fewer components, or combine certain components, or different component arrangements.

[0204] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and a necessary general hardware platform, or by hardware to obtain the plurality of cross-section sampling points of the pipeline in the preset plane coordinate system; based on the median and the standard deviation of the plurality of cross-section sampling points, the discrimination value of the cross-section sampling point is calculated; the cross-section sampling point with a discrimination value greater than a standard value is deleted from the plurality of cross-section sampling points to obtain a target sampling point, wherein the standard value is determined based on the number of the plurality of cross-section sampling points and a significance coefficient; the target sampling point is subjected to elliptical fitting to calculate the elliptical coefficient of the cross-section ellipse of the pipeline; and the ellipticity of the pipeline is calculated based on the elliptical coefficient. In the present embodiment, the median is used instead of the average to calculate the discrimination value, and the abnormal sampling points are deleted based on the discrimination value. While reducing noise and abnormal data, the abnormal point judgment is more in line with the distribution characteristics of the sampling data. The problem of deviating from the judgment standard due to abnormal points in the inner diameter data filtering process is effectively eliminated, the effect of removing abnormal points in the pipeline radius data is improved, and the interference of abnormal points on subsequent elliptical fitting is avoided. Even if the center point of the detector is offset relative to the center point of the pipeline ellipse during sampling, the ellipticity calculated is closer to the actual result.

[0205] Those skilled in the art can understand that the modules in the apparatus in the embodiments are not necessarily essential for implementing the present application. Those skilled in the art can understand that the modules in the apparatus in the embodiments can be distributed in the apparatus in the embodiments as described in the embodiments, or can be changed and located in one or more apparatuses different from the embodiments. The modules in the above embodiments can be combined into one module, or can be further split into a plurality of sub-modules.

[0206] The above serial numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. The above disclosure is only a few specific embodiments of the present application, but the present application is not limited thereto. Any changes that can be thought of by those skilled in the art should fall within the scope of the present application.

Claims

1. A method for calculating the ellipticity of a pipe, characterized in that, The method includes: Obtain multiple cross-sectional sampling points of the pipeline in a preset planar coordinate system; Based on the median and standard deviation of multiple cross-sectional sampling points, the discriminant value of the cross-sectional sampling points is calculated; Target sampling points are obtained by deleting cross-sectional sampling points with discriminant values ​​greater than standard values ​​from a plurality of cross-sectional sampling points, wherein the standard value is determined based on the number of the plurality of cross-sectional sampling points and the significance coefficient; Ellipse fitting is performed on the target sampling points to calculate the ellipse coefficient of the cross-sectional ellipse of the pipeline; The ellipticity of the pipeline is calculated based on the elliptic coefficient.

2. The method for calculating the ellipticity of a pipeline according to claim 1, characterized in that, A deformation detector is installed inside the pipe, and the acquisition of multiple cross-sectional sampling points of the pipe in a preset planar coordinate system includes: Based on the physical signals of the detection arm collected by the sensor of the deformation detector, the change angle between the detection arm and the horizontal direction is calculated; Calculate the inner diameter of the pipe section corresponding to the detection arm based on the changed angle; Based on the inner diameter of the pipe cross-section, the sampling points of the detection arm are projected onto the preset plane coordinate system to obtain the cross-section sampling points.

3. The method for calculating the ellipticity of a pipeline according to claim 2, characterized in that, The calculation of the pipe cross-section inner diameter corresponding to the detection arm based on the changed angle includes: Based on the changing angle and the length of the detection arm, calculate the offset height of the detection arm projected into the vertical direction; The inner diameter of the pipe section is determined by summing the offset height, the radius of the main body of the deformation detector, the radius of the detection probe on the detection arm, and the height of the support structure of the detection arm.

4. The method for calculating the ellipticity of a pipeline according to claim 1, characterized in that, The step of performing ellipse fitting on the target sampling points and calculating the ellipse coefficients of the pipe cross-section ellipse includes: Construct a quadratic curve equation for the target sampling points, and add equality constraints to the quadratic curve equation, wherein the equality constraints are used to indicate that the curve is an ellipse; With the goal of minimizing the sum of squared distances from the target sampling point to the specified ellipse, a Lagrange function is established based on the quadratic curve equation; Taking the partial derivative of the Lagrange function and setting it to zero yields the generalized eigenvalue problem; The elliptic coefficients are obtained by solving the generalized eigenvalue problem; The equation of the quadratic curve is expressed as: F(x,y)=ax 2 +bxy+cy 2 +dx+ey+f=0; The equality constraint condition is expressed as: 4ac-2b 2 =1; The Lagrange function is expressed as: The generalized eigenvalue problem is expressed as: In the formula, x and y represent the coordinates of the target sampling point, F(x,y) represents the distance from the target sampling point to the specified ellipse, and a, b, c, d, e, and f represent the ellipse coefficients. Let λ represent the elliptic coefficient vector, D represent the data matrix of the target sampling points, C represent the constraint matrix under the equality constraint condition, and the constraint matrix is ​​a singular matrix, and λ represents the Lagrange multiplier.

5. The method for calculating the ellipticity of a pipe according to claim 4, characterized in that, The process of solving the generalized eigenvalue problem to obtain the elliptic coefficients includes: Construct a scatter matrix based on the multinomial sum of the data matrix; The elliptic coefficient vector, the scatter matrix, and the constraint matrix in the generalized eigenvalue problem are decomposed to obtain the decomposed eigenvalue problem; The elliptic coefficients are obtained by solving the eigenvalue decomposition problem. The scatter matrix is ​​represented as S = D T D; The eigenvalue decomposition problem is expressed as: In the formula, S represents the scatter matrix, and S1, S2, and S3 represent the decomposed scatter matrices. C1 represents the decomposed elliptic coefficient vector, and C2 represents the decomposed constraint matrix.

6. The method for calculating the ellipticity of a pipe according to any one of claims 1 to 5, characterized in that, The calculation of the ellipticity of the pipeline based on the elliptic coefficient includes: The minor axis length and major axis length of the fitted ellipse of the pipeline are calculated based on the elliptic coefficients. Calculate the difference between the minor axis length and the major axis length; Calculate the quotient of the difference and the length of the major axis to determine the ellipticity; The formulas for calculating the lengths of the minor and major axes are expressed as follows: In the formula, l min Indicates the length of the minor axis, l max The major axis length is represented by , and a, b, c, d, e, and f represent the elliptic coefficients.

7. The method for calculating the ellipticity of a pipe according to any one of claims 2 to 5, characterized in that, The deformation detector includes: The main body is equipped with a sensor, which is used to collect physical signals from the detection arm; Multiple detection arms are provided. One end of each detection arm is connected to the main body via a support structure, and the other end of each detection arm is rotatably connected to a detection probe. The detection arms are evenly distributed along the circumference of the main body and form a double-layer distribution structure along the axial direction of the main body. The detection arms located in different layers are staggered along the circumference of the main body. The end of the detection probe is arc-shaped.

8. A device for calculating the ellipticity of a pipeline, characterized in that, The device includes: The measurement module is used to acquire multiple cross-sectional sampling points of the pipeline in a preset plane coordinate system; The filtering module is used to calculate the discriminant value of the cross-sectional sampling points based on the median and standard deviation of the multiple cross-sectional sampling points; and, Target sampling points are obtained by deleting cross-sectional sampling points with discriminant values ​​greater than standard values ​​from a plurality of cross-sectional sampling points, wherein the standard value is determined based on the number of the plurality of cross-sectional sampling points and the significance coefficient; The fitting module is used to perform ellipse fitting on the target sampling points and calculate the ellipse coefficient of the cross-sectional ellipse of the pipeline. An ellipticity calculation module is used to calculate the ellipticity of the pipeline based on the ellipticity coefficient.

9. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the pipeline ellipticity calculation method as described in any one of claims 1 to 7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for calculating the ellipticity of the pipeline as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Coiled tubing ovality testing method

    CN103063126A

  • Data analysis method and system and electronic equipment

    CN116502418A

  • Method and device for measuring ovality of nodular cast iron pipe

    CN116817737A

  • Method and apparatus for analyzing flow matrix data, and computer device

    US20240192117A1