Introduction to the Debounce Algorithm for Automotive ECU Diagnosis

Publisher:美好未来Latest update time:2023-08-22 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Debounce Algorithm

The fault diagnosis step is to first perform fault detection, that is, to monitor in real time according to the preconditions and judgment conditions to determine whether there is a potential fault. Usually, four states (PREPASSED, PASSED, PREFAILED, FAILED) are used to represent the judgment result. For some faults, there is no need to confirm the fault through the Debounce algorithm. At this time, the judgment results are only PASSED and FAILED, and the confirmed fault is obtained directly; while for some faults, it may be caused by some signal fluctuations, not faults, and they are called potential faults. At this time, PREFAILED and PREPASSED are introduced to represent it, and the Debounce algorithm is needed to further confirm whether it is a fault. There are two commonly used Debounce algorithms: counter-based Debounce algorithm and time-based Debounce algorithm.


Debounce algorithm based on counter

The algorithm uses a Debounce counter (the counting range depends on the specific definition) to record the judgment results. When the PREFAILED state is obtained once according to the premise and judgment conditions, the counter (Fault Detection Counter) will increase by one step, so as to accumulate continuously. When the cumulative count reaches the set Failed limit, the fault state becomes Failed, that is, the potential fault is confirmed, as shown in the figure below at time t1. Some faults may be recovered after being confirmed, that is, as long as the PREPASSED state is obtained once according to the premise and judgment conditions, the counter (Fault Detection Counter) will decrease by one step, so as to continuously decrease. When the set Passed limit is reached, the fault state becomes Passed, that is, the fault has been eliminated, as shown in the figure below at time t2.

picture

The two values ​​in the figure above, Jump down value and Jump up value, need to be explained here. The so-called Jump down value means that the fault is confirmed to be in the Failed state. If the PREPASSED state is obtained according to the preconditions and judgment conditions of the detection next time, the value of the counter will not decrease by one step from the set FAILED limit, but jump to the Jump down value and start to decrease by one step. The Jump up value can be understood in the same way. Both values ​​are defined by the user.


Time-based Debounce Algorithm

The algorithm uses a Debounce timer (also in the range of -128 to 127) to record the result of the judgment. When the PREFAILED state is obtained once according to the premise and judgment conditions, the timer (Fault Detection Counter) starts counting. After a period of time t_failed, if the PREPASSED or PASSED state still does not appear, the fault state becomes Failed, as shown in the figure below at time t1; within tfailed, if the FAILED state appears, the fault state directly becomes Failed, that is, the fault is confirmed, as shown in the figure below at time t4. When the fault is confirmed, then when the PREPASSED state is obtained once according to the premise and judgment conditions, the counter is reset to zero and starts counting again. Similarly, the PREPASSED state is always obtained. After a period of time t_passed is accumulated, it indicates that the fault has been eliminated. As shown in the figure below at time t2. When the fault is confirmed, then when the PASSED state is obtained once according to the premise and judgment conditions, the counter does not need to accumulate time, and directly indicates that the fault has been eliminated, as shown in the figure below at time t3.

picture


Reference address:Introduction to the Debounce Algorithm for Automotive ECU Diagnosis

Previous article:Analysis of EMI noise sources in automotive DCDC switching power supplies
Next article:What are the applications of silicon carbide power devices in charging piles?

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号