auto-tune injector lag

It's all about the code!
Post Reply
User avatar
AndreyB
Site Admin
Posts: 14325
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

auto-tune injector lag

Post by AndreyB »

Not my idea: during idle, at any given voltage, switch between individual injection to batch injection.

In case of correct injector lag fuel mixture should not change.
If actual injector lag is above what we have in the curve mixture would go lean after a change from individual to batched.
If actual injector lag is below what we have in the curve mixture would go rich after a change from individual to batched.

Wonder if that would work on a real car :)

PS: yes, I know that one can bench test injectors outside of the car - but that's not cool.

https://github.com/rusefi/rusefi/issues/492
https://rusefi.com/wiki/index.php?title=Manual:Software:Injector_Lag_Autotune
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14325
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: auto-tune injector lag

Post by AndreyB »

New log entry to support this feature: engineMode. It's a bitmap of fuel algorithm, ignition mode and injection mode. In case of my Neon 54 means individual injection and 58 means batched injection.

Still need to change the firmware so that changing ignition mode does not reset alternator control PID state, but still - if you look only at the columns where VBatt is close to 14 you can already see something.
Attachments
screenshot.png
screenshot.png (51 KiB) Viewed 10532 times
2016-09-12_21_20.msl
(868.43 KiB) Downloaded 824 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: auto-tune injector lag

Post by stefanst »

Awesome!
That switching feature will sure come in handy. No need to remove injectors and bench-test.
There will be people who will tell you that this is not a scientific method and doesn't reflect the real lag. To those I say: Stuff it!
This approach creates predictability of injector behavior. That's what we really need. Everything else is academic.
Now we just need a temperature sensor for the injectors, so we can map lag over temperature and one for the fuel rail, so we can calculate fuel density. With that we would be close to running the injection just by dead reckoning without ever needing to adjust for errors with a WBO2.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: auto-tune injector lag

Post by kb1gtt »

Frankenso has qty 4 of thermocouple temperature sensors. So measuring the injector temperatures or other temperatures should be possible. Do you expect the injector temperature for OEM operation or is that a one time calibration thing?

I'm not following how this batched vs individual injection is expected to be used. It appears it is expected to be used for tuning injector dead time. Is it a one time tuning thing, or would it be used as part of normal operation?
Welcome to the friendlier side of internet crazy :)
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: auto-tune injector lag

Post by stefanst »

We're talking one-time calibration in both cases.

Injector lag is very important for tuning, especially with large injectors, where pulse-widths in idle and partial-load are very small. A rather tiny change in actual lag-time of 0.1ms or so can cause a huge change in delivered fuel if it's not being compensated for. This is why every modern FI system has a table that shows the voltage dependency of the injector-lag which is then used to calculate the "on" time of the injector. Injector lag times decrease with increased voltage.
But lag times also seem to increase with injector temperature. AFAIK none of the aftermarket ECUs compensate for this. However, in my personal experience, running crappy 850cc/min injectors on a 1.8l 4 cylinder, idle AFR could vary between 11.0 and "so lean it won't run" - maybe 17 to 18, based on injector temperature. I.E. the car would be super-lean on hot restarts and super-rich on a cold day with cold under-hood temperatures.

So having a tool to characterize the actual behavior of the injectors in-situ is highly desirable. Once the injectors are characterized, there shouldn't be any need to do it again.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: auto-tune injector lag

Post by kb1gtt »

I understand injector lag, and I agree it is very important.

What is the general sequence for how to use this new tool? Or perhaps I should just sit back and let it get developed then learn about it after it exists. Is the below about correct?

1. Get engine running in batch mode, this helps smooth everything out and lets the engine run reasonably smoothly, as well you can adjust your AFR to be what you want.
2. Set bit in console, which allows one injector to be individually controlled.
3. Set that injector to 0, watch the AFR go wrong
4. Adjust that one injector until the AFR is again proper.
5. Apply magic and determine dead time is XYZ

I'm missing some steps here. I'm not sure how you would get to a dead time. Perhaps that's because I'm not understanding how this new feature works.

Any how, I'm just rubber necking, feel free to prioritize getting it working higher than replying to my inquiry :)
Welcome to the friendlier side of internet crazy :)
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: auto-tune injector lag

Post by stefanst »

