A method for removing phosphorus and nitrogen from an activated sludge wastewater treatment system, said method comprising the steps of:
- a) treating a phosphorus and nitrogen-containing wastewater in at an activated sludge reactor configured for continuous flow that includes an aeration and a mixing of said wastewater, when during a time interval in a twenty-four hour period aeration and mixing is stopped to achieve
- an anaerobic or fermentation condition in the activated sludge reactor in a settled state, the anaerobic or fermentation condition indicated by an oxidation-reduction potential value of less than −200 mV for a fermentation period of at least two hours in a 24-hour period;
- b) treating the phosphorus and nitrogen-containing wastewater immediately following said fermentation period, with resuming the mixing of the activated sludge reactor contents without aeration to create anoxic conditions utilizing nitrate in solution in a clarified liquid in place above a settled mixed liquor bed in the activated sludge 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 nitrate depletion control algorithm with a derivative of a rate of change in oxygen-reduction potential versus time used as process variable inputs for the nitrate depletion control algorithm;
- c) treating said wastewater in the activated sludge reactor following said anoxic period, by resuming the mixing and aeration and maintaining a constant concentration of a dissolved oxygen at a selected concentration of the dissolved oxygen during an aerated period by controlling an input of an air flow volume with a measured value of the dissolved oxygen in the activated sludge reactor contents used as process variable inputs for controlling the input of the air flow volume;
- d) determining when a derivative of rate of change of the air flow volume into the activated sludge reactor needed to maintain said selected concentration of the dissolved oxygen reaches a predetermined value indicating that conversion of an ammonia nitrogen in the wastewater to a nitrite or a nitrate is complete and thereby initiating programmable time delay period prior to ceasing aeration and beginning of a subsequent anoxic period;
- e) alternating the subsequent anoxic period and a subsequent aerated period with an anoxic-aerated control algorithm, until a time of the fermentation period as subsequently scheduled;
- f) withdrawing during one or more of said subsequent aerated period, a volume of mixed liquor from a surface of the activated sludge reactor, and the volume of the mixed liquor wasted from the activated sludge reactor;
- and
- g) maximizing utilization of a stored organic carbon substrate in phosphate accumulating organisms under anoxic conditions, and thereby a 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 reactor.