A method for obtaining the surface morphology of corroded pipelines based on generative adversarial networks

By combining generative adversarial networks and random harmonic functions, the problem of the difficulty in truly reflecting the surface morphology of pipeline corrosion in existing technologies is solved, and high-fidelity and controllable generation of multi-scale corrosion surfaces is achieved, thereby improving the accuracy and efficiency of corrosion assessment.

CN120493458BActive Publication Date: 2025-09-19SHANDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510947040.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-09-19
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

Existing technologies are unable to truly reflect the multi-scale random characteristics of pipeline corrosion surfaces, resulting in large deviations in corrosion assessment results and difficulty in meeting the requirements of parameter controllability and spectral consistency.

Method used

By combining generative adversarial networks with three-dimensional laser scanning, roughness parameters and two-dimensional power spectral density extraction, conditional generative adversarial network mapping and second-kind random harmonic functions, an end-to-end mapping method from measured data to corrosion morphology is constructed to generate multi-scale random corrosion surfaces.

Benefits of technology

It achieves high-fidelity and controllable generation of the surface morphology of corroded pipelines, improves the authenticity and credibility of corrosion morphology reconstruction, provides a more reliable morphology data basis, and provides real and reliable data support for pipeline strength analysis and remaining life prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493458B_ABST
    Figure CN120493458B_ABST
Patent Text Reader

Abstract

This invention discloses a method for acquiring the surface morphology of corroded pipelines based on a generative adversarial network, belonging to the technical field of pipeline corrosion assessment. The method first uses three-dimensional laser scanning to acquire a point cloud of the corroded pipeline and unfolds it into a plane. After filtering out macroscopic deformations, a number of samples are extracted through sliding window sampling. Seven roughness parameters and a two-dimensional power spectral density (PSD) are then calculated to construct a roughness-PSD dataset. A conditional Wasserstein generative adversarial network is used to train a mapping model between the roughness parameters and the PSD, so that a matching PSD matrix can be generated by inputting the target parameters. Finally, a second-kind random harmonic function inverse transform is used to obtain a corrosion surface height field of a specified size, which is then mapped back to cylindrical coordinates to generate a complete corroded pipeline model. This method not only retains the true spectral characteristics but also generates simulated corrosion surfaces at multiple scales by adjusting the roughness, providing reliable data support for the safety assessment of corroded pipelines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pipeline corrosion assessment, and in particular to a method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network. Background Art

[0002] Corrosion is a common and serious form of failure during pipeline system operation, and its morphological characteristics directly affect the mechanical properties of materials and the accuracy of remaining life assessments. Existing international standards such as DNV-RP-F101 and ASME B31G typically simplify corrosion defects into regular geometric shapes such as rectangles and ellipses for strength and safety assessments. However, this idealized defect model ignores the random roughness of actual corroded surfaces, making it difficult to accurately reflect complex morphologies such as corrosion pits and surface undulations, resulting in significant deviations in the resulting assessment results.

[0003] In actual operating conditions, pipeline exterior corrosion morphology exhibits significant multi-scale characteristics and a highly random distribution, with distinct morphological differences between the early, middle, and late stages of corrosion. For example, early corrosion is dominated by uniform, small-scale pitting, while mid-stage corrosion exhibits deeper, localized erosion, and late-stage corrosion is often accompanied by large-scale shedding and roughness. These different corrosion morphologies directly influence local stress concentration, crack initiation, and propagation, posing a serious threat to the safe operation of pipelines.

[0004] To address this issue, academia and industry have proposed a variety of random surface generation methods, including those based on spectral domain synthesis, fractal geometry modeling, and random harmonic superposition. However, most methods struggle to simultaneously meet the two key requirements of parameter controllability and spectral consistency. Specifically, while spectral domain methods can precisely control the spectral distribution of the surface, they lack parameterization and sample diversity. Fractal models, despite their self-similar nature, cannot accurately map the statistical parameters of different corrosion stages. Random harmonic superposition struggles to strike a balance between generation efficiency and computational complexity. Summary of the Invention

[0005] Based on the above technical problems, the present invention proposes a method for obtaining the surface morphology of corroded pipelines based on a generative adversarial network.

[0006] The technical solution adopted by the present invention is:

[0007] A method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network comprises the following steps:

[0008] Step S1: Scan the outer surface of the corroded pipeline using a three-dimensional laser scanner to obtain point cloud data of the outer surface of the corroded pipeline;

[0009] Step S2: constructing an initial coordinate system for the corrosion pipeline based on the point cloud data obtained in step S1, then removing redundant data points and unfolding the cylindrical surface into a plane;

