Rail waist alignment method and system based on minimum dtw distance and terminal

CN116167983BActive Publication Date: 2026-10-27CHENGDU TANGYUAN ELECTRICAL APPLIANCE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310045121.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-30
Publication Date
2026-10-27
Estimated Expiration
2043-01-30

Smart Images

  • Figure CN116167983B_ABST
    Figure CN116167983B_ABST
Patent Text Reader

Abstract

The application discloses a rail waist alignment method and system based on minimum DTW distance, and a terminal, and relates to the technical field of track detection.The technical scheme is as follows:collecting rail profile point cloud data containing a rail waist and a rail head;determining two first feature points and fourth feature points at middle point positions, establishing a middle point straight line, and obtaining the angle of the middle point straight line;determining a rotation angle according to the angle difference between the middle point straight line and a standard straight line in a reference profile;rotating the rail profile to be aligned as a whole according to the rotation angle, and calculating translation parameters in the rotated rail profile;searching and adjusting the rail profile aligned for the first time by using a DTW method, analyzing the DTW distance between the rail profile adjusted by searching and the reference profile, and selecting the adjustment result with the minimum DTW distance as the profile alignment result.The application aligns by using rail waist data, and fine-tunes by searching after the first alignment, so that the alignment effect is more stable and accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of track inspection technology, and more specifically, to a method, system, and terminal for aligning rail webs based on minimum DTW distance. Background Technology

[0002] In rail transit, the safe operation of electrified railways is closely related to the performance optimization of rails. Under continuous operation without backup, rail wear is unavoidable. Timely detection and measurement of rail wear and related parameters to guide the development of rail grinding strategies or other maintenance strategies is an effective approach.

[0003] Current methods for detecting rail wear typically involve imaging the rail using structured light and extracting the rail profile point cloud data through image processing. Further, relevant parameters are calculated by aligning the acquired profile data with baseline profile data. Alignment is crucial in this process. Currently, most alignment methods utilize rail head information, which is relatively unstable and inaccurate because the rail head area is usually worn or compressed, resulting in varying degrees of deformation and significant alignment fluctuations.

[0004] Therefore, how to research and design a rail web alignment method, system, and terminal based on the minimum DTW distance that can overcome the above-mentioned defects is an urgent problem that we need to solve. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method, system, and terminal for aligning rail webs based on the minimum DTW distance. This method utilizes rail web data for alignment and performs fine-tuning through a search method after the initial alignment, resulting in a more stable and accurate alignment effect.

[0006] The above-mentioned technical objective of the present invention is achieved through the following technical solution:

[0007] Firstly, a rail web alignment method based on minimizing DTW distance is provided, including the following steps:

[0008] Collect rail profile point cloud data including rail web and rail head, and divide it into left-side data and right-side data after segmentation;

[0009] Based on the data on the left and right sides after segmentation, determine the first and fourth feature points located at the middle point, and establish the midpoint line based on the first and fourth feature points, as well as analyze and obtain the angle of the midpoint line;

[0010] The rotation angle is determined based on the angle difference between the midpoint line and the corresponding standard line in the baseline profile.

[0011] The rail profile to be aligned is rotated as a whole according to the rotation angle, and the translation parameters are calculated based on the first or fourth feature point in the rotated rail profile.

[0012] The DTW method is used to search and adjust the initially aligned rail profile, and the DTW distance between the adjusted rail profile and the reference profile is analyzed. The adjustment result with the smallest DTW distance is selected as the profile alignment result.

[0013] Furthermore, the left-side data and the right-side data after segmentation are formed by removing the rail top data from the rail profile point cloud data.

[0014] Furthermore, the process of determining the first feature point is as follows:

[0015] Calculate the distance between any two points in the left and right data after the split;

[0016] The midpoint between the two feature points with the smallest distance is taken as the first feature point.

[0017] Furthermore, the process of determining the fourth feature point is as follows:

[0018] Obtain the radius of the arc at the lower part of the rail web;

