Treatment of Liquid Phase of Digestate from Agricultural Biogas Plant in a System with Aerobic Granules and Ultrafiltration

Management of digestate from manure co-digestion with a very high chemical oxygen demand (COD) to nitrogen ratio and high nitrogen loads are a major bottleneck in the development of agricultural biogas plants. The liquid phase of digestate mixed with municipal wastewater was treated in aerobic granular sludge batch reactors at cycle lengths (t) of 6 h (GSBR6h), 8 h (GSBR8h), and 12 h (GSBR12h), corresponding to nitrogen loads of 1.6, 1.2, and 0.8 g/(L·d). Thauera sp., Lacibacter sp., Thermanaerothrix sp., and Planctomyces sp. predominated in granules favoring effective granule formation and nitrogen removal. Increasing cycle lengths (t) significantly decreased proteins in soluble fraction of extracellular polymeric substances (EPS) in granules and increased polysaccharides in tightly bound EPS that resulted in higher granule diameters and higher COD removal. In GSBR6h, heterotrophic nitrification/denitrification was very efficient, but ammonium was fully oxidized in the last hour of the cycle. So in further studies, the effluent from GSBR8h was subjected to ultrafiltration (UF) at transmembrane pressures (TMPs) of 0.3, 0.4, and 0.5 MPa. A GSBR8h-UF system (TMP of 0.4 MPa) ensured full removal of total Kjeldahl nitrogen (TKN), suspended solids, and substantial reduction of COD and color with good permeate flux. The NOx-rich (about 250 mg/L), clear permeate can be reused in line with assumptions of modern circular economy.


Introduction
One of the frequently used technologies of waste disposal from the agro-food industry is methane fermentation.As a result of fermentation, in addition to biogas, digestate is produced.The European Biogas Association reports that about 11,000 anaerobic digestion plants in Europe operate in the agricultural sector [1].Many of these plants are struggling with the problem of managing digestate especially due to the fact that, according to EU Waste Framework Directive (2008/98/EC) [2], digestate is considered as waste.
During anaerobic digestion of livestock effluents, organic matter is transformed into biogas, while hard-to-degrade complex organic matter and the inorganic compounds such as N, P or K, remain in digestate [3].In digestate, the majority of the nitrogen is present as ammonium, and its abundance restricts its application to soils, as given in the European Nitrates Directive.
Currently, many techniques are used to remove ammonium from the digestate.Frequently encountered techniques include evaporation or combinations of processes such as stripping or membrane filtration [4,5], but they are either moderately effective or expensive [6].An attractive option is biological treatment that can be both applied to the treatment of raw digestate as well as to a liquid phase of digestate separated during mechanical dewatering.
A good solution for the purification of digestate seems to be the application of aerobic granular sludge technology that is intensively developed to treat different types of wastewater.Granular sludge is a special type of biofilm, in which self-immobilized bacterial cells create strong, round, well-settling aggregates.The formation of granules depends on microbial production of extracellular polymeric substances (EPS) that can be soluble or bound to microbial aggregates.The morphological properties of the granules, their diverse microbial community, and a complex spatial structure allow the effective purification to be conducted at high pollutant loads.During the treatment of high-ammonium wastewater with a low high chemical oxygen demand to nitrogen ratio (COD/N) ratio, efficient nitrification in granules is usually conducted by Nitrosomonas sp. and Nitrobacter sp.[7,8].At a high COD/N ratio in wastewater heterotrophic nitrifiers such as Thauera sp., Pseudomonas sp. or Paracoccus sp. may play an important role in ammonium removal [9].According to Cydzik-Kwiatkowska [10], heterotrophic nitrifiers predominated in granules with increasing organic loads of the reactor.High abundance of heterotrophic nitrifiers may be of great importance for the treatment efficiency of digestate if we consider the fact that it contains high organics load that may inhibit autotrophic nitrifiers.
One of the most important problems with granular sludge reactors is their operation at short settling times, which results in wash-out of sludge from the system.Moreover, most of the organic matter in the liquid phase of digestate is recalcitrant and present in the form of suspended solids and colloids, and as a result, poor organics removal is observed in biological systems [11].Therefore, to eliminate these disadvantages and ensure high quality effluent, additional treatment steps should be added to increase the final level of purification.In recent years, the use of integrated biological treatment-membrane filtration systems has become more and more common.Jorhemen et al. [12] treated synthetic wastewater (organics (COD) 2902.0 ± 129.5 mg COD/L, total nitrogen (TN) 74.5 ± 4.1 mg/L and total phosphorus (TP) 34.5 ± 4.4 mg/L) in a system consisting of a sequencing batch reactor and a polymeric membrane with 0.1-µm pores.The total removal efficiency was 98%, 96-99%, and over 95% for COD, TN and TP, respectively.The treatment line comprising biologically active filtration, ultrafiltration, and nanofiltration was used to remove organic matter from oil and gas produced water [13].The biopolymer fraction was the most resistant to biological removal due to its limited bioavailability.Moreover, the formation of EPS impeded membrane performance via fouling.A three-stage system consisting of aerobic granular sludge reactor, an ultrafiltration unit, and a nanofiltration unit was studied by Wang et al. [14].The authors obtained removal efficiencies of 51.3%, 90.5%, and 99.3% for carbon, 53.6%, 94.8%, and 98.1% for nitrogen and 49.8%, 97.1%, and 98.7% for phosphorus, respectively.Among membranes, unique thermal, chemical, and mechanical properties of ceramic membranes give them significant advantages over both polymeric and stainless steel membranes in many applications [15].
The initial study on the treatment of digestate from agricultural biogas plant has shown that treating unseparated digestate at nitrogen loading rates of 3.4 g TN/(L•d) and 1.0 g TN/(L•d), despite high efficiency of ammonium removal, is not very effective due to the high content of suspended solids in the digestate which hinder the purification process and result in a high pollutant load in the effluent [9].Thus, the aim of this study was to remove ammonium nitrogen from only the separated liquid phase of digestate with high nitrogen and organics loads in a granular sludge batch reactor (GSBR) and to polish biologically purified effluent in an ultrafiltration unit (UF) to remove suspended solids and significantly decrease the pollutant load in the effluent.To conclude about the ecology of granular sludge exposed to high organics and nitrogen loads depending on operational parameters of GSBR, next generation sequencing was used.Because treatment of digestate is one of the major problems in the development of the methane fermentation industry, the technological system presented in this study could have widespread applicability.The effluent from the integrated GSBR-UF system did not contain ammonium, suspended solids, and was nearly colorless but it had high loads of oxidized nitrogen forms and orthophosphates that makes it an ideal stream for such applications as algae cultivation or generation of energy in bioelectrochemical processes that is in line with the assumptions of a modern circular economy.

