Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
METHOD FOR DECODING MANCHESTER CODE
Document Type and Number:
WIPO Patent Application WO/2010/094296
Kind Code:
A1
Abstract:
The present invention relates to a method of decoding a digital signal which is encoded as a code sequence in Manchester code and which is submitted by a data source, comprising the following steps: a) determine the time (t) between two signal level changes from 0 to 1 or from 1 to 0, b) compare the time (t) of step a) with a preset time value (T) c) 1) if the time (t) differs from value (T) by more than a threshold (dt), then set an error flag, discard the present code sequence and request a new code sequence to be submitted from the data source, or 2) if the time (t) differs from value (T) by less than or equal to a threshold (dt), then the present code sequence will be accepted and decoded according to the Manchester code which is used for encoding and a new code sequence is requested from the data source and d) proceed with step a).

Inventors:
HODOSSY SANDOR
TURMEZEI PETER
Application Number:
PCT/EP2009/001112
Publication Date:
August 26, 2010
Filing Date:
February 17, 2009
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
THYSSENKRUPP PRESTA AG (LI)
HODOSSY SANDOR
TURMEZEI PETER
International Classes:
H04L25/49; H03M5/12
Domestic Patent References:
WO2002001160A12002-01-03
Foreign References:
US6963295B12005-11-08
EP1347609A12003-09-24
US4409656A1983-10-11
US4631519A1986-12-23
EP1347609A12003-09-24
US6963295B12005-11-08
Other References:
JIMENEZ J ET AL: "Manchester Decoding Algorithm For Multifunction Vehicle Bus", INDUSTRIAL TECHNOLOGY, 2004. IEEE ICIT '04. 2004 IEEE INTERNATIONAL CO NFERENCE ON HAMMAMET, TUNSIA DEC. 8-10, 2004, PISCATAWAY, NJ, USA,IEEE, vol. 2, 8 December 2004 (2004-12-08), pages 769 - 774, XP010822137, ISBN: 978-0-7803-8662-4
J. JIMENEZ: "Manchester decoding algorithm for Multifunction Vehicle Bus", IEEE INTERNATIONAL CONFERENCE ON INDUSTRIAL TECHNOLOGY (ICIT, 2004, pages 769 - 772
Attorney, Agent or Firm:
LENZING, Andreas (Postfach 20 05 09, Düsseldorf, DE)
Download PDF:
Claims:
Claims

1. Method of decoding a digital signal which is encoded as a code sequence in Manchester code and which is submitted as a sequence of frames by a data source and received by a decoder, characterized in that the decoder distinguishes between the high state and the low state of the signal by synchronizing itself both for the high halfbit and the low halfbit during the period of two start bits of the frame, and that the times (tl, t2) calculated during the synchronization are used during the interpretation of the following bits of the frame.

2. Method of claim 1, characterized in that it comprises the following steps:

a) determine the first duration time (tl) between a first signal level change and a second signal level change, the first and the second signal level change being in opposite directions, determine the second duration time (t2) between the second signal level change and a third signal level change in opposite directions, the second and the third signal level change being in opposite directions,

b) compare the first duration time (tl) of step a) with a preset time first value (Tl) and the second duration time

(t2) with a preset time second value (T2)

O

1) if the first duration time (tl) differs from the first value (Tl) by more than a first threshold (dtl) , and/or if the second duration time (t2) differs from the second value (T2) by more than a second threshold (dt2) , then set an error flag, discard the present code sequence and request and/or expect a new code sequence to be submitted from the data source, or

2) if the first duration time (tl) differs from the first value (Tl) by less than a first threshold (dtl) , and/or if the second duration time (t2) differs from the second value (T2) by less than a second threshold (dt2) , then the present code sequence will be accepted and decoded according to the Manchester code which is used for encoding and a new code sequence is requested and/or expected from the data source and

d) proceed with step a) .

3. Method of one of the preceding claims, characterized in that for each time between a first signal level change from a first to a second signal level is determined a first duration time (tl) and for each time between a second signal level change and a third signal level change is determined a second duration time (t2) and followed by the steps b) and c) according to claim 1 for every estimated duration time.

4. Method of one of the preceding claims, characterized in that in step cl) , the the new code sequence is identical with the present sequence which was discarded.

5. Method of one of the preceding claims, characterized in that in step c) , the first and/or second threshold (dtl, dt2) is in the range of 0 to 1/4 of the corresponding preset time value (Tl, T2) , preferably 0 to 1/6 of the corresponding preset time value (Tl, T2) .

6. Method of one of the preceding claims, characterized in that in step c) , the first and/or second threshold (dtl, dt2) is in the range of 0 to 1/10 of the corresponding preset time value (Tl, T2) .

