Engine log diagnosis · how it decides

How the Car Doctor Thinks

It reads a spreadsheet of numbers from your engine and says what's wrong with the car. The hard part isn't spotting a weird number. It's knowing that almost no number is weird on its own.

679

alarms from the obvious version of the knock rule, on a real log

→
0

from the shipped version, on the same log — correctly, that engine is fine

The one big idea

A number is only good or bad for what the engine was doing

Like you're 5

A heart rate of 150 is an emergency if the kid is asleep, and completely normal if they're haring around the playground. Same number. You cannot judge it until you know what they were doing.

Engines are exactly like this. Suppose the computer is adding 15% extra fuel. If the car is cruising steadily down a motorway, that's alarming — something is wrong. If it's 200 milliseconds after you stamped on the accelerator, it's completely normal, because adding fuel is precisely what the engine is meant to do when you ask it for power.

READING +15% extra fuel DOING Throttle transient Verdict: normal READING +15% extra fuel DOING Steady cruise Verdict: something is wrong
Identical readings, opposite conclusions. This is why the very first thing the analyser does is label every moment of the drive with what the engine was doing. Every rule then declares which labels it is allowed to look at, and it never sees anything else.

So the analyser tags every single moment of your drive with one of nine labels: warming up, idling, cruising steadily, pulling hard, coasting downhill, throttle moving, and so on. A rule about steady-state fuelling simply never gets shown the moments where you were stamping on the pedal. Not filtered out later — never shown at all.

The assembly line · six stages, in order

From a pile of numbers to a diagnosis

Your log is a spreadsheet: a row every few milliseconds, a column per sensor. A 35-minute drive is about 32,000 rows. Here's what happens to it.

1
Read it ingest

Every logger names things differently — engine speed (RPM), RPM, ..RPM (RPM) all mean the same thing. Translate them all into one vocabulary, once, at the door. That way adding support for a new logger never means touching a single diagnosis rule.

2
Tidy it condition

Readings don't arrive on a neat beat, and different sensors update at wildly different speeds — engine speed many times a second, coolant temperature once every ten seconds. Put everything on a steady 5-per-second drumbeat. Then check each sensor is actually alive.

3
Label it segment

Tag every moment with what the engine was doing. This is the backbone — the thing the whole analysis rests on.

4
Squash it aggregate

Throw the individual readings away and keep summaries instead: for each situation, the average, the spread, the worst value. Like keeping a report card rather than every homework sheet. A six-hour drive squashes to exactly the same size as a ten-minute one.

5
Ask the rules detect

Fourteen rules, each one a small self-contained question — "is there a vacuum leak?", "is the thermostat stuck?". Each declares up front which sensors it needs, which situations it's valid in, and how many seconds of evidence it demands. Those three gates are enforced for it, so no rule author can forget one.

6
Group and rank rank

One fault often trips three rules. A vacuum leak shows up as a lean mixture, and a lumpy idle, and an idle valve working flat out. Listing three findings invites three repairs. So findings that share a cause collapse into one diagnosis with three pieces of evidence.

The clever bits

Four tricks that stop it crying wolf

Every one of these exists because the naive version got a real log wrong. They aren't polish — each is the difference between a tool a mechanic trusts and one they stop opening.

Telling a hole from an empty tank, by the shape

Like you're 5

Your straw has a tiny hole in it. Sipping gently, you get mostly air — the hole ruins it. Sucking as hard as you can, you barely notice. But if the cup is nearly empty, you struggle no matter how hard you suck. Same complaint, and you can tell which is which by whether it gets better when you suck harder.

A split air hose lets in a roughly fixed amount of extra air. At idle the engine is barely breathing, so that leak is a big slice of the total and the computer adds a lot of fuel to compensate. At full throttle the engine is gulping air and the same leak is a rounding error. So the correction fades as you push harder. A fuel supply problem doesn't fade — the engine is short of fuel everywhere.

0% 5% 10% 15% 20% 0 100 200 300 400 500 engine load (mg/stroke) — how hard it's working → 8% threshold Not enough fuel — stays flat Air leak — fades as load rises both ≈ 15% at low load
Same symptom at idle, different diagnosis. Real figures from a test log: the leak reads 14.8% at low load and 2.6% at high load; a supply shortfall sits near 15% throughout. Below the 8% line a correction is just noise and nothing is reported at all. The analyser can only see the difference because it files fuel corrections into load bands rather than averaging the whole drive into one number — an average would show roughly 9% for both.

