EvoScan v2.7 MapTracer Bilinear Interpolation
#1
EvoScan v2.7 MapTracer Bilinear Interpolation
How does the Evo ECUs do ignition advance interpolations?
and fuel map interpolation?
has someone pulled the code to get the calculations?
I found this:
http://en.wikipedia.org/wiki/Bilinear_interpolation
I want to calculate what the ECU Target Timing is at each RPM/LOAD based on interpolation, is there any point? because I think this is what AFRMAP already is? someone correct me if I'm wrong.
is there any target timing advance? or is it what is logged is already the target timing advance based from current rpm/load on the timing map?
and fuel map interpolation?
has someone pulled the code to get the calculations?
I found this:
http://en.wikipedia.org/wiki/Bilinear_interpolation
I want to calculate what the ECU Target Timing is at each RPM/LOAD based on interpolation, is there any point? because I think this is what AFRMAP already is? someone correct me if I'm wrong.
is there any target timing advance? or is it what is logged is already the target timing advance based from current rpm/load on the timing map?
#2
Evolved Member
Join Date: Mar 2008
Location: Lattitude 48.38°, Longitude 17.58°, Altitude 146m = Slovakia, for common dude
Posts: 730
Likes: 0
Received 2 Likes
on
2 Posts
The interpolation is the same as for AFR, all 3D maps are interpolated same way, sub_B16 does the job. I have not deciphered the subroutine but it is deciphered by mrfred as
((255-r6)*r5 + r6*r4)/255 -> r0
So it seems, its more of trilinear interpolation, assuming both octane maps are in concern and octane number is a weight factor.
http://en.wikipedia.org/wiki/Trilinear_interpolation
what is logged is already the target timing advance, but some corrections take place after/before interpolation like knock correction, lean spool etc.
ROM:00000B16
ROM:00000B16 ; =============== S U B R O U T I N E =======================================
ROM:00000B16
ROM:00000B16 ; Attributes: noreturn
ROM:00000B16
ROM:00000B16 Interpolate_3D_Map: ; CODE XREF: sub_105BE+1A6p
ROM:00000B16 ; sub_141C8+7Ap ...
ROM:00000B16 mov.l r10, @-r15
ROM:00000B18 extu.w r4, r4
ROM:00000B1A extu.w r5, r5
ROM:00000B1C extu.w r6, r6
ROM:00000B1E mov.l @(h'100,pc), r10 ; [00000C20] = h'FF
ROM:00000B20 cmp/hi r10, r6
ROM:00000B22 bf loc_B26
ROM:00000B24 mov r10, r6
ROM:00000B26
ROM:00000B26 loc_B26: ; CODE XREF: Interpolate_3D_Map+Cj
ROM:00000B26 mov r10, r0
ROM:00000B28 sub r6, r0
ROM:00000B2A mulu r5, r0
ROM:00000B2C sts macl, r0
ROM:00000B2E mulu r4, r6
ROM:00000B30 sts macl, r4
ROM:00000B32 add r4, r0
ROM:00000B34 shll16 r10
ROM:00000B36 cmp/hs r10, r0
ROM:00000B38 bf loc_B3E
ROM:00000B3A bra loc_B64
ROM:00000B3C mov.l @(h'C0,pc), r0 ; loc_C00
ROM:00000B3E ; ---------------------------------------------------------------------------
ROM:00000B3E
ROM:00000B3E loc_B3E: ; CODE XREF: Interpolate_3D_Map+22j
ROM:00000B3E div0u
ROM:00000B40 div1 r10, r0
ROM:00000B42 div1 r10, r0
ROM:00000B44 div1 r10, r0
ROM:00000B46 div1 r10, r0
ROM:00000B48 div1 r10, r0
ROM:00000B4A div1 r10, r0
ROM:00000B4C div1 r10, r0
ROM:00000B4E div1 r10, r0
ROM:00000B50 div1 r10, r0
ROM:00000B52 div1 r10, r0
ROM:00000B54 div1 r10, r0
ROM:00000B56 div1 r10, r0
ROM:00000B58 div1 r10, r0
ROM:00000B5A div1 r10, r0
ROM:00000B5C div1 r10, r0
ROM:00000B5E div1 r10, r0
ROM:00000B60 rotcl r0
ROM:00000B62 extu.w r0, r0
ROM:00000B64
ROM:00000B64 loc_B64: ; CODE XREF: Interpolate_3D_Map+24j
ROM:00000B64 rts
ROM:00000B66 mov.l @r15+, r10
ROM:00000B66 ; End of function Interpolate_3D_Map
((255-r6)*r5 + r6*r4)/255 -> r0
So it seems, its more of trilinear interpolation, assuming both octane maps are in concern and octane number is a weight factor.
http://en.wikipedia.org/wiki/Trilinear_interpolation
what is logged is already the target timing advance, but some corrections take place after/before interpolation like knock correction, lean spool etc.
ROM:00000B16
ROM:00000B16 ; =============== S U B R O U T I N E =======================================
ROM:00000B16
ROM:00000B16 ; Attributes: noreturn
ROM:00000B16
ROM:00000B16 Interpolate_3D_Map: ; CODE XREF: sub_105BE+1A6p
ROM:00000B16 ; sub_141C8+7Ap ...
ROM:00000B16 mov.l r10, @-r15
ROM:00000B18 extu.w r4, r4
ROM:00000B1A extu.w r5, r5
ROM:00000B1C extu.w r6, r6
ROM:00000B1E mov.l @(h'100,pc), r10 ; [00000C20] = h'FF
ROM:00000B20 cmp/hi r10, r6
ROM:00000B22 bf loc_B26
ROM:00000B24 mov r10, r6
ROM:00000B26
ROM:00000B26 loc_B26: ; CODE XREF: Interpolate_3D_Map+Cj
ROM:00000B26 mov r10, r0
ROM:00000B28 sub r6, r0
ROM:00000B2A mulu r5, r0
ROM:00000B2C sts macl, r0
ROM:00000B2E mulu r4, r6
ROM:00000B30 sts macl, r4
ROM:00000B32 add r4, r0
ROM:00000B34 shll16 r10
ROM:00000B36 cmp/hs r10, r0
ROM:00000B38 bf loc_B3E
ROM:00000B3A bra loc_B64
ROM:00000B3C mov.l @(h'C0,pc), r0 ; loc_C00
ROM:00000B3E ; ---------------------------------------------------------------------------
ROM:00000B3E
ROM:00000B3E loc_B3E: ; CODE XREF: Interpolate_3D_Map+22j
ROM:00000B3E div0u
ROM:00000B40 div1 r10, r0
ROM:00000B42 div1 r10, r0
ROM:00000B44 div1 r10, r0
ROM:00000B46 div1 r10, r0
ROM:00000B48 div1 r10, r0
ROM:00000B4A div1 r10, r0
ROM:00000B4C div1 r10, r0
ROM:00000B4E div1 r10, r0
ROM:00000B50 div1 r10, r0
ROM:00000B52 div1 r10, r0
ROM:00000B54 div1 r10, r0
ROM:00000B56 div1 r10, r0
ROM:00000B58 div1 r10, r0
ROM:00000B5A div1 r10, r0
ROM:00000B5C div1 r10, r0
ROM:00000B5E div1 r10, r0
ROM:00000B60 rotcl r0
ROM:00000B62 extu.w r0, r0
ROM:00000B64
ROM:00000B64 loc_B64: ; CODE XREF: Interpolate_3D_Map+24j
ROM:00000B64 rts
ROM:00000B66 mov.l @r15+, r10
ROM:00000B66 ; End of function Interpolate_3D_Map
Last edited by acamus; Oct 8, 2008 at 08:49 AM.
Trending Topics
#11
Hopefully I will have the interpolation finished this week. I like to know how far off the ecu is when trying to match my target map. the ecu map is good, but it just doesn't show all the in-between values that you are always looking for.
#13
Evolved Member
iTrader: (30)
Join Date: Dec 2003
Location: USA
Posts: 929
Likes: 0
Received 0 Likes
on
0 Posts
evo4mad, how are you initilizing the logging of ACD? I ask this because it may help others determine how to read the ROM in the ACD controller. This thread discusses the topic :https://www.evolutionm.net/forums/sh...49#post6224149
Thread
Thread Starter
Forum
Replies
Last Post
4b11slayer
ECU Flash
2
Nov 5, 2016 11:11 AM
27, 3dinterpolationbmp, acd, advance, afrmap, beta, bilinear, download, evo, evolutionm, evoscan, ignition, interpolation, map, v27