A method for calculating the distance from the center of a pile foundation to the maximum scour pit based on Python language

CN120849743BActive Publication Date: 2026-10-27THREE GORGES NEW ENERGY OFFSHORE WIND POWER OPERATION & MAINTENANCE JIANGSU CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510835355.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2026-10-27
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

目前,行业内暂无计算最大冲刷坑与桩基距离的相关工具;因此,需要设计一种基于Python语言的最大冲刷坑距桩基中心位置距离的计算方法来解决上述问题

Benefits of technology

1,本方法通过Python语言结合多线程并行计算与空间索引优化算法,实现了大规模点云数据的高效处理。传统人工分析需手动筛选桩基80米范围内的数据点,耗时且易出错;本方法利用R树索引结构快速定位目标区域,并通过动态分片策略将数据分块处理,计算速度大幅提升;同时,引入高斯滤波算法自动剔除噪声数据,避免人工干预。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849743B_ABST
    Figure CN120849743B_ABST
Patent Text Reader

Abstract

The application discloses a calculation method of the distance between the maximum scour pit and the pile foundation center position based on a Python language, which comprises the following steps: reading a pile foundation center coordinate file and a pile foundation point cloud data file; converting the longitude and latitude of the point cloud data into a plane rectangular coordinate system based on the longitude and latitude of the pile foundation through a plane projection conversion formula; traversing the converted point cloud data, calculating the Euclidean distance between each point and the pile foundation center, and screening out a point cloud data set; extracting the point corresponding to the minimum elevation from the screened data, calculating the actual distance between the point and the pile foundation center, and taking the actual distance as the maximum scour pit distance; and outputting the calculation result to a specified format file. The method is based on the Python language, calculates the distance between the maximum scour pit in a predetermined range around the pile foundation and the pile foundation center position according to the pile foundation center coordinate and the corresponding pile foundation point cloud data, and writes the distance value into a txt file, so that subsequent processing is facilitated; and the detection error caused by the influence of the maximum scour pit distance pile foundation position on the stability of the pile foundation can be eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of offshore wind power data processing technology, and in particular relates to a method for calculating the maximum distance between the scour pit and the center of the pile foundation based on the Python language. Background Technology

[0002] According to relevant standards, underwater scour testing of offshore wind farm foundations must be conducted regularly based on different marine environments. Currently, the mainstream method is to use multibeam bath equipment to monitor pile scour. After data acquisition, point cloud data within a certain range of the pile foundation needs to be analyzed to determine the maximum scour pit depth and scour volume (generally within an 80m range). Further analysis has revealed that the location of the scour pit significantly impacts the stability of the pile foundation; the closer the scour pit is to the pile foundation, the greater the impact. The distance of the maximum scour pit from the pile foundation has a significant impact on pile foundation stability. Currently, there are no tools in the industry for calculating the distance between the maximum scour pit and the pile foundation. Therefore, a method based on Python to calculate the distance from the maximum scour pit to the center of the pile foundation is needed to address this issue. Summary of the Invention

[0003] The technical problem to be solved by this invention is to provide a method for calculating the distance from the maximum scour pit to the center of the pile foundation based on the Python language. This method, based on the Python language, can calculate the distance from the maximum scour pit to the center of the pile foundation within a predetermined range around the pile foundation based on the coordinates of the pile foundation center and the corresponding pile foundation point cloud data, and write the distance value into a txt file for subsequent processing; thereby eliminating the detection error caused by the influence of the distance from the maximum scour pit to the pile foundation location on the stability of the pile foundation in the prior art.

[0004] To achieve the above technical objectives, the technical solution adopted by this invention is as follows: A method for calculating the maximum distance from the center of a pile foundation to the scour pit, based on the Python language, includes the following steps: S1, read the pile foundation center coordinate file and pile foundation point cloud data file; S2, based on the latitude and longitude coordinates of the pile foundation, converts the latitude and longitude of the point cloud data into a Cartesian coordinate system using a plane projection transformation formula. The transformation formula is as follows: ; Where L represents the longitude of the point cloud. The latitude of the point cloud. The coordinates of the pile foundation center are latitude and longitude. The radius of the Earth; S3, iterate through the transformed point cloud data, calculate the Euclidean distance between each point and the center of the pile foundation, and filter out... Point cloud dataset; S4. Extract the point corresponding to the minimum elevation from the filtered data, calculate its actual distance from the center of the pile foundation, and use it as the maximum scour pit distance. S5 outputs the calculation results to a specified format file.

[0005] Furthermore, the pile foundation center coordinate file is in xlsx format, and the pile foundation point cloud data file is in xyz format.