Substrate
The digestate was collected from an agricultural biogas plant in Łęguty (Poland) co-digesting liquid manure and corn silage in wet fermentation.The characteristics of the liquid phase of digestate after mechanical dewatering were as follows: total suspended solids (TSS) 10.7 g TSS/L, total Kjeldahl nitrogen (TKN) 5.8 g TKN/L, 2.8 g N-NH 4 + /L, total phosphorus 0.6 g TP/L, 13.4 g COD/L (soluble COD 11.7 g COD sol /L), and a BOD 5 /COD ratio of about 0.5.The pH and alkalinity were 8.9 and 19.5 mval/L, respectively.

GSBR Operation
The experiment was conducted in three GSBRs with a working volume of 3 L operated at cycle lengths of 6 h (GSBR 6h ), 8 h (GSBR 8h ), and 12 h (GSBR 12h ) for a period of over 200 days.The volumetric exchange rate was 40%.The reactors were aerated at the rate of 4 L/min (superficial air velocity was 0.8 cm/s).The feeding, settling, and discharging phases in the reactor cycle lasted for 5 min.Due to very high concentrations of pollutants in the digestate, the digestate was mixed with municipal wastewater in a 1 to 4 ratio prior to introduction to the GSBRs.The obtained mixture was fed to the reactors, and as a result, GSBR 6h operated at nitrogen and organic loads of 1.6 g TKN/(L•d) and 11.2 g COD/(L•d) (about 850 cycles), GSBR 8h at 1.2 g TKN/(L•d) and 8.3 g COD/(L•d) (about 640 cycles), and GSBR 12h at 0.8 g TKN/(L•d) and 3.5 g COD/(L•d) (about 420 cycles).In the GSBRs, the pH varied between 8.7 and 9.5.
The concentrations of TN, TP, orthophosphates (HACH tests, Loveland, CO, USA), ammonium nitrogen, orthophosphates, and COD [16], as well as the pH and alkalinity (TitroLine Easy, Cambridge, UK) were measured in the reactor influents and effluents.Additionally, concentrations of oxidized forms of nitrogen (NO x ) were measured in the effluents (HACH tests).The concentrations of TSS in the influent and effluent, and the concentrations of mixed liquor suspended solids (MLSS) and mixed liquor volatile suspended solids (MLVSS) in the reactors and the sludge volume index (SVI) after 30 min of settling were measured according to APHA [16].In each GSBR, at the end of the experiment, the diameters of granules were estimated by a wet sieving as described in Reference [17]; the sludge yield coefficient was calculated.Oxygen concentration in the reactors was measured using a ProOdo probe (YSI Environmental, Fairborn, OH, USA).
Soluble (Sol-EPS), loosely bound (LB-EPS), and tightly bound (TB-EPS) EPS were isolated from the biomass from the GSBRs collected at the end of the cycle; the classification followed Pellicer-Nàcher [18].Supernatant containing Sol-EPS was separated by centrifugation (12,000× g, 15 min, 4 • C).To the pellet, PBS buffer was added to the original volume, and the mixture was vortexed and again centrifuged (12,000× g, 15 min, 4 • C).The supernatant contained LB-EPS.The pellet was again resuspended and cation exchange resin was used to extract TB-EPS, according to Frølund et al. [19].In the separated EPS fractions, proteins and polysaccharides were measured as described in References [20,21].
At the end of operation of all the GSBRs, concentrations of the pollutants were also measured during the reactor cycle.This allowed to examine the kinetics of removal of organics, nitrogen, and phosphorus in the GSBRs.Orthophosphates and COD removal followed 1-order kinetics, ammonium removal followed 0-order kinetics, and NO x changes followed 0-or 1-order kinetics.
To calculate the efficiency of nitrification, the concentration of the NO x in the GSBR effluent was divided by the concentration of TKN at the beginning of the GSBR cycle less the N used for synthesis of the biomass.To calculate the average efficiencies of pollutant removal, the results from the last 40 measurements conducted during the stable operation of GSBRs were taken.