[0010] Step S3, processing the plane expanded in step S2 to obtain the height distribution of the corroded pipeline surface;

[0011] Step S4: Using a sliding window sampling technique to perform data augmentation on the corrosion pipeline surface height distribution obtained in step S3, and generating a number of corrosion surface samples by translation and overlapping operations of the sliding window;

[0012] Step S5, for each corroded surface sample obtained in step S4, respectively calculating seven roughness parameters, namely, standard deviation, root mean square gradient, interface expansion area ratio, autocorrelation length, texture direction ratio, average wavelength in the x-direction, and average wavelength in the y-direction;

[0013] Step S6: Calculate a two-dimensional power spectral density matrix for each corroded surface sample obtained in step S4; and then combine the seven roughness parameters obtained in step S5 to construct a data set including the roughness parameters and the corresponding two-dimensional power spectral density matrix;

[0014] Step S7: Based on the data set constructed in step S6, a generative adversarial network model is used and model training is performed to establish a mapping relationship between the corrosion surface roughness parameters and the corresponding two-dimensional power spectral density matrix;

[0015] Step S8: setting the corrosion surface roughness parameters according to research needs, and using the generative adversarial network model trained in step S7 to quickly generate the corresponding two-dimensional power spectrum density matrix;

[0016] Step S9: Use the second-kind random harmonic function to perform an inverse transformation on the two-dimensional power spectrum density matrix generated in step S8, convert it into a corroded rough surface plane height field, and then restore the corroded rough surface plane height field to a cylindrical shape, thereby obtaining the surface morphology of the corroded pipeline.

[0017] The beneficial technical effects of the present invention are as follows:

[0018] This paper proposes a method for generating corroded pipeline surface morphology from freely set roughness parameters based on a generative adversarial network. This method integrates three-dimensional point cloud acquisition, roughness parameter and two-dimensional power spectral density extraction, conditional generative adversarial network mapping, and collaborative modeling of second-kind random harmonic functions to construct a full-process digital link from measured data to high-fidelity simulation of pipeline corrosion morphology. This method, for the first time, achieves end-to-end mapping from parameter space to spectral features and then to the height field of the corroded rough surface. This method not only enables flexible control of multi-scale random roughness features but also strikes a balance between sample diversity and spectral consistency, providing a more realistic and reliable morphological data foundation for pipeline strength analysis and remaining life prediction.

[0019] Specifically, the present invention has the following advantages:

[0020] (1) The generator in the generative adversarial network model adopted in the present invention can quickly output a PSD matrix that is highly similar to the actual measured spectrum under the control of seven roughness parameters, and restore the multi-scale randomly undulating corrosion surface in the spatial domain with the help of random harmonic functions, overcoming the defect that the traditional ideal geometric model is difficult to reflect the random roughness characteristics, and improving the authenticity and credibility of the corrosion morphology reconstruction.

[0021] (2) The end-to-end mapping between roughness parameters and frequency spectrum established in the present invention does not require reliance on empirical formulas or manual trial and error. Parameter adjustment can precisely control corrosion depth, texture direction, and spatial correlation scales, thereby improving the controllability and diversity of morphology simulation and providing sufficient samples for sensitivity analysis and limit state assessment.

[0022] (3) When the present invention utilizes the second type of random harmonic function, the plane size (lx, ly) can be specified as needed, and after being projected back into the cylindrical shape, it corresponds to different pipe diameters and lengths. Therefore, the morphology of corrosion pipelines of various specifications and sizes can be quickly generated, which expands the engineering applicability of the method.

[0023] (4) The present invention has multiple advantages in simulating and generating pipe wall corrosion morphology, such as authenticity, parameter controllability, and dimensional scalability, and has broad engineering application prospects and promotion value. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The present invention will be further described below with reference to the accompanying drawings and specific embodiments:

[0025] Figure 1 A flowchart of a method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network provided in an embodiment of the present invention;

[0026] Figure 2 Schematic diagram of a three-dimensional laser scanning and positioning device for a corroded pipeline according to an embodiment of the present invention;

[0027] Figure 3 Schematic diagram of a flattened cylindrical pipe involved in an embodiment of the present invention;

[0028] Figure 4 Schematic diagram of the surface morphology separation results of the corroded pipeline involved in the embodiment of the present invention; (a) is the original height cloud map, (b) is the geometric shape deviation map after Gaussian filtering, and (c) is the corrosion surface morphology map after removing macroscopic deformation;

