A Comparison of Biosolids Production and System Efﬁciency between Activated Sludge, Moving Bed Bioﬁlm Reactor, and Sequencing Batch Moving Bed Bioﬁlm Reactor in the Dairy Wastewater Treatment

: Dairy industry wastewater is rich in organic content, presenting a high biodegradability, and therefore biological treatments are widely employed. This study aimed to evaluate biosolids production in three systems: activated sludge (AS), movingbed bioﬁlm reactor (MBBR), and sequenc-ingbatch movingbed bioﬁlm reactor (SBMBBR). Simulated dairy wastewater was used at different organic load rates (OLRs): 1.22, 2.87, and 5.44 g COD L − 1 d − 1 . Besides biosolids production, COD, total carbon (TC), and total nitrogen (TN) removal efﬁciency was evaluated. Biosolids production was measured in the mixed liquor, carrier-adhered biomass, treated wastewater, and surplus sludge. The operational conditions were kept similar for the three systems, with a carrier ﬁlling ratio of 50% for MBBR and SBMBBR. The SBMBBR proved to have better performance in the removal efﬁciencies of COD, TC, and TN for all OLRs studied. The MBBR presented a similar COD and TC removal efﬁciency as the SBBR for the two highest OLRs (2.87 and 5.44 g COD L − 1 d − 1 ). Concerning biosolids production, the MBBR system produced less biomass and delivered the lowest amount of adhered biomass inside the carriers. The AS treatment generated the highest amount of sludge and offered the worst treatment capability for all OLRs evaluated. operated in 12 h cycles, for static ﬁlling,


Introduction
The European Union (EU) is the largest dairy exporter in the world, and milk demand should increase in the following years due to the anticipated valorization of fat milk. It is expected that EU milk production will reach around 162 million tons by 2031 [1]. EU milk production will need to comply with stringent environmental standards, which implies reducing pollutant emissions into the water environment. However, to reduce emissions, the dairy sector will have to resort to the most cost-efficient and reliable technologies. In this regard, comparing the production of biosolids (which are associated with increased operating costs) and the efficiency of treatment between conventional and alternative technologies can significantly define the best available option among biological treatments to provide the sustainable development of the dairy sector. environmental conditions [19]. The treatment system does not require any sludge recycling, and only the surplus biomass should be separated, which constitutes a considerable advantage over the AS and SBR systems [21,27]. However, due to aeration and oxygen requirements of the carrier mixing, ensuring that formation of stagnant zones within the reactors does not occur is the main setback of this system. Under complete aerobic conditions, MBBR systems can be used for carbon oxidation, combined carbon oxidation and nitrification, or separate stage nitrification [21,23,28]. MBBR optimal performance should be based on pH, feed concentration, filling ratio (less than 70%), high HRT, optimum airflow rate, high surface area of carrier materials, microorganisms' metabolic characteristics, and biofilm-forming potential. Nevertheless, the MBBR remains a valuable technology for wastewater treatment, reaching an efficiency above 98% for BOD and COD removal [29].
Another technology applied to treat wastewaters is the sequencing batch moving bed biofilm reactor (SBMBBR). This is a flexible and straightforward operation that merges the SBR and MBBR technologies. The combination benefits decentralized treatment as it decreases sludge production and increases the amount of effective biomass, even for lowersedimentation sludges [30]. It is often preferable to increase treatment time, reducing the number of cycles per day, as it allows for better nitrogen removal efficiency and increases efficiency in the presence of high organic loads [31].
Activated sludge has been reported as an efficient and reliable system for COD removal [4]. Carta-Escobar et al. [32] obtained COD removal efficiencies between 72.1 and 81.0% and between 44.4 and 66.2% for organic load rates of 0.237 and 0.700 kg m −3 d −1 , respectively. Since 1992, the MBBR has been studied for dairy wastewater treatment with results varying from 60 to 95% COD removal efficiency, mainly depending on OLR and HRT [33][34][35]. Total nitrogen removal has been overlooked for this type of system when working with dairy wastewater. Still, the denitrification efficiency caused by the biomass in the carriers is widely known, especially for polyethylene carriers [36,37]. SBR-type systems have been reported to be effective in treating dairy wastewater. COD, TN, TC, and phosphorous have successfully reached high removal efficiencies [38][39][40]. Thus, combining a conventional MBBR with a conventional SBR should provide higher removal capability and improve stability.
A similar study to the one presented by the authors has been performed by Khalaf et al. [41] who compared the performance of activated sludge and sequence-batch reactor systems for dairy wastewater treatment. The authors achieved high COD and NH 3 -N removal for an optimum temperature of 35 • C for all the four studied reactors. AS obtained 93.56% and 89.01% for COD and NH 3 -N removal, while a biofilm SBR achieved 97.79% and 93.22%, respectively. However, the authors overlooked sludge production and total nitrogen and carbon removal.
The present study was carried out to evaluate the potential that the MBBR and SBMBBR systems have to replace AS in the treatment of dairy wastewater. The evaluation was based on the total sludge production and the removal efficiency of chemical oxygen demand (COD), soluble total carbon (TC), and soluble total nitrogen (TN) of each system.

