A method for rail flatness detection and grinding analysis
Patent Information
- Application Number
- CN202611127330.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-30
AI Technical Summary
[0008]本发明提出一种钢轨平直度检测与打磨分析方法,解决了现有技术中的便携式测量装置缺乏智能数据分析能力、无法为打磨作业提供定量化指导等问题
(1)本发明通过基准校正消除测量装置放置姿态引入的安装偏置和倾斜误差,再基于校正后的数据自动计算平直度值并识别超限区域、生成打磨建议,构建了从数据采集到打磨指导的全自动化流程,全程无需人工读数与主观判断,检测结果的客观性、一致性和可重复性显著提升,同时为现场打磨作业提供了定量化的施工依据。
Smart Images

Figure CN123007618A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rail inspection technology, and in particular to a method for rail straightness detection and grinding analysis. Background Technology
[0002] Rails are a fundamental component of railway transportation, and their straightness (flatness) directly affects the smoothness, safety, and passenger comfort of train operation. During railway construction and maintenance, the straightness of rail welded joints must be precisely inspected to ensure a smooth transition between the joint area and the base material, preventing wheel-rail impacts, track structure damage, and even traffic accidents caused by uneven joints.
[0003] Currently, the main methods for measuring rail straightness are as follows: (1) Manual measurement method: The operator uses a 1m standard straightedge to measure the maximum gap between the straightedge and the rail surface, along with a feeler gauge. This method relies entirely on manual operation, and the measurement accuracy is greatly affected by human factors. The readings of different operators may vary greatly. Moreover, it can only obtain the gap value of individual points and cannot quantify the continuous contour data of the entire joint area, resulting in limited information. At the same time, the measurement efficiency is low and the labor intensity is high, making it unsuitable for large-scale inspection operations.
[0004] (2) Fixed measuring table: A special measuring table is installed at the welding base or fixed inspection station, and the steel rail is transported to the measuring station for inspection via roller conveyor. This type of equipment is bulky, expensive and immovable, and is only suitable for factory inspection at the welding base, and cannot meet the online inspection needs after on-site welding operations.
[0005] (3) Image or vision-based measurement scheme: The surface of the rail is photographed using an industrial camera, and the contour of the weld area is analyzed by image processing algorithms. This type of method is sensitive to ambient lighting conditions and has poor stability in complex outdoor lighting environments; in addition, the image processing algorithm has a large computational load and real-time performance is difficult to guarantee; camera calibration and maintenance are also relatively complex.
[0006] In addition, although existing portable electronic measuring devices have achieved digital readings, their functions are still limited to the data acquisition level and lack the ability to deeply analyze the measurement data. For example, they cannot automatically identify the areas that need to be polished and generate quantitative polishing suggestions, making it difficult to provide accurate construction guidance for subsequent polishing operations.
[0007] In summary, existing technologies suffer from drawbacks such as reliance on manual measurement accuracy, lack of equipment mobility, poor environmental adaptability, and a lack of intelligent data analysis capabilities. Therefore, there is an urgent need for a high-precision rail straightness measurement solution with intelligent data processing capabilities. Summary of the Invention
[0008] This invention proposes a method for detecting and analyzing the straightness of rails during grinding, which solves the problems of existing portable measuring devices lacking intelligent data analysis capabilities and being unable to provide quantitative guidance for grinding operations.
[0009] The technical solution of this invention is implemented as follows: This invention provides a method for detecting and analyzing the straightness of rails through grinding, comprising the following steps: Step S1: Obtain the displacement data sequence collected by the measuring device at equal intervals along the longitudinal direction of the rail; Step S2: Perform a baseline correction on the displacement data sequence, the baseline correction including: Using the displacement value of the first sampling point of the data sequence as a reference, the displacement values of all sampling points are subtracted from the displacement value of the first sampling point to achieve zeroing at the beginning of the data sequence; Then, using the displacement value of the last sampling point of the data sequence as a reference, the displacement values of each intermediate sampling point are rotated and compensated according to the linear interpolation method to realize the zeroing of the end of the data sequence, so as to eliminate the installation offset and tilt error generated when the measuring device is placed on the rail. Step S3: Calculate the rail straightness value based on the corrected data sequence, identify the areas that need to be ground according to the user-set over-limit threshold, and generate grinding suggestions.
[0010] Preferably, before performing a reference correction, the method further includes a curvature compensation correction step for the displacement data sequence: When the rail being measured is located on a curved section, the curvature of the rail itself will introduce systematic geometric deviations into the displacement data. Each sampling point is corrected one by one according to the radius of the rail curve. For the For each sampling point, first calculate the horizontal distance from that sampling point to the midpoint of the sensor's motion path: ; in, For the first The horizontal distance from each sampling point to the midpoint of the sensor's movement path; This represents the total number of sampling points measured by the measuring device in a single measurement. The sensor is mounted with respect to the midpoint of its travel distance. Then, based on the curve radius of the rail... Calculate the correction value for this sampling point: ; in, For the first Correction value for each sampling point; Calculate the corrected displacement data based on the correction values: ; in, For the first Displacement data corrected for each sampling point For the first The original displacement data of each sampling point.
[0011] Preferably, before performing a reference correction, the displacement data sequence is further subjected to a smoothing filter process: A sliding filter algorithm is used to smooth the displacement data sequence. For the first... Each sampling point is used as the center to take samples before and after it. A filter window is formed by 10 points, and the arithmetic mean of all data points within the window is used as the filtering result for that point: Sliding filters are used to remove noise components introduced by sensor electrical noise, mechanical vibration noise, and rail surface micro-roughness.
[0012] Specifically, in step S2, using the displacement value of the first sampling point in the data sequence as a reference, the displacement values of all sampling points are subtracted from the displacement value of the first sampling point, specifically: ; in, For the translation of the first Displacement data of each sampling point For the first Filtered displacement data from each sampling point This represents the displacement value of the first sampling point in the filtered data sequence; The displacement values of each intermediate sampling point are rotated and compensated using linear interpolation, specifically as follows: ; in, After translation and rotation, the first Displacement data of each sampling point This represents the displacement value of the sampling point at the end of the translated data sequence. This represents the total number of sampling points in a single measurement.
[0013] Preferably, after performing the first reference correction, the method further includes a step of performing a second reference correction on the rotated data sequence according to the reference method selected by the user. The reference method includes the two-endpoint method and the top alignment method. The secondary benchmark correction method based on the two-endpoint method is as follows: the data sequence after translation and rotation is directly used as the final correction result, that is, the benchmark line is determined by the sampling points at the beginning and end. The secondary reference correction method based on top alignment is as follows: Based on the data sequence after translation and rotation, enumerate multiple reference line directions, calculate the envelope width under each reference line direction, select the reference line direction with the smallest envelope width as the optimal reference direction, and align the upper envelope to the zero position. The envelope is the region between the upper and lower envelopes of the data sequence. The upper envelope is the envelope formed by the maximum positive offset of each sampling point in the data sequence relative to the reference line, and the lower envelope is the envelope formed by the maximum negative offset of each sampling point in the data sequence relative to the reference line.
[0014] Specifically, step S3 includes the following steps: From the corrected data sequence Find the maximum value in and minimum value , The rail straightness value is the total number of sampling points in a single measurement. ; User-defined over-limit threshold Compare with the data sequence to find all intervals of continuous sampling points that satisfy the following formula: ; in, For the first The final displacement data of each sampling point after benchmark correction; Mark all consecutive sampling point intervals as candidate polishing areas.
[0015] Furthermore, for adjacent candidate polishing areas, when the distance between the two areas is less than a preset first threshold, the two areas are merged into one polishing area to avoid the same continuous protrusion area being divided into multiple independent areas due to local noise points. For grinding areas whose width after merging is less than the preset second threshold, they are filtered out to remove the interference of tiny local burrs on the grinding judgment. Each finalized polishing area is output in text format, indicating the starting position, area width, and polishing depth of each area; the starting position is the distance between the first sampling point of the polishing area and the measurement starting point, the area width is the distance converted from the number of consecutive sampling points contained in the polishing area, and the polishing depth is the maximum protrusion height among all sampling points in the polishing area.
[0016] Preferably, when the length of the rail to be measured exceeds the single measurement length of the measuring device, step S1 includes the following steps: Step S11: The measuring device performs multiple measurements along the longitudinal direction of the rail. Each measurement yields a set of displacement data sequences, and a preset length of overlap is maintained between adjacent measurements. Step S12: For two adjacent measurement data segments, take the first segment as the reference segment and the second segment as the segment to be registered, and extract the overlapping area in the two measurement data segments; Step S13: Remove a predetermined number of sampling points from both ends of the overlapping region to obtain the effective overlapping region; Step S14: Using the effective overlapping area as the registration basis, calculate the linear transformation parameters of the second segment of data relative to the first segment of data, and correct all the data of the second segment according to the linear transformation parameters; Step S15: Within the overlapping region, the two data segments are weighted and fused using a linear weighting gradient method to obtain the fused overlapping region data; Step S16: Combine the first non-overlapping data segment, the fused overlapping data segment, and the second non-overlapping data segment in order of their physical locations to form a complete displacement data sequence.
[0017] Specifically, step S14 includes the following steps: The optimal rotation coefficients are obtained using the linear least squares method. and offset To minimize the sum of squared differences between two data segments within the effective overlapping region: ; in, The reference segment is the first one within the effective overlapping area. Displacement data of each sampling point The segment to be registered corresponds to the first segment within the effective overlap region. Displacement data of each sampling point This represents the total number of data points in the effective overlapping area. Perform linear transformation correction on all data of the segment to be registered using the following formula: ; in, For the entire region of the corrected registration segment, the first... Displacement data of each sampling point The first [section] within the entire region to be registered before correction Displacement data of each sampling point; rotation coefficient Used to compensate for tilt deviation caused by the difference in the placement angle of the measuring device between two measurement sections; offset Used to compensate for the overall height offset caused by the difference in the placement height of the measuring device between two measurement sections.
[0018] Specifically, in step S15, the weighted fusion method is as follows: Within the effective overlapping region, the weight of the first segment of data is calculated from the beginning to the end of the overlapping region. The weights of the second segment of data decrease linearly from 1 to 0. The number of steps increases linearly from 0 to 1. The fusion result of the displacement data of each sampling point is: ; , ; in, The first in the effective overlapping region after weighted fusion Displacement data of each sampling point; The reference segment is the first one within the effective overlapping area. Displacement data of each sampling point For the corrected second segment of data within the effective overlap region, the first... Displacement data of each sampling point This represents the total number of data points in the effective overlapping area.
[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) This invention eliminates the installation offset and tilt error introduced by the placement posture of the measuring device through benchmark correction, and then automatically calculates the flatness value based on the corrected data, identifies the over-limit area, and generates grinding suggestions. It constructs a fully automated process from data acquisition to grinding guidance. No manual reading or subjective judgment is required throughout the process. The objectivity, consistency and repeatability of the test results are significantly improved, and at the same time, it provides a quantitative construction basis for on-site grinding operations.
[0020] (2) By introducing curvature compensation correction, the present invention calculates the geometric deviation introduced by the bending arc of the rail itself according to the curve radius and the sampling point position and deducts it from the original data, effectively eliminating the systematic error in the measurement of curved sections, so that the same set of detection methods can be applied to both straight and curved line conditions at the same time.
[0021] (3) By merging adjacent candidate grinding areas and filtering small areas, and outputting the position, width and depth information of each area, the present invention achieves accurate positioning and quantitative description of grinding areas, avoids misjudgment caused by local noise, provides accurate construction guidance for on-site grinding operations, and effectively reduces the blindness of grinding and material waste.
[0022] (4) The present invention uses a multi-segment splicing measurement method to set up an overlapping area between adjacent measurement segments, and uses the effective overlapping area as the registration basis to solve the linear transformation parameters and perform weighted fusion to splice multiple data segments into a complete displacement data sequence. This breaks through the physical limitation of the length of a single measurement and achieves continuous detection coverage of rails of arbitrary length without reducing the measurement accuracy. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating a method for detecting and grinding the straightness of rails according to the present invention.
[0025] Figure 2 This is a schematic diagram illustrating the overlapping relationship of multiple segments in an embodiment of the present invention. Detailed Implementation
[0026] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0027] Reference Figure 1 The first aspect of this invention provides a method for detecting and analyzing the straightness of rails through grinding, comprising the following steps: Before the measurement begins, the smart terminal searches for and connects to the measuring device via the BLE protocol. The user configures the measurement parameters on the smart terminal's interface, including: line name, mileage marker, rail direction (left / right), measurement surface type (driving surface / guide surface), and curve radius (required when the rail is located on a curve). After configuration, these parameters are saved as metadata in the measurement record.
[0028] After configuration, the user clicks the "Measure" button on the smart terminal, which then sends a single measurement command to the measuring device via BLE. Upon receiving the command, the main control unit of the measuring device controls a stepper motor to drive the laser displacement sensor to move at a constant speed for 1000mm along the longitudinal direction of the rail, starting from the initial position. During this movement, the laser displacement sensor continuously samples at 1mm intervals, acquiring one displacement data point at each sampling point with a resolution of 1μm. A total of 1000 sampling points are collected throughout the entire movement, covering a 1-meter length of the rail surface.
[0029] After data acquisition, the main control unit of the measuring device packages 1000 raw displacement data points into data frames according to a custom binary protocol. The Bluetooth communication module of the smart terminal receives the data frames and parses them frame by frame: combining every 2 bytes from the 2000 bytes of data into a sample value, and converting it into a floating-point number in millimeters according to the following formula: ; The final result is the original displacement data sequence containing 1000 data points. .
[0030] in, It represents the high 8 bytes of each sample value (the first byte of every two bytes in the data frame). This represents the lower 8 bits of each sampled value (the byte following every two bytes in the data frame); " is the left shift operator, This means shifting the entire binary representation of the highByte byte 8 bits to the left. " is the bitwise OR operator, which means that the left-shifted highByte and lowByte are combined bit by bit to form a complete 16-bit integer; The value is the converted displacement, in mm.
[0031] Through Bluetooth communication and data acquisition, the measuring device automatically completes a 1000mm scan and acquisition process (requiring 8-15 seconds). The data is transmitted back to the smart terminal in real time via BLE, realizing wireless data transmission between the portable measuring device and the smart terminal. It is easy to operate and responds quickly.
[0032] Step S1: Obtain the displacement data sequence collected by the measuring device along the longitudinal direction of the rail at equal intervals. The displacement data sequence includes the displacement values of multiple sampling points distributed at equal intervals along the longitudinal direction of the rail, and each sampling point corresponds to a different measurement position.
[0033] In this embodiment, the total number of sampling points for a single measurement by the measuring device is 1000, the spacing between adjacent sampling points is 1mm, and the length of the rail covered by a single measurement is 1000mm.
[0034] Step S2: Perform curvature compensation correction on the displacement data sequence: When the measured rail is located on a curve, the rail's own curvature introduces a systematic geometric deviation into the displacement data. Each sampling point is corrected individually based on the rail curve radius. For the rail running surface (rail top surface), a vertical curve correction is used; for the rail guide surface (rail side surface), a horizontal curve correction is used. The specific correction methods are as follows: For the sampling points ( First, calculate the horizontal distance from the sampling point to the midpoint of the sensor's travel distance: ; in, For the first The horizontal distance from each sampling point to the midpoint of the sensor's movement path; The total number of sampling points measured by the measuring device in a single measurement (in this embodiment, ), The sensor's mounting offset relative to the midpoint of its travel is expressed in mm. Then, based on the curve radius of the rail... (Unit: mm) Calculate the correction value for this sampling point: ; in, For the first Correction value for each sampling point; Calculate the corrected displacement data based on the correction values: ; in, For the first Displacement data corrected for each sampling point For the first The original displacement data of each sampling point.
[0035] By subtracting the calculated correction value from the original data through the curvature compensation correction, the data after eliminating the geometric deviation of the curve can be obtained, ensuring that the measurement accuracy of curved sections is consistent with that of straight sections, making the system applicable to rail measurement of both straight and curved sections without additional adjustments.
[0036] Step S3: Perform smoothing filtering on the displacement data sequence: A sliding filter algorithm is used to smooth the displacement data sequence. For the first... Each sampling point is used as the center to take samples before and after it. A number of points form a filtering window (the window size for sliding filtering can be adjusted according to the actual noise level), and the arithmetic mean of all data points within the window is calculated as the filtering result for that point: Sliding filtering removes electrical noise from sensors, mechanical vibration noise, and noise components introduced by the micro-roughness of the rail surface. The core idea of sliding filtering is to replace the current sampled value with the average value of data within a continuously moving window, thereby smoothing the data, filtering out random noise, and extracting the true rail profile curve.
[0037] Step S4: Perform a baseline correction on the displacement data sequence, the baseline correction including: Using the displacement value of the first sampling point in the data sequence as a reference, subtract the displacement value of the first sampling point from the displacement values of all sampling points to achieve zeroing at the beginning of the data sequence: ; in, For the translation of the first Displacement data of each sampling point For the first Filtered displacement data from each sampling point This represents the displacement value of the first sampling point in the filtered data sequence; Then, using the displacement value of the last sampling point of the data sequence as a reference, the displacement values of each intermediate sampling point are rotated and compensated using linear interpolation: ; in, After translation and rotation, the first Displacement data of each sampling point This represents the displacement value of the sampling point at the end of the translated data sequence. This represents the total number of sampling points in a single measurement.
[0038] Rotation compensation is used to zero out the ends of the data sequence, eliminating installation offset and tilt errors caused by the placement of the measuring device on the rail. Since it is difficult to guarantee absolute horizontality when placing the measuring device on the rail, the measurement data typically includes overall offset and tilt components. After translation and rotation, both ends of the data curve are set to zero, eliminating the influence of overall offset and tilt on straightness assessment and laying the foundation for accurately evaluating the straightness of the rail surface.
[0039] Step S5: A step of performing secondary reference correction on the rotated data sequence according to the reference method selected by the user. The reference method includes the two-endpoint method and the top alignment method. The secondary benchmark correction method based on the two-endpoint method is as follows: the data sequence after translation and rotation is directly used as the final correction result, that is, the benchmark line is determined by the sampling points at the beginning and end. The secondary reference correction method based on top alignment is as follows: Based on the data sequence after translation and rotation, enumerate multiple reference line directions, calculate the envelope width under each reference line direction, select the reference line direction with the smallest envelope width as the optimal reference direction, and align the upper envelope to the zero position. The envelope is the region between the upper and lower envelopes of the data sequence. The upper envelope is the envelope formed by the maximum positive offset of each sampling point in the data sequence relative to the reference line, and the lower envelope is the envelope formed by the maximum negative offset of each sampling point in the data sequence relative to the reference line.
[0040] The benchmark method is a processing method for determining the reference baseline of measurement data. This invention provides two benchmark methods for users to choose from, to meet the measurement needs of different application scenarios.
[0041] Step S6: Calculate the rail straightness value based on the corrected data sequence, identify the areas that need grinding according to the user-defined out-of-limit threshold, and generate grinding suggestions, specifically including the following steps: From the corrected data sequence Find the maximum value in and minimum value , The rail straightness value is the total number of sampling points in a single measurement. ; User-defined over-limit threshold (Default 0.1mm, can be adjusted in the parameter configuration interface) Compare with the data sequence to find all continuous sampling point intervals that satisfy the following formula: ; in, For the first The final displacement data of each sampling point after benchmark correction; Mark all consecutive sampling point intervals as candidate polishing areas.
[0042] For adjacent candidate polishing areas, when the distance between the two areas is less than a preset first threshold (10 sampling points in this embodiment), the two areas are merged into one polishing area to avoid the same continuous protrusion area being divided into multiple independent areas due to local noise points. For polishing areas whose width after merging is less than the preset second threshold (10 sampling points, i.e., 1 cm in this embodiment), they are filtered out to remove the interference of tiny local burrs on the polishing judgment. Each determined grinding area is output in text format, indicating its starting position, width, and grinding depth. The starting position is the distance (in cm) between the first sampling point in the grinding area and the measurement starting point. The width is the distance converted from the number of consecutive sampling points within the grinding area, also in cm. The grinding depth is the maximum protrusion height among all sampling points within the grinding area, also in cm. These areas are also marked with semi-transparent bands on a line graph for visual reference by on-site personnel.
[0043] Finally, the final straightness curve is displayed on the smart terminal screen in the form of a line graph. The horizontal axis represents the measurement position (0~1000mm), and the vertical axis represents the displacement deviation value (mm). The maximum value, minimum value, and straightness value are also marked, as well as the color band markings of the polishing area.
[0044] After the measurement is completed, the original data and calculation results of this measurement will be saved in CSV file format. The information recorded in the file includes: timestamp, line name, mileage marker, direction, track, measurement surface, curve radius, displacement data of 1000 sampling points, straightness value, grinding suggestions, etc.
[0045] Through the above intelligent grinding analysis, the flatness value is automatically calculated, areas exceeding the user-set threshold are identified, adjacent areas are merged, and tiny areas are filtered out. Quantitative grinding suggestions containing location, width, and depth are generated and visually marked on the graph with color bands, providing precise construction guidance for on-site grinding operations and reducing blind grinding and material waste.
[0046] Preferably, when the length of the rail to be measured exceeds the single measurement length of the measuring device, step S1 includes the following steps: Step S11: The measuring device performs multiple measurements along the longitudinal direction of the rail, obtaining a set of displacement data sequences for each measurement, maintaining a preset overlap between adjacent measurements; for example... Figure 2 As shown, the user places the measuring device at the starting position for the first measurement. After the first measurement, the device is moved forward 500mm for the second measurement, and so on. A 500mm overlap is maintained between each measurement segment. In this embodiment, the relationship between the splicing length and the number of segments is as follows: 1.5 meters requires 2 segments, 2 meters requires 3 segments, and 3 meters requires 5 segments.
[0047] In step S11, after each data measurement is completed, curvature compensation and smoothing filtering processes in steps S2 and S3 must be performed.
[0048] Step S12: For two adjacent measurement data segments, take the first segment as the reference segment and the second segment as the segment to be registered, and extract the overlapping area in the two measurement data segments; for two adjacent measurement data segments, the last 500 data points (position 500~999mm) of the first segment and the first 500 data points (position 0~499mm) of the second segment constitute the overlapping area.
[0049] Step S13: Remove a predetermined number of sampling points from both ends of the overlapping region to obtain the effective overlapping region; Preferably, 50 data points are removed from each end of the overlapping area to avoid interference from non-steady-state data during the reversal start-up of the measuring device, resulting in an effective overlapping area of 400 data points. It should be noted that the cropping operation is only used for calculating registration parameters and does not discard the data from the cropped sampling points at both ends of the overlapping area. The cropping operation only applies to the data within the overlapping area and does not involve the non-overlapping parts of each segment. The complete data coverage after splicing is as follows: first segment of non-overlapping data (physical position 0~549mm, total 550 points) → fused overlapping area data (physical position 550~949mm, total 400 points) → second segment of non-overlapping data (physical position 950~1499mm, total 550 points), with seamless connection between the three segments, totaling 1500 sampling points.
[0050] Step S14: Using the effective overlapping region as the registration basis, calculate the linear transformation parameters of the second data segment relative to the first data segment, and correct all data of the second segment according to the linear transformation parameters; specifically including the following steps: The optimal rotation coefficients are obtained using the linear least squares method. and offset To minimize the sum of squared differences between two data segments within the effective overlapping region: ; in, The reference segment is the first one within the effective overlapping area. Displacement data of each sampling point The segment to be registered corresponds to the first segment within the effective overlap region. Displacement data of each sampling point ; This represents the total number of data points in the effective overlapping area. Perform linear transformation correction on all data of the segment to be registered using the following formula: ; in, For the entire region of the corrected registration segment, the first... Displacement data of each sampling point The first [section] within the entire region to be registered before correction Displacement data of each sampling point Rotation coefficient Used to compensate for tilt deviation caused by the difference in the placement angle of the measuring device between two measurement sections; offset Used to compensate for the overall height offset caused by the difference in the placement height of the measuring device between two measurement sections.
[0051] Step S15: Within the overlapping region, the two data segments are weighted and fused using a linear weighting gradient method to obtain the fused overlapping region data; the specific method is as follows: Within the effective overlapping area, the weight of the first segment of data, from the starting point (physical location 550mm) to the ending point (physical location 949mm) of the overlapping area. The weights of the second segment of data decrease linearly from 1 to 0. The number of steps increases linearly from 0 to 1. The fusion result of the displacement data of each sampling point is: ; , ; in, The first in the effective overlapping region after weighted fusion Displacement data of each sampling point; The reference segment is the first one within the effective overlapping area. The original displacement data of each sampling point For the corrected second segment of data within the effective overlap region, the first... Displacement data of each sampling point ; This represents the total number of data points in the effective overlapping area.
[0052] The advantages of using linear weighted fusion are: in the overlapping region, the fusion result is mainly determined by the data of the first segment, ensuring a smooth transition with the non-overlapping part of the first segment; in the overlapping region, the fusion result is mainly determined by the data of the second segment, ensuring a smooth transition with the non-overlapping part of the second segment; in the middle region, the data of the two segments each occupy a certain proportion, achieving a natural transition.
[0053] Step S16: The first non-overlapping data segment, the merged overlapping data segment, and the second non-overlapping data segment are spliced together in physical position order to form a complete displacement data sequence. After splicing, steps S4 to S6 are performed on the spliced complete data sequence for primary benchmark correction, secondary benchmark correction, flatness calculation, and grinding analysis.
[0054] By employing the aforementioned multi-segment splicing measurement method, multiple adjacent 1-meter measurement data are registered and aligned through overlapping areas, splicing them into continuous contour curves of 1.5 meters, 2 meters, or 3 meters to meet the detection requirements of different lengths. A combined strategy of 500mm overlap area design, boundary trimming (to avoid non-steady-state interference during start-stop), iterative optimization registration (rotation + translation), and linear weight fusion correction achieves high-precision splicing of multiple 1-meter measurements.
[0055] A second aspect of the present invention provides a rail straightness detection and grinding analysis system, comprising: The measuring device is a portable measuring instrument that integrates a laser displacement sensor, a linear module, a main control unit, a Bluetooth communication module, and a battery module. The laser displacement sensor emits a laser beam and receives reflected light from the measured surface, acquiring distance data from the sensor to the rail surface based on triangulation principles, achieving a measurement resolution at the micrometer level. The linear module is mechanically coupled to the laser displacement sensor, driving it to perform precise, uniform linear motion along the longitudinal direction of the rail, with a stroke of 1000 mm and a stepping accuracy of 1 mm. The main control unit is connected to the laser displacement sensor and the stepper motor, controlling the timing of the stepper motor's movement, synchronously receiving data collected by the laser displacement sensor, and packaging the data according to a custom protocol. The Bluetooth communication module is electrically connected to the main control unit, transmitting measurement data to a smart terminal via the BLE protocol. The battery module powers all the aforementioned components.
[0056] The smart terminal is a mobile phone or tablet device running the Android operating system, with a rail straightness measurement application installed. This application includes the following functional modules: The Bluetooth communication module is used to establish a BLE connection with the measuring device, send measurement control commands, receive measurement data frames, and perform frame parsing. The measurement control module provides a measurement interface, through which users can initiate single measurements or splicing measurements. The data preprocessing module is used to perform format conversion and outlier removal on the raw data received via Bluetooth. The curve correction module is used to perform curvature compensation correction on the measurement data based on the circular chord geometry model when the rail is located on a curved section. The adaptive filtering module is used to smooth the data using a sliding filter algorithm to remove sensor noise and mechanical vibration noise. The reference correction module is used to translate and rotate the filtered data, set the beginning and end of the measurement curve to zero, and provides two reference methods: the two-endpoint method and the top alignment method. The straightness calculation and polishing analysis module is used to automatically calculate the straightness value, identify areas that exceed the set threshold, and generate polishing suggestions; The stitching processing module is used to stitch together multiple adjacent measurement data into a longer continuous contour curve by registering and weighting the overlapping areas. The visualization module is used to display the straightness curve of the rail surface in real time in the form of a line graph on the smart terminal screen; The data storage and management module is used to save measurement data in CSV format, and supports querying and management by dimensions such as route, mileage, direction, and track, and supports historical data comparison.
[0057] This embodiment employs a laser displacement sensor for high-density continuous scanning, achieving micron-level accuracy in single-point measurement. A continuous scan of 1000 points can comprehensively reflect the contour of the joint area, resulting in more reliable straightness assessments. The entire system (measuring device + mobile phone) can be carried in a suitcase, making it suitable for on-site inspections at any location along the railway line, without being limited by fixed workstations. A single measurement, from device placement to result acquisition, takes less than 15 seconds, significantly more efficient than traditional manual ruler measurements.
[0058] Through the above system, the user launches the smart terminal APP, connects the measuring device via BLE, configures the measurement parameters (line, mileage, direction, track, curve radius, etc.) on the APP, places the measuring device in the area to be measured on the rail and presses the measurement button. The measuring device automatically completes a 1000mm scan and acquisition (requires 8-15 seconds), and the data is transmitted back in real time via BLE. After receiving the raw data, the APP sequentially performs curve correction, sliding filtering, translation and rotation, and secondary reference correction, calculates the straightness value, identifies out-of-limit areas and generates grinding suggestions, displays the final straightness curve in the line graph on the screen and marks the grinding area with color ribbons. After the user confirms, the measurement data and results are automatically saved to local storage.
[0059] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting and analyzing the straightness of rails through grinding, characterized in that, Includes the following steps: Step S1: Obtain the displacement data sequence collected by the measuring device at equal intervals along the longitudinal direction of the rail; Step S2: Perform a baseline correction on the displacement data sequence, the baseline correction including: Using the displacement value of the first sampling point of the data sequence as a reference, the displacement values of all sampling points are subtracted from the displacement value of the first sampling point to achieve zeroing at the beginning of the data sequence; Then, using the displacement value of the last sampling point of the data sequence as a reference, the displacement values of each intermediate sampling point are rotated and compensated according to the linear interpolation method to realize the zeroing of the end of the data sequence, so as to eliminate the installation offset and tilt error generated when the measuring device is placed on the rail. Step S3: Calculate the rail straightness value based on the corrected data sequence, identify the areas that need to be ground according to the user-set over-limit threshold, and generate grinding suggestions.
2. The method for detecting and grinding rail straightness as described in claim 1, characterized in that, Before performing a baseline correction, a curvature compensation correction step is also included in the displacement data sequence: When the rail being measured is located on a curve, the curvature of the rail itself will introduce a systematic geometric deviation into the displacement data. Each sampling point is corrected one by one according to the radius of the rail curve. For the For each sampling point, first calculate the horizontal distance from that sampling point to the midpoint of the sensor's motion path: ; in, For the first The horizontal distance from each sampling point to the midpoint of the sensor's movement path; This represents the total number of sampling points measured by the measuring device in a single measurement. The sensor is mounted with respect to the midpoint of its travel distance. Then, based on the curve radius of the rail... Calculate the correction value for this sampling point: ; in, For the first Correction value for each sampling point; Calculate the corrected displacement data based on the correction values: ; in, For the first Displacement data corrected for each sampling point For the first The original displacement data of each sampling point.
3. The method for detecting and grinding rail straightness as described in claim 1, characterized in that, Before performing a baseline correction, a smoothing filter process is also included for the displacement data sequence: A sliding filter algorithm is used to smooth the displacement data sequence. For the first... Each sampling point is used as the center to take samples before and after it. A filter window is formed by 10 points, and the arithmetic mean of all data points within the window is used as the filtering result for that point: Sliding filters are used to remove noise components introduced by sensor electrical noise, mechanical vibration noise, and rail surface micro-roughness.
4. The method for detecting and grinding rail straightness as described in claim 3, characterized in that, In step S2, using the displacement value of the first sampling point in the data sequence as a reference, the displacement values of all sampling points are subtracted from the displacement value of the first sampling point, specifically: ; in, For the translation of the first Displacement data of each sampling point For the first Filtered displacement data from each sampling point This represents the displacement value of the first sampling point in the filtered data sequence; The displacement values of each intermediate sampling point are rotated and compensated using linear interpolation, specifically as follows: ; in, After translation and rotation, the first Displacement data of each sampling point This represents the displacement value of the sampling point at the end of the translated data sequence. This represents the total number of sampling points in a single measurement.
5. The method for detecting and grinding rail straightness as described in claim 4, characterized in that, After the first baseline correction, the process also includes a second baseline correction step on the rotated data sequence according to the baseline method selected by the user. The baseline method includes the two-endpoint method and the top alignment method. The secondary benchmark correction method based on the two-endpoint method is as follows: the data sequence after translation and rotation is directly used as the final correction result, that is, the benchmark line is determined by the sampling points at the beginning and end. The secondary reference correction method based on top alignment is as follows: Based on the data sequence after translation and rotation, enumerate multiple reference line directions, calculate the envelope width under each reference line direction, select the reference line direction with the smallest envelope width as the optimal reference direction, and align the upper envelope to the zero position. The envelope is the region between the upper and lower envelopes of the data sequence. The upper envelope is the envelope formed by the maximum positive offset of each sampling point in the data sequence relative to the reference line, and the lower envelope is the envelope formed by the maximum negative offset of each sampling point in the data sequence relative to the reference line.
6. The method for detecting and grinding rail straightness as described in claim 1, characterized in that, Step S3 includes the following steps: From the corrected data sequence Find the maximum value in and minimum value , The rail straightness value is the total number of sampling points in a single measurement. ; User-defined over-limit threshold Compare with the data sequence to find all intervals of continuous sampling points that satisfy the following formula: ; in, For the first The final displacement data of each sampling point after benchmark correction; Mark all consecutive sampling point intervals as candidate polishing areas.
7. The method for detecting and grinding rail straightness as described in claim 6, characterized in that, For adjacent candidate grinding areas, when the distance between the two areas is less than a preset first threshold, the two areas are merged into one grinding area to avoid the same continuous protrusion area being divided into multiple independent areas due to local noise points. For grinding areas whose width after merging is less than the preset second threshold, they are filtered out to remove the interference of tiny local burrs on the grinding judgment. Each finalized polishing area is output in text format, indicating the starting position, area width, and polishing depth of each area; the starting position is the distance between the first sampling point of the polishing area and the measurement starting point, the area width is the distance converted from the number of consecutive sampling points contained in the polishing area, and the polishing depth is the maximum protrusion height among all sampling points in the polishing area.
8. The method for detecting and grinding rail straightness as described in claim 1, characterized in that, When the length of the rail to be measured exceeds the single measurement length of the measuring device, step S1 includes the following steps: Step S11: The measuring device performs multiple measurements along the longitudinal direction of the rail. Each measurement yields a set of displacement data sequences, and a preset length of overlap is maintained between adjacent measurements. Step S12: For two adjacent measurement data segments, take the first segment as the reference segment and the second segment as the segment to be registered, and extract the overlapping area in the two measurement data segments; Step S13: Remove a predetermined number of sampling points from both ends of the overlapping region to obtain the effective overlapping region; Step S14: Using the effective overlapping area as the registration basis, calculate the linear transformation parameters of the second segment of data relative to the first segment of data, and correct all the data of the second segment according to the linear transformation parameters; Step S15: Within the overlapping region, the two data segments are weighted and fused using a linear weighting gradient method to obtain the fused overlapping region data; Step S16: Combine the first non-overlapping data segment, the fused overlapping data segment, and the second non-overlapping data segment in order of their physical locations to form a complete displacement data sequence.
9. The method for detecting and grinding rail straightness as described in claim 8, characterized in that, Step S14 includes the following steps: The optimal rotation coefficients are obtained using the linear least squares method. and offset To minimize the sum of squared differences between two data segments within the effective overlapping region: ; in, The reference segment is the first one within the effective overlapping area. Displacement data of each sampling point The segment to be registered corresponds to the first segment within the effective overlap region. Displacement data of each sampling point This represents the total number of data points in the effective overlapping area. Perform linear transformation correction on all data of the segment to be registered using the following formula: ; in, For the entire region of the corrected registration segment, the first... Displacement data of each sampling point The first [section] within the entire region to be registered before correction Displacement data of each sampling point; rotation coefficient Used to compensate for tilt deviation caused by the difference in the placement angle of the measuring device between two measurement sections; offset Used to compensate for the overall height offset caused by the difference in the placement height of the measuring device between two measurement sections.
10. The method for detecting and grinding rail straightness as described in claim 8, characterized in that, In step S15, the weighted fusion method is as follows: Within the effective overlapping region, the weight of the first segment of data is calculated from the beginning to the end of the overlapping region. The weights of the second segment of data decrease linearly from 1 to 0. The number of steps increases linearly from 0 to 1. The fusion result of the displacement data of each sampling point is: ; , ; in, The first in the effective overlapping region after weighted fusion Displacement data of each sampling point; The reference segment is the first one within the effective overlapping area. Displacement data of each sampling point For the corrected second segment of data within the effective overlap region, the first... Displacement data of each sampling point This represents the total number of data points in the effective overlapping area.
