3D space deformation detection method and system based on Monte Carlo ray tracing
The 3D spatial deformation detection method using Monte Carlo ray tracing addresses inefficiencies and inaccuracies in rail transit safety by employing tunnel modeling, real-time scanning, and Monte Carlo ray tracing to enhance accuracy and automation in rail transit safety detection.
Patent Information
- Application Number
- CN202411003421.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-12-31
AI Technical Summary
Existing 3D spatial deformation detection methods in rail transit safety suffer from low efficiency, low modeling accuracy, and difficulty in achieving full automation, particularly in complex environments.
A 3D spatial deformation detection method using Monte Carlo ray tracing, which includes tunnel modeling and data preparation, real-time 3D laser scanning, point cloud data processing, and Monte Carlo ray tracing simulation to identify intersections and generate safety analysis reports.
The method ensures high accuracy, reliability, and efficiency in detecting spatial deformations, enabling smooth and safe train operation by managing maintenance records and providing detailed safety reports.
Smart Images

Figure CN119229430A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rail transit monitoring platform safety technology, and specifically to a 3D spatial deformation detection method and system based on Monte Carlo ray tracing. Background Art
[0002] Munrocat Ray Tracing Ray tracing method detects intersections based on ray tracing techniques. Vertex checks are performed and intersection conditions are determined based on given criteria. Each vertex is traversed and rays from each vertex are traced. Ray tracing intersection detection is a heuristic detection method and is therefore suitable for physical simulation. Unlike the above intersection detection methods, the ray tracing intersection detection method does not require additional post-processing to calculate penetration depth or reaction forces of intersecting objects. Therefore, this method is suitable for simulating deformable objects with tactile response.
[0003] 3D laser scanning / LiDAR (Light Detection and Ranging, LiDAR) technology uses a laser emission and receiving system to collect the 3D coordinate information of the target point. Since lasers are directional, monochromatic, and coherent, the introduction of 3D laser technology into measurement equipment has greatly improved work efficiency and measurement accuracy. It can efficiently obtain a point cloud with coordinate information arranged in an array on the surface of the target object, and the accuracy of the point cloud data can meet the modeling accuracy of reverse engineering. Subsequently, 3D laser technology has been gradually cited in medicine, civil engineering, and urban planning.
[0004] BIM technology is to build models through information integration technology. It is to create a three-dimensional model to guide construction before the building is built, while point cloud technology is to quickly collect point clouds on the surface of existing buildings through laser scanning, and obtain three-dimensional solid models through three-dimensional reconstruction. The combination of the two is inseparable. The combination of the two can be applied to deformation monitoring, quality inspection, and protection and archiving of existing buildings through reverse modeling of point cloud models. The combination of point cloud and BIM technology is mainly used to analyze point cloud data and reversely establish BIM models based on the size and distance relationship of point cloud data, and the established model has high accuracy.
[0005] Although existing ray tracing technology and LiDAR technology have significant advantages in 3D modeling and measurement accuracy, their application in complex environments still has some shortcomings. For example, traditional ray tracing methods are computationally intensive and inefficient when dealing with large-scale complex structures. In addition, LiDAR technology may encounter data occlusion and error accumulation problems in complex environments, affecting the accuracy of measurement results. Although the combination of BIM and point cloud technology has improved modeling accuracy, a lot of manual intervention is still required in the data processing and model building process, making it difficult to achieve full automation. Summary of the invention
[0006] In view of the above-mentioned problems, the present invention is proposed.
[0007] Therefore, the technical problem solved by the present invention is that the existing detection method of rail transit safety three-dimensional space has the problems of low efficiency, low modeling accuracy, low accuracy of measurement results, and difficulty in achieving full automation.
[0008] To solve the above technical problems, the present invention provides the following technical solutions: a 3D spatial deformation detection method based on Monte Carlo ray tracing, including tunnel modeling and data preparation; tracing simulation based on Monte Carlo rays; and outputting safety analysis and reports.
[0009] As a preferred solution of the 3D spatial deformation detection method based on Monte Carlo ray tracing described in the present invention, wherein: the tunnel modeling and data preparation includes establishing a railway information model according to the railway design drawings, reading the plane CAD centerline diagram in Civil 3D and picking up the tunnel centerline, outputting the line of the tunnel centerline projected on the horizontal plane, and then laying the component model on the model of the railway axis information to build a 3D initial model, and importing it into the BIM monitoring terminal;
[0010] To obtain real-time data, a 3D laser scanner is mounted on the front of the track inspection vehicle. When the track inspection vehicle is moving, 3D laser scanning is performed to obtain point cloud data of the railway and 3D space, and then the point cloud data output by the scan is processed;
[0011] Perform data comparison, import the processed point cloud data and BIM model into the registration software, select feature points and use algorithms to achieve accurate registration of point cloud data and BIM model;
[0012] The software’s point cloud and BIM model automatic comparison function is used to output and monitor the deviation between the model and the point cloud.
[0013] As a preferred solution of the 3D spatial deformation detection method based on Monte Carlo ray tracing described in the present invention, wherein: the tunnel modeling and data preparation includes using Civil 3D and Revit to establish the 3D centerline of the tunnel, reading the plane CAD centerline diagram in Civil 3D and picking up the tunnel centerline, outputting the line of the tunnel centerline projected on the horizontal plane, and then building the 3D central axis of the tunnel through stretching and integration;
[0014] The main body of the tunnel is constructed. The main body of the tunnel is modeled in 3D forward modeling based on the 2D design drawings. The shape of the tunnel is controlled by the cross-section diagram. The 3D centerline of the tunnel is used as the path. The 3D modeling of the tunnel is achieved by stretching and lofting. Then, the Revit plug-in Dynamo is used to create a simple outline of the tunnel.
[0015] The creation of the tunnel secondary lining model, based on the structure and size information of the tunnel composite lining, builds a metric profile model family in Revit, moves the CAD secondary lining profile drawing to the starting point of the staked axis, and creates the tunnel secondary lining 3D model by using staked;
[0016] Construct the 3D model of the tunnel secondary lining and the initial support model of the tunnel;
[0017] Construct an open-cut model, create a 2D outline model of the tunnel open-cut lining in the Revit front view according to the tunnel open-cut lining design drawing, and output it by staking out the path using the tunnel 3D road centerline;
[0018] Construct tunnel ancillary facilities. The creation of tunnel invert filling, pavement, cable trough, drainage ditch, and sidewalk guardrail is based on two models: the tunnel transverse and longitudinal section design drawings and the tunnel 3D design curve. By analyzing the tunnel transverse and longitudinal section design drawings, the outline drawings of the invert filling, pavement, cable trough, drainage ditch, and sidewalk guardrail are created in the front view of the structural frame family template. The 3D models of other tunnel components are created with the outline drawings as the layout outline and the tunnel 3D axis as the layout path.
[0019] Model family building equipment, by analyzing CAD two-dimensional design drawings, based on Revit software to establish the three-dimensional model family of tunnel secondary lining, initial support, tunnel portal, tunnel open hole, cable trough, drainage ditch, invert filling, pavement and sidewalk handrails and add model information, and then load and integrate the tunnel model families based on the three-dimensional center line of the tunnel as the basis for integrating the model family library. The basis of integration is the intersection of the tunnel pavement and the tunnel center line as the base point for determining the three-dimensional spatial position of each family, and the output tunnel three-dimensional model;
[0020] Tunnel model information is added. The tunnel modeling method is to extract the data required for modeling from the two-dimensional drawings in batches through CAD secondary development and import them into Excel tables, converting the two-dimensional coordinate data into three-dimensional coordinate data;
[0021] The secondary development of Revit was used to write a railway track automatic modeling plug-in, which batch created BIM models of the roadbed, ballast, track slab, sleeper, fastener and rail components in the railway track structure through the extracted data, and completed the automatic construction of the railway track BIM model.
[0022] As a preferred solution of the 3D spatial deformation detection method based on Monte Carlo ray tracing described in the present invention, wherein: the tunnel modeling and data preparation including point cloud data processing includes: data acquisition, acquiring point cloud data through laser radar;
[0023] Point cloud segmentation: Use the RANSAC algorithm and the Euclidean clustering segmentation algorithm to segment the point cloud data after surface reconstruction, so that objects can be separated from each other;
[0024] Noise removal, point cloud simplification, point cloud fitting;
[0025] The comparison between the point cloud data and the BIM model includes data comparison preparation. The three-dimensional design model of the tunnel constructed by Revit based on the Auto CAD two-dimensional design file is a three-dimensional entity file. In order to realize the data sharing of the three-dimensional model and the three-dimensional analysis with the measured point cloud data of the tunnel, the parametric modeling tunnel file is converted into a standard format. The formats of the three-dimensional data include IGES, STL, and OBJ.
[0026] Tunnel central axis fitting, extract tunnel boundary points to fit the tunnel contour, and then fit the central axis according to the boundary, use algorithm programming to extract tunnel boundary points and use improved differential method for fitting;
[0027] Project the acquired tunnel point cloud data to the XOY plane of the scanning coordinate system, then specify the Y coordinate value, find the maximum and minimum values of X under the coordinate value, cycle through all Y values at equal intervals, and output the boundary between the point cloud data projection and the XOY plane;
[0028] Specify the Y value, obtain the corresponding maximum and minimum X values under the coordinate, output the average value of X, use the coordinate value as the coordinate of the point on the central axis, and find the point on the central axis corresponding to each Y value in turn;
[0029] According to the fitted central axis point, the central axis is fitted and output, the tunnel coordinates are rotated, the cross-section curve is fitted, and the standard track model is output as a comparison benchmark.
[0030] As a preferred solution of the 3D space deformation detection method based on Monte Carlo ray tracing described in the present invention, wherein: the Monte Carlo ray tracing simulation includes outputting the intersection between a given ray and a triangular face during the ray tracing process, and outputting the intersection using a ray-triangle intersection method due to repetition, so as to achieve efficient ray-triangle intersection, and performing the intersection operation after the ray and the triangular face are appropriately transformed, and the mathematical model of the triangle and the ray is expressed as:
[0031] T(u,v)=(1-uv)V0+uV1+vV2
[0032] R(t)=O+tD
[0033] Where (u, v) represents the centroid coordinates, V0, V1, and V2 represent the three vertices of the triangular face, O represents the origin of R(t), and D represents the normal direction of R(t);
[0034] The intersection equation of R(t) and T(u,v) is R(t)=T(u,v), which can be expressed as:
[0035] O+tD=(1-uv)V0+uV1+vV2
[0036]
[0037] Among them, (u,v) represents the coordinates of the center of gravity;
[0038] The distance t from the ray origin and the centroid coordinates of the intersection point (u, v) are output through a linear system and expressed by the Cramer rule output as:
[0039]
[0040] Among them, the two sides of the triangle are E1=V1-V0 and E2=V1-V0, and T=O-V0, |ABC|=-(A×C)·B=-(C×B)·A;
[0041] The re-output is represented as:
[0042]
[0043] Among them, P = (D×E2) and Q = (T×E1).
[0044] As a preferred solution of the 3D spatial deformation detection method based on Monte Carlo ray tracing of the present invention, wherein: the Monte Carlo ray tracing simulation includes performing ray tracing intersection detection, constructing AABB bounding boxes for each part of the track model and the standard model, and identifying the deformation area of the track by detecting the intersection between the bounding boxes;
[0045] The ray tracing intersection detection algorithm uses the information of the normal vector. The intersection test is performed on a vertex basis. Each ray is projected from each vertex, and the direction of the ray is opposite to the direction of the normal vector of the corresponding vertex.
[0046] For all vertices of the first object (Obj1), also known as the standard 3D BIM space model, light will be projected to another object (Obj2), also known as the 3D point cloud data obtained in real time;
[0047] Determine the intersection status of each vertex, using a fast ray-triangle intersection method when searching for ray intersections;
[0048] Assuming that the ray cast from the vertex of Obj1 intersects with a triangle of Obj2, and the normal vectors are in opposite directions, the vertex currently being tested becomes a candidate intersection point;
[0049] For a candidate intersection point, the dot product of the normal vectors of p1 and p2 should be less than zero, expressed as:
[0050] n1·n2<0
[0051] Where pi represents the intersection point between the object and the ray, ni represents the normal vector of pi, i = 1, 2;
[0052] In the process of searching for p2, there are multiple intersection points, the first intersection primitive of the ray is selected for p2, and the point far from p1 is selected for p2, and the distance test between p1 and p2 is not checked in the first criterion;
[0053] The standard expression for determining the intersection point is:
[0054] The normal vectors of p1 and p2 are in opposite directions;
[0055] The distance between p1 and p2 is smaller than the distance between p2 and p3;
[0056] p1 represents each point of Obj1 currently being tested, p2 represents the intersection of the light projected by Obj2 and p1 in the anti-normal direction, and p3 represents the self-intersection of the light projected by Obj2 and p2 and p1 in the normal direction. If there are multiple self-intersection points, the nearest point is selected from them;
[0057] The first criterion alone cannot identify all intersection points. For all candidate intersection vertices that pass the first criterion, check the second criterion:
[0058] After finding p2 in the first test, find the intersection point p3 of Obj2;
[0059] p3 intersects the light cast by p2 and the direction of the normal vector of p1;
[0060] If Obj2 is non-convex, there are multiple self-intersection points. In this case, the point closest to p2 is selected as p3;
[0061] Compare the distance between p2 and p1 with the distance between p2 and p3;
[0062] If the distance between p2 and p1 is less than the distance between p2 and p3, p1 is determined as the intersection point: ∥p2-p1∥≤∥p2-p3∥;
[0063] p1 and p2 become a pair of intersection points;
[0064] Perform ray tracing intersection detection, build AABB bounding boxes for each part of the track model (obj1) and the standard model (obj2), and identify the deformation area of the track by detecting the intersection between the bounding boxes;
[0065] The geometric difference between the real-time point cloud data and the standard model is output, including the offset of each point and the overall deformation. Rays will be traced to check whether there is any deformation in the BIM model as seen from the triangulated geometric space.
[0066] As a preferred solution of the 3D spatial deformation detection method based on Monte Carlo ray tracing described in the present invention, wherein: the output safety analysis and report includes using statistical analysis methods to evaluate the type, scope and severity of track deformation;
[0067] Commonly used indicators include maximum deformation, average deformation and standard deviation;
[0068] Generate a security report based on the results of the security analysis, providing description, location, severity assessment and improvement suggestions for each security risk.
[0069] Another object of the present invention is to provide a 3D spatial deformation detection system based on Monte Carlo ray tracing, which can perform intersection detection on real-time three-dimensional point cloud data by using Monte Carlo ray tracing technology and record relevant intersection information, thereby solving the problem of low accuracy of measurement results in current rail transit safety three-dimensional space detection methods.
[0070] As a preferred solution of the 3D space deformation detection system based on Monte Carlo ray tracing described in the present invention, it includes: a tunnel modeling module, a data preparation module, a Monte Carlo ray tracing module, and a safety analysis and report generation module; the tunnel modeling module is used for modeling through CAD drawings; the data preparation module is used for comparing the drawing modeling and the point cloud data to output a three-dimensional space model; the Monte Carlo ray tracing module is used for determining whether there is an intersection and recording the intersection information; the safety analysis and report generation module is used for generating a safety report.
[0071] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a step of a 3D space deformation detection method based on Monte Carlo ray tracing.
[0072] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a 3D space deformation detection method based on Monte Carlo ray tracing.
[0073] Beneficial effects of the present invention: The 3D spatial deformation detection method based on Monte Carlo ray tracing provided by the present invention ensures the smooth, safe and reliable operation of trains by effectively managing and utilizing heterogeneous and fragmented maintenance records between multiple maintenance sections. The method uses the BIM platform to quickly model the railway and obtains point cloud data of the railway and the surrounding space through three-dimensional laser scanning technology. The processed point cloud data is imported into the BIM platform, compared with the initial model, and a standard BIM model is generated. The real-time three-dimensional point cloud data is subjected to intersection detection using Monte Carlo ray tracing technology, and the relevant intersection information is recorded. Subsequently, the type, range and severity of track deformation are evaluated by statistical analysis, and common indicators include maximum deformation, average deformation and standard deviation. A safety report is generated based on the safety analysis results, providing a description, location, severity assessment and improvement suggestions for each safety hazard. The present invention can detect intersections between objects of any shape (including non-convex or sharp objects) and deep penetration, has high reliability and accuracy, and is easy to implement and operate, providing reliable technical support for 3D spatial deformation detection, and the present invention achieves better results in terms of accuracy, reliability and efficiency of measurement results. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0075] Figure 1 An overall flow chart of a 3D spatial deformation detection method based on Monte Carlo ray tracing provided in the first embodiment of the present invention.
[0076] Figure 2 A flow chart of a monitoring method based on BIM and Monte Carlo ray tracing for a 3D spatial deformation detection method based on Monte Carlo ray tracing provided in the first embodiment of the present invention.
[0077] Figure 3 A flowchart of point cloud data processing of a 3D space deformation detection method based on Monte Carlo ray tracing provided in the first embodiment of the present invention.
[0078] Figure 4 A flow chart of collecting information on railway-related structures in a 3D spatial deformation detection method based on Monte Carlo ray tracing provided in the first embodiment of the present invention.
[0079] Figure 5 A fast BIM modeling flow chart of a 3D space deformation detection method based on Monte Carlo ray tracing provided in the first embodiment of the present invention.
[0080] Figure 6 A first standard graph for checking intersection vertices of a 3D space deformation detection method based on Monte Carlo ray tracing provided in the first embodiment of the present invention.
[0081] Figure 7 A second standard graph for checking intersection vertices of the 3D space deformation detection method based on Monte Carlo ray tracing provided in the first embodiment of the present invention.
[0082] Figure 8 An overall flow chart of a 3D spatial deformation detection system based on Monte Carlo ray tracing provided for the third embodiment of the present invention. DETAILED DESCRIPTION
[0083] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0084] Example 1, reference Figure 1-Figure 7 , as an embodiment of the present invention, provides a 3D space deformation detection method based on Monte Carlo ray tracing, comprising:
[0085] S1: Perform tunnel modeling and data preparation.
[0086] Furthermore, scene modeling and data preparation, build the railway information model according to the railway design drawings (plane CAD), read the plane CAD centerline map in Civil 3D and pick up the tunnel centerline, get the line of the tunnel centerline projected on the horizontal plane, then lay out the other component models one by one on the model of the railway axis information, build the 3D initial model, and import it into the BIM monitoring terminal; obtain real-time data, load the 3D laser scanner on the track inspection vehicle head, and perform 3D laser scanning when the track inspection vehicle moves to obtain the point cloud data of the railway and its 3D space, and then process the scanned point cloud data; compare the data, import the processed point cloud data and BIM model into the registration software, select feature points and use algorithms to achieve accurate registration of point cloud data and BIM model. The software's point cloud and BIM model automatic comparison function can calculate the deviation between the model and the point cloud and monitor it.
[0087] It should be noted that visual early warning and alarm will import point cloud data into the BIM monitoring platform. Based on the comparison results, if any abnormality occurs, an early warning will be issued and maintenance personnel will be arranged to find the three-dimensional location information of the problem and navigate to the location and perform maintenance.
[0088] It should also be noted that Civil 3D and Revit are used to establish the three-dimensional centerline of the tunnel. First, the plane CAD centerline drawing is read in Civil3D and the tunnel centerline is picked up to obtain the line of the tunnel centerline projection on the horizontal plane. Then, the three-dimensional central axis of the tunnel is constructed by stretching and integrating.
[0089] Furthermore, the main body of the tunnel was constructed. The modeling of the main body of the tunnel was mainly based on the 2D design drawings. The shape of the tunnel was controlled by the cross-section diagram. The 3D centerline of the tunnel was used as the path, and the 3D modeling of the tunnel was achieved by stretching and lofting. Then the Revit plug-in Dynamo was used to create a simple outline of the tunnel.
[0090] It should be noted that the creation of the tunnel secondary lining model is based on the structure and size information of the tunnel composite lining. A new metric contour-based model family is created in Revit, and the CAD secondary lining contour drawing is moved to the starting point of the stakeout axis. The three-dimensional model of the tunnel secondary lining is created by stakeout; the three-dimensional model of the tunnel secondary lining is created; and the initial support model of the tunnel is created.
[0091] It should also be noted that the construction of the open-cut model is based on the tunnel open-cut lining design drawing, creating a two-dimensional outline model of the tunnel open-cut lining in the Revit front view, and the path is laid out using the tunnel's three-dimensional road centerline.
[0092] Furthermore, the construction of tunnel ancillary facilities, the creation of tunnel invert filling, pavement, cable trough, drainage ditch and pedestrian guardrail are created based on two models: the tunnel transverse and longitudinal section design drawings and the tunnel three-dimensional design curve. By analyzing the tunnel transverse and longitudinal section design drawings, the contour drawings of the invert filling, pavement, cable trough, drainage ditch and pedestrian guardrail are created in the front view of the structural frame family template, and the three-dimensional models of other tunnel components are created using the contour drawings as the layout outline and the tunnel three-dimensional axis as the layout path.
[0093] It should be noted that the model family construction equipment, through the analysis of CAD two-dimensional design drawings, establishes the three-dimensional model family and model information of the tunnel secondary lining, initial support, tunnel portal, tunnel open hole, cable trough, drainage ditch, invert arch filling, pavement and sidewalk handrail based on Revit software, and then loads and integrates the tunnel model families based on the three-dimensional center line of the tunnel as the basis for integrating the model family library. The basis of the integration is the intersection of the tunnel pavement and the tunnel centerline as the base point for determining the three-dimensional spatial position of each family, and the final three-dimensional model of the tunnel is obtained.
[0094] It should also be noted that the addition of tunnel model information and the modeling method of railway tracks are similar to the above-mentioned tunnel method, which is roughly as follows: CAD secondary development batch extracts the data required for modeling in two-dimensional drawings and imports them into Excel tables, converting two-dimensional coordinate data into three-dimensional coordinate data; Revit secondary development is used to write an automatic modeling plug-in for railway tracks, and the extracted data is used to batch create BIM models of components such as roadbed, ballast, track slabs, sleepers, fasteners, rails, etc. in the railway track structure, thereby automatically building a railway track BIM model.
[0095] The specific steps of processing the above point cloud data are as follows: data acquisition, obtaining point cloud data through laser radar; point cloud segmentation, using RANSAC algorithm and Euclidean clustering segmentation algorithm to segment the point cloud data after surface reconstruction so that objects can be clearly separated; noise removal. Point cloud simplification, point cloud fitting.
[0096] Furthermore, the specific implementation steps of the comparison between the point cloud data and the BIM model are as follows:
[0097] Data comparison preparation: The 3D design model of the tunnel built by Revit based on the 2D design file of Auto CAD is a 3D entity file. In order to realize the data sharing of the 3D model and the 3D analysis with the measured point cloud data of the tunnel, the parametric modeling tunnel file needs to be converted into a standard format. The more common 3D data formats are IGES, STL, and OBJ. Among them, the IGES format is the most widely accepted data format. This format can not only record the main features of the entity, but most importantly, it can also retain the parameter information such as the coordinate value of the entity. This format is a grid file that represents the 3D model through geometric elements such as points, lines, curves, and surfaces.
[0098] Tunnel central axis fitting, first extract the tunnel boundary points to fit the tunnel contour, then fit the central axis according to the boundary, use algorithm programming to extract the tunnel boundary points and use the improved differential method for fitting.
[0099] Project the acquired tunnel point cloud data to the XOY plane of the scanning coordinate system, then specify the Y coordinate value and find the maximum and minimum values of X under the coordinate value. Loop through all Y values at equal intervals to get the boundary between the point cloud data projection and the XOY plane;
[0100] Specify the Y value, obtain the corresponding maximum and minimum X values under its coordinates, calculate the average value of X, and then use this coordinate value as the coordinate of the point on the central axis, and find the point on the central axis corresponding to each Y value in turn;
[0101] The central axis can be fitted based on the fitted central axis point.
[0102] The tunnel coordinates are rotated and the cross-section curve is fitted to obtain the standard track model as a comparison benchmark.
[0103] The system framework design includes four modules, namely front-end interface, back-end service, data storage and processing modules.
[0104] Furthermore, the front-end interface settings mainly include:
[0105] (1) Real-time visualization of railway VR scenes;
[0106] (2) Railway information query and analysis.
[0107] Furthermore, through laser scanning, LIDAR or other sensors, the point cloud data of the current track is obtained to reflect the actual geometry of the track. The obtained point cloud data is preprocessed, including denoising, filtering and coordinate alignment, to ensure the accuracy and consistency of the data.
[0108] Furthermore, the backend services include: database MySQL and API design.
[0109] S2: Monte Carlo ray tracing simulation.
[0110] Furthermore, in the proposed Monte Carlo ray tracing simulation, the intersection between a given ray and a triangular face needs to be calculated quickly. Since this operation occurs repeatedly, a fast and unique ray-triangle intersection method is used for calculation. Efficient ray-triangle intersection is achieved. In this method, the intersection operation is performed after the ray and the triangular face are appropriately transformed. The specific steps are as follows:
[0111] The triangle and ray formulas are as follows
[0112] T(u,v)=(1-uv)V0+uV1+vV2
[0113] R(t)=O+tD
[0114] Among them, (u, v) represents the centroid coordinates, V0, V1, V2 represent the three vertices of the triangular face, O represents the origin of R(t), and D represents the normal direction of R(t).
[0115] It should be noted that the intersection equation of R(t) and T(u,v) is R(t)=T(u,v), which can be expressed as:
[0116] O+tD=(1-uv)V0+uV1+vV2
[0117]
[0118] Where (u,v) represents the centroid coordinates
[0119] The distance t from the ray origin and the barycentric coordinates of the intersection point (u,v) can be calculated using the linear system above. The solution to the equation is obtained using Cramer's rule:
[0120]
[0121] Among them, the two sides of the triangle are E1=V1-V0 and E2=V1-V0, and T=O-V0, |ABC|=-(A×C)·B=-(C×B)·A;
[0122] The re-output is represented as:
[0123]
[0124] Where P = (D × E2) and Q = (T × E1)
[0125] It should also be noted that the specific steps for ray tracing intersection detection are as follows:
[0126] Construct AABB bounding boxes for each part of the track model and the standard model. Identify the deformation area of the track by detecting the intersection between bounding boxes.
[0127] The ray tracing intersection detection algorithm uses the information of the normal vector. The intersection test is performed on a vertex basis. Each ray is projected from each vertex, and the direction of the ray is opposite to the direction of the normal vector of the corresponding vertex. For all vertices of the first object (Obj1), also known as the standard 3D BIM space model, the ray will be projected to another object (Obj2), also known as the 3D point cloud data obtained in real time. The intersection status of each vertex is determined according to the following two criteria, such as Figure 2 When we search for the intersection of the rays, we use the fast ray-triangle intersection method described above.
[0128] Assume that the ray cast from a vertex of Obj1 intersects a triangle of Obj2, and its normal vectors are in opposite directions. The vertex currently being tested ( Figure 6 p1 in (a) becomes a candidate intersection point (angle A case). For a candidate intersection point, the dot product of the normal vectors of p1 and p2 should be less than zero: n1·n2<0, where pi is the intersection point between the object and the ray, and ni is the normal vector of pi (i=1,2). In some cases, there may be multiple intersection points during the search for p2. The first intersection primitive of the ray is selected for p2, so a point far from p1 can be selected for p2 (e.g. Figure 6 (left case in (b)), since the distance test between p1 and p2 is not checked in the first criterion.
[0129] The criteria for determining the intersection point: (a) the normal vectors of p1 and p2 are in opposite directions, (b) the distance between p1 and p2 is less than the distance between p2 and p3. (p1: each point of Obj1 currently being tested, p2: the intersection of the ray projected from Obj2 and p1 in its anti-normal direction, p3: the self-intersection of the ray projected from Obj2 and p2 in the normal direction of p1. If there are multiple self-intersection points, the closest point is selected from them.)
[0130] Furthermore, the first criterion alone cannot identify all intersection points. Therefore, for all candidate intersection vertices that pass the first criterion, the second criterion (see Figure 7 (b)). After the first test finds p2, find the intersection point p3 of Obj2; p3 intersects with the ray cast by p2 and the direction of the normal vector of p1. If Obj2 is non-convex, there may be multiple self-intersection points. In this case, the point closest to p2 is selected as p3. Then, the distance between p2 and p1 is compared with the distance between p2 and p3. If the distance between p2 and p1 is less than the distance between p2 and p3, p1 is determined to be the intersection point: ||p2–p1||≤||p2–p3||. Finally, p1 and p2 become a pair of intersection points.
[0131] It should be noted that the comparison of ray-based intersection detection algorithms: (a) the previous algorithm fails to detect some deeply penetrated intersections, while (b) the proposed algorithm successfully detects all intersections.
[0132] Furthermore, ray tracing intersection detection is performed, and the specific steps are as follows:
[0133] Construct AABB bounding boxes for each part of the track model (obj1) and the standard model (obj2). Identify the deformation area of the track by detecting the intersection between the bounding boxes.
[0134] The geometric differences between the point cloud live data and the standard model are calculated, including the offset of each point and the overall deformation. The next step is to trace these rays to check if there are any deformations in these BIM models that can be seen from the triangulated geometric space.
[0135] S3: Output security analysis and report.
[0136] Furthermore, statistical analysis methods are used to evaluate the type, scope and severity of track deformation. Common indicators include maximum deformation, average deformation and standard deviation.
[0137] It should be noted that a safety report is generated based on the results of the safety analysis, providing information such as the description, location, severity assessment and improvement suggestions of each safety hazard.
[0138] Example 2, an embodiment of the present invention, provides a 3D spatial deformation detection method based on Monte Carlo ray tracing. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0139] First, the experiment uses an underground tunnel as the research object. The specific steps are as follows:
[0140] Tunnel modeling and data preparation: First, the tunnel is scanned in detail using 3D laser scanning technology to obtain point cloud data of the tunnel's internal structure. The 3D model of the tunnel is established by processing and analyzing the point cloud data. The scanning equipment uses the latest model of LiDAR laser scanner, which has the characteristics of high precision and high resolution and can effectively capture the tiny details in the tunnel. The collected data includes the length, width, height, internal structural features, etc. of the tunnel. Data processing uses point cloud data processing software to convert point cloud data into a visual 3D model, and perform data cleaning and optimization to ensure the accuracy and completeness of the model.
[0141] Monte Carlo ray tracing simulation: Based on the established 3D model of the tunnel, the Monte Carlo ray tracing method is used to simulate the light propagation in the tunnel. The Monte Carlo ray tracing method simulates the reflection, scattering and absorption of light in the tunnel through random sampling. During the specific operation, the light source position and light emission parameters are set, and the system randomly generates a large number of light rays, traces the paths of these light rays in the tunnel, and records the propagation trajectory of the light rays. Through the simulation and statistical analysis of a large number of light rays, the distribution of light in the tunnel and potential light blind spots are evaluated.
[0142] Output safety analysis and report: Based on the results of tunnel modeling and ray tracing simulation, a safety analysis report is automatically generated. The report includes stability assessment of the tunnel structure, uniformity analysis of light distribution, identification of potential risk points and recommended improvement measures. The system performs stress analysis and deformation analysis on the tunnel structure to evaluate the stability of the tunnel under different load conditions. The light distribution analysis evaluates the uniformity and brightness of the light in the tunnel and identifies areas with insufficient light and excessive light. The final report provides detailed analysis results and improvement suggestions to ensure the safety and effectiveness of the tunnel.
[0143] Table 1 Experimental data table
[0144]
[0145]
[0146]
[0147] It can be seen from the experimental data table that the ray tracing simulation and safety analysis of Tunnel A using the invented method performed well in many aspects. First, the light uniformity of Tunnel A reached 95%, significantly higher than the 85% of the control group Tunnel B. Second, in terms of the number of potential risk points, Tunnel A had only 3 potential risk points, while the control group Tunnel B had 6 risk points. In terms of the number of recommended improvement measures, Tunnel A required 2 improvement measures, while the control group Tunnel B required 4 improvement measures.
[0148] In summary, the present invention achieves better results in terms of accuracy, reliability and efficiency of measurement results.
[0149] Example 3, reference Figure 8 , which is an embodiment of the present invention, provides a 3D spatial deformation detection system based on Monte Carlo ray tracing, including a tunnel modeling module, a data preparation module, a Monte Carlo ray tracing module, and a safety analysis and report generation module.
[0150] The tunnel modeling module is used to model through CAD drawings, the data preparation module is used to compare the drawing modeling and point cloud data to output the three-dimensional space model, the Monte Carlo ray tracing module is used to determine whether there is an intersection and record the intersection information, and the safety analysis and report generation module is used to generate a safety report.
[0151] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0152] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0153] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0154] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc. It should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not limited. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
[0155] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A 3D spatial deformation detection method based on Monte Carlo ray tracing, characterized in that: include: Conduct tunnel modeling and data preparation; Monte Carlo ray tracing simulation; Output security analysis and reports.
2. The 3D spatial deformation detection method based on Monte Carlo ray tracing according to claim 1, characterized in that: The tunnel modeling and data preparation includes establishing a railway information model according to the railway design drawings, reading the plane CAD centerline diagram in Civil 3D and picking up the tunnel centerline, outputting the line of the tunnel centerline projected on the horizontal plane, and then laying the component model on the model of the railway axis information, building a 3D initial model, and importing it into the BIM monitoring terminal; To obtain real-time data, a 3D laser scanner is mounted on the front of the track inspection vehicle. When the track inspection vehicle is moving, 3D laser scanning is performed to obtain point cloud data of the railway and 3D space, and then the point cloud data output by the scan is processed; Perform data comparison, import the processed point cloud data and BIM model into the registration software, select feature points and use algorithms to achieve accurate registration of point cloud data and BIM model; The software’s point cloud and BIM model automatic comparison function is used to output and monitor the deviation between the model and the point cloud.
3. The 3D spatial deformation detection method based on Monte Carlo ray tracing according to claim 2, characterized in that: The tunnel modeling and data preparation includes using Civil 3D and Revit to establish the three-dimensional centerline of the tunnel, reading the plane CAD centerline drawing in Civil 3D and picking up the tunnel centerline, outputting the line of the tunnel centerline projected on the horizontal plane, and then constructing the three-dimensional central axis of the tunnel through stretching and integration; The main body of the tunnel is constructed. The main body of the tunnel is modeled in 3D forward modeling based on the 2D design drawings. The shape of the tunnel is controlled by the cross-section diagram. The 3D centerline of the tunnel is used as the path. The 3D modeling of the tunnel is achieved by stretching and lofting. Then, the Revit plug-in Dynamo is used to create a simple outline of the tunnel. The creation of the tunnel secondary lining model, based on the structure and size information of the tunnel composite lining, builds a metric profile model family in Revit, moves the CAD secondary lining profile drawing to the starting point of the stakeout axis, and creates the tunnel secondary lining 3D model by using stakeout; Construct the 3D model of the tunnel secondary lining and the initial support model of the tunnel; Construct an open-cut model, create a 2D outline model of the tunnel open-cut lining in the Revit front view according to the tunnel open-cut lining design drawing, and output it by staking out the path using the tunnel 3D road centerline; Construct tunnel ancillary facilities. The creation of tunnel invert filling, pavement, cable trough, drainage ditch, and sidewalk guardrail is based on two models: the tunnel transverse and longitudinal section design drawings and the tunnel 3D design curve. By analyzing the tunnel transverse and longitudinal section design drawings, the outline drawings of the invert filling, pavement, cable trough, drainage ditch, and sidewalk guardrail are created in the front view of the structural frame family template. The 3D models of other tunnel components are created with the outline drawings as the layout outline and the tunnel 3D axis as the layout path. Model family building equipment, by analyzing CAD two-dimensional design drawings, based on Revit software to establish the three-dimensional model family of tunnel secondary lining, initial support, tunnel portal, tunnel open hole, cable trough, drainage ditch, invert filling, pavement and sidewalk handrails and add model information, and then load and integrate the tunnel model families based on the three-dimensional center line of the tunnel as the basis for integrating the model family library. The basis of integration is the intersection of the tunnel pavement and the tunnel center line as the base point for determining the three-dimensional spatial position of each family, and the output tunnel three-dimensional model; Tunnel model information is added. The tunnel modeling method is to use CAD secondary development to batch extract the data required for modeling in the two-dimensional drawings and import them into Excel tables to convert the two-dimensional coordinate data into three-dimensional coordinate data; The secondary development of Revit was used to write a railway track automatic modeling plug-in, and the BIM models of the roadbed, ballast, track slab, sleeper, fastener, and rail components in the railway track structure were batch created through the extracted data to automatically build the railway track BIM model.
4. The 3D spatial deformation detection method based on Monte Carlo ray tracing according to claim 3, characterized in that: The tunnel modeling and data preparation including point cloud data processing includes: data acquisition, acquiring point cloud data through laser radar; Point cloud segmentation: Use the RANSAC algorithm and the Euclidean clustering segmentation algorithm to segment the point cloud data after surface reconstruction, so that objects can be separated from each other; Noise removal, point cloud simplification, point cloud fitting; The comparison between the point cloud data and the BIM model includes data comparison preparation. The three-dimensional design model of the tunnel constructed by Revit based on the Auto CAD two-dimensional design file is a three-dimensional entity file. In order to realize the data sharing of the three-dimensional model and the three-dimensional analysis with the measured point cloud data of the tunnel, the parametric modeling tunnel file is converted into a standard format. The formats of the three-dimensional data include IGES, STL, and OBJ. Tunnel central axis fitting, extract tunnel boundary points to fit the tunnel contour, and then fit the central axis according to the boundary, use algorithm programming to extract tunnel boundary points and use improved differential method for fitting; Project the acquired tunnel point cloud data to the XOY plane of the scanning coordinate system, then specify the Y coordinate value, find the maximum and minimum values of X under the coordinate value, cycle through all Y values at equal intervals, and output the boundary between the point cloud data projection and the XOY plane; Specify the Y value, obtain the corresponding maximum and minimum X values under the coordinate, output the average value of X, use the coordinate value as the coordinate of the point on the central axis, and find the point on the central axis corresponding to each Y value in turn; According to the fitted central axis point, the central axis is output by fitting, the tunnel coordinates are rotated, the cross-section curve is fitted, and the standard track model is output as a comparison benchmark.
5. The 3D spatial deformation detection method based on Monte Carlo ray tracing according to claim 4, characterized in that: The Monte Carlo ray tracing simulation includes outputting the intersection points between a given ray and a triangular face during the ray tracing process. Due to the repetition, the ray-triangle intersection method is used for output to achieve efficient ray-triangle intersection. The intersection operation is performed after the ray and the triangular face are appropriately transformed. The mathematical model of the triangle and ray is expressed as: T(u,v)=(1-uv)V0+uV1+vV2 R(t)=O+tD Among them, (u, v) represents the centroid coordinates, V0, V1, V2 represent the three vertices of the triangular face, O represents the origin of R(t), and D represents the normal direction of R(t); The intersection equation of R(t) and T(u,v) is R(t)=T(u,v), which can be expressed as: O+tD=(1-uv)V0+uV1+vV2 Among them, (u,v) represents the coordinates of the center of gravity; The distance t from the ray origin and the centroid coordinates of the intersection point (u, v) are output through a linear system and expressed by the Cramer rule output as: Among them, the two sides of the triangle are E1=V1-V0 and E2=V1-V0, and T=O-V0, |ABC|=-(A×C)·B=-(C×B)·A; The re-output is represented as: Among them, P = (D×E2) and Q = (T×E1).
6. The 3D spatial deformation detection method based on Monte Carlo ray tracing according to claim 5, characterized in that: The Monte Carlo ray tracing simulation includes performing ray tracing intersection detection, constructing AABB bounding boxes for each part of the track model and the standard model, and identifying the deformation area of the track by detecting the intersection between the bounding boxes; The ray tracing intersection detection algorithm uses the information of the normal vector. The intersection test is performed on a vertex basis. Each ray is projected from each vertex, and the direction of the ray is opposite to the direction of the normal vector of the corresponding vertex. For all vertices of the first object (Obj1), also known as the standard 3D BIM space model, light will be projected to another object (Obj2), also known as the 3D point cloud data obtained in real time; Determine the intersection status of each vertex, using a fast ray-triangle intersection method when searching for ray intersections; Assuming that the ray cast from the vertex of Obj1 intersects with a triangle of Obj2, and the normal vectors are in opposite directions, the vertex currently being tested becomes a candidate intersection point; For a candidate intersection point, the dot product of the normal vectors of p1 and p2 should be less than zero, expressed as: n1·n2<0 Where pi represents the intersection point between the object and the ray, ni represents the normal vector of pi, i = 1, 2; In the process of searching for p2, there are multiple intersection points, the first intersection primitive of the ray is selected for p2, and the point far from p1 is selected for p2, and the distance test between p1 and p2 is not checked in the first criterion; The standard for determining the intersection point is expressed as: The normal vectors of p1 and p2 are in opposite directions; The distance between p1 and p2 is smaller than the distance between p2 and p3; p1 represents each point of Obj1 currently being tested, p2 represents the intersection of the light projected by Obj2 and p1 in the anti-normal direction, and p3 represents the self-intersection of the light projected by Obj2 and p2 and p1 in the normal direction. If there are multiple self-intersection points, the nearest point is selected from them; The first criterion alone cannot identify all intersection points. For all candidate intersection vertices that pass the first criterion, check the second criterion: After finding p2 in the first test, find the intersection point p3 of Obj2; p3 intersects the light cast by p2 and the direction of the normal vector of p1; If Obj2 is non-convex, there are multiple self-intersection points. In this case, the point closest to p2 is selected as p3; Compare the distance between p2 and p1 with the distance between p2 and p3; If the distance between p2 and p1 is less than the distance between p2 and p3, p1 is determined as the intersection point: ∥p2-p1∥≤∥p2-p3∥; p1 and p2 become a pair of intersection points; Perform ray tracing intersection detection, build AABB bounding boxes for each part of the track model (obj1) and the standard model (obj2), and identify the deformation area of the track by detecting the intersection between the bounding boxes; The geometric difference between the real-time point cloud data and the standard model is output, including the offset of each point and the overall deformation. Rays will be traced to check whether there is any deformation in the BIM model as seen from the triangulated geometric space.
7. The 3D spatial deformation detection method based on Monte Carlo ray tracing according to claim 6, characterized in that: The output safety analysis and reporting includes the use of statistical analysis methods to evaluate the type, extent and severity of track deformation; Commonly used indicators include maximum deformation, average deformation and standard deviation; Generate a security report based on the results of the security analysis, providing description, location, severity assessment and improvement suggestions for each security risk.
8. A system using the 3D spatial deformation detection method based on Monte Carlo ray tracing as claimed in any one of claims 1 to 7, characterized in that: It includes tunnel modeling module, data preparation module, Monte Carlo ray tracing module, and safety analysis and report generation module; The tunnel modeling module is used for modeling through CAD drawings; The data preparation module is used to compare the drawing modeling and point cloud data to output a three-dimensional space model; The Monte Carlo ray tracing module is used to determine whether there is an intersection and record the intersection information; The safety analysis and report generation module is used to generate a safety report.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the 3D spatial deformation detection method based on Monte Carlo ray tracing described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the 3D spatial deformation detection method based on Monte Carlo ray tracing described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Tunnel visual management and control construction process based on three-dimensional laser scanning point cloud
CN117010068A
Three -dimensional tunnel section deformation detection of developments and analytic system
CN208736365U
Cited By
Coal mine tunnel deformation detection method and system based on point cloud
CN120931727A