7. Method of one of the preceding claims, characterized in that in step c) , for values of duration time (tl, t2) < corresponding preset time value (Tl, T2) , the corresponding threshold (dtl, dt2) is in the range of 0 to 1/4 of the corresponding preset time value (Tl, T2) , preferably 0 to 1/6 of the corresponding preset time value (Tl, T2) , and for values of duration time (tl, t2)

> corresponding preset time value (Tl, T2) , the threshold (dtl, dt2) is in the range of 0 to the corresponding preset time value (Tl, T2) , preferably 0 to 1/2 of the corresponding preset time value (Tl, T2) , and more preferably 0 to 1/4 of the corresponding preset time value (Tl, T2) .

8. Method of one of the preceding claims, characterized in that in step c2) , after the acceptance of the code sequence, the preset time value (Tl, T2) is replaced by the corresponding duration time (tl, t2) which was determined in step a) .

9. A device with a memory, signal input means, signal output means and a micro processor or FPGA or ASIC, for the execution of the method according to claim 1.

10. An electric steering system in which a signal is Manchester encoded and decoded according to one of the preceding claims 1 - 9, wherein the signal is a torque signal from a torque sensor or an angular signal from a rotation angle sensor.

Description:
Method for decoding Manchester code

Background of the invention

The present invention relates to a method for decoding Manchester code and to the use of such method for decoding sensor signals in electric power assisted steering systems.

In telecommunication, Manchester code is a line code in which the encoding of each data bit has at least one transition and occupies the same time interval. Essentially, the code is generated by combining the data signal and a clock signal in an XOR operation. It is, therefore, self -clocking, which means that the clock signal can be recovered from the encoded data. Manchester code is also known as Phase Encoding.

It is widely used, for example in the Ethernet. Advantages of the Manchester code are simple encoding with no longer period without a level transition, which helps to recover the clock signal. Furthermore, there is no necessity to transfer a DC- component with the encoded signal. Shortcomings of Manchester code are the necessity to provide twice the bandwidth of asynchronous communications and that the signal spectrum is much wider. This shortcoming is usually no problem in automotive applications since the signal rates are relatively- low. Another important shortcoming is that errors in the synchronization of the receiver and the transmitter are critical to avoid errors. A half -bit period error already gives an inverted output at the receiver which needs to be checked and corrected.

Description of the related art

In the prior art, US-patents US 5,187,546, US 5,815,089 and

US 4,409,656 show the use of Manchester encoding and decoding without disclosing a method for decoding the Manchester code. In US 4,631,519, the lengths of the pulses of the Manchester code are measured and the pulse width is determined from minimizing the error using the least squares method. Nothing is said about decoding the signal .

WO 2002/001160 discloses a position sensor which uses Manchester code. Nothing is said about decoding the signal.

It is therefore an object of the present invention to provide a method to decode Manchester code which is more tolerant to timing errors, deviation and comparator offset. Furthermore, it is an object of the present invention to provide an electric servo assisted steering system in which a sensor provides Manchester code which is decoded with an improved error tolerance.

This object is achieved by a method of claim 1 and by the electric steering system of claim 10. The depending claims describe improvements of the invention.

By using the method of claim 1, namely the method of decoding a digital signal which is encoded as a code sequence in Manchester code and which is submitted as a sequence of frames by a data source and received by a decoder, in which the decoder distinguishes between the high state and the low state of the signal by synchronizing itself both for the high halfbit and the low halfbit during the period of two start bits of the frame, and in which the times which are calculated during the synchronization are used during the interpretation of the following bits of the frame, deviations from the ideal signal in bit time, half bit time and comparator offset do not necessarily lead to a decoding error.

If the method comprises the following steps: a) determine the first duration time (tl) between a first signal level change and a second signal level change, the first and the second signal level change being in opposite directions, determine the second duration time (t2) between the second signal level change and a third signal level change in opposite directions, the second and the third signal level change being in opposite directions,

b) compare the first duration time (tl) of step a) with a preset time first value (Tl) and the second duration time

(t2) with a preset time second value (T2)

c) 1) if the first duration time (tl) differs from the first values (Tl) by more than a first threshold (dtl) , and/or if the second duration time (t2) differs from the second values (T2) by more than a second threshold (dt2) , then set an error flag, discard the present code sequence and request a new code sequence to be submitted from the data source, or

2) if the first duration time (tl) differs from the first values (Tl) by less than a first threshold (dtl) , and/or if the second duration time (t2) differs from the second values (T2) by less than a second threshold (dt2),then the present code sequence will be accepted and decoded according to the Manchester code which is used for encoding and a new code sequence is requested from the data source and d) proceed with step a) , a safe and error tolerant decoding process is ensured and the decoding process is not affected by duty cycles which - A -

