RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Wed Jun 19, 2013 2:28 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 197 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 14  Next
Author Message
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Sun Nov 27, 2011 8:58 pm 
Offline
Experienced
User avatar

Joined: Tue Aug 30, 2011 3:17 pm
Posts: 633
NSFW wrote:
That's what VE is, and that's why the table ends up resembling a VE table when you're done. :) It basically is a VE table, but it's been obfuscated by using a different offset and multiplier for every car. It think we'd all be better off leaving the offset at zero, so that the "compensation" table works like a real VE table.


I look at VE as being the ratio of the volume of fuel/air that enters the engine to the volume of the engine's static displacement. The SD multiplier/offset just calculates the mass(g/rev) of fuel/air that enters the engine relative to Manifold Absolute Pressure, with no reference to what "should" enter the engine. In a perfect world the "VE" table in this ROM could be a 2D table that applies compensation based entirely on Engine Speed. There would be no need for a MAP reference in the table because MAP has already been accounted for by the SD multiplier/offset. From the SD multiplier/offset calculation you could probably take the output further and estimate the engine's VE and maybe even air density. Remember that this ROM is essentially a MAF calculated fueling ROM, the g/rev calculation that is normally done by the MAF sensor has been emulated by the MAP sensor. Any physics or gas laws that are used in calculation are done mainly in the MAF code. If you set the offset to zero, it would basically just "slant" the compensations in the load comp "VE" table.


NSFW wrote:
The multiplier in that approximation is functionally identical to the constant in the gas law. There's no reason for everyone to re-invent that wheel, especially when the side-effects include not knowing what their VE really looks like, and not being able to compare VE tables between different setups.

If everyone's actual VE is obfuscated by unique offsets and multipliers, then it becomes harder to make meaningful comparisons between VE tables with different mods, which means that everyone is going to re-invent the wheel every time they start tuning with this approach.


I actually believe that the SD multiplier/offset is what people should be comparing each other's setups with and sharing. I feel that it is something that should be "tuned" and not just remain a constant. The load comp "VE" table should be close to "1.0000" across the board and should only need minor adjustment(mainly just across engine speed). The default multiplier/offset value in the ROM is actually very poor and doesn't match most subaru engine's very well. Ive actually observed this already as I noticed that lukesky came up with multiplier/offset values similar to my tune when he did his own calculations. If people shared SD multiplier/offsets, one could simply find them for a setup similar to their own and then set their "VE" table to "1.0000" and have a very good base to start with.

Another issue that some people will run into with running the standard multiplier/offset is you will actually begin to run out of compensation ability in the "VE" table because the base load is so far from what is needed, especially at higher boost pressures. I think this actually happened to lukesky (sorry for referring to you over an over lol). This could be amplified by setting the offset to zero.




As far as the IAT comp stuff. I was thinking along the lines of your "5th thing" and getting total airflow from g/rev and engine speed. Then interpolating between ECT and IAT based comps based on airflow.


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Sun Nov 27, 2011 9:20 pm 
Offline
Experienced
User avatar

Joined: Tue Aug 30, 2011 3:17 pm
Posts: 633
bcheck555 wrote:
I actually kinda just tested this. I moved the IAT sensor as close to the port as I could, shed probably 20+ inches. So most of the heat transfer should now be accounted for. Some things to note, manifold heats the air up quite a bit, 10-30+degrees over what I measured at intercooler throat. Low flow is heated more than higher flow. You can see this pretty much just by hitting the throttle.


Also keep in mind that because the sensor is in direct contact with the manifold it can actually heat soak and skew the readings somewhat. When airflow increases it can "cool" the sensor off. Im not sure how much of this is happening with your setup but I remember on another car I had, it was very noticeable. Of course that was a 1980s IAT sensor so I'm sure they have improved since then lol.


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Sun Nov 27, 2011 10:02 pm 
Offline
RomRaider Donator

Joined: Thu Jan 29, 2009 11:16 am
Posts: 338
Carbibbles wrote:
bcheck555 wrote:
I actually kinda just tested this. I moved the IAT sensor as close to the port as I could, shed probably 20+ inches. So most of the heat transfer should now be accounted for. Some things to note, manifold heats the air up quite a bit, 10-30+degrees over what I measured at intercooler throat. Low flow is heated more than higher flow. You can see this pretty much just by hitting the throttle.


Also keep in mind that because the sensor is in direct contact with the manifold it can actually heat soak and skew the readings somewhat. When airflow increases it can "cool" the sensor off. Im not sure how much of this is happening with your setup but I remember on another car I had, it was very noticeable. Of course that was a 1980s IAT sensor so I'm sure they have improved since then lol.


