Train positioning method, controller, storage medium and train positioning system
By combining magnetic sensors with analog-to-digital converters to detect changes in the magnetic field of the train axles, the problem of inaccurate train positioning caused by photoelectric sensors being easily disturbed by the external environment is solved, and stable, reliable and accurate positioning of the train is achieved.
Patent Information
- Application Number
- CN202310281705.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-21
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-03-21
AI Technical Summary
In the prior art, the use of photoelectric sensors that are easily disturbed by the external environment to locate trains leads to the problem of inaccurate positioning.
By combining magnetic sensors with analog-to-digital converters, the number of train axles is determined by detecting changes in the magnetic field of the train axles, thereby accurately positioning the train. Multiple magnetic sensors are arranged in different positions to improve positioning accuracy, and external interference is eliminated through an alarm.
The system achieves stable, reliable and accurate positioning of the train, avoids the problem of inaccurate positioning of the photoelectric sensor caused by interference from the external environment, and improves the accuracy and reliability of positioning.
Smart Images

Figure CN116101347B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of train positioning, and in particular to a train positioning method, a controller, a computer-readable storage medium, a processor, and a train positioning system. Background Art
[0002] Railway transportation is a relatively important mode of transportation today, enabling fast and efficient long-distance transportation. Railway train cars come in a variety of types, each with a different load capacity. Mixed trains are often encountered during loading or unloading. Therefore, if the train cannot be accurately positioned and the order and position of the cars cannot be accurately determined, loading or unloading operations will be more difficult and not conducive to management. For example, during coal loading, if the train cars cannot be accurately positioned, the spraying of antifreeze and dust suppressants during loading cannot be accurately controlled, resulting in waste of antifreeze and dust suppressants or untimely spraying.
[0003] The existing technology usually uses photoelectric sensors to determine the position and direction of travel of train cars. The specific solution is: photoelectric sensors are installed on the track. When the photoelectric sensors are blocked, it means that the car has entered the spraying area and spraying begins. If the photoelectric sensors are not blocked, it means that the gap between the two cars has entered the spraying area and spraying stops.
[0004] Since the train loading environment is usually poor, the detection accuracy and life of the photoelectric sensor are greatly affected (for example, when a foreign object passes over the photoelectric sensor, the photoelectric sensor mistakenly detects that a train has passed) and the problem of inaccurate train positioning using photoelectric sensors occurs. Summary of the Invention
[0005] The main purpose of this application is to provide a train positioning method, controller, computer-readable storage medium, processor and train positioning system, so as to at least solve the problem in the prior art of using photoelectric sensors that are easily interfered with by the external environment to position the train, resulting in inaccurate train positioning.
[0006] To achieve the above objectives, according to one aspect of the present application, a train positioning method is provided, wherein a train runs on a train track, the train includes a locomotive, the locomotive includes multiple axles, a first magnetic sensor is arranged at a first preset position on the inner side of the train track, the first magnetic sensor is communicatively connected to an analog-to-digital converter, when the axle passes directly above the first magnetic sensor, the first magnetic sensor sends a first electrical signal to the analog-to-digital converter, the analog-to-digital converter is communicatively connected to a controller, the analog-to-digital converter is used to convert the first electrical signal into a first digital signal and send the first digital signal to the controller, the train positioning method is applied to the controller, the method comprising: the controller receiving multiple first digital signals from the analog-to-digital converter, the first digital signals corresponding one-to-one to the first electrical signals; the controller determining a first number based on all the first digital signals, the first number being the number of the first digital signals; the controller determining that the locomotive has not completely passed the first preset position when the first number is less than or equal to a second number, the second number being the number of the axles of the locomotive.
[0007] Optionally, the train further comprises a plurality of carriages, each carriage comprising a preset number of axles, and after the controller determines the first number based on all the first digital signals, the method further comprises: if the first number is greater than the second number, the controller determines The quotient of is the third quantity, determine The remainder is the fourth number, wherein Y is the first number, X1 is the second number, X2 is the preset number, the third number is the number of the carriages that have completely passed the first preset position at the current moment, the fourth number is the number of target axles that have completely passed the first preset position at the current moment, and the target axle is the axle of the carriage that has not completely passed the first preset position at the current moment.
[0008] Optionally, a second magnetic sensor is disposed at a second preset position on the inner side of the train track, the second preset position and the first preset position being located on the same inner side of the train track, the first direction being the same as the length direction of the train track, the first direction starting from the first preset position and ending at the second preset position, the second magnetic sensor being communicatively connected to the analog-to-digital converter, and when the axle passes directly above the second magnetic sensor, the second magnetic sensor sending a second electrical signal to the analog-to-digital converter, the analog-to-digital converter being configured to convert the second electrical signal into a second digital signal and sending the second digital signal to the controller, before the controller determines the first quantity based on all the first digital signals, the method further includes: the controller obtaining a first moment and a second moment from the analog-to-digital converter, the first moment being the moment when the analog-to-digital converter receives the first first electrical signal from the first magnetic sensor, and the second moment being the moment when the analog-to-digital converter receives the first second electrical signal from the second magnetic sensor; the controller determining that the train's running direction is the first direction if the first moment is less than the second moment, and determining that the train's running direction is the second direction if the first moment is greater than the second moment, the second direction starting from the second preset position and ending at the first preset position.
[0009] Optionally, after the controller obtains the first moment and the second moment from the analog-to-digital converter, the method further includes: the controller calculates the absolute value of the difference between the first moment and the second moment to obtain the running time; the controller calculates the ratio of the running distance to the running time to obtain the running speed, the running distance is the distance between the first preset position and the second preset position, and the running speed is the running speed of the train.
[0010] Optionally, a third magnetic sensor is arranged at a third preset position on the inner side of the train track, and a fourth magnetic sensor is arranged at a fourth preset position on the inner side of the train track. The third preset position and the fourth preset position are located on different inner sides of the train track. The third direction is perpendicular to the length direction of the train track. The third direction starts at the third preset position and ends at the fourth preset position. The third magnetic sensor is communicatively connected to the analog-to-digital converter. When the axle passes directly above the third magnetic sensor, the third magnetic sensor sends a third electrical signal to the analog-to-digital converter. The analog-to-digital converter is used to convert the third electrical signal into a third digital signal and send the third digital signal to the controller. , the fourth magnetic sensor is communicatively connected to the analog-to-digital converter, and when the axle passes directly above the fourth magnetic sensor, the fourth magnetic sensor sends a fourth electrical signal to the analog-to-digital converter, and the analog-to-digital converter is used to convert the fourth electrical signal into a fourth digital signal and send the fourth digital signal to the controller. Before the controller determines the first quantity based on all the first digital signals, the method also includes: the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received; the controller determines a result when the analog-to-digital converter receives the third electrical signal and the fourth electrical signal, and the result indicates that the train is passing through the first preset position.
[0011] Optionally, the controller is communicatively connected to the alarm, and after the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received, the method further includes: the controller generates a first alarm message when the analog-to-digital converter receives the third electrical signal but does not receive the fourth electrical signal, and the controller generates a second alarm message when the analog-to-digital converter receives the fourth electrical signal but does not receive the third electrical signal, the first alarm message being information indicating that the third magnetic sensor is abnormal, and the second alarm message being information indicating that the fourth magnetic sensor is abnormal.
[0012] According to another aspect of the present application, a controller is provided. A train runs on a train track. The train includes a locomotive, which includes multiple axles. A first magnetic sensor is arranged at a first preset position on the inner side of the train track. The first magnetic sensor is communicatively connected to an analog-to-digital converter. When the axle passes directly above the first magnetic sensor, the first magnetic sensor sends a first electrical signal to the analog-to-digital converter. The analog-to-digital converter is communicatively connected to the controller. The analog-to-digital converter is used to convert the first electrical signal into a first digital signal and send the first digital signal to the controller. The controller includes: a receiving unit for receiving multiple first digital signals from the analog-to-digital converter, the first digital signals corresponding one-to-one to the first electrical signals; a first determining unit for determining a first quantity based on all the first digital signals, the first quantity being the number of the first digital signals; and a second determining unit for determining that the locomotive has not completely passed the first preset position when the first quantity is less than or equal to a second quantity, the second quantity being the number of the axles of the locomotive.
[0013] According to another aspect of the present application, a computer-readable storage medium is provided, which includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute any one of the train positioning methods.
[0014] According to another aspect of the present application, a processor is provided, which is used to run a program, wherein the program executes any one of the train positioning methods when running.
[0015] According to one aspect of the present application, a train positioning system is provided, comprising: a controller, the controller being used to execute any one of the train positioning methods described; an analog-to-digital converter, the analog-to-digital converter being communicatively connected to the controller; a first magnetic sensor, the first magnetic sensor being communicatively connected to the analog-to-digital converter; a second magnetic sensor, the second magnetic sensor being communicatively connected to the analog-to-digital converter; a third magnetic sensor, the third magnetic sensor being communicatively connected to the analog-to-digital converter; a fourth magnetic sensor, the fourth magnetic sensor being communicatively connected to the analog-to-digital converter; and an alarm, the alarm being communicatively connected to the controller.
[0016] According to the technical solution of the present application, when an axle passes through the first magnetic sensor, the magnetic field of the first magnetic sensor changes. The first magnetic sensor converts the magnetic field change into a first electrical signal and sends it to the analog-to-digital converter. The analog-to-digital converter converts the first electrical signal into a first digital signal and sends the first digital signal to the controller. The controller determines that the number of the first digital signals is the number of axles passing through the first preset position. When the number of axles passing through the first preset position is less than or equal to the number of axles of the locomotive, the controller determines that the locomotive has not completely passed the first preset position, thereby achieving the positioning of the train. Compared with the prior art that uses photoelectric sensors that are easily interfered with by the external environment to position the train, resulting in inaccurate train positioning, the first magnetic sensor of the present application does not come into direct contact with the axle, and uses an active magnetic field, which is not affected by the external environment. It is stable and reliable when used, and can achieve accurate positioning of the train. This method solves the problem of the prior art that uses photoelectric sensors that are easily interfered with by the external environment to position the train, resulting in inaccurate train positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings that constitute part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0018] Figure 1 A flow chart of a method for executing train positioning according to an embodiment of the present application is shown;
[0019] Figure 2 A schematic diagram of the arrangement of magnetic sensors in a train positioning system provided according to an embodiment of the present application is shown;
[0020] Figure 3 A structural block diagram of a controller provided according to an embodiment of the present application is shown.
[0021] The above drawings include the following reference numerals:
[0022] 10. Train track; 20. First magnetic sensor; 30. Second magnetic sensor; 40. Third magnetic sensor; 50. Fourth magnetic sensor. DETAILED DESCRIPTION
[0023] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] As introduced in the background technology, the prior art uses photoelectric sensors that are easily interfered with by the external environment to locate the train, resulting in inaccurate train positioning. In order to solve the problem of the prior art using photoelectric sensors that are easily interfered with by the external environment to locate the train, resulting in inaccurate train positioning, the embodiments of the present application provide a train positioning method, a controller, a computer-readable storage medium, a processor and a train positioning system.
[0027] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0028] In this embodiment, a train positioning method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] Figure 1 FIG. 1 is a flow chart of a train positioning method according to an embodiment of the present application. Figure 1 As shown, the method includes the following steps:
[0030] Step S201, the controller receives a plurality of the first digital signals from the analog-to-digital converter, wherein the first digital signals correspond one-to-one to the first electrical signals;
[0031] Specifically, a first digital signal represents that an axle passes through a first preset position.
[0032] It should be noted that if Figure 2 As shown, a train runs on a train track 10, the train includes a locomotive, the locomotive includes multiple axles, a first magnetic sensor 20 is set at a first preset position on the inner side of the train track 10, the first magnetic sensor 20 is communicatively connected to the analog-to-digital converter, when the axle passes directly above the first magnetic sensor 20, the first magnetic sensor 20 sends a first electrical signal to the analog-to-digital converter, the analog-to-digital converter is communicatively connected to the controller, the analog-to-digital converter is used to convert the first electrical signal into a first digital signal and send the first digital signal to the controller, and the train positioning method is applied to the controller.
[0033] It should also be noted that the axle is a magnetic object. When the axle passes through the first magnetic sensor, the magnetic field of the first magnetic sensor changes. The first magnetic sensor converts the magnetic field change into a first electrical signal and sends it to the analog-to-digital converter. The analog-to-digital converter is used to convert the first electrical signal into a first digital signal and send the first digital signal to the controller.
[0034] Step S202, the controller determines a first quantity based on all the first digital signals, where the first quantity is the quantity of the first digital signals;
[0035] Specifically, the number of the first digital signals represents the number of axles passing through the first preset position.
[0036] In order to achieve the positioning of the train, in an optional solution, the train further includes a plurality of carriages, each of which includes a preset number of axles. After step S202, the method further includes:
[0037] When the first number is greater than the second number, the controller determines The quotient of is the third quantity, determine The remainder is the fourth number, wherein Y is the first number, X1 is the second number, X2 is the preset number, the third number is the number of the carriages that have completely passed the first preset position at the current moment, the fourth number is the number of target axles that have completely passed the first preset position at the current moment, and the target axle is the axle of the carriage that has not completely passed the first preset position at the current moment.
[0038] In this embodiment, for example, the number of axles at the first preset position (the first number) is 15, the number of axles of the locomotive (the second number) is 6, and the number of axles of each carriage (the preset number) is 4. The quotient is 2 and the remainder is 1, that is, the number of cars that have completely passed the first preset position at the current moment (the third number) is 2, the car that has not completely passed the first preset position at the current moment is the third car, and the number of axles in the third car that have completely passed the first preset position at the current moment (the fourth number) is 1. At the current moment, the first preset position is between the first axle and the second axle of the third car.
[0039] In order to improve the accuracy of train positioning, in an optional solution, such as Figure 2 As shown, the third magnetic sensor 40 is arranged at a third preset position on the inner side of the above-mentioned train track 10, and the fourth magnetic sensor 50 is arranged at a fourth preset position on the inner side of the above-mentioned train track 10. The above-mentioned third preset position and the above-mentioned fourth preset position are located on different inner sides of the above-mentioned train track 10. The third direction is perpendicular to the length direction of the above-mentioned train track 10. The above-mentioned third direction starts from the above-mentioned third preset position and ends at the above-mentioned fourth preset position. The above-mentioned third magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter. When the above-mentioned axle passes directly above the above-mentioned third magnetic sensor, the above-mentioned third magnetic sensor sends a third electrical signal to the above-mentioned analog-to-digital converter. The above-mentioned analog-to-digital converter is used to convert the above-mentioned third electrical signal into a third digital signal and send the above-mentioned third digital signal to the above-mentioned controller. The above-mentioned fourth magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter. When the above-mentioned axle passes directly above the above-mentioned fourth magnetic sensor, the above-mentioned fourth magnetic sensor sends a fourth electrical signal to the above-mentioned analog-to-digital converter. The above-mentioned analog-to-digital converter is used to convert the above-mentioned fourth electrical signal into a fourth digital signal and send the above-mentioned fourth digital signal to the above-mentioned controller. Before the above-mentioned step S202, the above-mentioned method further includes:
[0040] The controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received;
[0041] When the analog-to-digital converter receives the third electrical signal and the fourth electrical signal, the controller determines a result, where the result indicates that the train is passing through the first preset position.
[0042] In this embodiment, a third magnetic sensor and a fourth magnetic sensor are arranged on different inner sides of the train track. When the analog-to-digital converter receives the electrical signal from the third magnetic sensor and the electrical signal from the fourth magnetic sensor, it is determined that a train is indeed passing through the first preset position, eliminating the possibility of interference from other magnetic conductive materials. Then, the controller determines the number of axles passing through the first preset position and locates the train based on the number of axles at the first preset position, thereby improving the accuracy of train positioning.
[0043] In order to promptly eliminate interference from other magnetically conductive materials, in an optional solution, the controller is in communication with an alarm. After the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received, the method further includes:
[0044] The controller generates a first alarm message when the analog-to-digital converter receives the third electrical signal but does not receive the fourth electrical signal. The controller generates a second alarm message when the analog-to-digital converter receives the fourth electrical signal but does not receive the third electrical signal. The first alarm message is information indicating that the third magnetic sensor is abnormal, and the second alarm message is information indicating that the fourth magnetic sensor is abnormal.
[0045] In this embodiment, when the analog-to-digital converter receives the third electrical signal and does not receive the above-mentioned fourth electrical signal, it indicates that other magnetic materials may have passed through the third magnetic sensor. At this time, the alarm sounds an alarm to remind the staff to promptly remove the magnetic materials near the third magnetic sensor. When the analog-to-digital converter receives the fourth electrical signal and does not receive the above-mentioned third electrical signal, it indicates that other magnetic materials may have passed through the fourth magnetic sensor. At this time, the alarm sounds an alarm to remind the staff to promptly remove the magnetic materials near the fourth magnetic sensor.
[0046] In order to determine the direction of travel of the train, in an optional solution, such as Figure 2 As shown, the second magnetic sensor 30 is disposed at a second preset position on the inner side of the train track 10. The second preset position and the first preset position are located on the same inner side of the train track 10. The first direction is the same as the length direction of the train track 10. The first direction starts from the first preset position and ends at the second preset position. The second magnetic sensor 30 is communicatively connected to the analog-to-digital converter. When the axle passes directly above the second magnetic sensor, the second magnetic sensor sends a second electrical signal to the analog-to-digital converter. The analog-to-digital converter is used to convert the second electrical signal into a second digital signal and send the second digital signal to the controller. Before step S202, the method further includes:
[0047] The controller obtains a first time and a second time from the analog-to-digital converter, wherein the first time is the time when the analog-to-digital converter receives the first first electrical signal from the first magnetic sensor, and the second time is the time when the analog-to-digital converter receives the first second electrical signal from the second magnetic sensor;
[0048] When the first moment is less than the second moment, the controller determines that the running direction of the train is the first direction. When the first moment is greater than the second moment, the controller determines that the running direction of the train is the second direction. The second direction starts from the second preset position and ends at the first preset position.
[0049] In this embodiment, when the analog-to-digital converter first receives the first electrical signal from the first magnetic sensor and then receives the second electrical signal from the second magnetic sensor, the train's traveling direction is determined to be the first direction; when the analog-to-digital converter first receives the second electrical signal from the second magnetic sensor and then receives the first electrical signal from the first magnetic sensor, the train's traveling direction is determined to be the second direction.
[0050] In order to determine the running speed of the train, after the controller obtains the first time and the second time from the analog-to-digital converter, the method further includes:
[0051] The controller calculates the absolute value of the difference between the first moment and the second moment to obtain the running time;
[0052] The controller calculates the ratio of the running distance to the running time to obtain the running speed, wherein the running distance is the distance between the first preset position and the second preset position, and the running speed is the running speed of the train.
[0053] In this embodiment, for example, the distance between the first preset position and the second preset position is L, and the time difference between the moment when the analog-to-digital converter receives the first electrical signal from the first magnetic sensor and the moment when the analog-to-digital converter receives the second electrical signal from the second magnetic sensor is T. According to the formula V=L / T, the running speed V is obtained, that is, the traveling speed of the train is obtained.
[0054] In step S203, the controller determines that the locomotive has not completely traveled past the first preset position when the first number is less than or equal to a second number, where the second number is the number of the axles of the locomotive.
[0055] Specifically, when the number of axles passing through the first preset position is less than or equal to the number of axles of the locomotive, it is determined that the locomotive has not completely passed the first preset position. For example, the number of axles of the locomotive (first number) is 6, and the number of axles passing through the first preset position (second number) is 4. At this time, the first preset position is between the 4th and 5th axles of the locomotive. The number of axles of the locomotive (first number) is 6, and the number of axles passing through the first preset position (second number) is 6. At this time, it is determined that the first preset position is at the connection position between the locomotive and the first carriage.
[0056] It should be noted that in this application, the connection point between the locomotive and the first carriage belongs to the locomotive.
[0057] Through the above embodiment, when an axle passes through the first magnetic sensor, the magnetic field of the first magnetic sensor changes. The first magnetic sensor converts the magnetic field change into a first electrical signal and sends it to the analog-to-digital converter. The analog-to-digital converter converts the first electrical signal into a first digital signal and sends the first digital signal to the controller. The controller determines that the number of first digital signals is the number of axles passing through the first preset position. When the number of axles passing through the first preset position is less than or equal to the number of axles of the locomotive, the controller determines that the locomotive has not completely passed the first preset position, thereby achieving the positioning of the train. Compared with the prior art that uses photoelectric sensors that are easily interfered with by the external environment to locate the train, resulting in inaccurate train positioning, the first magnetic sensor of the present application does not come into direct contact with the axle, and uses an active magnetic field, is not affected by the external environment, is stable and reliable when used, and can achieve accurate positioning of the train. This method solves the problem of the prior art that uses photoelectric sensors that are easily interfered with by the external environment to locate the train, resulting in inaccurate train positioning.
[0058] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0059] The embodiments of the present application also provide a controller. It should be noted that the controller of the embodiments of the present application can be used to execute the train positioning method provided by the embodiments of the present application. The device is used to implement the above-mentioned embodiments and preferred embodiments, and the details that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation by hardware, or a combination of software and hardware, is also possible and contemplated.
[0060] The following is an introduction to the controller provided in the embodiments of the present application.
[0061] Figure 3 Schematic diagram of a controller according to an embodiment of the present application. Figure 3 As shown, the controller includes:
[0062] The receiving unit 400 is configured to receive the plurality of first digital signals from the analog-to-digital converter, wherein the first digital signals correspond one-to-one to the first electrical signals;
[0063] Specifically, a first digital signal represents that an axle passes through a first preset position.
[0064] It should be noted that if Figure 2 As shown, a train runs on a train track 10, the train includes a locomotive, the locomotive includes multiple axles, a first magnetic sensor 20 is set at a first preset position on the inner side of the train track 10, the first magnetic sensor 20 is communicatively connected to the analog-to-digital converter, when the axle passes directly above the first magnetic sensor 20, the first magnetic sensor 20 sends a first electrical signal to the analog-to-digital converter, the analog-to-digital converter is communicatively connected to the controller, the analog-to-digital converter is used to convert the first electrical signal into a first digital signal and send the first digital signal to the controller, and the train positioning method is applied to the controller.
[0065] It should also be noted that the axle is a magnetic object. When the axle passes through the first magnetic sensor, the magnetic field of the first magnetic sensor changes. The first magnetic sensor converts the magnetic field change into a first electrical signal and sends it to the analog-to-digital converter. The analog-to-digital converter is used to convert the first electrical signal into a first digital signal and send the first digital signal to the controller.
[0066] A first determining unit 500 is configured to determine a first quantity based on all the first digital signals, where the first quantity is the quantity of the first digital signals;
[0067] Specifically, the number of the first digital signals represents the number of axles passing through the first preset position.
[0068] In order to achieve the positioning of the train, in an optional solution, the train further includes a plurality of carriages, each carriage includes a preset number of axles, and the controller further includes:
[0069] The third determining unit is used to determine, when the first number is greater than the second number, The quotient of is the third quantity, determine The remainder is the fourth number, wherein Y is the first number, X1 is the second number, X2 is the preset number, the third number is the number of the carriages that have completely passed the first preset position at the current moment, the fourth number is the number of target axles that have completely passed the first preset position at the current moment, and the target axle is the axle of the carriage that has not completely passed the first preset position at the current moment.
[0070] In this embodiment, for example, the number of axles at the first preset position (the first number) is 15, the number of axles of the locomotive (the second number) is 6, and the number of axles of each carriage (the preset number) is 4. The quotient is 2 and the remainder is 1, that is, the number of cars that have completely passed the first preset position at the current moment (the third number) is 2, the car that has not completely passed the first preset position at the current moment is the third car, and the number of axles in the third car that have completely passed the first preset position at the current moment (the fourth number) is 1. At the current moment, the first preset position is between the first axle and the second axle of the third car.
[0071] In order to improve the accuracy of train positioning, in an optional solution, such as Figure 2 As shown, the third magnetic sensor 40 is arranged at a third preset position on the inner side of the above-mentioned train track 10, and the fourth magnetic sensor 50 is arranged at a fourth preset position on the inner side of the above-mentioned train track 10. The above-mentioned third preset position and the above-mentioned fourth preset position are located on different inner sides of the above-mentioned train track 10. The third direction is perpendicular to the length direction of the above-mentioned train track 10. The above-mentioned third direction starts from the above-mentioned third preset position and ends at the above-mentioned fourth preset position. The above-mentioned third magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter. When the above-mentioned axle passes directly above the above-mentioned third magnetic sensor, the above-mentioned third magnetic sensor sends a third electrical signal to the above-mentioned analog-to-digital converter. The above-mentioned analog-to-digital converter is used to convert the above-mentioned third electrical signal into a third digital signal and send the above-mentioned third digital signal to the above-mentioned controller. The above-mentioned fourth magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter. When the above-mentioned axle passes directly above the above-mentioned fourth magnetic sensor, the above-mentioned fourth magnetic sensor sends a fourth electrical signal to the above-mentioned analog-to-digital converter. The above-mentioned analog-to-digital converter is used to convert the above-mentioned fourth electrical signal into a fourth digital signal and send the above-mentioned fourth digital signal to the above-mentioned controller. The above-mentioned controller also includes:
[0072] a control unit, configured to control the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received;
[0073] The fourth determining unit is configured to determine a result when the analog-to-digital converter receives the third electrical signal and the fourth electrical signal, wherein the result indicates that the train is passing through the first preset position.
[0074] In this embodiment, a third magnetic sensor and a fourth magnetic sensor are arranged on different inner sides of the train track. When the analog-to-digital converter receives the electrical signal from the third magnetic sensor and the electrical signal from the fourth magnetic sensor, it is determined that a train is indeed passing through the first preset position, eliminating the possibility of interference from other magnetic conductive materials. Then, the controller determines the number of axles passing through the first preset position and locates the train based on the number of axles at the first preset position, thereby improving the accuracy of train positioning.
[0075] In order to promptly eliminate interference from other magnetically conductive materials, in an optional solution, the controller is communicatively connected to the alarm, and the controller further includes:
[0076] The generating unit is used to generate a first alarm message when the above-mentioned analog-to-digital converter receives the above-mentioned third electrical signal but does not receive the above-mentioned fourth electrical signal. The above-mentioned controller generates a second alarm message when the above-mentioned analog-to-digital converter receives the above-mentioned fourth electrical signal but does not receive the above-mentioned third electrical signal. The above-mentioned first alarm message is information indicating that the above-mentioned third magnetic sensor is abnormal, and the above-mentioned second alarm message is information indicating that the above-mentioned fourth magnetic sensor is abnormal.
[0077] In this embodiment, when the analog-to-digital converter receives the third electrical signal and does not receive the above-mentioned fourth electrical signal, it indicates that other magnetic materials may have passed through the third magnetic sensor. At this time, the alarm sounds an alarm to remind the staff to promptly remove the magnetic materials near the third magnetic sensor. When the analog-to-digital converter receives the fourth electrical signal and does not receive the above-mentioned third electrical signal, it indicates that other magnetic materials may have passed through the fourth magnetic sensor. At this time, the alarm sounds an alarm to remind the staff to promptly remove the magnetic materials near the fourth magnetic sensor.
[0078] In order to determine the direction of travel of the train, in an optional solution, such as Figure 2 As shown, the second magnetic sensor 30 is disposed at a second preset position on the inner side of the train track 10. The second preset position and the first preset position are located on the same inner side of the train track 10. The first direction is the same as the length direction of the train track 10. The first direction starts from the first preset position and ends at the second preset position. The second magnetic sensor 30 is communicatively connected to the analog-to-digital converter. When the axle passes directly above the second magnetic sensor, the second magnetic sensor sends a second electrical signal to the analog-to-digital converter. The analog-to-digital converter is used to convert the second electrical signal into a second digital signal and send the second digital signal to the controller. The controller further includes:
[0079] an acquiring unit, configured to acquire a first moment and a second moment from the analog-to-digital converter, wherein the first moment is a moment when the analog-to-digital converter receives the first first electrical signal from the first magnetic sensor, and the second moment is a moment when the analog-to-digital converter receives the first second electrical signal from the second magnetic sensor;
[0080] The fifth determination unit is used to determine that the running direction of the above-mentioned train is the first direction when the above-mentioned first moment is less than the above-mentioned second moment, and the above-mentioned controller determines that the running direction of the above-mentioned train is the second direction when the above-mentioned first moment is greater than the above-mentioned second moment, and the above-mentioned second direction starts from the above-mentioned second preset position and ends at the above-mentioned first preset position.
[0081] In this embodiment, when the analog-to-digital converter first receives the first electrical signal from the first magnetic sensor and then receives the second electrical signal from the second magnetic sensor, the train's traveling direction is determined to be the first direction; when the analog-to-digital converter first receives the second electrical signal from the second magnetic sensor and then receives the first electrical signal from the first magnetic sensor, the train's traveling direction is determined to be the second direction.
[0082] In order to determine the speed of the train, the controller also includes:
[0083] A first calculation unit is used to calculate the absolute value of the difference between the first moment and the second moment to obtain the running time;
[0084] The second calculation unit is used to calculate the ratio of the running distance to the above-mentioned running time to obtain the running speed, the above-mentioned running distance is the distance between the above-mentioned first preset position and the above-mentioned second preset position, and the above-mentioned running speed is the running speed of the above-mentioned train.
[0085] In this embodiment, for example, the distance between the first preset position and the second preset position is L, and the time difference between the moment when the analog-to-digital converter receives the first electrical signal from the first magnetic sensor and the moment when the analog-to-digital converter receives the second electrical signal from the second magnetic sensor is T. According to the formula V=L / T, the running speed V is obtained, that is, the traveling speed of the train is obtained.
[0086] The second determining unit 600 is configured to determine that the locomotive has not completely traveled past the first preset position when the first number is less than or equal to a second number, where the second number is the number of the axles of the locomotive.
[0087] Specifically, when the number of axles passing through the first preset position is less than or equal to the number of axles of the locomotive, it is determined that the locomotive has not completely passed the first preset position. For example, the number of axles of the locomotive (the first number) is 6, and the number of axles passing through the first preset position (the second number) is 4. At this time, the first preset position is between the 4th and 5th axles of the locomotive. The number of axles of the locomotive (the first number) is 6, and the number of axles passing through the first preset position (the second number) is 6. At this time, it is determined that the first preset position is the connection position between the locomotive and the first carriage.
[0088] It should be noted that in this application, the connection point between the locomotive and the first carriage belongs to the locomotive.
[0089] Through the above embodiment, when an axle passes through the first magnetic sensor, the magnetic field of the first magnetic sensor changes. The first magnetic sensor converts the magnetic field change into a first electrical signal and sends it to the analog-to-digital converter. The analog-to-digital converter converts the first electrical signal into a first digital signal and sends the first digital signal to the controller. The controller determines that the number of first digital signals is the number of axles passing through the first preset position. When the number of axles passing through the first preset position is less than or equal to the number of axles of the locomotive, the controller determines that the locomotive has not completely passed the first preset position, thereby achieving the positioning of the train. Compared with the prior art that uses photoelectric sensors that are easily interfered with by the external environment to locate the train, resulting in inaccurate train positioning, the first magnetic sensor of the present application does not come into direct contact with the axle, and uses an active magnetic field, is not affected by the external environment, is stable and reliable when used, and can achieve accurate positioning of the train. The controller solves the problem of the prior art that uses photoelectric sensors that are easily interfered with by the external environment to locate the train, resulting in inaccurate train positioning.
[0090] The controller includes a processor and a memory. The receiving unit, the first determining unit, the second determining unit, and the like are all stored as program units in the memory. The processor executes the program units stored in the memory to implement the corresponding functions. The modules are all located in the same processor; alternatively, the modules may be located in different processors in any combination.
[0091] The processor includes a core, which retrieves the corresponding program unit from memory. One or more cores can be configured, and kernel parameters can be adjusted to address the inaccurate positioning of trains using photoelectric sensors that are susceptible to interference from the external environment.
[0092] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0093] An embodiment of the present invention provides a train positioning system, comprising: a controller, the controller being used to execute the above-mentioned train positioning method; an analog-to-digital converter, the analog-to-digital converter being communicatively connected to the controller; a first magnetic sensor, the first magnetic sensor being communicatively connected to the analog-to-digital converter; a second magnetic sensor, the second magnetic sensor being communicatively connected to the analog-to-digital converter; a third magnetic sensor, the third magnetic sensor being communicatively connected to the analog-to-digital converter; a fourth magnetic sensor, the fourth magnetic sensor being communicatively connected to the analog-to-digital converter; and an alarm, the alarm being communicatively connected to the controller.
[0094] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program is executed, the device where the computer-readable storage medium is located is controlled to execute the train positioning method.
[0095] Specifically, the train positioning method includes:
[0096] Step S201, the controller receives a plurality of the first digital signals from the analog-to-digital converter, wherein the first digital signals correspond one-to-one to the first electrical signals;
[0097] Specifically, a first digital signal represents that an axle passes through a first preset position.
[0098] Step S202, the controller determines a first quantity based on all the first digital signals, where the first quantity is the quantity of the first digital signals;
[0099] Specifically, the number of the first digital signals represents the number of axles passing through the first preset position.
[0100] In step S203, the controller determines that the locomotive has not completely traveled past the first preset position when the first number is less than or equal to a second number, where the second number is the number of the axles of the locomotive.
[0101] Specifically, when the number of axles passing through the first preset position is less than or equal to the number of axles of the locomotive, it is determined that the locomotive has not completely passed the first preset position. For example, the number of axles of the locomotive (first number) is 6, and the number of axles passing through the first preset position (second number) is 4. At this time, the first preset position is between the 4th and 5th axles of the locomotive. The number of axles of the locomotive (first number) is 6, and the number of axles passing through the first preset position (second number) is 6. At this time, it is determined that the first preset position is at the connection position between the locomotive and the first carriage.
[0102] Optionally, the train further comprises a plurality of carriages, each carriage comprising a preset number of axles, and after the controller determines the first number based on all the first digital signals, the method further comprises: if the first number is greater than the second number, the controller determines The quotient of is the third quantity, determine The remainder is the fourth number, wherein Y is the first number, X1 is the second number, X2 is the preset number, the third number is the number of the carriages that have completely passed the first preset position at the current moment, the fourth number is the number of target axles that have completely passed the first preset position at the current moment, and the target axle is the axle of the carriage that has not completely passed the first preset position at the current moment.
[0103] Optionally, the second magnetic sensor is arranged at a second preset position on the inner side of the above-mentioned train track, the second preset position and the first preset position are located on the same inner side of the above-mentioned train track, the first direction is the same as the length direction of the above-mentioned train track, the first direction starts from the above-mentioned first preset position and ends at the above-mentioned second preset position, the second magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter, when the above-mentioned axle passes directly above the above-mentioned second magnetic sensor, the above-mentioned second magnetic sensor sends a second electrical signal to the above-mentioned analog-to-digital converter, the above-mentioned analog-to-digital converter is used to convert the above-mentioned second electrical signal into a second digital signal and send the above-mentioned second digital signal to the above-mentioned controller, and the above-mentioned controller converts the above-mentioned second electrical signal into a second digital signal according to all the above-mentioned first digital signals. Before determining the first quantity, the method further includes: the controller obtains a first moment and a second moment from the analog-to-digital converter, the first moment being the moment when the analog-to-digital converter receives the first first electrical signal from the first magnetic sensor, and the second moment being the moment when the analog-to-digital converter receives the first second electrical signal from the second magnetic sensor; when the first moment is less than the second moment, the controller determines that the running direction of the train is the first direction, and when the first moment is greater than the second moment, the controller determines that the running direction of the train is the second direction, and the second direction starts from the second preset position and ends at the first preset position.
[0104] Optionally, after the controller obtains the first moment and the second moment from the analog-to-digital converter, the method further includes: the controller calculates the absolute value of the difference between the first moment and the second moment to obtain the running time; the controller calculates the ratio of the running distance to the running time to obtain the running speed, the running distance being the distance between the first preset position and the second preset position, and the running speed being the running speed of the train.
[0105] Optionally, the third magnetic sensor is arranged at a third preset position on the inner side of the above-mentioned train track, and the fourth magnetic sensor is arranged at a fourth preset position on the inner side of the above-mentioned train track. The above-mentioned third preset position and the above-mentioned fourth preset position are located on different inner sides of the above-mentioned train track. The third direction is perpendicular to the length direction of the above-mentioned train track. The above-mentioned third direction starts at the above-mentioned third preset position and ends at the above-mentioned fourth preset position. The above-mentioned third magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter. When the above-mentioned axle passes directly above the above-mentioned third magnetic sensor, the above-mentioned third magnetic sensor sends a third electrical signal to the above-mentioned analog-to-digital converter. The above-mentioned analog-to-digital converter is used to convert the above-mentioned third electrical signal into a third digital signal and send the above-mentioned third digital signal to the above-mentioned controller. The fourth magnetic sensor is communicatively connected to the analog-to-digital converter. When the axle passes directly above the fourth magnetic sensor, the fourth magnetic sensor sends a fourth electrical signal to the analog-to-digital converter. The analog-to-digital converter is used to convert the fourth electrical signal into a fourth digital signal and send the fourth digital signal to the controller. Before the controller determines the first quantity based on all the first digital signals, the method further includes: the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received; the controller determines a result when the analog-to-digital converter receives the third electrical signal and the fourth electrical signal, and the result indicates that the train is passing through the first preset position.
[0106] Optionally, the controller is communicatively connected to the alarm. After the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received, the method further includes: the controller generates a first alarm message when the analog-to-digital converter receives the third electrical signal but does not receive the fourth electrical signal; the controller generates a second alarm message when the analog-to-digital converter receives the fourth electrical signal but does not receive the third electrical signal. The first alarm message is information indicating that the third magnetic sensor is abnormal, and the second alarm message is information indicating that the fourth magnetic sensor is abnormal.
[0107] An embodiment of the present invention provides a processor, which is used to run a program, wherein the train positioning method is executed when the program is run.
[0108] Specifically, the train positioning method includes:
[0109] Step S201, the controller receives a plurality of the first digital signals from the analog-to-digital converter, wherein the first digital signals correspond one-to-one to the first electrical signals;
[0110] Specifically, a first digital signal represents that an axle passes through a first preset position.
[0111] Step S202, the controller determines a first quantity based on all the first digital signals, where the first quantity is the quantity of the first digital signals;
[0112] Specifically, the number of the first digital signals represents the number of axles passing through the first preset position.
[0113] In step S203, the controller determines that the locomotive has not completely traveled past the first preset position when the first number is less than or equal to a second number, where the second number is the number of the axles of the locomotive.
[0114] Specifically, when the number of axles passing through the first preset position is less than or equal to the number of axles of the locomotive, it is determined that the locomotive has not completely passed the first preset position. For example, the number of axles of the locomotive (first number) is 6, and the number of axles passing through the first preset position (second number) is 4. At this time, the first preset position is between the 4th and 5th axles of the locomotive. The number of axles of the locomotive (first number) is 6, and the number of axles passing through the first preset position (second number) is 6. At this time, it is determined that the first preset position is at the connection position between the locomotive and the first carriage.
[0115] Optionally, the train further comprises a plurality of carriages, each carriage comprising a preset number of axles, and after the controller determines the first number based on all the first digital signals, the method further comprises: if the first number is greater than the second number, the controller determines The quotient of is the third quantity, determine The remainder is the fourth number, wherein Y is the first number, X1 is the second number, X2 is the preset number, the third number is the number of the carriages that have completely passed the first preset position at the current moment, the fourth number is the number of target axles that have completely passed the first preset position at the current moment, and the target axle is the axle of the carriage that has not completely passed the first preset position at the current moment.
[0116] Optionally, the second magnetic sensor is arranged at a second preset position on the inner side of the above-mentioned train track, the second preset position and the first preset position are located on the same inner side of the above-mentioned train track, the first direction is the same as the length direction of the above-mentioned train track, the first direction starts from the above-mentioned first preset position and ends at the above-mentioned second preset position, the second magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter, when the above-mentioned axle passes directly above the above-mentioned second magnetic sensor, the above-mentioned second magnetic sensor sends a second electrical signal to the above-mentioned analog-to-digital converter, the above-mentioned analog-to-digital converter is used to convert the above-mentioned second electrical signal into a second digital signal and send the above-mentioned second digital signal to the above-mentioned controller, and the above-mentioned controller converts the above-mentioned second electrical signal into a second digital signal according to all the above-mentioned first digital signals. Before determining the first quantity, the method further includes: the controller obtains a first moment and a second moment from the analog-to-digital converter, the first moment being the moment when the analog-to-digital converter receives the first first electrical signal from the first magnetic sensor, and the second moment being the moment when the analog-to-digital converter receives the first second electrical signal from the second magnetic sensor; when the first moment is less than the second moment, the controller determines that the running direction of the train is the first direction, and when the first moment is greater than the second moment, the controller determines that the running direction of the train is the second direction, and the second direction starts from the second preset position and ends at the first preset position.
[0117] Optionally, after the controller obtains the first moment and the second moment from the analog-to-digital converter, the method further includes: the controller calculates the absolute value of the difference between the first moment and the second moment to obtain the running time; the controller calculates the ratio of the running distance to the running time to obtain the running speed, the running distance being the distance between the first preset position and the second preset position, and the running speed being the running speed of the train.
[0118] Optionally, the third magnetic sensor is arranged at a third preset position on the inner side of the above-mentioned train track, and the fourth magnetic sensor is arranged at a fourth preset position on the inner side of the above-mentioned train track. The above-mentioned third preset position and the above-mentioned fourth preset position are located on different inner sides of the above-mentioned train track. The third direction is perpendicular to the length direction of the above-mentioned train track. The above-mentioned third direction starts at the above-mentioned third preset position and ends at the above-mentioned fourth preset position. The above-mentioned third magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter. When the above-mentioned axle passes directly above the above-mentioned third magnetic sensor, the above-mentioned third magnetic sensor sends a third electrical signal to the above-mentioned analog-to-digital converter. The above-mentioned analog-to-digital converter is used to convert the above-mentioned third electrical signal into a third digital signal and send the above-mentioned third digital signal to the above-mentioned controller. The fourth magnetic sensor is communicatively connected to the analog-to-digital converter. When the axle passes directly above the fourth magnetic sensor, the fourth magnetic sensor sends a fourth electrical signal to the analog-to-digital converter. The analog-to-digital converter is used to convert the fourth electrical signal into a fourth digital signal and send the fourth digital signal to the controller. Before the controller determines the first quantity based on all the first digital signals, the method further includes: the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received; the controller determines a result when the analog-to-digital converter receives the third electrical signal and the fourth electrical signal, and the result indicates that the train is passing through the first preset position.
[0119] Optionally, the controller is communicatively connected to the alarm. After the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received, the method further includes: the controller generates a first alarm message when the analog-to-digital converter receives the third electrical signal but does not receive the fourth electrical signal; the controller generates a second alarm message when the analog-to-digital converter receives the fourth electrical signal but does not receive the third electrical signal. The first alarm message is information indicating that the third magnetic sensor is abnormal, and the second alarm message is information indicating that the fourth magnetic sensor is abnormal.
[0120] The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program for initializing at least the following method steps:
[0121] Step S201, the controller receives a plurality of the first digital signals from the analog-to-digital converter, wherein the first digital signals correspond one-to-one to the first electrical signals;
[0122] Step S202, the controller determines a first quantity based on all the first digital signals, where the first quantity is the quantity of the first digital signals;
[0123] In step S203, the controller determines that the locomotive has not completely traveled past the first preset position when the first number is less than or equal to a second number, where the second number is the number of the axles of the locomotive.
[0124] Optionally, the train further comprises a plurality of carriages, each carriage comprising a preset number of axles, and after the controller determines the first number based on all the first digital signals, the method further comprises: if the first number is greater than the second number, the controller determines The quotient of is the third quantity, determine The remainder is the fourth number, wherein Y is the first number, X1 is the second number, X2 is the preset number, the third number is the number of the carriages that have completely passed the first preset position at the current moment, the fourth number is the number of target axles that have completely passed the first preset position at the current moment, and the target axle is the axle of the carriage that has not completely passed the first preset position at the current moment.
[0125] Optionally, the second magnetic sensor is arranged at a second preset position on the inner side of the above-mentioned train track, the second preset position and the first preset position are located on the same inner side of the above-mentioned train track, the first direction is the same as the length direction of the above-mentioned train track, the first direction starts from the above-mentioned first preset position and ends at the above-mentioned second preset position, the second magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter, when the above-mentioned axle passes directly above the above-mentioned second magnetic sensor, the above-mentioned second magnetic sensor sends a second electrical signal to the above-mentioned analog-to-digital converter, the above-mentioned analog-to-digital converter is used to convert the above-mentioned second electrical signal into a second digital signal and send the above-mentioned second digital signal to the above-mentioned controller, and the above-mentioned controller converts the above-mentioned second electrical signal into a second digital signal according to all the above-mentioned first digital signals. Before determining the first quantity, the method further includes: the controller obtains a first moment and a second moment from the analog-to-digital converter, the first moment being the moment when the analog-to-digital converter receives the first first electrical signal from the first magnetic sensor, and the second moment being the moment when the analog-to-digital converter receives the first second electrical signal from the second magnetic sensor; when the first moment is less than the second moment, the controller determines that the running direction of the train is the first direction, and when the first moment is greater than the second moment, the controller determines that the running direction of the train is the second direction, and the second direction starts from the second preset position and ends at the first preset position.
[0126] Optionally, after the controller obtains the first moment and the second moment from the analog-to-digital converter, the method further includes: the controller calculates the absolute value of the difference between the first moment and the second moment to obtain the running time; the controller calculates the ratio of the running distance to the running time to obtain the running speed, the running distance being the distance between the first preset position and the second preset position, and the running speed being the running speed of the train.
[0127] Optionally, the third magnetic sensor is arranged at a third preset position on the inner side of the above-mentioned train track, and the fourth magnetic sensor is arranged at a fourth preset position on the inner side of the above-mentioned train track. The above-mentioned third preset position and the above-mentioned fourth preset position are located on different inner sides of the above-mentioned train track. The third direction is perpendicular to the length direction of the above-mentioned train track. The above-mentioned third direction starts at the above-mentioned third preset position and ends at the above-mentioned fourth preset position. The above-mentioned third magnetic sensor is communicatively connected with the above-mentioned analog-to-digital converter. When the above-mentioned axle passes directly above the above-mentioned third magnetic sensor, the above-mentioned third magnetic sensor sends a third electrical signal to the above-mentioned analog-to-digital converter. The above-mentioned analog-to-digital converter is used to convert the above-mentioned third electrical signal into a third digital signal and send the above-mentioned third digital signal to the above-mentioned controller. The fourth magnetic sensor is communicatively connected to the analog-to-digital converter. When the axle passes directly above the fourth magnetic sensor, the fourth magnetic sensor sends a fourth electrical signal to the analog-to-digital converter. The analog-to-digital converter is used to convert the fourth electrical signal into a fourth digital signal and send the fourth digital signal to the controller. Before the controller determines the first quantity based on all the first digital signals, the method further includes: the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received; the controller determines a result when the analog-to-digital converter receives the third electrical signal and the fourth electrical signal, and the result indicates that the train is passing through the first preset position.
[0128] Optionally, the controller is communicatively connected to the alarm. After the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received, the method further includes: the controller generates a first alarm message when the analog-to-digital converter receives the third electrical signal but does not receive the fourth electrical signal; the controller generates a second alarm message when the analog-to-digital converter receives the fourth electrical signal but does not receive the third electrical signal. The first alarm message is information indicating that the third magnetic sensor is abnormal, and the second alarm message is information indicating that the fourth magnetic sensor is abnormal.
[0129] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0130] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0131] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0132] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0134] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0135] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0136] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0137] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0138] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0139] 1) The train positioning method of the present application, a train running on a train track, the train including a locomotive, the locomotive including multiple axles, a first magnetic sensor arranged at a first preset position on the inner side of the train track, the first magnetic sensor being communicatively connected to an analog-to-digital converter, when the axle passes directly above the first magnetic sensor, the first magnetic sensor sending a first electrical signal to the analog-to-digital converter, the analog-to-digital converter being communicatively connected to a controller, the analog-to-digital converter being used to convert the first electrical signal into a first digital signal and sending the first digital signal to the controller, the train positioning method being applied to the controller, the method comprising: the controller receiving multiple first digital signals from the analog-to-digital converter, the first digital signals corresponding one-to-one to the first electrical signals; the controller determining a first number based on all the first digital signals, the first number being the number of the first digital signals; the controller determining that the locomotive has not completely passed the first preset position when the first number is less than or equal to a second number, the second number being the number of the axles of the locomotive. When an axle passes through the first magnetic sensor, the magnetic field of the first magnetic sensor changes. The first magnetic sensor converts the magnetic field change into a first electrical signal and sends it to the analog-to-digital converter. The analog-to-digital converter converts the first electrical signal into a first digital signal and sends the first digital signal to the controller. The controller determines that the number of first digital signals is the number of axles passing through the first preset position. When the number of axles passing through the first preset position is less than or equal to the number of axles of the locomotive, the controller determines that the locomotive has not completely passed the first preset position, thereby achieving the positioning of the train. Compared with the prior art that uses photoelectric sensors that are easily interfered with by the external environment to position the train, resulting in inaccurate train positioning, the first magnetic sensor of the present application will not have direct contact with the axle, and uses an active magnetic field, which is not affected by the external environment. It is stable and reliable when used, and can achieve accurate positioning of the train. This method solves the problem of the prior art that uses photoelectric sensors that are easily interfered with by the external environment to position the train, resulting in inaccurate train positioning.
[0140] 2) The controller of the present application is a train running on a train track, the train including a locomotive, the locomotive including multiple axles, a first magnetic sensor arranged at a first preset position on the inner side of the train track, the first magnetic sensor being communicatively connected to an analog-to-digital converter, and when the axle passes directly above the first magnetic sensor, the first magnetic sensor sends a first electrical signal to the analog-to-digital converter, the analog-to-digital converter being communicatively connected to the controller, the analog-to-digital converter being used to convert the first electrical signal into a first digital signal and send the first digital signal to the controller, the train positioning method being applied to the controller, the controller including: the controller receiving multiple first digital signals from the analog-to-digital converter, the first digital signals corresponding one-to-one to the first electrical signals; the controller determining a first number based on all the first digital signals, the first number being the number of the first digital signals; the controller determining that the locomotive has not completely passed the first preset position when the first number is less than or equal to a second number, the second number being the number of the axles of the locomotive. When an axle passes through the first magnetic sensor, the magnetic field of the first magnetic sensor changes. The first magnetic sensor converts the magnetic field change into a first electrical signal and sends it to the analog-to-digital converter. The analog-to-digital converter converts the first electrical signal into a first digital signal and sends the first digital signal to the controller. The controller determines that the number of first digital signals is the number of axles passing through the first preset position. When the number of axles passing through the first preset position is less than or equal to the number of axles of the locomotive, the controller determines that the locomotive has not completely passed the first preset position, thereby achieving the positioning of the train. Compared with the prior art that uses photoelectric sensors that are easily interfered with by the external environment to position the train, resulting in inaccurate train positioning, the first magnetic sensor of the present application will not have direct contact with the axle, and uses an active magnetic field, which is not affected by the external environment. It is stable and reliable when used, and can achieve accurate positioning of the train. The controller solves the problem of the prior art that uses photoelectric sensors that are easily interfered with by the external environment to position the train, resulting in inaccurate train positioning.
[0141] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Persons skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A train positioning method, characterized in that: A train runs on a train track, the train including a locomotive including multiple axles, a first magnetic sensor disposed at a first preset position on the inner side of the train track, the first magnetic sensor being communicatively connected to an analog-to-digital converter, and when the axle passes directly above the first magnetic sensor, the first magnetic sensor sends a first electrical signal to the analog-to-digital converter, the analog-to-digital converter being communicatively connected to a controller, the analog-to-digital converter being configured to convert the first electrical signal into a first digital signal and send the first digital signal to the controller, the train positioning method being applied to the controller, the method comprising: The controller receives a plurality of the first digital signals from the analog-to-digital converter, wherein the first digital signals correspond one-to-one to the first electrical signals; The controller determines a first quantity according to all the first digital signals, where the first quantity is the quantity of the first digital signals; The controller determines that the locomotive has not completely traveled past the first preset position if the first number is less than or equal to a second number, the second number being the number of the axles of the locomotive; Wherein, the train further comprises a plurality of carriages, each carriage comprising a preset number of axles, and after the controller determines the first number according to all the first digital signals, the method further comprises: the controller determines if the first number is greater than the second number The quotient of is the third quantity, determine The remainder is the fourth number, wherein Y is the first number, X1 is the second number, X2 is the preset number, the third number is the number of the carriages that have completely passed the first preset position at the current moment, the fourth number is the number of target axles that have completely passed the first preset position at the current moment, and the target axle is the axle of the carriage that has not completely passed the first preset position at the current moment.
2. The positioning method according to claim 1, wherein: The second magnetic sensor is disposed at a second preset position on the inner side of the train track, the second preset position and the first preset position being located on the same inner side of the train track, the first direction being the same as the length direction of the train track, the first direction starting from the first preset position and ending at the second preset position, the second magnetic sensor being communicatively connected to the analog-to-digital converter, and when the axle passes directly above the second magnetic sensor, the second magnetic sensor sending a second electrical signal to the analog-to-digital converter, the analog-to-digital converter being configured to convert the second electrical signal into a second digital signal and sending the second digital signal to the controller, before the controller determines the first quantity based on all the first digital signals, the method further comprising: The controller obtains a first time and a second time from the analog-to-digital converter, wherein the first time is the time when the analog-to-digital converter receives the first first electrical signal from the first magnetic sensor, and the second time is the time when the analog-to-digital converter receives the first second electrical signal from the second magnetic sensor; When the first moment is less than the second moment, the controller determines that the running direction of the train is the first direction. When the first moment is greater than the second moment, the controller determines that the running direction of the train is the second direction, and the second direction starts from the second preset position and ends at the first preset position.
3. The positioning method according to claim 2, characterized in that: After the controller obtains the first time and the second time from the analog-to-digital converter, the method further includes: The controller calculates the absolute value of the difference between the first moment and the second moment to obtain the running time; The controller calculates a ratio of a running distance to the running time to obtain a running speed, wherein the running distance is a distance between the first preset position and the second preset position, and the running speed is a running speed of the train.
4. The positioning method according to claim 1, wherein: A third magnetic sensor is disposed at a third preset position on the inner side of the train track, and a fourth magnetic sensor is disposed at a fourth preset position on the inner side of the train track. The third preset position and the fourth preset position are located on different inner sides of the train track. A third direction is perpendicular to the length direction of the train track. The third direction starts at the third preset position and ends at the fourth preset position. The third magnetic sensor is communicatively connected to the analog-to-digital converter. When the axle passes directly above the third magnetic sensor, the third magnetic sensor sends a third electrical signal to the analog-to-digital converter. The analog-to-digital converter is configured to convert the third electrical signal into a third digital signal and send the third digital signal to the controller. The fourth magnetic sensor is communicatively connected to the analog-to-digital converter. When the axle passes directly above the fourth magnetic sensor, the fourth magnetic sensor sends a fourth electrical signal to the analog-to-digital converter. The analog-to-digital converter is configured to convert the fourth electrical signal into a fourth digital signal and send the fourth digital signal to the controller. Before the controller determines the first quantity based on all the first digital signals, the method further includes: The controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received; When the analog-to-digital converter receives the third electrical signal and the fourth electrical signal, the controller determines a result, where the result indicates that the train is passing through the first preset position.
5. The positioning method according to claim 4, characterized in that: The controller is in communication with the alarm, and after the controller controls the analog-to-digital converter to detect whether the third electrical signal and the fourth electrical signal are received, the method further includes: The controller generates a first alarm message when the analog-to-digital converter receives the third electrical signal but does not receive the fourth electrical signal. The controller generates a second alarm message when the analog-to-digital converter receives the fourth electrical signal but does not receive the third electrical signal. The first alarm message is information indicating that the third magnetic sensor is abnormal, and the second alarm message is information indicating that the fourth magnetic sensor is abnormal.
6. A controller, characterized in that: A train runs on a train track, the train including a locomotive including a plurality of axles, a first magnetic sensor disposed at a first preset position on the inner side of the train track, the first magnetic sensor being communicatively connected to an analog-to-digital converter, and the first magnetic sensor sending a first electrical signal to the analog-to-digital converter when the axle passes directly above the first magnetic sensor. The analog-to-digital converter is communicatively connected to a controller, the analog-to-digital converter being configured to convert the first electrical signal into a first digital signal and send the first digital signal to the controller, the controller comprising: a receiving unit, configured to receive a plurality of the first digital signals from the analog-to-digital converter, wherein the first digital signals correspond one-to-one to the first electrical signals; a first determining unit, configured to determine a first quantity based on all the first digital signals, where the first quantity is the quantity of the first digital signals; a second determining unit, configured to determine that the locomotive has not completely traveled past the first preset position if the first number is less than or equal to a second number, the second number being the number of the axles of the locomotive; Wherein, the train further comprises a plurality of carriages, each carriage comprising a preset number of axles, and the controller is further configured to, after the controller determines a first number based on all the first digital signals, determine if the first number is greater than the second number. The quotient of is the third quantity, determine The remainder is the fourth number, wherein Y is the first number, X1 is the second number, X2 is the preset number, the third number is the number of the carriages that have completely passed the first preset position at the current moment, the fourth number is the number of target axles that have completely passed the first preset position at the current moment, and the target axle is the axle of the carriage that has not completely passed the first preset position at the current moment.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the train positioning method according to any one of claims 1 to 5.
8. A processor, characterized in that: The processor is used to run a program, wherein the train positioning method according to any one of claims 1 to 5 is executed when the program is run.
9. A train positioning system, characterized in that: include: A controller, configured to execute the train positioning method according to any one of claims 1 to 5; an analog-to-digital converter, the analog-to-digital converter being communicatively connected to the controller; a first magnetic sensor, the first magnetic sensor being communicatively connected to the analog-to-digital converter; a second magnetic sensor, the second magnetic sensor being communicatively connected to the analog-to-digital converter; a third magnetic sensor, the third magnetic sensor being communicatively connected to the analog-to-digital converter; a fourth magnetic sensor, the fourth magnetic sensor being communicatively connected to the analog-to-digital converter; An alarm is communicatively connected with the controller.
Citation Information
Patent Citations
Train information detection system and method
CN112208585A
Novel rail weighbridge body structure
CN218497514U