differ from the standard value of 50%. This is further improved by a process in which for each time between a first signal level change from a first to a second signal level is determined a first duration time (tl) and for each time between the second signal level change and a third signal level change is determined a second duration time (t2) and followed by the steps b) and c) as mentioned above for each estimated duration time.

If an error is detected and the associated erroneous code sequence is discarded, a new code sequence will be requested. It may be preferred if in this case the method requests the same sequence as the one that was discarded at least once.

As an alternative it is also possible instead of requesting the next code sequence to omit the failure detected code sequence and expect the next sequence. This is using in cases for getting streaming data in a kind of continuous communication.

It is preferred that in step c) , the first and/or second threshold (dtl, dt2) is in the range of 0 to 1/4 of the corresponding preset time value (Tl, T2) , preferably 0 to 1/6 of the corresponding preset time value (Tl, T2) which gives a relatively broad window to accept the coded signal and to adapt the preset values dynamically.

It may also be preferred that in step c) , the first and/or second threshold (dtl, dt2) is in the range of 0 to 1/10 of the corresponding preset time value (Tl, T2) . This increases the rejection rate but provides a safer decoding process.

Another set of parameter, which may be advantageous, provides that in step c) , for values of duration time (tl, t2) < corresponding preset time value (Tl, T2) , the corresponding threshold (dtl, dt2) is in the range of 0 to 1/4 of the corresponding preset time value (Tl, T2) , preferably 0 to 1/6 of the corresponding preset time value (Tl, T2) , and for values of duration time (tl, t2) > corresponding preset time value (Tl, T2) , the threshold (dtl, dt2) is in the range of 0 to the corresponding preset time value (Tl, T2) , preferably 0 to 1/2 of the corresponding preset time value (Tl, T2) , and more preferably 0 to 1/4 of the corresponding preset time value (Tl, T2) .

A dynamic adaptation to environmental or systemic influences is possible if in step c2) , after the acceptance of the code sequence, the preset time value (Tl, T2) is replaced by the corresponding duration time (tl, t2) which was determined in step a) .

As an improvement it is also possible and included by this invention to use in case of acceptance of the code sequence the sliding average of a number of successive measured first and/or second duration times (tl, t2) to determined the new preset first and/or second time value (Tl, T2) . This sliding average can build up for a sequence in one or more code sequences. It is as an alternative also possible to use the first three signal level changes of each frame to build up the new preset time value (Tl, T2) only. As advantages such preset time value is build up or construct as result of three or better seven following accepted measurement results for first and/or second duration times (tl, t2) .

Preferably, decoding the Manchester signal is carried out in a device with a memory, signal input means, signal output means and a micro processor or a FPGA or ASIC, for the execution of the method according to the steps mentioned above.

A preferred embodiment is an electric steering system in which a signal is Manchester encoded and decoded according to the steps mentioned above or using the device mentioned above, in which the signal is a torque signal from a torque sensor or an angular signal from a rotation angle sensor. Description of the drawings

A preferred embodiment of the present invention is described with reference to the drawings, in which

Fig. 1 is a block diagram of the signal chain from the input device to the output device;

Fig. 2 is a block diagram like fig. 1 in an electric power assisted steering system;

Fig. 3 is a representation of the inputs and outputs which are used to implement the method in the signal chain of fig. 1; and

Fig. 4 is a representation of the different states of the method in the form of a state machine.

Detailed description of the drawings

Fig. 1 shows a block diagram of the signal chain in which the present method is used, in general terms. Fig. 2 shows the block diagram in an application to an electric power assisted steering system, in which the torque sensor signal is Manchester encoded and decoded according to the present invention.

An input device 1 receives an input, for example a mechanical value and generates a corresponding electric signal. This signal is transferred to a transmitter device 2, which encodes the information to a digital signal in order to transmit it in a robust way to an electronic control unit (ECU) . The encoding process is such that the edge direction of the signal at predefined time positions carries the information. This is done by conventional Manchester encoding. The transmitter device 2 is also adapted to transmit the encoded information through a channel 3, i.e. through wires. A receiver 4 includes a signal conditioning block 5 which prepares a signal for decoding and a decoder block 6 which translates the information to a different protocol. The translated information is passed to an output device 7.

The receiver 4 is an ECU in which the signal conditioning module 5 performs a current-to-voltage conversion. The decoder 6 is a Manchester decoder which decodes the signal from the signal conditioning device 5 according to the method of the present invention. The output of the decoder is a known UART- communication signal. The output device 7 is an electronic device which uses the signal from the input device for a necessary output signal. This electronic device can be a device with microcontroller, memory and further components, running application software for the calculation of the values for output signals. Such device with microcontroller can be also an FPGA or an ASIC. For example, if the input device is a torque sensor unit of an electric power assisted steering, the application software 7 generates a signal to adjust the necessary assist torque which is generated by a servo motor.