Materials
For this study, three laboratory-scale reactors made of Plexiglass with 3.5 L of working volume operated under the same conditions to appraise the performance in terms of carbon, nitrogen, and organic matter removal efficiency. The effluent used simulated dairy wastewater comprising dilutions of 1:80, 1:100, and 1:200, from low-fat milk. The initial biological sludge was obtained from a conventional AS domestic wastewater treatment station. The MBBR and SBMBBR were seeded with pre-inoculated carriers from the wastewater treatment plant of Arzila, Coimbra. The carriers used were the "Bioflow 9" made from high-density polyethylene with 9 mm diameter, 7 mm height, 800 m 2 m −3 specific surface, specific biofilm surface area of 500 m 2 m −3 , and 145 kg m −3 of packing density. The filling fraction (FF) of carriers was set to be roughly 50% of the reactor working volume of MBBR and SBMBBR, setting up the carrier-specific surface area to 0.39 m 2 and 0.49 dm 3 effective carrier volume. The aeration of the reactors was made with a bubbling aerator, ensuring that the oxygen was oversupplied. Thus, dissolved oxygen was not a limiting factor in the reaction.

Experimental Setup
The three reactors were operated under similar conditions in three different configurations: AS, MBBR, and SBMBBR. They were inoculated with the same sludge volume (1.6 L) and tap water volume (2 L). A period of acclimatization for microorganisms' adaptation lasted roughly two weeks, feeding 5 mL of milk every day, allowing the microbial communities to adapt to their new environment and acclimate to the synthetic dairy influent. The AS liquor sludge had an equivalent acclimatization period.
The experimental work was divided into three periods, with the influent loading rates presented in Table 1. The feed COD:N relation was between 10.0 and 12.8 for each stage, with effluent flow rate established at 7.2 L d −1 for each reactor, corresponding to a hydraulic retention time of 12 h. Initial suspended sludge concentration (MLSS) inside the reactor was 1015, 283, and 423 mg TSS L −1 for AS, MBBR, and SBMMBR, respectively. Table 1. Influent loading rates, BOD, and operation time frame for each OLR. Both AS and MBBR reactors had a sedimentation unit with a liquid volume estimated at 3 L. For SBMBBR, it is not necessary to have a settling tank since sedimentation occurs inside the reactor. The SBMBBR operated in 12 h cycles, 0.5 h for static filling, 8 h of aeration, 2.5 h of sedimentation, and 1 h of treated wastewater withdrawal. The MBBR and AS systems worked under an uninterrupted flow of oxygen. A schematic representation of the experimental work is presented in Figure 1. Sludge retention time (SRT) was dependent on the OLR. AS presented 6, 5, and 2 days, MBBR presented 1, 0.5, and 0.5 days, and SBMBBR presented 10, 0.5, and 1.5 days for OLR of 1.22, 2.87, and 5.44 g COD L −1 d −1 , respectively.

