Integrated Approach for Wastewater Treatment and Biofuel Production in Microalgae Bioreﬁneries

: The increasing world population generates huge amounts of wastewater as well as large energy demand. Additionally, fossil fuel’s combustion for energy production causes the emission of greenhouse gases (GHG) and other pollutants. Therefore, there is a strong need to ﬁnd alternative green approaches for wastewater treatment and energy production. Microalgae bioreﬁneries could represent an effective strategy to mitigate the above problems. Microalgae bioreﬁneries are a sustainable alternative to conventional wastewater treatment processes, as they potentially allow wastewater to be treated at lower costs and with lower energy consumption. Furthermore, they provide an effective means to recover valuable compounds for biofuel production or other applications. This review focuses on the current scenario and future prospects of microalgae bioreﬁneries aimed at combining wastewater treatment with biofuel production. First, the different microalgal cultivation systems are examined, and their main characteristics and limitations are discussed. Then, the technologies available for converting the biomass produced during wastewater treatment into biofuel are critically analyzed. Finally, current challenges and research directions for biofuel production and wastewater treatment through this approach are outlined.


Introduction
Microalgae are a well known group of photosynthetic organisms composed of more than 3000 aquatic species. Most of them are autotrophic, while the remaining are heterotrophic. Microalgae can grow in different wastewaters and convert sunlight and atmospheric CO 2 into biomass. Their cells are able to convert and store energy instead of using it for their growth and development. Therefore, microalgal biomass can be explored as new systems for biofuels production that are a potential substitute to fossil fuels due to renewability, sustainability, and short life cycle of algal growth. Recently, microalgal biomass is recognized as a carbon neutral fuel due to various phytochemical properties of biomass [1]. For these reasons, the development of microalgal biorefineries could be effective for reducing the demand of fossil fuel and lowering greenhouse gas (GHG) emissions, which mitigates the problems associated with global warming and climate changes. Microalgal biomass is considered essential feedstock for biofuel production, because microalgae can be cultivated through the year with higher productivity [2][3][4][5]. Moreover, they are highly potential candidates for resource recovery from different types of nutrient-rich wastewater. Nutrient-rich wastewaters are generated from various industrial sectors including aquaculture, dairy, food, pharmaceutical, swine, and textile industries as well as from municipalities. The wastewater derived from the above-mentioned sectors are rich in organic and inorganic nutrients that stimulates eutrophication, which is a major threat to ecosystems. Eutrophication affects mainly fishing industries and causes an annual loss  [45,46] Energies 2021, 14

Microalgae Cultivation Systems
Nowadays, different types of cultivation systems are used for small scale and large scale cultivation of microalgae for different purposes. However, the choice of microalgae cultivation system usually depends on the selection of microalgal species, nutrient supply, as well as end application microalgal biomass. Based on the different importance of microalgae cultivation systems, these can be classified as open and closed cultivation systems.

Open Systems
In open systems, circular ponds, open ponds, raceway ponds, tanks, and unstirred ponds are mainly employed for large-scale cultivation of microalgae [62]. Open cultivation systems are reported as more economic than the closed cultivation systems due to low construction and operation cost. Therefore, these are mostly employed as well as reported to contribute up to 95% of total microalgal biomass generation. Despite these advantages, there are some disadvantages of an open system, like evaporation of water, CO 2 diffusion to the environment, poor light utilization by cells, land requirement, etc. [63]. Moreover, there are biotic factors that can limit the biomass production due to contamination of unknown species. Figure 1 showed the most commonly used open ponds cultivation system for large-scale microalgae cultivation.  [68]. Usually, this type of ponds is 40 to 50 m in diameter and 20 to 30 cm in depth [65]. In circular ponds, a long rotary arm is set in the middle of pond that performs the function of a paddlewheel. There is no doubt that the circular system is more efficient in contrast to the unstirred, but the cultivated microalgae are still prone to surrounding contamination [64].

Unstirred Open Ponds
As the term itself explains, an unstirred open pond is a system without mixing or devoid of stirrer unit. Unstirred ponds provide an inexpensive and clear way to produce some commercially microalgae species such as Dunaliella salina [69]. These ponds are simple in terms of construction without any special requirement. However, the lack of stirrer causes poor mixing that sometimes can be a limiting factor for large scale biomass cultivation. To ensure proper light penetration, unstirred open systems are consisted of ˂1 m in depth. Several reports revealed that transparent plastic covering can act as a promising solution to overcome the contamination related issues in unstirred open systems [64].

Closed Systems
In order to resolve the issues of an open cultivation system as well as to enhance the biomass productivity, the closed system came into existence. There is no doubt that the open systems are still preferred over a closed cultivation system to produce biomass at a low cost for production of low value products. On the other hand, to cultivate microalgal biomass for high-value products, there is a requirement of aseptic conditions and wellconstructed systems with optimized operation conditions [63]. Despite these benefits of open systems over closed systems, there are a number of problems to make their use for pilot scale production [65]. Closed systems are mostly referred as photobioreactors (PBRs) as they are devoid of direct gases exchange and contaminants from the surrounding environment [70]. Recently, many designs of PBRs have been introduced to improve cultivation and reduce costs. The details of different type of PBRs with common configurations are discussed in the below subsection and Figure 2 showed the close cultivation system.

