a method and system for controlling dissolved oxygen levels in a secondary treatment system of a wastewater treatment facility that can employ a membrane bioreactor in which oxygen introduction into mixed liquor is controlled to prevent bulking and minimize generation of extra cellular polymeric substances . the control is exercised by insuring that dissolved oxygen levels within the mixed liquor do not fall below a minimum system level at which microorganism stress would occur . this is done by setting a minimum dissolved oxygen level control point equal to a sum of the minimum system level and an adjustment factor determined on the basis of oxygen uptake rate and time delays inherent in sensing oxygen levels and changes thereof within the mixed liquor . the minimum system dissolved oxygen level can be continually calculated on the basis of an inferred food to mass ratio that would vary with sensed mixed liquor suspended solids .