Analytical Methods
Influent, effluent, and mixed-liquor samples were analyzed with respect to total chemical oxygen demand, soluble carbon and nitrogen, and suspended solids (SS). The solids adhered in the carriers were measured according to the methodology described by Oliveira [42]. Ten (10) carriers from the reactor were randomly removed, well mixed, and shaken by ultrasounds and manual removal in a volume of 250 mL of distilled water. The process was repeated to ensure the release/detach of the adhered solids. Carriers would be replaced in the same amount from a reactor kept operating under similar conditions.

Analytical Methods
Influent, effluent, and mixed-liquor samples were analyzed with respect to total chemical oxygen demand, soluble carbon and nitrogen, and suspended solids (SS). The solids adhered in the carriers were measured according to the methodology described by Oliveira [42]. Ten (10) carriers from the reactor were randomly removed, well mixed, and shaken by ultrasounds and manual removal in a volume of 250 mL of distilled water. The process was repeated to ensure the release/detach of the adhered solids. Carriers would be replaced in the same amount from a reactor kept operating under similar conditions. All the samples were placed in closed recipients and stored at about 4 • C when their immediate analysis was not possible.
Chemical oxygen demand (COD) was determined by the 5220 D method (closed reflux), whereas the total suspended solids (TSS) and volatile suspended solids (VSS) for mixed-liquor suspended solids (MLSS), treated wastewater, and excess sludge were analyzed using the 2540 B, D, and E methods [43]. Dissolved total carbon (TC) present in the water was measured by a nondispersive infrared detector (NDIR) after oxidative combustion, using Shimadzu TOC-VCPH/CPN Total Organic Carbon Analyzer and TOC-Control V software. Dissolved total nitrogen (TN) was measured by chemiluminescence, using Shimadzu Total N Measuring Unit TNM-1. BOD was measured with self-check OxiTop ® -IDS Set 6.
The total amount of TSS and VSS comprised in the carriers was calculated based on the total number of plastic carriers in the bioreactors. The total sludge produced (Equation (1)) for each reactor was calculated by the sum of the masses of MLSS produced after each measurement, the excess sludge removed from the reactors to perform the characterization analysis and to maintain a regular operation, and the TSS present in the treated wastewater.

