RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Wed Dec 24, 2025 4:53 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Roughness Measures and Misfire Detection
PostPosted: Wed Dec 22, 2021 2:19 am 
Offline
Experienced

Joined: Fri Aug 21, 2020 6:05 am
Posts: 315
I've been digging into these calcs, so I thought I'd share a summary.

Overview
Basically if the ECU sees an unexpected drop in crankshaft speed, it considers this to be a misfire. If it happens frequently enough in a certain timeframe, it will trigger the associated DTC.

Crankshaft Speed
Crankshaft Speed is calculated over certain start and end crankshaft positions for each cylinder. If the crank position equals the start position, the time is captured and stored for that cylinder. If the crank position equals the end position, the time difference between current time and prior time capture (for that cylinder) is captured. This is used to calculate crankshaft speed. A history of crankshaft speed is stored and updated when a new value is calculated.

Crankshaft Speed Deltas
These calculations look like a high-pass filter. The logic calculates what I have called 'Smoothed Crankshaft Speed Delta (SCSD)' which is the Crank Speed (lagged 1 cycle) - Crank Speed (current cycle) - one quarter of { Crank Speed (lagged 5 cycles) - Crank Speed (lagged 1 cycle) }. A rolling version of this calculation (RSCSD), for a number of engine speed ranges for each cylinder, is stored in a table in RAM (4 cylinders x 40 speed ranges). Note that the SCSD will be positive when the Crankshaft speed has reduced over time (as would occur in a misfire).

Roughness Measures
The ECU appears to use 3 metrics for Roughness. I've called these Roughness Measures A, B and C (RMA, RMB and RMC). The first measure is calculated as SCSD (lagged 1 cycle) - SCSD (current cycle) - { RSCSD (lagged 1 cycle) - RSCSD (current cycle) }. The second measure is Crank Speed (lagged 1 cycle) - Crank Speed (current cycle) - { Crank Speed (lagged 3 cycles) - Crank Speed (lagged 2 cycles) }. The third measure is Crank Speed (lagged 1 cycle) - Crank Speed (current cycle) - { Crank Speed (lagged 5 cycles) - Crank Speed (lagged 4 cycles) }. The last two metrics have a floor of zero so they can't be negative. These metrics look like various high-pass filters to isolate a short-term drop in crank speed from long term trends due to acceleration or deceleration.

Roughness Levels
The ECU checks whether the RMA, RMB and RMC are within expected thresholds. The thresholds are determined from a huge number of lookup tables that compensate for Engine Load, Engine Speed and ECT which apply under different car states of moving, in gear, MT/AT, high/low engine speed. If they exceed the thresholds, the ECU increases the misfire count.

Roughness 'Stand Outs'
To determine if a misfire occurs, the ECU is looking for a 'stand out' Roughness Measure. It does this by seeing if the Roughness Measure (last cycle) factored down is greater than the Roughness Measure (current cycle). If it is greater (even after being factored down), then the ECU concludes there was a misfire. The factors are looked up based on engine speed. There are different sets of tables for MT vs AT / idling vs driving. There are 5 factors. 1 factor for RMA, 2 factors for RMB and 2 factors for RMC. The second factor for RMB and RMC is used to also test if the Roughness Measure (last cycle) factored down is greater than the Roughness Measure (lagged 2 cycles). Both tests have to indicate a 'stand out' Roughness Measure for the ECU to conclude there has been a misfire.

Misfire Detection
A misfire is considered to occur if RMB or RMC are 'stand outs'. A misfire is also considered to occur if RMA is a 'stand out' (but only if RMB and RMC are not - to avoid double counting).

Misfire Count Thresholds
There are two main tests. One test, which corresponds to the second P0000 DTC, is performed every 400 cycles. The threshold is looked up from a table based on Engine Load and Engine Speed and varies from 30 to 100. The second test, which corresponds to the first P0000 DTC, is performed every 2000 cycles. The threshold is normally 30. When the DTC is triggered, the ECU stores which cylinder was the worst contributor to the misfire count.

How is this of any use?
If you want to really get to the bottom of what is causing a misfire DTC, logging the various Roughness Measures and other calculations could help getting to the root cause. Plus, there are almost 80 tables associated with Roughness variables, so this may help in locating and defining these tables in detail. Plus if you are changing the equipment installed in your engine/transmission, you might need to re-tune the various Roughness thresholds to account for any changes in engine dynamics.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: reuna and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl