An analysis of nitrogen removal and control strategies in an alternating activated sludge process