[0029] Figure 5 Schematic diagram of sliding window sampling of the flattened height field involved in an embodiment of the present invention;

[0030] Figure 6 is an autocorrelation function diagram of the corrosion surface height field involved in an embodiment of the present invention;

[0031] Figure 7 Schematic diagram of the power spectral density (PSD) matrix of the corrosion surface height field involved in the embodiment of the present invention;

[0032] Figure 8 A schematic diagram of the structure of the conditional Wasserstein generative adversarial network (cWGAN-GP) involved in an embodiment of the present invention;

[0033] Figure 9 A comparison diagram of the corrosion surface PSD generated by the generator involved in the embodiment of the present invention and the real PSD; (a) is the real PSD, and (b) is the simulated PSD;

[0034] Figure 10 : This is a comparison diagram of the corrosion surface morphology image generated by the method of the present invention and the corrosion surface morphology simulated based on the real PSD involved in the embodiment of the present invention; wherein (a) is the corrosion surface simulated based on the real PSD, and (b) is the corrosion surface generated by the method of the present invention;

[0035] Figure 11 A diagram showing a model of a cylindrical corrosion pipeline of different sizes involved in an embodiment of the present invention;

[0036] Figure 12 This is a flow chart of generating a corrosion pipeline model from specified roughness parameters involved in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] This invention discloses a method for acquiring the surface topography of corroded pipelines based on a generative adversarial network. The method first uses 3D laser scanning to acquire a point cloud of the corroded pipeline and unfolds it into a plane. After filtering out macroscopic deformation, a sliding window is used to extract several samples. Seven roughness parameters and a 2D power spectral density (PSD) are then calculated to construct a roughness-PSD dataset. A conditional Wasserstein generative adversarial network is used to train a mapping model between the roughness parameters and the PSD. Inputting the target parameters generates a matching PSD matrix. Finally, an inverse transformation of the second-kind random harmonic function is performed to obtain a height field of the corrosion surface of a specified size. This is then mapped back to cylindrical coordinates to generate a complete corroded pipeline model. This method preserves the true spectral characteristics while generating simulated corrosion surfaces at multiple scales by adjusting the roughness, providing reliable data support for the safety assessment of corroded pipelines.

[0038] like Figure 1 As shown, a method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network specifically includes the following steps:

[0039] S1. Place the corrosion pipe to be tested in the positioning device, such as Figure 2 As shown, the positioning device is cylindrical and includes several annular wires 1 and several straight wires 2. The annular wires 1 are arranged in parallel up and down, and the vertical distances between adjacent annular wires are equal; several straight wires 2 are arranged at intervals along the circumference of the annular wires 1, and the annular wires are connected as a whole. The intersection of the straight wires and the annular wires forms a coordinate positioning point 3. The axis of the corrosion pipe 4 completely coincides with the axis of the positioning device, and a fixing seat 5 is provided at the bottom of the corrosion pipe 4. The annular wires 1 and the straight wires 2 can be made of thin iron wire or thin steel wire, and the corresponding Figure 2 The positioning device shown in the figure is a cylindrical wire mesh. Several high-precision coordinate points are pre-set on the positioning device to quickly determine the origin and orientation of the global spatial coordinate system during subsequent processing. A 3D laser scanner is used to perform multiple 360° circumferential scans of the corroded pipeline's exterior surface, ensuring that all areas of the pipeline surface are scanned at least twice across the entire surface, eliminating blind spots. After the scan is complete, the scanner's accompanying software exports the original point cloud file, which serves as preliminary data for subsequent coordinate alignment and expansion processing.

[0040] S2. Use the positioning points to construct the initial coordinate system of the pipeline in the collected original point cloud: take the pipeline axis direction as the X axis, the cross-sectional plane is parallel to the Y and Z axes, or in other words, the Y and Z axes are in the cross-sectional plane of the pipeline, so that the coordinate origin (0,0,0) is located at the center of the cross-sectional circle at the bottom of the pipeline. Based on this, the initial three-dimensional coordinates of the pipeline surface and the surrounding point cloud are given.

[0041] Remove the surface of the positioning device, the positioning points, and other redundant miscellaneous points, and only retain the coordinates of the outer surface of the corroded pipeline. Then, unfold the cylindrical surface onto a plane coordinate without distortion, as shown in formulas (1)–(3):

[0042] x = X (1)

[0043] (2)

[0044] (3)

[0045] In the formulas, X, Y, Z are the three-dimensional coordinate values of any surface point in the original coordinate system; x, y, z are the coordinate values in the unfolded coordinate system; C is the perimeter of the pipeline cross-section, and r is the inner radius of the pipeline.

