A dynamically controlled anaerobic/aerobic granular sludge reactor ef ﬁ ciently treats brewery/bottling wastewater

This study investigated the application of a dynamic control strategy in an aerobic granular sludge (AGS) reactor treating real variable brewery/bottling wastewater. For 482 days, the anaerobic and aerobic reaction steps in a lab-scale AGS system were controlled dynamically. A pH-based control was used for the anaerobic step, and an oxygen uptake rate (OUR) based control for the aerobic step. Additionally, the effect of an elongated aerobic step, and the effect of the removal of the suspended solids from the in ﬂ uent, on AGS formation were also investigated. In comparison to a static operation, the dynamic operation resulted in similar reactor performance, related to ef ﬂ uent quality and the anaerobic dissolved organic carbon (DOC) uptake ef ﬁ ciency, while the organic loading rate was signi ﬁ cantly higher. The removal of suspended solids from the in ﬂ uent by chemical coagulation with FeCl 3 turned hybrid ﬂ occular-granular sludge into fully granular sludge. The granulation coincided with a signi ﬁ cant increase in the abundance of the glycogen-accumulating Candidatus Competibacter and an increase in the content of gel-forming EPS to respectively around 14% and 30%. In conclusion, this study showed the successful application of a dynamic control strategy based on common and low-cost sensors for AGS treatment of industrial wastewater. dynamic control of aerobic phases was ﬁ The dynamic control strategy coped with industrial brewery/bottling in ﬂ uent.


INTRODUCTION
Wastewater treatment, although legally required, represents a financial burden for industry. Therefore, there is a need to develop and improve technologies to optimize process efficiency and intensity. One of the sectors with high production of wastewater is the brewery sector. Indeed, wastewater treatment in this sector faces a significant challenge because of the large volume and load to be treated. About 3-10 L of wastewater is produced when brewing 1 L of beer (Fillaudeau et al. 2006;Kanagachandran & Jayaratne 2006). Besides, brewery wastewater is characterized by a high chemical oxygen demand (between 2,000 and 6,000 mgCOD·L À1 ) and a high total solids content (between 5,100 and 8,750 mgTS·L À1 ) (Rao et al. 2007).
A recent innovation in wastewater treatment is the aerobic granular sludge (AGS) technology, which optimizes the sequencing batch reactor (SBR) system. AGS reduces the economic and ecologic footprint when compared to conventional continuous-flow activated sludge (CAS) systems (de Kreuk et al. 2007) and SBR systems with floccular activated sludge (Pronk et al. 2015). It results in better sludge settling, simultaneous nitrification/denitrification (SND), a higher resistance of the sludge to toxins and shock loads, a smaller footprint, and lower energy consumption (de Kreuk et al. 2007;Pronk et al. 2015). Most of these advantages result from the compact granular structure of AGS, which settles faster than floccular sludge. Furthermore, the sludge concentration in AGS systems can be significantly higher than in floccular SBR systems, which reduces the required aeration tank volume to treat a certain load of wastewater. An additional advantage of AGS is the potential resource recovery from wastewater and wasted sludge, namely the production of gel-forming alginate-like extracellular polymeric substances (ALE), responsible for the strength, elasticity, and hydrophobicity of AGS (Schambeck et al. 2020). ALE can be used in agriculture and the paper and construction industries.
A common strategy to form stable granules in SBR systems is introducing an anaerobic/aerobic operation. This is required for the selection of carbon-storing organisms such as phosphate accumulating organisms (PAO) and/or glycogen accumulating organisms (GAO) (de Kreuk et al. 2007). An important factor for the PAO and GAO selection process is the complete anaerobic uptake of readily degradable and fermentable COD during the anaerobic step. To achieve this, most AGS systems apply an extended anaerobic step to give the PAO and GAO the time to store the available organic matter. This practice, however, often results in long inactive anaerobic phases. Therefore, the static operation of the anaerobic/aerobic phases is, in many cases, not very efficient.
A potential improvement of the reactor operation is to dynamically control the anaerobic step duration using sensors to monitor the COD uptake process. To date, only a few studies have been reported in which the anaerobic step is controlled dynamically. Kishida et al. (2008) and De Vleeschauwer et al. (2019) used a conductivity-based controlled anaerobic step in an enhanced biological phosphorus removal (EBPR) SBR fed with synthetic wastewater with a low COD/P ratio. For an anaerobic/aerobic AGS SBR treating synthetic wastewaters with a high COD/P ratio, De Vleeschauwer et al. (2020) developed a dynamic control strategy based on the pH signal. In an AGS SBR system, the anaerobic step was automatically terminated when the pH profile slope changed from positive to negative, leading to near-complete anaerobic COD uptake by GAO. Two factors influence the anaerobic pH (profile) in GAO systems. First, the uptake of 1 mol acetate consumes 1 mol of hydrogen ions. Secondly, CO 2 is formed during the conversion of acetate to acetyl-CoA. Combining these two factors results in a pH increase during acetate uptake by GAO (Zeng et al. 2003). Once all the VFAs have been depleted, the pH decreases . It is important to note that when treating complex wastewaters, additional microbial reactions can occur that can affect the pH, such as fermentation and denitrification. Denitrification must not occur in the anaerobic step as this would impact the pH profile (Yang et al. 2007).
In conclusion, previous research using synthetic wastewater at both high and low COD/P ratios has shown the feasibility of the dynamic control of the anaerobic and aerobic phases in AGS-SBR systems. However, to the best of our knowledge, what is currently lacking is the validation of the proposed innovative strategies with real and more complex (industrial) wastewater as a necessary step to application in the wastewater industry.
Therefore, the current study investigates the efficiency of a pH-based anaerobic and OUR-based ) aerobic dynamic control in an anaerobic/aerobic AGS SBR treating real industrial wastewater. Brewery wastewater was selected because of the high COD/P ratio warranting a pH-based anaerobic control. The aim was (1) to optimize sludge granulation in a conventional SBR fed with real industrial wastewater and (2) to study whether the anaerobic/aerobic dynamic control could be effectively applied to industrial wastewater.