Comparing the engine to itself, not to a textbook

Like you're 5

You can't tell whether a child is unusually short by standing them next to a grown-up. You have to compare them with other children their own age.

This is the 679 versus 0 from the top of the page, and it's the best story in the whole system.

"Knock" is a destructive rattle inside the engine. When it happens, the computer protects the engine by retarding the spark timing. So: spark timing suddenly dropping looks like a great way to detect knock. Write that rule — "timing fell more than 6° while the engine was working hard" — run it on a real log, and it fires 679 times.

All 679 are wrong. Spark timing is supposed to fall as load rises. That's the shape of every ignition map ever designed. Timing going from 20° at light load to 8° at heavy load isn't a fault; it's the computer reading its own table exactly as intended.

0° 6° 12° 18° 24° spark timing engine load (mg/stroke) — how hard it's working → 150 320 480 20° here… …8° here 12° Naive rule: “timing collapsed — KNOCK!” ×679 Learned baseline: this is exactly normal here. 0 alarms.
The fall is the design, not the fault. The fix is to learn what timing this engine normally runs at each combination of engine speed and load, from the drive itself, and then ask only "is it lower than its own normal, right here?" That baseline can't exist until the whole file has been read — which is why the analyser reads your log twice: once to learn the engine, once to judge it.

It also means the tool ships with no per-car calibration file to maintain, and the baseline is automatically right for your fuel, your altitude and your state of tune.

Counting things that happened, not rows in a spreadsheet

Like you're 5

One long "aaaaaaah" is one scream, not ten. If you counted every half-second of it separately you'd tell everyone the child screamed ten times.

The analyser looks at five readings per second. Something that goes wrong for two seconds therefore shows up in ten consecutive rows. Reporting "10 knock events" would be a flat lie about how often it happened. So anything that keeps matching within a few seconds is merged into one occurrence, keeping the worst value and how long it lasted.

WHAT THE SENSOR SENT · 5 per second worst: −5.62° 10 rows WHAT GETS REPORTED 1 occurrence · worst −5.62° · lasted 1.8 s 1 event
Ten rows, one thing that happened. The worst value survives the merge rather than being averaged away — a knock correction of −5.62° averaged with its mild neighbours reports −5.44° and quietly understates how hard the engine was knocking.

"Not plugged in" is not the same as "broken"

Like you're 5

If the thermometer in the empty spare room reads exactly the same number all week, the room isn't broken. Nobody put a thermometer there — you're reading a wire that isn't connected to anything.

On one real log, five inputs sat at a constant voltage because nothing was wired to them. A rule that just looks for wrong values would confidently report five dead sensors on a perfectly healthy car.

So before any diagnosis runs, every sensor is graded: working, missing entirely, never changes, or reading physical nonsense. A rule that needs a sensor which isn't trustworthy is skipped and reported as skipped — never guessed. That skipped list is part of the output, because "I couldn't check this" and "I checked this and it's fine" are completely different sentences.

The same instinct shows up in a subtler place. On one car the throttle reads 0.0% when closed; on another it reads 14.1%. Hardcode either number and the other car falls apart — with the wrong constant, one 44-minute drive registered no idling at all, starving every idle-related check of evidence. So the analyser learns where your throttle rests, from your log, every time.

The output

Two things it always tells you

Every finding carries two separate judgements, because they genuinely are different questions. How bad is it? — shown with the same language as the warning lamps on your dashboard. And separately, how sure are we? An overheat is severe and certain. A misfire guessed from engine-speed wobble is moderate and shaky. Collapsing those into one number is how diagnostic tools become untrustworthy.

Critical

Stop driving and fix it. Sustained overheating lands here.

Needs attention

Something is genuinely wrong and it will get worse.

Investigate

Worth looking into. Most vacuum leaks and fuel trim faults sit here.

Minor

A lead, not a fault. Watch it over the next few drives.

Not checked

A rule that couldn't run, and exactly why — a missing sensor, or too little of the right kind of driving.

And every finding shows the numbers it reasoned from. A diagnosis a mechanic can't verify is a diagnosis they won't trust.

The most important sentence

A quiet report does not mean the engine is healthy. It means nothing matched the rules that were able to run.

That's why the "not checked" list is part of the answer rather than hidden away. Without a knock sensor channel, "knock" is only ever "timing looks low for the conditions". Without per-cylinder data, a misfire is only ever a wobble in engine speed. The tool is built to say which of those it's doing — and log more channels and it will tell you more.