A system and method of wastewater treatment in a tank provides large mixing bubbles generated in the lower portion of the tank. In embodiments providing aerobic wastewater treatment, the system further provides oxygen to the wastewater by way of tiny aerating bubbles provided by diffusers. At least one sensor in the tank provides measurements of at least one wastewater treatment parameter such as total suspended solids, dissolved oxygen, ammonium or nitrate. An automatic controller in the system, responsive to measurements provided by the sensor, adjusts the rate of mixing provided by the large mixing bubbles. In some aerobic embodiments, the controller, responsive to measurements from the sensor, further adjusts the rate of oxygenation supplied to the wastewater by the tiny aerating bubbles.