This paper presents a study concerning the optimization of a Waste Water Treatment process. The process deals with carbon and nitrogen removal and includes activated sludge reactors coupled with an anaerobic digestion reactor. Nitrification and de-nitrification biochemical reactions are due to the biological activity of heterotrophic and autotrophic micro-organisms occurring inside the reactors. Rigorous Plant-Wide models that represent the main biochemical transformations have been constructed as per the CEIT approach . The energy consumption for each Physical Unit Operation (P.U.O.) involved in the flow-sheet is evaluated and a full link is made between the biological activity and the electrical demand or production. Steady-state mathematical optimizations are then computed and the influence of primary settling efficiency on electrical autonomy is quantified and demonstrated. The ammonium recycling from digestion to activated sludge reactors is also demonstrated to be a limiting factor for the overall energy efficiency, as well as the C-substrate availability for denitrifying. Some conclusions are then drawn to improve the global electrical efficiency of the system.