Reactor
The reactor had a diameter of 24 cm and a height of 40 cm, resulting in a height to diameter ratio (H/D) of 1.66. The volume exchange rate (VER) was 9% (working volume: 11.6 L, influent volume per cycle: 1 L). The VER was kept at a low value of 9% because brewery wastewaters have high COD loads compared to domestic wastewater. The reactor was equipped with an influent peristaltic pump (Watson Marlow ® ), a mixer (Heidolph ® RZR2020), a discharge valve (Eriks RX ER10.X33.S00) and an aeration system consisting of an aeration pump (koi flow 60, Aquadistri China ® ), a 13 cm aeration disc (Aquadistri China ® ), a luminescent dissolved oxygen (LDO) sensor (Hach Lange ® ) and a pH sensor (JUMO ® BlackLine). The oxygen concentration in the aerobic step was controlled using an on/off aeration control strategy. The aeration pump was activated when the oxygen concentration decreased below 1 mg·L À1 and deactivated when the concentration increased above 4 mg·L À1 . This aeration control allowed for the calculation of the OUR . All sensor values were logged electronically. At the end of each cycle, the values were archived.
The reactor was seeded with sludge from a lab-scale reactor operating with an anaerobic/aerobic strategy (Stes et al. 2018). The seed sludge was hybrid containing a mixture of floccular and granular sludge with a particle size distribution DV10, DV50, and DV90 of respectively 78.5 + 0.5 μm, 255 + 8 μm, 768 + 39 μm.
The AGS SBR was operated with a custom-built National Instruments LabVIEW ® program, a Siemens PLC, and a Phoenix IO. The reactor cycle consisted of 9 steps; idle step (10 s); mixed aerated pre-step (30 min); unmixed anaerobic step (10 min); unmixed anaerobic influent feeding step (flow dependent); mixed anaerobic step (static or dynamic); mixed aerobic step (static or dynamic); sludge settling step (10 min); discharge step (5 min); inactive step (1 min). The duration of the feeding step varied between 1 and 2 min. The flow rate was measured periodically, and the duration of the feeding step was changed to ensure a constant influent volume.

Reactor operation
The reactor was operated for 637 days, divided into four periods (Table 1). In the first 155 days, period 1 (P1), the anaerobic and aerobic steps were operated statically. From days 156 to 637, the anaerobic and aerobic steps were operated using a dynamic control strategy. Three different operational strategies were tested to investigate complete AGS formation. First, from days 155 to 383, period 2 (P2), the impact of the dynamic anaerobic strategy was investigated. Secondly, between days 384 and 490, period 3 (P3), the impact of an extended aeration step on the AGS formation was examined. Finally, from days 491 to 637, period 4 (P4), the impact of influent pre-treatment on AGS formation was examined.

