MBR-Assisted VFAs Production from Excess Sewage Sludge and Food Waste Slurry for Sustainable Wastewater Treatment

: The signiﬁcant amount of excess sewage sludge (ESS) generated on a daily basis by wastewater treatment plants (WWTPs) is mainly subjected to biogas production, as for other organic waste streams such as food waste slurry (FWS). However, these organic wastes can be further valorized by production of volatile fatty acids (VFAs) that have various applications such as the application as an external carbon source for the denitriﬁcation stage at a WWTP. In this study, an immersed membrane bioreactor set-up was proposed for the stable production and in situ recovery of clariﬁed VFAs from ESS and FWS. The VFAs yields from ESS and FWS reached 0.38 and 0.34 gVFA / gVS added , respectively, during a three-month operation period without pH control. The average ﬂux during the stable VFAs production phase with the ESS was 5.53 L / m 2 / h while 16.18 L / m 2 / h was attained with FWS. Moreover, minimal ﬂux deterioration was observed even during operation at maximum suspended solids concentration of 32 g / L, implying that the membrane bioreactors could potentially guarantee the required volumetric productivities. In addition, the techno-economic assessment of retroﬁtting the membrane-assisted VFAs production process in an actual WWTP estimated savings of up to 140 € / h for replacing 300 kg / h of methanol with VFAs.


