This document discusses using ammonia and nitrate measurement data to optimize activated sludge processes. It describes how effective instrumentation and control algorithms using these measurements can reduce aeration energy usage by 15-20%. Recent advances in ion selective electrode sensors have improved their accuracy, stability, and lifetime, making them a viable option for continuous ammonia and nitrate monitoring. Several wastewater treatment plants have implemented dynamic dissolved oxygen control systems using these sensors, achieving significant energy savings with payback periods of less than one year.