CPC H04J 3/0667 (2013.01) [H04J 3/067 (2013.01)] | 7 Claims |
1. A protocol data bit parsing method for an ArbeitsKreis (AK) protocol wheel speed sensor, comprising the following steps:
receiving a current signal sent by an AK protocol wheel speed sensor and converting the current signal into a first voltage signal and a second voltage signal, wherein the first voltage signal includes a speed signal pulse and a protocol data bit pulse, and the second voltage signal only includes a speed signal pulse;
capturing the time of rising edges and falling edges of the first voltage signal and the second voltage signal, denoting timestamps of the rising edge and the falling edge of the captured first voltage signal as a first timestamp set, denoting timestamps of the rising edge and the falling edge of the captured second voltage signal as a second timestamp set and saving the first timestamp set and the second timestamp set;
acquiring a complete set of timestamps of protocol data bits according to the first timestamp set and the second timestamp set and denoting as protocol data timestamps;
wherein:
under high-speed conditions, within a preset sampling period, determining a timestamp of a rising edge of a last speed pulse and a timestamp of a falling edge of a second last speed pulse based on the second timestamp set, and denoting as a first benchmark high-speed timestamp and a second benchmark high-speed timestamp respectively; and acquiring all first timestamp sets between the first benchmark high-speed timestamp and the second benchmark high-speed timestamp, wherein all the first timestamp sets between the first benchmark high-speed timestamp and the second benchmark high-speed timestamp are the protocol data timestamps;
under low-speed conditions, within a preset sampling period, sorting the first timestamp sets within the sampling period in chronological order from back to front; and selecting a preset number of first timestamps in chronological order from the sorted first timestamp sets to constitute the protocol data timestamps, wherein the difference between adjacent first timestamps among the protocol data timestamps is within [TP/2, TP], and TP is pulse width;
under low-speed to high-speed conditions, within a preset sampling period, determining a timestamp of a rising edge of a last speed pulse based on the second timestamp set, and denoting as a first benchmark high-speed timestamp; from the first benchmark high-speed timestamp, sorting the first timestamp sets within the sampling period in chronological order from back to front; and selecting a preset number of first timestamps in chronological order from the sorted first timestamp sets to constitute the protocol data timestamps, wherein the difference between adjacent first timestamps among the protocol data timestamps is within [TP/2, TP];
parsing the protocol data bits according to the protocol data timestamps to obtain values of the protocol data bits.
|