PE vs. TPS....more useful alternative?

Eric Stage I

TurboTweak Guy
Joined
May 25, 2001
For anyone that likes playing around with this stuff:

I've always thought the PE vs. TPS table was somewhat useless. Once your in PE, you're half way throught the table in a lot of instances. I know you can use it to alter part throttle fuel and such, but some cars make a lot of boost at part throttle, others don't. What if the table referenced airflow, so it knew how much boost (kind of, actually airflow) there was?

I've been playing around with PE vs. Airflow instead. By changing address $3BBB from $36 (TPS) to $7E (Airflow), the PE vs. TPS table will no longer reference TPS, it will reference Airflow. So now the table is called PE vs. Airflow.

Instead of the 9 value table being:
TPS%
0
13
25
38
50
63
75
88
100

It will be:
Gr/sec
0
32
64
96
128
160
192
224
255

It seems to work fairly well so far.

Just something to play with.... :)

Regards,
Eric
 
Interesting,
very interesting.

Might also work well, for staging.
I never did like the way the TPS vs PE thing worked out for that.
Should also make FAPE more meaningful if that got sorted out,

Good Idea
Thanks
 
I've never seen any advantage to having the pe-tps, so for the last year or so I've made the entire pe-tps table the same in all my chips so there wouldn't be any issues about the tps not maxing out at some magic voltage, and they run just fine at part throttle and during tip-in. I've also played with how much fueling my car seems to like at various maf levels, and what I've seen is that the same pe fueling works from low boost, maf less than 150, to just before the maf is pegged, say 245 or so to be sure the maf isn't starting to go nonlinear like some do near 250-255. That's why I like the maf trigger for the blm lock. I tune up at low boost to keep the maf under 245, get the pe-rpm table right so spoolup is good and partthrottle doesn't knock, then add the blm lock and vary the value I lock to to control how much extra fuel I add in when the maf is pegged. Just my personal philosophy on how to do it. Oh, I guess one of the days I need to go ahead and share the code patch I use to lock to different blms in each gear so I can keep from flooding it in 1st and still fuel it in 3rd, hmm? Anyone interested? It is more work to get tuned up, and you have to take into account the different wgdc's in 1/2, 3rd, and 4th. Damn, I'm lazy, though :).

While we are sharing and since we agree the pe tps can be dropped anyway, here's probably the best idea I've had the last couple of years. If you look at the chip, the pe tps table is right in front of the pe rpm table, and together they would make a nice 17 entry table. Take out the pe tps call entirely, change the pointer address for the pe rpm table to the address of the pe tps table, change the pe rpm lookup subroutine call to the one for a 17 entry table, and presto you should have twice the rpm resolution in the pe rpm table. Whattaya think? No, I haven't tested this yet but it is sure on my list of things to get to. I've read through the table lookup subroutines and I think it really is this simple. If anyone does this, or even just reads through the code for the table lookups to make sure where to jump to, please share with us.
 
Carl,

Thats a fantastic idea!!!! It would be so nice to have better than 800 rpm resolution especially above 4K rpm. If you did decide to make a 17 element table how would you account for the PE TPS fuel? Would you just insert that percentage into the PE RPM values? Just wondering.

I still have your multi gear BL lock patch I've kept secret all this time but unfortunately have never used it as I've been doing my wideband tuning and its gone well and getting to the point where I need to hit the strip and make final FP adjustments to see max mph. From what I've logged w/ the WB I've found once you get a good 3rd gear A/F then 1st and 2nd tend to run a bit leaner maybe because of the short period of time in those 2 gears and lower load as compared to the 3rd gear pull time.

Anyway, once I get a few more passes on my current street chip I do plan to use your patch and richen 1st and 2nd to see if more power can be made in those gears with a little more fuel while keeping 3rd at its current level. Should be interesting.

Eric,
Your idea is a much better solution than when I asked you about possibly adding a certain percentage of fuel once crossing 255g/s airflow when you know your car flows much more air than that but my idea wouldn't provide a linear fuel addition and you'd still want to make those g/s fuel additions gradual. I like it too!!

Very cool ideas.
I've taken a look at the table lookups area also at $3BAB but if you expand and make a 17 element table how is rpm assigned for each cell? Maybe I need to research more fo the actual code.:)
 
Lets look at the area we're talking about:

