A method for removing phosphorus and nitrogen from an activated sludge wastewater treatment system, said method comprising the steps of:
- a) treating phosphorus and nitrogen-containing wastewater in at an activated sludge bed reactor configured for continuous flow, when during at least one interval in each twenty-four hour period all aeration and mixing is stopped to achieve a deeply anaerobic or fermentation condition in the activated sludge bed reactor in a settled state, the deeply anaerobic or fermentation condition indicated by an oxygen-reduction potential value of less than −200 mV for a fermentation period of at least two hours in a 24-hour period;
- b) treating phosphorus and nitrogen-containing wastewater immediately following said fermentation period, with resuming a mixing of the activated sludge bed reactor contents without aeration to create anoxic conditions utilizing any nitrate in solution in a clarified liquid in place above a settled mixed liquor of the activated sludge bed reactor during the fermentation period, and with the mixing under anoxic conditions for an anoxic period, said anoxic period continuing until a depletion of nitrate is detected using a control algorithm based on a derivative of a rate of change in oxygen-reduction potential versus time;
- c) treating said wastewater in the activated sludge bed reactor following said anoxic period, by resuming a mixing and aeration and maintaining a constant concentration of dissolved oxygen at a selected low-range setpoint during an aerated period by controlling an input of an air volume based on the measured value of dissolved oxygen in the activated sludge bed reactor contents;
- d) determining when the derivative of rate of change of the air flow volume into the activated sludge bed reactor needed to maintain said selected low-range setpoint reaches a predetermined value indicating that conversion of the ammonia nitrogen in the influent wastewater to nitrite or nitrate is complete and thereby initiating programmable time delay period prior to ceasing aeration and the beginning of a subsequent anoxic period;
- e) alternating the subsequent anoxic periods and a subsequent aerated periods based on a control algorithm, until a time of the ferment period as subsequently scheduled;
- f) withdrawing during one or more of said aerated periods, a specific volume of mixed liquor from a surface of the activated sludge bed reactor and the specific volume of mixed liquor wasted from the activated sludge bed reactor;
- and
- g) maximizing the utilization of the stored organic carbon substrate in phosphate accumulating organisms under anoxic conditions, and thereby the selection of denitrifying phosphate accumulating organisms over non-denitrifying phosphate accumulating organisms is also maximized in order to further maximize the removal of phosphorus and nitrogen in the activated sludge bed reactor.