It was also possible that the output device 7 is an integral part of the receiver 4.

Fig. 3 represents the input an output signals of the decoder 6 of figs. 1 and 2. The necessary inputs to the decoder are represented on the left side of the block. The signals are a reset 11, a clock signal 12, a data input signal 13 which is called PAS4 in this embodiment, and a transfer signal 14 which indicates the necessity to transfer data.

The output signals on the other hand are listed on the right hand side of the decoder block 6. The signals comprise a group of error signals, namely Manchester error 15, parity error 16, start bit error 17 and overflow error 18. Furthermore, a data ready signal 19 is provided. Finally, the decoded data signal 20 is generated on the output side. This signal is the input for the output device 7 in fig. 1.

Reset 11 and clock signal 12 control the functioning of the decoder, transfer signal 14 and data ready signal 19 are communication signals for the decoded data. The state machine is sensitive for the positive edge of the clock 14. The reset input 13 is an asynchronous input.

Fig. 4, finally, shows the state machine of the decoder 6 of fig. 3.

In the following, the different states of the state machine are described in greater detail.

START state

If Reset 13 is active, the state machine goes in the START state. In the START state, the reset of a pulse width counter and the reset of a frame limiter counter are disabled. The low state and high state of the PAS4 signal 13 are detected. After this detection, the start of a data frame can be sensed. A frame in this embodiment is defined as containing the following thirteen bits:

More generally the bits W2, Wl and D [7..0] are the 10 transported data bits, which have to be output later at the UART output. The start bits are always 0 for synchronization purposes. The parity has to be even (that means the sum of all thirteen bits which are equal to 1 has to be even) . Thirteen bits are received, but the start bits are not included because they are only for synchronizing. FIRST START BIT state

In this state, the pulse width counter and the the frame limiter counter are enabled. The decoder algorithm counts only the pulse widths. Therefore, the error detection adapted thereto. Start bit error can be sensed if the first high pulse is too wide. If the first high pulse is narrower than a pre- stored limit for the width of the pulse, no Start bit error is generated, the pulse width counter is be disabled and the state machine goes to the next state.

SECOND START BIT state

This state is essentially the same as the previous state. The difference is that the second pulse will be a low pulse. The width of the pulse is counted and if the pulse width exceeds a pre-stored limit, an error (Start bit error) is generated. If the pulse width is less than a pre-stored limit, the pulse is accepted and new limits will be calculated from the first and the second pulse width. These limits are subsequently used to distinguish between the half bit long and the one bit long pulses, to sense the Manchester errors, to give a new frame width limit, and to sense the overflow error.

HIGH/LOW IMPULSE state

If the start bits are successfully received, the data bits can be received at the input 13. Under these states the pulse width counter counts the widths of the pulse. If the counter's value is higher than the a Manchester error limit, or a one bit long pulse is sensed after an ignored half bit pulse, there is a Manchester error and an error signal is generated accordingly. Because between the different bits there will be no regular or usable pulse, some pulses must be ignored. There are two possible cases in which the pulse is usable: a) the pulse is one bit long or b) the pulse is half bit long but the previous pulse was a half bit long and it was ignored.

The value of the useful impulses will be saved. If the predetermined number of bits, preferred an uneven number, more preferred 11 bits, of one frame were successfully received, and there was no error, the next state will be the WAIT state.

WAIT state

Under the WAIT state first an overflow check will be done. If there was no overflow error, the decoded data output 20 will be set and the data ready signal output 19 will be set to 1. A parity check is performed and if the parity bit is not correct, there parity error output will be set to 1. The pulse width counter and the frame width limiter counter will be disabled. Every saved value will be set to the initial preset value. The next state will be START state.

ERROR state

If under the receiving the signal at the data input 13, a Start bit error, a Manchester error or an Overflow error has been detected, the state machine goes to this state. In this state, the frame width limiter is important. It counts until it reaches the limit. After that the decoded data output 20, the right error output and the data ready output 19 will be set. The data output bits are generated until any error has been detected. After the error, the remaining data bits assume their reset values (0) .

The pulse width counter and the frame width limiter counter will be disabled. Every saved value will be set to the initial value. The next state will be START state.

As an improvement of the invention a glitch filter can be used. The glitch filter has an asynchronous reset input and is sensitive for the negative edge of the clock. After resetting the glitch filter, the output signal value will be zero. A comparator device compares the output value of the filtered signal which is sent from transmitter 2 through channel 3 with the unfiltered signal from transmitter 2 through channel 3 without passing the glitch filter. If the filtered signal is not equal to the non filtered signal, the non filtered signal holds its value. After one clock period time the comparator compares the filtered and the non filtered signals and if the signals are not equal, the non filtered signal takes the value, else the non filtered signal holds its value. With this filter one clock period time long glitch can be eliminated.