[0046] The schematic diagram of flattening the cylindrical pipeline is as Figure 3 shown.

[0047] S3. The height field of the flattened pipeline surface contains the overall geometry and actual corrosion texture of the pipeline. To isolate the true corrosion morphology, first apply Gaussian filtering for smoothing to obtain the geometric shape deviation reflecting the overall bending and deformation trend of the pipeline . As Figure 4 shown, remove the high-frequency fluctuations on the surface and only retain the low-frequency macroscopic contour. Subsequently, use formula (4) to isolate the geometric shape error, and obtain the height distribution of the corroded pipeline surface fluctuating above and below the zero-average plane .

[0048] (4)

[0049] Figure 4 In (a), it shows the original height cloud map before filtering, (b) is the geometric shape deviation map, and (c) shows the isolated corrosion morphology, with the fluctuation range and texture features being clearer.

[0050] S4. Apply the sliding window sampling technique to the height distribution obtained in step S3 to achieve data augmentation and obtain multiple sets of corrosion surface samples with statistical significance. The axial length of the unfolded pipeline is L, and the circumferential length, i.e., the perimeter, is C. On the L×C height field, select a square sampling window with side length h, and set the sliding step size s (0 < s ≤ h) of the window in the axial and circumferential directions, as Figure 5 shown. During sampling, the window starts from the coordinate origin and is translated along the axial direction successively, with each movement distance being s; at the same time, the window slides repeatedly along the circumferential direction with the same step size s until the entire L×C area is covered. The whole process will generate There are h×h sample sub-blocks, each of which contains rich local corrosion features.

[0051] S5. For each h×h sample sub-block obtained in step S4, seven key parameters characterizing the corrosion roughness are extracted in sequence. First, the standard deviation of the sample height field is calculated. , whose calculation formula is shown in Equation (5), is used to measure the overall amplitude of surface undulation.

[0052] (5)

[0053] Where, is the height value of the 𝑖,𝑗th point in the sample sub-block or measurement area, is the average height of the sample sub-block, M and N are the number of data points in the axial and annular directions of the sample sub-block, respectively.

[0054] Then, based on the height difference between adjacent data points, the root mean square gradient is calculated using formulas (6)-(7) , this parameter can reflect the degree of change of surface slope.

[0055] (6)

[0056] (7)

[0057] Where, is the gradient of the adjacent points, is the i-th data point in the axial direction, is the jth data point in the circumferential direction, and represent the data point spacing in the axial and annular directions, respectively, and A is the projected area of ​​the sample sub-block in the thickness direction.

[0058] Calculate the interface expansion area ratio using equations (8) and (9): , describing the additional surface area increment caused by surface micro-undulations.

[0059] (8)

[0060] (9)

[0061] Where, is the area after the interface is expanded.

[0062] Autocorrelation length and texture direction ratio The purpose is to quantify the spatial correlation and anisotropy of the corrosion surface height field. When calculating, first construct a two-dimensional autocorrelation surface of the surface height field. After normalizing the amplitude of the surface, introduce the height The cross-section plane intersects with the autocorrelation surface to form a closed contour. The radial distance of the contour in each direction is measured with the origin as the center, and the maximum radius can be obtained respectively. With minimum radius The autocorrelation length is thus defined as It indicates that the autocorrelation value along the direction of fastest decay first drops to The spatial scale of the texture direction , which is used to measure anisotropy. The closer its value is to 1, the more consistent the correlation attenuation in all directions is, and the closer the surface texture is to isotropy.

[0063] The construction of the above autocorrelation surface relies on the Fourier spectrum of the height field. Specifically, Performing a two-dimensional Fourier transform yields equation (10):

[0064] (10)

[0065] Where, is the two-dimensional Fourier transform of the flattened pipe surface height field z(x,y); u and v are frequency domain coordinates, corresponding to the frequency components in the x and y directions respectively; i here is the imaginary unit .

[0066] Then the spectrum energy Perform inverse Fourier transform and normalize it with its peak value to obtain the unit autocorrelation function, as shown in formula (11):

[0067] (11)

[0068] Where, is the two-dimensional autocorrelation function of the corrosion surface height field; t x and t y are the axial and circumferential translations respectively; is the inverse Fourier transform operator; Represents the maximum normalization operation in the autocorrelation function.