[0019] Draw a circle with each data point in the split data on the left and right sides as the center and the radius of the arc as the radius.

[0020] Select the set of intersection points with the highest distribution density of circular intersection points within a preset radius for the left and right rail waists respectively;

[0021] The average value of all intersection points in the intersection set of the left rail waist is taken as the second feature point, and the average value of all intersection points in the intersection set of the right rail waist is taken as the third feature point.

[0022] The midpoint between the second and third feature points is taken as the fourth feature point.

[0023] Furthermore, the process of obtaining the angle of the midpoint line is as follows:

[0024] Calculate the slope of the midpoint line based on the first and fourth feature points;

[0025] The angle of the midpoint line is obtained by solving the arctangent of the slope value.

[0026] Furthermore, the translation parameters include lateral translation and longitudinal translation;

[0027] The lateral translation amount is the difference in the abscissa of the first feature point corresponding to the rail profile to be aligned and the reference profile;

[0028] The longitudinal translation amount is the difference in the ordinate of the first feature point corresponding to the rail profile to be aligned and the reference profile.

[0029] Furthermore, the process of using the DTW method to search and adjust the initially aligned rail profile specifically involves:

[0030] Set the angle search range and step size;

[0031] The initially aligned rail profile is rotated again based on the angle search range and step size.

[0032] After rotation, the translation parameters are calculated to obtain the adjusted profile data.

[0033] Furthermore, the specific formula for calculating the DTW distance is as follows:

[0034]

[0035] DTW k =γ(I,J)

[0036] Where γ(i,j) represents the cumulative distance; D represents k The i-th point in the reference profile and the j-th point Norm j Euclidean distance; DTW k Represents the DTW distance at the k-th iteration; I and J represent D... k The total number of points in the Norm.

[0037] Secondly, a rail web alignment system based on minimum DTW distance is provided, including:

[0038] The data acquisition module is used to collect point cloud data of the rail profile, including the rail web and rail head, and divides it into left-side data and right-side data after segmentation.

[0039] The midpoint analysis module is used to determine the first and fourth feature points, which are located at the middle point, based on the left and right data after segmentation. It also establishes the midpoint line based on the first and fourth feature points and analyzes the angle of the midpoint line.

[0040] The angle analysis module is used to determine the rotation angle based on the angle difference between the midpoint line and the corresponding standard line in the baseline profile.

[0041] The translation analysis module is used to rotate the rail profile to be aligned as a whole according to the rotation angle, and calculate the translation parameters in the rotated rail profile based on the first feature point or the fourth feature point.

[0042] The alignment analysis module is used to search and adjust the initially aligned rail profile using the DTW method, analyze the DTW distance between the adjusted rail profile and the reference profile, and select the adjustment result with the smallest DTW distance as the profile alignment result.

[0043] Thirdly, a computer terminal is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the rail web alignment method based on the minimum DTW distance as described in any one of the first aspects.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] 1. The rail web alignment method based on the minimum DTW distance proposed in this invention addresses the issue that the profile data collected from the rail head is usually deformed due to wear and other reasons, while the rail web data is more stable. Aligning the rail web with the reference profile is more stable and accurate than using the rail head data. Furthermore, after the initial alignment, fine-tuning is performed through a search method to further stabilize and improve the alignment effect.

[0046] 2. In this invention, the midpoint of the two feature points with the smallest distance between the left and right data after segmentation is used as the first feature point. This feature point is more stable and easier to detect than other feature points.

[0047] 3. This invention extracts the second and third feature points by finding the intersection of concentric circles, making the feature point extraction more stable, faster and more accurate. Attached Figure Description

[0048] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:

[0049] Figure 1 This is a flowchart from an embodiment of the present invention;

[0050] Figure 2 This is a schematic diagram of the rail profile point cloud data in an embodiment of the present invention;

[0051] Figure 3 This is a schematic diagram of the rail profile point cloud data after the rail top falls off according to an embodiment of the present invention;

[0052] Figure 4 This is a schematic diagram of the first feature point in an embodiment of the present invention;