Introduction
One of the consequences of the ever-growing global population is the generation of enormous amounts of different wastes on a daily basis. In order to build modern societies that maintain the balance between social, economic, and environmental sustainability, these waste streams should be effectively and efficiently treated. Among different waste streams, handling wastewater is of critical importance as its poor treatment and discharge to water bodies imposes a substantial environmental and ecological imbalance on marine life, in addition to diverse direct and indirect effects on human health [1,2]. In conventional wastewater treatment (WWT) systems, in order to remove carbonaceous compounds and nutrients such as nitrogen and phosphorous to obtain clean water accepted for discharge, the received influent wastewater undergoes different treatment stages of biochemical oxygen demand (BOD) reduction, nitrification, and denitrification (with different orders in different treatment plants) [3]. Figure 1 presents a general schematic of the main wastewater treatment stages. Conventionally, the excess sludge discharged at different stages of treatment is directed to biogas and fertilizer production through anaerobic digestion (AD). For instance, in Sweden, about 204,000 tons of dry matter of sewage sludge (20.74 kilograms per capita) was produced in 2017, of which only 34% was used for agricultural purposes [4]. In addition to the excess sewage sludge, food waste is one of the most studied wastes streams that is mainly treated using anaerobic digestion due to its richness in organic strength [5,6]. The biochemical reactions in the AD process take place in four interdependent stages namely: hydrolysis, acidogenesis, acetogenesis, and methanogenesis ( Figure  2) [7]. Biomethane is produced in the last stage of the AD process, while other metabolites such as volatile fatty acids (VFAs) and hydrogen are formed in the intermediate stages [8]. Biogas suffers low commercial value; however, a promising but hitherto not well-developed line of research is to extract and transform the intermediate products of AD (VFAs and H2). These compounds can be further converted into several high-value products, such as bioplastics, butanol and biodiesel [9]. The VFAs, such as acetic, butyric, and propionic acids, produced through AD, can be used directly or indirectly as chemical building blocks in, for instance, textile and plastic production industries [8]. Along with VFAs, hydrogen is produced during acidogenesis, which has attracted great attention as a clean energy source. However, issues such as VFA loss due to conversion to methane, change in pH, and cell inhibition by a high concentration of VFAs hinder obtaining high VFAs yields. In a mixed microbial culture, if the methanogens are not inhibited or the products of acidogenesis are not recovered efficiently, the VFAs will be lost through methanogenesis for methane production. Therefore, it is of great importance to be able to control the AD process to produce mainly desirable VFAs of higher value and application. However, a solution with a mixture of VFAs has a low market value, therefore, it needs to either be converted to other bioproducts or to be separated into pure components. Due to the formation of an azeotropic mixture with water, VFAs separation and recovery is laborious and energy intensive [10]. Thus, the direct application of VFAs mixture can eliminate extra energy intensive recovery processes and enhance economic feasibility. Conventionally, the excess sludge discharged at different stages of treatment is directed to biogas and fertilizer production through anaerobic digestion (AD). For instance, in Sweden, about 204,000 tons of dry matter of sewage sludge (20.74 kg per capita) was produced in 2017, of which only 34% was used for agricultural purposes [4]. In addition to the excess sewage sludge, food waste is one of the most studied wastes streams that is mainly treated using anaerobic digestion due to its richness in organic strength [5,6]. The biochemical reactions in the AD process take place in four interdependent stages namely: hydrolysis, acidogenesis, acetogenesis, and methanogenesis ( Figure 2) [7]. Biomethane is produced in the last stage of the AD process, while other metabolites such as volatile fatty acids (VFAs) and hydrogen are formed in the intermediate stages [8]. Biogas suffers low commercial value; however, a promising but hitherto not well-developed line of research is to extract and transform the intermediate products of AD (VFAs and H 2 ). These compounds can be further converted into several high-value products, such as bioplastics, butanol and biodiesel [9]. The VFAs, such as acetic, butyric, and propionic acids, produced through AD, can be used directly or indirectly as chemical building blocks in, for instance, textile and plastic production industries [8]. Along with VFAs, hydrogen is produced during acidogenesis, which has attracted great attention as a clean energy source. However, issues such as VFA loss due to conversion to methane, change in pH, and cell inhibition by a high concentration of VFAs hinder obtaining high VFAs yields. In a mixed microbial culture, if the methanogens are not inhibited or the products of acidogenesis are not recovered efficiently, the VFAs will be lost through methanogenesis for methane production. Therefore, it is of great importance to be able to control the AD process to produce mainly desirable VFAs of higher value and application. However, a solution with a mixture of VFAs has a low market value, therefore, it needs to either be converted to other bioproducts or to be separated into pure components. Due to the formation of an azeotropic mixture with water, VFAs separation and recovery is laborious and energy intensive [10]. Thus, the direct application of VFAs mixture can eliminate extra energy intensive recovery processes and enhance economic feasibility. During the wastewater treatment process, unlike nitrification bacteria that use inorganic carbon sources such as CO2 to thrive on, the bacteria responsible for denitrification require organic carbon source for maintaining growth and acquiring energy [11]. The problem confronted here is that, as most of the organic carbon source has been depleted in the initial BOD removal stage, external organic carbon sources should be provided to the process. The external organic carbon sources, such as methanol, ethanol, and glucose, impose external loads on a wastewater treatment plant, resulting in it being a far from self-sustained independent process [12]. Other drawbacks associated with external carbon source provision include the extra purchase and transfer costs, occasional and seasonal changes in the price and availability, and the environmental unsustainability of the wastewater treatment process in the case of the application of fossil-fuel-derived carbon sources such as methanol. Moreover, safety and storage regulations should be imposed if hazardous and flammable sources such as methanol and ethanol are to be used [13]. Thus, a sustainable alternative for the external carbon source is needed in order to change the wastewater treatment process into a self-sustained process. VFAs could be alternative carbon sources for the denitrification process and, based on their production from waste streams, they can relieve the dependency on fossil-based carbon sources. Moreover, the mixture of VFAs can be used directly as a carbon source for the denitrification process without downstream purification demands. Many studies have tested the effectiveness of VFAs as a carbon source for the denitrification process [13][14][15][16][17][18]. In this regard, VFAs higher denitrification rates have been reported compared to methanol. Moreover, due to their continuous on-site production, extra costs such as transportation will be eliminated.
Although there has been extensive work on the production of VFAs from waste streams [19], the process cannot easily be scaled up to industrial level due to challenges faced during the recovery of VFAs from the system [10]. The recovery of VFAs from the bioreactor is crucial to the downstream processing, and production stability and efficiency [20]. Due to the complex physiochemical nature of the fermentation broth and low concentration of acids in the system, separating the VFAs from the fermentation broth is a challenging task [21]. Different separation techniques have been used for the recovery of the VFAs, such as distillation [22], liquid-liquid extraction [23], centrifugation [24], electrodialysis [25], and membrane filtration [9,21]. The membrane-assisted process seems to be a cost-effective and stable recovery method among the current separation methods, with low energy demands and a small footprint. Another study in our group [9] has reported an effective membraneassisted process for production and in situ recovery of VFAs from synthetic food waste, resulting in high VFAs yield and productivity.
Membrane-assisted cell retention systems benefit from a selective synthetic membrane to retain cells and specific compounds in the bioreactor while allowing other soluble compounds to pass freely During the wastewater treatment process, unlike nitrification bacteria that use inorganic carbon sources such as CO 2 to thrive on, the bacteria responsible for denitrification require organic carbon source for maintaining growth and acquiring energy [11]. The problem confronted here is that, as most of the organic carbon source has been depleted in the initial BOD removal stage, external organic carbon sources should be provided to the process. The external organic carbon sources, such as methanol, ethanol, and glucose, impose external loads on a wastewater treatment plant, resulting in it being a far from self-sustained independent process [12]. Other drawbacks associated with external carbon source provision include the extra purchase and transfer costs, occasional and seasonal changes in the price and availability, and the environmental unsustainability of the wastewater treatment process in the case of the application of fossil-fuel-derived carbon sources such as methanol. Moreover, safety and storage regulations should be imposed if hazardous and flammable sources such as methanol and ethanol are to be used [13]. Thus, a sustainable alternative for the external carbon source is needed in order to change the wastewater treatment process into a self-sustained process. VFAs could be alternative carbon sources for the denitrification process and, based on their production from waste streams, they can relieve the dependency on fossil-based carbon sources. Moreover, the mixture of VFAs can be used directly as a carbon source for the denitrification process without downstream purification demands. Many studies have tested the effectiveness of VFAs as a carbon source for the denitrification process [13][14][15][16][17][18]. In this regard, VFAs higher denitrification rates have been reported compared to methanol. Moreover, due to their continuous on-site production, extra costs such as transportation will be eliminated.
Although there has been extensive work on the production of VFAs from waste streams [19], the process cannot easily be scaled up to industrial level due to challenges faced during the recovery of VFAs from the system [10]. The recovery of VFAs from the bioreactor is crucial to the downstream processing, and production stability and efficiency [20]. Due to the complex physiochemical nature of the fermentation broth and low concentration of acids in the system, separating the VFAs from the fermentation broth is a challenging task [21]. Different separation techniques have been used for the recovery of the VFAs, such as distillation [22], liquid-liquid extraction [23], centrifugation [24], electrodialysis [25], and membrane filtration [9,21]. The membrane-assisted process seems to be a cost-effective and stable recovery method among the current separation methods, with low energy demands and a small footprint. Another study in our group [9] has reported an effective membrane-assisted process for production and in situ recovery of VFAs from synthetic food waste, resulting in high VFAs yield and productivity.
Membrane-assisted cell retention systems benefit from a selective synthetic membrane to retain cells and specific compounds in the bioreactor while allowing other soluble compounds to pass freely through the membrane. This separation occurs either due to the convection caused by pressure difference over the membrane as the driving force or diffusion of specific compounds due to concentration gradient built over the membrane layer. The selective behavior depends on the membrane characteristics such as pore size and morphology, membrane charge, affinity, and hydrophobicity. Although membrane bioreactors (MBRs) have long been used for wastewater treatment purposes, integration of MBR technology in biological processes is not fully developed at the industrial scale. By the application of MBRs in bioconversion processes, high concentrations of active microorganisms can be retained in the bioreactor and cell washout can be eliminated during continuous processes. This ease of continuous operation guarantees higher productivity rates [26]. Moreover, solid retention time can be controlled independently from hydraulic retention time [20]. Additionally, as the feeding and removal of metabolites can be controlled, metabolites of a specific stage of bioconversion can be removed from the bioreactor to suppress substrate or product inhibition.
This study aimed at finding a feasible approach for production and recovery of VFAs from excess sludge and food waste for further application in the denitrification stage of WWT. In this regard, a novel semi-continuous membrane-assisted process was designed to produce and recover VFAs from excess sewage sludge and food waste slurry. Furthermore, in order to facilitate sludge and food waste hydrolysis, inhibit methane formation, and enhance VFAs yield and volumetric productivity, a series of different pretreatment approaches (thermal, thermochemical, etc.), batch anaerobic digestion conditions (initial pH, substrates types, etc.), and continuous VFAs fermentation using long-term immersed MBR were taken into consideration. Finally, the economic feasibility of retrofitting MBRs into the wastewater treatment process and the potential of the application of produced VFAs as a bio-based carbon source, replacing the conventional fossil-based methanol, to meet denitrification demands in a WWTP is analyzed.

Substrate and Seeding Inoculum
As substrates, this study used the excess sewage sludge (ESS) and food waste slurry (FWS) collected from a wastewater treatment plant Gryaab AB (Gothenburg, Sweden) and a solid waste treatment company Renova AB (Gothenburg, Sweden), respectively. The food waste slurry was prepared from food wastes collected from households and retailers within Gothenburg municipality, was diluted using 20% water, and screw pressed through a 10mm mesh. The substrates were stored in a freezer and thawed in a cold room (4-5 • C) prior to use as feed in the bioreactors. The main characterization data for these substrates are provided in Table 1. The granulated bacteria used as inoculum for the batch reactors were collected from an upflow anaerobic sludge blanket reactor treating municipal wastewater (Hammarby Sjöstad, Stockholm, Sweden). The fermentation broth from another study by our group [27] was used as inoculum seed for the immersed membrane bioreactors (iMBRs).

