Average modeling of an alternating aerated activated sludge process for nitrogen removal