Organic Matter, Total Carbon, and Total Nitrogen Removal
A comparison of the removal efficiencies of TC, TN, and COD was performed for AS, MBBR, and SBMBBR regarding the influence of the system design on biosolids production and removal performance to understand how different loading rates would affect the reactors' individual efficiency. In Figure 2, the average removal efficiencies for soluble COD, TC, and TN are presented with their associated standard deviation. The SBMBBR stands out as the most efficient for the tested parameters of the three studied systems at an OLR of 1.22 mg COD L −1 d −1 .  Denitrification in an activated sludge process plays a major role in TN removal. The denitrification process is primarily carried out by heterotrophic bacteria, although autotrophic denitrifiers are also identified [20]. In an anoxic environment, the nitrate ion can be reduced by organic matter to nitrogen gas. Thus, the denitrification capacity is the amount of nitrate that can be removed per liter of influent. In a biologic reactor that is kept entirely aerobic, the denitrification will occur in the final settler, where an adequate environment for denitrification is established as soon as the oxygen is consumed [24]. The SBMBBR system has a higher concentration of bacteria in suspension than the MBBR, which might improve the TN treatment capability.
Moreover, SBMBBR aeration allows for nitrification, and the subsequent anoxic Denitrification in an activated sludge process plays a major role in TN removal. The denitrification process is primarily carried out by heterotrophic bacteria, although autotrophic denitrifiers are also identified [20]. In an anoxic environment, the nitrate ion can be reduced by organic matter to nitrogen gas. Thus, the denitrification capacity is the amount of nitrate that can be removed per liter of influent. In a biologic reactor that is Sustainability 2022, 14, 2702 6 of 14 kept entirely aerobic, the denitrification will occur in the final settler, where an adequate environment for denitrification is established as soon as the oxygen is consumed [24]. The SBMBBR system has a higher concentration of bacteria in suspension than the MBBR, which might improve the TN treatment capability.
Moreover, SBMBBR aeration allows for nitrification, and the subsequent anoxic environment promotes denitrification. Since the SBMBBR had 6 h of the anoxic phase each day and higher microorganism growth, it might greatly influence TN removal. The anoxic phase is associated with greater TN removal, which increases further with MLSS growth [44,45]. Furthermore, biofilm-based systems can enhance nitrogen removal efficiency [46], with the SBMBBR combining the anoxic phase with the biofilm formed in the carriers. Therefore, another possible explanation for the SBMBBR's high efficiency for TN removal at different organic loads might depend on the increased amount of biomass based upon attached growth in the carriers. The biofilm accumulation highly depends on the carrier's surface roughness and more importantly on the specific surface area which is usually attributed to high organic removal [20].
Adding carriers as an attached growth medium improves nitrifying bacteria retention, which could also provide a longer sludge retention time [44,47]. This factor enables higher microbial resistance to environmental conditions and enhances the degradation of organic matter [18]. As for the MBBR, the nitrogen removal efficiency of the MBBR depends primarily on attached-growth biomass [44], with the attached biomass becoming more specific due to the lack of biomass recirculation [25]. The conventional AS system also increases TN removal efficiency for higher OLRs. However, it is less effective when compared with the other two systems. The same occurs with COD and TC for which AS showed lower average efficiency. The anoxic phase increases COD removal on an SBR reactor type. Kulikowska et al. [48] stated that higher COD removal efficiency was achieved in the SBR working with anoxic phases. Bazari [49] studied the influence of aeration time and MLSS concentration on COD removal in a conventional SBR. From this study, two major conclusions can be drawn for dairy effluents: aeration time is optimal after 5 h with a concentration between 1000 and 2500 mg O2 L −1 and that MLSS impacts treated wastewater COD, with higher concentrations between 6000 and 9000 mg L −1 improving COD removal, especially for lower times of aeration. In the present study, COD feed concentrations were similar, with MLSS present in the SBR being always lower than 6000 mg L −1 , which was compensated by the 8 h aeration time, thus improving COD removal for lower MLSS. With increasing COD feed load, TN removal also increases for MBBR and AS systems, with SBMBBR efficiency being higher even for low organic loads. This fact indicates that organic load between 1.22 and 5.44 is a crucial aspect in TN removal for the MBBR and AS but not for the SBMBBR that presents a good TN removal capability, independently of the OLR. In Table 2, the average removal efficiencies for total COD, TC, and TN with the associated standard deviations are presented. SBBR stands out as the most efficient for the tested parameters of the three studied systems at an OLR of 1.22 mg COD L −1 d −1 .
The analysis of the results presented in Figure 2 shows that all the proposed systems allow compliance with the discharge value for the organic matter (measured as COD) in industrial wastewater emission defined in Portuguese legislation (Decree-Law 236/98 of August 1) [50], which is 150 mg COD L −1 , except for AS with an OLR of 5.44 g COD L −1 d −1 . Santos et al. [19] used dairy wastewater with COD concentrations of 600-800 mg O2 L −1 and 1100-1200 mg O2 /L −1 , in batch and continuous operation, to remove COD using an MBBR. For a carrier filling fraction of 40%, the authors achieved higher COD reductions than for 20% [27]. These results suggest that the biofilm formed in the carriers effectively improves COD removal. In terms of total nitrogen, only the MBBR for OLR of 1.22 and SBMBBR for OLR of 1.22 and 2.87 g COD L −1 d −1 guarantee compliance with the limit value defined in the same legal diploma, which, for total nitrogen, is 15 mg N L −1 . As stated before, the SBMBBR had high removal efficiencies due to the anoxic phase being promoted inside the reactor. Such high TN removal indicates that the carbon was sufficient for denitrification to occur [44]. Tsitouras et al. [30] studied two SBMMBR reactors in sequence, applied to cheese production wastewater, under different aeration conditions, for 16 h cycles, with K5 carriers. Particular interest for this study points to the one operating under aerobic and anoxic conditions, which achieved 97.3% COD and 58.8% TN removal efficiency. Even though COD removal was similar, TN removal efficiency was lower than the one achieved for the present study.
From Figure 2, one can perceive that for an OLR of 1.22 g COD L −1 d −1 , the SBMBBR had the best average COD, TC, and TN removal. However, when the OLR increases to 2.87 and 5.44 g COD L −1 d −1 , the MBBR and SBMBBR are very similar in performance regarding COD and TC parameters. TN was best removed in the SBMBBR at 2.87 g COD L −1 d −1 , but similar to MBBR at 5.44 g COD L −1 d −1 . Furthermore, it is interesting to notice that the AS system's standard deviation is high compared to the other two, especially for 1.22 g COD L −1 d −1 . The introduction of carriers seems to help stabilize the overall efficiency and removal rates of TN, TC, and COD. However, it is expected that for higher OLRs, MBBR process efficiency is adversely affected. The former is attributed to the increase of suspended biomass, in which case, it functions as a hybrid biofilm-activated sludge process than a pure biofilm reactor [26]. In fact, the settling phase in a sequencing-batch reactor is often regarded as more efficient in obtaining a higher quality supernatant than a continuous flow process [31].
These results permit us to conclude that the two alternative methods to the conventional AS system allow removal rates of organic matter and nitrogen that are similar or superior to the activated sludge system. Kalaf et al. [41] compared alternative biofilm reactors with conventional AS and SBR when treating dairy wastewater. Their findings led them to acknowledge that the introduction of carriers could increase the removal efficiencies and reduce the acclimatization period of the system. Furthermore, the biofilm systems performed better in terms of COD and NH 3 -N removal than the conventional reactors. The authors summarized that the SBR was the optimum treatment for dairy wastewater. Even though this is also true for the present research, with the SBR performing better in terms of TN, COD, and TC, the authors overlooked the biomass formation of the different systems.