For all intents and purposes, maybe this isn't a bad thing. Number one, the Spec C Manifold has the IAT directly attached. Number two, we really don't know if it's and IAT or a MAT, if it's a MAT I can see the use of the offset, at low flow it reduces fuel, and from what I saw this would be correct, at low flow my temps would go up several degrees. Number three looking at pictures it doesn't look like the sensor is in direct airflow, looks like it's in the bottom of the manifold. If anyone has one please chime in, preferably with pictures of the actual sensor.
I plan on running like this for a while, just to see how it goes at different temps, I'll update later...

_________________
Mods: http://www.romraider.com/forum/viewtopic.php?f=7&t=6789&start=5


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 12:08 am 
Offline
Newbie

Joined: Sun Mar 30, 2008 12:09 pm
Posts: 52
So Carribles, since we're on the talk of the multiplier and offset, how do we do the math to figure out how much to change the values?


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 3:10 am 
Offline
Experienced
User avatar

Joined: Fri Mar 17, 2006 8:42 pm
Posts: 179
Location: ARIZONA
Attachment:
File comment: heat soaked with iat comp.
romraiderlog_20111127_232525.csv [2.86 KiB]
Downloaded 36 times
A little experiment with the IAT compensation. 2 logs same ambient temp, different iat do heat soak on the 2nd log. I add a bit compensation to see how much fuel it will add. Look at the results. Sorry if I misspelled anything had too many coorslights.


Attachments:
romraiderlog_20111127_230828.csv [2.66 KiB]
Downloaded 37 times

_________________
Gabe
Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 6:18 am 
Offline
Moderator

Joined: Wed Nov 22, 2006 10:23 pm
Posts: 2275
Carbibbles wrote:
I actually believe that the SD multiplier/offset is what people should be comparing each other's setups with and sharing. I feel that it is something that should be "tuned" and not just remain a constant. The load comp "VE" table should be close to "1.0000" across the board and should only need minor adjustment(mainly just across engine speed).


Going out-of-sequence because this might be where we fundamentally disagree. You're basically assuming that volumetric efficiency is mostly linear function of manifold pressure, and only varies significantly with engine speed, and I don't think that's true. Look at Freon's VE surface, for example:

Image

Neither axis can be distilled down to an offset and multiplier. What can be simplified is the basic gas-law stuff.

Carbibbles wrote:
I look at VE as being the ratio of the volume of fuel/air that enters the engine to the volume of the engine's static displacement. The SD multiplier/offset just calculates the mass(g/rev) of fuel/air that enters the engine relative to Manifold Absolute Pressure, with no reference to what "should" enter the engine. In a perfect world the "VE" table in this ROM could be a 2D table that applies compensation based entirely on Engine Speed. There would be no need for a MAP reference in the table because MAP has already been accounted for by the SD multiplier/offset. From the SD multiplier/offset calculation you could probably take the output further and estimate the engine's VE and maybe even air density. Remember that this ROM is essentially a MAF calculated fueling ROM, the g/rev calculation that is normally done by the MAF sensor has been emulated by the MAP sensor.


Either way, it's all about coming up with a mathematical model of how much air is entering the engine, based on the same set of sensors - temperature, pressure, and engine speed. And I think the models are actually not that different.

Freon's approach to speed-density fueling (for his 32-bit ROM) works sorta like this:

1) calculate the density of air in the intake manifold, based on temperature and pressure
2) multiply that by a constant, to get the mass of one cylinder-full of air at that temperature and pressure
3) multiply that by VE (where VE is comes from a table with RPM and MAP axes)
4) multiply that by RPM to get MAF, and store the value in the same memory location where the sensor's MAF value was stored.
5) later on, the stock ECU code divides MAF by RPM to get load, never knowing or caring how MAF was calculated

