How I used machine learning to improve my fuel map

Posts: 15
Joined: Tue May 21, 2013 7:25 pm

How I used machine learning to improve my fuel map

Postby GEFORCEXTREME » Mon Jul 30, 2018 11:05 am

I have a 22-year old car with a hybrid NA engine on it. It has a Misubishi 4G93 block, 4G92 82 mm pistons, and a 4G92 MIVEC head. Coming from a 4G92 SOHC engine, for avoiding potential reliability issues, when I got the MIVEC head, I also got a Haltech Platinum Sprint 500 to go with it.

I got the Spring 500 installed by my mechanic and got a base tune from that, but even that, he simply copied the tune from another car with a different engine. I didn't really want to spend the money to go for a professional tune up.

Initially, I would plug in my laptop and go for drives where I would keep watch on the O2 wideband sensor and when the O2 wideband sensor readings is not what I expected it to be, I will be searching for the "Q"-key on the keyboard to auto-tune it. Obviously, such a training method is extremely difficult and not to mentioned dangerous on the road.

I am a software engineer for a living and I have huge interests in machine learning, deep learning, data analytics, and big data.

What I needed:
1) Lots of data logs
2) Wideband O2-sensor
3) Python programming and mathematical computation and machine learning libraries

Formulating it as a machine learning problem:
The idea is simple. I drive on the road with whatever tune it currently has, and with the datalogs with O2-sensor readings, a regression machine learning model is used to fine tune the base fuel map.

Supervised machine learning problems can be broadly classified into two groups: i) classification, and ii) regression. In classification, you have data and labels and you teach the model to classify the inputs into different classes. A famous example of this is the MNIST problem where you have images of handwritten digits and their labels. In this example, the data are the images, and the labels are the what is the true digits that the each images represent.

In regression problems, instead of labels in forms of discrete classes, you have a continuous number. In the problem that we are looking at today we can put data in a table something like this:

RPM, Load, AfrDifference, BaseFuelMapValue
2000, -50, -0.5, 345
2500, -30, 0.7, 550,

From RPM, Load, and AfrDifference, we want to estimate what BaseFuelMapValue that caused the AfrDifference. In this case, the data features are the RPM, Load, and AfrDifference, and BaseFuelMapValue is the label. These types of information can be collected from the datalogging.

With this model, and datalogs, we will be able to train the model. At the end of this process, we will have a model that will be able to predict what is the BaseFuelMapValue from a given combination of RPM, Load, and AfrDifference. Ofcourse, no one wants a BaseFuelMapValue with a non-zero AfrDifference. However, this only means that we want to generate a new map from the model, we simply put AfrDifference = 0.

I will not be held responsible if you damage your car by tuning with this method.

I will be releasing the source code to this this later when I have more time.

Any feedbacks, ideas, and criticism, feel free to post below.

Posts: 15
Joined: Tue May 21, 2013 7:25 pm

Re: How I used machine learning to improve my fuel map

Postby GEFORCEXTREME » Thu Aug 02, 2018 7:14 pm

Return to “Tuning Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests