Projects / Machine learning
Case study · Machine learning · Error analysis

AI on Small Datasets: V8 Dyno Models

Most real engineering problems don't come with millions of labeled examples. Using only published dyno results from competition engines, I derived three predictive models, showed exactly how accurate each one is, and found a performance flaw hiding in the data.

The problem

Commercial engine simulators ask for a long list of specific parts, and I found no published comparison of their predictions against a large sample of real dyno tests. You can't tell how much to trust them.

What I built

Three models from Engine Masters competition data, using seven basic design parameters as inputs, delivered as Excel tools with their own GUIs. The simulator and its database are free on GitHub.

The result

Basic geometry and cam specifications explain most of an engine's performance, with the accuracy shown for every engine. Reviewing the errors also revealed a power-robbing torque dip that I then built a model to predict.

186 → 229engines, as more results were published
5,824measured torque points
7basic design inputs
7.3%standard deviation of average HP error
93%of power-robbing bumps correctly predicted
Method first

Check for separation before building a model

If the available inputs don't separate good engines from poor ones, no algorithm will find a relationship. So the first step was to look, and the choice of method came after that.

Parallel coordinates plot of normalized engine parameters, with the 25 best and 25 worst engines separating by color
The 25 best (blue) and 25 worst (red) engines on average HP per cubic inch, plotted across the design parameters. The two groups separate.
Scatter plot of modeled versus measured average horsepower per cubic inch for 186 engines with percent error
Modeled vs. measured average HP per cubic inch for all 186 engines: mean error 0.5%, standard deviation 7.3%.
Three models

The right algorithm for each question

I tried every applicable algorithm for each question and kept what worked best. The answer was different each time, and the simplest one won the first round.

MODEL 1 · MULTIPLE LINEAR REGRESSION

Performance simulator

Predicts average and maximum horsepower and torque, and the RPM where they occur. Regression gave the lowest error, so it's what shipped. The derivation files are public.

186 engines · free on GitHub
MODEL 2 · MONTE CARLO NEURAL NETWORK

Full torque curve

A multilayer perceptron predicts torque at every RPM. A version was later hand-coded onto a microcontroller to give live estimates in a running car.

229 engines · 5,824 points
MODEL 3 · K-NEAREST NEIGHBOR

Power-robbing bump predictor

Predicts whether a design is likely to suffer a sharp mid-range torque dip, using 15 design and performance dimensions.

173 engines · 15 dimensions
Scatter of model-calculated versus dyno-measured torque for 5,824 points, with percent error
All 5,824 torque measurements from 229 engines: calculated vs. measured (blue) and percent error (red).
Discovery

What the errors revealed

Plotting predicted against measured torque for each engine exposed a repeating feature: a sharp dip just after the engine comes onto its cam. On some competition engines, built by experts, it cost as much as 72 ft-lb.

Torque curve for engine 46 showing a 72 foot-pound dip in measured torque compared with the smooth prediction
A severe bump: 72 ft-lb lost in the mid-range.
Torque curve for engine 34 where measured torque closely follows the shape of the prediction
No bump: measured torque follows the predicted shape.
The limits, stated honestly
  • In 15 dimensions the two populations still overlap. The predictor is correct on 93.5% of engines with the bump, but on only 60.8% of engines without it
  • Where the decision line sits is a choice about which mistake costs more. More accuracy would need better features, not a different algorithm
  • Carburetor details, intake type and dynamic timing weren't published for every engine, so the true cause may lie outside the data. The model may be finding correlation rather than cause
Using it

A real design decision

I used the torque-curve tool to compare ten camshafts in a standard Ford 460 and in my planned 545 cubic-inch build. It confirmed my concern: a cam that would be a poor choice for a 460 daily driver is what the 545 actually needs.

Every competition engine was tested from about 2,500 RPM. Predictions below that, as in this chart, are extrapolation with no comparison data, and the tool says so.

Horsepower versus RPM for a 545 cubic-inch engine and a standard 460 with the same camshaft
The same cam in the 545 build and a standard 460.
Technical depth

For the engineers in the room

Data
  • Published results from the Engine Masters competition, starting with 186 naturally aspirated, two-valve V8s from 2009–2013, and later growing to 204 and 229 as more results appeared
  • Inputs: displacement, compression, bore, stroke, intake valve diameter, cam intake duration and maximum intake lift
  • Not every engine had a complete curve: 175 had full RPM coverage, and engines with too few points were excluded from parts of the analysis
Model selection
  • Weka to screen every applicable algorithm quickly, then a focused implementation of the best
  • Scilab for the regression derivation; Orange and Python for cross-checks
  • Population matters: these models describe competition engines, and show predictable errors on a stock engine
Delivery
  • Excel with custom GUIs, so that the people who would use the models needed nothing else
  • Every engine's measured curve, predicted curve and error is plotted in the tool
  • A searchable database lets users find the engines most similar to their own build

Watch the analysis

Introduction to the simulator (8 minutes).
The torque-curve neural network, its derivation and error analysis (33 minutes).
The power-robbing bump and the nearest-neighbor predictor (35 minutes).

Free downloads: the full torque-curve model and the power-robbing bump analysis, as Excel workbooks (macros required, about 45 to 60 MB each), are free on GitHub: download the engine models. Provided as is, with no warranty.

Applying it to your data

When you don't have big data

  • Yield and process models from limited production history
  • Finding which design parameters actually matter
  • Honest accuracy statements for a model before anyone relies on it
  • Models packaged in tools your engineers already use

Simulator and database on GitHub · Torque and bump models ·Derivation files

Technology

Stack

WekaScilabOrangePythonExcel / VBA GUIsMultiple regressionNeural networksMonte Carlok-nearest neighbor

Have limited data and a real question?

I'll tell you what your data can support, and how far to trust the answer.

Start a conversation

← Back to all projects