Mixed-Liquor Suspended Solids
MLSS monitorization is an integral part of the AS system as sludge management is key to optimizing operational conditions of the process, impacting energy consumption, performance, and sludge disposal costs in a wastewater treatment facility [51]. In this regard, the MBBR strongly reduces sludge production. It reduced up to 88.9% TSS than AS and 72.8% less than the SBMBBR. For a better understanding and evaluation, a comparison of TSS and VSS values between the MLSS of the three reactors is presented in Table 3. One can perceive that AS is the system that produces a higher quantity of sludge, while the MBBR system highly reduces sludge production. The SBMBBR offers higher treatment as well as reduced sludge production when compared with the conventional activated sludge process. The MBBR has the lowest concentration of suspended solids (SS) and, despite having removal efficiencies higher than AS, it is behind the SBMBBR for OLRs of 1.22 and 2.87 g COD L −1 d −1 . Despite having a higher concentration of SS, the AS system had the worst treatment efficiencies regarding all the studied parameters, which stresses the carrier's role in biodegradation and denitrification.  Figure 3 shows the average suspended MLSS concentration inside the three reactors, and we can observe that with an increasing OLR, the reactional content also increases in SS concentration. Bassin et al. [52] observed that when the organic load is too high, the carriers get clogged, increasing the biomass in suspension. This analysis can explain, at least partially, the results observed in terms of the increase in the concentration of suspended biomass for the highest value of the OLR in the SBMBBR system.

