A method for detecting the center of gravity deviation of a train loading 3D model
The 3D model of train loading is generated by lidar, and the center of gravity offset rate is calculated using European algorithms and dimensionality reduction algorithms, which solves the problem of difficult control of center of gravity offset in train loading, and realizes accurate detection and stable loading process.
Patent Information
- Application Number
- CN202210510038.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-11
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-05-11
AI Technical Summary
The shift of the center of gravity when loading the existing trains is difficult to control in real time, and the detection error is large, which affects the stability of the loading and adjustment efficiency.
LiDAR is used to generate 3D models, and the car point cloud data is divided through European algorithms, and the car center point and center of gravity offset are calculated. The average height and center of gravity offset rate are calculated in combination with the dimensionality reduction algorithm to achieve accurate detection and visual monitoring.
It realizes accurate detection and real-time control of the center of gravity offset of the train loading center, reduces errors, and improves the stability and adjustment efficiency of the loading process.
Smart Images

Figure CN114724138B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of train loading, and relates to a method for detecting the center of gravity offset of a train loading 3D model. Background Art
[0002] When loading a train, the center of gravity of the carriage shifts due to the continuous increase of goods, which greatly affects the stability of the carriage. It is necessary to control the center of gravity shift during the loading process so that it can be adjusted according to the size of the center of gravity shift. The existing train center of gravity shift cannot be controlled in real time, and because there are many factors affecting the shift, the collected data cannot be effectively processed, resulting in deviations in the final results. The shift is not accurate enough, which brings inconvenience to subsequent adjustments. Summary of the invention
[0003] In view of the technical problems that the center of gravity offset of existing train loading is difficult to control and the detection error is large, the present invention provides a method and a detection device for detecting the center of gravity offset of a train loading 3D model, which uses a laser radar to generate a 3D model of train loading to detect the offset, and the offset is easy to control and the error is small.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is:
[0005] A method for detecting the center of gravity offset of a train loading 3D model comprises the following steps:
[0006] 1) The radar scans to obtain point cloud data and pre-processes the point cloud data in the track area;
[0007] 2) Use the Euclidean algorithm to cluster the point cloud data in the track area and distinguish each independent carriage;
[0008] 3) According to the clustering results, the center point of each car point cloud block is calculated for each car;
[0009] 4) According to the coordinates of the center point, select the point cloud whose center point is close to the center of the radar, and filter the carriage point cloud data to obtain the loading point cloud;
[0010] 5) Continue to use the dimensionality reduction algorithm to calculate the average height A of the carriage, calculate the center of gravity offset B, and generate the loading 3D model C;
[0011] 6) Visualize the loading based on the loading 3D model C, and judge the quality of the loading results based on the average height A and the center of gravity deviation B.
[0012] Furthermore, in step 2), the specific steps of the Euclidean algorithm are:
[0013] 1.1) Find any point p10 in the point cloud data space within the track area, use kdTree to find the n points closest to p10, p12, p13, p14...p1n, determine the distance between these n points and p10, and put the points p12, p13, p14... whose distance is less than the threshold r into class Q(p10);
[0014] 1.2) Find a point p12 in Q(p10) and repeat step 1.1);
[0015] 1.3) Continue to find a point p1n in Q(p10, p12), repeat step 1.1), and put all the points whose distance is less than the threshold r into Q(p10, p12, p1n);
[0016] 1.4) Repeat until the number of points in class Q remains unchanged, and the clustering is completed.
[0017] Furthermore, in step 3), a point cloud block whose center point x coordinate is between [-1, 1] is selected, and the center point of each car point cloud block is calculated.
[0018] Furthermore, in step 4), the process of filtering the carriage is:
[0019] 4.1) Divide the car point cloud data into n point cloud blocks with a width of w according to the z coordinate;
[0020] 4.2) For each current point in each point cloud, calculate the height difference h and plane distance d between the current point and any other point;
[0021] 4.3) Further calculate r = h / d based on the above results, and filter out the points with r>3.0;
[0022] 4.4) Repeat steps 4.2) and 4.3) for each segmented point cloud block, and the remaining point cloud is the loading point cloud.
[0023] Furthermore, in step 4.2), let the current point be p1 (x1, y1, z1) and any other point be p2 (x2, y2, z2), then the height difference is h = y2-y1, and the plane distance is
[0024] Furthermore, in step 5), the calculation process of the average height A is:
[0025] 5.a1) Calculate the minimum values Min(x), Min(y), and Min(z) in the x, y, and z directions of the point cloud respectively;
[0026] 5.a2) Select the characteristic scales in the x, y, and z directions. The x and z directions are scaled by the largest value in the x direction and the largest value in the z direction, respectively. The y direction is scaled by a relatively small value. The inverse of the scales in the x, y, and z directions is calculated as the scale factors λx, λy, and λz of each axis.
[0027] 5.a3) Calculate the eigenvalues of each point Pt(x, y, z) in the point cloud on each axis. The formula for the eigenvalues is as follows:
[0028] Vx=(Pt(x)-Min(x))×λx;
[0029] Vy=(Pt(y)-Min(y))×λy;
[0030] Vz=(Pt(z)-Min(z))×λz;
[0031] Where: Vx is the X-axis eigenvalue; Pt(x) is the x-coordinate of the point; λx is the x-direction scale factor, Min(x) is the minimum value of the entire point cloud in the x-axis direction, Vy is the Y-axis eigenvalue; Pt(y) is the y-coordinate of the point; λy is the y-direction scale factor, Min(y) is the minimum value of the entire point cloud in the y-axis direction; Vz is the Z-axis eigenvalue; Pt(z) is the z-coordinate of the point; λz is the z-direction scale factor, Min(z) is the minimum value of the entire point cloud in the z-axis direction;
[0032] 5.a4) The eigenvector value of each point is the sum of the axial eigenvectors of each point V = Vx + Vy + Vz;
[0033] 5.a5) sorting the point cloud according to the eigenvector values calculated in step 5.a4);
[0034] 5.a6) Count the number of point clouds with the same eigenvector, find the maximum value, and calculate the average height value of the point clouds with the same eigenvector, i.e., the average height Hav.
[0035] Furthermore, in step 5), the calculation process of the center of gravity deviation B is:
[0036] 5.b1) Calculate the center point of the loading point cloud, and use the x coordinate of the center point as the segmentation point to split it into two point clouds;
[0037] 5.b2) Divide the loading point cloud into evenly spaced 2m parts by x-coordinate. The distance between each point cloud is (Xmax-Xmin) / (2m-1), where Xmax is the maximum value of the point cloud on the x-axis and Xmin is the minimum value of the point cloud on the x-axis. Sort each point cloud by z-coordinate to obtain the sorted point cloud array Pt[n]. Calculate the area of the ordered point cloud in the yz plane. The calculation formula for area S is:
[0038] S=∑{(Pt(n+1).y+Pt(n).y)×(Pt(n+1).z-Pt(n).z)}÷2.0
[0039] Where: Pt(n+1).y represents the y coordinate of the n+1th point, Pt(n).y represents the y coordinate of the nth point, Pt(n+1).z represents the z coordinate of the n+1th point, and Pt(n).z represents the z coordinate of the nth point;
[0040] 5.b3) Calculate the volume of the polyhedron composed of two adjacent sections, sum the volumes of all sections, and calculate the total volume of the point cloud:
[0041] V=∑{(S(n+1)+S(n))×(Xmax-Xmin)÷(m-1)÷2};
[0042] Where: S(n+1) represents the area of the n+1th section; S(n) represents the area of the nth section;
[0043] 5.b4) The volumes of the two point clouds, the smaller one is Vmin, the larger one is Vmax, and the center of gravity offset ratio γ = Vmin ÷ Vmax.
[0044] Furthermore, in step 6), the degree of gravity center deviation B, that is, the gravity center deviation rate γ, tends to be between 0 and 1, and the closer B is to 1, the better the loading result.
[0045] The beneficial effects of the present invention are as follows: the present invention provides a method for detecting the center of gravity deviation of a train loading 3D model, by pre-processing the point cloud data, dividing the point cloud data in the track area into different carriage blocks through cluster analysis, filtering the carriage point cloud data located below the radar, retaining the loading material point cloud, and generating a 3D model for the loading material point cloud; extracting the average loading height through the height distribution in the loading point cloud data, dividing the loading point cloud into two front and rear point clouds through the center point, calculating the volume respectively, and obtaining the center of gravity deviation of the loading by calculating the volume ratio of the two front and rear point clouds, and the detection result is accurate. The present invention uses a radar to scan the loading site in real time, and the generated loading 3D model is real, the loading is visualized, and it is easy to monitor the loading, and the loading of bulk items is realized, and the device is simple. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A system diagram of the detection method provided by the present invention;
[0047] Figure 2 This is a schematic diagram of the Euclidean clustering method used in the present invention. DETAILED DESCRIPTION
[0048] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0049] Example 1
[0050] See also Figure 1 The method for detecting the center of gravity offset of a train loading 3D model provided by the present invention comprises the following steps:
[0051] 1) Obtain point cloud data through radar scanning and pre-process the point cloud data in the track area;
[0052] 2) Use the Euclidean algorithm to cluster the point cloud data in the track area and distinguish each independent carriage;
[0053] 3) According to the clustering results, the center point of each car point cloud block is calculated for each car;
[0054] 4) According to the coordinates of the center point, select the point cloud whose center point is close to the center of the radar, and filter the carriage point cloud data to obtain the loading point cloud;
[0055] 5) Use the dimensionality reduction algorithm to calculate the average height A of the carriage, calculate the center of gravity offset B, and generate a loading 3D model C;
[0056] 6) Visualize the loading center of gravity deviation based on the loading 3D model C, and judge the quality of the loading result based on the average height A and the center of gravity deviation B.
[0057] See also Figure 2 In step 2) of this embodiment, the Euclidean algorithm is used to divide the car point cloud on the track to distinguish each independent car; for Euclidean algorithm clustering, the distance judgment criterion is the Euclidean distance.
[0058] Specifically, the specific implementation process of the Euclidean algorithm is:
[0059] 1.1) Find any point p10 in the point cloud data space within the track area, use kdTree to find the n points closest to p10, p12, p13, p14...p1n, determine the distance between these n points and p10, and put the points p12, p13, p14... whose distance is less than the threshold r into class Q(p10);
[0060] 1.2) Find a point p12 in Q(p10) and repeat step 1.1);
[0061] 1.3) Continue to find a point p1n in Q(p10, p12), repeat step 1.1), and put all the points p22, p23, p24... whose distance is less than the threshold r into Q(p10, p12, p1n);
[0062] 1.4) Repeat until the number of points in class Q remains unchanged, and the clustering is completed.
[0063] In this embodiment, P10 is an arbitrary point in the point cloud data; Q(p10) is the set of points whose spatial distance to p10 is less than r when the search is first started; Q(p10, p12) is a set of points whose distance to p10 is less than r found in the point cloud data by randomly selecting a point p12 (excluding p10) from the set Q(10) generated after the first search is completed. The new set is named Q(p10, p12) to distinguish it from the previous set. P12, p13, p14, p22, etc. represent different points found each time.
[0064] In step 3) of this embodiment, point cloud blocks whose center point x coordinates are between [-1, 1] are selected, and the center point of each car point cloud block is calculated.
[0065] In step 4) of this embodiment, the center point of each carriage point cloud block is calculated, and the point cloud block with the center point x coordinate between [-1, 1] is selected to process the loading carriage point cloud, filter out the surrounding carriages, and only retain the loading surface point cloud of the coal in the carriage. The specific process of filtering the carriage is:
[0066] 4.1) Divide the car point cloud data into n point cloud blocks with a width of w according to the z coordinate;
[0067] 4.2) For each current point in each point cloud, calculate the height difference h and plane distance d between the current point and any other point;
[0068] 4.3) Further calculate r = h / d based on the above results, and filter out the points with r>3.0;
[0069] 4.4) Repeat steps 4.2) and 4.3) for each segmented point cloud block, and the remaining point cloud is the loading point cloud.
[0070] Furthermore, in step 4.2), the calculation of the height difference h and the plane distance d between two points is used for explanation.
[0071] Specifically, let the current point be p1(x1,y1,z1) and any other point be p2(x2,y2,z2), then the height difference is h=y2-y1, and the plane distance is
[0072] In step 5) of this embodiment, the feature value in the height direction is extracted from the point cloud of the loaded materials in the filtered carriage by a dimensionality reduction algorithm, and the average loading height A and the center of gravity deviation B are calculated by the distribution of the height values.
[0073] Specifically, the calculation process of the average height A is:
[0074] 5.a1) Calculate the minimum values Min(x), Min(y), and Min(z) in the x, y, and z directions of the point cloud respectively;
[0075] 5.a2) Select the characteristic scales in the x, y and z directions. The x and z directions are scaled by the largest value in the x direction and the largest value in the z direction respectively. The y direction is scaled by a relatively small value. The inverse of the scales in the x, y and z directions is taken as the scale factors λx, λy and λz of each axis. Since the loading height on site is generally within 1m, the scale in the y direction is selected as 0.1.
[0076] 5.a3) Calculate the eigenvalues of each point Pt(x, y, z) in the point cloud on each axis. The formula for the eigenvalues is as follows:
[0077] Vx=(Pt(x)-Min(x))×λx;
[0078] Vy=(Pt(y)-Min(y))×λy;
[0079] Vz=(Pt(z)-Min(z))×λz;
[0080] Where: Vx is the X-axis eigenvalue; Pt(x) is the x-coordinate of the point; λx is the x-direction scale factor, Min(x) is the minimum value of the entire point cloud in the x-axis direction, Vy is the Y-axis eigenvalue; Pt(y) is the y-coordinate of the point; λy is the y-direction scale factor, Min(y) is the minimum value of the entire point cloud in the y-axis direction; Vz is the Z-axis eigenvalue; Pt(z) is the z-coordinate of the point; λz is the z-direction scale factor, Min(z) is the minimum value of the entire point cloud in the z-axis direction;
[0081] 5.a4) The eigenvector value of each point is the sum of the axial eigenvectors of each point V = Vx + Vy + Vz;
[0082] 5.a5) sorting the point cloud according to the eigenvector values calculated in step 5.a4);
[0083] 5.a6) Count the number of point clouds with the same eigenvector, find the maximum value, and calculate the average height value of the point clouds with the same eigenvector, i.e., the average height Hav.
[0084] In step 5) of this embodiment, the calculation process of the center of gravity offset B is:
[0085] 5.b1) Calculate the center point of the loading point cloud, and use the x coordinate of the center point as the segmentation point to split it into two point clouds;
[0086] 5.b2) Divide the loading point cloud into evenly spaced 2m parts by x-coordinate. The distance between each point cloud is (Xmax-Xmin) / (2m-1), where Xmax is the maximum value of the point cloud on the x-axis and Xmin is the minimum value of the point cloud on the x-axis. Sort each point cloud by z-coordinate to obtain the sorted point cloud array Pt[n]. Calculate the area of the ordered point cloud in the yz plane. The calculation formula for area S is:
[0087] S=∑{(Pt(n+1).y+Pt(n).y)×(Pt(n+1).z-Pt(n).z)}÷2.0
[0088] Where: Pt(n+1).y represents the y coordinate of the n+1th point, Pt(n).y represents the y coordinate of the nth point, Pt(n+1).z represents the z coordinate of the n+1th point, and Pt(n).z represents the z coordinate of the nth point;
[0089] 5.b3) Calculate the volume of the polyhedron composed of two adjacent sections, sum the volumes of all sections, and calculate the total volume of the point cloud:
[0090] V=∑{(S(n+1)+S(n))×(Xmax-Xmin)÷(m-1)÷2};
[0091] Where: S(n+1) represents the area of the n+1th section; S(n) represents the area of the nth section;
[0092] 5.b4) The volume of the two point clouds, the smaller one is Vmin, the larger one is Vmax, and the center of gravity offset ratio γ = Vmin ÷ Vmax
[0093] In step 6), the center of gravity offset B, that is, the center of gravity offset rate γ, tends to 0-1, and the closer B is to 1, the better the effect; when judging the loading effect, A is a reference, and B plays an important or decisive role.
[0094] In step 5) of this embodiment, a 3D model is generated for the loading point cloud.
[0095] In this embodiment, generating a 3D model is a general method, the point cloud library is an existing method, and the 3D model is directly generated. The PCL point cloud library is a public library.
[0096] The detection method provided in this embodiment installs the radar at the middle top directly above the track, with the x-axis being the track direction, the y-axis being the vertical upward direction of the ground, and the xz plane being the ground. By using the z-coordinate, point clouds greater than or less than the fixed coordinates are excluded, thereby filtering out the point clouds on both sides of the track, and excluding point clouds greater than the fixed value of the y-coordinate, thereby filtering out the point clouds at the top, retaining the point cloud data within the track area, and being able to effectively perform denoising on the data to ensure the accuracy of the detection results. The detection method is used for the detection of the center of gravity offset of bulk goods loading, with high accuracy of the detection results, and the 3D model is used to visualize the loading process, truly reflecting the device site, and making it easy to monitor the loading process.
Claims
1. A method for detecting the center of gravity offset of a train loading 3D model, characterized in that: The following steps are involved: 1) The radar scans to obtain point cloud data and pre-processes the point cloud data in the track area; 2) Use the Euclidean algorithm to cluster the point cloud data in the track area and distinguish each independent carriage; 3) According to the clustering results, the center point of each car point cloud block is calculated for each car; 4) According to the coordinates of the center point, select the point cloud whose center point is close to the center of the radar, and filter the carriage point cloud data to obtain the loading point cloud; 5) Continue to use the dimensionality reduction algorithm to calculate the average height A of the carriage, calculate the center of gravity offset B, and generate the loading 3D model C; 6) Visualize the loading according to the loading 3D model C, and judge the quality of the loading results according to the average height A and the center of gravity deviation B; In step 4), the process of filtering the carriage is: 4.1) Divide the car point cloud data into n point cloud blocks with a width of w according to the z coordinate; 4.2) For each current point in each point cloud, calculate the height difference h and plane distance d between the current point and any other point; 4.3) Further calculate r = h / d based on the above results, and filter out the points with r>3.0; 4.4) Repeat steps 4.2) and 4.3) for each segmented point cloud block, and the remaining point cloud is the loading point cloud.
2. The method for detecting the center of gravity offset of a train loading 3D model according to claim 1, characterized in that: In step 2), the specific steps of the Euclidean algorithm are: 1.1) Find any point p10 in the point cloud data space within the track area, use kdTree to find the n points closest to p10, p12, p13, p14...p1n, determine the distance between these n points and p10, and put the points p12, p13, p14... whose distance is less than the threshold r into class Q(p10); 1.2) Find a point p12 in Q(p10) and repeat step 1.1); 1.3) Continue to find a point p1n in Q(p10, p12), repeat step 1.1), and put all the points whose distance is less than the threshold r into Q(p10, p12, p1n); 1.4) Repeat until the number of points in class Q remains unchanged, and the clustering is completed.
3. The method for detecting the center of gravity offset of a train loading 3D model according to claim 2, characterized in that: In the step 3), a point cloud block whose center point x coordinate is between [-1, 1] is selected, and the center point of each car point cloud block is calculated.
4. The method for detecting the center of gravity offset of a train loading 3D model according to claim 3, characterized in that: In step 4.2), let the current point be p1 (x1, y1, z1) and any other point be p2 (x2, y2, z2), then the height difference is h = y2-y1, and the plane distance is 5. The method for detecting the center of gravity offset of a train loading 3D model according to claim 4, characterized in that: In step 5), the calculation process of the average height A is: 5.a1) Calculate the minimum values Min(x), Min(y), and Min(z) in the x, y, and z directions of the point cloud respectively; 5.a2) Select the characteristic scales in the x, y, and z directions. The x and z directions are scaled by the largest value in the x direction and the largest value in the z direction respectively. The y direction is scaled by a relatively small value. The inverse of the scales in the x, y, and z directions is taken as the scale factors λx, λy, and λz of each axis. 5.a3) Calculate the eigenvalues of each point Pt(x, y, z) in the point cloud on each axis. The formula for the eigenvalues is as follows: Vx=(Pt(x)-Min(x))×λx; Vy=(Pt(y)-Min(y))×λy; Vz=(Pt(z)-Min(z))×λz; Where: Vx is the X-axis eigenvalue; Pt(x) is the x-coordinate of the point; λx is the x-direction scale factor, Min(x) is the minimum value of the entire point cloud in the x-axis direction, Vy is the Y-axis eigenvalue; Pt(y) is the y-coordinate of the point; λy is the y-direction scale factor, Min(y) is the minimum value of the entire point cloud in the y-axis direction; Vz is the Z-axis eigenvalue; Pt(z) is the z-coordinate of the point; λz is the z-direction scale factor, Min(z) is the minimum value of the entire point cloud in the z-axis direction; 5.a4) The eigenvector value of each point is the sum of the axial eigenvectors of each point V = Vx + Vy + Vz; 5.a5) sorting the point cloud according to the eigenvector values calculated in step 5.a4); 5.a6) Count the number of point clouds with the same eigenvector and find the average height value of the point clouds with the same eigenvector, i.e., the average height Hav.
6. The method for detecting the center of gravity offset of a train loading 3D model according to claim 5, characterized in that: In step 5), the calculation process of the center of gravity deviation B is: 5.b1) Calculate the center point of the loading point cloud, and use the x coordinate of the center point as the segmentation point to split it into two point clouds; 5.b2) Divide the loading point cloud into evenly spaced 2m parts by x-coordinate. The distance between each point cloud is (Xmax-Xmin) / (2m-1), where Xmax is the maximum value of the point cloud on the x-axis and Xmin is the minimum value of the point cloud on the x-axis. Sort each point cloud by z-coordinate to obtain the sorted point cloud array Pt[n]. Calculate the area of the ordered point cloud in the yz plane. The calculation formula for area S is: s=∑{(Pt(n+1).y+Pt(n).y)×(Pt(n+1).z-Pt(n).z)}÷2.0 Where: Pt(n+1).y represents the y coordinate of the n+1th point, Pt(n).y represents the y coordinate of the nth point, Pt(n+1).z represents the z coordinate of the n+1th point, and Pt(n).z represents the z coordinate of the nth point; 5.b3) Calculate the volume of the polyhedron composed of two adjacent sections, sum the volumes of all sections, and calculate the total volume of the point cloud: V=∑{(S(n+1)+S(n))×(Xmax-Xmin)÷(m-1)÷2}; Where: S(n+1) represents the area of the n+1th section; S(n) represents the area of the nth section; 5.b4) The volumes of the two point clouds, the smaller one is Vmin, the larger one is Vmax, and the center of gravity offset ratio γ = Vmin ÷ Vmax.
7. The method for detecting the center of gravity offset of a train loading 3D model according to claim 6, characterized in that: In the step 6), the center of gravity offset B is the center of gravity offset rate γ, and the range of B is 0 to 1, and the closer B is to 1, the better the loading result.