P1: Investigating the anaerobic pH profile
From days 1 to 155, the anaerobic and aerobic steps were operated statically. The anaerobic step duration was 2 h, and the aerobic step duration was 4.07 h. The aim was first to establish a baseline for the reactor efficiency for later comparison to the dynamic operation, and second to finetune the anaerobic control by confirming the correlation between the anaerobic pH profile and the dissolved organic carbon (DOC) uptake during the anaerobic phase (a detailed description of in-situ measurements is given below). Once the correlation between the anaerobic pH profile and the DOC uptake was identified, the dynamic anaerobic control was optimized to detect the anaerobic DOC depletion and terminate the anaerobic step (see below).

P2: Dynamic control of the anaerobic/aerobic steps
Between days 156 and 383, the anaerobic and aerobic steps were controlled dynamically. The control strategy was based on the anaerobic pH profile treating acetate based synthetic wastewater with a COD of 1,250 mg·L À1 and low P content of 5 mg·L À1 , as described earlier (De Vleeschauwer et al. 2020). The anaerobic step was terminated when the pH profile stopped increasing and started decreasing. To achieve this detection, the slope of the pH profile was calculated. The pH was logged, and every minute, the slope of the pH values collected during the past 10 minutes was calculated. The control strategy detected when the slope turned negative, indicating the end of the anaerobic DOC uptake.
Using the data collected during P1, the previously developed control variables were adjusted (see the results section) to allow successful detection of the end of the DOC uptake in the AGS SBR treating brewery wastewater.
The dynamic aerobic control strategy used the oxygen uptake rate (OUR) to control duration of the aerobic step . The reactor was aerated with an on/off aeration control. At the end of every negative oxygen slope, the OUR was calculated. The aerobic step was terminated when three consecutive OUR values were below a predefined specific OUR value of 2 mgO 2 .(g MLVSS ·h) À1 which can be defined as endogeneous (e.g. Dries 2016).
P3: Dynamic control of the anaerobic/aerobic steps with an extended aerobic step According to Corsino et al. (2017), extending the aerobic step in AGS treating brewery wastewater increases the stability of the granular sludge because it favors microorganisms capable of storing energy compounds. To stimulate granular formation in P3, from days 383 to 490, the duration of the aerobic step was extended by terminating the aerobic step after nine consecutive OUR instead of three consecutive OUR values (in P2). The anaerobic control was kept unchanged as in P2.
P4: Dynamic control of the anaerobic/aerobic steps with additional influent pre-treatment During P4, ranging from days 491 to 637, the influent from the brewery/bottling industry was pre-treated in the lab using a FeCl 3 solution to coagulate and completely remove the suspended solids from the influent. In P4, we applied the same anaerobic and aerobic control strategy as during P2, without an extended aerobic step.
The following pre-treatment was applied to remove all suspended solids; under mixing conditions, the influent pH was decreased to 2.5 by dosing a 1 M HCl solution. Secondly the, 100 mgFe 3þ .L À1 INFLUENT was dosed using a 40%(m/v) FeCl 3 solution. After 10 min mixing, the influent pH was increased to 8 by dosing a 1 M NaOH solution. At a pH of 8, the mixing was stopped, and the formed precipitation was allowed to settle for 2 h. The clear influent was collected and stored in the fridge at 4°C.

Influent composition
Wastewater from a brewery/bottling industry was chosen because of the high COD/P ratio. Wastewater was collected at the brewery once every week or two weeks. To minimize degradation, the influent was kept in a fridge at 4°C. The average COD, NH 4 -N, and PO 4 -P were 5,532 + 1,199 mg·L À1 , 6.32 + 4.14 mg·L À1 , and 5.48 + 4.01 mg·L À1 . This resulted in influent wastewater with a COD/N/P ratio of 100/0.11/0.09, indicating the nutrient deficiency of the brewery wastewater. NH 4 Cl and KH 2 PO 4 were added to increase the COD/N/P ratio to 100/3.5/0.5.