Carrier Biomass Assessment
The amount of attached solids per surface is crucial when discussing moving-bed wastewater treatment plants [53]. The mass attached to the carrier depends on the wastewater composition, operating conditions, and the organic loading rates [52,54]. A biofilm consists of cells aggregated and embedded within a matrix of EPS (extracellular polymeric substances). EPS are crucial for providing stability and adherence of the biofilm to carriers in the MBBR [29]. Bacteria growing in biofilm cells own increased stability when compared to freely suspended cells, concerning variations in the influent composition and abrupt changes in load, temperature, and toxicity. Therefore, biofilm increases the potential for removing pollutants, mainly due to the wide variety of microbial functional groups present in these environments [26]. For this reason, biofilms should be more resilient to mechanical instability and organic loads variations and be able to reduce hydraulic retention time. Additionally, the installation and operation costs are reduced due to the lower volume of sludge produced. The former means that the bacteria adhering to the carriers effectively degrade the organic compounds, even at low concentrations of suspended solids. This way, the higher biofilm activity obtained should

Carrier Biomass Assessment
The amount of attached solids per surface is crucial when discussing moving-bed wastewater treatment plants [53]. The mass attached to the carrier depends on the wastewater composition, operating conditions, and the organic loading rates [52,54]. A biofilm consists of cells aggregated and embedded within a matrix of EPS (extracellular polymeric substances). EPS are crucial for providing stability and adherence of the biofilm to carriers in the MBBR [29]. Bacteria growing in biofilm cells own increased stability when compared to freely suspended cells, concerning variations in the influent composition and abrupt changes in load, temperature, and toxicity. Therefore, biofilm increases the potential for removing pollutants, mainly due to the wide variety of microbial functional groups present in these environments [26]. For this reason, biofilms should be more resilient to mechanical instability and organic loads variations and be able to reduce hydraulic retention time.
Additionally, the installation and operation costs are reduced due to the lower volume of sludge produced. The former means that the bacteria adhering to the carriers effectively degrade the organic compounds, even at low concentrations of suspended solids. This way, the higher biofilm activity obtained should increase compounds' biodegradation and the system's overall efficiency while decreasing treatment costs. In fact, the development of anoxic zones in the biofilm suits the moving-bed carriers, as it promotes the growth of anaerobic organisms capable of nutrient removal [55]. The TSS and VSS carriers' mass for the MBBR and SBMBBR is presented in Figure 4.
biofilm consists of cells aggregated and embedded within a matrix of EPS (extracellular polymeric substances). EPS are crucial for providing stability and adherence of the biofilm to carriers in the MBBR [29]. Bacteria growing in biofilm cells own increased stability when compared to freely suspended cells, concerning variations in the influent composition and abrupt changes in load, temperature, and toxicity. Therefore, biofilm increases the potential for removing pollutants, mainly due to the wide variety of microbial functional groups present in these environments [26]. For this reason, biofilms should be more resilient to mechanical instability and organic loads variations and be able to reduce hydraulic retention time. Additionally, the installation and operation costs are reduced due to the lower volume of sludge produced. The former means that the bacteria adhering to the carriers effectively degrade the organic compounds, even at low concentrations of suspended solids. This way, the higher biofilm activity obtained should increase compounds' biodegradation and the system's overall efficiency while decreasing treatment costs. In fact, the development of anoxic zones in the biofilm suits the movingbed carriers, as it promotes the growth of anaerobic organisms capable of nutrient removal [55]. The TSS and VSS carriers' mass for the MBBR and SBMBBR is presented in Figure 4. Visibly, SBMBBR carriers contained higher adhered biomass. It is relevant to note that higher organic load allowed for increased biomass growth in the SBMBBR carriers. For the MBBR, both TSS and VSS mass were similar for all three OLR values. Aygun et al. [56] used K1 biofilm carriers, with an HRT of 8 h with 6 to 96 g COD m −2 d −1 (in the present paper, it was 2.4 and 10.9 minimum and maximum, respectively). The authors achieved higher amounts of attached biomass for higher organic loading rates. However, the attached biomass was relatively similar for low organic loads, between 6 and 12 g COD m −2 d −1 , and only significantly increased when the loading rate was higher than 12. Therefore, this study is in accordance with the previous research, with the MBBR presenting similarly attached biomass in the carriers. The fact that the SBMBBR shows higher MLSS mass (seen in Figure 3), due to retaining most of the SS, might be the key factor for the increased biofilm development. Fonseca and Bassin [53] suggested that different methods for attached solids determination could lead to different results. One disadvantage of the presented approach is the difficulty of ensuring that the rinse water removes all the adhered biomass. This might lead to higher standard deviations, especially when the biomass strongly adheres to the carrier surface. Another possible explanation is that the biofilm thickness is maintained through shear forces and turbulence during homogeneous mixing [29], which in the SBMBBR was interrupted during the feeding, settling, and extraction phases, providing a time frame for the biofilm thickness to increase. The ratio of VSS/TSS was found to be between 81% and 90% and 87% and 92% in the carriers for the MBBR and SBMBBR, respectively.
Greater stability of the process is ensured in the SBMBBR due to partial immobilization of the bacteria, which in return may also lead to a higher concentration of biomass within the reactor [26]. Consequently, SBMBBR and MBBR TN removal rates correlate with the biofilm growing in the carriers. A thicker biofilm might increase the anoxic reaction and further explain the higher TN removal in the SBMBBR. However, the combination of extra adhered biomass with a higher concentration of suspended biomass does not necessarily translate as the best option to increase treatment efficiency. The reason depends on the TC and COD removal being similar for 2.87 and 5.44 g COD L −1 d −1 . Figure 5 shows a graphic representation of the TSS produced during the 42 days of operation. "MLSS" corresponds to the mass of TSS present in the reactional volume. "Excess" is the mass of sludge retrieved from the reactor for sampling and to maintain regular operation. "Treated" corresponds to the mass of TSS in the treated wastewater.
of VSS/TSS was found to be between 81% and 90% and 87% and 92% in the carriers for the MBBR and SBMBBR, respectively.
Greater stability of the process is ensured in the SBMBBR due to partial immobilization of the bacteria, which in return may also lead to a higher concentration of biomass within the reactor [26]. Consequently, SBMBBR and MBBR TN removal rates correlate with the biofilm growing in the carriers. A thicker biofilm might increase the anoxic reaction and further explain the higher TN removal in the SBMBBR. However, the combination of extra adhered biomass with a higher concentration of suspended biomass does not necessarily translate as the best option to increase treatment efficiency. The reason depends on the TC and COD removal being similar for 2.87 and 5.44 gCOD L −1 d −1 . Figure 5 shows a graphic representation of the TSS produced during the 42 days of operation. "MLSS" corresponds to the mass of TSS present in the reactional volume. "Excess" is the mass of sludge retrieved from the reactor for sampling and to maintain regular operation. "Treated" corresponds to the mass of TSS in the treated wastewater. Figure 5. Sum of total suspended solids mass (g) during periods A, B, and C for the three reactors. Figure 5. Sum of total suspended solids mass (g) during periods A, B, and C for the three reactors.
From these results, it is possible to observe that the AS system produces a greater amount of suspended solids, as it sums up to 55.8 g of TSS. On the other hand, the MBBR produced 23.7 g having the lowest amount of biomass, while the SBMBBR placed in between AS and MBRR produced a total of 37.2 g of TSS. The higher sludge amount in AS can be associated with sludge recirculation. Since the MBBR and SBMBBR did not have this system in place, the suspended sludge accumulation was lower. It is also understandable that the settling tank after the MBBR system helped to keep sludge in the effluent lower. On the other hand, if the solids inside the SBMBBR system do not settle and compact properly, part of the solids can come out of the reactor during the decantation phase. As described by Rusten et al. [33], suspended sludge in the MBBR is highly dependent on the OLR, with suspended solids concentration varying from below 10 to above 500 g m −3 . Higher organic loads increased SS, but COD efficiency was highly affected, especially for HRT lower than 8 h. A volumetric organic load of 500 g COD m −3 h −1 and of 900 g COD m −3 h −1 reached 85% and 60% COD removal, respectively. Aygun et al. [55] observed a sludge production of 0.35 g TSS d −1 for about 2.85 g COD d −1 . In an SBR-type reactor, the sludge production is hindered by the anoxic phase, resulting in a biomass decay rate, when compared to fully aerated SBRs [48].
In overall terms, accounting periods A, B, and C, AS and SBMBBR produced 135% and 42.4% more sludge than the MBBR, respectively. The SBMBBR produced 64.9% less TSS than the AS system. The daily production of sludge is presented in Figure 6. Once again, the MBBR stands out, producing less sludge for higher OLRs. Higher sludge production, as expected, is achieved for higher OLRs.
the sludge production is hindered by the anoxic phase, resulting in a biomass decay rate, when compared to fully aerated SBRs [48].
In overall terms, accounting periods A, B, and C, AS and SBMBBR produced 135% and 42.4% more sludge than the MBBR, respectively. The SBMBBR produced 64.9% less TSS than the AS system. The daily production of sludge is presented in Figure 6. Once again, the MBBR stands out, producing less sludge for higher OLRs. Higher sludge production, as expected, is achieved for higher OLRs.