[0053] Figure 5 This is a schematic diagram showing the features of the lower arc of the rail web in an embodiment of the present invention;

[0054] Figure 6 This is a schematic diagram of the second and third feature points in an embodiment of the present invention;

[0055] Figure 7 This is a system block diagram in an embodiment of the present invention. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of this invention are only for explaining this invention and are not intended to limit this invention.

[0057] Example 1: Rail web alignment method based on minimum DTW distance, such as Figure 1 As shown, it includes the following steps:

[0058] S1: Collect rail profile point cloud data including rail web and rail head, and divide it into left-side data and right-side data after segmentation;

[0059] S2: Based on the left and right data after segmentation, determine the first and fourth feature points located at the middle point, and establish the midpoint line based on the first and fourth feature points, and analyze the angle of the midpoint line.

[0060] S3: Determine the rotation angle based on the angle difference between the midpoint line and the corresponding standard line in the reference profile;

[0061] S4: Rotate the rail profile to be aligned as a whole according to the rotation angle, and calculate the translation parameters in the rotated rail profile based on the first feature point or the fourth feature point.

[0062] S5: Use the DTW method to search and adjust the initially aligned rail profile, analyze the DTW distance between the adjusted rail profile and the reference profile, and select the adjustment result with the smallest DTW distance as the profile alignment result.

[0063] I. First Feature Point Detection

[0064] like Figure 2 and Figure 3 As shown, after collecting the rail profile point cloud data including the rail web and rail head, the rail top data is removed first to facilitate subsequent calculations.

[0065] The rail profile point cloud data is divided into two parts, usually by dividing the data equally, i.e.:

[0066] D = [d0 d1…d n …d N-1 ]

[0067] DL =[d0…d N / 2 ]

[0068] D R =[d N / 2+1 …d N-1 ]

[0069] Where D represents the rail profile point cloud data after removing the rail top, d n =(x n y n (x) represents the nth point in the data. n y n ) represents the x and y coordinates of a point, D L D represents the data on the left side after splitting. R This represents the data on the right after the segmentation.

[0070] Then, calculate the distance between each point in the left and right data pairs. The midpoint between the two points with the smallest distance is the first feature point, i.e.:

[0071]

[0072]

[0073]

[0074] in, These represent the coordinates of the two closest points in the data on either side. This represents the x-coordinate of the i-th point in the left-hand data. This represents the y-coordinate of the i-th point in the left-hand data. This represents the x-coordinate of the j-th point in the left-hand data. This represents the y-coordinate of the j-th point in the left-hand data. These represent the x and y coordinates of the first feature point, respectively. The first feature point is shown below. Figure 4 As shown.

[0075] II. Detection of Second and Third Feature Points

[0076] like Figure 5 As shown, there is usually an arc with a radius of r at the lower part of the rail web in the rail profile.

[0077] Taking the detection of the second feature point as an example, starting from the data point at the bottom of the left side rail, draw a circle with each data point as the center and r as the radius. Two consecutive circles will inevitably intersect. The average coordinate of the nearest intersection point on the outer side of the rail is taken as the second feature point.

[0078]

[0079] Among them, ui Let U(■) represent the intersection point of the outer sides of the orbital legs of the i-th circle and the (i-1)-th circle, and let U(■) represent the operator for finding the intersection point of the two circles. Indicated by point A circle with center r and radius r.

[0080] make

[0081]