Sludge characteristics
Sludge mixed liquor suspended solids (MLSS), the mixed liquor volatile suspended solids (MLVSS) and the sludge volume index (SVI) were measured according to the standard methods (APHA 2012).
The sludge particle size distributions (DV10, DV50, and DV90) were measured with a Malvern Mastersizer 3000 . Microscopic images were taken with an Olympus CX43 microscope.

Alginate-like extracellular polymer analysis
The alginate-like extracellular polymer (ALE) content was measured by extracting the ALE at high temperature (80°C) in a sodium carbonate solution (Na 2 CO 3 ) solution (Felz et al. 2016).
Sludge from the reactor was centrifuged at 3500 rotations per minute (rpm) for 10 min. Approximately 3 g of centrifuged sludge was resuspended in a sodium carbonate solution (0.5% w/v Na 2 CO 3 ) and mixed at 400 rpm and 80°C for 35 min. Afterward, the mixture was centrifuged. The supernatant, with the dissolved ALE, was collected. To obtain the ALE in its acidic form, the pH of the supernatant was adjusted to 2.2 + 0.05 using a 1 M HCl solution. The solution was centrifuged, the pellet was retained (the pellet is the ALE in its acidic form). To remove any ions present in the pellet, the pellet was washed with demineralized water and centrifuged twice.

In-situ measurements
Periodic in-situ measurements were carried out to measure the anaerobic DOC uptake efficiency. Samples were taken from the reactor at fixed time intervals and filtered. The DOC of the filtered samples was analyzed. The anaerobic DOC uptake efficiency at any time was calculated with Equation (1): For the purpose of investigating the effectiveness of the anaerobic control, the anaerobic uptake was calculated at two important moments in the anaerobic step: first when the pH profile indicated a complete DOC uptake (referred to as Uptake1) and second at the end of the anaerobic step (referred to as Uptake2).

DNA sequencing
The DNA sequencing was carried out as described in Dobbeleers et al. (2017). Sludge samples (500 μL) were taken from the reactor at different timepoints in P1 up to P4. The DNA was extracted (McIlroy et al. 2009) with minor modifications. The sludge samples and DNA extracts were kept at À80°C.
To analyze the microbial population dynamics, 16S rRNA gene amplicon sequencing targeting the V1-3 region was carried out. The amplicons were generated with barcoded primers and Phusion High-Fidelity DNA Polymerase (Kozich et al. 2013). PCR products were purified using the SequalPrep Normalization plate kit (Invitrogen). To reduce the number of tests, all the samples were pooled. After gel extraction using NucleoSpin Gel and PCR Clean-up, the samples were diluted to 4 nmol·L À1 . The resulting library was sent to the Centre for Medical Genetics (Edegem, Belgium) for Amplicon sequencing using MiSeq Reagent Kit v2 (Illumina). The final processing and analysis were carried out as described in Dobbeleers et al. (2017) using a miDAS database and analyzed in R studio 2016 using the ampvis package (Andersen et al. 2018).

Anaerobic dynamic control
During P2-P4, the anaerobic step of the SBR was controlled dynamically. The anaerobic control was based on the pH profile. During P1, a correlation between the pH profile and the DOC uptake was observed and investigated. The pH profile during the anaerobic step within a cycle showed three phases (Figure 1). During the first phase (1), the pH increased (positive slope). In the second phase (2) the pH decreased (negative slope), and in the last phase, phase (3), the pH decrease flattened out (i.e. the negative slope plateaued). Using these data, the pH-based dynamic control was adjusted. The current strategy uses the same four calculation variables proposed by De Vleeschauwer et al. (2020). CV 1 is the sample interval of the sensor value. CV 2 is the number of sensor values per slope calculation. CV 3 is the cut-off point of the negative slope, which is periodically adjusted based on in-situ measurements. CV 4 is the required number of slope values that meet the cut-off requirement. The control strategy runs through three loops to dynamically control the duration of the anaerobic step ( Figure 2).