Thermal and Thermochemical Pretreatment
Thermal pretreatment was performed on both food waste slurry and excess sewage sludge at three different temperatures: 70, 90, and 100 • C. Each different pretreatment case was operated at different durations between 30 min to 4 h. A quantity of 12.5 mL of the substrate (food waste slurry or excess sewage sludge) was added to a 100 mL glass bottle and tap water added to have a final volume of 50 mL. A water bath shaker was used to set the temperature at the designated point. For the thermochemical pretreatment of both substrates the following conditions with different ranges were tested: alkali NaOH/Ca(OH) 2 , temperature 70/90 • C, and duration 30 min to 4 h. A total of 12.5 mL substrate was added to a 100 mL glass bottle and the required dose of alkali was added to have pH level 12; then, tap water was added to have the final volume of 50 mL. For the pretreatment, adequate amounts of 4M NaOH solution and Ca(OH) 2 powder were used in respective experiments to reach a pH level of 12. A water bath shaker was used to have the desired temperature. The soluble chemical oxygen demand (sCOD) of ESS and FWS were measured after each pretreatment and compared with the initial sCOD values. The increase in sCOD was reported as percentage of the initial sCOD values. The desirable pretreatment for subsequent acidogenic fermentation was selected based on an increase in sCOD of substrate after pretreatment.

Batch Set-Up
The effect of pretreatment on the acidogenic fermentation of the excess sewage sludge and food waste slurry was evaluated in batch mode using 120 mL serum glass bottles as the reactor. Each reactor was fed with 1 g VS substrate and 0.33 g VS inoculum seed. The volume of each reactor was fixed at 50 mL by adding tap water. Then, the pH of each reactor was set to the designated level. Finally, reactors were sealed by using aluminum caps with a rubber stopper and purged with nitrogen for approximately 2 min to achieve anaerobic conditions. The reactors were incubated at 37 • C and 120 rpm in a water bath shaker. The combination of the following conditions was tested in the batch set-up in three replicates: food waste, excess sewage sludge, pretreated food waste, pretreated excess sewage sludge, and initial pH levels 5, 8, 10, and 12. Two blanks were used, one containing seed inoculum and the other containing excess sewage sludge.

Immersed Membrane Bioreactor (iMBR) Set-Up
Two semi-continuous processes were operated for VFA production and recovery without external control of pH or substrate pretreatment. Each process consisted of a continuous stirred tank reactor (BBI biotech, Berlin, Germany) with 2 L working volume, equipped with a radial impeller (BBI biotech, Berlin, Germany), and an immersed flat-sheet membrane panel.
The membrane used in this work was a custom-made 2nd generation Integrated Permeate Channel (IPC) membrane panel (VITO NV, Mol, Belgium) with double filtration layers and effective area of 68.6 cm 2 . The filtration layers were cast on a polyester spacer-fabric, which made it suitable for the application of backwash. The mean pore size of the membrane was~0.3 µm. The IPC membrane had inbuilt gas channels with 6 diffusers on each side of the panel for scouring the membrane surface during the filtration cycle. For membrane cleaning purposes nitrogen gas was sparged through membrane diffusers. The permeate channel was connected to a peristaltic pump (Watson Marlow, Wilmington, UK). Ultrasonic flowmeter (Atrato, Titan Enterprises, Sherborne, UK) and stand-alone volumetric gas flow meter (µFLOW, Bioprocess Control AB, Lund, Sweden) were used for measuring the permeate flow and volume of produced gas, respectively. The filtration cycle included a 2 min filtration followed by 30 s of backwash which were operated automatically by using an electric relay (Zelio Logic SR2A101BD, Schneider Electric Automation GmbH, Marktheidenfeld, Germany). The schematic diagram of the set-up is presented in Figure 3.
conditions. The temperature and impeller mixing speed were set at 37 °C and 100 rpm, respectively. The acclimatization of the seed inoculum was conducted in the main reactors for 34 days with the organic loading rate (OLR) of 0.2 gVS/L/day. The actual fermentation was started, after which the bioreactors were operated at an OLR of 1 gVS/L/day for 30 days. Then, the OLR was raised to 3 gVS/L/day for the remaining fermentation period. The mode of operation was semi-continuous, which was carried out by filtration cycle followed by feeding reactor on a daily basis.

Analytical Method
The total solids (TS), suspended solids (SS), VS, ammonium-nitrogen (NH4 + -N), total chemical oxygen demand (tCOD), and soluble chemical oxygen demand (sCOD) concentrations were measured according to standard methods [28] The gas samples were taken by a 250 μL gas-tight syringe (VICI, Precision Sampling Inc., USA) daily and were analyzed using a gas chromatograph (Perkin-Elmer, Norwalk, CT., USA) with a thermal conductivity detector and equipped with a packed column (CarboxenTM 1000, SUPELCO, 6′ × 1.8″ OD, 60/80 Mesh, Shelton, CT., USA). The injection temperature was 200 °C and nitrogen used as the carrier gas with a flow rate of 30 mL/min at 75 °C. The VFAs were analyzed by High-Performance Liquid Chromatography (Waters 2695, Waters Corporation, Milford, USA) equipped with a hydrogen-ion based ion exchange column (Aminex HPX87-H, BioRad Laboratories, München, Germany) at 60 °C and with 0.6 mL/min 5 mM H2SO4 as eluent. An ultraviolet (UV) absorbance detector (Waters 2487, Waters Corporation, Milford, MA, USA), at 210 nm wavelength, was used to measure the concentration of different VFAs in the samples.

Statistical Analysis
All pretreatment and batch fermentation experiments in this study were carried out in triplicate. Average values are reported in the text and graphs are illustrating the average values plus error bars for two standard deviations. MINITAB ® 17 (Minitab Ltd., Coventry, UK) was used for statistically analyzing the data. The one-way analysis of variance (ANOVA) with a confidence interval of 95% was used to analyze the data.

Process Feasibility Study
The main purpose of the application of the iMBR set-up for the production of VFAs from food waste and excess sludge was the provision of the carbon source required for denitrification purposes in the WWT process. In this regard, two hypothetic scenarios were considered for the application of excess sludge and food waste as the substrate for VFAs production using the iMBR. The ultimate goal for both scenarios was to replace methanol used during denitrification with VFA permeate from the iMBR. The data used as the basis for the calculations and further comparison of different cases are Each reactor was inoculated with 800 mL inoculation broth and 0.2 gVS/L of the substrate (one reactor with non-pretreated food waste slurry and another one with non-pretreated excess sewage sludge). Subsequently, tap water was added to each reactor to have a working volume of 2 L. Finally, each reactor was sealed and purged with nitrogen gas for five minutes to have the anaerobic conditions. The temperature and impeller mixing speed were set at 37 • C and 100 rpm, respectively. The acclimatization of the seed inoculum was conducted in the main reactors for 34 days with the organic loading rate (OLR) of 0.2 gVS/L/day. The actual fermentation was started, after which the bioreactors were operated at an OLR of 1 gVS/L/day for 30 days. Then, the OLR was raised to 3 gVS/L/day for the remaining fermentation period. The mode of operation was semi-continuous, which was carried out by filtration cycle followed by feeding reactor on a daily basis.

