A Manchester decoding device and method based on OSP protocol

By dynamically counting and filtering in the Manchester decoding device to determine the valid periods and kicking out the invalid periods, the problem of waveform distortion of the Manchester decoding signal under the OSP protocol is solved and the stability of data sampling is improved.

CN118487717BActive Publication Date: 2024-09-06TINYCHIP MICROELECTRONICS (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410938863.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-09-06
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

In an environment based on the OSP protocol, the existing Manchester decoding technology causes signal waveform distortion due to unstable transmission media and inter-code interference, resulting in abnormal bit cycle calculation and affecting data sampling accuracy.

Method used

A Manchester decoding device including a first period calculation module, a second period calculation module, an average period calculation module and a sampling module is used to determine the effective period through dynamic counting and filters, kick out invalid periods, and calculate it through the filter structure and average period Improve sampling stability.

Benefits of technology

It effectively solves the problem of sampling errors caused by bit cycle anomalies, and improves the stability of the sampling results through the dual filter structure and average cycle calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118487717B
    Figure CN118487717B
Patent Text Reader

Abstract

The present invention discloses a Manchester decoding device and method based on OSP protocol, wherein the decoding device comprises: a first cycle calculation module, a second cycle calculation module, an average cycle calculation module and a sampling module; wherein the first cycle calculation module comprises: a rising edge-rising edge cycle counting module, a falling edge-falling edge cycle counting module, a first cycle judgment module and a first filter module; the rising edge-rising edge cycle counting module and the falling edge-falling edge cycle counting module are used to dynamically count the bit cycles between two adjacent rising edges and two adjacent falling edges; the first cycle judgment module is used to judge whether the cycle is a valid cycle. The present invention selects a valid cycle through a cycle judgment module and removes an invalid cycle, thereby solving the problem of abnormality in the last sampling cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Manchester decoding, and in particular to a Manchester decoding device and method based on an OSP protocol. Background Art

[0002] The OSP protocol is a protocol developed by OSRAM. The packet structure of the OSP protocol includes a Preamble, which is a fixed value of 1010 and can be used to calculate the bit cycle. This protocol supports protocol transmission on a set of LVDS differential lines or single-ended lines. Since there is no separate clock line, it uses Manchester encoding.

[0003] Manchester coding, also known as split phase code, synchronous code, and phase coding, is a coding method that uses level jumps to represent 1 or 0. Since Manchester code must change once in each clock bit, its coding efficiency can only reach about 50%;

[0004] refer to Figure 1 In practical applications, due to the uneven transmission media and the different channel lengths, the Manchester waveform is often seriously interfered by the outside world, and the receiving circuit may have large DC bias and inter-symbol interference. These will have a great impact on the duty cycle of the received Manchester waveform, causing serious waveform distortion;

[0005] refer to Figure 2 When performing Manchester decoding, in order to collect stable signals, the 1 / 4 cycle point and the 3 / 4 cycle point are generally sampled; and the decoding from the 1 / 4 cycle point to 0 and the 3 / 4 cycle point to 1 is 1; the decoding from the 1 / 4 cycle point to 1 and the 3 / 4 cycle point to 0 is 0. However, if the signal is sampled at a fixed period, or the period calculated by the Preamble is used for sampling, due to the phase difference, when transmitting longer data, the phase difference will accumulate and cause the final data sampling error, from Figure 2 It can be seen that as the bit period of the transmitter increases, the subsequent three 3 / 4 period sampling points become abnormal after the phase difference is accumulated.

[0006] When calculating the period based on the Preamble code based on the OSP protocol, the bit duty cycle at the transmitter is abnormal, resulting in an incorrect bit period calculated by the receiver. When the bit period is abnormal, the final calculated bit period will be abnormal. For details, refer to Figure 3 , is the normal effective period, refer to Figure 4 , the 1 / 4 cycle sampling point and the 3 / 4 cycle sampling point both sample 1, resulting in abnormal decoding.

[0007] Therefore, the existing technology can no longer meet the needs of people at this stage. Based on the current situation, it is urgent to reform the existing technology. Summary of the invention

[0008] The object of the present invention is to provide a Manchester decoding device and method based on the OSP protocol to solve the problems raised in the above background technology.

[0009] On the one hand, the present invention provides the following technical solution: a Manchester decoding device based on the OSP protocol, comprising: a first cycle calculation module, a second cycle calculation module, an average cycle calculation module and a sampling module; wherein,

[0010] The first cycle calculation module includes: a rising edge-rising edge cycle counting module, a falling edge-falling edge cycle counting module, a first cycle judgment module and a first filter module;

[0011] The rising edge-rising edge cycle counting module and the falling edge-falling edge cycle counting module are used to dynamically count the bit cycles between two adjacent rising edges and two adjacent falling edges respectively, and transmit the counted cycles to the first cycle judgment module;

[0012] The first cycle determination module is used to determine whether the cycle is a valid cycle or an invalid cycle;

[0013] Preferably, when the period is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, the period is a valid period.

[0014] Preferably, when the period is less than a 3 / 4 bit period or greater than a 5 / 4 bit period, the period is judged to be an invalid period and the invalid period is removed;

[0015] The first filter module is used to receive the effective period sent by the first period judgment module and calculate the effective period value, and feed back the calculated effective period value to the first period judgment module as a reference for the next effective period judgment;

[0016] The second cycle calculation module includes: a rising edge-falling edge cycle counting module, a falling edge-rising edge cycle counting module, a second cycle judgment module and a second filter module; wherein,

[0017] The rising edge-falling edge cycle counting module and the falling edge-rising edge cycle counting module are used to dynamically count the bit cycle between two adjacent rising edges and falling edges and the bit cycle between two adjacent falling edges and rising edges respectively, and transmit the counted cycles to the second cycle judgment module;

[0018] The second cycle determination module is used to determine whether a cycle is a valid cycle or an invalid cycle;

[0019] Preferably, when the period is greater than a 3 / 4 bit period and less than a 5 / 4 bit period, the period is a valid period; preferably, when the period is less than a 3 / 4 bit period or greater than a 5 / 4 bit period, the period is an invalid period;

[0020] The second filter module is used to receive the effective period sent by the second period judgment module and calculate the effective period value, and feed back the calculated effective period value to the second period judgment module as a basis for the next effective period judgment.

[0021] The average period calculation module calculates the effective period values ​​calculated by the first period calculation module and the second period calculation module to obtain the average effective period, and transmits the average effective period as the final bit period to the sampling module, so that the collected final bit period is more stable.

[0022] The sampling module samples the 1 / 4 cycle sampling point and the 3 / 4 cycle sampling point of the final bit cycle.

[0023] On the other hand, the present invention also provides the following technical solution: a Manchester decoding method based on the OSP protocol, the steps comprising:

[0024] S100: dynamically counting the bit periods between two adjacent rising edges and two adjacent falling edges respectively through a rising edge-rising edge cycle counting module and a falling edge-falling edge cycle counting module;

[0025] S101: According to the coding rules of Manchester coding, judging by a first cycle judging module whether the bit cycle between the two adjacent rising edges and the two adjacent falling edges in step S100 is valid;

[0026] When the bit period is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, the period is a valid period;

[0027] When the bit period is greater than the 5 / 4 bit period or less than the 3 / 4 bit period, the period is an invalid period, and the invalid period is removed;

[0028] S102: Calculate the effective period value through the first filter module, and feed the value back to the first period determination module as a reference for determining the effective period next time;

[0029] S103: Determine whether the effective period value is valid through the first period determination module. If valid, transmit the effective period value as the final bit period to the average period calculation module.

[0030] S200: dynamically counting the bit period between two adjacent rising edges and falling edges and the bit period between two adjacent falling edges and rising edges respectively by using a rising edge-falling edge cycle counting module and a falling edge-rising edge cycle counting module;

[0031] S201: According to the coding rules of Manchester coding, judging by the second cycle judging module whether the bit cycle between two adjacent rising edges and falling edges and the bit cycle between two adjacent falling edges and rising edges in step S200 are valid;

[0032] When the bit period is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, the period is a valid period;

[0033] When the bit period is greater than 5 / 4 bit period or less than 3 / 4 bit period, the period is an invalid period, and the invalid period is removed;

[0034] S202: Calculate the effective period value through the second filter module, and feed the value back to the second period determination module as a reference for determining the effective period next time;

[0035] S203: Determine whether the valid period value is valid through the second period determination module. If valid, transmit the valid period value as the final bit period to the average period calculation module.

[0036] S300: Calculate the effective period values ​​transmitted in step S103 and step S203 through an average period calculation module to obtain an average effective period, and use the average effective period as the final bit period.

[0037] S400: Sampling the 1 / 4 cycle sampling point and the 3 / 4 cycle sampling point of the final bit cycle through the sampling module.

[0038] The present invention has the following beneficial effects:

[0039] The present invention selects a valid period through a period judgment module and removes invalid periods, thereby solving the problem that when the preamble code Preamble technical solution is currently used to calculate the bit period, the abnormal bit period will cause the final sampling period to be abnormal;

[0040] The present invention adopts a dual filter structure, the sampling period is longer than that of a single filter, and the sampling result is more stable after averaging. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 Timing diagram for Manchester encoding;

[0042] Figure 2This is the timing diagram of the sampling points during Manchester decoding;

[0043] Figure 3 This is the timing diagram when the Preamble calculation cycle is normal;

[0044] Figure 4 This is the timing diagram when the Preamble calculation cycle is abnormal;

[0045] Figure 5 It is a schematic diagram of the circuit structure of the present invention;

[0046] Figure 6 It is a schematic diagram of the timing of invalid cycles counted by the rising edge-rising edge cycle counting module of the present invention;

[0047] Figure 7 A schematic diagram of the timing of effective cycles counted by the rising edge-rising edge cycle counting module of the present invention;

[0048] Figure 8 A schematic diagram of the timing of multiple cycles calculated by the first cycle calculation module of the present invention;

[0049] Fig. 9 A schematic diagram of the timing of invalid cycles counted by the rising edge-falling edge cycle counting module of the present invention;

[0050] Fig.10 A schematic diagram of the timing of effective cycles counted by the rising edge-falling edge cycle counting module of the present invention;

[0051] Fig.11 A schematic diagram of the timing of multiple cycles calculated by the second cycle calculation module of the present invention. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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. All other embodiments obtained by ordinary technicians in the field of the present invention without creative work are within the scope of protection of the present invention.

[0053] refer to Figure 5 On the one hand, the present invention provides the following technical solution: a Manchester decoding device based on the OSP protocol, comprising: a first cycle calculation module, a second cycle calculation module, an average cycle calculation module and a sampling module; wherein,

[0054] The first cycle calculation module includes: a rising edge-rising edge cycle counting module, a falling edge-falling edge cycle counting module, a first cycle judgment module and a first filter module.

[0055] The rising edge-rising edge cycle counting module and the falling edge-falling edge cycle counting module are used to dynamically count the bit cycles between two adjacent rising edges and two adjacent falling edges, and transmit the counted cycles to the first cycle determination module.

[0056] The first cycle judgment module judges whether the cycle is a valid cycle or an invalid cycle; when the cycle is greater than the 3 / 4bit cycle and less than the 5 / 4bit cycle, the cycle is judged as a valid cycle, and the first cycle judgment module sends the valid cycle to the first filter module; when the cycle is less than the 3 / 4bit cycle or greater than the 5 / 4bit cycle, the cycle is judged as an invalid cycle, and the invalid cycle is kicked out.

[0057] The first filter module is used to receive the valid period sent by the first period judgment module and obtain the valid period value through calculation, and feed the valid period value back to the first period judgment module. The first period judgment module further judges whether the valid period value is valid, so as to avoid the abnormal bit period therein causing the subsequent sampling module to sample abnormally at the 1 / 4 period sampling point and the 3 / 4 period sampling point.

[0058] As an optional embodiment of the present invention, the first filter module is applicable to any low-pass filter. The first filter module of this embodiment selects an α-β filter, which can filter out interference signals such as high-frequency noise and burrs by weighted averaging the signal. The α-β filter is mainly composed of two parameters α and β, which respectively represent the weights between adjacent sampling points. The principle is as follows:

[0059]

[0060] It can be seen that the next point , which is equal to the current sampling point times the previous sampling point plus β times the previous sampling point. α and β are the weights of adjacent sampling points, respectively. Their values ​​are usually less than 1 and satisfy α+β=1.

[0061] refer to Figure 6 and Figure 7 As an optional embodiment of the present invention, the rising edge-rising edge cycle counting module dynamically counts each valid bit cycle. According to the encoding rules of Manchester encoding, the cycle between two rising edges has the following two situations, where: Figure 6 , the period between two rising edges is 68 and is greater than 34 * 5 / 4, so it is an invalid period and the invalid period should be removed; Figure 7 , the period between two rising edges is 34, which is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, that is, it is judged to be a valid period.

[0062] refer to Figure 8 As an optional embodiment of the present invention, the first filter module adopts an α-β filter. In the initial stage of power-on, the filter has an initial value. Assuming that the typical bit rate of the OSP protocol is 2.4Mb / s, taking 81.6M main frequency as an example, a bit cycle count value is 34, so the initial value of α-β is 34. When encountering an abnormal bit, if the filter coefficient is set to 1 / 2, where the period between two rising edges is greater than 5 / 4 bit period, it is an invalid period, and the invalid period is kicked out, but there is a valid period:

[0063]

[0064] The second cycle calculation module includes: a rising edge-falling edge cycle counting module, a falling edge-rising edge cycle counting module, a second cycle judgment module and a second filter module; wherein,

[0065] The rising edge-falling edge cycle counting module and the falling edge-rising edge cycle counting module are used to dynamically count the bit cycles between two adjacent rising edges and two adjacent falling edges and falling edges, and transmit the counted cycles to the second cycle judgment module;

[0066] The second cycle judgment module judges whether the cycle is a valid cycle or an invalid cycle according to the cycle; when the cycle is greater than the 3 / 4 bit cycle and less than the 5 / 4 bit cycle, the cycle is a valid cycle, and the valid cycle is sent to the second filter module; when the cycle is less than the 3 / 4 bit cycle or greater than the 5 / 4 bit cycle, the cycle is an invalid cycle, and the invalid cycle will be kicked out;

[0067] The second filter module is used to receive the valid period sent by the second period judgment module and calculate the valid period value, and feed back the calculated valid period value to the second period judgment module as a basis for the next judgment of the valid period; to avoid the bit period anomaly causing the subsequent sampling module to be abnormal at the 1 / 4 period sampling point and the 3 / 4 period sampling point.

[0068] In this embodiment, the second filter module, like the first filter module, is applicable to any low-pass filter, and may be an α-β filter.

[0069] The average period calculation module calculates the effective period values ​​calculated by the first period calculation module and the second period calculation module to obtain the average effective period, and transmits the average effective period as the final bit period to the sampling module, so that the collected final bit period is more stable.

[0070] refer to Fig. 9 and Fig.10As an optional embodiment of the present invention, the rising edge-falling edge cycle counting module dynamically calculates each valid bit cycle. According to the encoding rules of Manchester encoding, the cycle between two adjacent rising edges and falling edges has the following two situations, such as Fig. 9 , the period between the rising edge and the falling edge is less than 3 / 4 bit period, so it is an invalid period, and the invalid period will be kicked out; Fig.10 , the period between the rising edge and the falling edge is the effective period.

[0071] refer to Fig.11 For the first cycle calculation module, there are two invalid cycles 80 and 68, and one valid cycle 37; for the second cycle calculation module, there is one invalid cycle 17, and two valid cycles 40 and 34. In this embodiment, taking the filter coefficient of the filter as 1 / 2 as an example, after the second cycle calculation module calculates the first valid cycle 40, the second cycle calculation module valid cycle is updated to:

[0072]

[0073] After calculating the second effective period 34, the effective period of the second period calculation module is updated to:

[0074]

[0075] After the first cycle calculation module calculates the first effective period 37, the effective period of the first cycle calculation module is updated to:

[0076] ;

[0077] In this embodiment, the average period calculation module calculates the effective period values ​​calculated by the first period calculation module and the second period calculation module by calculating the average effective period as the final bit period and transmits it to the sampling module. It can be seen that the final bit period of this algorithm is relatively stable and does not affect the sampling of the sampling module.

[0078] The sampling module samples the 1 / 4 cycle sampling point and the 3 / 4 cycle sampling point of the final bit cycle.

[0079] On the other hand, the present invention also provides the following technical solution: a Manchester decoding method based on the OSP protocol, the steps comprising:

[0080] S100: dynamically counting the bit period between two adjacent rising edges and two adjacent falling edges through a rising edge-rising edge period counting module and a falling edge-falling edge period counting module;

[0081] S101: According to the coding rules of Manchester coding, judging by a first cycle judging module whether the bit cycle between the two adjacent rising edges and the two adjacent falling edges in step S100 is valid;

[0082] When the bit period is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, the period is judged to be a valid period;

[0083] When the bit period is greater than 5 / 4 bit period or less than 3 / 4 bit period, the period is judged as an invalid period and the invalid period is removed;

[0084] S102: Calculate the effective period value through the first filter module, and feed the effective period value back to the first period determination module as a reference for determining the effective period next time;

[0085] S103: judging whether the effective period value is effective through the first period judging module, and if effective, transmitting the effective period value as the final bit period to the average period calculating module.

[0086] S200: dynamically counting the bit period between two adjacent rising edges and falling edges and the bit period between two adjacent falling edges and rising edges through a rising edge-falling edge cycle counting module and a falling edge-rising edge cycle counting module;

[0087] S201: According to the Manchester coding rule, judging by the second cycle judging module whether the bit cycle between two adjacent rising edges and falling edges and the bit cycle between two adjacent falling edges and rising edges in step S200 are valid;

[0088] When the bit period is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, the period is judged to be a valid period;

[0089] When the bit period is greater than the 5 / 4 bit period or less than the 3 / 4 bit period, the period is judged to be an invalid period and the invalid period is removed;

[0090] S202: Calculate the effective period value through the second filter module, and feed the effective period value back to the second period determination module as a reference for determining the effective period next time;

[0091] S203: judging whether the effective period value is valid by the second period judging module, and if so, transmitting the effective period value as the final bit period to the average period calculating module;

[0092] S300: The effective period value (effective bit period) calculated in step S103 is calculated by the average period calculation module; and the effective period value (effective bit period) calculated in step S203 is calculated to obtain an average effective period, and the average effective period is used as the final bit period.

[0093] S400: Sampling the 1 / 4 cycle sampling point and the 3 / 4 cycle sampling point of the final bit cycle through the sampling module.

[0094] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A Manchester decoding device based on OSP protocol, characterized in that: include: A first cycle calculation module, a second cycle calculation module, an average cycle calculation module and a sampling module; wherein, The first cycle calculation module includes: a rising edge-rising edge cycle counting module, a falling edge-falling edge cycle counting module, a first cycle judgment module and a first filter module; The rising edge-rising edge cycle counting module and the falling edge-falling edge cycle counting module are used to dynamically count the bit cycles between two adjacent rising edges and two adjacent falling edges respectively, and transmit the cycles obtained by counting to the first cycle judgment module; The first cycle determination module is used to determine whether the cycle is a valid cycle or an invalid cycle; The first filter module is used to receive the effective period sent by the first period judgment module and obtain the effective period value through calculation, and feed the effective period value back to the first period judgment module as a reference for the next effective period judgment; The second cycle calculation module includes: a rising edge-falling edge cycle counting module, a falling edge-rising edge cycle counting module, a second cycle judgment module and a second filter module; wherein, The rising edge-falling edge cycle counting module and the falling edge-rising edge cycle counting module are used to dynamically count the bit cycle between two adjacent rising edges and falling edges and the bit cycle between two adjacent falling edges and rising edges, respectively, and transmit the counted cycles to the second cycle judgment module; The second cycle determination module is used to determine whether the cycle is a valid cycle or an invalid cycle; The second filter module is used to receive the effective period sent by the second period judgment module and obtain the effective period value through calculation, and feed the effective period value back to the second period judgment module as a reference for the next effective period judgment; The average period calculation module calculates the effective period values ​​calculated by the first period calculation module and the second period calculation module to obtain an average effective period, and transmits the average effective period as the final bit period to the sampling module, so that the collected final bit period is more stable.

2. The Manchester decoding device based on OSP protocol according to claim 1, characterized in that: The first cycle determination module is used to determine whether the cycle is a valid cycle or an invalid cycle, including: When the period counted by the rising edge-rising edge period counting module and the falling edge-falling edge period counting module is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, the period is judged to be a valid period, and the first period judgment module sends the valid period to the first filter module.

3. The Manchester decoding device based on OSP protocol according to claim 1, characterized in that: The first cycle determination module is used to determine whether the cycle is a valid cycle or an invalid cycle, including: When the period counted by the rising edge-rising edge period counting module and the falling edge-falling edge period counting module is less than a 3 / 4 bit period or greater than a 5 / 4 bit period, the period is judged to be an invalid period, and the invalid period is removed.

4. The Manchester decoding device based on OSP protocol according to claim 1, characterized in that: The second cycle determination module is used to determine whether the cycle is a valid cycle or an invalid cycle, including: When the period counted by the rising edge-falling edge cycle counting module and the falling edge-rising edge cycle counting module is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, the period is judged to be a valid period, and the second period judgment module sends the valid period to the second filter module.

5. The Manchester decoding device based on OSP protocol according to claim 1, characterized in that: The second cycle determination module is used to determine whether the cycle is a valid cycle or an invalid cycle, including: When the period counted by the rising edge-falling edge period counting module and the falling edge-rising edge period counting module is less than the 3 / 4 bit period or greater than the 5 / 4 bit period, the period is judged to be an invalid period, and the invalid period is removed.

6. The Manchester decoding device based on OSP protocol according to claim 1, characterized in that: The first filter module feeds back the calculated effective cycle value to the first cycle judgment module, and the second filter module feeds back the calculated effective cycle value to the second cycle judgment module, so that the bit cycle abnormality does not cause the subsequent sampling modules to sample abnormally at the 1 / 4 cycle sampling point and the 3 / 4 cycle sampling point.

7. The Manchester decoding device based on OSP protocol according to claim 1, characterized in that: The sampling module samples the 1 / 4 cycle sampling point and the 3 / 4 cycle sampling point of the final bit cycle.

8. The Manchester decoding device based on OSP protocol according to claim 1, characterized in that: The first filter module and the second filter module are applicable to any low-pass filter.

9. The Manchester decoding device based on OSP protocol according to claim 8, characterized in that: The size of the filter coefficient of the low-pass filter is positively correlated with the effective period value calculated by the first filter module and the second filter module.

10. A Manchester decoding method based on OSP protocol, characterized in that: The method is implemented based on a Manchester decoding device based on the OSP protocol as claimed in any one of claims 1 to 9, and the steps include: S100: dynamically counting the bit periods between two adjacent rising edges and two adjacent falling edges respectively through a rising edge-rising edge cycle counting module and a falling edge-falling edge cycle counting module; S101: According to the coding rules of Manchester coding, judging by a first cycle judging module whether the bit cycle between the two adjacent rising edges and the two adjacent falling edges in step S100 is valid; When the bit period is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, the period is a valid period; When the bit period is greater than 5 / 4 bit period or less than 3 / 4 bit period, the period is an invalid period and the invalid period is removed; S102: Calculate the effective period value through the first filter module, and feed the effective period value back to the first period determination module as a reference for determining the effective period next time; S103: judging whether the effective period value is effective by the first period judging module, and if effective, transmitting the effective period value as the final bit period to the average period calculating module; S200: dynamically counting the bit period between two adjacent rising edges and falling edges and the bit period between two adjacent falling edges and rising edges respectively by using a rising edge-falling edge cycle counting module and a falling edge-rising edge cycle counting module; S201: According to the coding rules of Manchester coding, judging by the second cycle judging module whether the bit cycle between two adjacent rising edges and falling edges and the bit cycle between two adjacent falling edges and rising edges in step S200 are valid; When the bit period is greater than the 3 / 4 bit period and less than the 5 / 4 bit period, the period is a valid period; When the bit period is greater than 5 / 4 bit period or less than 3 / 4 bit period, the period is an invalid period and the invalid period is removed; S202: Calculate the effective period value through the second filter module, and feed the effective period value back to the second period determination module as a reference for determining the effective period next time; S203: judging whether the effective period value is effective by the second period judgment module, and if effective, transmitting the effective period value as the final bit period to the average period calculation module; S300: calculating the effective period values ​​transmitted in step S103 and step S203 through an average period calculation module to obtain an average effective period, and taking the average effective period as the final bit period; S400: Sampling the 1 / 4 cycle sampling point and the 3 / 4 cycle sampling point of the final bit cycle through the sampling module.