[0006] Preferably, step S3 employs a spatial index optimization algorithm, specifically as follows: By constructing an R-tree index structure, the point cloud data is stored in spatial blocks, and during filtering, only the distance from the center of the pile foundation is traversed. Longitude difference and Data blocks within the latitude difference range are used to reduce computational load; the Euclidean distance between each point and the pile center is calculated as follows: ; In the formula, X and Y are the coordinates of the Cartesian coordinate system calculated in step S2.

[0007] Preferably, step S2 introduces an elevation-weighted distance formula: ; Where Z is the point cloud elevation value, This is the elevation of the bottom of the pile foundation. This is the elevation influence factor, used to dynamically adjust the weight for determining the location of scour pits.

[0008] Preferably, a multi-level verification mechanism is used in step S4: The displacement rate of the scour pit is calculated by comparing point cloud data from adjacent time periods. And combined with the rate of change of scour pit depth Through formula The reliability of the verification results.

[0009] Preferably, the data preprocessing in step S1 includes: Gaussian filtering is applied to the original point cloud data for noise reduction. The filtering formula is as follows: ; in, The filter radius is... These are the coordinates of the current point.

[0010] Preferably, the detection range is dynamically adjusted in step S3: Based on marine environmental parameters including current velocity V and wave height H, the dynamic detection radius D is calculated using the following formula: ; in Environmental sensitivity coefficient, , These are the baseline parameters.

[0011] Preferably, a visualization report is generated in step S5: The location of the largest scour pit is marked as a 3D heatmap, and a PDF report is generated using the Matplotlib library. The heatmap color mapping function is: ; Where C is the color depth value. This is the elevation of the lowest point of the scour pit.

[0012] Preferably, multi-threaded parallel computing is employed: The point cloud data is divided into fragments based on longitude, with each thread processing one fragment independently. The results are then merged using shared memory. The number of threads N satisfies the following condition: ; in This represents the total longitude span.

[0013] Preferably, a remote data update function is integrated: The latest point cloud data is retrieved periodically via API interface, and automatic calculation is triggered. The data update cycle T satisfies the following: ; S / N is the signal-to-noise ratio, used to dynamically adjust the update frequency.

[0014] Preferably, the output format of the result file is compatible with the GIS platform: The maximum scour pit distance and coordinate information are converted into WKT (Well-Known Text) format and synchronized in real time with the pile foundation monitoring system via the GeoJSON protocol.

[0015] The beneficial effects of this invention are as follows: 1. This method utilizes Python language combined with multi-threaded parallel computing and spatial indexing optimization algorithms to achieve efficient processing of large-scale point cloud data. Traditional manual analysis requires manually screening data points within an 80-meter radius of the pile foundation, which is time-consuming and prone to errors. This method uses an R-tree index structure to quickly locate the target area and divides the data into blocks for processing through a dynamic partitioning strategy, significantly improving the calculation speed. At the same time, a Gaussian filtering algorithm is introduced to automatically remove noisy data, avoiding manual intervention.

[0016] 2. Traditional methods rely solely on planar distance to determine the location of scour pits, neglecting the influence of elevation changes and environmental parameters. This method innovatively introduces an elevation-weighted distance formula, dynamically adjusting weighting factors to quantify the actual impact of scour pit depth on pile foundation stability. Simultaneously, it incorporates the ocean current velocity V... V with wave height H HThe detection range is dynamically adjusted to make the calculation results more consistent with the actual marine environment; in addition, the reliability of the results is ensured through a multi-level verification mechanism.

[0017] 3. This method not only outputs numerical results but also generates a 3D heatmap visualization report using Matplotlib, intuitively displaying the spatial distribution of scour pits and assisting engineers in quickly locating risk areas. It also supports remote data updates, obtaining the latest point cloud data in real time via API and triggering automatic calculations for 24 / 7 monitoring. The output results are compatible with GIS platforms and can be directly imported into the pile foundation monitoring system for dynamic analysis, avoiding the cumbersome process of data format conversion. Attached Figure Description

[0018] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0019] Example 1: like Figure 1 As shown, a method for calculating the maximum distance from the center of the pile foundation based on the Python language includes the following steps: S1, read the pile foundation center coordinate file and pile foundation point cloud data file; S2, based on the latitude and longitude coordinates of the pile foundation, converts the latitude and longitude of the point cloud data into a Cartesian coordinate system using a plane projection transformation formula. The transformation formula is as follows: ; Where L represents the longitude of the point cloud. The latitude of the point cloud. The coordinates of the pile foundation center are latitude and longitude. The radius of the Earth; S3, iterate through the transformed point cloud data, calculate the Euclidean distance between each point and the center of the pile foundation, and filter out... Point cloud dataset; S4. Extract the point corresponding to the minimum elevation from the filtered data, calculate its actual distance from the center of the pile foundation, and use it as the maximum scour pit distance. S5 outputs the calculation results to a specified format file.