Raceways Ponds
The raceway pond or stirred wheel open pond was firstly developed by Oswald in the 1960s [64]. The raceway ponds are the more common open cultivation system for microalgae biomass production in the last forty years [65]. The raceway pond is usually shallow, and depth ranged from 15 to 25 cm. Typically, they are formed either as a singlechannel or as multi-channel system, which are designed by linking single raceways together. This open system is mainly well-avowed for the cultivation of four algal species: Chlorella, Dunaliella, Spirulina, and Hematococcus [66]. The reported biomass productivity of a raceway pond is 60 to 100 mg DW/L d [67].  [68]. Usually, this type of ponds is 40 to 50 m in diameter and 20 to 30 cm in depth [65]. In circular ponds, a long rotary arm is set in the middle of pond that performs the function of a paddlewheel. There is no doubt that the circular system is more efficient in contrast to the unstirred, but the cultivated microalgae are still prone to surrounding contamination [64].

Unstirred Open Ponds
As the term itself explains, an unstirred open pond is a system without mixing or devoid of stirrer unit. Unstirred ponds provide an inexpensive and clear way to produce some commercially microalgae species such as Dunaliella salina [69]. These ponds are simple in terms of construction without any special requirement. However, the lack of stirrer causes poor mixing that sometimes can be a limiting factor for large scale biomass cultivation. To ensure proper light penetration, unstirred open systems are consisted of <1 m in depth. Several reports revealed that transparent plastic covering can act as a promising solution to overcome the contamination related issues in unstirred open systems [64].

Closed Systems
In order to resolve the issues of an open cultivation system as well as to enhance the biomass productivity, the closed system came into existence. There is no doubt that the open systems are still preferred over a closed cultivation system to produce biomass at a low cost for production of low value products. On the other hand, to cultivate microalgal biomass for high-value products, there is a requirement of aseptic conditions and well-constructed systems with optimized operation conditions [63]. Despite these benefits of open systems over closed systems, there are a number of problems to make their use for pilot scale production [65]. Closed systems are mostly referred as photobioreactors (PBRs) as they are devoid of direct gases exchange and contaminants from the surrounding environment [70]. Recently, many designs of PBRs have been introduced to improve cultivation and reduce costs. The details of different type of PBRs with common configurations are discussed in the below subsection and Figure 2 showed the close cultivation system. an air pump for the sake of mixing and agitation of microalgal culture. There are two main types of tubular PBRs such as vertical (bubble and airlift column) and horizontal tubular (inclined, spiral, helicoidal, etc.). The other PBRs like helical tubular, polythene bags, and sleeves are also employed for microalgal biomass cultivation.
Vertical reactors: Bubble columns and airlift PBRs are mainly included in vertical tubular type PBRs. Both bubble and airlift are connected to an air sparger at the bottom of these PBRs [64]. Bubble columns are cylindrical in shape with a 20 cm internal diameter (ID) and the height is commonly greater than the twice of ID. Bubble column PBRs are highly considered due to lower fabrication cost, higher volume to surface ratio, proper energy and mass transfer, as well as efficient gaseous mixing and O2 release [63]. In this type of PBR, the gas flow rate is the main parameter that needs to be regulated during operation, which affects the growth of microalgae. The main drawbacks of bubble column PBRs are the formation of biofilms on its wall, which are prone to photoinhibition [72].
The development of an airlift column is regarded as an improvement of bubble column and consists of two internal interconnecting zones. One zone is referred to as riser, while the other is called a downcomer zone [73]. In a riser zone, gas mixture flows upward from the bottom that is mediated via a sparger, and in a downcomer zone, there is no gas supply but medium flows toward the bottom; thus, culture medium circulates within both zones. Based on circulation mode, the airlift PBRs are designed as two forms, i.e., the internal loop and external loop. In an airlift column, the flow of culture medium circulates between both zones, which means it passes through light and dark phases that is referred to as the flashing light effect [74].
Horizontal reactors: Horizontal tubular PBRs are widely used at a commercialized scale for the generation of microalgal biomass in closed systems. These are made up of tubes and can be arranged in various possible orientations, viz., helicoidal, spiral, inclined, horizontal, etc., but all works on the same principal [64]. In these systems, there is maximal exposure of microalgae to light. In these PBRs, the reported ID can be ranged from 10 to 60 mm and the height can be of several hundred meters. For circulation, there is an air pump for mixing and agitation. Horizontal tubular photobioreactors (PBRs) are facilitated with better air-residence time that is reported to provide more CO2 in dissolved form in the growth medium [64,75].
Helical reactors: These are made up of polyethylene with an ID of 2.4 to 5 cm and are spirally wound on cylinder-shaped, truncated pyramid, or truncated cone shaped structures for support purposes [74]. For circulation, a centrifugal pump is used in helical tubular (tube-shaped) PBRs. Helical tubular PBRs are considered as highly effective and generally employed for small volume of microalgal suspension. The main drawback of this type of closed system is the fouling phenomenon that can cause tubes blocking due to biofilm formation [64].