[0069] Finally, the average wavelength of the sample in the axial (x-direction) and circumferential (y-direction) directions is calculated. In the calculation of the average wavelength, the horizontal grid column is first fixed, and a height profile is read along the vertical direction. When the profile rises from above the zero mean plane, then descends through the mean plane, and returns to the mean plane again, it is considered to have completed a complete band; the vertical grid spacing between the first and last crossing points of the band is recorded and multiplied by the vertical step length to obtain a single vertical wavelength. Averaging all complete bands of all horizontal profiles can obtain the average wavelength in the y direction. As shown in formula (12),

[0070] (12)

[0071] Where, is the kth wavelength in the y direction.

[0072] The same method is used to obtain the average wavelength in the x direction , as shown in formula (13),

[0073] (13)

[0074] Where, is the lth wavelength in the x direction.

[0075] The above parameters together constitute the roughness parameter vector for each sampling sub-block, providing high-dimensional and rich input features for subsequent cWGAN-GP model training.

[0076] S6. For each h×h sample sub-block obtained in step S4, calculate its two-dimensional power spectrum density matrix according to equation (14);

[0077] (14)

[0078] like Figure 7 As shown in Figure 2, this matrix clearly depicts the contribution of each spatial frequency component to the energy distribution. After the calculation is completed, the obtained PSD matrix and the seven roughness parameter vectors of the corresponding sample are used to construct a one-to-one mapping training dataset for efficient learning and generation of the subsequent cWGAN-GP model.

[0079] S7. Split the roughness parameter-PSD dataset constructed in step S6 into training, validation, and test sets in a ratio of 7:1.5:1.5. Z-score normalization was applied to the roughness parameter, and the PSD was logarithmized before z-score normalization to eliminate the effects of differences in dimensions and magnitude on training. A custom PyTorch dataset and data loader were then created. The samples were shuffled with a batch size of 32 during training, while the validation and test sets retained their original order to ensure consistent evaluation.

[0080] The network adopts the cWGAN-GP framework. The generator and discriminator both use the spatial resolution h×h of the two-dimensional PSD as the target size, and follow the dual structure of "layer-by-layer amplification-layer-by-layer compression". Figure 8As shown in the figure. The generator is designed to first receive two inputs: one is a random noise vector from the latent space, and the other is a 7-dimensional normalized roughness parameter label. These two inputs will be concatenated at the initial stage of the network. The concatenated vector is mapped to a feature block of shape (255,3,3) through a fully connected layer. Next, the generator gradually increases the spatial resolution of the feature map through three 2× upsamplings, and applies batch normalization and LeakyReLU activation functions after each upsampling to ensure the stability and nonlinear characteristics of the network. Finally, the generator maps the feature map to a 48×48 matrix through a convolutional layer and crops it to the target size of 37×37 to match the size of the real PSD matrix.

[0081] The discriminator's task is to determine whether the input sample is a true PSD matrix or a fake sample generated by the generator. It extracts spatial features from the input sample through four layers of convolution operations. Each layer applies instance normalization and the LeakyReLU activation function to ensure stable feature learning during training. The feature maps extracted by the convolutional layers are flattened and further compressed through a fully connected layer, outputting a score representing the sample's authenticity. Furthermore, the discriminator concatenates the input roughness parameter label with the extracted features, enabling it to evaluate the authenticity of samples based on different conditional vectors.

[0082] In the design of the loss function, cWGAN-GP uses Wasserstein distance as the objective function and combines it with a gradient penalty term to avoid the problem of gradient vanishing or exploding that may occur during training. The loss function of the discriminator aims to maximize the score of real samples while minimizing the score of generated samples, thereby effectively distinguishing between real and fake samples. The loss function of the generator minimizes the score of the discriminator on the generated samples, prompting the generator to continuously learn to generate more realistic PSD matrices. The introduction of the gradient penalty term ensures that the discriminator will not have unstable gradients during training, thereby enhancing the stability of training. The discriminator and generator loss functions are shown in Equations (15) and (16), respectively.

[0083] (15)

[0084] (16)

[0085] in, is the output of the discriminator, and the input is the sample and condition 𝑐 (such as roughness parameter); Pseudo samples generated by the generator, the distribution follows the generated distribution ; For real samples, the distribution follows the real data distribution ; is the expected value of the real sample, which represents the average score of the discriminator on the real sample; is the expected value of the pseudo sample, which represents the average score of the discriminator on the generated samples; is the gradient penalty coefficient; The sample obtained by interpolation between the real sample and the generated sample is used to calculate the gradient penalty term; For input The L2 norm of the discriminator gradient; Represents the gradient penalty term, which is used to ensure that the training process of the discriminator is more stable.