Conclusions
The three studied systems offered excellent treatment capabilities for a dairy industry effluent. In terms of COD, nitrogen, and carbon removal capabilities, the SBMBBR technology seems to have the best performance at lower OLRs. In fact, the SBMBBR reaches an average COD and TC removal efficiencies above 95% and higher than 85% for TN in the range of the studied OLR values. It allows for a consistent treatment capability for low and high organic loads. Even though the SBMBBR offers the best treatment capability and organic load resilience, it produces a significant amount of sludge compared to the MBBR, increasing global treatment costs.
This way, considering treatment performance in terms of the quantity of biomass present in the reactor, the MBBR brings benefits since it can deal with high loads without necessarily meaning increased biomass production. In addition, the MBBR system offers simplicity in the treatment process by removing the sludge recirculation line, lowering

Conclusions
The three studied systems offered excellent treatment capabilities for a dairy industry effluent. In terms of COD, nitrogen, and carbon removal capabilities, the SBMBBR technology seems to have the best performance at lower OLRs. In fact, the SBMBBR reaches an average COD and TC removal efficiencies above 95% and higher than 85% for TN in the range of the studied OLR values. It allows for a consistent treatment capability for low and high organic loads. Even though the SBMBBR offers the best treatment capability and organic load resilience, it produces a significant amount of sludge compared to the MBBR, increasing global treatment costs.
This way, considering treatment performance in terms of the quantity of biomass present in the reactor, the MBBR brings benefits since it can deal with high loads without necessarily meaning increased biomass production. In addition, the MBBR system offers simplicity in the treatment process by removing the sludge recirculation line, lowering maintenance requirements. Moreover, operating with a lower suspended biomass concentration grants the possibility of having smaller clarifiers, without compromising the treatment quality. These reasons constitute an opportunity to reduce investment and operational costs in the dairy industry's wastewater treatment.
The improvements are notorious when both MBBR and SBMBBR are compared with AS. The adhered biofilm's surface area seems to improve biodegradation, adsorbing a higher amount of substrates from the influent wastewater. These technologies not only increase the quality of the treated wastewater but also reduce operating costs, as they produce less sludge, especially in the MBBR configuration. Choosing a suitable and reliable system depends on the OLR and cost-efficiency relation due to sludge production.
Concerning COD, the proposed systems allowed compliance with the current Portuguese legislation of 150 mg COD L −1 , except for AS with an OLR of 5.44 g COD L −1 d −1 . Even though MBBR-treated-effluent TN for an OLR of 1.22 g COD L −1 d −1 is in conformity with the defined limit value of 15 mg N L −1 , the SBMBBR stands out because it guarantees compliance when considering the OLR of 1.22 and 2.87 g COD L −1 d −1 .
Therefore, the results of this study contribute to the optimization of wastewater treatment systems in the dairy industry, either by increasing efficiency or by reducing the costs of operation of the conventional activated sludge treatment. Future studies should include a detailed analysis of costs associated with each system to improve decision making further.