Flat Plates
It is one of the common PBRs and appears as a rectangular-shaped box, commonly employed for pure cultures microalgae cultivation [64]. These type of PBRs are made up of transparent material such as glass, plexiglass, plastics, polycarbonates, etc. It can be situated indoor under an artificial light source or outdoor under sunlight [69,71]. Due to the short light path, light can easily penetrate to culture medium and mixing is mediated via air sparger in the form of air bubbles [64]. The common examples of flat plate PBRs are horizontal, vertical, v-shaped, and inclined flat plate PBR.

Tubular Reactors
Tubular PBRs are widely used on commercial level production of high-value products. They are formed of polyvinyl chloride or polypropylene acrylic that are usually transparent with small internal diameter to overcome light related problems [64]. There is an air pump for the sake of mixing and agitation of microalgal culture. There are two main types of tubular PBRs such as vertical (bubble and airlift column) and horizontal tubular (inclined, spiral, helicoidal, etc.). The other PBRs like helical tubular, polythene bags, and sleeves are also employed for microalgal biomass cultivation.
Vertical reactors: Bubble columns and airlift PBRs are mainly included in vertical tubular type PBRs. Both bubble and airlift are connected to an air sparger at the bottom of these PBRs [64]. Bubble columns are cylindrical in shape with a 20 cm internal diameter (ID) and the height is commonly greater than the twice of ID. Bubble column PBRs are highly considered due to lower fabrication cost, higher volume to surface ratio, proper energy and mass transfer, as well as efficient gaseous mixing and O 2 release [63]. In this type of PBR, the gas flow rate is the main parameter that needs to be regulated during operation, which affects the growth of microalgae. The main drawbacks of bubble column PBRs are the formation of biofilms on its wall, which are prone to photoinhibition [72].
The development of an airlift column is regarded as an improvement of bubble column and consists of two internal interconnecting zones. One zone is referred to as riser, while the other is called a downcomer zone [73]. In a riser zone, gas mixture flows upward from the bottom that is mediated via a sparger, and in a downcomer zone, there is no gas supply but medium flows toward the bottom; thus, culture medium circulates within both zones. Based on circulation mode, the airlift PBRs are designed as two forms, i.e., the internal loop and external loop. In an airlift column, the flow of culture medium circulates between both zones, which means it passes through light and dark phases that is referred to as the flashing light effect [74].
Horizontal reactors: Horizontal tubular PBRs are widely used at a commercialized scale for the generation of microalgal biomass in closed systems. These are made up of tubes and can be arranged in various possible orientations, viz., helicoidal, spiral, inclined, horizontal, etc., but all works on the same principal [64]. In these systems, there is maximal exposure of microalgae to light. In these PBRs, the reported ID can be ranged from 10 to 60 mm and the height can be of several hundred meters. For circulation, there is an air pump for mixing and agitation. Horizontal tubular photobioreactors (PBRs) are facilitated with better air-residence time that is reported to provide more CO 2 in dissolved form in the growth medium [64,75].
Helical reactors: These are made up of polyethylene with an ID of 2.4 to 5 cm and are spirally wound on cylinder-shaped, truncated pyramid, or truncated cone shaped structures for support purposes [74]. For circulation, a centrifugal pump is used in helical tubular (tube-shaped) PBRs. Helical tubular PBRs are considered as highly effective and generally employed for small volume of microalgal suspension. The main drawback of this type of closed system is the fouling phenomenon that can cause tubes blocking due to biofilm formation [64].

Advance Cultivation Systems
There are few other cultivation systems that can be used for growth of microalgae and the important ones are discussed below.

Algal Turf Scrubber (ATS) Cultivation Systems
An ATS is a modified cultivation system, which was firstly introduced in the early 1980s by Professor Walter Adey [76]. An ATS cultivation system provides a downward sloped surface for water or influent to flow across, in a pulsed or continuous manner as showed in Figure 3 [77], which promotes growth of macroalgae [30]. In the ATS system, microalgae grow efficacity due to appropriate uptake of inorganic compounds from wastewater and releasing dissolved oxygen (DO) through photosynthesis. ATS microalgae cultivation systems improved nutrients/pollutant removal efficiency as well as allows faster growth rate due to superior photosynthetic activities, which releases a higher amount of O 2 . ATS systems are also exploited for wastewater treatment or resource recovery from different type of wastewater such as an animal farm (dairy farm, aquaculture) wastewater, sewage wastewater, and industrial streams wastewater. Furthermore, an ATS cultivation system offers 5-10 times higher microalgal biomass productivities as compared to other types of land-based cultivation, but are limited due to lower handling capacity [30]. Moreover, in the ATS cultivation system, microalgae cultivation is able to grow in a continuous mode without centrifuging the biomass during production [77][78][79]. Therefore, higher biomass productivity and nutrient removal efficiency and easy biomass harvesting potentially decreases the overall cost involved in resource recovery from wastewater [80]. Moreover, enhanced growth rate and subsequently harvested biomass from an optimized ATS cultivation system could be utilized for various applications [81]. Siville and Boeing [82] reported that an ATS is more efficient for resource recovery from wastewater applying the microalgal technology. Several results indicated that ATS microalgae cultivation systems can permit the higher rate removal of nitrate from various wastewaters and produced biomass can be exploited for commercial purposes. The key advantages and disadvantages are discussed in Table 2 and compared with other cultivation approaches. sloped surface for water or influent to flow across, in a pulsed or continuous manner as showed in Figure 3 [77], which promotes growth of macroalgae [30]. In the ATS system, microalgae grow efficacity due to appropriate uptake of inorganic compounds from wastewater and releasing dissolved oxygen (DO) through photosynthesis. ATS microalgae cultivation systems improved nutrients/pollutant removal efficiency as well as allows faster growth rate due to superior photosynthetic activities, which releases a higher amount of O2. ATS systems are also exploited for wastewater treatment or resource recovery from different type of wastewater such as an animal farm (dairy farm, aquaculture) wastewater, sewage wastewater, and industrial streams wastewater. Furthermore, an ATS cultivation system offers 5-10 times higher microalgal biomass productivities as compared to other types of land-based cultivation, but are limited due to lower handling capacity [30]. Moreover, in the ATS cultivation system, microalgae cultivation is able to grow in a continuous mode without centrifuging the biomass during production [77][78][79]. Therefore, higher biomass productivity and nutrient removal efficiency and easy biomass harvesting potentially decreases the overall cost involved in resource recovery from wastewater [80]. Moreover, enhanced growth rate and subsequently harvested biomass from an optimized ATS cultivation system could be utilized for various applications [81]. Siville and Boeing [82] reported that an ATS is more efficient for resource recovery from wastewater applying the microalgal technology. Several results indicated that ATS microalgae cultivation systems can permit the higher rate removal of nitrate from various wastewaters and produced biomass can be exploited for commercial purposes. The key advantages and disadvantages are discussed in Table 2 and compared with other cultivation approaches.