[0086] During the training process, the discriminator updates the generator after every 5 iterations. Both use the Adam optimizer with a learning rate of 0.0001 and a momentum coefficient of , The training process lasts for 1000 cycles. The mean squared error (MSE) and structural similarity (SSIM) of the generated samples are evaluated on the validation set every 10 cycles, and the optimal model is selected based on these metrics. This training process ensures that cWGAN-GP maps the corrosion surface roughness parameters to the PSD matrix while maintaining generation stability.

[0087] S8. Input the seven roughness parameter vectors of the corroded rough surface to be simulated into the generator network trained in step S7 to obtain the corresponding two-dimensional power spectral density matrix in real time. The input parameters are subjected to the same z-score normalization as during training and concatenated with a random latent variable of length g drawn from a standard normal distribution before being fed into the generator. The network completes a series of fully connected and deconvolution operations within tens of milliseconds, outputting a normalized log-PSD matrix of size h×h. This matrix is ​​then multiplied by the standard deviation obtained from the training set and added back to the mean. The matrix is ​​then restored to physical magnitude using a base-10 exponential mapping, ultimately yielding a strictly positive PSD distribution. Figure 9 A set of comparison results between the PSD maps generated by the generator and the real PSD maps are shown in , which demonstrates the excellent performance of the generator in capturing and reproducing the power spectrum characteristics of complex rough surfaces.

[0088] S9, based on the PSD matrix obtained in step S8 and the specified corrosion plane size parameter l x 、l y and sampling interval T s , construct an equidistant frequency grid f in the frequency domain x 、f y , and calculate the wave number increment 、 Using formula (17), we can get the rough surface height sequence that fluctuates around zero value. .

[0089] (17)

[0090] Where, Represents the frequency grid f x 、f y Sum all the frequency components on ; , is the wave number in the x direction; , is the wave number in the y direction; and is an independent and uniformly distributed random phase with a value range of , used to ensure the spatial randomness of surface roughness; is the amplitude coefficient, calculated according to formula (18).

[0091] (18)

[0092] The average thickness is then added to the sequence, and after median filtering and filling of outliers, the planar height field is reconstructed in matrix form. Figure 10 A set of rough surface images generated by this method is compared with rough images simulated based on real PSD. Finally, the plane coordinates are re-projected back to the cylindrical pipe wall surface through the reverse mapping in step S2 to restore the morphology of the corroded pipe outer wall. Figure 11 Corroded pipe models of different sizes are shown. Figure 12 This is a flowchart of steps S8 and S9.

[0093] This method establishes a complete numerical generation chain from measured point clouds to corrosion morphology, enabling high-fidelity, rapid, and controllable generation of corrosion morphologies for pipelines of various specifications. This method eliminates the errors introduced by idealized defect models while improving simulation efficiency and sizing adaptability. It provides a reliable and rich morphology data foundation for subsequent strength analysis, remaining life prediction, and digital twin operation and maintenance, and has outstanding engineering application value in the field of pipeline lifecycle safety management.

[0094] Parts not described in the above embodiments can be implemented by adopting or drawing on existing technologies.

[0095] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above embodiment. Any changes, modifications, additions or substitutions made by those skilled in the art within the essential scope of the present invention should fall within the scope of protection of the present invention.

Claims

1. A method for obtaining the surface morphology of corroded pipelines based on generative adversarial networks, characterized in that The following steps are involved: Step S1: Scan the outer surface of the corroded pipeline using a three-dimensional laser scanner to obtain point cloud data of the outer surface of the corroded pipeline; Step S2: constructing an initial coordinate system for the corrosion pipeline based on the point cloud data obtained in step S1, then removing redundant data points and unfolding the cylindrical surface into a plane; Step S3, processing the plane expanded in step S2 to obtain the height distribution of the corroded pipeline surface; Step S4: Using a sliding window sampling technique to perform data augmentation on the corrosion pipeline surface height distribution obtained in step S3, and generating a number of corrosion surface samples by translation and overlapping operations of the sliding window; Step S5, for each corroded surface sample obtained in step S4, respectively calculating seven roughness parameters, namely, standard deviation, root mean square gradient, interface expansion area ratio, autocorrelation length, texture direction ratio, average wavelength in the x-direction, and average wavelength in the y-direction; Step S6: Calculate a two-dimensional power spectral density matrix for each corroded surface sample obtained in step S4; and then combine the seven roughness parameters obtained in step S5 to construct a data set including the roughness parameters and the corresponding two-dimensional power spectral density matrix; Step S7: Based on the data set constructed in step S6, a generative adversarial network model is used and model training is performed to establish a mapping relationship between the corrosion surface roughness parameters and the corresponding two-dimensional power spectral density matrix; Step S8: setting the corrosion surface roughness parameters according to research needs, and using the generative adversarial network model trained in step S7 to quickly generate the corresponding two-dimensional power spectrum density matrix; Step S9: Use the second-kind random harmonic function to perform an inverse transformation on the two-dimensional power spectrum density matrix generated in step S8, convert it into a corroded rough surface plane height field, and then restore the corroded rough surface plane height field to a cylindrical shape, thereby obtaining the surface morphology of the corroded pipeline.

