Page 1 of 1

Half Req-fuel Twice the VE

Posted: Sat Jan 21, 2006 8:34 am
by HotStreetVw
Hi.

Ive got a question.

Would running halft the req fuel value and twice the VE have any benifits?

I was thinking that it would give smaller adjustments to tuning the VE table.

For example a VE of 50 at 13:1, if you go to 51, the new afr is 12.74:1.

But if you had a VE of 100 at 13:1 and went to 101, the new afr is 12.87:2.

I think VE is limited to 255 right? As long as you stayed below that I think it might have merit. The VE table will not accept decimals right?

Im not looking to get flamed, just curious. Thanks

Re: Half Req-fuel Twice the VE

Posted: Sat Jan 21, 2006 10:47 am
by efahl
HotStreetVw wrote:For example a VE of 50 at 13:1, if you go to 51, the new afr is 12.74:1.

But if you had a VE of 100 at 13:1 and went to 101, the new afr is 12.87:2.
Those are correct observations, but... You need to look at the whole picture.

Code: Select all

   PW = reqFuel * MAP / 100 * VE * all that other stuff
So, in reality you may be picking up resolution in the tuning value, but you still can't get better resolution in the PW that translates to better control of AFR.

All of the arithmetic is done using integers, so the PW "curve" is in reality a step function; in MS-I's case, the step size is 0.1 ms. Let's do an example, with reqFuel at 10.0 ms and VE at 49-50, then do it again with 5.0 and 99-100 (assume kPa = 100, so MAP/100 = 1, for convenience). Note that reqFuel is stored internally as a single byte, in units of 0.1-ms, so 5.0 ms is stored as 50; intermediate computations are stored in 16-bit values, before they are converted back into a single-byte result, so here's the basic equation on one line, then broken up into intermediate results:

Code: Select all

   pw = reqFuel * VE / 100

   v1 = reqFuel * VE     <<< 16-bit intermediate value
   PW = v1 / 100         <<< 8-bit final result
Now for that 10.0/49% and 50% case we get

Code: Select all

   v1 = 100 * 49 = 4900
   PW = 4900 / 100 = 49 == 4.9 ms

   v1 = 100 * 50 = 5000
   PW = 5000 / 100 = 50 = 5.0 ms
No problem, everything looks great, right?

Try it again, with reqFuel = 5.0 (50 internally) and 99-100

Code: Select all

   v1 = 50 * 99 = 4950
   PW = 4950 / 100 = 49 == 4.9 ms  <<< Here's where it happens.

   v1 = 50 * 100 = 5000
   PW = 5000 / 100 = 50 = 5.0 ms
See what's happening here? Integer arithmetic is biting us on the behind...

Excellent question, though, it does point out some of the limitations that you face with this sort of thing.

Eric

Posted: Sat Jan 21, 2006 12:58 pm
by HotStreetVw
That makes alot of sense. I wasnt thinking about the limitations to pulse width. Does MS2 give better resolution or is it still limited to the .1ms intervals?

Thanks

Posted: Sat Jan 21, 2006 1:22 pm
by 78Spit1500Fed
Actually, no! This is another good question.

At the MS-II website here: http://www.megasquirt.info/ms2/

The bulleted list has this to say about pulsewidth calculations:
MS2 Page wrote:Fuel control to 1 µsec (100 times more resolution than MegaSquirt)
Sounds great doesn't it?

-Brian

Posted: Sat Jan 21, 2006 5:37 pm
by HotStreetVw
Looks good. Time for an upgrade!