Analytical Method
The total solids (TS), suspended solids (SS), VS, ammonium-nitrogen (NH4 + -N), total chemical oxygen demand (tCOD), and soluble chemical oxygen demand (sCOD) concentrations were measured according to standard methods [28] The gas samples were taken by a 250 µL gas-tight syringe (VICI, Precision Sampling Inc., Baton Rouge, LA, USA) daily and were analyzed using a gas chromatograph (Perkin-Elmer, Norwalk, CT, USA) with a thermal conductivity detector and equipped with a packed column (CarboxenTM 1000, SUPELCO, 6 × 1.8" OD, 60/80 Mesh, Shelton, CT, USA). The injection temperature was 200 • C and nitrogen used as the carrier gas with a flow rate of 30 mL/min at 75 • C. The VFAs were analyzed by High-Performance Liquid Chromatography (Waters 2695, Waters Corporation, Milford, MA, USA) equipped with a hydrogen-ion based ion exchange column (Aminex HPX87-H, BioRad Laboratories, München, Germany) at 60 • C and with 0.6 mL/min 5 mM H 2 SO 4 as eluent. An ultraviolet (UV) absorbance detector (Waters 2487, Waters Corporation, Milford, MA, USA), at 210 nm wavelength, was used to measure the concentration of different VFAs in the samples.

Statistical Analysis
All pretreatment and batch fermentation experiments in this study were carried out in triplicate. Average values are reported in the text and graphs are illustrating the average values plus error bars for two standard deviations. MINITAB ® 17 (Minitab Ltd., Coventry, UK) was used for statistically analyzing the data. The one-way analysis of variance (ANOVA) with a confidence interval of 95% was used to analyze the data.

Process Feasibility Study
The main purpose of the application of the iMBR set-up for the production of VFAs from food waste and excess sludge was the provision of the carbon source required for denitrification purposes in the WWT process. In this regard, two hypothetic scenarios were considered for the application of excess sludge and food waste as the substrate for VFAs production using the iMBR. The ultimate goal for both scenarios was to replace methanol used during denitrification with VFA permeate from the iMBR. The data used as the basis for the calculations and further comparison of different cases are based on actual average data provided by Gryaab AB (Gothenburg, Sweden) for a WWTP with processing stages presented in Figure 4. Figure 4 also considers the base scenario for the treatment of food waste for biogas production.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 7 of 20 based on actual average data provided by Gryaab AB (Gothenburg, Sweden) for a WWTP with processing stages presented in Figure 4. Figure 4 also considers the base scenario for the treatment of food waste for biogas production. The two scenarios for the integration of iMBRs into the VFAs production process using food waste and excess sludge are presented in Figures 5 and 6. In this scenarios, VFAs production from FWS and ESS in two AD MBRs working at an OLR of 3 gVS/L/day, hydraulic retention time of 10 days, and filtration flux of 7.5 L/m 2 /h were considered. In this regard, the economic feasibility calculations on the capital and operational expenses were made for conditions that the VFA solution obtained as permeate is fed as an external carbon source to the denitrification stage for complete replacement of the conventionally used methanol.  The two scenarios for the integration of iMBRs into the VFAs production process using food waste and excess sludge are presented in Figures 5 and 6. In this scenarios, VFAs production from FWS and ESS in two AD MBRs working at an OLR of 3 gVS/L/day, hydraulic retention time of 10 days, and filtration flux of 7.5 L/m 2 /h were considered. In this regard, the economic feasibility calculations on the capital and operational expenses were made for conditions that the VFA solution obtained as permeate is fed as an external carbon source to the denitrification stage for complete replacement of the conventionally used methanol.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 7 of 20 based on actual average data provided by Gryaab AB (Gothenburg, Sweden) for a WWTP with processing stages presented in Figure 4. Figure 4 also considers the base scenario for the treatment of food waste for biogas production. The two scenarios for the integration of iMBRs into the VFAs production process using food waste and excess sludge are presented in Figures 5 and 6. In this scenarios, VFAs production from FWS and ESS in two AD MBRs working at an OLR of 3 gVS/L/day, hydraulic retention time of 10 days, and filtration flux of 7.5 L/m 2 /h were considered. In this regard, the economic feasibility calculations on the capital and operational expenses were made for conditions that the VFA solution obtained as permeate is fed as an external carbon source to the denitrification stage for complete replacement of the conventionally used methanol.  In order to have a general understanding of the economic feasibility of applying either of the scenarios to provide the required amounts of VFAs for methanol replacement, the following main parameters were considered in the estimation: membrane price (100 €/m 2 ), scouring gas demand per unit area of membrane per time (0.09 Nm 3 /m 2 .h), specific energy demand for gas sparging (0.04 kWh/m 3 ), membrane life (8 years

Effect of Thermal and Thermochemical Pretreatment on Substrate Solubilization
Thermal and thermochemical pretreatments with different conditions were applied to excess sewage sludge and food waste slurry. The sCOD of pretreated materials, as it can reflect the effectiveness of the pretreatment method in substrate solubilization, are reported in Figure 7. As can be observed from the figure, the result of thermal pretreatment at 70 and 90 °C for excess sewage sludge was similar. The sCOD of the substrate almost doubled, which accounted for roughly 20% of the excess sewage sludge tCOD, after 30 min of pretreatment; however, this increase did not change significantly during the 4 h of pretreatment. This suggested that increasing temperature from 70 to 90 °C or increasing exposure time from 30 min to 4 h does not affect thermal pretreatment. Xue, et al. [29] reported that thermal pretreatment at 70 and 90 °C led to similar increases in sCOD at short pretreatment duration (less than 12 h), however, pretreatment at 90 °C with duration more than 24 h showed better results. In the case of food waste slurry, both temperature and exposure time influence thermal pretreatment effectiveness. Thermal pretreatment at 90 °C was more effective compared to pretreatment at 70 °C as the increase in sCOD was between 18%-33% for the 90 °C pretreatment and 6%-21% for the 70 °C pretreatment at different contact times, respectively. Regarding thermochemical pretreatment of substrates, pretreatment with Ca(OH)2 at 70 and 90 °C for both excess sewage sludge and food waste slurry resulted in similar increases in sCOD compared to thermal pretreatment at respective temperatures. However, pretreatment with NaOH showed significant increases (p < 0.05) in sCOD. Similarly, Penaud, et al. [30] and Kim, et al. [31] reported that thermochemical pretreatment with Ca(OH)2 is less effective for solubilizing the biomass compared to NaOH. This could be due to the low solubility of Ca(OH)2 in water. Pretreating excess sewage sludge with NaOH at 70 and 90 °C for 30 min resulted in 5.30-and 6.35-times increases in sCOD, respectively. Exposure time did not affect the pretreatment at 90 °C considerably but had an impact on pretreatment at 70 °C as the sCOD of pretreated sludge increased from 28.4 g/L after 30 min to 37.2 g/L after 4 h of pretreatment. Thermal and thermochemical pretreatment improved the disintegration of both excess sewage sludge and food waste slurry; however, this does not necessarily lead to improvement of the further biodegradation, since other compounds such as heavy metals, inhibitors, and high complex compounds can be released in the water phase. Thus it is necessary to evaluate the

Effect of Thermal and Thermochemical Pretreatment on Substrate Solubilization
Thermal and thermochemical pretreatments with different conditions were applied to excess sewage sludge and food waste slurry. The sCOD of pretreated materials, as it can reflect the effectiveness of the pretreatment method in substrate solubilization, are reported in Figure 7. As can be observed from the figure, the result of thermal pretreatment at 70 and 90 • C for excess sewage sludge was similar. The sCOD of the substrate almost doubled, which accounted for roughly 20% of the excess sewage sludge tCOD, after 30 min of pretreatment; however, this increase did not change significantly during the 4 h of pretreatment. This suggested that increasing temperature from 70 to 90 • C or increasing exposure time from 30 min to 4 h does not affect thermal pretreatment. Xue, et al. [29] reported that thermal pretreatment at 70 and 90 • C led to similar increases in sCOD at short pretreatment duration (less than 12 h), however, pretreatment at 90 • C with duration more than 24 h showed better results. In the case of food waste slurry, both temperature and exposure time influence thermal pretreatment effectiveness. Thermal pretreatment at 90 • C was more effective compared to pretreatment at 70 • C as the increase in sCOD was between 18-33% for the 90 • C pretreatment and 6-21% for the 70 • C pretreatment at different contact times, respectively. Regarding thermochemical pretreatment of substrates, pretreatment with Ca(OH) 2 at 70 and 90 • C for both excess sewage sludge and food waste slurry resulted in similar increases in sCOD compared to thermal pretreatment at respective temperatures. However, pretreatment with NaOH showed significant increases (p < 0.05) in sCOD. Similarly, Penaud, et al. [30] and Kim, et al. [31] reported that thermochemical pretreatment with Ca(OH) 2 is less effective for solubilizing the biomass compared to NaOH. This could be due to the low solubility of Ca(OH) 2 in water. Pretreating excess sewage sludge with NaOH at 70 and 90 • C for 30 min resulted in 5.30-and 6.35-times increases in sCOD, respectively. Exposure time did not affect the pretreatment at 90 • C considerably but had an impact on pretreatment at 70 • C as the sCOD of pretreated sludge increased from 28.4 g/L after 30 min to 37.2 g/L after 4 h of pretreatment. Thermal and thermochemical pretreatment improved the disintegration of both excess sewage sludge and food waste slurry; however, this does not necessarily lead to improvement of the further biodegradation, since other compounds such as heavy metals, inhibitors, and high complex compounds can be released in the water phase. Thus it is necessary to evaluate the effect of pretreatment on the anaerobic digestion. Considering the results of the pretreatment step, industrial and economic aspects of the pretreatment method, using both thermal and thermochemical (NaOH) pretreatment at 90 • C for 30 min, were chosen for the next phase of the experiment.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 9 of 20 effect of pretreatment on the anaerobic digestion. Considering the results of the pretreatment step, industrial and economic aspects of the pretreatment method, using both thermal and thermochemical (NaOH) pretreatment at 90 °C for 30 min, were chosen for the next phase of the experiment.

Effect of Pretreatment and Initial pH on VFAs Production in Batch Fermentation
Effects of the chosen thermal (90 °C for 30 min), thermochemical pretreatments (90 °C and NaOH for 30 min), and initial pH (5, 8, 10, and 12) on VFAs production from excess sewage sludge and food waste slurry were evaluated in batch reactors and the total VFAs concentrations. The averages of three replicates are reported in Figure 8.

Effect of Pretreatment and Initial pH on VFAs Production in Batch Fermentation
Effects of the chosen thermal (90 • C for 30 min), thermochemical pretreatments (90 • C and NaOH for 30 min), and initial pH (5, 8, 10, and 12) on VFAs production from excess sewage sludge and food waste slurry were evaluated in batch reactors and the total VFAs concentrations. The averages of three replicates are reported in Figure 8.
For the excess sewage sludge without pretreatment as the substrate, the highest total VFAs concentration at the end of the fermentation (day 25) occurred at pH 12 with the value 14.73 g/L (VFAs yield of 0.46 g VFA/g VS by day 25) followed by 9.73 g/L, at pH 5. The total VFAs concentration was almost zero for pH 8 and 10 on day 25. The final pH levels of the reactors are reported in Table 2. The pH in reactors with initial pH levels of 8 and 10 dropped to 7.3, which made the system more suitable for biogas production [32]. Thus, the reason for the low level of VFAs in the system could be due to their conversion to biogas. These results seem reasonable given the gas production data (Figure 9). The accumulated biogas volume at pH 8 was 177.9 mL (58.17% methane) which is almost 14 times the biogas volume at either pH 5 or 12. The accumulated biogas volume at pH 10 was 88.59 mL with 67.77% methane content. For the excess sewage sludge without pretreatment as the substrate, the highest total VFAs concentration at the end of the fermentation (day 25) occurred at pH 12 with the value 14.73 g/L (VFAs yield of 0.46 g VFA/g VS by day 25) followed by 9.73 g/L, at pH 5. The total VFAs concentration was almost zero for pH 8 and 10 on day 25. The final pH levels of the reactors are reported in Table  2. The pH in reactors with initial pH levels of 8 and 10 dropped to 7.3, which made the system more suitable for biogas production [32]. Thus, the reason for the low level of VFAs in the system could be due to their conversion to biogas. These results seem reasonable given the gas production data (Figure 9). The accumulated biogas volume at pH 8 was 177.9 mL (58.17% methane) which is almost 14 times the biogas volume at either pH 5 or 12. The accumulated biogas volume at pH 10 was 88.59 mL with 67.77% methane content. Similar to the case of excess sewage sludge without pretreatment, the highest final total VFA concentration for the thermally pretreated excess sewage sludge was achieved at pH 12 with value 11.83 g/L, although the maximum VFAs concentration during the fermentation, 13.94 g/L, belonged to pH 10 at day 6 ( Figure 8b). The VFAs accumulation trend at pH 8, 10, and 12 were quite similar to the trend of not pretreated excess sewage sludge but the trend at pH 5 was totally different. The total VFA concentration at pH 5 increased till day 6 and reached its maximum, 7.68 g/L, and thereafter decreased gradually until the end of fermentation (day 25). The final total concentration was 2.38 g/L, roughly 20% amount of the VFAs from not pretreated excess sewage sludge at pH 5. The accumulated biogas volume at pH 5 was 69 mL compared to 13 mL from not pretreated excess sewage sludge. This huge increase in biogas production indicated that the lower amount of VFAs was due to their conversion to biogas. The pH at the end of fermentation was 6.72, which is suitable for biogas production. Comparing the amount of NH 4 + -N in the thermally pretreated excess sewage sludge system with the not pretreated excess sewage sludge system suggests that a higher NH 4 + -N amount provides higher buffering capacity that maintains the pH for better biogas production. For instance, the NH 4 + -N amounts for the system with thermally pretreated excess sewage sludge and the system with non-pretreated excess sewage sludge at day 9 were 813.33 mg/L and 206.66 mg/L, respectively. Zhai, et al. [33] reported that in anaerobic digestion VFAs in the system could be neutralized by proper NH 4 + -N concentration. Total VFAs concentration trends for fermentation with thermochemically pretreated excess sewage sludge were quite similar to trends of VFAs from thermally pretreated excess sewage sludge, however, the final total VFAs concentration was slightly higher. The final total VFAs concentration was 13.99 g/L at pH 12 (Figure 8c). Comparing the total VFAs concentrations (Figure 8a-c) indicates that pretreatment did not improve the accumulation of VFAs in the system in most pH levels; even in the case of pH 5, it reduced total VFAs significantly.
In the anaerobic digestion with non-pretreated food waste slurry, the highest total VFAs concentration was 16.40 g/L and obtained at pH 12, day 16. The rate of VFAs accumulation during the initial days was higher at higher alkalinity; for instance, it was highest at pH 12 and the highest yield of VFAs at the end of fermentation (0.558 g VFA/g VS) was obtained at this pH. Hussain et al. [34] similarly reported higher VFAs yield at higher pH. The accumulated amount of produced methane in each pH was less than 10 mL (approximately 8-20% of total biogas). The final pH of reactors was less than 5 in all reactors (Table 2) which can explain the low methane production due to inhibition of methanogens at low pH.
The VFAs accumulation trend for both thermally and thermochemically pretreated food waste slurry was similar (Figure 8d-f)). Total VFAs concentration ramped up during the initial days and after that increased gradually until the last day of fermentation. The final total VFAs concentration for the thermochemically pretreated food waste slurry at each pH level was higher than the final values for thermally pretreated food waste slurry at respective pH levels. However, except for pH 12, the final total VFAs concentration at all other pH levels was lower than the values for the not pretreated food waste slurry. Appl. Sci. 2020, 10, x FOR PEER REVIEW 11 of 20 Similar to the case of excess sewage sludge without pretreatment, the highest final total VFA concentration for the thermally pretreated excess sewage sludge was achieved at pH 12 with value 11.83 g/L, although the maximum VFAs concentration during the fermentation, 13.94 g/L, belonged to pH 10 at day 6 ( Figure 8b). The VFAs accumulation trend at pH 8, 10, and 12 were quite similar to the trend of not pretreated excess sewage sludge but the trend at pH 5 was totally different. The total VFA concentration at pH 5 increased till day 6 and reached its maximum, 7.68 g/L, and thereafter decreased gradually until the end of fermentation (day 25). The final total concentration was 2.38 g/L, roughly 20% amount of the VFAs from not pretreated excess sewage sludge at pH 5. The accumulated biogas volume at pH 5 was 69 mL compared to 13 mL from not pretreated excess sewage sludge. This huge increase in biogas production indicated that the lower amount of VFAs was due to their conversion to biogas. The pH at the end of fermentation was 6.72, which is suitable for biogas production. Comparing the amount of NH4 + -N in the thermally pretreated excess sewage sludge system with the not pretreated excess sewage sludge system suggests that a higher NH4 + -N amount provides higher buffering capacity that maintains the pH for better biogas production. For instance, the NH4 + -N amounts for the system with thermally pretreated excess sewage sludge and the system with non-pretreated excess sewage sludge at day 9 were 813.33 mg/L and 206.66 mg/L, respectively. The next phase of the experiment was designed based on the aforementioned results, however, the suggestion of an industrial partner was another factor for designing the process. Continuous VFAs production and recovery was conducted in an iMBR consisting of a flat-sheet membrane panel without external control of pH or substrate pretreatment. These conditions were selected in order to model an actual process that is easily implementable on a large scale. Process simplicity, lower energy demands, and lower usage of chemicals were the main concerns of the industrial partners. Thermochemical pretreatment is an energy and chemical-intensive process. In addition, during the batch fermentation, it was observed that pretreatment either reduced or had a low effect on final VFAs accumulation at most pH levels. Thus, excess sewage sludge and food waste slurry at an initial pH of 5 were used as feed during the iMBR fermentation and filtration.

VFAs Production Using Immersed Membrane Bioreactor
The highest total VFAs concentration was obtained at pH 12 for both food waste slurry and excess sewage sludge without pretreatment, although obtaining pH 12 resulted in substantial usage of chemicals (in this case NaOH) and a higher risk of corrosion and other extra operational costs. Moreover, since the purpose of producing VFAs is using them as the carbon source for the denitrification step in the wastewater treatment process, the final product must contain a high soluble C/N ratio. The highest final soluble C/N ratio for the fermentation with the non-pretreated excess sewage sludge was 15.24, which occurred at pH 5. For the fermentation with the non-pretreated food waste slurry, the C/N ratio at pH 5 was 48.45, which was similar to that at pH 12. As the final C/N ratio was higher in pH 5 and the final total VFAs concentration was close to values at pH 12, and considering the long-run effect of the high alkalinity of the medium on chemical degradation of the polymeric membrane, the iMBR fermentation was conducted at initial pH 5. A stable fermentation system was established even after a considerably long period of operation of more than 3 months in total. The initial VFAs concentrations were 6.98 g/L and 11.01 g/L for excess sewage sludge and food waste slurry, respectively. During the whole period of feeding both reactors with OLR 1 gVS/L/day, the VFAs concentration declined, which indicates that the recovery rate of VFAs from the system was higher than the production rate. To boost the VFAs production, the OLR was increased to 3 gVS/L/day at day 31. As seen in Figure 10, at an organic loading rate of 3 gVS/L/day, the VFAs concentration in the reactor feeding with excess sewage sludge was ramped up till day 44 and reached 9.79 g/L. Thereafter, it leveled off until the last day of fermentation. A similar observation regarding a boost in acid production by increasing the OLR was reported by Wainaina et al. [27]. An average VFAs concentration of 9.8 g/L was achieved from the excess sewage sludge at a yield of 0.38 gVFA/g VS added (533 mgCOD/g VS added ), which is higher than the yield reported for uncontrolled pH systems and is comparable with systems with pH control. Longo et al. [18] reported a VFAs yield of 252 mg COD/g VS added for the system without any pH control and 398 mg COD/g VS added for the system with pH control at 10 using caustic soda. Moreover, the composition of VFAs produced by this iMBR is well suited for the denitrification process. It is important to analyze the composition of VFAs as different carbon sources have different denitrification efficiencies. For instance, the denitrification rate of acetic acid is double the value of propionic acid. The order of VFAs based on the denitrification rate from high to low is as follows: acetic acid, butyric acid, valeric acid, and propionic acid [17]. In the MBR fermentation solution, the most abundant VFA produced was acetic acid (53.90% of total VFAs) followed by propionic acid (15.45% of total VFAs), while iso-valeric acid, butyric acid, iso-butyric, and valeric acid comprised 12.18%, 10.90%, 3.84%, and 3.69% of total VFAs, respectively. On the other hand, using food waste as the substrate for AD MBR, a VFAs concentration of about 5.5 g/L at a yield of 0.34 gVFA/g VSadded was obtained. Regarding food waste AD, our previous research has shown that high yields of up to 0.54 gVFA/g VSadded can be reached when the process conditions (mainly pH and OLR) are optimized in the MBR [9]. The average composition of the VFAs was as follows: acetic acid 42.63%, propionic acid 17.29%, iso-butyric acid 1.89%, butyric acid 19.55%, isovaleric acid 15.26%, and valeric acid 3.34% of total VFAs. The composition of the VFAs is linked On the other hand, using food waste as the substrate for AD MBR, a VFAs concentration of about 5.5 g/L at a yield of 0.34 gVFA/g VS added was obtained. Regarding food waste AD, our previous research has shown that high yields of up to 0.54 gVFA/g VS added can be reached when the process conditions (mainly pH and OLR) are optimized in the MBR [9]. The average composition of the VFAs was as follows: acetic acid 42.63%, propionic acid 17.29%, iso-butyric acid 1.89%, butyric acid 19.55%, isovaleric acid 15.26%, and valeric acid 3.34% of total VFAs. The composition of the VFAs is linked to the microbial structure in the bioreactor and the established microbial pathways [8]. In the prevailing operating conditions, the dominating bacteria community seemed to favor the biosynthesis of mainly acetic, butyric, and isovaleric acids. The presence of acetic and butyric acids is associated with pathways that result in hydrogen production [9]. On the other hand, the higher presence of isovaleric acid compared to valeric acid could have been caused by the bacterial dynamics in the bioreactor, although this phenomenon requires further investigation. With the considered process parameters, the AD of food waste resulted in excessive bio-hydrogen production (244 NmL/g VS added ) due to the favorable pH (about 5.2) compared to the pH condition maintained by the sludge, which was more suitable for VFAs production (about 5.9). The main gas by-product from the sludge fermentation was methane but at a low yield of approximately 93.6 NmL/g VS added . The composition and volume of gas produced are presented in Figure 11. Regarding the C/N ratios, the average values were 43.77 for food waste compared to 15.88 for sludge.
The concentration of suspended solids in the system can reflect the effectiveness of hydrolysis and acidification. Moreover, it directly affects the membrane filtration efficiency thorough membrane fouling. The viscosity of the fermentation broth is proportionate with the concentration of SS including the biomass and unhydrolyzed substrate. The high viscosity of the medium makes the membrane more susceptible to fouling [26]. During the feeding with OLR 1 gVS/L/day, the average concentration of suspended solids for the excess sewage sludge reactor and the food waste slurry reactor was 20.9 g/L and 13.8 g/L, respectively. During that period the accumulation rate of SS in the reactor was 0.25 g/L/day for the excess sewage sludge reactor while it was 0.09 g/L/day for the food waste slurry reactor. After increasing the OLR to 3 gVS/L/day, in the excess sewage sludge reactor, the suspended solids concentration was increased to 30 g/L in the first 10 days after changing OLR, however, thereafter, the suspended solids accumulation rate was decreased to 0.05 g/L/day till the end of fermentation ( Figure 12). Interestingly, the stable concentration level of VFAs was observed in this period. On the other hand, for the food waste slurry reactor, the concentration of suspended solids did not experience any sudden increase after increasing OLR to 3 gVS/L/day, however the solids accumulation rate was raised to 0.29 g/L/day. The membrane performance was flawless and flux deterioration was negligible regardless of daily increases in suspended solids. The recovery of VFAs from the system consisted of a filtration cycle of about 1 to 3 h (210 s forward flow followed by 30 s backwash) and around 21 h relaxation. The average flux for the excess sewage sludge reactor was 5.53 L/m 2 /h and it was stable during the most of fermentation time, although the obtained flux was significantly lower than the other study in this group [27] operating at the similar level of suspended solids. Lower flux may result in lower productivity; however, during the whole 3 months of fermentation (including the preparation time), chemical cleaning service was necessary only once, which indicated that the mentioned strategies were effective for mitigating membrane fouling. Moreover, lower frequency of chemical cleaning lessens the process downtime, chemical waste, and provision, which is favorable for an industrial process. For the food waste slurry AD MBR, the average flux was 16.18 L/m 2 /h and, similarly to the excess sewage sludge reactor, only a single membrane chemical cleaning was needed. The concentration of suspended solids in the system can reflect the effectiveness of hydrolysis and acidification. Moreover, it directly affects the membrane filtration efficiency thorough membrane fouling. The viscosity of the fermentation broth is proportionate with the concentration of SS including the biomass and unhydrolyzed substrate. The high viscosity of the medium makes the membrane more susceptible to fouling [26]. During the feeding with OLR 1 gVS/L/day, the average concentration of suspended solids for the excess sewage sludge reactor and the food waste slurry reactor was 20.9 g/L and 13.8 g/L, respectively. During that period the accumulation rate of SS in the reactor was 0.25 g/L/day for the excess sewage sludge reactor while it was 0.09 g/L/day for the food waste slurry reactor. After increasing the OLR to 3 gVS/L/day, in the excess sewage sludge reactor, the suspended solids concentration was increased to 30 g/L in the first 10 days after changing OLR, however, thereafter, the suspended solids accumulation rate was decreased to 0.05 g/L/day till the end of fermentation ( Figure 12). Interestingly, the stable concentration level of VFAs was observed in this period. On the other hand, for the food waste slurry reactor, the concentration of suspended solids did not experience any sudden increase after increasing OLR to 3 gVS/L/day, however the solids accumulation rate was raised to 0.29 g/L/day. The membrane performance was flawless and flux deterioration was negligible regardless of daily increases in suspended solids. The recovery of  [27] operating at the similar level of suspended solids. Lower flux may result in lower productivity; however, during the whole 3 months of fermentation (including the preparation time), chemical cleaning service was necessary only once, which indicated that the mentioned strategies were effective for mitigating membrane fouling. Moreover, lower frequency of chemical cleaning lessens the process downtime, chemical waste, and provision, which is favorable for an industrial process. For the food waste slurry AD MBR, the average flux was 16.18 L/m 2 /h and, similarly to the excess sewage sludge reactor, only a single membrane chemical cleaning was needed.

Different Process Scenarios for the Production of VFAs for Application as a Denitrification Carbon Source
In this section, the feasibility of the application of the developed iMBR set-up for the production of VFAs that can be further applied for denitrification purposes in WWT process is evaluated. As presented previously in other literature [15,16,35], the VFA solution produced from the anaerobic digestion of different substrates such as sludge can positively contribute to the denitrification stage

Different Process Scenarios for the Production of VFAs for Application as a Denitrification Carbon Source
In this section, the feasibility of the application of the developed iMBR set-up for the production of VFAs that can be further applied for denitrification purposes in WWT process is evaluated. As presented previously in other literature [15,16,35], the VFA solution produced from the anaerobic digestion of different substrates such as sludge can positively contribute to the denitrification stage during a wastewater treatment process by providing the required carbon source. Using the carbon source produced sustainably from renewable residual sources, such as WWT excess sludge and other organic wastes (e.g., food waste) in the form of VFAs, provides the opportunity for a WWTP to employ circular economy measures. By integrating (or retrofitting) the iMBR set-up used in this research into the WWT process, the provision of VFAs from the above-mentioned sources is facilitated, which helps the realization of a WWT process independent of a fossil fuel source. In this regard, two hypothetic scenarios were considered for the application of excess sludge and food waste as the substrate for VFAs production using the iMBR (Figures 5 and 6). The base processing conditions in the assumed WWTP are presented in Table 3. Table 3. The base processing conditions taken into account for the denitrification stage.

Parameter Value
In As seen in Figure 5, scenario one considers the provision of the VFAs required for denitrification from an iMBR fed only with food waste. Based on the acquired results using the lab-scale iMBR, a VFAs COD equivalent of 9 g/L can be achieved. The process conditions and the overall performance of this scenario are summarized in Table 4. In this condition, the VFA solution obtained as permeate is fed as an external carbon source to the denitrification stage. In the second scenario, the provision of the VFAs equivalent to required methanol from the anaerobic digestion of excess sludge in the iMBR was considered ( Figure 6). The process parameters were assumed to be roughly those considered for lab-scale experiments. In this regard, a VFAs COD-equivalent level of 14 g/L was obtained. As can be seen in Table 4, for the provision of the same amount of COD-equivalent VFAs for complete replacement of methanol with permeate from tested food waste iMBR, an iMBR with 1.6-times greater volume and membrane area compared to the sludge iMBR is required. This imposes a great additional capital cost on the WWTP if iMBR retrofitting/integration is to be aimed at. As estimated, using a sludge iMBR compared to a food waste fed iMBR reduces the operational cost of VFA production by 30-35%. However, it should be considered that the presented scenarios suffer from the fact that the VFA solutions themselves carry an ammonium content that should be removed or converted prior to the addition of the VFA solution to the denitrification stage.
Another future scenario can include an iMBR set-up that benefits from both sludge and food waste as co-substrates. According to our previous studies [9,27], such a scenario would most likely yield higher VFAs and improve the C/N ratios of the recovered VFAs solution (Figure 13). However, regardless of which scenario to apply, without the application of the iMBR the plant has to provide about 300 kg fossil-based methanol per hour with an estimated cost of about 140 €/h (based on estimated prices in 2018). It should be noted that the ability of this specific VFA solution to replace methanol for denitrification has not been verified by denitrification tests and the theoretical calculations are based on COD. Using the established flexible iMBR technology, surplus VFA solution can be easily produced by changing the process parameters. Considering the VFAs solution's average market value of 0.6-0.8 €/kg, the WWTP or organic waste treatment facility can benefit from the obtained surplus VFAs. Using the proposed solution, the WWTP becomes more sustainable by circumventing the application of fossil-based methanol, recovers the nutrient content of the waste sludge and food waste to a high extent, and produces several value-added products, such as VFA and biogas, that can provide the basis for a WWTP biorefinery. However, to fully validate the proposed concept, further detailed study on the capital expenditures for integration or retrofitting the iMBR system into existing WWTPs (a biogas digester can be an option for conversion to iMBRs) should be conducted considering membrane filtration and process limitations, and the effect of ammonium nitrogen content of VFA solution on the final effluent quality.

Conclusions
In this study, it was observed that a flat sheet iMBR set-up could successfully be used for stable production and in situ recovery of high concentrations of VFAs from excess sludge and food waste slurry in the long-term (3 months) semi-continuous process. To boost the digestibility of ESS and FWS, the effects of different mild thermal and thermochemical pretreatment conditions were investigated prior to iMBR fermentation. For both ESS and FWS, pretreatment with NaOH resulted in the highest increase in substrate sCOD and the roles of temperature and exposure time were minimal. The pretreatments did not affect the VFA concentration and C/N ratio considerably in the case of using ESS as substrate, however, thermochemically pretreated FWS yielded higher VFAs concentrations compared to non-pretreated FWS. VFAs yields of 0.38 gVFA/g VSadded and 0.34 gVFA/g VSadded were obtained, respectively, from ESS and FWS by applying anaerobic iMBR. The average flux for the excess sewage sludge reactor was 5.53 L/m 2 /h while it was 16.18 L/m 2 /h for the food waste slurry reactor. Considering different scenarios for the integration of the iMBR into the wastewater treatment process, it is estimated that using the proposed iMBRs working on food waste and/or sludge in a typical wastewater treatment plant can be a promising alternative to the provision of an external carbon source. However, regardless of which scenario to apply, without the application of the iMBR the plant has to provide about 300 kg fossil-based methanol per hour with an estimated cost of about 140 €/h (based on estimated prices in 2018). It should be noted that the ability of this specific VFA solution to replace methanol for denitrification has not been verified by denitrification tests and the theoretical calculations are based on COD. Using the established flexible iMBR technology, surplus VFA solution can be easily produced by changing the process parameters. Considering the VFAs solution's average market value of 0.6-0.8 €/kg, the WWTP or organic waste treatment facility can benefit from the obtained surplus VFAs. Using the proposed solution, the WWTP becomes more sustainable by circumventing the application of fossil-based methanol, recovers the nutrient content of the waste sludge and food waste to a high extent, and produces several value-added products, such as VFA and biogas, that can provide the basis for a WWTP biorefinery. However, to fully validate the proposed concept, further detailed study on the capital expenditures for integration or retrofitting the iMBR system into existing WWTPs (a biogas digester can be an option for conversion to iMBRs) should be conducted considering membrane filtration and process limitations, and the effect of ammonium nitrogen content of VFA solution on the final effluent quality.

Conclusions
In this study, it was observed that a flat sheet iMBR set-up could successfully be used for stable production and in situ recovery of high concentrations of VFAs from excess sludge and food waste slurry in the long-term (3 months) semi-continuous process. To boost the digestibility of ESS and FWS, the effects of different mild thermal and thermochemical pretreatment conditions were investigated prior to iMBR fermentation. For both ESS and FWS, pretreatment with NaOH resulted in the highest increase in substrate sCOD and the roles of temperature and exposure time were minimal. The pretreatments did not affect the VFA concentration and C/N ratio considerably in the case of using ESS as substrate, however, thermochemically pretreated FWS yielded higher VFAs concentrations compared to non-pretreated FWS. VFAs yields of 0.38 gVFA/g VS added and 0.34 gVFA/g VS added were obtained, respectively, from ESS and FWS by applying anaerobic iMBR. The average flux for the excess sewage sludge reactor was 5.53 L/m 2 /h while it was 16.18 L/m 2 /h for the food waste slurry reactor. Considering different scenarios for the integration of the iMBR into the wastewater treatment process, it is estimated that using the proposed iMBRs working on food waste and/or sludge in a typical wastewater treatment plant can be a promising alternative to the provision of an external carbon source. Funding: This research was funded by Sweden's Innovation Agency, Vinnova (Sweden), grant number 2018-03732 and the Swedish Agency for Economic and Regional Growth through a European Regional Development Fund grant number 20201656, Gryaab AB (Sweden) and Renova AB (Sweden).