To understand what was happening, we need to look at the nitrogen cycle. Wastewater contains a blend of nitrogenous compounds including proteins, amines, amino acids, urea, nitrate, nitrite, and ammonia. Because of permitting, we normally just look at ammonia, nitrite, and nitrate. But at the influent to a wastewater system we should pay more attention total nitrogen.
Total Kjeldahl nitrogen (TKN) contains all organic, ammonia, and ammonium in the influent. Through a digestion step, organic nitrogen is converted into ammonium which is then extracted via distillation. With all organic nitrogen converted into ammonia, we can calculate total organic nitrogen (TON), ammonia and total Kjeldahl nitrogen. In biological treatment, the TON is eventually converted into biomass and ammonia/ammonium.
So in my early refinery case, the influent TKN was actually 45 mg/L and through testing and performing a mass balance, we found that we were removing an average of 24 mg/L across the first aeration basin - we did this by evaluating TKN in & out, Ammonia in & out, and confirming results by looking at nitrite & nitrate outlet concentrations.
So if your ammonia removal efficiency appears low or even if ammonia increases across a basin, you should look to TKN along with ammonia numbers to better describe what happens inside the biological treatment unit.