[0082] Among them, Cnt(u i (z) indicates that the calculation is performed at the intersection point u. i v represents the number of all circular intersections within a radius z, and v represents the set of all circular intersections at the point with the largest number of intersections.

[0083] Finally, the second feature point can be obtained by calculating the mean of v, that is:

[0084]

[0085] The coordinates of the second feature point are represented by , and mean(■) represents the mean operator.

[0086] Similarly, the third feature point can be obtained by drawing circles from the right side and calculating the average of the intersection points. like Figure 6 As shown.

[0087] III. Calculate the rotation and translation parameters and perform the initial rotation and translation.

[0088] First, calculate the midpoint between the second and third feature points, and denote it as the fourth feature point, i.e.:

[0089]

[0090]

[0091] A midpoint line is determined by the first and fourth feature points, and its angle is:

[0092]

[0093] The angle of the midpoint line in the baseline profile can be determined manually and denoted as θ. Norm Therefore, the rotation angle θ can be obtained by the following formula:

[0094] θ=θ Norm -θ D .

[0095] First, rotate the rail profile to be aligned by a rotation angle θ. Then, use the first feature point to calculate the translation parameters in the rotated profile.

[0096]

[0097]

[0098] Among them, t x , t y These represent the lateral translation and the longitudinal translation, respectively. These represent the x-coordinate and y-coordinate of the first feature point in the baseline profile, respectively.

[0099] IV. Rotation and Translation Fine-tuning Based on DTW

[0100] Since a single translation or rotation may not achieve precise alignment, fine-tuning is performed through a search method. The criterion for fine-tuning is minimizing the DTW distance, and each fine-tuning is based on the initial alignment, not on the previous fine-tuning. DTW is a dynamic time warping method.

[0101] First, define the angle search range and step size, which can be expressed as:

[0102] During the k-th fine-tuning, through The initially aligned silhouette is rotated again, and then translated using the previously calculated translation method. The resulting silhouette data is denoted as D. k .

[0103] Calculate the DTW distance between the adjusted silhouette and the baseline silhouette at this point, i.e.:

[0104]

[0105] DTW k =γ(I,J)

[0106] Where γ(i,j) represents the cumulative distance. D represents k The i-th point in the reference profile and the j-th point Norm j European distance, DTW k Let I and J represent the DTW distance at the k-th iteration, respectively. k The total number of points in the Norm.

[0107] For all After calculating the DTW distance, the fine-tuning result corresponding to the minimum DTW is selected as the profile alignment output, i.e.:

[0108] D * =argmin k DTW k .

[0109] Example 2: A rail web alignment system based on the minimum DTW distance, which is used to implement the rail web alignment method described in Example 1, such as... Figure 7 As shown, it includes a data acquisition module, a midpoint analysis module, an angle analysis module, a translation analysis module, and an alignment analysis module.

[0110] The system comprises the following modules: a data acquisition module for collecting point cloud data of the rail profile, including the rail web and rail head, and dividing it into left-side and right-side data after segmentation; a midpoint analysis module for determining two midpoint feature points, a first feature point and a fourth feature point, based on the left-side and right-side data, establishing a midpoint line based on the first and fourth feature points, and analyzing the angle of the midpoint line; an angle analysis module for determining the rotation angle based on the angle difference between the midpoint line and the corresponding standard line in the reference profile; a translation analysis module for rotating the rail profile to be aligned based on the rotation angle, calculating the translation parameters based on the first or fourth feature point in the rotated rail profile; and an alignment analysis module for searching and adjusting the initially aligned rail profile using the DTW method, analyzing the DTW distance between the adjusted rail profile and the reference profile, and selecting the adjustment result with the smallest DTW distance as the profile alignment result.

[0111] Working Principle: Due to wear and other reasons, the profile data collected from the rail head is usually deformed, while the rail web data is more stable. This invention uses the rail web to align with the reference profile, which is more stable and accurate than aligning using rail head data. After the initial alignment, fine-tuning is performed through a search method to further stabilize and improve the alignment effect. In addition, this invention uses the midpoint of the two feature points with the smallest distance between the left and right data after segmentation as the first feature point. This feature point is more stable and easier to detect than other feature points. Furthermore, this invention extracts the second and third feature points by finding the intersection of concentric circles, making feature point extraction more stable, faster, and more accurate.

[0112] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0113] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0115] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0116] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A rail web alignment method based on minimum DTW distance, characterized by: Includes the following steps: Collect rail profile point cloud data including rail web and rail head, and divide it into left-side data and right-side data after segmentation; Based on the data from the left and right sides after segmentation, two feature points, the first and fourth, located at the midpoint, are determined. A midpoint line is then established based on these two feature points, and the angle of this line is analyzed. The specific process for determining the first feature point is as follows: Calculate the distance between any two points in the left and right data after the split; The midpoint between the two feature points with the smallest distance is taken as the first feature point; The process for determining the fourth feature point is as follows: Obtain the radius of the arc at the lower part of the rail web; Draw a circle with each data point in the split data on the left and right sides as the center and the radius of the arc as the radius. Select the set of intersection points with the highest distribution density of circular intersection points within a preset radius for the left and right rail waists respectively; The average value of all intersection points in the intersection set of the left rail waist is taken as the second feature point, and the average value of all intersection points in the intersection set of the right rail waist is taken as the third feature point. The midpoint between the second and third feature points is taken as the fourth feature point; The rotation angle is determined based on the angle difference between the midpoint line and the corresponding standard line in the baseline profile. The rail profile to be aligned is rotated as a whole according to the rotation angle, and the translation parameters are calculated based on the first or fourth feature point in the rotated rail profile. The DTW method is used to search and adjust the initially aligned rail profile, and the DTW distance between the adjusted rail profile and the reference profile is analyzed. The adjustment result with the smallest DTW distance is selected as the profile alignment result.