(Steps 1-4 aren't listed in the same order as they happen in his code, but since they're all multiplications, order doesn't really matter.)

Steps 4 and 5 basically cancel out, so it all simplifies to:

Load = 1/T * P * C * VE
T = absolute temperature (i.e. degrees Kelvin)
P = absolute pressure (any units)
C = constant that resolves the various units of measurement, and incorporates engine displacement
VE = value that comes from a table with MAP and RPM axes

In Subaru's SD ROM, the y=mx+b approximation of load seems functionally identical to steps 1 and 2 above, except that it doesn't take temperature into account and it has that offset... If you add a temperature compensation, and zero the offset, then it turns into the same equation again:

Load = 1/T * P * C * VE

Carbibbles wrote:
As far as the IAT comp stuff. I was thinking along the lines of your "5th thing" and getting total airflow from g/rev and engine speed. Then interpolating between ECT and IAT based comps based on airflow.


Here we completely agree. I was thinking about that more after I wrote it, and that seems like a much better idea than the 2nd and 3rd things I suggested. So much better than I'm going to strike them from that post. Interpolating between ECT and IAT based on MAF just seems like a really good way to model the temperature of the air going into the cylinders. I've started working on adding SD my ROM (based on Merp's version of Freon's code) and I really want to incorporate this idea, because it seems way better than using IAT alone, or using a separate compensation for ECT.

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, LC, FFS, OMG
Please don't send me tuning questions via PM - use the forums instead. Thanks!


Last edited by NSFW on Thu Dec 29, 2011 10:39 pm, edited 1 time in total.
1/T, not just T


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 10:53 am 
Offline
Experienced

Joined: Sun Nov 02, 2008 12:32 pm
Posts: 196
Ok NSFW, I'll fox with you. This is a copy of the load comp to date with Hybrid and 750cc injectors 82% peak duty. Fueling almost dead on, waiting for another 70* day to see the changes.
Building formulas will get us close to where things should be in a perfect world but there are so many variables in the real world. Combustion pressure changes from timing advance, sudden load change on start from clutch engagement and I could go on with variables that any formula cannot account for.


Attachments:
File comment: CarBerry load comp table
Load Comp Hybrid 750cc.xlsx [15.82 KiB]
Downloaded 47 times
Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 11:35 am 
Offline
RomRaider Donator

Joined: Thu Jan 29, 2009 11:16 am
Posts: 338
andya wrote:
Ok NSFW, I'll fox with you. This is a copy of the load comp to date with Hybrid and 750cc injectors 82% peak duty. Fueling almost dead on, waiting for another 70* day to see the changes.
Building formulas will get us close to where things should be in a perfect world but there are so many variables in the real world. Combustion pressure changes from timing advance, sudden load change on start from clutch engagement and I could go on with variables that any formula cannot account for.


At what temp was your log done at? Interested to see the results and the temperature difference between the two. Thanks.

_________________
Mods: http://www.romraider.com/forum/viewtopic.php?f=7&t=6789&start=5


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 11:43 am 
Offline
Experienced

Joined: Sun Nov 02, 2008 12:32 pm
Posts: 196
bcheck555 wrote:

At what temp was your log done at? Interested to see the results and the temperature difference between the two. Thanks.

IAT was 37* at start-up. 45* at beginning of log and climbed to 52* by the end of 10 mile drive.


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 6:51 pm 
Offline
Experienced
User avatar

Joined: Tue Aug 30, 2011 3:17 pm
Posts: 633
Ok I decided to sit down and really dig into the physics of all of this. And I will have to admit that I think bcheck555 is partially correct about the air density stuff. I hope I can redeem myself by explaining it further :oops:


It was too hard to try and type this so I just wrote it on paper and took a picture of it.

Attachment:
IMAG07052.jpg
IMAG07052.jpg [ 57.7 KiB | Viewed 631 times ]


You can see that everything is accounted for and all units cancel out except for g/rev.


So basically the SD multiplier is a combination of air density(at 104*F), engine displacement, engine configuration(4stroke), and a psi to atm conversion. Air is 28.96 grams per mole, so at STP you have 28.96g/22.4L which equates to 1.293g/L. Apply a multiplier to this based on temperature to get air density @ 104*F (313K), by doing this you are setting your IAT comps to pivot around 104*F instead of 32*F(0*C or Standard temperature) which would be beneficial because the average IAT will generally be very close to this. I left out VE because this formula assumes 100% VE which will be accounted for when VE compensations are applied. This also means that you would need to change the SD Multiplier based on your engine displacement, but we can easily post up a couple different ones for common subaru engine combos (if you do the calculations you will find that the standard setting is for 2.0L)


So does this mean that you can't change the SD multiplier to suite your current injector settings and setup? No, because if you have an average VE for your particular engine you can change the multiplier to achieve a flattened VE map. And if your injector settings are not "correct" when using the standard multiplier, it will throw off the slope of MAP-to-Engine Load and you will have an incorrect VE map (sometimes to the point of running out of compensation). But I think we should take a more defined approach to this, I will explain my opinion on this below.



For the sake of being able to compare different setups and VE maps (NSFW suggestion). I think that we could keep the SD multiplier as a calculated value(varies based on displacement), but to do that you need to "correct" your "injector flow scaling" in order to get the correct final slope(and keep the VE map comparable and within its compensation bounds). Basically to do this you would need to take 100% tuned logs of your vehicle(MAF OR SD) and plot Engine Load* against MAP as we have been doing. Then you need to calculate (CURRENT_INJFLOW * LOG_CALCULATED_MULTIPLIER)/CALCULATED_SD_MULTIPLIER = CORRECTED_INJFLOW to get your "corrected" Injector Flow Scaling. And finally you will need to calculate a new offset (yes it is still needed).

CALCULATED_SD_MULTIPLIER will change based on engine displacement, 0.0767184 would be for a 2.0L


NEW OFFSET = (((LOG_CALCULATED_MULTIPLIER + LOG_CALCULATED_OFFSET) * CURRENT_INJFLOW) - (CALCULATED_SD_MULTIPLIER * CORRECTED_INJFLOW)) / CORRECTED_INJFLOW

The offset is still needed because there are things going on in the MAF/Fueling calculations(later on) that are resulting in the need for an offset. Maybe its latency, maybe some kind of compensation, I don't know. But if you "zero" the offset it will just skew your VE table. There is a reason the subaru engineers included the offset.


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 9:01 pm 
Offline
RomRaider Donator

Joined: Thu Jan 29, 2009 11:16 am
Posts: 338
I really, really think the offset is because the IAT sensor is near the throttle body. Take a look at the 3 logs I posted with my IAT sensor in the TGV sensor port. Let off the throttle after cruising and the temps IMMEDIATELY jump a few degrees, get back on and they go back down. I never thought the amount of heat transferred to the intake charge could be so great, but it definitely is. Do the math and the offset removes fuel at low loads, where the actually intake charge would have risen a few degrees, but not been accounted for by the sensor. I am going to leave mine zeroed after seeing the speed of the GM sensor, I feel I am getting the correct temps. BUT anyone with the IAT sensor ANYWHERE else would probably be wise to leave it as is...

_________________
Mods: http://www.romraider.com/forum/viewtopic.php?f=7&t=6789&start=5


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 9:10 pm 
Offline
Moderator

Joined: Wed Nov 22, 2006 10:23 pm
Posts: 2275
Check out the spreadsheet in the 2nd post in this thread:
viewtopic.php?f=25&t=2947

Also, Freon's implementation has a table (one value) for engine displacement, and it multiplies that by the speed density constant at run-time. The advantage to this approach is that you can put in a stroker or long-rod or hybrid or whatever without manually recalculating the speed density constant for your motor. The drawback of course is that it's one extra multiply instruction per iteration, for something that most of us will never need to change. However I have suspect that CPU instructions are not precious, so it's probably no big deal. At least for 32-bit ROMs.

It just occurred to me that the speed density constant could be calculated by RomRaider/EcuFlash using a table that would appear to the end user as simply engine displacement. Best of both worlds.

My gut tells me that the offset was used originally just for expediency, and/or simplification as bcheck555 just described. Flattening the VE table that way might make it easier to tune a single car, but I think that removing that parameter will make it easier for this community to tune all of our cars. And seeing the VE tables without that distortion will give all of us better insight into what different mods do to VE.

More later, I have to get back to work. :)

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, LC, FFS, OMG
Please don't send me tuning questions via PM - use the forums instead. Thanks!


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 9:35 pm 
Offline
Experienced
User avatar

Joined: Fri Mar 17, 2006 8:42 pm
Posts: 179
Location: ARIZONA
bcheck555 wrote:
I really, really think the offset is because the IAT sensor is near the throttle body. Take a look at the 3 logs I posted with my IAT sensor in the TGV sensor port. Let off the throttle after cruising and the temps IMMEDIATELY jump a few degrees, get back on and they go back down. I never thought the amount of heat transferred to the intake charge could be so great, but it definitely is. Do the math and the offset removes fuel at low loads, where the actually intake charge would have risen a few degrees, but not been accounted for by the sensor. I am going to leave mine zeroed after seeing the speed of the GM sensor, I feel I am getting the correct temps. BUT anyone with the IAT sensor ANYWHERE else would probably be wise to leave it as is...

Bcheck555, I have my GM IAT sensor 3 inches from the Throttle. You think I should try to zero out my offset too. Did you zero out both values?

_________________
Gabe


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 10:12 pm 
Offline
Newbie

Joined: Sun Mar 30, 2008 12:09 pm
Posts: 52
Displacement based would be the way to go, that's the way utecs do speed density and it makes perfect sense.


Top
 Profile  
 
 Post subject: Re: Speed Density and IAT compensation discussion
PostPosted: Mon Nov 28, 2011 10:45 pm 
Offline
Experienced

Joined: Sun Nov 02, 2008 12:32 pm
Posts: 196
bcheck555 wrote:

At what temp was your log done at? Interested to see the results and the temperature difference between the two. Thanks.

Drove about 100miles today which was much warmer. Saw up to 77* intake temp and the fueling would fluctuate from -.78 to +.78 as opposed to -.78 to -1.5 yesterday. This is the learning view when I got home and the fuel economy is much better than expected (spirited driving).


Attachments:
Learning View_SS_A4TJ1X00_2011-11-28 20 22 05.jpg
Learning View_SS_A4TJ1X00_2011-11-28 20 22 05.jpg [ 84.15 KiB | Viewed 603 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 197 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 14  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl