sorry to interrupt, but I gained some experience with ECU, O2-Sensor and airbox modifications in the last years on a Duke 390, Duke 690 and now on my new Vitpilen 701.
So firstly I would like to explain, how engine management in these bikes works:
The engines run in 2 modes: open loop and closed loop. Open loop is like it was in the past (before EURO3 regulations). The necessary amount of fuel was tested on a bench and stored in maps in the ECU. These maps contain the opening times for the fuel injectors which is proportional to the amount of fuel and to the AFR. The maps are multidimensional, depending on rpm, throttle position sensor (TPS), temperature, pressure, map switch, etc. So when you change anything on the amount of air (airbox and exhaust modifications, but also mechanical changes inside the engine like camshaft, size of valves etc.), you have to adjust the fuel map accordingly to get the right AFR.
As far as I know, the dealers can program new maps onto the ECU, i.e. there are maps for Akrapovic exhaust available directly from KTM.
As said, that is relevant in open loop mode, which is in the Duke690 and Vitpilen 701 only above 7000rpm or approximately 60% throttle or in the first 20sec after cold start, when the O2 sensor is not yet in his working temperature range. In all other cases (at most street bikes 95% of their life time !) the engines run in closed loop mode.
Closed loop means, that the ECU adjusts the amount of fuel and so the AFR based on the O2 sensor signal. The goal is, to keep the lambda value as near as possible to 1, which is AFR 14.7. This is slightly on the lean side for the engine, but not dangerously lean. Lambda 1 is mandatory, because the cat only works effectively at lambda 1, above and below emissions increases. Unfortunately best power you get at lambda 0.85 (= AFR 12.5, rich), so for performance 0.85 is the goal and for emission it’s 1. Dangerously lean for normal engines begins at lambda 1.2 (AFR 17).
Most EURO3 and EURO4 engines (and the Vitpilen is EURO4) have standard narrowband O2 sensors. A narrowband O2 sensor delivers a voltage of approx. 0.1V when above lambda 1 (lean) and 0.9V when below 1 (rich). The threshold between lean and rich is very sharp (narrow), so when the ECU is regulating lambda 1, the O2 signal always jumps between 0.1V and 0.9V. And exactly this is the closed loop regulation, when O2 drops to 0.1V (lean), then the ECU increases slightly the amount of fuel, until the O2 sensor switches to 0.9V (rich) an vice versa. This happens very fast, my Duke 690 cycles the lambda in 20 – 50ms and the deviation in lambda is very small (only +/-0,02 lambda). At the Duke 690 you definitely could not feel anything of the
regulation cycles, but at the 390 you sometimes could feel a constant little jerking, when riding slowly.
So with a standard narrowband O2 sensor it is not possible to change the AFR in closed loop mode. All available maps, piggyboxes (like powercommander, coober, powertronics) only affetcs open loop mode.
The only possibility is to disable the O2 sensor completely with an O2 eliminator, but the ECU then detects a failure and goes into engine emergency mode, which is not so bad, but there you cannot control anything.
I found a solution to manipulate the AFR also in closed loop mode, but that is a different story with an additional broadband O2 sensor and electronics and a lot of testing and tweaking.
Sorry for the long story, but it is all not so simple…………..