Saturday, January 16, 2010

Injector grouping, the exhaustive search

As you saw in the previous post, the way we grouped injectors was very simple, we simply sorted them by flow and picked 'top 4' and 'bottom 4' and that was it.  It seemed to work well, but how do we know there isn't a better method.

Last night I realized that there are 8 injectors, so there's factorial(8)=40320 ways of organizing the injectors.  Seems like a lot, but I figured there'd be a lot of repetition within each bank as we don't care if we get [A B C D] or [D C B A] or any other related permutations.  Thus I figured this would be problem small enough that I could calculate the flow spreads for every possible permutation (exhaustive search, by the way of brute force).

Matlab of course has a function that can generate permutations of any set of numbers, so I let it generate the 40320-entry long list.  Then I split the resulting lists into bank1 and bank2, and then executed all the calculations presented in the previous post.  An additional step at the end was summing up the two AFRdifference results, in order to come up with one final number describing the 'goodness' of the combination.  Then I found which flow permutations came up with the best (lowest spread) number.  I pick one of them, and that's my 'best' injector grouping.

So how did the exhaustive search results compare to our 'sort and split down the middle' approach?  Pretty good actually!  I ran the optimization for 3 sets of injectors and 2 of the 3 permutations we came up were actually optimal, according to this script.  The third permutation was different only in placement of 2 swapped injectors, and even then the resulting difference from what we picked was minuscule. Why does the simplistic approach work so well then?  I think it happens because if you pick a group that isn't a 'bottom half ' or 'top half' of flows, then you end up with one group that's very closely matched, but the other group ends up inherently with flows that are from two ends of the spread, negating the positive effect of the extra close group. 
I have some other ideas on how to generate the final 'goodness' number.  For right now it's just a sum of the AFRdifferences, but it could be something completely different, I could go with standard deviation of the flows within the bank multiplied out with the range of the means between the means of two banks for example.  It's just something to play with, and now that I have an infrastructure set up for it, it should be easy.


I put the quotes around the 'best' when talking about finding optimal grouping, because there are many other permutations that generate different, but effectively identical permutations.  So once you get results, you still can rearrange the numbers within the bank, to match that particularly high or low flowing cylinder.

When I originally came up with this, I figured I'm going to have to figure out how to eliminate all the 'duplicate permutations' of numbers that are reorganized within the bank, to speed up the process.  There was no need for it.  The entire script, with setup, calculations, and display of results, took a grand total of 0.03 seconds on a 2yr old 2.4GHz CPU.  Right now this is just a Matlab script, which I know is not particularly popular with gearheads due to cost ($2000!!! unless you get the $100 student version).  I will try to figure out how to make a standalone program from this script, so you have optimal flow groupings every time you redo your injectors.

--Marcin

Sunday, January 10, 2010

Per-Bank Injector Grouping

So while discussing my findings from earlier this morning, I had this stray thought:  since we know what which injector flows separately, why don't we group them in a way that the Fuel Trims can account for easily?

One common trick is to put the highest flowing injector on the leanest running cylinder.  This makes sense;  we might not know how much more air that cylinder is getting, but at least we can give it some extra fuel to accommodate it better.  This is obviously not the most precise technique, but as far as rules of thumb go, it's not a bad one to practice.

This approach made me think though:  what kind of fueling are the other cylinders getting?  We might be OK on average, but it does not mean that the per cylinder fueling is anywhere near proper.  So how would we make this better, make the per cylinder fuel delivery more consistent?

We already know the flows of all injectors individually.  We don't know, and unless you stick an O2 probe in each runner, we will not know which cylinder is flowing what amount of fuel, so we can't just pick the best injector/cylinder combo and hope that airflow distribution is similarly close.  What we have however is Fuel Trims mechanism that in Closed Loop treats the engine as two banks with two separate corrective values.

So what would happen if we group our injectors accordingly not to their individual flows, but in groups of four?  The discrepancy between banks would be bigger than if we placed injectors randomly.  But the fueling within each bank would be much closer!  We cannot control fueling within a bank of cylinders, but we can control it per bank.  Thus the discrepancy among the banks will be corrected with Fuel Trims, but the discrepancy within each bank is going to be minimized, thus providing us with a consistent fueling.

Enough blabbing, let's see some numbers:




















These are three sets of SVO greentops for which I have flow sheets handy.

Some explanations are needed:
The colors in the graph are in accordance to the flow number.  The highest numbers in the set are red, the lowest are green, and the rest is somewhere in the middle accordingly.

Avg-bank are the average flows for each bank (bank defined in as the first four and the last four injectors).  They're fairly close, as random placement tends to come up with good averages.  This is however not what we want, as we'll see later.

Range is the difference in flow within a bank, how far the maximum and minimum are spread apart.

Within Bank is the percentage of how big the range is comparatively to the average.

AFR Difference is the impact that 'within bank' difference in flows has on AFR, when commanding 14.7.