[0020] Furthermore, the pile foundation center coordinate file is in xlsx format, and the pile foundation point cloud data file is in xyz format.

[0021] Preferably, step S3 employs a spatial index optimization algorithm, specifically as follows: By constructing an R-tree index structure, the point cloud data is stored in spatial blocks, and during filtering, only the distance from the center of the pile foundation is traversed. Longitude difference and Data blocks within the latitude difference range are used to reduce computational load; the Euclidean distance between each point and the pile center is calculated as follows: ; In the formula, X and Y are the coordinates of the Cartesian coordinate system calculated in step S2.

[0022] Preferably, step S2 introduces an elevation-weighted distance formula: ; Where Z is the point cloud elevation value, This is the elevation of the bottom of the pile foundation. This is the elevation influence factor, used to dynamically adjust the weight for determining the location of scour pits.

[0023] Preferably, a multi-level verification mechanism is used in step S4: The displacement rate of the scour pit is calculated by comparing point cloud data from adjacent time periods. And combined with the rate of change of scour pit depth Through formula The reliability of the verification results.

[0024] Preferably, the data preprocessing in step S1 includes: Gaussian filtering is applied to the original point cloud data for noise reduction. The filtering formula is as follows: ; in, The filter radius is... These are the coordinates of the current point.

[0025] Preferably, the detection range is dynamically adjusted in step S3: Based on marine environmental parameters including current velocity V and wave height H, the dynamic detection radius D is calculated using the following formula: ; in Environmental sensitivity coefficient, , These are the baseline parameters.

[0026] Preferably, a visualization report is generated in step S5: The location of the largest scour pit is marked as a 3D heatmap, and a PDF report is generated using the Matplotlib library. The heatmap color mapping function is: ; Where C is the color depth value. This is the elevation of the lowest point of the scour pit.

[0027] Preferably, multi-threaded parallel computing is employed: The point cloud data is divided into fragments based on longitude, with each thread processing one fragment independently. The results are then merged using shared memory. The number of threads N satisfies the following condition: ; in This represents the total longitude span.

[0028] Preferably, a remote data update function is integrated: The latest point cloud data is retrieved periodically via API interface, and automatic calculation is triggered. The data update cycle T satisfies the following: ; S / N is the signal-to-noise ratio, used to dynamically adjust the update frequency.

[0029] Preferably, the output format of the result file is compatible with the GIS platform: The maximum scour pit distance and coordinate information are converted into WKT (Well-Known Text) format and synchronized in real time with the pile foundation monitoring system via the GeoJSON protocol.

[0030] Example 2: This embodiment selects a pile foundation of an offshore wind farm with center coordinates of 120.5°E and 32.8°N. The point cloud data around the pile foundation has a scale of 1 million points, covering an area with a radius of 80 meters. The data includes elevation noise and complex scour pit distribution, with a standard deviation of elevation noise of ±0.3 meters.

[0031] The traditional method process is as follows: Data filtering: The 80-meter range of the pile foundation was manually delineated, and points exceeding the limit were manually removed, which took about 1.5 hours.

[0032] Distance calculation: The plane Euclidean distance is calculated point by point in a single thread, ignoring the influence of elevation.

[0033] Scour pit determination: The lowest elevation point is directly selected as the largest scour pit, without considering dynamic environmental parameters.

[0034] Results output: Results are recorded manually, with no visual report.

[0035] The specific implementation process using this method is as follows: 1. Data preprocessing: Gaussian filtering for automatic noise reduction, taking 5 minutes.

[0036] 2. Spatial Index Optimization: Construct an R-tree index, filter point cloud data within an 80-meter range, with longitude difference ΔL ≤ 0.0008° and latitude difference Δφ ≤ 0.0006°, taking 3 minutes.

[0037] 3. Parallel computing: 8 threads are used for slice processing to calculate the elevation-weighted distance; the detection radius is dynamically adjusted, β=0.3, V=1.2m / s, H=3m.

[0038] 4. Multi-level verification: Combining the displacement rate of the scour pit, Δt=24 hours, Δd=0.2 meters, and the depth change rate ΔZ=0.15 meters, the stability of the verification results was verified.

[0039] 5. Output and Visualization: Generate WKT format results and a 3D heatmap report, total time taken 25 minutes.

[0040] The comparison results are shown in Table 1 below: Table 1: Comparison of the implementation effects of this method and traditional methods;