Here's its original form:
**Do the RPM trim
3BAB: CE 35 6E LDX #$356E X = Fuel Trim vs. RPM (Percentage -100% to +100%)
3BAE: 96 19 LDAA $19 A = Current RPM
3BB0: C6 10 LDAB #$10 B = #$10 (lowest rpm is 400)
3BB2: 44 LSRA A = A / 2 (Make it a 9 value table, but the lowest value is now 800rpm)
-so it becomes an 8 value table
3BB3: BD FC 05 JSR $FC05 Do table lookup
3BB6: 16 TAB B = A
3BB7: 4F CLRA A = 0
3BB8: DD 91 STD $91 FuelTrim = D
**Do the TPS trim
3BBA: 96 36 LDAA $36 A = TPSIndex
3BBC: 44 LSRA A = A / 2 (Make it a 9 value table)
3BBD: CE 35 76 LDX #$3576 X = Fuel Trim vs. TPS Table
3BC0: BD FC 09 JSR $FC09 Do table lookup
3BC3: 16 TAB B = A
3BC4: 4F CLRA A = 0
3BC5: D3 91 ADDD $91 D += FuelTrim
3BC7: DD 91 STD $91 FuelTrim = D
3BC9: 96 8F LDAA $8F A = Fuel/Air Ratio in PE
3BCB: 20 5C BRA $3C29 Goto $3C29

Sorry about the formatting.

We need to change this to:
3BAB: CE 35 6E LDX #$356E X = Fuel Trim vs. RPM (Percentage -100% to +100%)
3BAE: 96 19 LDAA $19 A = Current RPM
3BB0: BD FC 09 Do 17 value table lookup
3BB3: 16 TAB B = A
3BB4: 4F CLRA A = 0
3BB5: DD 91 STD $91 FuelTrim = D
3BB7: 96 8F LDAA $8F Load PE A/F into A
3BB9: 7E 3C 29 Jump to $3C29 (or you could do a BRA here)

3BBC thru 3BCC can be zero'd out as PE vs. TPS will be deleted.


The table will start at $356E like before, but would now be a 17 value:

RPM
0
400
800
1200
1600
2000
2400
2800
3200
3600
4000
4400
4800
5200
5600
6000
6400

You could add the max percent you had in PE vs TPS to the new PE vs RPM table to make the final fuel the same, or you could just forget about it and alter PE A/F Ratio vs Coolant to be slightly richer.

I don't know if this extra resolution will gain you anything, but you never know, and it's fun playing with it anyway (the code, that is :) ).

Eric
 
Thanks, Eric. That's basically what I thought. I know that there are two 17 entry table lookups, one for a table that starts at zero and one for tables that don't, I just hadn't proofread everything to make sure which one was which. You show the new rpm table starting at zero - we really don't need 0-400 in the pe stuff, so is there any way to use the other one? Also, someone asked about where to put the extra fuel if you take out the pe-tps. You could add it do the pe rpm table but for 72 lb/hr injectors I need something on the order of -90 to +80% in the rpm table anyway so there isn't room to add another 50% or so, so I would put it in the pe-far vs. coolant table. That also brings up the dynamic range of the pe-rpm. I would be happy to trade off a bit of resolution for a bit of dynamic range, changing it from +/- 100% to +/- 200% at twice the stepsize. Should be able to do this with a 16 bit multiply by 2 at $3bb5 in Eric's code (I don't remember if there is a 16 bit asl d or not, but if so that's perfect).
 
Cool stuff! I also thought about expanding the pe-rpm table for more granularity, but like the rest of you, it only made it to the list of things to try.

Carl, you mentioned the unecessary low rpm (0-400). If you do trim this off the table all it does is save table space. The value of each of the remaining table entries would still be what Eric shows. Also, if you trim off the first two entries, you have to tell the table routine how many entries there are, so this becomes the first byte. Kind of a wash.

I'll look into your +/- 200% request and get back to you.

Eric, ref: using airflow to index a pe fuel table. Just have a question - airflow is already factored in to the injector pw calculation. If you determine a pe multiplier based on airflow, will this just be redundant?
 
Dennis,
I guess the idea is to be able to change the commanded a/f ratio if the boost (or airflow) is lower for a given rpm. For example, maybe the a/f can be leaner if the boost is 3psi at 3600rpm, than it is at 12psi at 3600rpm. I'm not sure whether there is anything to gain at this point, but it seems at least a little more useful than the original PE vs. TPS table.