2. The method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network according to claim 1 is characterized in that: In step S1, the corrosion pipe is placed in a positioning device. The positioning device is cylindrical and includes a plurality of annular wires and a plurality of straight wires. The plurality of annular wires are arranged in parallel vertically, and the plurality of straight wires are arranged at intervals along the circumference of the annular wires. The plurality of annular wires are connected together, and the intersection of the straight wires and the annular wires forms a coordinate positioning point. The axis of the corrosion pipe completely coincides with the axis of the positioning device. A 3D laser scanner is used to perform multiple 360° circumferential scans on the outer surface of the corroded pipeline, and the scanning range covers the entire corroded area along the axial direction of the corroded pipeline.

3. The method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network according to claim 2 is characterized in that: In step S2: using the positioning points with known heights and circumferential angles on the positioning device, an initial coordinate system of the corroded pipeline is constructed in the collected original point cloud; the axis direction of the corroded pipeline is set as the X-axis, the cross-sectional plane is parallel to the Y-axis and the Z-axis, and the coordinate origin is located at the center of the cross-section at the bottom of the pipeline. Based on this, the initial three-dimensional coordinates of the pipeline surface and surrounding point clouds are assigned; Then, the positioning device surface, positioning points, and other redundant points are removed, and only the coordinates of the outer surface of the corroded pipeline are retained; the cylindrical surface is then expanded into plane coordinates, as shown in formulas (1)–(3): x=X (1) (2) (3) Where X, Y, and Z are the three-dimensional coordinate values ​​of any surface point in the original coordinate system; x, y, and z are the coordinate values ​​in the expanded coordinate system; C is the circumference of the pipe section, and r is the inner radius of the pipe.

4. The method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network according to claim 3 is characterized in that: In step S3: First, the height field of the flattened pipe surface Applying Gaussian filter smoothing to obtain the geometric shape deviation that reflects the overall bending and deformation trend of the pipeline ; Using formula (4) to separate the geometric shape deviation, the height distribution of the corroded pipeline surface that fluctuates around the zero mean plane is obtained ; (4)。 5. The method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network according to claim 4 is characterized in that: In step S4: after expansion, the axial length of the pipeline is L, and the circumferential length, i.e., the circumference of the pipeline section, is C. In the L×C height field, a square sampling window with a side length of h is selected, and the sliding step length s of the window in the axial and circumferential directions is set. <s≤h; During sampling, the window starts from the coordinate origin and moves in sequence along the axial direction, with each movement distance s; at the same time, the window slides repeatedly along the circumferential direction with the same step length s until the entire L×C height field is covered; the whole process will generate There are h×h sample sub-blocks, each of which contains rich local corrosion features.

6. The method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network according to claim 5 is characterized in that: In step S5: calculate the standard deviation of the sample sub-block using formulas (5)-(13) , root mean square gradient , interface expansion area ratio , autocorrelation length , texture direction ratio , average wavelength in the x direction and the average wavelength in the y direction Seven parameters; (5) Where, is the height value of the 𝑖,𝑗th point in the sample sub-block, is the average height of the sample sub-block, M and N are the number of data points in the axial and circumferential directions of the sample sub-block, respectively; (6) (7) Where, is the gradient of the adjacent points, is the i-th data point in the axial direction, is the jth data point in the circumferential direction, and represent the data point spacing in the axial and annular directions, respectively, and A is the projected area of ​​the sample sub-block in the thickness direction; (8) (9) Where, is the area after interface expansion; Autocorrelation length and texture direction ratio The purpose is to quantify the spatial correlation and anisotropy of the corrosion surface height field. When calculating, first construct a two-dimensional autocorrelation surface of the surface height field, normalize the amplitude of the two-dimensional autocorrelation surface, and then introduce the height The cross-section plane intersects with the autocorrelation surface to form a closed contour. The radial distance of the closed contour in all directions is measured with the origin as the center, and the maximum radius is obtained respectively. With minimum radius ; This defines the autocorrelation length , indicating that the autocorrelation value along the fastest decay direction drops to The spatial scale of the texture direction , used to measure anisotropy. The closer its value is to 1, the more consistent the correlation attenuation in all directions is, and the closer the surface texture is to isotropy. The construction of the above two-dimensional autocorrelation surface relies on the Fourier spectrum of the height field; specifically, Performing a two-dimensional Fourier transform yields equation (10): (10) Where, is the two-dimensional Fourier transform of the flattened pipe surface height field z(x,y); u, v are frequency domain coordinates, corresponding to the frequency components in the x and y directions respectively; i is the imaginary unit ; Then the spectrum energy Perform inverse Fourier transform and normalize it with its peak value to obtain the unit autocorrelation function, as shown in formula (11): (11) Where, is the two-dimensional autocorrelation function of the corrosion surface height field; t x and t y are the axial and circumferential translations respectively; is the inverse Fourier transform operator; Represents the maximum normalization operation in the autocorrelation function; (12) (13) Where, is the kth wavelength in the y direction, is the lth wavelength in the x direction.

