Method for controlling a wastewater biological treatment plant, wherein the method is executed by an electronic control unit, comprising the following steps: A. receiving a detection of an oxygenation quality of water to treat, the detection of the oxygenation quality being based on at least one value indicative of concentration (210; 310; 410) of at least one among ammonium ion (NH 4 +), nitrite ion (NO 2 -) and nitrate ion (NO 3 -) in the water to treat, B. receiving a detection of a concentration of oxygen (O 2) dissolved in the water to treat, C. dynamically generating the oxygen concentration setpoint (200; 300; 400) as a function of the detection of the oxygenation quality, D. controlling one or more electrical apparatuses which control a power supply to one or more respective electric motors for driving respective pumps configured to activate an air or oxygen supply in the water to treat so as to cause the detected oxygen concentration to tend to an oxygen concentration setpoint (200; 300; 400), the method being characterised in that step C generates the oxygen concentration setpoint (200; 300; 400) according to at least one of the following operating modes: - a first operating mode wherein, when the detected oxygenation quality is higher than a first adjustment threshold, the oxygen concentration setpoint is equal to a first minimum value and, when the detected oxygenation quality is lower than the first adjustment threshold, the oxygen concentration setpoint increases as the detected oxygenation quality decreases according to a first relation; - a second operating mode wherein, when the detected oxygenation quality is higher than a second adjustment threshold, the setpoint is generated according to a periodic square wave between a second minimum value, for a first time interval, and a second maximum value, for a second time interval, and, when the detected oxygenation quality is lower than the second adjustment threshold, the oxygen concentration setpoint increases as the detected oxygenation quality decreases according to a second relation; - a third operating mode wherein, when the detected oxygenation quality is higher than an interruption threshold, the oxygen concentration setpoint is equal to a third minimum value, and, when the detected oxygenation quality is lower than an activation threshold, the oxygen concentration setpoint increases as the detected oxygenation quality decreases according to a third relation. A. receiving a detection of an oxygenation quality of water to treat, the detection of the oxygenation quality being based on at least one value indicative of concentration (210; 310; 410) of at least one among ammonium ion (NH 4 +), nitrite ion (NO 2 -) and nitrate ion (NO 3 -) in the water to treat, B. receiving a detection of a concentration of oxygen (O 2) dissolved in the water to treat, C. dynamically generating the oxygen concentration setpoint (200; 300; 400) as a function of the detection of the oxygenation quality, D. controlling one or more electrical apparatuses which control a power supply to one or more respective electric motors for driving respective pumps configured to activate an air or oxygen supply in the water to treat so as to cause the detected oxygen concentration to tend to an oxygen concentration setpoint (200; 300; 400), - a first operating mode wherein, when the detected oxygenation quality is higher than a first adjustment threshold, the oxygen concentration setpoint is equal to a first minimum value and, when the detected oxygenation quality is lower than the first adjustment threshold, the oxygen concentration setpoint increases as the detected oxygenation quality decreases according to a first relation; - a second operating mode wherein, when the detected oxygenation quality is higher than a second adjustment threshold, the setpoint is generated according to a periodic square wave between a second minimum value, for a first time interval, and a second maximum value, for a second time interval, and, when the detected oxygenation quality is lower than the second adjustment threshold, the oxygen concentration setpoint increases as the detected oxygenation quality decreases according to a second relation; - a third operating mode wherein, when the detected oxygenation quality is higher than an interruption threshold, the oxygen concentration setpoint is equal to a third minimum value, and, when the detected oxygenation quality is lower than an activation threshold, the oxygen concentration setpoint increases as the detected oxygenation quality decreases according to a third relation.