The online racing simulator
Excel Genius Required
(65 posts, started )
Excel Genius Required
It isn't like me to make two threads in such quick succession, but I'm at my wits end on something else - also related to racing, hence putting it here.

I want to make a 3D surface chart of my Air:Fuel ratio with respect to RPM and Throttle. Easy, you might say!!

Well, Excel wants the data to be in an index table - throttle on the vertical and RPM horizontally.


1000 2000 3000 4000 5000 6000 7000
0 values here...
10
20
30
40
50
60
70
80
90
100

BUT

My datalogger can export the data values for a given moment into columns


1000 1 14.8
1000 2 14.9
1010 1 15.0
2000 5 13.0
1800 5 13.4

So, the question is thus - how do I convert 3 columns of data into an index table? I can easy remove duplicate values so that there is only one value of Air:Fuel for a given combination of throttle and RPM, but I can't for the life of me work out how to put it in a table form for converting to a surface chart.

The chart will, I hope, enable me to see where the errors are, much like 3D ignition maps are represented as a 3D chart to see spikes etc.

Obviously I'd be better off grouping the values into throttle positions like 0 10 20 30 40 rather than 1 2 3 4 5 6 7 8 9 10 11..., and RPM values every 500rpm too.

Please can someone help?

Attached is an XLS (renamed to .txt, so don't forget to rename it back to .xls) of the RAW data from the datalogger to play with. Bear in mind I'd like to do this with future exports, so don't work your magic without me being able to repeat it with new data.

Many thanks indeed!
Attached files
Sample Data.txt - 150 KB - 189 views
#2 - SamH
Can you offer up a file of raw datalogger output, in the 3 column format?

I can't promise a rapid return but it could provide something of a periodic welcome break for me from what I'm working on at the moment.
Attached - rename the txt to xls
#4 - SamH
Does the datalogger export in XLS format or tab-delimited/comma-separated format?
In csv

I think I've sort of done it, using a pivot table, that I then copy/paste the values, and then add average values in any blank cells via a formula. But the data is not smooth at all, so I'm fairly certain this is a useless way of doing it....

I just wanted a way of easily seeing where the car is running too rich or too lean compared to what we want, so that I can edit the fuelling map between races to improve it.

Pfffff

Attached is a raw file from the datalogger. I've added a bit more smoothing within the datalogger program in the hope that the finished product is less noisy.
Attached files
RPK.txt - 65 KB - 149 views
#6 - SamH
I'm probably chasing up the wrong tree, but is this the kind of result you're looking for? (It's outputting in HTML, but can be formed in csv, tab delimited or even using an xml schema)

http://www.ukct.net/tristan/dispdata.asp
#7 - SamH
... I used just the sample data..

[edit] Ahh.. the datalogger's output is much more comprehensive
#8 - ajp71
If you can find access to it somewhere a program called Origin is the best 3D map chart software I have seen and is easy to use, however, it is hugely expensive (my uni only has one license for it)!
Quote from ajp71 :If you can find access to it somewhere a program called Origin is the best 3D map chart software I have seen and is easy to use, however, it is hugely expensive (my uni only has one license for it)!

Apparently a student licence is 50$
Quote from dawesdust_12 :Apparently a student licence is 50$

That's only for one years personal use (and waterstamped), normally students get that free. The version the uni has to buy is $700 + 175 a year. The full commercial version (there is no option for private use) would be $1500 + 375 a year, rather pricey if you only intend to draw a couple of pretty maps with it.
@Sam - Yes, that's the sort of thing I was looking for, which can easily be used to generate a 3D surface plot.

The downside is that Excel doesn't ignore zero or blank values when creating surface charts, so I have to fill in the blanks with made up data - and it isn't working.

Does Origin miss blank values out and join the known data together?
#12 - SamH
I gotta go out today but will more than likely be around tomorrow. If it would be useful (let me know), I can rework the interface I used yesterday to accept raw datalogger content pasted in, and to serve up the result in a grid like that one.

I tried copy/pasting the gridded HTML result, that I produced, directly into Excel and it sucked it straight in, ready to plot, so it could potentially be a solution. All you'd need is an internet connection at the track! LOL!
As I said, the trouble is that the data has missing points! Excel needs even spaced axis numbering (i.e. I can't have 2000, 4000, 5000, 6000, 7000rpm), and it uses every value, even blank/zero ones.

And I get a lot of blank values, as I don't use every RPM at every throttle opening...

I think I'll just have to stick with looking at plain graphs, although they don't tell the full story easily. I can also plot (in the datalogging software itself) two axis graphs, so I can do AFR versus RPM and AFR versus throttle to find where important errors might be.

As you can see on the attached screenshot, the engine goes very very lean on the overrun, but struggles occasionally (see around 1300 meters in) to recover when power is reapplied. At 1300m I was changing gear, and the car got stuck in a horrid lean rut, with a misfire you can see in the fluctuating rpm line.

I would be good to cure this, but my knowledge of mapping is very little at the moment. Disabling overrun fuel cutoff helped a lot (why is was enabled at all is a different matter, but I think the people that make this ECU and mapped it are out of their depth with racing cars, even though racing cars are massively simple compared to road cars), and I've played with the fuelling at a few points... But I know it can be better.

Help, as always, appreciated!!
Attached images
datalogging.png
This probably isn't of any use, but I thought I'd have a play about anyway. The cells with coloured backgrounds represent the real values from the datalogger output. The cells with white backgrounds are composed of the real values from their nearest neighbours. Rename file to XLS, as usual.
Attached files
Output1282837707812.txt - 16 KB - 188 views
It is of use!

I like the averaging you've done, and the colouring of the cells for ease of seeing 'problem areas'.

And it was easy to create this from it which, although it doesn't show errors and spikes over very small areas (which might be a good thing), it does show a good amount of information from which I can adjust the map.

The next thing of course, is to be able to do it locally, quickly, without an internet connection, on data that I get from each session... So, how did you do it, and is it the sort of thing I can automate - i.e. copy-paste the data into Excel and it'll do it all for me (other than possibly expanding the data ranges used depending on the amount of data used, be it one lap or an extended test session)?

Many thanks to all involved in this so far - if I win the championship then I'll buy you all a beer.
Attached images
datalogging2.png
Quote from tristancliffe :The next thing of course, is to be able to do it locally, quickly, without an internet connection, on data that I get from each session... So, how did you do it, and is it the sort of thing I can automate - i.e. copy-paste the data into Excel and it'll do it all for me (other than possibly expanding the data ranges used depending on the amount of data used, be it one lap or an extended test session)?

I only spent an hour or two on it (so it's not very polished atm), but at the moment a little Java app reads in the logger data file, does some calculations and outputs the XLS file to be used in Excel. Then the graphing is done manually once in Excel. It doesn't require an Internet connection and takes approximately 0.2 seconds to run on the sample file you provided. It should scale reasonably well to a larger data set (I'm not sure if that's what you're asking with the "extended test session" comment).

Quote from tristancliffe :Many thanks to all involved in this so far - if I win the championship then I'll buy you all a beer.

Heh
You think I'm joking about the beer?! I'll find a way!

I feel slightly honoured by the fact you spent more than an hour on it. I'd have been happy to have 5 minutes input from people.

The graphing can be done fairly easily - I can copy-paste the data your app creates into a previously made excel file that colours in the numbers automatically (conditional formatting) and regenerates the graph.... All with very little actual 'work'.

Does your little app cope with larger throttle openings and bigger revs, or did you just keep the working range small for ease of creation? And yes, by extended test session I mean a larger data set. If I did a 30 minute session, and exported it all at 0.05 second intervals, then that's 36000 rows of data - and three columns. Quite a lot to look at manually - hence this thread.
Quote from tristancliffe :The graphing can be done fairly easily - I can copy-paste the data your app creates into a previously made excel file that colours in the numbers automatically (conditional formatting) and regenerates the graph.... All with very little actual 'work'.

Cool.

Quote from tristancliffe :Does your little app cope with larger throttle openings and bigger revs, or did you just keep the working range small for ease of creation? And yes, by extended test session I mean a larger data set. If I did a 30 minute session, and exported it all at 0.05 second intervals, then that's 36000 rows of data - and three columns. Quite a lot to look at manually - hence this thread.

I was just using the first 3 columns after the time (i.e. "AFR", "RPM" and "Throttle Pos", but after reading your comment here I'm assuming "AFR:10", RPM:10" and "Throttle Pos:10" are the correct ones to use. I assumed the low revs/throttle opening (that are apparent in the columns I used) were because it was the data from from an out/in/warm up lap. I'll adjust the program to use the other values and upload the results of that. 36k rows should be no problem. I'll see if I can knock up something you can test but might not get through it tonight because I might be going out.
#20 - Vain
Have you considered MatLab for your engine analysis?
I'm suggesting it because I guess this isn't the only thing you'll want to analyse on-track. MatLab is so versatile that it can do anything you want without having to manage 10 different applications for 10 different tasks. On the other hand it's also rather complex, so you'd have to make a compromise between physically working on the car and working on the data aquisition & analysing.

Vain
Cheers Amp. Yes, the data with :10 after it is the raw data, but it's simple enough to remove the rpm values lower than 1100rpm (idle). Even mapping outlap stuff is a good idea - might as well have the engine running right all the time!

Matlab is too complex for my needs/time. I'm sure it's great, but I vaguely know excel and copy-paste, so I'll stick with that for this year. Maybe I'll learn it over the winter...

Andrand: will check it out when I get home. Just finishing off the car - only cornerweights and a bit of polishing to go! On Sunday we took the engine out and partially stripped it down, so I've had a busy few evenings!!!!!!
You can use this formula to get any brackets for values in complete file from datalogger
Quote from tristancliffe :
Does Origin miss blank values out and join the known data together?

Yes, I think it does, you can download the trial to try. I managed to import Excel data and make the map attached in about 15 minutes after first opening, I think there were some gaps in the data because the test run had to be rushed due to a problem with the dyno's water tower.

If I remember rightly you've got to put the data into a matrix (which it does for you at the press of a button) before you can use the surface map charts.
Attached images
mini bsfc bmep.jpg
No time to read up on this right now, I just wanted to add that Tristan you're a friend - and you need a program to transpose data into something 3D, without internet connection, that doesnt hit the battery power on your laptop too heavily, and doesn't cost you anything... I'm offended you didn't call already...

If you're still stuck spec up what you need the program to do, send me a sample input file, and i'll knock it out this weekend or next.
Well, I've combined the assistance from this thread, and now I can quickly generate this sort of graph from my datalogging export. As you can see, there are some areas that need richening up and some areas that need leaning off! Hurrah!!!

The data is grouped (even 9% of throttle opening and every 500rpm), and multiple values are averaged in the table, which is then plotted. Blank values are shown as 13 so as to reduce the number of crazy jumps on the surface.

Becky - I know you're busy, so I'd never actually ask you to do anything. If you WANT to make a tool that converts numerical data in columns into a graph like the one below (and perhaps a colour coded table too - which is much like looking at the graph from above) then feel free!!!!!

Cheers all!

Setup all done last night. Rear ride height a couple of millimeters greater than I anticipated, but I think it'll be okay. If not, then I'll drop a couple of mm in the paddock.
Attached images
datalogging.png

Excel Genius Required
(65 posts, started )
FGED GREDG RDFGDR GSFDG