Hybrid Cultivation Systems (HCS)
As the name suggests, it comprises both a closed and open system. It involves integration of two or more types of a cultivation system with an integration of biomass harvesting system. The first part of cultivation occurs in a closed system or open system and then the subsequent phase is carried out for biomass harvesting [74,83]. A hybrid cultivation system provides better growth conditions that lead to efficient resource recovery from wastewater. Therefore, hybrid cultivation systems are more favorable for higher biomass production, which can reduce the overall CAPEX of the microalgal technology [30]. Several researchers carried out the cultivation of microalgae using different cultivation approaches and found that a two stage hybrid cultivation system allows to attain increased biomass [62]. Adesanya et al. [84] conducted similar studies and found that a two-stage hybrid cultivation system (integrated airlift tubular PBRs with raceway ponds) allow to attain higher biomass productivity for lipid production. Yun et al. [85] cultivated Parachlorella sp. JD076 for 47 days using a hybrid cultivation system and found that a hybrid cultivation system has a high efficiency. The result showed that hybrid cultivation systems showed higher 40% of biomass and 62% lipid yields as compared to small-scale open raceway ponds. Moreover, Swain et al. [86] investigated the effect of two-stage cultivation process for biodiesel production from Tetraselmis sp. using the simulated dairy wastewater. Two stage cultivation showed efficient nutrient removal efficiency from simulated dairy wastewater and Tetraselmis sp. biomass was used for biodiesel production. Therefore, HCSs are highly recommended for cost-effective wastewater treatment and resource recovery, while the produced algal biomass can be explored for various types of biofuel production. Moreover, the main advantage and disadvantage of hybrid cultivation is summarized in Table 2 and compared with other cultivation systems. Higher biomass productivity Lesser contamination risk Low maintenance and monitoring Carbon sequestration from environment Higher CAPEX and OPEX of process Require large infrastructure Need high maintenance and continuous monitoring Therefore, interest among the different microalgae cultivation systems and efficient approaches are developed to accomplish optimal and economical production of microalgal biomass. All types of cultivation approach showed a varied biomass production rate, which remains changed due to different operational conditions. However, to highlight the more appropriate microalgae cultivation system, critical comparative studies are recommended to determine an appropriate cultivation system for wastewater treatment and biofuel production. Table 2 highlights the main pros and cons of the above discussed cultivation systems. In summary, it can be concluded that open cultivation systems generally employed for wastewater treatment due to capacity for lager volume treatment, which can reduce the overall cost of the wastewater treatment process. The close cultivation system is mostly used to achieve higher biomass productivity for production of high valueadded compounds from algal biomass. However, the development of an advanced hybrid cultivation system can allow to improve the biomass yield, which can allow to offset the overall cost.

Mode of Microalgae Cultivation
Microalgae are prokaryotic organisms that use atmospheric CO 2 and sun light during photosynthesis as well as being able to use organic carbon from wastewater. The design (mostly closed system) and strategy used in cultivation of microalgae limit sunlight penetration for commercialized production of microalgae, but fluorescent light can be used to overcome these limitations. However, an artificial light source for cultivation increases CAPEX and operating expense (OPEX) of the process [87]. Microalgae are able to grow under the presence and absence of light using organic and inorganic carbon sources under three different cultivation modes, i.e., (i) phototrophic; (ii) heterotrophic; and (iii) mixotrophic. The key advantage and disadvantage of each mode is described in Table 3. However, among the different cultivation modes, phototrophic cultivation offers slow growth rate and lower biomass productivity due to lesser light availability when cell number and diameter increased due to self-shading [88]. There are more cultivation modes with external organic carbon sources categorized as mixotrophic and heterotrophic cultivation modes. In this cultivation mode, growth rate increased by 2 to 5 folds [89]. In the heterotrophic mode, microalgal cells use an organic carbon source for their cell proliferation. Under the heterotrophic mode, microalgae cells produce CO 2 and are unable to mitigate CO 2 , which is a major drawback. Under the mixotrophic mode, microalgae cells utilize inorganic carbon (CO 2 ) and organic carbon for cell proliferation. Therefore, these trophic modes have a significate role in cultivation of microalgae; however, phototrophic cultivation is more sustainable and offers several environmental benefits [4,26]. Therefore, appropriate cultivation mode needs to adopt for high-rate biomass productivity and to attain environmental sustainability.

