# Thread: IBPW {B4005} {B3701} correlation

1. ## One thing to note is
if IPW = {B9021}(minimum transient pulsewidth)
IBPW = {B9021} + {B3701}(voltage,manvac offset)
Small pulse adjust at this time doesnt appear to be added to {B9021} when it is active. More testing to be done.  Reply With Quote

2. ##  Originally Posted by 5.7ute One thing to note is
if IPW = {B9021}(minimum transient pulsewidth)
IBPW = {B9021} + {B3701}(voltage,manvac offset)
Small pulse adjust at this time doesnt appear to be added to {B9021} when it is active.
More testing to be done.
When which is active...? (I'm trying to be precise so I can write a line of pseudo-code for it)

So would this fit in here (is this the right place):

Code:
```IFR = lookup(B4001)(injector flow rate);

IPW = airmass / AFR / IFR * 1000;

if IPW <= B9021(minimum transient pulsewidth) then
IPW = B9021;
else
if IPW < B4003(minimum pulsewidth) then
IPW = B4004(default pulsewidth);

if IPW < B4006(small pulse threshold) then
IPW = IPW + B4005(small pulse adder);
end

IPW = IPW + B3701(voltage/manvac offset) + TF(transient fueling modifiers);

IBPW = IPW;```
Is there another if that I need to put in front of it...?

(Note how I separated out the last step, this makes it easier to edit later when other details are discovered)

Very interesting algorithm... GM obviously went to great length to get the injectors modelled correctly, we're learning from this.   Reply With Quote

3. ## BTW: just wrap the pseudo-code in [code] [/code] tags to get the indents preserved.  Reply With Quote

4. ## So are both the if's involving B9021 in the correct places...?  Reply With Quote

5. ## I have trouble following code like that. That is what is making it all confusing.lol.
All I can tell you is that if the calculated fuelling portion of the pulsewidth or IPW is equal to or lesser than B9021, then the value of B9021 + the offsets is the final or IBPW. If the B9021 limit is not hit, then all the min, default pulsewidth, SPA tables etc come into play. Small pulse adjust didnt appear to be active in my tests of B9021 earlier this year.  Reply With Quote

6. ## Ok, I want to make less confusing...

Code:
```IFR = lookup(B4001)(injector flow rate);

IPW = airmass / AFR / IFR * 1000;

if IPW <= B9021(minimum transient pulsewidth) then
IPW = B9021;
else
if IPW < B4003(minimum pulsewidth) then
IPW = B4004(default pulsewidth);

if IPW < B4006(small pulse threshold) then
IPW = IPW + B4005(small pulse adder);
end

IPW = IPW + B3701(voltage/manvac offset) + TF(transient fueling modifiers);

IBPW = IPW;```
The block between else and end happens when IPW > B9021.

Ok, I get it... is this how it works:

if IPW is less than or equal to B9021, then the final value is B9021+B3701+TF;
otherwise B9021 is not used, and instead, B4004 and/or B4005 may be applied, and then B3701+TF are applied.  Reply With Quote

7. ## I'm wondering if it should read like this:

Code:
```IFR = lookup(B4001)(injector flow rate);
IPW = airmass / AFR / IFR * 1000;

if IPW <= B9021(minimum transient pulsewidth) then
IPW = B9021;
else if IPW < B4003(minimum pulsewidth) then
IPW = B4004(default pulsewidth);
else if IPW < B4006(small pulse threshold) then
IPW = IPW + B4005(small pulse adder);
end

IPW = IPW + B3701(voltage/manvac offset)
IPW = IPW + TF(transient fueling modifiers);

IBPW = IPW;```
The if ... else if sequence selects only one statement to do and then jumps to end.

This is much simpler.

Are the < correct, should any of those be <= instead...?  Reply With Quote

8. ##  Originally Posted by joecar I'm wondering if it should read like this:

Code:
```IFR = lookup(B4001)(injector flow rate);
IPW = airmass / AFR / IFR * 1000;

if IPW + TF<= B9021(minimum transient pulsewidth) then
IPW = B9021;
else if IPW < B4003(minimum pulsewidth) then
IPW = B4004(default pulsewidth);
else if IPW < B4006(small pulse threshold) then
IPW = IPW + B4005(small pulse adder);
end

IPW = IPW + B3701(voltage/manvac offset)
IPW = IPW + TF(transient fueling modifiers);

IBPW = IPW;```
The if ... else if sequence selects only one statement to do and then jumps to end.

This is much simpler.

Are the < correct, should any of those be <= instead...?
Another question that needs answering is when TF or the transient fuelling modifiers are actually added to the equation. Are they added to the initial IPW calculation, so minimum pulsewidth or small pulse adder are in effect afterwards like I added in blue?  Reply With Quote

9. ## I can see a lot more testing & calculating may need to be done to put this to bed.
Good work on the pseudo code Joe, That looks a lot easier to follow now.  Reply With Quote

10. ## So the question is whether TF is applied first:

Code:
```IFR = lookup(B4001)(injector flow rate);

IPW = airmass / AFR / IFR * 1000;

IPW = IPW + TF(transient fueling modifiers);

if IPW <= B9021(minimum transient pulsewidth) then
IPW = B9021;
else if IPW <= B4003(minimum pulsewidth) then
IPW = B4004(default pulsewidth);
else if IPW < B4006(small pulse threshold) then
IPW = IPW + B4005(small pulse adder);
end

IPW = IPW + B3701(voltage/manvac offset)

IBPW = IPW;```  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•