Intermittant stalling and wild idle

So ive come to a bit of a dead end here on a bmw m52b28 with s50 itbs. For the most part the car runs ok. Cold start isnt great which im not to bothered about (this may play a factor). But when warm sometimes say 10% of the time it really struggles on idle and stalls out, when pulling up to a stop it seems to do it alot also. You can see lambda on the logs rising lean when this happens, but i fail to see whats actually causing it… any pointers would be very welcomed

hunting idle.csv (4.2 MB)

funny ocilation idle.emublog3 (128.9 KB)

what sensor is using Analog 1?

There is a close correlation between the An1 voltage and the Lean out.

An1 Voltage jumps from less than half volt, suddenly to 5v during lean period, and returns suddenly to less than half volt at same time fuel returns to normal.

Well spotted…So thats the air con pressure switch… when on its supposed to raise rpm target by 120 rpm iirc.

is there a reason your map signal is so spiky ?
When the AC gets on goes from Rich to LEAN and vice versa with a direct step change of ~0.15ms 1.65ms to 1.48ms , short trim tries to do a slow recovery as well…

so the car is on bmw s50 itbs using a alpha n stratagy and oem iacv… would the itbs be the cause no?

No its has someting to do with your A/C turning on and its changing the Active Fuel Injection Time…

You have to use idle air flow VE correction table as you runniing alpha n when you opening idle valove more you creating lean condition - more air but tps not changing this will sovle your problem.