Microalgal Biorefinery for Biofuels Production
Microalgae biomass are an abundant resource of several molecules and molecules transformed into various types of biofuels. Biofuel can allow to meet the growing demands of fossil fuels, which can be generated by the microbial conversion of biomass derived from different sources. Among the various types of biomass, algal biomass is highly considered for biofuel production due to higher lipid and sugar content in algal biomass [3,4,26]. Microalgal biomass has the potential for production of a broad range of biofuel through different routes. Microalgal biomass can be transformed into biodiesel through the transesterification of lipid [90], bioethanol, bioH 2 through the fermentation of carbohydrates [3,91], while bioCH 4 via co-digestion [92]. Microalgae based biofuels production offers several advantages such as (i) arable land not required for mass cultivation of microalgae; (ii) it offers high photosynthesis activity as compared to terrestrial plants, which results in high biomass productivity as well as offer higher CO 2 mitigation; (iii) does not require agriculture land, which is not allowed to complete with food crops; (iii) fertilizer or addition of extra nutrient not required; (iv) and being able to remove the pollutants from wastewater [2,3,27]. Several microalgal species lives in the environment; among them, only a few are explored for various commercial applications in different sectors. Figure 4 summarized the key biofuels produced from microalgae and highlight the key benefit of microalgal-based biofuels. Furthermore, microalgae biomass based different biofuel are briefly discussed in the below subsection. [3,4,26]. Microalgal biomass has the potential for production of a broad range of biofuel through different routes. Microalgal biomass can be transformed into biodiesel through the transesterification of lipid [90], bioethanol, bioH2 through the fermentation of carbohydrates [3,91], while bioCH4 via co-digestion [92]. Microalgae based biofuels production offers several advantages such as (i) arable land not required for mass cultivation of microalgae; (ii) it offers high photosynthesis activity as compared to terrestrial plants, which results in high biomass productivity as well as offer higher CO2 mitigation; (iii) does not require agriculture land, which is not allowed to complete with food crops; (iii) fertilizer or addition of extra nutrient not required; (iv) and being able to remove the pollutants from wastewater [2,3,27]. Several microalgal species lives in the environment; among them, only a few are explored for various commercial applications in different sectors. Figure 4 summarized the key biofuels produced from microalgae and highlight the key benefit of microalgal-based biofuels. Furthermore, microalgae biomass based different biofuel are briefly discussed in the below subsection.

Biodiesel
In the last 30 years, the key research focus of the U.S. Department of Energy Aquatic Species program was to produce biodiesel from microalgal biomass, which was cultivated

Biodiesel
In the last 30 years, the key research focus of the U.S. Department of Energy Aquatic Species program was to produce biodiesel from microalgal biomass, which was cultivated in high-rate algal ponds (HRAPs) [93]. During the research investigation in this program, it was concluded that optimum climatical conditions allow the enhanced biomass productivity with high lipid content as compared to terrestrial crops. Microalgal growth rates are very high under optimum conditions, which allows productivity~50-100-tons algae dry biomass/hector/year with a 25-50% lipid content in the dry biomass [94]. These productivities can increase by applying the modern approaches such as alteration in metabolic pathways of microalgal species. However, in the microalgal biomass, lipids content and quality differs among species to species and even strains within a species as well as many other factors such as operational parameters, while nitrogen limitation in growth medium improves lipid productivity [94]. Microalgae is able to produce a considerable quantity of lipids in the range of~5000 to 100,000 L/hector/day, while microalgal derived biodiesel have a high energy content (39 to 41 KJ/g). Moreover, biodiesel can be produced by direct transesterification with heterogenous/homogenous catalyst or via in-situ(trans)esterification of the microalgal lipids [95]. Several studies have discussed the recent advancement in various technologies for biodiesel production from microalgal lipids and highlighted the drawbacks of traditional transesterification method for biodiesel production [96,97]. Furthermore, different microalgae have various physio-chemical properties, which make a significant variation on microalgae-derived biodiesel that cause a different impact on engine performance. However, it is essential to analyze the physical properties of microalgal-derived biodiesel to improve the engine performance, combustion, and emission. The physical properties of biodiesel derived from different microalgal species are summarized and compared with the American Society for Testing and Materials (ASTM) D6751 standards as showed in Table 4 [98].

