A data acquisition method applied in dynamic train wheel out-of-roundness measurement
By using camera image processing and PLC adjustment, the problem of insufficient real-time performance of the magnetic steel sensor was solved, enabling precise control of dynamic train wheel out-of-roundness measurement, ensuring real-time adjustment of sampling frequency and number of points, and improving measurement accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU JITRI INTELLIGENT OPTOELECTRONIC SYST RES INST CO LTD
- Filing Date
- 2023-12-21
- Publication Date
- 2026-07-24
AI Technical Summary
Existing train wheel out-of-roundness detection equipment suffers from insufficient real-time performance of the magnetic steel sensor when measuring wheel speed, resulting in a lag in the update of the sampling frequency and an inability to accurately control the number and distance of sampling points. The measurement accuracy is particularly poor when the vehicle speed changes.
The system continuously captures images of the wheel using a camera, calculates the wheel displacement through image processing, adjusts the camera sampling frequency using a PLC, and obtains camera parameters using the Zhang Zhengyou calibration method, thereby achieving accurate measurement of wheel displacement and real-time adjustment of the sampling frequency.
It improves the accuracy and real-time performance of wheel out-of-roundness measurement, overcomes the measurement error of magnetic steel sensors under different vehicle speed conditions, and ensures accurate control of the number and distance of sampling points.
Smart Images