Dynamic control performance
The dynamic control successfully controlled the anaerobic and aerobic steps. Fifty-five different influent batches were fed to the dynamically operated AGS SBR during P2-P4 with influent total COD varying between 2,544 and 7,360 mg·L À1 . The overall pH profile during phases 1 (pH increase), 2 (pH decrease) and 3 (pH decrease) remained unchanged independent of the influent COD concentration (Figure 1). The calculation variables CV 1 , CV 2, and CV 4 remained respectively 60 s, 10 s, and 15 s. However, the changing composition of the wastewater had an impact on the CV 3 variable. It needed periodic adjustments and varied between À1 and À7, as the pH decrease during phases 2 and 3 varied over time.
To determine the global impact of the anaerobic and aerobic dynamic control on the reactor efficiency, we monitored the anaerobic DOC uptake, the organic loading rate (OLR), and the effluent composition. These are important for aerobic granular sludge formation and for meeting the discharge requirements in an industrial context ( Table 2).
The anaerobic DOC uptake at Uptake1 (when the control indicated a complete DOC uptake) and at Uptake2 (at the end of the anaerobic step) were almost the same and higher than 90%, indicating that the control strategy was successful. The aerobic DOC leakage was kept to a minimum. P1-P4 show similar values for the COD removal efficiency, indicating no negative impact on the removal efficiency due to the anaerobic and aerobic control strategies. The average effluent COD value was about 70 mg·L À1 during P1, P2, and P4. A positive effect of the extended aerobic step was observed during P3. The average effluent COD was 20 mg·L À1 lower during this period (Table 2).
The aerobic control strategy based on the OUR operated successfully during the study. During P2 and P4, the aerobic dynamic control terminated the aerobic step after three consecutive OUR values under the specific OUR setpoint (2 mgO 2 .(g MLVSS ·h) À1 ). To test the effect of an extended aerobic step on granule formation, the OUR control was altered during P3. The dynamic control terminated the aerobic step after nine consecutive OUR values under the specific OUR setpoint.
The aerobic step took approximately 3.2 h during P2 and P4, whereas the aerobic step lasted on average 6.048 + 1.194 h during P3 (Table 2). This aerobic control strategy was previously applied successfully with aerobic granular sludge Stes et al. 2018) and floccular sludge (Escobar et al. 1997;Dries 2016).