Biogas
Microalgal biomass contains high various molecules, which can transform into biogas via anaerobic digestion (AD) process. During the AD process, generated biogas can be utilized for different purposes, such as electricity, heat, and/or transport. Moreover, AD process offers lower CAPEX and OPEX in comparison to available biofuel production technologies such as pyrolysis and gasification. In addition, the AD process can be used for nutrient recycling from wastewater, and after, AD process treated water could be recycled for microalgae cultivation [99,100]. In most of the investigations for biogas production using microalgal biomass, it has been carried out via methanogenesis in co-digestion system with sewage sludge (SS) or with other co-substrates [101]. Solé-Bundó et al. [102] investigated the effect of co-digestion of microalgae biomass and primary sludge (PS) on biogas productivity as well as on microcontaminants removal efficiency. The results showed that co-digestion enhances 65% CH 4 productivity as well as microcontaminants removal efficiency achieved up to 90%. Table 5 summarizes the microalgae anaerobic co-digestion (AcoD) with different type of co-substrates under different operating conditions. However, operational conditions have a significant role in methane yield, therefore optimum conditions need to be considered for enhanced methane production [103][104][105][106][107].   During the AcoD process, the produced biogas contains CH 4 (50-65%) and CO 2 (40-50%) and traces amount of H 2 SO 4 , N 2 O, which need separated from the methane [103]. Therefore, innovative and sustainable biogas upgrading technologies are immediately required. However, there are several traditional upgrading technologies (chemical adsorption, membrane separation, and pressure swing adsorption) available, which demand a high cost [126]. Recently, microalgae-based biogas upgrading are under investigation to avoid the major disadvantages of conventional biogas upgrading [127]. Table 6 summarizes the different microalgal based biogas upgrading, and biogas upgrading can be achieved with approximately 97%, which differs based due on variation in the reactors and operating parameters as well as the selected microalgal strains for biogas upgrading [126]. Toledo-Cervantes et al. [128] reported the microalgal based biogas upgrading results maximum elimination of CO 2 and H 2 S, while CH 4 achieved with a purity of 95%. Meier et al. [5] studied the impact of a light/dark cycle on CO 2 removal from biogas employing the photosynthetic microalgal biogas upgrading. The results showed that microalgal based CO 2 sequestration resulted around 89-93% CO 2 removal. Similarly, Franco-Morgado et al. [129] investigated the effect of the light illumination system on the upgrading of synthetic biogas and observed the 99.5% of H 2 S with 91.5% removal of CO 2 .
Prandini et al. [130] reported that microalgae-based biogas upgrading with wastewater treatment process can accelerate nutrient removal efficiency, which results in pure bioCH 4 . Furthermore, cultivated biomass can be used for AcoD process as feedstock to produce biogas, or it can be explored for microalgal biodiesel production. Therefore, a microalgal based refinery needs to adopt in AD plants for sustainable biogas upgrading and simultaneous low-cost biogas production via methanogenesis.

Biohydrogen
Biohydrogen (BioH 2 ) is the next-generation fuel source having remarkable benefits compared to other liquid or gaseous fuel [135][136][137][138][139]. Microalgae can naturally produce bioH 2 through photolysis, or its biomass can be used as feedstock for fermentative bioH 2 . The photolysis is classified into indirect and direct photolysis. During the direct photolysis process, water is split into electron (e − ) and proton (H + ), then e − moves to Fe-Fehydrogenase, which forms bio-H 2 . But the whole process is dependent on the hydrogenase enzyme. However, a small amount of oxygen can inhibit the activity of hydrogenase resultant low yield of bioH 2 [3,140,141]. The utilization of sulphur deprived medium or addition of oxysorb in medium might be a fundamental solution for reducing the amount of oxygen in the surrounding atmosphere. Whereas in indirect photolysis, the produced oxygen utilizes for the metabolic process to produce other value-added biomolecules; the resultant amount of oxygen is reduced. In the breakdown of biomolecules, e − is generated, which can undergo for plastoquinone and then transferred into the electron transport chain where bio-H 2 is produced by the help of Fe-Fe hydrogenase. Furthermore, genetic modification in the bio-H 2 ase gene can increase the resistance ability of the hydrogenase enzyme. Goswami et al. [3] reviewed the different genetic approach used for enhancement of bio-H 2 production in microalgae. A different genetic approach such as (i) overexpression of PSII gene, cytochrome b6f, hemA, and lba gene, translational repressor NAB1 protein; (ii) knockout of light-harvesting gene, IFR1 protein, OEE2 gene; (iii) cloning of pyruvate oxidase gene, DT hydA gene; (iv) antisense transformation of sulp/sulp2 gene or amino acid substitution; (v) insertion of GAL4 gene, CRY1, and CRY2 gene, VP 16 and other light inducible system can enhance the bioH 2 production in microalgae [3]. Figure 5 shows the different genetic approach, which can enhance the bioH 2 production inside the microalgal cells.
The dark fermentation and photo fermentation of using microalgal biomass is quite beneficial in terms of bioH 2 yield. The microalgal biomass contains a high amount of carbohydrates, protein, and lipids; therefore, it is recognized as potential feedstock for fermentative bioH 2 production [142]. The fermentation for bioH 2 production depends on the fermentative microorganisms and biomass pretreatment [3]. The fermentative microorganisms consume the biomass as substrates and convert these substrates to organic acids, CO 2 , and acetate [143]. The breakdown of polymeric substances generates e − , which reduces with the help of enzymes hydrogenase (present in bacteria) and form bioH 2 . These processes required additional pre-treatment steps. For example, Liu et al. [144] produced the fermentative bioH 2 using the pretreated microalgal biomass with 1.5% HCL and uses C. butyricum CGS5 for fermentation. Similarly, Chen et al. [145] pretreated the microalgal biomass with 1% H 2 SO 4 ; during this experimentation, 2.87 mmol/g bioH 2 was produced via a dark fermentative pathway. Furthermore, Liu et al. [146] pretreated the microalgal biomass through the mixture of the biological enzyme (cellulase and protease). The result showed that 48% of bioH 2 was produced from the total microalgal biomass. However, the pretreatment steps are a costly process, whereas in photo fermentation, process light is required, which increases the cost of production [3]. Furthermore, integration of different microalgal bio-H 2 production might be a possible solution for obtaining the high bioH 2 yield at low cost.

