A city and several companies joined in a large scale project with the aim to introduce real time control of the sewer system and the wastewater treatment plant. The basic goals were established from the receiving water studies, and essentially represent constraints on the total nutrient discharge causing eutrophication of a fjord and limits on oxygen depletion by combined sewer overflows in the small upstream rivers. The paper describes the basic principles and approaches for the real time control in urban wastewater systems.