[0041] As shown in Table 1 above, the new method, through spatial indexing and multi-threading technology, reduces the total processing time from 2 hours to 25 minutes, and automates the entire process, avoiding delays and errors caused by manual operation. The elevation-weighted formula integrates both planar and vertical dimensions, reducing the error from ±5 meters to ±0.8 meters, significantly improving the reliability of pile foundation safety assessment. The dynamic detection range can adapt to complex sea conditions, covering more potential scour areas. By generating visual reports and using GIS-compatible formats, it supports multi-department collaborative management, reducing operation and maintenance response time by 80%. This method significantly outperforms traditional manual analysis in terms of efficiency, accuracy, and functional scalability, providing efficient and reliable technical support for monitoring scour of offshore wind power pile foundations.

Claims

1. A method for calculating the maximum distance from the center of a pile foundation to a scour pit based on the Python language, characterized in that, Includes the following steps: S1, read the pile foundation center coordinate file and pile foundation point cloud data file; S2, based on the latitude and longitude coordinates of the pile foundation, converts the latitude and longitude of the point cloud data into a plane rectangular coordinate system through a plane projection transformation formula; S3, iterate through the transformed point cloud data and calculate the Euclidean distance between each point and the center of the pile foundation. And filter out Point cloud dataset; S4. Extract the point corresponding to the minimum elevation from the filtered data, calculate its actual distance from the center of the pile foundation, and use it as the maximum scour pit distance. S5 outputs the calculation results to a specified format file.

2. The method for calculating the maximum distance from the center of the pile foundation to the scour pit based on Python language according to claim 1, characterized in that, Step S3 employs a spatial index optimization algorithm, specifically as follows: By constructing an R-tree index structure, the point cloud data is stored in spatial blocks. During filtering, only data blocks whose longitude and latitude differences from the pile center are within a preset range are traversed to reduce computational load. The Euclidean distance between each point and the pile center is calculated as follows: ; In the formula, X and Y are the coordinates of the Cartesian coordinate system calculated in step S2.

3. The method for calculating the maximum distance from the center of the pile foundation to the scour pit based on Python language according to claim 2, characterized in that, Step S2 introduces the elevation-weighted distance formula: ; Where Z is the point cloud elevation value, This is the elevation of the bottom of the pile foundation. This is the elevation influence factor, used to dynamically adjust the weight for determining the location of scour pits; This represents the distance from the center of the pile foundation to the maximum scour pit after introducing elevation weighting.

4. The method for calculating the maximum distance from the center of the pile foundation to the scour pit based on Python language according to claim 1, characterized in that, Step S4 employs a multi-level verification mechanism: The displacement rate of the scour pit is calculated by comparing point cloud data from adjacent time periods. And combined with the rate of change of scour pit depth Through formula The reliability of the verification results; k is the weighting coefficient.

5. The method for calculating the maximum distance from the center of the pile foundation to the scour pit based on Python language according to claim 3, characterized in that, The data preprocessing in step S1 includes: Gaussian filtering is applied to the original point cloud data for noise reduction. The filtering formula is as follows: ; in, The filter radius is... is the coordinate of the current point; n is the number of point clouds.

6. The method for calculating the maximum distance from the center of the pile foundation to the scour pit based on Python language according to claim 1, characterized in that, In step S3, the detection range is dynamically adjusted: Based on marine environmental parameters including current velocity V and wave height H, the dynamic detection radius D is calculated using the following formula: ; in Environmental sensitivity coefficient, , These are the baseline parameters.

7. The method for calculating the maximum distance from the center of the pile foundation to the scour pit based on Python language according to claim 5, characterized in that, In step S5, a visualization report is generated: The location of the largest scour pit is marked as a 3D heat map, and a PDF report is generated; the heat map color mapping function is: ; Where C is the color depth value. This is the elevation of the lowest point of the scour pit.

8. The method for calculating the maximum distance from the center of the pile foundation to the scour pit based on Python language according to claim 1, characterized in that, Multi-threaded parallel computing is employed: The point cloud data is divided into fragments based on longitude, with each thread processing one fragment independently. The results are then merged using shared memory. The number of threads N satisfies the following condition: ; in This represents the total longitude span.

9. The method for calculating the maximum distance from the center of the pile foundation to the scour pit based on Python language according to claim 1, characterized in that, Integrated remote data update functionality: The latest point cloud data is retrieved periodically via API interface, and automatic calculation is triggered. The data update cycle T satisfies the following: ; S / N is the signal-to-noise ratio, used to dynamically adjust the update frequency.

10. The method for calculating the maximum distance from the center of the pile foundation to the scour pit based on Python language according to claim 9, characterized in that, The output format of the result file is compatible with the GIS platform. The maximum scour pit distance and coordinate information are converted into WKT format and synchronized in real time with the pile foundation monitoring system via the GeoJSON protocol.

Citation Information

Patent Citations

  • Python language-based point cloud data cutting method

    CN118733533A

  • Ocean engineering pile foundation scouring experiment maximum scouring depth estimation method based on integrated underwater imager

    CN119577572A