Bioelectricity
Microalgal based microbial fuel cell (MB-MFC) gains recent research attention due to its significant application in wastewater treatment and bioelectricity generation. Besides that, this technique also helps in carbon sequestration, bioH2 production, and desalination [147]. MB-MFC is a biochemical system, which generates bioelectricity in the sequential biocatalytic reactions. MB-MFC systems are divided into two compartments: cathode and anode, and these are divided by ion exchange membrane separator. The catalytic oxidation of the substrates produces H + and eˉ at the anode side. The eˉ undergo to the anodic surface via electrical mediators or direct eˉ transfer through H + membrane, which is existing on the surface of the microalgae. Then, the eˉ is subsequently moved to the cathodic compartment via the outer circuit and it generated current flow in the direction of cathodic to anodic. At the same time, H + also passes to the ion-exchange membrane to cathode chamber, where eˉ reduces O2 to H2O. The O2 is pumped out to the atmosphere from the cathode [148,149]. Jaiswal et al. [147] provided significant knowledge about MB-MFCs system. Different microalgae strains utilized for bioelectricity generation are presented in Table 7. Some recent investigation suggested that the integration of MB-MFCs system with microalgal based bioH2 production are a cost-effective approach for wastewater treatment and bioH2 production. In this system, wastewater is used as nutrient rich substrates for bacterial growth, the bacteria oxidize the substrates and generates H + and eˉ, the eˉ moves towards the anode, and is then transferred to the cathode where electron flow generates a bioelectric current. Then, H + moves towards cathode through the proton membrane exchanger and reacts with O2 (which are produced during microalgal respiration)

Bioelectricity
Microalgal based microbial fuel cell (MB-MFC) gains recent research attention due to its significant application in wastewater treatment and bioelectricity generation. Besides that, this technique also helps in carbon sequestration, bioH 2 production, and desalination [147]. MB-MFC is a biochemical system, which generates bioelectricity in the sequential biocatalytic reactions. MB-MFC systems are divided into two compartments: cathode and anode, and these are divided by ion exchange membrane separator. The catalytic oxidation of the substrates produces H + and e − at the anode side. The e − undergo to the anodic surface via electrical mediators or direct e − transfer through H + membrane, which is existing on the surface of the microalgae. Then, the e − is subsequently moved to the cathodic compartment via the outer circuit and it generated current flow in the direction of cathodic to anodic. At the same time, H + also passes to the ion-exchange membrane to cathode chamber, where e − reduces O 2 to H 2 O. The O 2 is pumped out to the atmosphere from the cathode [148,149]. Jaiswal et al. [147] provided significant knowledge about MB-MFCs system. Different microalgae strains utilized for bioelectricity generation are presented in Table 7. Some recent investigation suggested that the integration of MB-MFCs system with microalgal based bioH 2 production are a cost-effective approach for wastewater treatment and bioH 2 production. In this system, wastewater is used as nutrient rich substrates for bacterial growth, the bacteria oxidize the substrates and generates H + and e − , the e − moves towards the anode, and is then transferred to the cathode where electron flow generates a bioelectric current. Then, H + moves towards cathode through the proton membrane exchanger and reacts with O 2 (which are produced during microalgal respiration) and forms H 2 O. In algal cells, direct photolysis occurs, which produces bioH 2 , furthermore, produced algal biomass during this treatment process can be utilized for fermentative bioH 2 production [147]. The overall process of MB-MFCs based bioH 2 is illustrated in Figure 6. Moreover, advance approaches are integrated for advancement of MB-MFC, while its large scale realization need to be demonstrated for real-world application and commercialization [150]. Although, single MB-MFC process is ineffective to generate the power of different commercial implementation; therefore, it can be integrated with AD technology.