7. The method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network according to claim 6 is characterized in that: In step S6: for each obtained h×h sample sub-block, calculate its two-dimensional power spectrum density matrix according to formula (14); (14) The obtained two-dimensional power spectrum density matrix and the standard deviation of the corresponding sample sub-block are , root mean square gradient , interface expansion area ratio , autocorrelation length , texture direction ratio , average wavelength in the x direction and the average wavelength in the y direction The seven roughness parameters are mapped one by one to construct a data set.

8. The method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network according to claim 7 is characterized in that: In step S7: the dataset is divided into training set, validation set, and test set in a ratio of 7:1.5:1.5, and the roughness parameter is normalized by z-score. The two-dimensional power spectral density matrix is ​​first logarithmized and then z-score normalized to eliminate the influence of different dimensions and orders of magnitude on the training.

9. The method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network according to claim 8, characterized in that: In step S7: The generative adversarial network model uses the cWGAN-GP framework, in which both the generator and the discriminator use the spatial resolution h×h of the two-dimensional power spectral density matrix as the target size. The generator first concatenates g-dimensional Gaussian noise with a 7-dimensional normalized roughness parameter, maps it to the feature block through a fully connected layer, and then performs four deconvolution upsampling, batch normalization, and LeakyReLU activation in sequence. Finally, the feature map is output and cropped to h×h. The discriminator uses four layers of convolution and instance normalization to gradually reduce the input dimension, and then extracts features through a fully connected layer. After concatenating them with the conditional vector, the output is a score for authenticity. The loss function uses Wasserstein distance with gradient penalty, where the discriminator and generator loss functions are shown in Equations (15) and (16) respectively: (15) (16) in, is the output of the discriminator, and the input is the sample and condition 𝑐; Pseudo samples generated by the generator, the distribution follows the generated distribution ; For real samples, the distribution follows the real data distribution ; is the expected value of the real sample, which represents the average score of the discriminator on the real sample; is the expected value of the pseudo sample, which represents the average score of the discriminator on the generated samples; is the gradient penalty coefficient; The sample obtained by interpolation between the real sample and the generated sample is used to calculate the gradient penalty term; For input The L2 norm of the discriminator gradient; represents the gradient penalty term.

10. The method for obtaining the surface morphology of a corroded pipeline based on a generative adversarial network according to claim 9, characterized in that: In step S9: according to the two-dimensional power spectrum density matrix obtained in step S8 and the specified corrosion plane size parameter l x 、l y and sampling interval T s , construct an equidistant frequency grid f in the frequency domain x 、f y , and calculate the wave number increment 、 ; Using formula (17), we can get the rough surface height sequence that fluctuates around zero value. ; (17) Where, Represents the frequency grid f x 、f y Sum all the frequency components on ; , is the wave number in the x direction; , is the wave number in the y direction; and is an independent and uniformly distributed random phase with a value range of , used to ensure the spatial randomness of surface roughness; is the amplitude coefficient, calculated according to formula (18); (18) The average thickness is then added to the rough surface height sequence, and after median filtering and filling the outliers, the plane height field is reconstructed in matrix form. Finally, the plane coordinates are reprojected back to the cylindrical pipe wall surface through the reverse mapping in step S2 to obtain the surface morphology of the corroded pipeline.

Citation Information

Patent Citations

  • Method, medium and device for calculating two-dimensional roughness spectrum of anisotropic seabed interface

    CN118967978A

  • Rolling bearing fault diagnosis method and system oriented to complex working conditions

    CN119124626A