A method and device for safely collecting the number of teeth of a coded odometer
By implementing the safety acquisition method of teeth count in the coded odometer, the problem of unavailability during reverse or front-end operation and inconsistent calculations caused by sampling intervals is solved, and the availability and safety of the train are improved.
Patent Information
- Application Number
- CN202211242627.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-11
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-10-11
AI Technical Summary
The existing coded odometer is not available when the train is reversed or switched on the front, and when the train is stopped, the CogCount and CogSN calculations are inconsistent due to the sampling interval, which affects the safety of the train operation.
A safe tooth count acquisition method is realized in the coded odometer, including initialization, comparison of CogSN difference, calculating the expected tooth count when unavailable, and setting the odometer to an invalid state after comparison.
It improves the availability and safety of trains, ensures accurate collection of teeth in various operating scenarios, and avoids the dangerous situation of incorrect calculation position caused by algorithm problems.
Smart Images

Figure CN115752505B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an encoded odometer, and more particularly to a method and device for safely collecting the number of teeth of an encoded odometer. Background Art
[0002] Currently, an optoelectronic sensor, also called an encoded odometer or a speed sensor, is a reliable and accurate speed measurement device and a common position calculation basic device in rail transit. The speed, displacement, status and other information of a train within a certain period of time can be calculated by using the number of teeth rotated by the encoded odometer per unit time. Obtaining the actual running range of the train based on the displacement calculated by the speed sensor is the basis for ensuring the safety of the train and passengers.
[0003] The working principle of the encoded odometer is as Figure 1 shown. Inside it is a circular code disk. After the sensor is installed on the axle, it will rotate with the wheel. M small holes are evenly distributed on the outer circle of the code disk, each small hole has the same proportion, and there are three light sensors with uniform intervals on it, called C1, C2, and C3. When the light passes through the small hole and shines on C1, C2, and C3, the corresponding sensor state is high level, denoted as 1. When blocked by the code disk, the corresponding sensor state is low level, denoted as 0. When the wheel rotates, a level signal with a certain phase relationship is formed, and then the number of teeth rotated, called CogCount, is detected. The number of teeth changes by M when the code disk rotates a complete circle. When the code disk rotates forward by one tooth, it is 1, and when it rotates backward by one tooth, it is -1.
[0004] To improve the accuracy of the measured data, teeth holes with unequal lengths are distributed on the inner circle of the code disk, which are generated according to the M-number sequence of Fibonacci, ensuring that the signals of this sensor are generated in a specific order. When it is 1, the light of the hole can pass through to generate a high-level signal. When it is 0, the light is blocked to generate a low-level signal. This light sensor is called C4. The signals generated by this path of sensors will change in sequence on the binary sequence of specific M bits. This binary sequence is called C4Serial[M]. As the wheel rotates, C4 will be shifted into an N-bit register. This N-bit register forms an encoded value, called the tooth number CogCode. During the shifting process of C4, according to the running direction of the code disk, it is shifted into the N-bit register from the high bit when rotating forward, and from the low bit when rotating backward. Due to the unique design of the inner circle, the CogCode is unique after the encoded odometer rotates any tooth, so that the current position of the code disk can be determined. And each CogCode has a unique number CogSN. By comparing the difference of CogSN, the number of teeth calculated by the inner circle can be obtained, and whether it is consistent with the number of teeth obtained from the outer circle is used to judge whether the encoded odometer is running correctly. The correspondence table between CogCode and CogSN is called CogCodeTable.
[0005] Although this method can improve the reliability of the coded odometer, there are still defects even when the odometer is working perfectly normally. For example:
[0006] 1. Since the odometer must rotate N teeth in one direction to obtain a complete and correct CogCode, when the odometer runs in reverse after stopping in the forward direction, or runs forward after stopping in the reverse direction, the odometer will be in an unavailable state before rotating N teeth after the running direction is reversed. Reversing the train or changing the locomotive is a very common scenario, and the unavailability of the odometer during this process will greatly affect the train operation efficiency.
[0007] 2. The information collection of the odometer is sampled and used at regular time intervals. Then, when the train stops at the component performance boundary and shakes before and after starting, due to the sampling interval, the CogCount and the value calculated through CogSN are inconsistent, which may lead to the unavailability of the odometer and affect the train operation.
[0008] 3. When continuous intermittent creep occurs at the component performance boundary, it may cause the train to actually move forward, but the odometer does not detect the change in the number of teeth, which brings a safety risk to the train operation. Summary of the Invention
[0009] The purpose of the present invention is to provide a method and device for safely collecting the number of teeth of a coded odometer to overcome the defects of the above-mentioned existing technologies.
[0010] The purpose of the present invention can be achieved through the following technical solutions:
[0011] According to the first aspect of the present invention, a method for safely collecting the number of teeth of a coded odometer is provided. The method includes the following steps:
[0012] Step S1: Initialize the coded odometer. If the initialization is successful, go to step S2; otherwise, go to step S7 for processing.
[0013] Step S2: Look up the table for the tooth number CogCode collected in each sampling period to obtain its unique number CogSN. If it can be correctly obtained, go to step S3; otherwise, go to step S5 for processing.
[0014] Step S3: Subtract the CogSN(k) of the current sampling period from the CogSN(k - 1) obtained in the previous period, and compare it with the CogCount(k) sampled in the current period. If they are equal, go to S4 for processing; if they are not equal, go to step S5 for processing.
[0015] Step S4: Obtain the available CogCount(k) data, and then go to step S2 for the next period of processing.
[0016] Step S5: Based on the tooth number CogCode(k - 1) in the previous cycle, simulate the operation of the C4 signal of the code disk according to the characteristics of the code disk, and calculate several possible actual tooth numbers of the train as the expected tooth number CompCogCode(k)[x] for this cycle and the corresponding expected number of teeth to be compensated CompCogCount(k)[x].
[0017] Step S6: Compare each obtained CompCogCode(k)[x] with the sampled tooth number CogCode one by one. If they are the same, take the corresponding CompCogCount(k)[x] as CogCount(k) and go to Step S4 for processing; otherwise, go to S7 for processing.
[0018] Step S7: Set the odometer to the invalid state and exit the odometer calculation.
[0019] As a preferred technical solution, the initialization of the encoded odometer in Step S1 is specifically as follows:
[0020] The encoded odometer makes an initialization calculation when it first turns N teeth, and the cumulative number of teeth CogCount collected in consecutive sampling periods is N.
[0021] As a preferred technical solution, the judgment of whether the encoded odometer is successfully initialized is specifically as follows: If the sampled tooth number CogCode can be found in the tooth number coding relationship table CogCodeTable, it is considered that the initialization is successful.
[0022] As a preferred technical solution, the CogCount(k) data obtained in Step S4 is used to calculate the train displacement or status.
[0023] As a preferred technical solution, Step S5 specifically includes four cases.
[0024] As a preferred technical solution, the first case is specifically as follows:
[0025] If the number of teeth CogCount in this cycle is 0, then for the N - bit tooth number in the previous cycle, first shift the value of the current C4 sequence one bit from the high - order bit to the low - order bit, and then shift the value of the current C4 sequence one bit from the low - order bit to the high - order bit, and record it as an expected tooth number CompCogCode(k)[0].[[]END]]
[0026] Then, for the N - bit tooth number in the previous cycle, first shift the value of the current C4 sequence one bit from the low - order bit to the high - order bit, and then shift the value of the current C4 sequence one bit from the high - order bit to the low - order bit, and record it as an expected tooth number CompCogCode(k)[1].[[]END]]
[0027] As a preferred technical solution, CompCogCount(k)[0] = 0 and CompCogCount(k)[1] = 0.
[0028] As a preferred technical solution, the second case is as follows:
[0029] If the number of teeth CogCount in this period is 1, then the value of the previous sequence of C4 is shifted into the lower bit of the tooth number of the previous period at N positions as CompCogCode(k)[2];
[0030] The value of the current C4 sequence is shifted into the higher bit of the tooth number of the previous period at N positions as CompCogCode(k)[3];
[0031] The value of the next sequence of C4 is shifted into the higher bit of the tooth number of the previous period at N positions as CompCogCode(k)[4].
[0032] As a preferred technical solution, CompCogCount(k)[2] = 1;
[0033] CompCogCount(k)[3] = 1;
[0034] CompCogCount(k)[4] = 1.
[0035] As a preferred technical solution, the third case is as follows:
[0036] If the number of teeth CogCount in this period is -1, then the value of the previous sequence of C4 is shifted into the higher bit of the tooth number of the previous period at N positions as CompCogCode(k)[5];
[0037] The value of the current C4 sequence is shifted into the lower bit of the tooth number of the previous period at N positions as CompCogCode(k)[6];
[0038] The value of the next sequence of C4 is shifted into the lower bit of the tooth number of the previous period at N positions as CompCogCode(k)[7].
[0039] As a preferred technical solution, CompCogCount(k)[5] = -1;
[0040] CompCogCount(k)[6] = -1;
[0041] CompCogCount(k)[7] = -1.
[0042] As a preferred technical solution, the fourth case is as follows:
[0043] If the number of teeth CogCount in this period is a positive number greater than 1, then move the value of the next sequence of C4 to the high position of the tooth number of the previous period by N bits as CompCogCode(k)[8];
[0044] Move the value of this C4 sequence to the high position of the tooth number of the previous period by N bits as CompCogCode(k)[9];
[0045] Otherwise, if the number of teeth CogCount in this period is a negative number less than -1, move the value of the next sequence of C4 to the low position of the tooth number of the previous period by N bits as CompCogCode(k)
[10] ;
[0046] Move the value of this C4 sequence to the low position of the tooth number of the previous period by N bits as CompCogCode(k)
[11] .
[0047] As a preferred technical solution, the CompCogCount(k)[8] = CogCount(k) + 1;
[0048] The CompCogCount(k)[9] = CogCount(k) + 1;
[0049] The CompCogCount(k)
[10] = CogCount(k) - 1;
[0050] The CompCogCount(k)
[11] = CogCount(k) - 1.
[0051] According to the second aspect of the present invention, there is provided a device for safely collecting the number of teeth of an encoded odometer, the device comprising:
[0052] An initialization module for initializing the encoded odometer;
[0053] A number acquisition module for looking up the table of the tooth number CogCode collected in each sampling period to obtain its unique number CogSN;
[0054] A first comparison module for subtracting CogSN(k) in this sampling period from CogSN(k - 1) obtained in the previous period and comparing it with CogCount(k) sampled in this period;
[0055] A result acquisition module for obtaining available CogCount(k) data;
[0056] A calculation module, configured to simulate the operation of the C4 signal of the code disk based on the tooth number CogCode(k-1) in the previous cycle, and calculate several possible actual tooth numbers of the train as the expected tooth number CompCogCode(k)[x] in this cycle and the corresponding compensated expected tooth number CompCogCount(k)[x];
[0057] A second comparison template, configured to compare each obtained CompCogCode(k)[x] with the sampled tooth number CogCode one by one, and if they are the same, use the corresponding CompCogCount(k)[x] as CogCount(k);
[0058] An invalid setting module, configured to set the odometer to an invalid state and exit the odometer calculation.
[0059] According to a third aspect of the present invention, there is provided an electronic device, including a memory and a processor, where a computer program is stored on the memory, and when the processor executes the program, the method described above is implemented.
[0060] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.
[0061] Compared with the prior art, the present invention has the following advantages:
[0062] 1) The present invention solves the unnecessary abnormal situations caused by the design principle of the optical encoding odometer, and greatly improves the availability and safety of the train;
[0063] 2) The present invention starts from the operating principle of the optical encoding odometer and combines the actual possible operating scenarios for prediction, ensuring the safety of the algorithm itself and preventing dangerous situations caused by incorrect train calculation positions due to algorithm problems;
[0064] 3) The present invention only modifies the software algorithm without involving hardware modification, with low change cost and being conducive to expansion. Description of the Drawings
[0065] Figure 1 It is a schematic diagram of the odometer code disk;
[0066] Figure 2 The flowchart of the method of the present invention;
[0067] Figure 3 It is a fragment diagram of the C4 signal sequence of this embodiment; Detailed Embodiments
[0068] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0069] First, referring to Figure 2 , the main process method of the present invention is introduced, including the following steps:
[0070] Step S1: When the odometer rotates N teeth for the first time, perform initialization calculation. If the accumulated CogCount collected in consecutive sampling periods is N and CogCode can be found in CogCodeTable, it is considered that the initialization is successful; otherwise, go to S7 for processing.
[0071] Step S2: Look up the table for the tooth number CogCode collected in each sampling period to obtain its CogSN. If it can be correctly obtained, go to S3 for processing; if it cannot be obtained, go to S5 for processing.
[0072] Step S3: Subtract the CogSN(k) in this sampling period from the CogSN(k - 1) obtained in the previous period, and compare it with the CogCount(k) sampled in this period. If they are equal, go to S4 for processing; if they are not equal, go to S5 for processing.
[0073] Step S4: Provide the obtained CogCount(k) data to other modules to calculate the train displacement or status in combination with the sampling period, and then go to S2 for the next period of processing.
[0074] Step S5: Based on the tooth number CogCode(k - 1) in the previous period, simulate the operation of the C4 signal of the code disk according to the characteristics of the code disk, and calculate several tooth numbers that the train may actually have as the expected tooth number CompCogCode(k)[x] in this period and the corresponding compensated expected tooth number CompCogCount(k)[x].
[0075] Step S6: Compare the obtained CompCogCode(k)[x] with the sampled tooth number CogCode one by one. If they are the same, use the corresponding CompCogCount(k)[x] as CogCount(k), and go to S4 for processing; otherwise, go to S7 for processing.
[0076] Step S7: Set the odometer to an invalid state and exit the odometer calculation.
[0077] The above-mentioned step S5 is described in combination with Figure 3 For illustration, assume that the C4 position in the current sampling period is as Figure 3As shown, at this time, record C4 as C4Serial
[30] . To the right is forward, and to the left is backward. When the current train is running forward and the cycle CogCode is 0010100111, then:
[0078] Step S51: If the number of teeth CogCount in this cycle is 0, then for the N - bit tooth number in the previous cycle, first shift the value of the current sequence C4Serial
[30] of C4 one bit from the high - order bit to the low - order bit to get 0001010011, and then shift the value of the current sequence C4Serial
[30] of C4 one bit from the low - order bit to the high - order bit. Denote a desired tooth number CompCogCode(k)[0] as 0010100110, CompCogCount(k)[0]=0; Then for the N - bit tooth number in the previous cycle, first shift the value of the current sequence C4Serial
[30] of C4 one bit from the low - order bit to the high - order bit to get 0101001110, and then shift the value of the current sequence C4Serial
[30] of C4 one bit from the high - order bit to the low - order bit. Denote a desired tooth number CompCogCode(k)[1] as 0010100111, CompCogCount(k)[1]=0;
[0079] Step S52: If the number of teeth CogCount in this cycle is 1, then shift the value of the previous sequence C4Serial
[29] of C4 into the low - order bit of the N - bit tooth number in the previous cycle as CompCogCode(k)[2] which is 0101001110, CompCogCount(k)[2]=1; Shift the value of the current sequence C4Serial
[30] of C4 into the high - order bit of the N - bit tooth number in the previous cycle as CompCogCode(k)[3] which is 0001010011, CompCogCount(k)[3]=1; Shift the value of the next sequence C4Serial
[31] of C4 into the high - order bit of the N - bit tooth number in the previous cycle as CompCogCode(k)[4] which is 1001010011, CompCogCount(k)[4]=1;
[0080] Step S53: If the number of teeth CogCount in this cycle is -1, then move the value of C4's previous sequence C4Serial
[29] to the high position of the N-bit tooth number in the previous cycle as CompCogCode(k)[5] which is 00010011, and CompCogCount(k)[5] = -1; move the value of C4's current sequence C4Serial
[30] to the low position of the N-bit tooth number in the previous cycle as CompCogCode(k)[6] which is 0101001110, and CompCogCount(k)[6] = -1; move the value of C4's next sequence C4Serial
[31] to the low position of the N-bit tooth number in the previous cycle as CompCogCode(k)[7] which is 0101001111, and CompCogCount(k)[7] = -1;
[0081] Step S54: In other cases, if CogCount is a positive number greater than 1, then move the value of C4's next sequence C4Serial
[31] to the high position of the N-bit tooth number in the previous cycle as CompCogCode(k)[8] which is 1001010011, and CompCogCount(k)[8] = CogCount(k) + 1; move the value of C4's current sequence C4Serial
[30] to the high position of the N-bit tooth number in the previous cycle as CompCogCode(k)[9] which is 0001010011, and CompCogCount(k)[9] = CogCount(k) + 1; otherwise, if the number of teeth CogCount in this cycle is a negative number less than -1, move the value of C4's next sequence C4Serial
[31] to the low position of the N-bit tooth number in the previous cycle as CompCogCode(k)
[10] which is 0101001111, and CompCogCount(k)
[10] = CogCount(k) - 1; move the value of C4's current sequence C4Serial
[30] to the low position of the N-bit tooth number in the previous cycle as CompCogCode(k)
[11] which is 0101001110, and CompCogCount(k)
[11] = CogCount(k) - 1.
[0082] The above is the introduction of the method embodiment. Next, through the device embodiment, the solution of the present invention will be further described.
[0083] A device for safely collecting the number of teeth of an encoded odometer according to the present invention, the device includes:
[0084] An initialization module for initializing the encoded odometer;
[0085] A number acquisition module for looking up the table of the tooth number CogCode collected in each sampling cycle to obtain its unique number CogSN;
[0086] The first comparison module is used to subtract CogSN(k) in the current sampling period from CogSN(k-1) obtained in the previous period and compare the result with CogCount(k) sampled in the current period;
[0087] The result acquisition module is used to obtain available CogCount(k) data;
[0088] The calculation module is used to simulate the operation of the encoder C4 signal based on the encoder number CogCode(k-1) in the previous period according to the encoder characteristics, and calculate several possible actual train encoder numbers as the expected encoder number CompCogCode(k)[x] in the current period and the corresponding compensated expected encoder count CompCogCount(k)[x];
[0089] The second comparison template is used to compare each obtained CompCogCode(k)[x] with the sampled encoder number CogCode one by one. If they are the same, the corresponding CompCogCount(k)[x] is used as CogCount(k);
[0090] The invalid setting module is used to set the odometer to an invalid state and exit the odometer calculation.
[0091] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the described modules can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0092] The electronic device of the present invention includes a central processing unit (CPU), which can execute various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or computer program instructions loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM, and RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.
[0093] Multiple components in the device are connected to the I / O interface, including: an input unit, such as a keyboard, a mouse, etc.; an output unit, such as various types of displays, speakers, etc.; a storage unit, such as a magnetic disk, an optical disc, etc.; and a communication unit, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit allows the device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0094] The processing unit executes the various methods and processes described above, such as methods S1 to S7. For example, in some embodiments, methods S1 to S7 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed onto the device via the ROM and / or the communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of methods S1 to S7 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S7 by any other suitable means (e.g., by means of firmware).
[0095] The functions described above herein may be performed, at least in part, by one or more hardware logic components. By way of example, and without limitation, the types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0096] The program code for implementing the methods of the present invention may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0097] In the context of the present invention, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be either a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0098] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for securely collecting the number of teeth of an encoded odometer, characterized in that The method includes the following steps: Step S1: Initialize the encoded odometer. If the initialization is successful, go to step S2; otherwise, go to step S7 for processing; Step S2: Look up the unique number CogSN corresponding to the tooth number CogCode collected in each sampling period in a table. If the CogSN can be correctly obtained, go to step S3; otherwise, go to step S5 for processing; Step S3: Subtract the CogSN(k) of the current sampling period from the CogSN(k - 1) obtained in the previous period, and compare it with the CogCount(k) sampled in the current period. If they are equal, go to step S4 for processing; if they are not equal, go to step S5 for processing; Step S4: Obtain the available CogCount(k) data, and then go to step S2 for the next period of processing; Step S5: Based on the tooth number CogCode(k - 1) of the previous period, simulate the operation of the code disk C4 signal according to the characteristics of the code disk, and calculate several possible tooth numbers that the train may actually have as the expected tooth number CompCogCode(k)[x] and the corresponding compensated expected tooth number CompCogCount(k)[x] for this period; Step S6: Compare each obtained CompCogCode(k)[x] with the sampled tooth number CogCode one by one. If they are the same, use the corresponding CompCogCount(k)[x] as CogCount(k), and go to step S4 for processing; otherwise, go to step S7 for processing; Step S7: Set the odometer to an invalid state and exit the odometer calculation.
2. The tooth number safety acquisition method of a coded odometer according to claim 1, characterized in that, In step S1, the specific initialization of the encoded odometer is as follows: The encoded odometer performs an initialization calculation when it first turns N teeth, and the cumulative number of teeth CogCount collected in consecutive sampling periods is N.
3. A method for safely collecting the number of teeth of a coded odometer according to claim 1, characterized in that, The specific method for the encoded odometer to determine whether the initialization is successful is as follows: If the collected tooth number CogCode can be found in the tooth number encoding relationship table CogCodeTable, it is considered that the initialization is successful.
4. A method for safely collecting the number of teeth of a coded odometer according to claim 1, characterized in that, The CogCount(k) data obtained in step S4 is used to calculate the train displacement or status.
5. A method for securely collecting the number of teeth of a coded odometer according to claim 1, characterized in that, Step S5 specifically includes four cases.
6. A method for safely collecting the number of teeth of a coded odometer according to claim 5, characterized in that, The first case is as follows: If the number of teeth CogCount in this period is 0, first shift the value at the current index of the C4 sequence from the high bit to the low bit by one bit for the N-bit tooth number of the previous period, and then shift the value at the current index of the C4 sequence from the low bit to the high bit by one bit, which is recorded as an expected tooth number CompCogCode(k)[0]; Then, first shift the value at the current index of the C4 sequence from the low bit to the high bit by one bit for the N-bit tooth number of the previous period, and then shift the value at the current index of the C4 sequence from the high bit to the low bit by one bit, which is recorded as an expected tooth number CompCogCode(k)[1].
7. A method for safely collecting the number of teeth of a coded odometer according to claim 6, characterized in that CompCogCount(k)[0] = 0, and CompCogCount(k)[1] = 0.
8. A method for safely collecting the number of teeth of a coded odometer according to claim 5, characterized in that, The second case is as follows: If the number of teeth CogCount in this period is 1, shift the value at the previous index of the C4 sequence into the low bit of the N-bit tooth number of the previous period as CompCogCode(k)[2]; Move the value at the current index of this C4 sequence to the high - order bit of the N - bit tooth number in the previous period as CompCogCode(k)[3]; Move the value at the next index of the C4 sequence to the high - order bit of the N - bit tooth number in the previous period as CompCogCode(k)[4].
9. A method for safely collecting the number of teeth of a coded odometer according to claim 8, characterized in that The CompCogCount(k)[2]=1; The CompCogCount(k)[3]=1; The CompCogCount(k)[4]=1.
10. A method for securely collecting the number of teeth of a coded odometer according to claim 5, characterized in that, The specific situation of the third case is as follows: If the number of teeth CogCount in this period is - 1, move the value at the previous index of the C4 sequence to the high - order bit of the N - bit tooth number in the previous period as CompCogCode(k)[5]; Move the value at the current index of this C4 sequence to the low - order bit of the N - bit tooth number in the previous period as CompCogCode(k)[6]; Move the value at the next index of the C4 sequence to the low - order bit of the N - bit tooth number in the previous period as CompCogCode(k)[7].
11. A method for safely collecting the number of teeth of a coded odometer according to claim 10, characterized in that, The CompCogCount(k)[5]= - 1; The CompCogCount(k)[6]= - 1; The CompCogCount(k)[7]= - 1.
12. A method for safely collecting the number of teeth of a coded odometer according to claim 5, characterized in that, The specific situation of the fourth case is as follows: If the number of teeth CogCount in this period is a positive number greater than 1, move the value at the next index of the C4 sequence to the high - order bit of the N - bit tooth number in the previous period as CompCogCode(k)[8]; Move the value at the current index of this C4 sequence to the high - order bit of the N - bit tooth number in the previous period as CompCogCode(k)[9]; Otherwise, if the number of teeth CogCount in this period is a negative number less than - 1, move the value at the next index of the C4 sequence to the low - order bit of the N - bit tooth number in the previous period as CompCogCode(k)[10]; Move the value at the current index of this C4 sequence to the low - order bit of the N - bit tooth number in the previous period as CompCogCode(k)[11].
13. A method for safely collecting the number of teeth of a coded odometer according to claim 12, characterized in that, The CompCogCount(k)[8]=CogCount(k)+1; The CompCogCount(k)[9]=CogCount(k)+1; The CompCogCount(k)[10]=CogCount(k)-1; The CompCogCount(k)[11]=CogCount(k)-1.
14. A device for safely collecting the number of teeth of an encoded odometer, characterized in that, The device includes: An initialization module for initializing the coded odometer; A number acquisition module for obtaining the unique number CogSN by looking up the table for the tooth number CogCode collected in each sampling period; A first comparison module for taking the difference between CogSN(k) in this sampling period and CogSN(k - 1) obtained in the previous period and comparing it with CogCount(k) sampled in this period; A result acquisition module for obtaining the available CogCount(k) data; A calculation module, configured to simulate the operation of the C4 signal of the code disk based on the tooth number CogCode(k-1) in the previous cycle, and calculate several tooth numbers that may actually occur in the train as the expected tooth number CompCogCode(k)[x] in this cycle and the corresponding compensated expected tooth number CompCogCount(k)[x]; A second comparison template, configured to compare each obtained CompCogCode(k)[x] with the sampled tooth number CogCode one by one, and if they are the same, use the corresponding CompCogCount(k)[x] as CogCount(k); An invalid setting module, configured to set the odometer to an invalid state and exit the odometer calculation.
15. An electronic device, comprising a memory and a processor, wherein a computer program is stored on the memory, characterized in that, When the processor executes the program, the method described in any one of claims 1 to 13 is implemented.
16. A computer-readable storage medium, having a computer program stored thereon, characterized in that, When the program is executed by the processor, the method described in any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Locomotive wheel diameter automatic calibration system and method based on satellite positioning
CN101357644A
Code disc of hybrid encoder and design method thereof
CN108534803A