Carl,
I agree that a +/-200% PE vs RPM table would be more helpful. I've found the same thing with big injector calibrations, PE vs. RPM can't add enough, so I end up with 50-70% in the PE vs TPS table (at least with the race chips). At least maybe we could get it all on one table.

All great info!

Eric
 
There probably is a way to get +/- 200% out of a table but it will need a lot of code to make it work. Just so you two can get on with your pe testing of your mega-injectors, I came up with a simple way to make a +/- 200% multiplier work for pe.

1 - Make a pe fuel trim multiplier table, which for here I'm assuming is indexed by rpm. It doesn't matter if its 8 or 17 bytes long. Set the values for +/- 100% like the way the stock pe rpm trim table is used.

2 - Modify the code so after this table is read, you store the table value. You can use $4C, $4D, or $4E (they're not used). Using the stock chip addresses, this would be done after $3BB3 and before $3BBA.

3 - After the multiply at $3C2C, load A with your saved rpm table value and do the multiply again (JSR $FD1F).

Explanation: By using just simple 8-bit math and the existing rom subroutines, its impossible to get +/- 200%. Performing the multiply twice will produce the desired result.
 
I did a small correction to the code I did above for the 17 value table. I forgot to load the PE A/F ($8F) into A before the jump. Anyway, I edited it.

I wonder if we wouldn't need the negative trim anymore if the PE vs TPS is gone? So maybe it could be 0 - 200% PE vs RPM. Set the PE A/F (vs coolant) to some value that is the leanest you would ever want to be in PE, say 14.0:1. Then you would only need to add fuel, therefore not needing the negative trim. I don't think that would be too difficult to code. Let me look at that.

Regards,
Eric
 
I agree Eric. If the base pw is low, then just add to it and not bother with the +/- multiply.

I like the idea of a 17-value rpm table but I'm still pondering your original pe airflow table. From the driver's seat here at the computer, it still sounds like a good idea so I think I'll try both tables.

You and Carl had all weekend to get this stuff sorted out, ;) so where are the results?
 
Thanks for the code check, Dennis. I thought that since they zeroed the upper byte and stored the pe-rpm/tps correction as a 16 bit number, then they must be doing a 16 bit multiply - it's been a while since I read over those subroutines, sigh. I really do want +/- 200%, since if you think about it, 0-200% is the same dynamic range as +/- 100% which is what we have now. Otherwise, I could settle for 0-400%, I guess :)-)). Personally, I set the pe-tps values to get the pe-rpm table kind of centered on zero. In my 72 lb chips I go -90% to about +85%, and I'm about to start working on a 95 lb chip for a friend. Losing the pe-tps won't hurt at all, I'll just use the pe-afr vs coolant to "center up" the pe-rpm table. Sorry, Dennis, no testing yet. I'm in the middle of relocating my maf to the uppipe and then putting on a new turbo, and somewhere in the middle of that I have to get my trans fixed, so it's going to be a little while before I can test this. That's why I tossed it out there in the first place; I was just taking tooooo long to get it tested and it seemed too good an idea not to share.
 
Carl, your right, its the same range, but the 0-200% would be more feasible from a math point of view (I think even a 0-400% would be more feasible). It would be in 2% increments though. 200% would run a 72# injector up over 100% dc.

Doing the 16-bit multiply twice doesn't seem to be jiving. For example, starting with a PE A/F of 14.0, if I add 200% PE, I get a final A/F of 4.66. If I add 100% PE and do the 16-bit multiply twice, I get a final A/F of 3.52. Maybe I'm not doing it the way Dennis wanted.

Just curious, Carl, why the necessity to go below 0% if you no longer have to offset the TPS table? Do you want to go leaner than 13.5-14.0 A/F in PE? (Unless you have your PE A/F richer than that.)

Anyway,
I think this will work: ***EDIT: See Dennis's correction in a reply further down***

PE trim vs. RPM 0%-200% (17 value starting at 0 RPM)

