interpolation between cells?

Discuss possible software enhancements/changes here.

Moderator: Matt

Post Reply
Fusion Ed
 

Posts: 281
Joined: Fri May 04, 2007 4:13 am
Location: Chertsey Surrey
Contact:

interpolation between cells?

Post by Fusion Ed »

I have had a quick look, but I cannot see this in the software. Does it have a feature to interpolate between cells? This is a feature I use allot on other mapping software :) usually along the lines of highlight cells and interpolate either by column row or between the 4 corners of a block of cells.

Ed
Matt
Site Admin
 

Posts: 8961
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Post by Matt »

Ed - your boards have been sent off today

When you perform a maptrace, you will get four cells highlighted in grey which are the cells used by the ECU as the basis of interpolation

Closest interpolated block based from RPM/TP (for 3D) is a single cell in different shade of grey and is the result of actual value derived from the four cells

There are TBD fields on the grid view also which will evenutually be coded upto indicate the actual interpolated value calculated from the four cells for fuel/timing. Once I work out the math for 3D interpolation...
Fusion Ed
 

Posts: 281
Joined: Fri May 04, 2007 4:13 am
Location: Chertsey Surrey
Contact:

Post by Fusion Ed »

Ooh I look forward to receiving these boards !! :)

Cheers for the reply matt, I really need to see this stuff in action. I shall await the boards.
Fusion Ed
 

Posts: 281
Joined: Fri May 04, 2007 4:13 am
Location: Chertsey Surrey
Contact:

Post by Fusion Ed »

Any more likely to happen on this matt? More tools to manipulate maps would be a good addition.
tastyratz
 

Posts: 25
Joined: Tue Oct 25, 2011 1:34 am

Re: interpolation between cells?

Post by tastyratz »

I would like to chime in here on an old request: When tuning I like to interpolate as well... even if for no nistune only had a 2d simplistic interpolation feature for now it would be quite handy. I was quite surprised to not see this in nistune honestly.


An example would be tuning your timing for 0psi, then for 10 psi.
Let's say it is over 5 columns. highlight the cells ranging from 0 psi to 10 psi, right click, then say interpolate. From there nistune would automatically calculate the difference divisible along those 5 columns and fill in the blanks. This makes populating a map MUCH faster than doing it all in your head and entering 1 by 1. Weighting against the table lattice would be even better.

I can also see this being handy for VE map as well

One step further might be automatic interpolation when copying and pasting. Let's say for example you have a map you want to use but your 100tp numbers are stretched out to 150tp. You could select the whole map up to 150tp and say copy, then highlight the map only up to 100tp and say paste. Selecting fewer cells nistune would automatically rescale what's in the clipboard to fit in the destination selection.
Matt
Site Admin
 

Posts: 8961
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: interpolation between cells?

Post by Matt »

Its an often requested feature and something I've looked into a few times but got lost in the math

There are two things which are involved here:
(a) Floating cursor over the existing grid showing the current positioning based on ECU interpolation over 4 cells. This is fairly easy relatively speaking

(b) Smoothing maps using interpolation on a 3D axis. This is more painful! Been a while since I've done my maths study and so far found nothing on the net to help me with 3D.

2D can be done but its either going to be lines (horitontal or vertical) leaving lines whichever way we so. Potentially doing mutliple runs of 2D horz then vert could smooth things out a bit further. Its something I've been playing with but the code is inactivate at the moment and needs more testing

As usual higher priority stuff arises and the existing investigation gets halted (like a few other things including knock detection for example). I'm full time now so will have more time available to look into this. Its on my list still but not touched for a while (5 years!)
tastyratz
 

Posts: 25
Joined: Tue Oct 25, 2011 1:34 am

Re: interpolation between cells?

Post by tastyratz »

I have been researching this and the best method I can find is bilinear interpolation. The math can be found here:
http://en.wikipedia.org/wiki/Bilinear_interpolation

That is quite a bit to wrap my head around as well. As nistune does not perform this function directly inside I have been seeking a way to do so in excel. I hope my findings may assist you in native implementation in the software.

I have also found the following excel sheet
www.microwaves101.com/downloads/Linterp_101_Rev1.1.xls

I am attempting to understand how all that math works, but in the meantime I have created some VERY simple math for a linear non weighted interpolation you could likely easily integrate into nistune as a right click option of some sort. It sounds awkward but it works.

Retrieve the absolute difference between the starting and finishing cells. If the selection start is 5 and finisher is 20, the abs is 15.

Divide that number by the number of cells you are extrapolating over+1. If you want to fill in 4 cells between you divide by 5 (leaving us 2)
Multiply that number by its position in the row, then add it to the starting number. I.E. missing cell 1 =2*1+5, missing cell 2 = 2*2+5, and so on and so forth.

This is hard to explain in a post, but really quite simplistic and crude. I hope it was helpful.
Matt
Site Admin
 

Posts: 8961
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: interpolation between cells?

Post by Matt »

Thanks for the links will have a look. As you found theres a bit of math which I've then got to turn into code
Post Reply