Molecular Studies
To analyze microbiota of aerobic granules from GSBRs, next generation sequencing was used.DNA isolation was performed using a FastDNA ® SPIN Kit for Soil (MP Biomedicals, Santa Ana, CA, USA).The quality and quantity of the DNA was analyzed with a Lite NanoDrop spectrometer (Thermo Scientific, Waltham, MA, USA).A 926F/1392R universal primer set (AAACTYAAAKGAATTGRCGG, [22], ACGGGCGGTGTGTRC, [23]) targeting Bacterial and Archaeal 16S rDNA gene was used for amplification and the amplicons were sequenced in Research and Testing Laboratory (Lubbock, Texas, USA) using the MiSeq Illumina platform.Over 44 thousand full sequences were obtained.
Clustering of sequences into operational taxonomic units (OTUs, Chicago, IL, USA) was done using USEARCH global alignment [24].To query FASTA files with seed sequences for each cluster against a database of sequences derived from The National Center for Biotechnology Information (NCBI), a .NET algorithm utilizing BLASTN+ was applied.Alignment done by Infernal [25] was followed by clustering by Complete Linkeage Clustering modules of the RDPipeline (http://rdp.cme.msu.edu/).Assignment of phylotype clusters was done at five cutoff levels: 1%, 3%, 5%, 7%, and 10%.Rarefaction analysis and the Shannon-Wiener index of diversity (H') were calculated using Ribosomal Database Project (RDP) modules, and for the analysis all sequences were taken.Rarefaction analysis indicated that sampling was deep enough to accurately characterize the bacterial community (data not shown).Because the samples had similar amounts of sequences and were obtained in the same run, the data were not normalized to avoid their loss.The sequences have been deposited in the NCBI Sequence Read Archive (SRA) as the experiment "Metagenome of aerobic granules" (Accession: PRJNA482756).To determine the links between length of reactor cycle and microbial structure, a canonical correspondence analysis (CCA) was performed.The reliability was checked using Monte Carlo permutation testing (499 permutations).The analyses were conducted using CANOCO for Windows ver.4.51 and CANODRAW (ter Braak and Smilauer, Biometris, Wageningen, The Netherlands).

Membrane Filtration
Membrane filtration of biologically treated effluent from GSBR 8h (with a stable ammonium oxidation with safety coefficients) was made in the installation described by Zieli ńska and Galik [26].In the study, a ceramic UF membrane with cut-off of 150 kDa was used at TMPs of 0.3, 0.4, and 0.5 MPa.The filtrations were carried out at 21 ± 2 • C with initial cross-flow velocities of 20-25 L/min.The membrane installation was not equipped with automatic backwashing.Therefore, during the filtration cycle, batch tests of permeation were conducted.In these tests, the time necessary for collecting known volumes of permeate was measured up to the moment in which permeate recovery was 50% (volumetric concentration factor = 2).Then, the membrane installation was washed.Based on the results of the permeation tests and the physico-chemical analyses of the feed, permeates, and retentates, the basic hydraulic parameters of the membrane were calculated, such as the permeate flux (J V ), the total membrane resistance (R m ), the percentage of pollutant rejection, and the percentage of pollutants that were adsorbed on the membrane (Ads).The color of feed and permeate was measured according to Bes-Piá et al. [27] with a Rayleigh VIS-7220G spectrophotometer, and dry residue was assessed using weight method [16].

Statistical Analysis
STATISTICA 12.5 software (StatSoft) was used for statistical analysis.A value of p ≤ 0.05 was defined as significant.Normality and homogeneity of variance were examined using the Shapiro-Wilk test and Leven's test, respectively.If distribution and homogeneity of variance were normal, ANOVA was used to test for significance followed by the post-hoc Tukey HSD test.If homogeneity of variance and uniformity of distribution were not found, the non-parametric Kruskal-Wallis test was applied.Pearson's correlation coefficient (r) was used to determine the relationships between individual results.

Results and Discussion
The need for water recovery and increasingly stringent standards regarding water cleanliness require searching for new, more effective methods of wastewater treatment or modification of the existing ones.Streams with high ammonium and organics loads are difficult to treat because autotrophic processes such as nitrification or Anammox are of limited use.In this study, heterotrophic ammonium oxidation was conducted in aerobic GSBRs operated at high nitrogen and organics load.Effluent from the GSBR with stable ammonium oxidation (taking into account a safety factor) was further subjected to UF to decrease the overall pollutant load in the effluent.

GSBR Operation
The average biomass concentration in all reactors was around 8.5 g MLSS/L and was within the typical range of concentrations of granular biomass [28], while the organic fraction comprised 45% of MLSS in GSBR 6h , 51% of MLSS in GSBR 8h , and 52% of MLSS in GSBR 12h .The concentration of TSS in the effluent increased with longer reactor cycles from 0.7 g/L in GSBR 6h to 2.0 g/L in GSBR 12h .The SVI in all reactors was about 50 mL/g MLSS.The sludge retention time in GSBRs varied from five to eight days.
The organics concentration in the influent to the reactors in the adaptation period was about 1300 mg COD/L.After 32 days of reactors' operation, it was increased and averaged 2328.4 ± 107.5 mg COD/L (Figure 1).After about 125 days of operation, the quality of the GSBR effluents stabilized.The efficiency of organic compounds removal was substantially better at longer reactor cycles (Table 1).Organics concentrations in the effluent in the stable period averaged 1252.3 ± 207.2, 1116.7 ± 128.4, and 166.6 ± 97.8 mg COD/L in GSBR 6h , GSBR 8h , and GSBR 12h , respectively (Figure 1).Szabo et al. [29] observed that rapid and efficient removal of organics occurred just after the end of the anoxic phase in the reactor cycle, when oxygen becomes present independently of operational parameters of the process.In the present study, the length of the GSBR cycle negatively correlated with the COD removal rate (r = −0.99); in GSBR 6h , the rate of removal of organic compounds was 923.4 mg/(L•h), while in GSBR 12h , it was 193.5 mg/(L•h) (Table 1, Supplementary Materials, Figure S1).
Concentration of TP in the influent averaged 31.1 ± 2.0 mg/L.Nearly all of the variation in TP removal rate in the GSBR cycle was associated with differences in cycle length (r = −0.98)(Table 1).A previous study in Reference [30] conducted in sequencing batch reactors with activated sludge has shown that cycle length influences TP removal.Increasing cycle length from 3 to 6 h increased removal efficiency of TP because denitrification from nitrites caused that more biodegradable organics were available for enhanced biological phosphorus removal.Further lengthening the cycle to 8 h decreased efficiency of TP removal because more organics were used for denitrification from nitrates.In the present study, the average concentrations of TP in the effluent differed significantly (25.8 ± 2.7 mg/L in GSBR 6h , 21.5 ± 2.4 mg/L in GSBR 8h , and 23.6 ± 1.7 mg/L in GSBR 12h ) and TP removal efficiency was the highest in GSBR 8h .
The average concentrations of TKN and ammonium nitrogen in the influent were 592.2 ± 17.9 mg/L (Figure 2) and 496.7 ± 41.8 mg/L, respectively.In the period of stable reactor operation, the average concentrations of total nitrogen, ammonium, nitrites, and nitrates in the effluent from GSBR 6h were 245.9 ± 41.9 mg/L, 0.83 ± 0.71 mg/L, 4.84 ± 1.63 mg/L, and 10.99 ± 3.08 mg/L, respectively.In the effluent from GSBR 8h , the average concentrations of TN and ammonium were 314.7 ± 92.8 mg/L and 1.2 ± 0.5 mg/L, respectively, but the concentrations of nitrite and nitrate increased significantly to 262.9 ± 79.9 mg/L and 28.4 ± 7.6 mg/L, respectively.In the effluent from GSBR 12h , the concentrations of TN and ammonium averaged 239.1 ± 17.7 mg/L and 1.0 ± 0.4 mg/L, respectively, while nitrite and nitrate concentrations averaged 158.7 ± 28.6 mg/L and 23.5 ± 2.2 mg/L, respectively.The highest efficiency of nitrification of about 97% was observed in GSBR 12h (Table 1).
The sludge yield coefficient in the GSBRs ranged from about 0.2 to 0.4 g MLSS/g COD and ammonium used for biomass synthesis decreased from 21 mg/L in GSBR 6h to 6.5 mg/L in GSBR 12h .Concentration of TP in the influent averaged 31.1 ± 2.0 mg/L.Nearly all of the variation in TP removal rate in the GSBR cycle was associated with differences in cycle length (r = −0.98)(Table 1).A previous study in Reference [30] conducted in sequencing batch reactors with activated sludge has shown that cycle length influences TP removal.Increasing cycle length from 3 to 6 h increased removal efficiency of TP because denitrification from nitrites caused that more biodegradable organics were available for enhanced biological phosphorus removal.Further lengthening the cycle to 8 h decreased efficiency of TP removal because more organics were used for denitrification from nitrates.In the present study, the average concentrations of TP in the effluent differed significantly (25.8 ± 2.7 mg/L in GSBR6h, 21.5 ± 2.4 mg/L in GSBR8h, and 23.6 ± 1.7 mg/L in GSBR12h) and TP removal efficiency was the highest in GSBR8h.
The average concentrations of TKN and ammonium nitrogen in the influent were 592.2 ± 17.9 mg/L (Figure 2) and 496.7 ± 41.8 mg/L, respectively.In the period of stable reactor operation, the average concentrations of total nitrogen, ammonium, nitrites, and nitrates in the effluent from GSBR6h were 245.9 ± 41.9 mg/L, 0.83 ± 0.71 mg/L, 4.84 ± 1.63 mg/L, and 10.99 ± 3.08 mg/L, respectively.In the effluent from GSBR8h, the average concentrations of TN and ammonium were 314.7 ± 92.8 mg/L and 1.2 ± 0.5 mg/L, respectively, but the concentrations of nitrite and nitrate increased significantly to Regardless of the length of the cycle, complete removal of ammonium nitrogen was observed after approximately 6 h of the cycle.The highest ammonium nitrogen removal rate was observed in the reactor with a cycle length of 6 h (107.7 mg/(L•h), Table 1).The decrease in the ammonium nitrogen removal rate with the lengthening of the GSBR working cycle (r = 1.00) and a resulting decrease in the load of organics indicates that ammonium nitrogen removal was due to the activity of heterotrophic microorganisms.The ammonium removal rates were over two times and seven times greater than the rates observed during the treatment of landfill leachate with a low COD/N ratio in granular sludge batch reactors and activated sludge batch reactors, respectively [31].Regardless of the length of the cycle, complete removal of ammonium nitrogen was observed after approximately 6 h of the cycle.The highest ammonium nitrogen removal rate was observed in the reactor with a cycle length of 6 h (107.7 mg/(L•h), Table 1).The decrease in the ammonium nitrogen removal rate with the lengthening of the GSBR working cycle (r = 1.00) and a resulting decrease in the load of organics indicates that ammonium nitrogen removal was due to the activity of heterotrophic microorganisms.The ammonium removal rates were over two times and seven times greater than the rates observed during the treatment of landfill leachate with a low COD/N ratio in granular sludge batch reactors and activated sludge batch reactors, respectively [31].
The changes in concentration of NOx in the GSBR cycle are shown in Figure 3.In GSBR6h, NOx concentration changed very little, which indicates that nitrification occurred simultaneously with efficient denitrification (Figure 3a).Usually, simultaneous nitrification/denitrification takes place under anaerobic and microaerophilic conditions.The oxygen supply was not limited in our study, which indicates that the multi-layered granule structure with anoxic and anaerobic zones combined with the highest organic load provided very good conditions for efficient NOx reduction.In the 1st hour in GSBR8h, NOx from the previous cycle was denitrified at a rate of 136.9 mg/(L•h).From the 2nd hour to the end of the cycle, NOx concentration increased indicating that nitrification rate was higher than denitrification rate.The rate of NOx production was 32.8 mg/(L•h) (0-order reaction), and at the end of the cycle, the concentration of NOx increased to 245.9 mg/L (Figure 3b).In GSBR12h, after initial denitrification in the 1st hour at a rate of 76.4 mg/(L•h), the NOx concentration increased at a rate of 24.9 mg/(L•h) (1-order reaction) (Figure 3c).An increase in DO in initial hours of the cycle corresponded to a decrease in NOx concentration (Figure 3).It points to the fact that denitrification occurred in deeper granule layers despite constant presence of oxygen in the bulk solution as long as easily degradable organics are present in high concentration in wastewater.Stabilization of DO at about 7 mg/L from the 2nd hour of the cycle resulting from depletion of organics was followed by an increase in NOx concentrations in all reactors.The results confirm that impact of DO on denitrification is less important in granular systems than in activated sludge systems [32]  The changes in concentration of NO x in the GSBR cycle are shown in Figure 3.In GSBR 6h , NO x concentration changed very little, which indicates that nitrification occurred simultaneously with efficient denitrification (Figure 3a).Usually, simultaneous nitrification/denitrification takes place under anaerobic and microaerophilic conditions.The oxygen supply was not limited in our study, which indicates that the multi-layered granule structure with anoxic and anaerobic zones combined with the highest organic load provided very good conditions for efficient NO x reduction.In the 1st hour in GSBR 8h , NO x from the previous cycle was denitrified at a rate of 136.9 mg/(L•h).From the 2nd hour to the end of the cycle, NO x concentration increased indicating that nitrification rate was higher than denitrification rate.The rate of NO x production was 32.8 mg/(L•h) (0-order reaction), and at the end of the cycle, the concentration of NO x increased to 245.9 mg/L (Figure 3b).In GSBR 12h , after initial denitrification in the 1st hour at a rate of 76.4 mg/(L•h), the NO x concentration increased at a rate of 24.9 mg/(L•h) (1-order reaction) (Figure 3c).An increase in DO in initial hours of the cycle corresponded to a decrease in NO x concentration (Figure 3).It points to the fact that denitrification occurred in deeper granule layers despite constant presence of oxygen in the bulk solution as long as easily degradable organics are present in high concentration in wastewater.Stabilization of DO at about 7 mg/L from the 2nd hour of the cycle resulting from depletion of organics was followed by an increase in NO x concentrations in all reactors.The results confirm that impact of DO on denitrification is less important in granular systems than in activated sludge systems [32] In the present study, the higher N and organic loads at shorter cycle lengths favored the predominance of smaller granules in the reactors.In GSBR 6h , granules with diameters <90 µm (Figure 4a) constituted about 60% of the biomass, and there were no granules with a diameter over 1 mm.The percentage of granules with a diameter >1 mm increased to 7.5% and 12.7% in GSBR 8h and GSBR 12h , respectively.In reactors operated at low organic load, usually diameters of granules increase with increasing cycle length [33,34].The results of the present study indicate that a high availability of organics stimulated the intensive growth of microorganisms and the creation of a large number of small granules.However, the size of the granules did not prevent the best denitrification efficiency from being achieved in the reactor with the smallest granules.In the present study, the higher N and organic loads at shorter cycle lengths favored the predominance of smaller granules in the reactors.In GSBR6h, granules with diameters <90 μm (Figure 4a) constituted about 60% of the biomass, and there were no granules with a diameter over 1 mm.The percentage of granules with a diameter >1 mm increased to 7.5% and 12.7% in GSBR8h and GSBR12h, respectively.In reactors operated at low organic load, usually diameters of granules increase with increasing cycle length [33,34].The results of the present study indicate that a high availability of organics stimulated the intensive growth of microorganisms and the creation of a large number of small granules.However, the size of the granules did not prevent the best denitrification efficiency from being achieved in the reactor with the smallest granules.
The length of GSBR cycle affected content and composition of polymers in the structure of aerobic granules.Soluble fraction of extracellular polymeric substances (Sol-EPS) predominated in all reactors, in terms of both protein and polysaccharides; the total amount of proteins in the extracellular polymeric substances (EPS) was significantly higher than the number of polysaccharides.The decrease in the concentration of Sol-EPS correlated strongly with the lengthening of the cycle and varied from about 425 mg/L in GSBR6h to about 160 mg/L in GSBR12h (r = −0.96)(Figure 4b) and resulted in substantially better removal of COD at a longer cycle length.For polysaccharides, cycle length was not associated with the contents of Sol-EPS and LB-EPS, but the concentration of polysaccharides in TB-EPS correlated perfectly with increased cycle length (r = 1.00, Figure 4c).Polysaccharides favor the formation of stable granules because in a polysaccharide matrix, proteins, lipids, α-polysaccharides, and cells can be deposited [35]; high content of polysaccharides resulted in larger granule diameters at the two longest cycle lengths.

Molecular Studies
During the study, samples of granular sludge were taken from GSBRs to determine the species composition of the sludge with high-throughput sequencing.The Shannon-Wiener index of diversity was similar in all samples (H' about 3.4).The most numerous genera in the granules from GSBR6h and GSBR12h were Thauera sp.(15.69% and 15.96%, respectively) and Lacibacter sp.(7.79% and 8.03%, respectively).In contrast, the predominant genera in GSBR8h granules were Thermanaerothrix sp.(11.64%) and Planctomyces sp.(10.80%) (Supplementary Materials, Figure S2).
In the granule samples, bacteria of the first stage of autotrophic nitrification were not identified.Oxidation of ammonium nitrogen was most probably carried out by organisms belonging to Thauera The length of GSBR cycle affected content and composition of polymers in the structure of aerobic granules.Soluble fraction of extracellular polymeric substances (Sol-EPS) predominated in all reactors, in terms of both protein and polysaccharides; the total amount of proteins in the extracellular polymeric substances (EPS) was significantly higher than the number of polysaccharides.The decrease in the concentration of Sol-EPS correlated strongly with the lengthening of the cycle and varied from about 425 mg/L in GSBR 6h to about 160 mg/L in GSBR 12h (r = −0.96)(Figure 4b) and resulted in substantially better removal of COD at a longer cycle length.For polysaccharides, cycle length was not associated with the contents of Sol-EPS and LB-EPS, but the concentration of polysaccharides in TB-EPS correlated perfectly with increased cycle length (r = 1.00, Figure 4c).Polysaccharides favor the formation of stable granules because in a polysaccharide matrix, proteins, lipids, α-polysaccharides, and cells can be deposited [35]; high content of polysaccharides resulted in larger granule diameters at the two longest cycle lengths.

Molecular Studies
During the study, samples of granular sludge were taken from GSBRs to determine the species composition of the sludge with high-throughput sequencing.The Shannon-Wiener index of diversity was similar in all samples (H' about 3.4).The most numerous genera in the granules from GSBR 6h and GSBR 12h were Thauera sp.(15.69% and 15.96%, respectively) and Lacibacter sp.(7.79% and 8.03%, respectively).In contrast, the predominant genera in GSBR 8h granules were Thermanaerothrix sp.(11.64%) and Planctomyces sp.(10.80%) (Supplementary Materials, Figure S2).
In the granule samples, bacteria of the first stage of autotrophic nitrification were not identified.Oxidation of ammonium nitrogen was most probably carried out by organisms belonging to Thauera sp., which are not only able to carry out heterotrophic nitrification under conditions of high biomass loads with organic and nitrogen compounds [9], but are also the dominant taxa in systems where either autotrophic or heterotrophic denitrification occurs [36].The main advantage of heterotrophic nitrification is that nitrification and denitrification can take place simultaneously, so a smaller buffering capacity is necessary.Low levels of carbon source can limit this process, but this was avoided in our study by operating the reactors at high organics loads.Thauera sp. has been identified as a phosphorous-accumulating denitrifier able to produce poly-β-hydroxybutyrate-an alternative electron donor for denitrification [37].Two mechanisms for heterotrophic nitrification and denitrification have been reported: in the first, NO x is accumulated in the process; in the second, ammonium is oxidized to NH 2 OH and further reduced to N 2 O and N 2 [38].Our results indicate that, at the highest organic load in GSBR 6h , the second mechanism predominated because almost no nitrite or nitrate was accumulated.On the other hand, longer cycles stimulated the first mechanism as indicated by the increasing concentrations of NO x in the reactor cycle.In the granules, autotrophic nitrite-oxidizing bacteria (NOB) belonging to Nitrobacter sp. were present, but their abundance was no higher than 0.75% in the investigated GSBRs.The predominance of Nitrobacter sp. in the NOB population in aerobic granules may result from the fact that they can both oxidize nitrite produced during partial denitrification (nitrite-loop) and grow mixotrophically in the presence of acetate (ping-pong), reducing the content of carbon in wastewater [39].
The composition of the digestate influenced the species structure of aerobic granules.In the biomass, bacteria of the genus Lacibacter were abundant.Lacibacter cauensis, which was identified in aerobic granules, is able to hydrolyze starch and casein, as well as oxidize glucose.This bacterium grows in the presence of many carbohydrates such as maltose, sucrose, lactose or D-mannose [40], which explains its high abundance in conditions where large amounts of starch are present due to the use of maize silage for fermentation.
In all reactors, Arcanobacterium sp.comprised about 4% of all bacteria.Arcanobacterium sp. are facultative anaerobes that degrade sugars (e.g., glucose and lactose) [41] and were found to be an important component of digestate from an agricultural biogas plant [9].
The predominant taxa at an 8-h cycle length were Thermanaerothrix sp.(11.64%) and Planctomyces sp.(10.80%).The taxa Thermanaerothrix includes thermophilic strictly anaerobic Gram-negative bacteria, which oxidize sugars or organic acids to lactate, acetate, and carbon dioxide [42].In the present study, Thermanaerothrix was present in the reactor even though it was aerated, which indicates that it originated from the purified liquid phase of digestate.Planctomyces sp. have been identified in large numbers in anoxic and aerobic tanks and in an anaerobic digester in a municipal wastewater treatment plant [43].Planctomycetes have natural resistance to several antibiotics and are capable of degrading organic matter [44].Such versatility promotes their growth in granules, which are multilayered structures with zones that differ in oxygen content.
At two shorter lengths of the reactor working cycle, bacteria of the genera Terrabacter and Crocinitomix appeared in the granular sludge.Terrabacter sp. in GSBR 6h and GSBR 8h comprised 3.1% and 3.2% of all identified sequences, respectively, while in GSBR 12h , their abundance dropped to 1.1% (Supplementary Materials, Figure S2).Bacteria of this type were identified in different environments [45].They are catalase-positive and oxidase-negative, and they cannot break down cellulose, but they can reduce nitrates to nitrites.This indicates that they could have made a substantial contribution to effective denitrification at the higher organic and nitrogen loads.
To determine the effect of cycle length on the composition of microorganisms in aerobic granules, CCA analysis was performed (Figure 5).At the phylum level (Figure 5a), a strong correlation between the occurrence of microorganisms belonging to the phylum Acidobacteria and the longest cycle time (12 h) can be seen.The length of the cycle, on the other hand, did not influence the presence of microorganisms from the phyla Actinobacteria, Bacteroidetes, Gemmatimonales, and Verrucomicrobia.At the genus level (Figure 5b), the shortest length of the reactor working cycle (6 h) favored the growth of microorganisms belonging to the genera Azoarcus, Brevundimonas, and Clostridium.The genus Acetivibrio was characteristic for the biomass from GSBR 8h .The longest cycle favored the growth of the genera Dyadobacter, Flavobacterium, Leadbettella, Acidobacterium, an unrecognized genus from the order Acidobacteriales, and another unrecognized genus from the order Sphingobacteriales.The length of the cycle did not affect the abundance of bacteria belonging to the genera Lacibacter, Leucobacter, Caldilinea or Thauera, indicating that their susceptibility to changes in organic load is low.Thauera sp. were reported to be polysaccharide producers [46]; Leucobacter sp. have a high flocculation index [47] and Caldilinea is a member of the phylum Chloroflexi, which is important for the formation of sludge flocs [48].Thus, the abundance of all these genera in the present study would have been beneficial for granule formation.

Membrane Filtration
In the study, the biologically treated liquid phase of digestate was filtrated at three different TMPs to choose the most suitable variant.Transmembrane pressure decides about flow velocity and the accumulation of particles on the surface of the membrane.At a TMP of 0.3 MPa, the initial J V was 52.9 L/(m 2 •h).After 2 h of filtration, 50% of permeate was recovered, and at this time, the J V was 30.3 L/(m 2 •h).The rate constant (k) for this decrease in J V was 0.28 h −1 .The reason for this decrease was that the membrane was blocked with pollutants present in the feed, such as total suspended solids or EPS.There was a positive correlation between flux decline and EPS concentration, indicating that EPS mainly contributed to biofouling [49].Moreover, EPS composition and fraction is also important.Lesjean et al. [50] found that the fouling rate of the membrane and the concentration of polysaccharides were linearly correlated, and Wang et al. [51] reported LB-EPS as the fraction with the highest fouling potential.In the present study, in the biologically treated liquid phase of digestate, among EPS soluble proteins predominated that is the least problematic fraction, with regard to membrane fouling.In the present study, the fouling intensity could have been affected by the mode of operation of the membrane installation.During filtration, due to constant permeate outflow, the feed became more concentrated with time, as retentate was constantly returned to the feed tank.An increase in TMP to 0.4 MPa resulted in an increase in the initial J V to 191.1 L/(m 2 •h).The assumed recovery was obtained only after 0.87 h.Higher TMP means higher flow velocity, which creates greater turbulence in a membrane module, thus decreasing the accumulation of particles on the membrane surface.During this time J V dropped very fast (k = 1.38 h −1 ).Such a rapid decline in flux can be attributed to both concentration polarization and blocking of the pores [52].However, after 0.87 h, J V was still 68.3L/(m 2 •h).A further increase in TMP to 0.5 MPa did not result in a further increase in permeate flux.The initial value of J V was 68.6 L/(m 2 •h), and it decreased to 57.1 L/(m 2 •h) with k of 0.18 h −1 after 1.1 h, when 50% recovery was reached.Although, higher TMP causes higher flow in general, very high pressure may result in a compression of particles in the membrane pores [37], which decreases the hydraulic capacity of the membrane installation.
The effect of TMP on the membrane fouling was confirmed by the membrane resistance, which was lowest at a TMP of 0.4 MPa (12,381 MPa•s/m).These operational conditions are considered the most effective for providing optimal hydraulic efficiency of a membrane installation and decreasing the frequency of membrane washing when treating the biologically treated liquid phase of digestate.An increase in TMP from 0.4 to 0.5 MPa increased R m by 131%, which resulted from the blocking of membrane pores and the saturation of the membrane with pollutants.
The balance of loads of the organic compounds in the feed, permeates, and retentates showed that some portion of COD (from 22.4 to 56.8% of COD in the feed) was adsorbed on the membrane.This indicates that adsorption supported simple size exclusion in retention of COD by the membrane.The percent adsorption was highest at a TMP of 0.4 MPa (56.8%), and this did not correspond with the highest fouling.A potential reason for this observation is that the particles that were adsorbed were bigger than the membrane pore diameters.During filtration, particles smaller than membrane pores accumulate in the pores and block the membrane rapidly, whereas particles larger than membrane pores are deposited on the membrane surface [53].
The efficiency of COD removal in UF was high (about 75%), regardless of the applied TMP (Table 2).The efficiency of TN removal was also very good, reaching 86.9% at the lowest TMP.As the TMP was increased, the efficiency of TP removal decreased, which may indicate that phosphorus was released from the cells that disintegrated due to the high pressure that was applied.The efficiency of removal of NO x was 11-13%, and most likely resulted from membrane clogging.Blocking of membrane pores by feed components decreases the nominal diameter of the membrane pores, which allows the rejection of particles with diameters smaller than the membrane cut-off [54].The use of UF resulted in a substantial reduction in the color of wastewater (Figure 6, Table 2).Membrane filtration did not change the pH, which was about 8.9.
Water 2019, 11, x FOR PEER REVIEW 13 of 18 The use of UF resulted in a substantial reduction in the color of wastewater (Figure 6, Table 2).Membrane filtration did not change the pH, which was about 8.9.

Efficiency of Wastewater Treatment in the GSBR 8h -UF System
A two-stage system consisting of GSBR 8h and an UF module operated at TMP of 0.4 MPa allowed full removal of ammonium, 99% removal of TKN, 88% removal of COD, total removal of suspensions and turbidity, and significant reduction of color.Efficiency of NO x removal was not calculated, because concentrations of NO x in the influent were close to zero.In the effluent, however, substantial amounts of NO x remained (250 mg/L), as well as some phosphorus (about 10 mg/L), and low molecular-weight organic compounds and microelements, as indicated by the dry residue concentration in the permeate of 5000-6000 mg/L.A wastewater stream with these characteristics can be used in bioelectrochemical systems for energy production by microbial fuel cells.With the use of microbial fuel cells, the initial concentration of nitrates of about 100 mg/L was reduced with an efficiency of 96% [55].Another potential application of the obtained effluent is for cost-effective and ecofriendly microalgae cultivation for energetic purposes such as biodiesel or biomethane production [56].Currently, the cost of microalgal cultivation is too high for commercial applications, mostly due to the need for nutrient addition-concentrations of NO x in wastewater used for algae cultivation may vary from about 16 to about 800 mg/L [51,57].
Ultrafiltration is an energy-consuming process, however, the total UF costs can be reduced by optimization of the flux [58].In the present study, the optimal TMP of 0.4 MPa was selected, at which the membrane resistance caused by fouling was the lowest.To achieve a similar effect of the treatment, instead of UF, secondary clarifiers can be used followed by conventional media filtration system.However, Chew et al. [59] reported that the investment cost of the UF system is only 5.6% higher than the conventional filtration system, while the land requirement for UF is 69.6% less.Thus, in areas where land is scarce and expensive, the UF system may be finally cheaper.In addition, apart from removal of particles and turbidity, UF is effective in removal of bacteria and cysts which makes this technique effective to polish the secondary effluents for unrestricted reuse, primarily for irrigation [60].Therefore, in applications in which the expected quality of the final effluent is particularly important, for example in water reuse, membrane filtration is considered the most reasonable solution.

Conclusions
The ammonium-and organic-rich liquid phase of digestate from agricultural biogas plants was treated in a mixture with municipal wastewater in GSBRs, and the effluent was then subjected to UF.At the shortest GSBR cycle, efficient simultaneous heterotrophic nitrification/denitrification occurred and low concentrations of NO x (about 16 mg/L) and ammonium nitrogen (0.83 ± 0.71 mg/L) were observed in the effluent.Longer cycles favored nitrification over denitrification, and as a result, high concentrations of NO x were observed in the effluents from GSBR 8h and GSBR 12h (about 290 mg/L and 180 mg/L, respectively).Molecular analyses indicated that at high organic and nitrogen loads biomass was predominated with species that efficiently degrade complex organic compounds and metabolize nitrogen in heterotrophic processes.Predominant genera in granular sludge from GSBR 6h and GSBR 12h were Thauera sp.(15.69% and 15.96%, respectively) and Lacibacter sp.(7.79% and 8.03%, respectively), while in GSBR 8h Thermanaerothrix sp.(11.64%) and Planctomyces sp.(10.80%) were most numerous.Lengthening GSBR cycle diminished proteins in Sol-EPS resulting in better quality of the effluent in terms of COD and favored formation of large, stable granules with higher content of polysaccharides.Using UF (TMP 0.4 MPa) to treat the effluent from GSBR 8h , in which ammonium oxidation finished 2 h before the end of the cycle, produced permeate that is suitable for reuse.Waste generated in the process such as retentate or excess granular sludge can be recycled to biogas plant, in line with the assumptions of a modern circular economy.
Water 2019, 11, x FOR PEER REVIEW 9 of 18

Figure 4 .
Figure 4. Granule diameters (a), and concentrations of proteins (b), and polysaccharides (c) in extracellular polymeric substances (EPS) depending on the length of the GSBR cycle.

Figure 4 .
Figure 4. Granule diameters (a), and concentrations of proteins (b), and polysaccharides (c) in extracellular polymeric substances (EPS) depending on the length of the GSBR cycle.

Figure 6 .
Figure 6.Effluents after particular stages of the treatment.

Figure 6 .
Figure 6.Effluents after particular stages of the treatment.

Table 1 .
Efficiencies and kinetics during the treatment in granular sludge batch reactors (GSBRs).
Water 2019, 11, x FOR PEER REVIEW 6 of 18

Table 2 .
Results of membrane filtration and treatment in GSBR 8h -UF system (repetitions from 2 measurements).