Biological nitrogen removal as nitrous oxide for energy recovery : process control and modeling