Physical, chemical and microbial sludge characteristics
The evolution of the sludge characteristics was investigated using microscopy, and by measuring the sludge concentration (MLSS and MLVSS), the settling properties (SVI5 and SVI30), the particle size distribution (DV10, DV50, and DV90), and the ALE content in %MLVSS, and by performing DNA sequencing.
The seed sludge changed little during the first three periods of the study and remained hybrid, consisting of flocs and granules ( Figure 3). In the last period, P4, the hybrid sludge changed. The floccular sludge disappeared, and the sludge became fully granular. Little change in the sludge settling properties and particle size distribution was observed during the first three periods of the study (Figure 4). The dynamic control (P2 and P3) and extended aerobic step (P3) had little visible impact on the settling properties and particle size distribution. A decrease in the MLSS and MLVSS was observed between P1 and P2 compared to P3. The MLVSS in P1 and P2 was higher than P3 with an average MLVSS of respectively 9.690 + 1.468 g·L À1 , 10.078 + 1.493 g·L À1 in P1 and P2 compared to 7.078 + 1.385 g·L À1 in P3. This decrease resulted from the lower OLR (0.74 + 0.19 kg.(m 3 .d) À1 ) in P3 due to the extension of the aerobic duration compared to P1 and P2 (respectively 0.92 + 0.21 h and 1.41 + 0.39 h) and the constant sludge retention time of 30 days.
During P1-P3, the SVI5, SVI30, and the average particle size distribution remained stable. In P4, the SVI5 and SVI30 decreased, and the average particle size distribution increased as a fully granular sludge was formed. The ALE content showed a similar evolution. It remained stable from P1 to P3 and increased in P4 (Figure 4). The SVI5, SVI30, and the ALE content stabilized around day 571 at respectively 46.6 + 6.77 ml·g À1 , 36.5 + 6.89 ml·g À1 , and 26.50 + 3.57%. The DV10, DV50, and DV90 all increased steadily in P4, after which the values flattened at respectively 218 + 32 μm, 650 + 89 μm, and 1,905 + 209 μm.
DNA sequencing revealed the abundance of Zoogloea, Sphingomonadaceae, Flavobacteriaceae, Rhodobacteraceae, and Chitinophagaceae in P1 and P2. P3 was dominated by yet unclassified species labeled midas_g_225, midas_g_1936, and midas_g_3374 by the ampvis package (Andersen et al. 2018). None of these species were found in P4, while the average abundance of Ca. Competibacter increased from around 1.18% during P1, P2, and P3 to 14.3% in P4. A strong correlation between the abundance of Ca. Competibacter and the ALE content was observed (Figure 4).
Permutational multivariate analysis of variance (ADONIS) was used to determine if bacterial community composition between the periods was statistically different (P ¼ 0.004 , 0.05). The assumption of homogeneity of multivariate dispersion was taken into account using ANOVA (P ¼ 0.32 . 0.05). The NMDS analysis confirms the clear difference in the microbial community between the different periods under dynamic control. Due to the elongated aerobic step in P3, the microbial community changed significantly between P2 and P3, clustered left on Axis 1 and more concentrated on Axis 2 ( Figure 5). In P4, with a shorter length of the aerobic step and pre-treatment of the influent, the microbial community shifted to the right on the Axis 1, past the P2 community. The anaerobic pH profile of the brewery/bottling wastewater-fed AGS SBR shows many similarities to the acetate-fed AGS SBRs. The pH increase in phase 1 can be related to the uptake of volatile fatty acids (VFA) (Figure 1). The pH has a strong tendency to increase during the anaerobic uptake of acetate by GAO, followed by a pH decrease coinciding with the depletion of the available VFA (Filipe et al. 2001;De Vleeschauwer et al. 2020). The pH and DOC keep on decreasing during phase 2. This could indicate that in phase 2, more complex organic compounds present in brewery wastewater, such as amino acids, proteins, and reduced sugars (Thiel & Toit 1965), are removed from the bulk liquid. Two processes Water Science & Technology Vol 84 No 12,3523 possibly impact the pH profile during phase 2. First, the complex compounds are fermented to organic acids or alcohols. This process produces CO 2 . The CO 2 is released into the bulk liquid and reduces the pH. The organic acids and alcohols do not impact the pH because they are formed inside or on the sludge and are taken up by the microorganisms (de Kreuk et al. 2010). Secondly, when sugars like glucose, fructose, sucrose, trehalose, and raffinose are taken up anaerobically, they are converted to glycogen and PHA (Liu et al. 1996). These sugars are converted to acetyl-CoA by GAOs, and during this process, CO 2 is produced (Filipe et al. 2001) and released into the bulk liquid, which reduces the pH. Finally, in phase 3 the anaerobic DOC uptake and CO 2 production stops, and the pH profile flattens out (Figure 1). Most likely, the ATP and NAD(P)H generated from the glycolysis of glucose are used for the synthesis of PHA from glycolysis products. To keep the energy balance inside a cell, the excessive ATP generated from glycolysis is further used for the synthesis of glycogen from glucose. Here, glucose may function as an external energy source.
The pH profile was not affected by denitrification. No nitrate or nitrite was produced, because the influent had a nitrogen deficiency and ammonia was added to obtain a COD/N ratio of 100/3.5.
The dynamic control of the acetate-fed AGS SBR, described by De Vleeschauwer et al. (2020), was more straightforward than the brewery-fed AGS SBR. It was programmed to end the anaerobic step when a switch from a positive to a negative pH slope occurred coinciding with acetate depletion. When feeding industrial wastewater, this simple control needed to be modified. The dynamic control in the current study was programmed to detect when the negative pH slope surpassed a defined cutoff point at the end of phase 2 (Figure 1).
In general, the pH slope profile remained stable throughout the study. The pH slope in phase 2 was always smaller (more negative) than in phase 3 ( Figure 1). Yet, the value of the pH slope in phase 3 did change over time. As influent batches, influent pH and reactor buffer capacity varied, so did the pH slope. It is important to note that these changes occurred gradually from one cycle to another and not during one cycle. They could always be linked to new influent batches. This evolution forms a possible limitation of the dynamic control and was avoided by adjusting the value CV 3 . For example, when the pH slope in phase 3 increased, over a period of two or three cycles, from about À1.2 to À2.5, the CV 3 value was manually changed from À1.0 to À2.2. This kept the dynamic control accurate independent of the pH slope values. The anaerobic control system elongated or shortened the anaerobic step depending on the influent COD concentration. In an acetate-fed AGS SBR, the relationship between the influent COD and the anaerobic time is linear. Yet this linear relationship could not be observed in the AGS treating brewery/bottling wastewater. Due to the varying nature of the brewery/ bottling wastewater (Thiel & Toit 1965), over a period of 637 days, the anaerobic uptake rate varied between 13 and 109 mg COD .(g MLVSS ·h) À1 . This resulted in a non-linear relationship between the anaerobic time and the influent COD. Nonetheless, the anaerobic control always ensured a complete anaerobic DOC uptake and a minimal aerobic DOC leakage.

