Multi-radar shape and size detection method for hot forming process of large forgings
Through the multi-radar shape and size detection method, point cloud data of forgings are processed and fusion and calibration are performed, which solves the problem that traditional measurement methods are difficult to achieve precision measurement in harsh environments, and realizes high-precision detection and quality control of large forgings, improving production efficiency and safety.
Patent Information
- Application Number
- CN202510040054.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-06
AI Technical Summary
During the thermal forming process of large forgings, traditional dimensional measurement methods are difficult to achieve precise measurement in harsh environments such as high temperature, strong vibration and dust, resulting in large measurement errors, slow speeds, high labor intensity, and affecting production efficiency and forging quality.
The multi-radar shape and size detection method is adopted, and the multi-camera scanning system is built, the environment is configured and PCL algorithm is developed to process the forging point cloud data, including removing occlusion, data fusion, downsampling and filtering, and the point cloud calibration and merging is used to generate high-precision three-dimensional point cloud data.
It significantly improves the accuracy and efficiency of the shape and size detection of large forgings, ensures that the quality control of forgings during thermal forming process is more accurate, reduces data interference and manual intervention, and improves the overall efficiency and safety of the production line.
Smart Images

Figure CN119941993A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of dimension detection, and specifically to a multi-radar shape and dimension detection method for a hot forming process of a large forging. Background Art
[0002] Large forgings play an indispensable role in the manufacture of key high-end heavy equipment components and have been widely used in energy, petrochemical, metallurgy and other high-end equipment manufacturing industries. For example:
[0003] 1. Energy industry: In the power industry, large forgings are used to manufacture steam turbine rotors and generator main shafts for thermal power units and nuclear power plants with a single unit capacity of more than 600MW, as well as turbine shafts and generator main shafts for hydropower stations with a single unit capacity of more than 500MW.
[0004] 2. Petrochemical industry: Large forgings are mainly used to manufacture high-temperature and high-pressure thick-walled tower cylinders and heads for large hydrogenation reactors with a diameter of more than 4500mm.
[0005] 3. Metallurgical industry: Large forgings are used for forging support rolls exceeding 1600mm and large diameter hot rolling work rolls.
[0006] 4. Heavy machinery: In the field of heavy machinery, it is used for columns, column pieces, working cylinders and other parts of large forging equipment.
[0007] As a key link in the forging process, online shape and size measurement requires accurate detection of the shape and size of forgings under high temperature to ensure that they meet the requirements of the process documents. However, compared with traditional dimension measurement methods, the harsh environment of the forging workshop, such as high temperature, strong vibration and dust, brings many challenges to the online precision measurement of the shape and size of large forgings. At present, the traditional manual direct measurement method has large measurement errors, slow measurement speed and high labor intensity, and cannot truly reflect the shape deviation of forgings. Since the forgings must be offline during measurement, this has a great impact on production efficiency and forging quality. Therefore, the development and application of more advanced online measurement technology to improve measurement accuracy and efficiency is of great significance to improving the manufacturing level of large forgings in my country. Summary of the invention
[0008] In view of the problems existing in the prior art, this patent application proposes a multi-radar shape and size detection method for the hot forming process of large forgings, including the following steps:
[0009] S1: Build the system
[0010] S1.1: Configure the environment;
[0011] S1.2: Develop PCL algorithm;
[0012] S1.3: Visualize the point cloud data and display the visualization part on RVIZ;
[0013] S1.4: Configure a multi-camera scanning system;
[0014] S1.5: Install protective devices;
[0015] S2: Processing forging point cloud data
[0016] S2.1: Processing multi-frame point cloud data points;
[0017] S2.2: Remove the occlusion of the point cloud data of the pancake forgings;
[0018] S2.3: Point cloud data fusion of pancake forgings;
[0019] S2.4: Processing redundant point cloud data;
[0020] S2.5: 3D reconstruction of point cloud data;
[0021] S2.6: Get data.
[0022] Furthermore, step S1.1 is specifically as follows:
[0023] S1.1: Configure the environment
[0024] The detection method is completed under the Ubuntu18.04 system. Ubuntu is known for its stability and performance, which is especially important for long-running development tasks and server applications. In addition, the corresponding version of the PCL library needs to be installed. This method is completed under the PCL1.14.0 version.
[0025] Furthermore, step S1.2 is specifically as follows:
[0026] The point cloud is downsampled through a voxel grid filter to reduce the number of point clouds while retaining the structural information of the point cloud as much as possible.
[0027] The operation of voxel grid filtering is expressed as:
[0028]
[0029] Among them, V represents the point set in each voxel, P filtered is the representative point inside the voxel.
[0030] The sensor_msgs::PointCloud2 message in ROS is converted to the point cloud format of PCL through the pcl::fromROSMsg function; the PCL point cloud is converted to the sensor_msgs::PointCloud2 message in ROS through the pcl::toROSMsg function.
[0031] S1.3: Visualize the point cloud data and display the visualization part on RVIZ.
[0032] Furthermore, step S1.4 is specifically as follows:
[0033] According to the size and shape of the pancake forgings and the position of the forging die, three radar sensors are arranged at positions 120° apart from the forgings to ensure that the pancake forgings can be fully scanned in multiple directions. Calibration is used to ensure that the signals between different radars do not interfere with each other and to verify the measurement accuracy of each radar.
[0034] Furthermore, step S1.5 is specifically as follows:
[0035] An insulating cabin and shock-absorbing device are provided for the radar sensor, and insulating cloth is added to the aviation line connecting the radar sensor to the computer.
[0036] S2: Processing forging point cloud data
[0037] Furthermore, step S2.1 is specifically as follows:
[0038] At certain frame intervals, multiple frames of point cloud data are superimposed to obtain a more stable and high-precision point cloud data output.
[0039] Whenever a new frame of point cloud data is received, it is converted from the ROS message format to the PCL (Point Cloud Library) format and stored in a container. The container is used to save all point cloud data received in the current cycle.
[0040] After processing a specified number of frames (for example, 10 frames of data), the data is accumulated. Specifically, the point cloud data of each frame is added to a new point cloud object through the "brute force superposition" method to generate an accumulated point cloud.
[0041] The formula is:
[0042]
[0043] Among them, P i represents the point cloud data of the i-th frame, P accumulated Represents the accumulated point cloud data, and N is the total number of frames.
[0044] After the accumulation is completed, the superimposed point cloud data is converted into the point cloud message format of ROS and published according to the current timestamp and coordinate system information.
[0045] After completing one round of accumulation, the point cloud data storage container is cleared and the frame counter is reset to process the next round of point cloud data.
[0046] Furthermore, step S2.2 is specifically as follows:
[0047] Key steps:
[0048] S2.2.1.Multiple radar data are subscribed through their respective topics.
[0049] S2.2.2. Synchronize according to timestamps and accumulate point cloud data from different radars.
[0050] S2.2.3. Publish the accumulated point cloud data through a new topic for subsequent processing.
[0051] Furthermore, step S2.3 is specifically as follows:
[0052] S2.3.1 Data preprocessing
[0053] First, the point cloud data of each radar is downsampled and filtered to remove noise data, reduce the amount of calculation, and improve the processing speed.
[0054] S2.3.2 Point cloud data calibration
[0055] The data from different radars are calibrated through point cloud registration methods, such as the NDT (Normal Distributions Transform) algorithm. By calculating the transformation matrix, the pose differences between different radars are eliminated so that all point cloud data can be accurately superimposed in the same coordinate system. This step usually involves iterative optimization algorithms to find the optimal rotation and translation matrices.
[0056] The NDT algorithm performs matching by constructing a probabilistic model in the local area of the point cloud. The goal is to maximize the match between each point of the source point cloud and the local model of the target point cloud by optimizing the transformation parameters (rotation matrix R and translation vector t). These transformation parameters are optimized by maximizing the log-likelihood function.
[0057] Suppose there are two point clouds:
[0058] p={p1,p2,...,p m} is the source point cloud, the three-dimensional coordinates p i =(x i ,y i ,z i ).
[0059] Q={Q n ,Q n ,...,Q n} is the source point cloud, the three-dimensional coordinate q i =(x i ',y i ',zi ').
[0060] The coordinate transformation of the point cloud is achieved by rotating the matrix R and translating the vector t. The goal is to minimize the distance error between the source point cloud and the target point cloud.
[0061] The specific mathematical expression is:
[0062] Rotation and translation transformations:
[0063]
[0064] in:
[0065] p i =(x i ,y i ,z i ) are the coordinates of the point in the source point cloud.
[0066] is the transformed point cloud coordinate.
[0067] R is the rotation matrix, which is used to describe the rotation relationship between the source point cloud and the target point cloud.
[0068] t=(t x ,t y ,t z ) is a translation vector, which is used to describe the translation relationship between the source point cloud and the target point cloud.
[0069] The rotation matrix R is an orthogonal matrix that satisfies:
[0070] R T R=I (4)
[0071] Among them, I is the identity matrix, which means that the rotation matrix keeps the distance of the point cloud unchanged, that is, the rotation does not change the relative distance between the points.
[0072] In the NDT algorithm, each local area of the point cloud is modeled with a Gaussian distribution. Therefore, each point p of the source point cloud i It will be aligned with the Gaussian distribution in the target point cloud.
[0073] Each Gaussian distribution is defined by its mean μ and covariance matrix Σ:
[0074]
[0075] During the transformation, each point p of the source point cloud i It will be mapped to the corresponding position of the target point cloud according to the rotation and translation matrices, and then the error will be evaluated by calculating the matching degree between the point and the Gaussian distribution of the target point cloud.
[0076] The core of the NDT algorithm is to solve the optimal rotation matrix R and translation vector t through iterative optimization, which is usually achieved by maximum likelihood estimation. The specific optimization goal is to minimize the log-likelihood function L(R,t), that is, to maximize the alignment of the transformed source point cloud with the target point cloud by adjusting the rotation and translation.
[0077] Maximum Likelihood Estimation:
[0078]
[0079] The optimization of this function is usually achieved through numerical optimization methods such as gradient descent or Newton's method. By continuously updating R and t until convergence, the optimal coordinate transformation is finally obtained.
[0080] First, each point P in the point cloud P i and its neighboring point N(p i ) to establish a Gaussian distribution. Assume that each point has a neighborhood N(p i ) approximately follows a Gaussian distribution:
[0081] N(p i )=N(μ i ,∑i) (7)
[0082] Among them, μ i is the mean of the neighborhood, and ∑i is the covariance matrix.
[0083] The next step is to register the target point cloud with the source point cloud. Assume that the source point cloud Psrc and the target point cloud Ptgt need to be registered. By calculating each point p in the target point cloud j The closest Gaussian distribution N(μ i ,∑i), and minimize the error function:
[0084]
[0085] Among them, T is the transformation matrix from the source point cloud to the target point cloud, T(p j ) is the point after the transformation is applied.
[0086] The optimal transformation is then solved by maximizing the likelihood function of point cloud registration. The goal is to maximize the match between the source point cloud and the target point cloud and minimize the above error function. Usually, the gradient descent method or the efficient least squares method is used to solve the optimal transformation parameters.
[0087] Finally, by continuously iteratively optimizing the error function, the transformation matrix T is finally obtained. opt , so that the source point cloud is aligned in the coordinate system of the target point cloud.
[0088] The overall formula is as follows:
[0089]
[0090] Among them, T opt It is the optimized transformation matrix that can optimally match the source point cloud with the target point cloud.
[0091] S2.3.3 Point cloud data merging
[0092] After completing the point cloud calibration, the point cloud data of all radars are merged to eliminate duplicate data and complete the final point cloud fusion, ensuring the spatial consistency and integrity of multiple radar point cloud data. The final fused point cloud data is generated.
[0093] Use the transformation matrix T to transform a radar point cloud P lidar1 Transform to the target coordinate system:
[0094] P lidar2 =T×P lidar1 (10)
[0095] Among them, T is the transformation matrix obtained by the registration algorithm, P lidar1 and P lidar2 They are the point cloud data of radar 1 and radar 2 respectively, and the same goes for the three radars.
[0096] Merge multiple aligned point clouds (point clouds of radar 1, radar 2, and radar 3) to obtain the final fused point cloud P merged The merging is achieved by the following formula:
[0097] P merged =P lidar1 +P lidar2 +P lidar3 (11)
[0098] Furthermore, step S2.4 is specifically as follows:
[0099] S2.4.1: Set scope boundaries
[0100] According to the size and location of the target object, the effective range of the point cloud is set. This range usually includes the area of interest (such as the location of a large forging) and filters out irrelevant areas (such as the background area far away from the target).
[0101] For a given point cloud P and clipping range {x min ,x max},{y min ,y max},{z min ,z max}, each point p=(x,y,z) of the point cloud P needs to satisfy:
[0102] x min ≤x≤xmax ,y min ≤y≤y max ,z min ≤z≤z max (12)
[0103] S2.4.2: Point cloud clipping
[0104] The point cloud data is cropped using a cropping algorithm (such as CropBox) by setting the range boundary. In this way, only the points within the specified range are retained and other irrelevant point cloud data are removed.
[0105] S2.4.3: Data output
[0106] The point cloud data after range filtering is output and passed to the subsequent processing module, reducing the amount of calculation and improving the accuracy and efficiency of subsequent algorithms.
[0107] Furthermore, step S2.5 is specifically as follows:
[0108] S2.5.1 Feature extraction
[0109] Use principal component analysis (PCA) of the local neighborhood to estimate the normal vector of each point. Assume that for point p i =(x i ,y i ,z i ), its neighborhood point set N(p i ) can be obtained by Euclidean distance:
[0110] N(p i )={(x j ,y j ,z j )|d(p i ,p j )≤r} (13)
[0111] Where d(p i ,p j ) is point p i and p j The Euclidean distance between them, r is the neighborhood radius.
[0112] Use PCA to fit the neighborhood points and get the covariance matrix C:
[0113]
[0114] in is the centroid of the neighborhood points, C is the covariance matrix of the point cloud, and the eigenvector corresponding to the calculated minimum eigenvalue is the normal vector n i .
[0115] S2.5.2. Surface reconstruction
[0116] First solve the Laplace operator
[0117]
[0118] Where Δφ is the Laplace operator, n is the normal vector of the point cloud, and Ω is the spatial region of the point cloud. The solved scalar field φ represents the implicit surface of the point cloud, and the actual surface can be extracted through the zero isosurface φ=0.
[0119] Afterwards, the normal vector is estimated for each point.
[0120] Poisson's equation is solved by minimizing the energy function:
[0121]
[0122] Finally, numerical methods (such as the finite difference method) are used to solve the equations and obtain the scalar field φ.
[0123] The zero isosurface φ=0 is extracted to obtain the surface mesh.
[0124] S2.5.3. Mesh optimization and post-processing
[0125] Laplacian smoothing is used to adjust the vertex coordinates so that they tend to the center of gravity of the neighborhood vertices. The formula is:
[0126]
[0127] Among them, v i is the position of vertex i, N(v i ) is the vertex v i neighborhood, λ is the smoothing coefficient.
[0128] S2.5.4. Texture Mapping and Rendering
[0129] After mesh optimization and post-processing, the generated mesh is mapped to Unity's 3D scene. The reflection intensity, color or other information in the point cloud data is mapped to the 3D mesh for texture mapping. Texture mapping can be achieved through UV coordinates, mapping the properties of the point cloud to the surface of the mesh.
[0130] S2.6: Get data:
[0131] Furthermore, step S2.6 is specifically as follows:
[0132] S2.6.1 Extracting Geometry
[0133] The overall size of the forging is obtained through the bounding box, and the commonly used ones are axis-aligned bounding box (AABB) and oriented bounding box (OBB).
[0134] For all vertices V of the mesh, the size of the AABB is calculated as:
[0135] AABB min =min(V) and AABB max =max(V) (18)
[0136] The length, width, and height of the bounding box are:
[0137] L=AABB max [0]-AABB min [0] (19)
[0138] W=AABB max [1]-AABB min [1]
[0139] H=AABB max [2]-AABB min [2]
[0140] The minimum circumscribed sphere is used to represent the "maximum" size of the forging, and the Welzl algorithm is often used to solve it. The solution process of the minimum circumscribed sphere is:
[0141] 1) Randomly select a point as the center of the sphere and calculate the minimum radius.
[0142] 2) For each point, if the point is outside the current sphere, update the center and radius until all points are inside the sphere.
[0143] The mathematical description of the process is:
[0144] MinSphere(V)=(c,r) (20)
[0145] Where c is the center of the sphere and r is the radius of the sphere.
[0146] S2.6.2 Compute the convex hull of the point cloud
[0147] Use Graham scanning algorithm or QuickHull algorithm to calculate the convex hull of the point cloud. For the point set P = {v1,v2,...,v n}, the convex hull is the smallest convex polyhedron that encloses all points. The volume calculation formula of the convex hull is:
[0148]
[0149] Each tetrahedron consists of points v i ,v j ,v k and a reference point of the convex hull.
[0150] S2.6.3 Calculation of Maximum Diameter of Forgings
[0151] To extract the maximum diameter of a forging, we can calculate the maximum distance between two points in the mesh. Given two vertices v i =(x i ,y i ,z i ) and v j =(x j ,y j ,z j ), the Euclidean distance calculation formula is:
[0152]
[0153] The maximum diameter is the maximum distance between all pairs of vertices in the mesh, that is:
[0154]
[0155] Compared with the prior art, this patent application has the following beneficial effects:
[0156] 1. Improve the accuracy of shape and size detection: This patent adopts multi-radar scanning and point cloud data fusion technology. Through multi-camera configuration and fine processing of forging point cloud data, it effectively avoids the blind spots or errors existing in single radar scanning, significantly improves the detection accuracy of the shape and size of large forgings, and ensures more accurate quality control of forgings during hot forming.
[0157] 2. Optimize the data processing of pancake forgings: In view of the special shape and occlusion problems of pancake forgings, the removal of occlusion points and point cloud data fusion technology can effectively eliminate the errors caused by the forging shape, improve the reliability in complex geometric body detection, and solve the problem that traditional methods cannot accurately process pancake forgings.
[0158] 3. Reduce data interference: By fusing multi-frame point cloud data and removing redundant point clouds, the interference caused by data redundancy and noise in traditional methods is reduced, the data processing efficiency is improved, and the accuracy and stability of the detection results are ensured.
[0159] 4. Strong adaptability: This method can flexibly configure different scanning systems and protection devices according to actual application requirements. It has strong system adaptability and is suitable for hot forming inspection of forgings of different types and sizes.
[0160] 5. Enhanced data visualization and real-time feedback: By displaying the visualization results of point cloud data on the RVIZ platform, operators can monitor the inspection process in real time and quickly identify potential problems, which improves the operability and timeliness of the system and provides real-time feedback and decision support for the production process.
[0161] 6. Improve production efficiency: Through automated point cloud data processing and analysis, manual intervention and the periodicity of traditional detection methods are reduced, and the overall efficiency of the production line is improved, especially during the hot forging forming process, which enables fast and accurate detection and quality assessment of forgings.
[0162] 7. Improve safety: Non-contact multi-radar scanning technology is used to detect the shape and size of forgings, avoiding the need for direct contact with the high-temperature surface of the forgings in traditional methods, effectively reducing the safety risks faced by operators and improving the safety of the working environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0163] Figure 1 This is the overall flow chart of this method;
[0164] Figure 2 Insulated cabin for use;
[0165] Figure 3 This is the flow chart of the NDT algorithm. DETAILED DESCRIPTION
[0166] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0167] like Figure 1-3 As shown, the present application proposes a multi-radar shape and size detection method for the hot forming process of large forgings, comprising the following steps
[0168] S1: Build the system
[0169] S1.1: Configure the environment
[0170] The detection method is completed under the Ubuntu18.04 system. Ubuntu is known for its stability and performance, which is especially important for long-running development tasks and server applications. In addition, the corresponding version of the PCL library needs to be installed. This method is completed under the PCL1.14.0 version.
[0171] S1.2: Develop PCL algorithm
[0172] This method will develop the functions of the PCL library for the acquisition of data on large pancake forgings by radar and equipment.
[0173] The point cloud is downsampled through a voxel grid filter to reduce the number of point clouds while retaining the structural information of the point cloud as much as possible.
[0174] The core idea of voxel grid filtering is to divide the point cloud space into several cubes of the same size (i.e., voxels), and then select a representative point in each voxel (usually the center or mean of the points in the voxel) to reduce the number of points in the point cloud.
[0175] The operation of voxel grid filtering is expressed as:
[0176]
[0177] Among them, V represents the point set in each voxel, P filtered is the representative point inside the voxel.
[0178] The sensor_msgs::PointCloud2 message in ROS is converted to the point cloud format of PCL through the pcl::fromROSMsg function; the PCL point cloud is converted to the sensor_msgs::PointCloud2 message in ROS through the pcl::toROSMsg function.
[0179] These functions are the bridge for point cloud data to flow between ROS and PCL.
[0180] S1.3: Visualize the point cloud data and display the visualization part on RVIZ.
[0181] S1.4: Configuring a multi-camera scanning system
[0182] According to the size, shape and configuration of the forging die of the pancake forging, three radar sensors are arranged at positions 120° apart from the forging to ensure that the pancake forging can be fully scanned in multiple directions. Calibration is used to ensure that the signals between different radars do not interfere with each other, and the measurement accuracy of each radar is verified.
[0183] S1.5: Set up protective devices
[0184] The radar sensor is equipped with a heat-insulating cabin and a shock-absorbing device, and the aviation line connecting the radar sensor and the computer is equipped with heat-insulating cloth to reduce the impact of the harsh environment of the construction site, the high temperature and strong vibration in the forging workshop.
[0185] S2: Processing forging point cloud data
[0186] S2.1: Processing multi-frame point cloud data points
[0187] Point cloud data is usually a collection of three-dimensional points collected by LiDAR sensors, which contains the coordinate information of each point and features such as reflection intensity value. Since the point cloud data collected by LiDAR sensors has certain fluctuations in real-time and accuracy, single-frame point cloud data cannot accurately represent the structural characteristics of the real scene.
[0188] The present invention reduces the noise and error caused by single-frame data by accumulating point cloud data of multiple consecutive frames, thereby obtaining more accurate environmental modeling.
[0189] At certain frame intervals, multiple frames of point cloud data are superimposed to obtain a more stable and high-precision point cloud data output.
[0190] Whenever a new frame of point cloud data is received, it is converted from the ROS message format to the PCL (Point Cloud Library) format and stored in a container. The container is used to save all point cloud data received in the current cycle.
[0191] After processing a specified number of frames (for example, 10 frames of data), the data is accumulated. Specifically, the point cloud data of each frame is added to a new point cloud object through the "brute force superposition" method to generate an accumulated point cloud.
[0192] The formula is:
[0193]
[0194] Among them, P i represents the point cloud data of the i-th frame, P accumulated Represents the accumulated point cloud data, and N is the total number of frames.
[0195] After the accumulation is completed, the superimposed point cloud data is converted into the point cloud message format of ROS and published according to the current timestamp and coordinate system information.
[0196] After completing one round of accumulation, the point cloud data storage container is cleared and the frame counter is reset to process the next round of point cloud data.
[0197] S2.2: Remove occlusion from point cloud data of pancake forgings
[0198] The multi-radar point cloud data accumulation algorithm is an effective way to solve the occlusion problem of large forgings. By introducing multiple radars for data collection, each radar independently publishes its collected point cloud data. Since a single radar may not be able to effectively obtain data in certain areas, multiple radars working together can provide more comprehensive point cloud information. Based on the principle of time synchronization, the algorithm accumulates point cloud data from different radars according to timestamps to ensure the synchronization of data from different radars. The data of each radar is subscribed through a new topic, and is published after processing, and finally a fused point cloud data set is obtained. The accumulation process ensures the organic combination of data from each radar, improving the accuracy and coverage of the overall measurement.
[0199] Key steps:
[0200] S2.2.1.Multiple radar data are subscribed through their respective topics.
[0201] S2.2.2. Synchronize according to timestamps and accumulate point cloud data from different radars.
[0202] S2.2.3. Publish the accumulated point cloud data through a new topic for subsequent processing.
[0203] S2.3: Point cloud data fusion of pancake forgings
[0204] Multi-radar point cloud fusion mainly includes three steps: data preprocessing, point cloud data calibration and point cloud data merging. Its purpose is to integrate point cloud data from different radars to obtain a unified and accurate 3D point cloud representation, avoiding incomplete or inconsistent data caused by occlusion or perspective differences.
[0205] S2.3.1 Data preprocessing
[0206] First, the point cloud data of each radar is downsampled and filtered to remove noise data, reduce the amount of calculation, and improve the processing speed.
[0207] S2.3.2 Point cloud data calibration
[0208] The data from different radars are calibrated through point cloud registration methods, such as the NDT (Normal Distributions Transform) algorithm. By calculating the transformation matrix, the pose differences between different radars are eliminated so that all point cloud data can be accurately superimposed in the same coordinate system. This step usually involves iterative optimization algorithms to find the optimal rotation and translation matrices.
[0209] The NDT algorithm matches by building a probabilistic model in the local area of the point cloud. The goal is to maximize the match between each point of the source point cloud and the local model of the target point cloud by optimizing the transformation parameters (rotation matrix R and translation vector t). Specifically, the goal of the algorithm is to optimize these transformation parameters by maximizing the log-likelihood function.
[0210] Suppose there are two point clouds:
[0211] p={p1,p2,...,p m} is the source point cloud, expressed as three-dimensional coordinates p i =(x i ,y i ,z i ).
[0212] Q={Q n ,Q n,...,Q n} is the source point cloud, expressed as three-dimensional coordinates q i =(x i ',y i ',z i ').
[0213] The coordinate transformation of the point cloud is achieved through a rotation matrix R and a translation vector t, and the goal is to minimize the distance error between the source point cloud and the target point cloud.
[0214] The specific mathematical expression is as follows.
[0215] Rotation and translation transformations:
[0216]
[0217] in:
[0218] p i =(x i ,y i ,z i ) is a point in the source point cloud.
[0219] is the transformed point cloud coordinate.
[0220] R is the rotation matrix, which is used to describe the rotation relationship between the source point cloud and the target point cloud.
[0221] t=(t x ,t y ,t z ) is the translation vector, which is used to describe the translation relationship between the source point cloud and the target point cloud.
[0222] The rotation matrix R is an orthogonal matrix that satisfies:
[0223] R T R=I (4)
[0224] Among them, I is the identity matrix, which means that the rotation matrix keeps the distance of the point cloud unchanged, that is, the rotation does not change the relative distance between the points.
[0225] In the NDT algorithm, each local area of the point cloud is modeled as a Gaussian distribution. Therefore, each point p of the source point cloud i It will be aligned with the Gaussian distribution in the target point cloud.
[0226] Each Gaussian distribution is defined by its mean μ and covariance matrix Σ:
[0227]
[0228] During the transformation, each point p of the source point cloud iIt will be mapped to the corresponding position of the target point cloud according to the rotation and translation matrices, and then the error will be evaluated by calculating the matching degree between the point and the Gaussian distribution of the target point cloud.
[0229] The core of the NDT algorithm is to solve the optimal rotation matrix R and translation vector t through iterative optimization, which is usually achieved by maximum likelihood estimation. The specific optimization goal is to minimize the log-likelihood function L(R,t), that is, to maximize the alignment of the transformed source point cloud with the target point cloud by adjusting the rotation and translation.
[0230] Maximum Likelihood Estimation:
[0231]
[0232] The optimization of this function is usually achieved through numerical optimization methods such as gradient descent or Newton's method. By continuously updating R and t until convergence, the optimal coordinate transformation is finally obtained.
[0233] First, each point P in the point cloud P i and its neighboring point N(p i ) to establish a Gaussian distribution. Assume that each point has a neighborhood N(p i ) approximately follows a Gaussian distribution:
[0234] N(p i )=N(μ i ,∑i) (7)
[0235] Among them, μ i is the mean of the neighborhood, and ∑i is the covariance matrix.
[0236] The next step is to register the target point cloud with the source point cloud. Assume that the source point cloud Psrc and the target point cloud Ptgt need to be registered. By calculating each point p in the target point cloud j The closest Gaussian distribution N(μ i ,∑i), and minimize the following error function:
[0237]
[0238] Among them, T is the transformation matrix from the source point cloud to the target point cloud, T(p j ) is the point after the transformation is applied.
[0239] The optimal transformation is then solved by maximizing the likelihood function of point cloud registration. Its goal is to maximize the matching degree between the source point cloud and the target point cloud, that is, to minimize the above error function. Usually, the gradient descent method or the efficient least squares method is used to solve the optimal transformation parameters.
[0240] Finally, by continuously iteratively optimizing the error function, the transformation matrix T is finally obtained. opt, so that the source point cloud is aligned in the coordinate system of the target point cloud.
[0241] The overall formula is as follows:
[0242]
[0243] Among them, T opt It is the optimized transformation matrix that can best match the source point cloud with the target point cloud.
[0244] S2.3.3 Point cloud data merging
[0245] After completing the point cloud calibration, the point cloud data of all radars are merged to eliminate duplicate data and complete the final point cloud fusion, ensuring the spatial consistency and integrity of multiple radar point cloud data and generating the final fused point cloud data.
[0246] Use the transformation matrix T to transform a radar point cloud P lidar1 Convert to the target coordinate system:
[0247] P lidar2 =T×P lidar1 (10)
[0248] Among them, T is the transformation matrix obtained by the registration algorithm, P lidar1 and P lidar2 They are the point cloud data of radar 1 and radar 2 respectively, and the same goes for the three radars.
[0249] Merge multiple aligned point clouds (point clouds of radar 1, radar 2, and radar 3) to obtain the final fused point cloud P merged The merging is achieved by the following formula:
[0250] P merged =P lidar1 +P lidar2 +P lidar3 (11)
[0251] S2.4: Processing redundant point cloud data
[0252] In the process of multi-radar point cloud fusion, point cloud data containing a large number of irrelevant areas are often encountered. These irrelevant areas will increase the computational burden and affect the efficiency of subsequent processing. The range filtering algorithm sets an effective range boundary to filter out points that are not within the specified range and streamline the point cloud data.
[0253] S2.4.1: Set scope boundaries
[0254] According to the size and location of the target object, the effective range of the point cloud is set. This range usually includes the area of interest (such as the location of a large forging) and filters out irrelevant areas (such as the background area far away from the target).
[0255] For a given point cloud P and clipping range {x min ,x max},{y min ,y max},{z min ,z max}, each point p=(x,y,z) of the point cloud P needs to satisfy:
[0256] x min ≤x≤x max ,y min ≤y≤y max ,z min ≤z≤z max (12)
[0257] S2.4.2: Point cloud clipping
[0258] The point cloud data is cropped using a cropping algorithm (such as CropBox) by setting the range boundary. In this way, only the points within the specified range are retained and other irrelevant point cloud data are removed.
[0259] S2.4.3: Data output
[0260] The point cloud data after range filtering is output and passed to the subsequent processing module, reducing the amount of calculation and improving the accuracy and efficiency of subsequent algorithms.
[0261] S2.5: 3D reconstruction of point cloud data
[0262] S2.5.1 Feature extraction
[0263] Before point cloud reconstruction, it is usually necessary to calculate the normal vector of the point cloud, especially for surface reconstruction algorithms such as Poisson reconstruction, which rely on the normal vector information of the point cloud.
[0264] Use principal component analysis (PCA) of the local neighborhood to estimate the normal vector of each point. Assume that for point p i =(x i ,y i ,z i ), its neighborhood point set N(p i ) can be obtained by Euclidean distance:
[0265] N(p i )={(x j ,y j ,z j )|d(p i ,p j )≤r} (13)
[0266] Among them, d(p i,p j ) is point p i and p j The Euclidean distance between them, r is the neighborhood radius.
[0267] Use PCA to fit the neighborhood points and get the covariance matrix C:
[0268]
[0269] in is the centroid of the neighborhood points, C is the covariance matrix of the point cloud, and the eigenvector corresponding to the calculated minimum eigenvalue is the normal vector n i .
[0270] S2.5.2. Surface reconstruction
[0271] First solve the Laplace operator
[0272]
[0273] Where Δφ is the Laplace operator, n is the normal vector of the point cloud, and Ω is the spatial region of the point cloud. The solved scalar field φ represents the implicit surface of the point cloud, and the actual surface can be extracted through the zero isosurface φ=0.
[0274] Afterwards, the normal vector is estimated for each point.
[0275] Poisson's equation is solved by minimizing the energy function:
[0276]
[0277] Finally, numerical methods (such as the finite difference method) are used to solve the equations and obtain the scalar field φ.
[0278] The zero isosurface φ=0 is extracted to obtain the surface mesh.
[0279] After surface reconstruction, the surface of the point cloud is obtained (implicit surface or extracted triangular mesh). If the Poisson reconstruction method is used, an implicit surface is obtained and the mesh can be extracted through the isosurface.
[0280] Marching Cubes: Suitable for generating meshes through implicit surfaces (such as Poisson reconstruction). The Marching Cubes algorithm is based on a voxel grid and decides which triangles to generate by processing the values of the points within each voxel.
[0281] S2.5.3. Mesh optimization and post-processing
[0282] Laplacian smoothing is used to adjust the vertex coordinates so that they tend to the center of gravity of the neighborhood vertices. The formula is:
[0283]
[0284] Among them, v i is the position of vertex i, N(v i ) is the vertex v i neighborhood, λ is the smoothing coefficient.
[0285] S2.5.4. Texture Mapping and Rendering
[0286] After mesh optimization and post-processing, the generated mesh is mapped to Unity's 3D scene. The reflection intensity, color or other information in the point cloud data is mapped to the 3D mesh for texture mapping. Texture mapping can be achieved through UV coordinates, mapping the properties of the point cloud to the surface of the mesh.
[0287] S2.6: Get data:
[0288] S2.6.1 Extracting Geometry
[0289] The overall size of the forging is obtained through the bounding box, and the commonly used ones are axis-aligned bounding box (AABB) and oriented bounding box (OBB).
[0290] For all vertices V of the mesh, the size of the AABB is calculated as:
[0291] AABB min =min(V) and AABB max =max(V) (18)
[0292] The length, width, and height of the bounding box are:
[0293] L=AABB max [0]-AABB min [0] (19)
[0294] W=AABB max [1]-AABB min [1]
[0295] H=AABB max [2]-AABB min [2]
[0296] Then the minimum circumscribed sphere is used to represent the "maximum" size of the forging, and the Welzl algorithm is often used to solve it. The solution process of the minimum circumscribed sphere is:
[0297] 1). Randomly select a point as the center of the sphere and calculate the minimum radius.
[0298] 2). For each point, if the point is outside the current sphere, update the center and radius until all points are inside the sphere.
[0299] The mathematical description of this process is:
[0300] MinSphere(V)=(c,r) (20)
[0301] Where c is the center of the sphere and r is the radius of the sphere.
[0302] S2.6.2 Compute the convex hull of the point cloud
[0303] Use Graham scanning algorithm or QuickHull algorithm to calculate the convex hull of the point cloud. For the point set P = {v1,v2,...,v n}, the convex hull is the smallest convex polyhedron that encloses all points. The volume calculation formula of the convex hull is:
[0304]
[0305] Each tetrahedron consists of points v i ,v j ,v k and a reference point of the convex hull.
[0306] S2.6.3 Calculation of Maximum Diameter of Forgings
[0307] To extract the maximum diameter of a forging, we can calculate the maximum distance between two points in the mesh. Given two vertices v i =(x i ,y i ,z i ) and v j =(x j ,y j ,z j ), the Euclidean distance calculation formula is:
[0308]
[0309] The maximum diameter is the maximum distance between all pairs of vertices in the mesh, that is:
[0310]
[0311] The above are preferred embodiments of the present invention. A person skilled in the art may make various changes or improvements on this basis. Without departing from the general concept of the present invention, these changes or improvements should fall within the scope of protection required by the present invention.
Claims
1. A multi-radar shape and size detection method for the hot forming process of large forgings, characterized in that: The steps include: S1: Build the system S1.1: Configure the environment; S1.2: Develop PCL algorithm; S1.3: Visualize the point cloud data and display the visualization part on RVIZ; S1.4: Configure a multi-camera scanning system; S1.5: Install protective devices; S2: Processing forging point cloud data S2.1: Processing multi-frame point cloud data points; S2.2: Remove the occlusion of the point cloud data of the pancake forgings; S2.3: Point cloud data fusion of pancake forgings; S2.4: Processing redundant point cloud data; S2.5: 3D reconstruction of point cloud data; S2.6: Get data.