3BAB: CE 35 6E LDX #$356E X = Fuel Trim vs. RPM (Percentage 0-200% in 2% increments)
3BAE: 96 19 LDAA $19 Load current RPM into A
3BB0: BD FC 09 JSR $FC09 Do table lookup
3BB3: 16 TAB B = A (Copy A to B)
3BB4: 4F CLRA A = 0 (Clear A)
3BB5: 05 ASLD D = D * 2 (Double it)
3BB6: C3 00 80 ADDD Add 128 to D
3BB9: DD 91 STD $91 FuelTrim = D
3BBA: 96 8F LDAA $8F Load PE A/F into A
3BBC: 7E 3C 29

I wish I could format that better.

Maybe Dennis could take a peek at that and see if it looks doable.


Eric
 
I don't really care in an absolute sense if it is +/- 200% or 0-400%. Remember, though, that the maf is pegged so the pe-afr is not "real" because of the other trims that get dumped in. Actually, keeping the pe-rpm table kind of centered on 0 makes the pe-afr more accurate if anyone cares. Somehow the centered one just appeals to me more, in an aesthetic way :). Anyway, either one would be good, but why bother changing from +/- 100% to 0-200% if it doesn't get you any extra range?

Oh, how can you say that 200% would run a 72# injector up over 100% dc, if you don't know what all the other trims are? Just wondering :).
 
Carl,
I guess I was thinking that dropping the PE vs. TPS table would allieviate the need for any "negative" trim. Whereas now, if I set the whole PE vs. TPS table to 50%, then I have put -50% in the lower PE vs. RPM ranges to get back to a "normal" A/F.

For the 72's, I was assuming PE A/F vs coolant at 14.0, no TPS trim, MAF pegged at 255, PE vs RPM at 200%. This should give a commanded A/F of about 4.6 (I know, not real). That should calculate out to a pw of about 26.6 at 4800rpm. (There are other things that will affect it, but you get the idea.) :)

Eric
 
Eric, you're right the extra multiply I suggested does not work. It looked good on paper, but I should have tested more numbers.:eek: The truth is I suffer from premature evaluation.

Your last bit of code will almost do it, but you need to take out the left shift (double it). Then it will work fine for 0 - 200% trim.

Here's what it now looks like:
3BAB: CE 35 6E LDX #$356E X = Fuel Trim vs. RPM (percentage 0-200% in 2% increments) E=N/1.28
3BAE: 96 19 LDAA $19 (load current RPM into A)
3BB0: BD FC 09 JSR $FC09 (do table lookup)
3BB3: 16 TAB B = A (copy A to B)
3BB4: 4F CLRA A = 0 (clear A)
3BB5: C3 00 80 ADDD (add 128 to D)
3BB8: DD 91 STD $91 (FuelTrim = D)
3BBA: 96 8F LDAA $8F (load PE A/F into A)
3BBC: 7E 3C 29 (go do multiply of AFR and fuel trim)

The easiest way to test this is plug in the min/mid/max percentages and check AFR. Eric already did max (200%) and got AFR = 4.66. Using the min (0%), you should get 14.0 AFR and the mid is 100% which should cut the AFR in half to 7:1.
 
Hee hee, looks like I suffered from the same premature, er, stuff.

I think the one I did was 0-400% in 4% increments. I inadvertantly did what Carl wanted. Oh, the horror! ;)

Thanks for the check Dennis. I'll try and graft it into a chip soon and see how it works.

Eric
 
So has everyone else been as lazy and worthless as me :), or has someone tried this yet? Even just saying you fired the engine up and went for a short drive and hit pe mode once without incident would be nice to know.
 
Carl,
Yes, I have it running now. Dennis's last post was the correct version of the code (for the 0-200%). I've done several WOT runs and it works fine. The commanded A/F (on DS) is matching up with what it should be. I did a before and after, and the fueling was the same as the previous chip's 8 value table. I added the max previous PE vs TPS value to the entire PE vs RPM table and averaged the values of the 8 value to get the new 17 value table for this test.

One note, after I starting working with it, I realized that the smallest increments are .8% for the inputed values, not 2% as I mentioned before. (200/256=.781%)

So it looks like a winner so far!

Eric
 
Very cool. I've been kind of burnt out on tuning the last few months and just never felt like trying it out. Where I think it may be real nice is at the low rpm end of big injectors. For example I run -90% at 800 rpm and -20% or so at 1600 rpm with 72's, and that's a big step so having an extra point in between has got to be better. Thanks for the report.
 
Top