Biochar
Biochar is a carbon-rich charcoal made up by thermal decomposition (pyrolysis, hydrothermal liquefaction, and torrefaction) of different organic biomass under low oxygen and high temperature [166,167]. Biochar generally used as biofertilizer or absorbent for wastewater treatment, carbon sequester, etc. [167]. However, recent studies suggested that it can be used as a source of coal or coal fuel for the electricity generation [26,167]. Several studies reported that microalgal biomass have the potential for conversion into biochar [26]. Among the thermal conversion process, pyrolysis and torrefaction are promising technologies for biochar production from microalgal biomass [168]. Biochar produced by pyrolysis of microalgal biomass showed higher surface area, which has the properties of bio-adsorbent and can be used for removal of pollutant from liquid solution. The biochar produced by the pyrolysis process showed lower calorific value as compared to biochar produced from torrefaction process. Therefore, torrefaction process can be considered for biochar production from microalgal biomass. Due to high calorific value of biochar produced from torrefaction process, recently the research increased significantly to convert various types of biomass as solid coal fuel that can allow to partially replace the demand of fossil fuel [169]. Moreover, biochar derived from the torrefaction process offers a higherheating value (HHV) and a higher carbon number, improved grindability and aquaphobic in nature, lower moisture content, and ashes, as well as atomic ratio in comparison to unprocessed biomass/feedstock [170]. In the torrefaction process, moderate operational parameters allow to attain better productivity and yield of solid mass in comparison to traditional pyrolysis process at a high temperature [171]. Gan et al. [167] reviewed the biochar production from microalgal biomass through the torrefaction process. The review summarized that operational parameters such as temperature and residence time are the key parameters that influence the quality of biochar and solid yield. Biochar obtained from torrefaction of C. vulgaris ESP-31 biomass showed high higher heating value (HHV), while biochar obtained from Chalamydomonas sp. JSC4 showed lower atomic ratio and high carbon content. Biochar produced from microalgal biomass using pyrolysis process showed high bio-adsorbent property, which can used to absorb the pollutants from wastewater. Therefore, a microalgal biorefinery can be employed for sustainable development of circular bioeconomy. Moreover, Table 8 summarizes the fuel properties and comparison of different biochar derived from microalgal biomass and other biomass in dry and wet torrefaction.
OR PEER REVIEW 17 of 26 and forms H2O. In algal cells, direct photolysis occurs, which produces bioH2, furthermore, produced algal biomass during this treatment process can be utilized for fermentative bioH2 production [147]. The overall process of MB-MFCs based bioH2 is illustrated in Figure 6. Moreover, advance approaches are integrated for advancement of MB-MFC, while its large scale realization need to be demonstrated for real-world application and commercialization [150]. Although, single MB-MFC process is ineffective to generate the power of different commercial implementation; therefore, it can be integrated with AD technology.

Challenges of Microalgal Biorefineries and Future Perspectives
Microalgal biorefineries have gained tremendous attention for treatment of different types of wastewater generated from various industries and to produce various types of biofuel as well as other biotechnological, industrial, and environmental applications. However, there are still several challenges that need to be addressed, which include lower biomass productivity, harvesting of algal biomass, and energy consumption, as well as higher production cost for algal biofuel than the fossil-based fuels. To overcome these key challenges, flue gases and wastewater have been used for microalgae cultivation, which decrease the cost of nutrients and carbon source, but operational costs are high. However, the commercial production of microalgae biofuel remains a major constraint due to higher cost of microalgae cultivation and biomass harvesting. Therefore, algal biomass needs to be explored for potential application in different sectors mainly in cosmeceuticals and other sectors. Algal biomass cultivated using wastewater contains numerous toxic compounds including heavy metals, which demands efficient extraction technology for selective extraction of the desired compound with high purity from algal biomass. In this case, supercritical fluid extraction technology can be employed for selective extraction of desired compounds from microalgal biomass [185][186][187]. However, there are several knowledge gaps and problems associated with biomass production and lower yield, high expenses, and lack in commercialization of algal bioprocess. To enhance the biomass productivity, high inputs of nitrogen source can be used to enhance the biomass productivity, while modern genetic engineering tools such as CRISPR-Cas9, TALEN, and ZFN-17 can be applied to alter the genome and metabolic pathways of microalgae to enhance the biomass productivity for biofuel production as well as synthesis of various bioactive compounds for various commercial applications. For the reduction of energy consumption during microalgae-based bio-fuel production, further strategies need to be explored. Therefore, several steps need to be integrated to achieve a sustainable low-cost bio-fuel production process.

Conclusions
The present review focused on the microalgal biorefinery for resource recovery from wastewater in a sustainable manner. It also discussed the available technologies for treatment of various wastewater and highlighted that wastewater treatment from microalgaebased systems can provide a higher pollutant removal compared to most traditional systems, in a sustainable way. In addition, different microalgae cultivation systems for costeffective removal of various types of pollutant/nutrient from wastewater were examined. Among the various types of existing microalgae cultivation systems, ATS and HCS are highly recommended for fast and efficient removal of pollutants form wastewater. They also allow easier, faster, and cheaper biomass harvesting. Furthermore, microalgal biomass can be exploited for various types of biofuel production. Biodiesel produced from various microalgal strains, among them S. marginatum, derived biodiesel with the highest calorific value of 42.052 MJ/kg. However, in a biofuel scenario, microalgal biomass can be used for bioCH 4 production during co-digestion and microalgal biorefineries can be integrated for biogas upgrading, while the effluent from after AD process can be used as cultivation of microalgae. Microalgae based biogas upgrading showed up to~98% CO 2 removal efficiency. In conclusion, development of integrated sustainable microalgal bio-refinery with multiple product recovery will provide an environmentally and economically sustainable solution to wastewater treatment and biofuel production.