I’ve been doing more fiddling with log file and VE analysis, and I’m a little stumped as to where to go with it next.

A Bit Of Background

VE analysis is basically looking at what the air/fuel ratio the car is running at at a specific load/speed, comparing that to what we think it should be, and then fiddling with the fueling to get it closer to the ideal. The authors of the original Megasquirt firmware published a PDF that went in the basic maths of this.

Later on Phil Tobin implemented this idea in MegaLogViewer and TunerStudio (which can do it live). Phil did publish his tweaked algorithm on his site and later deleted it, but go go Web Archive!

My Thinking

An obvious point missed is the lack of interpolation on the target AFR, so I added that in. I then started to think about what the data going in is. We’re really trying to correct an error. We need to know how big that error is, so measuring the standard deviation seems like a good idea. We also need to know consistency. Is it consistently rich/lean or is it oscilating? If it is oscilating then changing the VE number really isn’t going to help much (unless the value it is oscilating around is consistently rich/lean), but consistent errors are an easy target. Finally we want to know how many hits each cell in the table gets. THe more hits, the more data, the higher our confidence should be.

Changes To LogViewer

I’m on holiday and I relax by noodling with code whilst sitting in the shade on a sunlounger with a drink, so I’ve been hacking on LogViewer. It now looks like this

A screenshot of a page with 2 line charts, a map and a heatchart

I’m at heart a backend engineer so I’m not going to win any style awards.

Basically, load up a log file, an MSQ file and hit the Analyse button. Moving your mouse over the top left chart will update the map so I can see where in the world a thing happened. The drop down on the right will change what the heat map shows, and clicking on a cell in the heatmap will chart the figures over time in the lower left chart. ‘Score’ is calculated by summing the difference of Math.sign(TargetAFR-ActualAFR) so something that is consistent will have a relatively large +- score.

This all runs in your browser, no server side, no cookies, no refunds.

My Problem

The answer is in there somewhere, but I dont know how to interpret what I’m seeing. This is a very nice wine though. Any ideas?