Granulation
The sludge remained hybrid during P1-P3, consisting of both flocs and granules. The dynamic control and elongation of the aerobic step had no effect on the granulation. Corsino et al. (2017) reported a positive effect on aerobic granulation and stability by extending the famine or aerobic step. The author postulates that an extended famine period enhances EPS production and favors bacteria capable of storing energy compounds. These findings were not observed in this study. A possible explanation may be found in the granulation selection criteria. Corsino et al. (2017) used a column-type reactor (100 cm height) with volume exchange rates between 25% and 75%, making the sludge settling selection pressure a major selection criterion for aerobic granulation. In this study, the volume exchange rate was only 9%. The sludge settling selection pressure was 0.13 m/h during the whole study making the selection of slow-growing carbon-storing microorganisms the main selection criterion for AGS formation (de Kreuk & van Loosdrecht 2004;Stes et al. 2019;Dobbeleers et al. 2020).
During P4, a major evolution in the sludge characteristics was observed. The hybrid floccular-granular sludge evolved into fully granular sludge. The only difference between P2, with hybrid sludge, and P4 with fully granulated sludge, is the influent pre-treatment applied in P4. The influent suspended solids were removed in P4 by coagulation with Fe 3þ . The suspended solids comprised about 7% of the total COD of the untreated influent. By treating the influent, suspended solids were reduced to less than 1% (Table 1). The dynamic control during the two periods was operated identically. Also, the sludge settling selection pressure was 0.13 m/h in both periods. This logic would indicate that the selection pressure of slow-growing microorganisms was higher during P4 than P2. Since the anaerobic DOC uptake efficiency was above 90% in both periods, these results suggest that the influent suspended solids were the carbon source for the floccular sludge during P1, P2, and P3. The DOC only represents the dissolved organic compounds. AGS SBR systems fed with complex wastewaters containing 'non diffusible organic matter', such as suspended solids, can lead to the formation of floccular sludge (Layer et al. 2019). By removing the 'non diffusible organic matter' from the influent by chemical pre-treatment, the floccular sludge loses its carbon source and is out selected by slow-growing DOC storing microorganisms resulting in a fully granulated sludge. Sequencing data support this theory as Sphingomonadaceae, and Chitinophagaceae, found in P2, are commonly enriched in floccular sludge (Chen et al. 2019). The granules observed in the hybrid sludge during these periods did not consist of Competibacter but most probably Rhodobacteraceae, Zoogloea, and Flavobacteriaceae as they are frequently detected in granules (Weissbrodt et al. 2013;Layer et al. 2019). After removing the 'non diffusible organic matter' from the influent in P4, the abundance of Competibacter increased to become the dominant species. At the same time, the sludge ALE-content also significantly increased (Figure 4). The production of ALE can be selectively induced by operating an SBR in an anaerobic/ aerobic fashion, hereby 'targeting' a Competibacter enriched microbial population (Seviour et al. 2011). Furthermore, Competibacter plays an important role in AGS formations. It has been identified as a GAO and has been found in AGS (de Kreuk & van Loosdrecht 2004;Weissbrodt et al. 2013;Muszynśki & Miłobedzka 2015).

CONCLUSION
The pH-based anaerobic and OUR-based aerobic control were successfully applied in an AGS reactor treating brewery wastewater. The system proved robust and stable even with a widely varying brewery influent with COD concentrations ranging between 2,544 and 7,360 mg·L À1 . The sludge remained hybrid, a mixture of floccular and granular sludge. Full granulation of the sludge was only achieved after removing the influent suspended solids by chemical coagulation.
The anaerobic and aerobic dynamic control of the AGS SBR increased the reactor system's efficiency. The OLR increased from 0.92 kg.(m 3 .d) À1 to 1.41 kg.(m 3 .d) À1 . The anaerobic DOC uptake remained above 90%. The dynamic control did not negatively impact the effluent COD quality. The effluent COD remained stable at around 70 mg·L À1 . This technology could lead to improved industrial applications of AGS SBR systems.