The removal of nutrients such as nitrogen and phosphorus from both domestic and industrial wastewaters is imperative since they potentially harm the environment. One of the main consequences of excessive availability of nitrogen and phosphorus in aquatic ecosystems (freshwater, marine and estuarine) is the overgrowth of algae and other aquatic plants, a phenomenon designated as eutrophication. Algae and aquatic plants induce depletion of oxygen in water basins, resulting in massive death of eukaryotic organisms in the ecosystem and a decrease in biodiversity. Human activities have increased the input of nutrients to aquatic resources beyond its natural capacity to assimilate them, resulting in acceleration of the eutrophication process. Nutrient removal from wastewaters by biological processes is cost effective and offers many advantages compared to physical-chemical processes. Essentially, biological nitrogen (nitrification and denitrification) and phosphorus removal involves a series of biochemical processes carried out in an appropriate sequence of aerobic, anoxic and anaerobic environments. In conventional activated sludge-based processes, these conditions are provided in separate tanks (multistage treatment processes), demanding large land areas for the wastewater treatment plant installation. The low biomass concentrations in the traditional activated sludge systems and especially the need for clarifiers for biosolid-liquid separation contribute to the large footprint of activated sludge-based sewage treatment plants. Generally, wastewater treatment systems are located in densely populated urban areas, where space is scarce. In this context, new compact technologies with a reduced footprint are required. Moreover, the increasing pollution in water resources as a consequence of enormous discharge of untreated sewage into receiving waters imposes the necessity for upgrading the wastewater treatment plants to meet stringent effluent regulations posed by environmental agencies. Most of the new technological developments in compact sewage treatment processes rely on biofilm- and granular-based systems with a high biomass retention capacity, resulting in higher volumetric treatment capacities and minimized space requirement. The research described in this thesis aimed at the investigation of several important aspects regarding biological nutrient removal in compact systems such as moving-bed biofilm reactors (MBBR), aerobic granular sludge reactors (AGS) and sequencing batch reactors with suspended biomass. Different issues related to organic matter, nitrogen and phosphorus removal were addressed in this work. The first aim of the research described in this thesis was to investigate how different operational conditions (e.g., influent composition and feeding regime) influence the development of nitrifying biofilms in moving bed biofilm reactors (MBBR). In this particular study, the nitrification process was also carefully evaluated. To fulfil the objectives, analytical methods and molecular techniques (such as fluorescent in situ hybridization) were combined to provide further insight into the enrichment of the biofilm for nitrifiers. In order to obtain better control of the different moving bed systems operated in parallel and to understand the effect of particular variables on biofilm development and nitrification process, a synthetic medium was used to feed all the MBBRs. Strategies to speed up the formation of enriched nitrifying biofilms and the feasibility of applying a sequentially operated moving bed reactor for the treatment of high-strength ammonium wastewater are described in this work, presented in Chapter 2. It was shown that the application of a heterotrophic start-up phase decreased the time required for the development of nitrifying biofilms in MBBRs. The findings of this research can potentially be used in industrial applications, most notably when nitrification should be accomplished in wastewaters with limited or no organic carbon. Inoculation of a MBBR operated on a pulse-feeding sequencing batch regime with biomass detached from other MBBR systems was also found to reduce the time necessary to develop an enriched nitrifying biofilm. Aerobic granular sludge (AGS) is a promising technology for wastewater treatment. Several studies have investigated the simultaneous nitrogen and phosphate removal in AGS systems. However, none of them specified the impact of specific subpopulations of polyphosphate-accumulating organisms (PAOs) on phosphate and nitrogen conversions. Recent research efforts exploring the characteristics of PAOs have shown new insights about these microorganisms, classifying them according to their capability of using nitrite and/or nitrate as electron acceptor for denitrification. Taking into account the new discoveries regarding these organisms, a complete characterization of the main process conversions occurring in aerobic granular sludge reactors applied for simultaneous organic matter, nitrogen and phosphorus removal and operated at different temperatures (20 and 30?C), was conducted. In this research project, described in Chapter 3, full nitrification/denitrification was achieved at low dissolved oxygen concentrations (less than 2 mgO2/L). A stratification of the microbial community structure over the settled sludge bed was noticed by means of fluorescent in situ hybridization (FISH). In the top of the sludge bed in both SBRs, glycogen-accumulating organisms (GAOs) clearly dominated over PAOs. Conversely, in the bottom of the sludge bed, PAOs were the dominant organisms. The segregation offered the possibility to control PAO-GAO competition to enhance the phosphate removal efficiency. A selective sludge discharge mainly from the GAO-rich top of the segregated reactor sludge bed as an operational strategy to favour PAOs over GAOs proved to enhance phosphate removal efficiency, particularly at tropical temperatures (30°C). The development of denitrifying polyphosphate-accumulating organisms (DPAOs) was found to be favoured at low dissolved oxygen concentrations. Hence, denitrification coupled to anoxic phosphate uptake was sustained in the aerobic granular sludge systems, which is advantageous since the same carbon source (usually intracellular polymers such as polyhydroxybutyrate) is used for both denitrification and anoxic phosphate removal. According to experimental results from this research, denitrification was proposed to run mainly via the nitrate route. Denitrifying glycogen-accumulating organisms (DGAOs) were the principal organisms responsible for reduction of nitrate to nitrite in both reactors. Nitrite was further reduced to nitrogen gas concomitant with anoxic phosphate uptake by PAO clade II (PAOII). A method to stimulate this conversion relative to the nitrate based nitrification-denitrification certainly would be interesting for the optimisation of aerobic granular sludge processes. During the investigation of the nitrifying bacterial diversity in a lab-scale aerobic granular sludge (AGS) reactor operated at 30°C (Chapter 4), a nitrite-oxidizing bacteria/ammonium-oxidizing bacteria (NOB/AOB) ratio higher than 1 was observed by means of quantitative PCR (qPCR). This was not observed in the samples from a conventional activated sludge system. The NOB/AOB ratio higher than 1 was an unexpected result, since the theoretical NOB/AOB ratio based on the biomass yield of these organisms in the nitrification process is approximately 0.5. This ratio is expected to be even lower in aerobic granular sludge systems where simultaneous nitrification/denitrification takes place, since NOB have to compete for nitrite with heterotrophic denitrifying bacteria. In general, the amount of AOB would be always higher than that of NOB unless the metabolism of NOB is changed in such a way that their biomass yield increases. This is possible if the growth of these organisms would be partly uncoupled from the lithotrophic nitrite supply by AOB and would be capable of using other substrates (e.g., organic compounds) as well. In this particular case, NOB would grow mixotrophically. Surprisingly, the nitrite oxidation capacity was found to be around three times higher than the ammonium oxidation capacity in separate activity batch tests. Taking into account the experimental evidence and literature information, two hypotheses were proposed to explain why the NOB/AOB ratio was higher than 1 in the granular system. In the first assumption, designated as ping-pong effect, Nitrobacter (the NOB found in the aerobic granular system) could have grown mixotrophically by acetate-dependent dissimilatory nitrate reduction. In the second hypothesis, a nitrite oxidation/nitrate reduction loop (designated as nitrite loop) may have occurred within the granular sludge. In the nitrite loop, denitrifiers reduced nitrate to nitrite supplying additional nitrite for the NOB. This would support the growth of NOB apart of the nitrite supply from AOB. Further investigation is needed to identify the mechanistic rationale for the disproportion of the amount of AOB and NOB in aerobic granular sludge. During operation of lab- and pilot-scale aerobic granular sludge reactors with alternate anaerobic/aerobic phases, ammonium concentrations after anaerobic feeding were found to be lower than expected based on the influent concentration and dilution in the reactor. This fact was attributed to ammonium adsorption to the granular biomass. A detailed study on adsorption of ammonium in aerobic granular sludge and the main causes of this phenomenon is described in Chapter 5. By comparing the extent of ammonium adsorption in several types of biomass, the amount of ammonium adsorbed to aerobic granules was found to be much higher than that occurring in activated sludge and anammox granules. Kinetic experiments with granules showed that ammonium adsorption in granules is much slower than in activated sludge. The high ammonium adsorption to the granular biomass can be attributed to the presence of K-struvite (potassium magnesium phosphate), which functions as potassium source for ion-exchange with ammonium. Overall, this study has shown that the phenomenon of ammonium adsorption to aerobic granules cannot be neglected particularly in granular sludge bioreactors that are characterized by strongly variable ammonium concentrations as a function of place (plug flow systems) or time (batch systems). The effluent of chemical, pharmaceutical and petroleum industries can contain high salt concentrations. High osmotic pressure is a consequence of elevated salinity, affecting the metabolism of most fresh water-based microbial ecosystems. As a consequence, high salt concentrations negatively influence the main biological processes (e.g., organic matter, nitrogen and phosphorus removal) occurring in wastewater treatment plants. The adverse effect of salt on these processes was reported to be minimized with gradual adaptation of microorganisms to high salt concentrations. In Chapter 6, a study investigating the role of changes in the microbial community structure of suspended nitrifying sludge during adaptation to salt (NaCl) was conducted. Two sequencing batch reactors (SBR1 and SBR2) treating synthetic wastewater were subjected to increasing salt concentrations. In SBR1, four salt concentrations (5, 10, 15, and 20 gNaCl/L) were tested, while in SBR2, only two salt concentrations (10 and 20 gNaCl/L) were applied in a more shock-wise manner. The different salt adaptation strategies provoked different shifts in the microbial community structure, although they did not influence the nitrification performance. This finding suggests that independently of the different nitrifying bacterial populations present in the reactor, the nitrification process can be maintained stable within the salt range and operating conditions tested. On the other hand, the more rapid salt increase imposed to SBR2 caused a higher decrease in the specific ammonium oxidation rates. The gradual increase in NaCl concentration positively affected the settling properties, as demonstrated by the reduction of sludge volume index. However, higher washout of light and poor settling flocs was observed due to increasing water density, which is a consequence of gradual salt increase. Higher organisms (e.g., protozoa, nematodes, and rotifers) as well as filamentous bacteria could not withstand salt concentrations over 10 gNaCl/L. The effect of salt on aerobic granular sludge (AGS) is scarcely reported in literature. In Chapter 7, a detailed study regarding the long- and short-term effect of salt on organic matter, nitrogen and phosphate removal in an AGS system was conducted. The dynamics of the microbial community structure within the granules at increasing salt concentrations (0 – 33 gNaCl/L) was also addressed in this research. Ammonium removal efficiency was not affected when salt (NaCl) was increased until 33 gNaCl/L. Ammonium uptake rates remained stable, differently from the study carried out with suspended nitrifying sludge (Chapter 6). However, nitrite accumulation was observed to occur at salt concentrations higher than 22 gNaCl/L, which coincided with the disappearance of Nitrospira sp. The increase of salt severely affected the phosphate removal process, which completely deteriorated at 33 gNaCl/L. Polyphosphate-accumulating organisms (Candidatus Accumulibacter phosphatis) were no longer detected at this salt concentration. Batch experiments confirmed that phosphate removal could still occur at 30 gNaCl/L, but the long exposure of the biomass to this salt concentration was detrimental to phosphate-accumulating organisms (PAOs), which were outcompeted by glycogen-accumulating organisms (GAOs) in the bioreactor. GAOs became the dominant microorganisms at increasing salt concentrations, especially at 33 gNaCl/L. Herewith, we hope that the studies described in this thesis contribute to improved understanding of key aspects of biological nutrient removal processes in compact biofilm based bioprocesses. This will enable the development of improved wastewater treatment processes and the protection of natural environments from human activities.BiotechnologyApplied Science