Figure CN117739858B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of train measurement technology, specifically relating to a data acquisition method for measuring the out-of-roundness of dynamic train wheels. Background Technology
[0002] During normal use, the wheels of various types of trains undergo irregular deformation due to wear and other factors, resulting in polygonal shapes, typically with 30 or more polygonal points. In wheel out-of-roundness detection equipment, the number of sampling points and the distance between them are two crucial parameters. Only by controlling these two parameters accurately can the wheel out-of-roundness be accurately reflected. These parameters are also affected by the sampling frequency / speed of the detection equipment, making the accuracy and real-time performance of the sampling frequency key parameters for evaluating and ensuring the quality of the out-of-roundness detection equipment.
[0003] In current mainstream out-of-roundness detection equipment, two or more magnetic steel sensors are installed not far from the measuring equipment in the direction of oncoming traffic. These sensors are then used to measure the speed of the wheels, and the sampling frequency is calculated based on this speed, thereby controlling the number of sampling points and the distance between them. However, this method has two obvious drawbacks:
[0004] 1. The real-time performance of using magnetic sensors to measure train speed is not ideal. A train speed value is only obtained the instant the magnetic sensor is triggered, and this value is used by the system until the next speed is measured. When the train speed changes, the changed speed can only be acquired by the system when the magnetic sensor is triggered again, allowing for adjustments to the system's sampling frequency. This can lead to significant deviations in the number of sampling points and sampling distance between these two speeds. This lack of real-time performance results in a lag in the system's sampling frequency updates, causing the number of sampling points and sampling distance to deviate from theoretical calculations, thus failing to meet project requirements.
[0005] 2. The application range of magnetic steel sensors for speed measurement is limited. For lines where vehicle speeds are relatively stable, their measurement accuracy is relatively high. However, for trains traveling at various speed levels on the same line, and for the same train where the speed changes significantly, the speed measured by the magnetic steel sensor will have a large deviation, which will also cause the measured speed to fail to meet the project requirements. Summary of the Invention
[0006] To address the technical problems existing in the prior art, the purpose of this invention is to provide a data acquisition method for measuring the out-of-roundness of dynamic train wheels.
[0007] To achieve the above objectives and technical effects, the technical solution adopted by this invention is as follows:
[0008] A data acquisition method for measuring the out-of-roundness of dynamic train wheels includes the following steps:
[0009] Once the train wheel enters the measurement area, the camera continuously captures images of the wheel, including the wheel axle end cap information plate. The displacement of the wheel per unit time is calculated by processing the images, and the camera's sampling frequency is adjusted by comparing the actual number of sampling points with the theoretically calculated number of sampling points.
[0010] Furthermore, the camera is calibrated using the Zhang Zhengyou calibration method before use to obtain the camera's internal and external parameters.
[0011] Furthermore, the camera calibration steps include:
[0012] Secure the camera according to the project requirements, ensuring the camera's acquisition plane is parallel to the plane of the train's direction of travel. Within the camera's field of view, place the calibration plate on the plane of the train's wheel axle end cover information board. Record the initial position as the vertically placed position of the calibration plate on the train's wheel axle end cover information board. Then, rotate and translate the calibration plate on the plane of the train's wheel axle end cover information board until the calibration plate covers the entire area of the train's wheel axle end cover information board. During the movement of the calibration plate, take an image once every time the calibration plate moves or rotates a certain distance. Collect 500-800 images during the entire calibration process. After image acquisition, perform calibration based on Zhang Zhengyou's calibration method. After calibration, obtain the camera's internal and external parameters.
[0013] Furthermore, the camera and magnet are respectively connected to the PLC. The magnet detects whether the train has entered the measurement area and transmits the signal to the PLC for processing. When the magnet detects that the train has entered the measurement area, the PLC triggers the camera to take pictures at fixed time intervals. The PLC processes the images to calculate the displacement of the wheels per unit time and compares the actual number of sampling points with the theoretically calculated number of sampling points to adjust the sampling frequency of the camera.
[0014] Furthermore, the steps for processing the image using a PLC include:
[0015] The images of the train wheel axle end cover information signs captured by the camera are preprocessed to convert the color images into grayscale images and filter out noise points in the images to obtain images that meet the preset specifications. At the same time, the image in which the characters on the train wheel axle end cover information sign are horizontally aligned is used as the standard image. The horizontal position of the characters on the information sign is recorded as 0 degrees. The characters on the axle end cover are cropped using a rectangle to create a template image.
[0016] Furthermore, the steps for calculating the displacement of the wheel per unit time include:
[0017] The camera captures two frames of images of the train wheel axle end cover and transmits them to the PLC. The PLC performs template matching between the image of the train wheel axle end cover information sign captured by the camera and the template image. If the accuracy rate of the character template matching is above 95%, the matching is successful; otherwise, the template matching fails and needs to be performed again until the matching is successful.
[0018] After successful matching, the PLC calculates the affine transformation relationship between the input image and the template image to obtain the pixel angle value of the rotation of the train wheel axle end cover information plate in the two frames of the image. The actual rotation angle value of the train wheel axle end cover is obtained by using the pinhole imaging principle of the camera. Then, based on the wheel radius value, the displacement per unit time is obtained by using the relationship between arc length and central angle.
[0019] Furthermore, the affine transformation relation is expressed as:
[0020] x` = ax + by + c
[0021] y` = dx + ey + f
[0022] In the formula, (x,y) are the coordinates in the original image, (x`,y`) are the coordinates in the transformed image, and a, b, c, d, e, and f are the transformation parameters.
[0023] Furthermore, the step of obtaining the actual rotation angle value includes:
[0024] First, the train wheel axle end cover is divided into N parts and drawn with red lines. The actual included angle values between the red lines are recorded. Then, images of the train wheel axle end cover are captured by a camera. Thresholding is performed on the captured images to extract the red lines. Linear fitting is then performed on the extracted red lines to calculate and record the pixel angle values between the N red lines. The N actual included angle values and the corresponding pixel angle values are fitted using the least squares method to calculate the formula for the actual angle value corresponding to the pixel angle value. Based on this formula, the pixel angle values of the rotation of the train wheel axle end cover information sign in two consecutive frames can be converted into actual rotation angle values.
[0025] Furthermore, the least squares method is expressed as:
[0026] First, fit an m-th degree polynomial curve:
[0027] y = a0 + a1x + a2x 2 +...+a m x m
[0028] In the formula, a0, a1, ..., am The coefficients of the polynomial need to be determined using the least squares method;
[0029] Construct the objective function of the least squares method to minimize the sum of squared errors:
[0030] E=Σ(y i -(a0+a1x i +a2x i 2 +...+a m x i m )) 2
[0031] In the formula, E is the sum of squared errors, ∑ represents the summation over all data points, and y i Let x represent the y-value of the i-th data point. i Let x represent the x-value of the i-th data point.
[0032] Furthermore, the steps for adjusting the camera's sampling frequency by comparing the actual number of sampling points with the theoretically calculated number of sampling points include:
[0033] The timestamp of the first photo D taken by the camera is T1, and the timestamp of the second photo is T2. Then the unit time value T = T2 - T1. Let the sampling frequency within the unit time value T be P. Then the actual number of sampling points within the unit time value T is γ = T × P.
[0034] The PLC compares the actual number of sampling points γ with the theoretically calculated number of sampling points. When the actual number of sampling points is greater than the theoretically calculated number of sampling points, the PLC reduces the actual sampling frequency based on the deviation. When the actual number of sampling points is less than the theoretically calculated number of sampling points, the PLC increases the sampling frequency based on the deviation, thereby ensuring that the actual and theoretical data remain consistent.
[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0036] This invention discloses a data acquisition method for measuring the out-of-roundness of dynamic train wheels, comprising the following steps: after the train wheel enters the measurement area, images of the wheel, including the wheel axle end cap information plate, are continuously captured by a camera; the displacement of the wheel per unit time is calculated by processing the images; and the sampling frequency of the camera is adjusted by comparing the actual number of sampling points with the theoretically calculated number of sampling points. This data acquisition method for measuring the out-of-roundness of dynamic train wheels utilizes the versatility of camera speed measurement, effectively overcoming the errors caused by magnets measuring different speed levels. Especially when trains of different speed levels pass on the same line, the advantage of camera speed measurement followed by PLC processing in obtaining accurate train speed data is even more significant. It overcomes the problem of insufficient real-time performance of magnet speed measurement. The PLC rapidly triggers the camera, and each trigger results in a speed update. Even if the train speed changes, adjustments and updates can be made promptly with each camera trigger, ensuring the accuracy of the system. Attached Figure Description
[0037] Figure 1 This is a flowchart of the present invention;
[0038] Figure 2 This is a schematic diagram of the camera installation according to the present invention;
[0039] Figure 3 This is a schematic diagram illustrating the relationship between the arc length and the central angle of the present invention. Detailed Implementation
[0040] The present invention will now be described in detail so that its advantages and features can be more easily understood by those skilled in the art, thereby providing a clearer and more explicit definition of the scope of protection of the present invention.
[0041] The following provides a brief overview of one or more aspects to offer a basic understanding of them. This overview is not an exhaustive summary of all conceived aspects, nor is it intended to identify key or decisive elements of all aspects, nor to define the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form to prepare for the more detailed descriptions that follow.
[0042] Example 1
[0043] like Figure 1-3 As shown, a data acquisition method for measuring the out-of-roundness of dynamic train wheels includes the following steps:
[0044] When the magnet 2, installed approximately 3-5 meters in front of the wheel out-of-roundness measuring device 1, detects the approaching train and the train wheel enters the measurement area, the PLC triggers the high-performance wide-angle camera 3 on the side of the wheel out-of-roundness measuring device at fixed time intervals. The camera 3 continuously captures images of the wheel being measured, including the wheel axle end cap information plate. Based on the change in the rotation angle of the information plate in each image, the change in the wheel's rotation angle within the interval is calculated using two consecutive images. Combined with the wheel diameter value, this is converted into the wheel's displacement per unit time through a function. By processing the images, the displacement of the wheel per unit time is calculated. The number of sample points actually collected by the PLC during this interval can be directly obtained internally. By comparing the deviation between the actual number of sampling points and the theoretically calculated number of sampling points, the sampling frequency of the camera is adjusted, thereby achieving more accurate sampling of the wheel and meeting the project's calculation requirements.
[0045] Before using camera 3, camera calibration needs to be performed using Zhang Zhengyou's calibration method. The steps are as follows:
[0046] Camera 3 is fixed in place according to project requirements. The acquisition plane of camera 3 is kept parallel to the plane of the train's travel direction. Within the field of view of camera 3, the calibration plate is placed on the plane of the train wheel axle end cover information plate. The vertical position of the calibration plate on the plane of the train wheel axle end cover is recorded as the initial position. Then, the calibration plate is rotated and translated on the plane of the train wheel axle end cover information plate until the calibration plate covers the entire area of the train wheel axle end cover information plate. During the movement of the calibration plate, the camera takes an image every time the calibration plate moves or rotates a certain distance. 500-800 images are collected during the entire calibration process. After the images are collected, calibration is performed based on Zhang Zhengyou's calibration method. After the calibration is completed, the internal and external parameters of camera 3 are obtained, and then the distortion correction is performed on the axle end cover images collected by camera 3.
[0047] After distortion correction is completed, the image of the train wheel axle end cover information sign captured by camera 3 is processed. The color image is converted into a grayscale image, and noise points in the image are filtered and denoised to provide image data that conforms to the preset specifications for subsequent calculations. At the same time, the image of the characters on the train wheel axle end cover information sign with the characters in a horizontal position is used as the standard image. The horizontal position of the characters on the information sign is recorded as 0 degrees. The characters on the end cover are cropped using a rectangle to create a template image. Template matching is performed on the train wheel axle end cover information sign image captured by the camera. When the character template matching accuracy rate is above 95%, the matching is considered successful. Otherwise, the template matching is considered to have failed, and template matching needs to be performed again until a successful match is achieved.
[0048] The rotation angle of the train wheel end cover is obtained by camera 3 acquiring two frames of images of the train wheel axle end cover before and after the acquisition. Then, character recognition is performed on the acquired images. After successful character recognition, the affine transformation relationship between the input image and the template is calculated. The affine transformation relationship can be expressed as:
[0049] x` = ax + by + c
[0050] y` = dx + ey + f
[0051] In the formula, (x,y) are the coordinates in the original image, (x`,y`) are the coordinates in the transformed image, and a, b, c, d, e, and f are the transformation parameters.
[0052] The pixel angle values of the train wheel axle end cover information sign rotation on the two consecutive images can be obtained by using the affine transformation relationship between the two frames and the template. The actual rotation angle value of the train wheel axle end cover can be obtained by using the pinhole imaging principle of a camera. The steps to convert the pixel angle value into the actual rotation angle value include:
[0053] First, the train wheel axle end cover is divided into N=12 parts and drawn with red lines. The actual angle values between the red lines are recorded. Then, images of the train wheel axle end cover are acquired using camera 3. Threshold segmentation is performed on the acquired images to extract the red lines. Linear fitting is then performed on the extracted red lines to calculate and record the pixel angle values between the 12 red lines. The 12 actual angle values and their corresponding pixel angle values are then fitted using the least squares method to derive the formula for calculating the actual angle value corresponding to the pixel angle value. The least squares method is expressed as:
[0054] First, fit an m-th degree polynomial curve: y = a0 + a1x + a2x 2 +...+a m x m
[0055] In the formula, a0, a1, ..., a m The coefficients of the polynomial need to be determined using the least squares method;
[0056] Construct the objective function of the least squares method: E = ∑(y i -(a0+a1x i +a2x i 2 +...+a m x i m )) 2 To minimize the sum of squared errors, where E is the sum of squared errors, ∑ represents the summation over all data points, and y i Let x represent the y-value of the i-th data point.i This represents the x-value of the i-th data point;
[0057] The pixel angle values of the rotation of the train wheel axle end cover information plate in the two consecutive frames are converted into actual rotation angle values, and the angle values are sent to the PLC in a timely manner. The PLC uses the relationship between arc length and central angle to obtain the displacement per unit time, i.e., arc length δ=(β / π)×R, based on the rotation angle value β and the wheel radius value R.
[0058] The interval time can be directly obtained from the timestamp inside the PLC. The timestamp of the first photo D taken by camera 3 is T1, and the timestamp of the second photo is T2. Then the unit time value is T = T2 - T1. The sampling frequency during this period is P. Then the actual number of sampling points γ during this period is γ = T × P. The PLC compares the obtained actual number of sampling points γ with the theoretically calculated number of sampling points. When the actual number of sampling points is greater than the theoretically calculated number of sampling points, the PLC reduces the actual sampling frequency according to the deviation. When the actual number of sampling points is less than the theoretically calculated number of sampling points, the PLC increases the sampling frequency according to the deviation, thereby ensuring that the actual and theoretical data are consistent.
[0059] Any parts or structures not specifically described in this invention can be made using existing technologies or products, and will not be elaborated upon here.
[0060] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A data acquisition method for measuring the out-of-roundness of dynamic train wheels, characterized in that, Includes the following steps: Once the train wheel enters the measurement area, the camera continuously captures images of the wheel, including the wheel axle end cap information plate. The displacement of the wheel per unit time is calculated by processing the images. The camera's sampling frequency is adjusted by comparing the actual number of sampling points with the theoretically calculated number of sampling points. The steps for calculating the displacement of a wheel per unit time include: The camera captures two frames of images of the train wheel axle end cover and transmits them to the PLC. The PLC then performs template matching between the image of the train wheel axle end cover information sign captured by the camera and the template image. After successful matching, the PLC calculates the affine transformation relationship between the input image and the template image to obtain the pixel angle value of the rotation of the train wheel axle end cover information sign on the two frames of images. The actual rotation angle value of the train wheel axle end cover is obtained through the pinhole imaging principle of the camera. Then, based on the wheel radius value, the displacement per unit time is obtained by using the relationship between arc length and central angle. The steps for obtaining the actual rotation angle value include: First, the train wheel axle end cover is divided into N parts and drawn with red lines. The actual angle between the red lines is recorded. Then, images of the train wheel axle end cover are captured by a camera. Thresholding is performed on the captured images to extract the red lines. Linear fitting is then performed on the extracted red lines to calculate and record the pixel angle between the N red lines. The N actual angle values and the corresponding pixel angle values are fitted using the least squares method to calculate the formula for the actual angle value corresponding to the pixel angle value. Based on this formula, the pixel angle value of the rotation of the train wheel axle end cover information sign in two consecutive frames can be converted into the actual rotation angle value. The steps for adjusting the camera's sampling frequency by comparing the actual number of sampling points with the theoretically calculated number of sampling points include: The timestamp of the first photo taken by the camera is T1, and the timestamp of the second photo is T2. Then the unit time value T = T2 - T1. Let the sampling frequency within the unit time value T be P, then the actual number of sampling points within the unit time value T is γ = T × P. The PLC compares the actual number of sampling points γ with the theoretically calculated number of sampling points. When the actual number of sampling points is greater than the theoretically calculated number of sampling points, the PLC reduces the actual sampling frequency based on the deviation. When the actual number of sampling points is less than the theoretically calculated number of sampling points, the PLC increases the sampling frequency based on the deviation, thereby ensuring that the actual and theoretical data remain consistent.
2. The data acquisition method for measuring the out-of-roundness of dynamic train wheels according to claim 1, characterized in that, Before use, the camera is calibrated using the Zhang Zhengyou calibration method to obtain the camera's internal and external parameters.
3. The data acquisition method for measuring the out-of-roundness of dynamic train wheels according to claim 2, characterized in that, The camera calibration steps include: Secure the camera according to the project requirements, ensuring the camera's acquisition plane is parallel to the plane of the train's direction of travel. Within the camera's field of view, place the calibration plate on the plane of the train's wheel axle end cover information board. Record the initial position as the vertically placed position of the calibration plate on the train's wheel axle end cover information board. Then, rotate and translate the calibration plate on the plane of the train's wheel axle end cover information board until the calibration plate covers the entire area of the train's wheel axle end cover information board. During the movement of the calibration plate, take an image once every time the calibration plate moves or rotates a certain distance. Collect 500-800 images during the entire calibration process. After image acquisition, perform calibration based on Zhang Zhengyou's calibration method. After calibration, obtain the camera's internal and external parameters.
4. The data acquisition method for measuring the out-of-roundness of dynamic train wheels according to claim 1, characterized in that, The camera and magnet are connected to the PLC. The magnet detects whether the train has entered the measurement area and transmits the signal to the PLC for processing. When the magnet detects that the train has entered the measurement area, the PLC triggers the camera to take pictures at fixed time intervals. The PLC processes the images to calculate the displacement of the wheels per unit time and compares the actual number of sampling points with the theoretically calculated number of sampling points to adjust the camera's sampling frequency.
5. A data acquisition method for measuring the out-of-roundness of dynamic train wheels according to claim 4, characterized in that, The steps for image processing using a PLC include: The images of the train wheel axle end cover information signs captured by the camera are preprocessed to convert the color images into grayscale images and filter out noise points in the images to obtain images that meet the preset specifications. At the same time, the image in which the characters on the train wheel axle end cover information sign are horizontally aligned is used as the standard image. The horizontal position of the characters on the information sign is recorded as 0 degrees. The characters on the axle end cover are cropped using a rectangle to create a template image.
6. The data acquisition method for measuring the out-of-roundness of dynamic train wheels according to claim 1, characterized in that, The affine transformation relationship is expressed as follows: ; In the formula, The coordinates are in the original image. The coordinates in the transformed image, These are the transformation parameters.
7. A data acquisition method for measuring the out-of-roundness of dynamic train wheels according to claim 1, characterized in that, The least squares method is expressed as follows: First, fit an m-th degree polynomial curve: ; In the formula, The coefficients of the polynomial need to be determined using the least squares method; Construct the objective function of the least squares method to minimize the sum of squared errors: ; In the formula, For the sum of squared errors, This is expressed as the summation over all data points. Indicates the first data points value, Indicates the first data points value.