As you can see, the differences in AFR within each bank can be up to 0.24.  Remember all these flow sheets data I have are already for injectors that have been cleaned, so stock injectors can be in a lot worse shape that what you see here.

Now let's take a look at the same injectors, but grouped.  On the next picture, I simply sorted the flows, and the rest is the same, but look at what difference it makes for the differences in flows within the same bank.  Since the coloring is tied to the values, and we sorted by values, now we can see the groupings of injectors with similar flows by being of similar color.  Kinda cute.




















Across all the injector sets, the AFR fueling differences dropped about 0.1.  Set 2 has one injector that flows significantly more than the rest, and that's not something with can get rid of, having only 8 injectors total, 4 per bank.
The Daniel set has nice consistent gains, bringing one of the banks to within 0.03.

So why do I care for AFR change of 0.1?  Because there is no extra cost associated with this process.  You're going to be installing injectors, you already know what they flow, so why not install them in a way that yields more consistent results?  All it takes is a simple sort and then installing them in the ordered determined by injector flows. You're getting something for nothing.  The good part is that there's a gain.  It's not a large gain, it's not going to solve all your fueling problems, but it should nudge it in the right direction.

--Marcin

SVO Greentop 42# testing at 3 and 4bar

This is nothing new; I've written about it before HERE. However, I don't know why this is still such a ripe source for arguments, thus I figured it's time to revisit.

A friend of mine got some SVO Greentop 42s, and send them to Deatschwerks for some cleanup and flow testing. He wanted the injectors tested not at some arbitrary rated pressure that the injectors will never see in his application, he actually wanted to see what they would flow at the intended rail pressure. He called up Deatschwerks, talked to whoever did the service, and asked about the additional testing at the GM standard of 58psi. They said no problem, and sent him not one but two flow sheets: one at 43.5psi and one at 58psi. This sort of data should once for all settle all SVO flow discussions, as it's done on the same bench, with the same injectors, by the same technician, hopefully with the same methodology. I love the smell of science in the morning!

Quick disclaimer is in order: I usually avoid any sort of endorsements on principle, as I feel commercialism ruins science, but I am going to make an exception here. I've talked in the past with David Deatsch and he's been very interested in what our little tuning community needs. So if you really want to get to the bottom of 'why my trims are off on one bank' sort of problems, give them a call.

Back to tuning...
So Daniel forwards me his flow sheets, I enter his data into Excel, and let's take a look at what we see:














or for people who like graphs:

















So we have 8 injectors, they all flow a little differently.  The red bars are the flow values tested at 3bar (43.5psi).  The purple bars are the flow values tested at 4bar (58psi).  The green values are a theoretical flow at 4bar calculated using the Bernoulli's formula.

As you can see, there's a discrepancy between the theoretical and the measured flow values at 4bar.  The interesting part is not that they are different, but that they are different in a consistent manner.  There's a whole area of mathematics that deals with this exact phenomenon, called 'Residual Analysis.'  I've been told to cut it out with the math, so here's the super short version that's relevant to this post.  Residual Analysis tells us that if there's a distinct pattern in our 'theory vs reality' then the underlying assumptions or models are wrong.

So there are few possible explanations here:
1.  The injectors actually take on different flow characteristics at 4bar vs 3bar.  Maybe they're more suitable to higher pressures, as they all flow more than they should.
2.  There's a fairly consistent error in measuring pressure or flow.

So I decided to quickly explore option 2, as I wanted to see at what pressure the injectors would flow as much fuel as the flowed values would suggest.

So using some numerical trickery, I asked Excel "what fuel pressure would I have to apply to the injectors I have data for at 3bar, to get the flow seen on the 4bar flow sheet?"

And what Excel came up with was 411kPa, or 4.11bar, or 59.7psi.  This is not just for one injectors, this is across all of them.  Here's the results in graphical form:















As you can see, the theoretical and the real bars are much closer to each other this time.  Some are over, some are under, but they're all close.

So this leaves us scratching our heads:  is the flow bench indicating less pressure than there really was at the time of testing?  Wouldn't that show up at the 3bar flowing too?  Why doesn't the theory and the real results line up closer?  What if it's the flow numbers that are skewed not the pressure?  What other 'hidden variables' are we dealing with here?

Despite all this, I'd much rather use these flow numbers, than just assuming 42lb/hr @3bar converted to 4bar ignoring all the assumptions we've made in that process.  Especially if you combined it with accounting for fuel pressures at given manifold vacuum, as I've demonstrated before.

And to come full circle to establishing the flowed pressure of SVO Greentops:  they all flowed between 43.0 and 43.5 lb/hr at 3bar (42.5psi).  Not 39.15psi, not 40psi, not whatever else people claim.  Granted, that's also not perfectly aligned with the official 42lb/hr flow, but that probably can be attributed to freshly cleaned injectors.  I wouldn't be surprised if the OEM's underrated their injector flows to make up for the average car user than never uses fuel injector cleaner.

Hope this helps,
--Marcin

Labels: , , , ,