I think we can start by tuning all injectors together. In OEM applications they seem to be fairly similar in lag times. Once you have that baseline, you can try and tune individual injectors, but I'm not sure that we would be able to see the reality of small changes for single injectors over the noise inherent in the WBO2 signal.

I've used this strategy to tune my lag times for all injectors together, using MS3. Those injectors had a lag time of approx. 1.37ms at 13.6V. While the datasheet from the manufacturer specified 0.8ms at 14.4V. Even at 14.4 they were still way over 1.2ms. I also found that doing this at relatively higher revs than idle and with closed loop idle turned off helped with a more stable AFR signal. I believe I used approx. 1600rpm- just held by a pretty wide open IAC.

But the lesson I learned is that I couldn't really tell the difference between 1.33 and 1.40ms. So I settled for something in the middle there.

Your sequence is pretty much what I did. Once I started adjusting the lag time though, I also needed to re-tune my VE in the cells used, since, coming off a lag time that was waaaay too short, I was then running pig-rich when adjusting them up. It was an iterative process and took me maybe 20 minutes for the one data-point at 13.6V. I also realized that I can only tune with the fan not running, because even though my alternator control corrected for the voltage drop of the fan kicking in, AFRs would go up with the fan running, indicating an increase in lag-time.

After you have that one data point, if you happen to have a means to control the voltage, you can then just vary the voltage and adjust lag-times at that voltage to achieve the same AFR as before. No need to do the batch-injection/ sequential-injection dance.

The same would be possible, to a degree, if we had a temperature reading on the injectors. How we can heat or cool all injectors evenly would be something to be determined though....
AldoQ
Posts: 43
Joined: Wed Apr 01, 2015 11:21 pm

Re: auto-tune injector lag

Post by AldoQ »

The ford fuel rails presure have a temp sensor

Enviado desde mi Z812 mediante Tapatalk
User avatar
AndreyB
Site Admin
Posts: 14325
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: auto-tune injector lag

Post by AndreyB »

Now with VBatt is affecting all this a bit less - still affecting due to slow PID while changing injection mode affects RPM enough to affect VBatt which would then affect injector lag...
Attachments
2016-09-15_22_14.msl
(587.02 KiB) Downloaded 825 times
screenshot.png
screenshot.png (57.32 KiB) Viewed 10455 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: auto-tune injector lag

Post by stefanst »

So if I can still think somewhat straight after midnight, this seems to indicate, that your injector lag, at least at voltages of 14V and below, is >1.1ms - correct?
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: auto-tune injector lag

Post by kb1gtt »

I'm a bit confused, I thought your alternator control was ON until you reached target then OFF. Or perhaps this setup is not controlling the alternator regulator. I'm not following why your Vbat changes with RPM.
Welcome to the friendlier side of internet crazy :)
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: auto-tune injector lag

Post by stefanst »

I'd also advise to keep VE constant while tuning lag. I.E. set all the cells in the VE table that surround the area you're tuning in to the same value. Minute changes in MAP and RPM under constant load shouldn't really have any appreciable impact on VE, so let's keep it flat for tuning's sake.
User avatar
AndreyB
Site Admin
Posts: 14325
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: auto-tune injector lag

Post by AndreyB »

kb1gtt wrote:I'm a bit confused, I thought your alternator control was ON until you reached target then OFF. Or perhaps this setup is not controlling the alternator regulator. I'm not following why your Vbat changes with RPM.
Nope, while I've tried on/off alternator control it did not work well. At the moment I use PID for alternator control and looks like it likes to float away in case of RPM change, which brings us back to better PID settings I guess. See http://rusefi.com/forum/viewtopic.php?f=3&t=1088
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: auto-tune injector lag

Post by kb1gtt »

I think you need to first get your VBAT more stable before you'll get a good tune on the other parameters. I don't see your alternator PWM or PID parameters in your posted log. I see lots of noise on VBAT which would cause many issues. Could you post a Iog with those set for the debug fields. From what I'm seeing with a blind fold on, I believe you should first low pass filter with the biquad filter, then PID tune with that filtered data. Is the VBAT signal sampled once every 0.1 seconds?

What was the problem with the on / off algo? Perhaps you need the on / off algo but after the biquad filter.

Also is your real signal that noisy? Or is that noise caused by the alternator PWM?
Welcome to the friendlier side of internet crazy :)
Post Reply