2. The rail web alignment method based on minimum DTW distance according to claim 1, characterized in that, The left and right data after segmentation are formed by removing the rail top data from the rail profile point cloud data.

3. The rail web alignment method based on minimum DTW distance according to claim 1, characterized in that, The process of obtaining the angle of the midpoint line is as follows: Calculate the slope of the midpoint line based on the first and fourth feature points; The angle of the midpoint line is obtained by solving the arctangent of the slope value.

4. The rail web alignment method based on minimum DTW distance according to claim 1, characterized in that, The translation parameters include lateral translation and longitudinal translation; The lateral translation amount is the difference in the abscissa of the first feature point corresponding to the rail profile to be aligned and the reference profile; The longitudinal translation amount is the difference in the ordinate of the first feature point corresponding to the rail profile to be aligned and the reference profile.

5. The rail web alignment method based on minimum DTW distance according to claim 1, characterized in that, The process of using the DTW method to search and adjust the initially aligned rail profile is as follows: Set the angle search range and step size; The initially aligned rail profile is rotated again based on the angle search range and step size. After rotation, the translation parameters are calculated to obtain the adjusted profile data.

6. The rail web alignment method based on minimum DTW distance according to any one of claims 1-5, characterized in that, The specific formula for calculating the DTW distance is as follows: ; ; in, Indicates cumulative distance; express The Middle The point and the baseline profile of the first point Points Euclidean distance; Indicates the first The DTW distance; They represent and The total number of points in the array.

7. A rail web alignment system based on minimum DTW distance, applied to the rail web alignment method based on minimum DTW distance as described in any one of claims 1-6, characterized in that, include: The data acquisition module is used to collect point cloud data of the rail profile, including the rail web and rail head, and divides it into left-side data and right-side data after segmentation. The midpoint analysis module is used to determine the first and fourth feature points located at the middle point based on the left and right data after segmentation, and to establish the midpoint line based on the first and fourth feature points, as well as to analyze and obtain the angle of the midpoint line. The angle analysis module is used to determine the rotation angle based on the angle difference between the midpoint line and the corresponding standard line in the baseline profile. The translation analysis module is used to rotate the rail profile to be aligned as a whole according to the rotation angle, and calculate the translation parameters in the rotated rail profile based on the first feature point or the fourth feature point. The alignment analysis module is used to search and adjust the initially aligned rail profile using the DTW method, analyze the DTW distance between the adjusted rail profile and the reference profile, and select the adjustment result with the smallest DTW distance as the profile alignment result.

8. A computer terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the rail web alignment method based on the minimum DTW distance as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Steel rail contour automatic matching method and device based on linear structured light

    CN115311481A