An Adaptive Wheel Speed Decoding Method and System Based on the AK Protocol
Through dynamic Tp interval estimation and three-game two-win system, the sampling points of the AK protocol wheel speed sensor are adaptively adjusted, which solves the problem of decoding inaccurate caused by changes in the external environment, and achieves high reliability and safety wheel speed detection.
Patent Information
- Application Number
- CN202510594058.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-05-09
AI Technical Summary
During the actual use of the existing AK protocol wheel speed sensor, the decoding bit width changes due to changes in the external environment, and the sampling of conventional decoding methods is inaccurate, which may lead to decoding failure and affect vehicle safety.
The sampling point of each bit of data in the data frame is calculated through dynamic Tp interval, the warning range is set, the sampling point is dynamically adjusted to adapt to environmental changes, the sampling and decoding reliability is improved, and the judgment is made through the three-game two-win system to warning of potential decoding errors in advance.
It has strong dynamic adaptability under different working conditions, which improves the accuracy and safety of wheel speed detection, while saving chip resources and ensuring chassis safety.
Smart Images

Figure CN120110397B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wheel speed decoding, and particularly relates to an AK protocol-based adaptive wheel speed decoding method and system. Background Art
[0002] Wheel speed sensors are crucial components of modern vehicles. The wheel speed information they provide is usually applied to systems that affect the safety performance of vehicles, such as anti-lock braking systems, electronic stability control systems, and vehicle dynamic control systems. Currently, intelligent wheel speed sensors with data protocol and verification functions are becoming more and more widely used. Currently, the more common and frequently used one is the wheel speed sensor based on the AK communication protocol. The AK protocol (usually referring to Automobil-Kommunikation, or a proprietary protocol defined by a specific manufacturer) is a protocol for communication between vehicle electronic control units (ECUs), and is commonly found in CAN (Controller Area Network), FlexRay, or PSI5 bus systems.
[0003] The AK protocol transmits data by controlling the magnitude of the current. The AK protocol wheel speed sensor is a Hall-type wheel speed sensor that generates wheel speed using the Hall effect principle. Usually, there are 3 Hall elements on its chip, which are composed of 2 longitudinally placed Hall elements on the left and right and another Hall element placed transversely in the middle. The magnetic induction intensities of the three Hall elements can be respectively denoted as B1, B2, and B3, and then speed and direction signals are obtained through different differential calculations: the speed signal is calculated through B2 - B1; the direction signal is calculated through B3 - (B1 + B2) / 2. At the same time, the AK protocol is also a way of communication between the controller and the wheel speed sensor. The AK signal transmits data by controlling the magnitude of the current. One frame of AK signal contains a speed pulse and data protocol bits, corresponding to the speed signal and the data signal respectively. Its data frame structure: includes an identifier (ID), a data length (DLC), and a data field (Data Field), where the wheel speed information is usually encoded in a specific byte of the data field. In terms of real-time performance, it supports the fast transmission of high-priority messages and is suitable for high-frequency updated signals such as wheel speed. In terms of fault tolerance, generally, techniques such as CRC check and bit stuffing are used to ensure the reliability of data transmission. Before decoding, signal acquisition and preprocessing need to be carried out first; the sensor pulse signal is captured through a CAN controller or directly through IO. Then, an adaptive digital filter (such as a Kalman filter or a moving average filter) is used to eliminate high-frequency noise while retaining the dynamic characteristics of the signal. Then signal shaping is carried out to convert the analog pulse into a digital square wave for subsequent processing.
[0004] One frame of AK signal contains speed pulses and data protocol bits, corresponding to speed signals and data signals respectively. The speed pulse signal is at a high current (ICCH) level, and the data signal is at a medium current (ICCM) level. There are mainly three working modes. Refer to Figure 1 As shown Figure 1 Figure 4 shows the signal waveform diagram in the normal mode. In the normal working mode: when the sensor detects a zero-crossing input signal, that is, the magnetic induction intensity is 0, after a certain delay (usually 70 - 121 us), a speed pulse is output. The time length of this speed pulse is the Tp interval. The time synchronization mechanism of the AK protocol (such as Sync message) is used to align the wheel speed data of each wheel. The data of multiple sensors is fused through Kalman filtering or weighted average algorithm to improve robustness. Due to the large differences in the environment where the vehicle is located, the working conditions of the decoder are also changing. In particular, during actual use, the data width varies greatly. The common decoding method only samples in a fixed manner and is not sensitive to the change of data width. It is very likely that sampling is inaccurate in extreme cases, resulting in decoding failure, which may lead to decoding errors and pose potential safety hazards to the vehicle. Abnormal handling and fault tolerance are very important in the adaptive wheel speed decoding based on the AK protocol. If no valid pulse is received for multiple consecutive cycles, it will cause signal loss and trigger fault diagnosis. In addition, the traditional static threshold control process cannot automatically adjust the threshold level for pulse recognition according to environmental conditions, which is also a common situation leading to abnormalities. Based on the above problems, the present invention adaptively adjusts the decoding information in the wheel speed detection process through dynamic Tp interval estimation, so as to better identify the change of decoding bit width caused by external factors during actual use and perform accurate pulse data acquisition, thereby improving the detection reliability and vehicle safety, while saving on-chip resources to the greatest extent and being able to dynamically adapt to changes in working conditions. Summary of the Invention
[0005] To solve the above problems in the prior art, the present invention proposes an adaptive wheel speed decoding method and system based on the AK protocol. The method includes:
[0006] Step S02: When the first pulse arrives, record the current timestamp and the timestamp of the falling edge to calculate the width of the speed pulse, and write this width as the estimated Tp interval into the first storage space;
[0007] Step S1: Read the Tp interval from the first storage space;
[0008] Step S2: Calculate the actual sampling points based on the Tp interval; oversample the data frame based on these sampling points and determine the value of each data bit; specifically including the following steps:
[0009] Step S21: Set up the correspondence table between Tp intervals and sampling points, and obtain the oversampling ratio corresponding to the current Tp interval by querying this correspondence table;
[0010] Step S22: Continuously sample at the sampling ratio and use the sampling count value for counting; Take the sampling result when the sampling count value is equal to as the second sampling group, and take the sampling result when as the first sampling group; Use the best-of-three system to make an intra-group decision for the first sampling group and the second sampling group. When there are 2 or more sampling results greater than or equal to 1 among the three sampling results within the sampling group, the decision result of the sampling group is 1; Otherwise, the decision result is 0;
[0011] Step S3: Determine the current data bit value based on the decision results of the first sampling group and the second sampling group; Judge whether the decision results of the first sampling group and the second sampling are equal; If they are equal, it is determined that the sampled data is incorrect. If the decision result of the first sampling group is 0 and the decision result of the second sampling group is 1; Determine that the decision result of the current data bit is 1; If the first sampling result is 1 and the second sampling result is 0; Then determine that the decision result of the current data bit is 0; After completing the sampling of the data bit, if the data frame has not been completely sampled, return to step S22; If the data frame has been completely sampled, return to step S02.
[0012] Further, the default value of the Tp interval is 50us.
[0013] Further, the first storage space is a storage space located in the decoder.
[0014] Further, the first storage space is a register space located in the decoder.
[0015] Further, after obtaining the Tp interval, define the warning range according to the Tp interval value of the current data frame. If the rising / falling edge of the pulse in the data stream appears within the warning range, set the warning flag bit and remind the user of an early warning based on this warning flag bit.
[0016] Further, the decoder is connected to the vehicle-mounted microcontroller.
[0017] An AK protocol-based adaptive wheel speed decoding system, which is used to implement the above AK protocol-based adaptive wheel speed decoding method.
[0018] An AK protocol-based adaptive wheel speed decoding control digital logic, which is used to implement the above AK protocol-based adaptive wheel speed decoding method.
[0019] An adaptive wheel speed decoding control chip based on the AK protocol, and the adaptive wheel speed decoding control chip based on the AK protocol is used to implement the above-mentioned adaptive wheel speed decoding method based on the AK protocol.
[0020] An adaptive wheel speed decoding control circuit based on the AK protocol, characterized in that the adaptive wheel speed decoding control circuit based on the AK protocol is used to implement the above-mentioned adaptive wheel speed decoding method based on the AK protocol.
[0021] The beneficial effects of the present invention include:
[0022] (1) By estimating the dynamic Tp interval to adaptively calculate the sampling points of each bit of data in the data frame, the sampling points can be dynamically adjusted during actual use to ensure reliable sampling, and then the sampling and decoding reliability can be improved through the Tp interval obtained by adaptive calculation; further, by dynamically balancing and adjusting the next Manchester data sampling point and setting a warning range to detect unreliable warnings of the current sensor as a safety reference, it can be used for chassis safety guarantee; this method is especially suitable for the single-wire mode, which can not only ensure the accurate acquisition of speed information but also save the IO resources on the chip;
[0023] (2) It has strong adaptability to different working conditions. Based on the detection of the environment and its working conditions, the estimation of the Tp interval can be dynamically adapted to the vehicle speed detection process, so as to save software and hardware resources when the vehicle is stable. In the case of poor environment, the sampling method is adjusted in advance and the Tp interval is determined, which saves on-chip resources to the greatest extent while ensuring the reliability of speed detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, but do not constitute an improper limitation to the present invention. In the drawings:
[0025] Figure 1 It is a schematic diagram of the AK protocol encoding method in wheel speed detection provided by the present invention.
[0026] Figure 2 It is a schematic diagram of the adaptive wheel speed decoding method based on the AK protocol provided by the present invention.
[0027] Figure 3 It is a schematic diagram of the data decoding process and its oversampling provided by the present invention.
[0028] Figure 4 It is a schematic diagram of setting a warning range based on the Tp interval provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments. The illustrative embodiments and descriptions are only used to explain the present invention, but not to limit the present invention.
[0030] The present invention proposes an adaptive wheel speed decoding method and system based on the AK protocol; the main principle of the AK protocol is to reflect speed information through the induction magnetic field generated by the Hall sensor and the rotation of the gear. Similarly, rotations in different directions can also be obtained by the gear passing through the Hall sensor. At this time, a sine curve as shown is obtained, where the intersection position with the horizontal line is the speed zero crossing. Therefore, the speed zero crossing can be considered as a speed pulse; after analog rectification, amplification, filtering and other operations, it is reflected as the digital signal below; in order to increase the anti-interference of data and the stability of the data stream, the Manchester coding method is correspondingly adopted, that is, there needs to be a corresponding edge change between one complete piece of data; and the three-current method is adopted, and the pulse interval is Tp; Figure 1 As shown, in the sine curve obtained by the AK protocol for wheel speed detection, the position where it intersects with the horizontal line is the speed zero crossing, so the speed zero crossing can be regarded as a speed pulse; after analog rectification, amplification, filtering and other operations, it is reflected as the digital signal below; Figure 1 To increase the anti-interference of data and the stability of the data stream, the Manchester coding method is correspondingly adopted, that is, there needs to be a corresponding edge change between one complete piece of data; and the three-current method is adopted, with a pulse interval of Tp;
[0031] Preferably: in the three-current method adopted, the current Icch of the speed pulse is 28 mA, the current Iccm of the data pulse is 14 mA, and the static current IccL is 7 mA;
[0032] Preferably: the default value of the pulse interval Tp is 50 us, and the change range specified by the protocol is 40 us < Tp < 60 us; that is to say, under actual working conditions, the pulse interval Tp is dynamically variable and allowed; this will lead to data errors;
[0033] As shown in the appendix Figure 1 When the AK protocol is used for wheel speed detection, 9-bit data is defined, where: the bit of Icch in the figure (also called the 0th bit) is the speed pulse bit, and the subsequent bits are data bits. Among them: the first bit (the position of 0 in the figure) represents the air gap size, the second bit (the position of 1 in the figure) represents the amplitude validity, the third bit (the position of 2 in the figure) is user-defined, the fourth bit (the position of 3 in the figure) represents the direction validity, the fifth bit (the position of 4 in the figure) represents the direction, the sixth to eighth bits (5-7 in the figure) represent the amplitude size, and the ninth bit (the position of 8 in the figure) represents the parity check bit; the speed pulse bit can be transmitted on a separate speed pulse line. At this time, the first bit on the data line is the first bit;
[0034] As shown in the appendix Figure 2 The adaptive wheel speed decoding method based on the AK protocol specifically includes the following steps:
[0035] Step S01: After the decoder is powered on, judge the current detection mode; specifically:
[0036] Step S011: Determine whether the current detection mode is single-line mode or double-line mode; if it is single-line mode, go to step S012, otherwise, go to step S013;
[0037] Preferably: The default value of the detection mode is single-line mode;
[0038] Step S012: When configured in single-line mode, determine whether there is already a data stream. If so, wait for the current data stream to complete and meet the idle condition, and wait for the first pulse in the subsequent first data stream as the speed pulse; otherwise, there is no data stream, wait for the data stream on the data line to occur, and use the first pulse in the subsequent data stream as the speed pulse; go to step S02;
[0039] Preferably: The idle condition is that the idle time of the data line is greater than or equal to the idle threshold;
[0040] Step S013: When configured in double-line mode, wait for the first pulse on the speed pulse line as the speed pulse;
[0041] Step S02: When the first pulse arrives, record the current timestamp (i.e., the timestamp of the rising edge) and the timestamp of the falling edge to calculate the width of the speed pulse, and use this width as the estimated Tp interval; write this estimated Tp interval into the first storage space;
[0042] Preferably: Step S02 is executed in parallel with an independent logic and sampling process (steps S1 - S3). The arrival of the first pulse in the next data frame is detected through the independent logic, and the estimated Tp interval used in the next data frame is determined based on the speed pulse; the logic includes software logic and hardware logic; in this way, step S02 for determining the Tp interval and step S1 for obtaining the Tp interval can be executed in parallel; of course, it can also be set in a non-independent manner, in which case serial operation is required;
[0043] Step S01 or S02 further includes determining the estimation accuracy mode after the decoder is powered on; the estimation accuracy mode includes high-precision mode, medium-precision mode, and / or low-precision mode; where: in high-precision mode, the Tp interval is estimated for each pulse or specific pulse position; in medium-precision mode, the Tp interval is estimated once for each data frame; in low-precision mode, the Tp interval is estimated once for N data frames;
[0044] Preferably: The first storage space is the storage space in the decoder;
[0045] Preferably: The first storage space is the register space in the decoder;
[0046] Preferably, the first storage space is the storage space in the AK protocol-based adaptive wheel speed decoding system;
[0047] Preferably, after the decoder is powered on, the default value of the Tp interval is read from the non-volatile storage space and written into the first storage space; in the non-estimation mode, the default value of the written Tp interval is maintained in the first storage space; that is, 50 us, and the value in the first storage space remains unchanged subsequently; in the estimation accuracy mode (including high-precision mode, medium-precision mode, and / or low-precision mode), during subsequent decoding, the Tp interval value needs to be adaptively re-determined and written into the first storage space;
[0048] Step S1: Obtain the current Tp interval; specifically: read the value of the Tp interval from the first storage space; considering that in the actual use process, due to the influence of external factors such as working conditions, the Tp interval value cannot ideally remain at a certain value and is very likely to fluctuate continuously; therefore, it is extremely important to dynamically capture the Tp interval value to adjust the positions of the first, second, and evaluation bits; whether it is a two-wire mode or a single-wire mode, the speed pulse will be reflected on the data line, so the first pulse received on the data line can be considered as the speed pulse. At this time, by estimating the width value of the speed pulse width, the current Tp interval can be obtained, and subsequent adaptive calculations and sampling point parsing can be performed; for each frame of data, the appropriate Tp interval can be accurately determined, which can ensure the accuracy of sampling;
[0049] Further: Determine the timing of entering step S02 or S1 based on the estimation accuracy mode; specifically:
[0050] In the high-precision mode, the Tp interval needs to be re-determined and obtained before each pulse or specific pulse sampling, that is, enter step 02; in this mode, by determining the width of the previous pulse, the Tp interval to be used for sampling the next pulse (specific pulse) is estimated; for the sampling process of the same data frame (the same decoding process), the same oversampling ratio can be used; that is to say, in the high-precision mode, the oversampling ratio does not need to be changed, and the determination of the oversampling ratio only occurs when the first Tp interval in the data frame is determined; for the occurrence of transmission anomalies between specific pulse bits during transmission, the high-precision mode can be selected to overcome the possible mis-sampling caused by this anomaly by estimating the Tp interval value before the transmission of the specific pulse; this high-precision mode is used under specific working conditions and is generally set before the decoder is powered on;
[0051] In the medium-precision mode, after the first speed pulse of a new data frame, that is, after a data frame is transmitted, a re-determination of the Tp interval is performed; compared with the high-precision mode and the low-precision mode, the medium-precision mode is a compromise solution; in the case of the non-decoder being powered on for the first time, before each data frame sampling, steps S02 and S1 are entered to determine and obtain the current Tp interval; while in the low-precision mode, the Tp interval is estimated every N data frames; where: N is a dynamic or static value;
[0052] Preferably: the default value of the estimation precision mode is the medium-precision mode; and the medium-precision mode and the low-precision mode can be converted to each other;
[0053] In the low-precision mode, the Tp interval is estimated every N data frames, that is, after every N data frames are transmitted, step S02 is entered to re-determine the Tp interval; an N-value counter is required to judge whether N data frames have been reached;
[0054] The medium-precision mode and the low-precision mode can be converted to each other, specifically:
[0055] Step S1A1: Monitor the current detection environment in real time and judge whether the detection environment has changed; if so, enter the next step; otherwise, keep the current N value and / or keep the current estimation precision mode; that is to say, the decoding working conditions are determined by detecting the environment; thus, when the working conditions are stable, the estimation overhead can be reduced, thereby improving the decoding efficiency;
[0056] Preferably: N is 2 or more; the initial value of N is set to 2;
[0057] The current detection environment is monitored through environmental parameters; the environmental parameters include: one or more of weather, road surface conditions, tire status, vehicle load, electronic interference, sensor installation, driving vibration, sensor pollution or corrosion, etc.; where: the weather includes temperature, humidity, weather conditions (rain, snow, ice), etc.; the road surface conditions include: flatness, slipperiness, bumps, etc.; the tire status includes tire pressure, wear, grip, etc.;
[0058] Preferably: Based on the detected environmental change that will occur, the current N value and / or the estimation precision mode are changed in advance; for example: for electronic interference, when the vehicle may enter an area where electromagnetic interference (such as other electrical equipment, high-voltage cables) may occur and interfere with the sensor signal acquisition, the N value can be appropriately adjusted to a smaller value in advance before entering the area; (when the N value is already very small, such as equal to 2, the estimation precision mode can be directly changed) or the estimation precision mode is changed, changing from the low-precision mode to the medium-precision mode, and entering the per-data-frame detection state in advance;
[0059] Step S1A2: Dynamically adjust the value of N according to the direction of the change in the detection environment, so that when the detection environment improves, increase the value of N (currently in the low-precision mode) or change the medium-precision mode to the low-precision mode (currently in the medium-precision mode); conversely, when the detection environment deteriorates, decrease the value of N until N = 1 and enter the medium-precision mode; that is, when the detection environment is good, a larger value of N can be maintained, and even the longer the good detection environment lasts, the larger the value of N; conversely, when the detection environment is poor, the value of N can be adjusted at a certain frequency, and even the longer the bad detection environment lasts, the smaller the value of N, and even when the value of N has reached 2, directly enter the medium-precision mode;
[0060] Furthermore: Dynamically adjust the value of N based on the degree of change in the detection environment, so that the greater the degree of change, the greater the degree of adjustment of the value of N; conversely, the smaller the degree of change, the smaller the degree of adjustment of the value of N;
[0061] In the low-precision estimation mode, it is necessary to re-determine and obtain the Tp interval every time N data frames are transmitted; if the value of N changes or the precision estimation mode changes, it is necessary to enter step S02 to re-determine the Tp interval and write it into the first storage space, so that after the detection of the current data frame is completed, the Tp interval is re-read from the first storage space in step S1, so that the re-determined Tp interval is used in the sampling and decoding process of the next data frame; and enable the new precision estimation mode or the value of N;
[0062] Preferably: The above conversion control operations are completed through the software logic located in the operating system, or the hardware logic located in the decoder or the vehicle-mounted controller;
[0063] Step S2: Calculate the sampling points based on the Tp interval; perform continuous multiple samplings based on the calculated oversampling points; judge the judgment result of the sampling group based on the sampling result, and determine the current data bit value based on the judgment result; specifically include the following steps:
[0064] Step S21: Set the correspondence table between the Tp interval and the oversampling ratio, and obtain the oversampling ratio corresponding to the current Tp interval by querying this correspondence table; for example: when the Tp interval is 50 us, use 32-fold oversampling;
[0065] Preferably: The correspondence table between the Tp interval and the oversampling ratio is preset; the setting method is to make the oversampling ratio M and the Tp interval satisfy the following conditions 1-3;
[0066] Condition 1: ;
[0067] Condition 2: ;
[0068] Condition 3: ;
[0069] Preferably, after obtaining the Tp interval, define a warning range according to the Tp interval value of the current data frame. If the rising / falling edge of the pulse in the data stream appears within the warning range, set the warning flag bit, and based on this warning flag bit, remind the user of early warning to improve the decoding safety and reliability. Further, a detection program is set in the operating system to detect the value of the warning flag bit in real time. When the flag is set, remind the user of early warning through multimedia means;
[0070] Preferably, the multimedia means includes audio, video, etc.;
[0071] Alternatively, after the decoder sets the warning flag bit, it pushes a warning message to the operating system through a push pipeline;
[0072] The definition of the warning range according to the Tp interval value of the current data frame is specifically as follows: obtain the predicted appearance time of each subsequent pulse according to the Tp interval value of the current data frame and the rising edge timestamp of the speed pulse. If the rising / falling edge of each pulse appears outside the warning range, it is considered that the Manchester decoding requirement is met. If it appears within the warning range, it is considered that there may be a problem with the Manchester decoding at this time, and the warning flag bit is set;
[0073] Preferably, the warning range is set to the range formed near the rising and falling edge occurrence times of each pulse calculated according to the estimated Tp interval and the first pulse occurrence timestamp (the rising edge timestamp of the first pulse); as shown in the attached Figure 4 figure, the shaded part in the figure is the warning range of the 3rd bit;
[0074] Alternatively, the definition of the warning line range is specifically as follows: calculate the appearance time of each pulse P based on the estimated Tp interval value, and at the same time count the low / high level in the Manchester coding bit (that is, the high and low levels within one Tp width); if the corresponding edge appears and the count value is less than the bit number value of the pulse P corresponding to the timestamp, set the warning flag bit, otherwise it is considered that the coding meets the requirements; in this way, the appearance timing of the edge is detected in each Manchester coding cycle, improving the ability to detect incorrect coding. The user can set the corresponding warning line to predict the stability of the data on the data transmission line in advance, and then distinguish whether the sensor is in a normal state; the bit number P of the pulse P is numbered in the order of 1, 2,...;
[0075] Step S22: Initialize the sampling count value in the data frame to 0 at the rising edge of the first pulse; perform continuous sampling at the sampling magnification M, and increment the sampling count value every time a sampling is completed; if it is determined that the values of three consecutive samplings are all 0, then continue the continuous sampling; use the sampling result when the sampling count value is equal to as the second sampling group, and use the sampling result when as the first sampling group; perform within-group decision on the first sampling group and the second sampling group using the best-of-three system. When there are 2 or more sampling results greater than or equal to 1 in the three sampling results within the sampling group, the decision result of the sampling group is 1; otherwise, the decision result is 0; clear the sampling count value when it reaches the sampling magnification;
[0076] Preferably: When the sampling count value reaches the idle threshold, keep the count value and continue continuous sampling until an edge arrives, then clear the counter and start incrementing the count again; when the sampling count value reaches 31 (less than the sampling magnification value), if a non-0 sampling result or a non-0 decision result has been obtained previously, reset the sampling count value to 0 (otherwise, it is in the idle counting process);
[0077] Preferably: The idle threshold is a preset value, for example: equal to 41;
[0078] Preferably: The idle threshold is a value related to the sampling magnification;
[0079] Step S3: Determine the current data bit value based on the decision results of the first sampling group and the second sampling group; specifically: judge whether the decision results of the first sampling group and the second sampling are equal; if they are equal, it is regarded as not meeting the Manchester coding rule, and it is determined that the sampling data is incorrect. If the decision result of the first sampling group is 0 and the decision result of the second sampling group is 1; determine that the decision result of the current data bit is 1; if the first sampling result is 1 and the second sampling result is 0; then determine that the decision result of the current data bit is 0; after completing the sampling of the data bit, if the data frame has not been completely sampled, return to step S22; if the data frame has been completely sampled, return to step S02 or S22 (or step S1);
[0080] Preferably: If the data frame has been completely sampled, if the current estimation accuracy mode is the medium accuracy mode, return to step S02; if the current estimation accuracy mode is the low accuracy mode, increment the N-value counter, and further determine whether the N-value counter reaches the N value in the current low accuracy mode. If it has not reached, return to step S1 or S22 (or step S1) (at this time, the Tp interval continues to be used), otherwise, return to step 02; when first entering the low accuracy mode, initialize the N-value counter to 0;
[0081] Preferably: Execute this step at the evaluation position, and the evaluation value is a preset value, for example: at;
[0082] Example 1, as Figure 3 shown, in the present invention, oversampling is adopted for the data bits defined by the AK protocol, and a best-of-three judgment is made at the specified sampling points to ensure the accuracy of the data; the figure shows a sampling schematic diagram with a Tp interval of 50 us, and the event interval within each dashed box is 50 us. At this time, when the 32-fold oversampling method is fixed, the sampling counter runs freely. If there is no data edge, the sampling counter holds when it reaches 41; if an edge arrives at this time, the counter is cleared and counting starts again upward. Sampling is performed when the counter reaches 1 / 4 Tp, that is, the second sampling in the figure is performed when the counter is 8; since the best-of-three system is adopted, it is necessary to judge that two or more of the three positions 7, 8, and 9 are 1 to obtain a result of 1, and the corresponding value is obtained by sampling at this time; the first sampling position is at 3 / 4 Tp, and the corresponding value of the counter is 24 at this time; similarly, it is necessary to judge the values of the three positions 23, 24, and 25 to obtain the corresponding sampling values; the evaluation bit is judged at 1 / 2 Tp; when evaluating, it is judged whether the values of the first and second samplings are equal; if they are equal, it does not meet the Manchester coding rule and the data is considered incorrect. If the result of the first sampling is 0 and the result of the second sampling is 1; then it is determined that the final result of the current data is 1; if the result of the first sampling is 1 and the result of the second sampling is 0; then it is determined that the final result of the current data is 0;
[0083] Based on the same inventive concept, the present invention proposes an AK protocol-based adaptive wheel speed decoding system, and the system is used to implement the above AK protocol-based adaptive wheel speed decoding method;
[0084] Based on the same inventive concept, the present invention proposes an AK protocol-based adaptive wheel speed decoder, and the decoder is used to implement the above AK protocol-based adaptive wheel speed decoding method;
[0085] A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including assembly or interpreted languages, declarative or procedural languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. A computer program can, but does not have to, correspond to a file in a file system. The program can be stored as part of a file that holds other programs or data (such as one or more scripts in a markup language document), in a single file dedicated to the program, or in multiple cooperating files (such as files that store one or more modules, subroutines, or code portions). A computer program can be deployed to execute on one computer or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.
[0086] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0087] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0088] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, so that the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that it is still possible to modify the specific implementation manners of the present invention or make equivalent substitutions. Any modification or equivalent substitution that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.
Claims
1. An adaptive wheel speed decoding method based on the AK protocol, characterized in that, The method includes: Step S02: When the first pulse arrives, record the current timestamp and the timestamp of the falling edge to calculate the width of the speed pulse, and write this width as the estimated Tp interval into the first storage space; the time length of the speed pulse is the Tp interval; Step S1: Read the Tp interval from the first storage space; Step S2: Calculate sampling points based on the Tp interval; oversample the data frame based on these sampling points and determine the value of each data bit; specifically, it includes the following steps: Step S21: Set up a correspondence table between the Tp interval and the sampling points, and obtain the oversampling points corresponding to the current Tp interval by querying this correspondence table; After obtaining the Tp interval, define a warning range according to the Tp interval value of the current data frame. If the rising / falling edge of the pulse in the data stream appears within the warning range, set the warning flag bit, and based on this warning flag bit, remind the user for early warning; Step S22: Continuously sample at the sampling magnification and use the sampling count value for counting; Take the sampling result when the sampling count value is equal to as the second sampling group, and take the sampling result when as the first sampling group; Conduct an intra-group decision on the first sampling group and the second sampling group using the best-of-three system. When the number of sampling results greater than or equal to 1 among the three sampling results within the sampling group is 2, the decision result of the sampling group is 1; Otherwise, the decision result is 0; Step S3: Determine the current data bit value based on the judgment results of the first sampling group and the second sampling group; judge whether the judgment results of the first sampling group and the second sampling are equal; if they are equal, it is determined that the sampled data is incorrect. If the judgment result of the first sampling group is 0 and the judgment result of the second sampling group is 1, the judgment result of the current data bit is determined to be 1; if the first sampling result is 1 and the second sampling result is 0, then the judgment result of the current data bit is determined to be 0; After completing the sampling of the data bit, if the data frame has not been completely sampled, return to step S22; If the data frame has been completely sampled, return to step S02.
2. The adaptive wheel speed decoding method based on the AK protocol according to claim 1, wherein The default value of the Tp interval is 50 us.
3. The adaptive wheel speed decoding method based on the AK protocol according to claim 2, characterized in that The first storage space is the storage space located in the decoder.
4. The adaptive wheel speed decoding method based on the AK protocol according to claim 3, characterized in that The first storage space is the register space located in the decoder.
5. The adaptive wheel speed decoding method based on the AK protocol according to claim 4, wherein The decoder is connected to the in-vehicle microcontroller.
6. An adaptive wheel speed decoding system based on the AK protocol, characterized in that, The AK protocol-based adaptive wheel speed decoding system is used to implement the AK protocol-based adaptive wheel speed decoding method described in any one of claims 1-5 above.
7. An adaptive wheel speed decoding control chip based on the AK protocol, characterized in that, The AK protocol-based adaptive wheel speed decoding control chip is used to implement the AK protocol-based adaptive wheel speed decoding method described in any one of claims 1-5 above.
8. An adaptive wheel speed decoding control circuit based on the AK protocol, characterized in that, The AK protocol-based adaptive wheel speed decoding module is used to implement the AK protocol-based adaptive wheel speed decoding method described in any one of claims 1-5 above.
Citation Information
Patent Citations
Manchester protocol decoding method and device and vehicle
CN117527144A
Decoding device and decoding method for AK protocol wheel speed sensor
CN117596106A