A state-of-the-art review of N self-doped biochar development in supercapacitor applications

Due to its renewability, eco-friendliness, and cost-effectiveness, biochar is a promising alternative to fossil fuel-based carbon for electrode material application in supercapacitors. However, pristine biochar often exhibits poor structure and low activity, which strongly inhibit its commercial utilization. N-doping is an efficient way to improve the electrochemical performance of biochar by enhancing the conductivity and surface wettability that further induce a pseudo-capacitance effect. Compared with external doping, the synthesis of N self-doped biochar from natural N-rich biomass without using external N precursors, which are harmful and costly, has attracted increasing attention. Few reviews of N-doped biochar applications in supercapacitors are available, and studies of N self-doped biochar are still scarce. This paper reviews the developments over the past 10 years on the preparation, activation, and application of N self-doped biochar in supercapacitors. Notably, the evolution of N-functionalities during N self-doped biochar production with or without activating agents was analyzed. The relationships between N content and the specific capacitance and the contribution of N self-doping-induced pseudo-capacitance to the total specific capacitance are also discussed. Finally, the challenges and the prospects of N self-doped biochar applications in supercapacitors are proposed.

Supercapacitors are a promising energy storage technique because of their high power density, rapid charging/discharging rate, long cycle life, excellent reversibility, etc. (Yan et al., 2014). However, lower energy density greatly limits their large-scale utilization. The electrode material is the critical factor affecting the energy density of supercapacitors (Bo et al., 2019;Huang et al., 2019). Thus, improving the electrochemical properties of electrode materials is the most convenient and effective way to increase energy density. To date, carbon-based materials, such as graphene, activated carbon, carbon nanotube, and carbon aerogel, are widely used as electrode materials in supercapacitors because of their high conductivity, large surface area, tunable porosity, superior stability, and enriched electroactive sites (Zhu and Xu, 2020;Wesley et al., 2022). However, these carbon materials are mainly derived from fossil materials using complex and costly procedures that are greatly harmful to the environment and human health (Zhu and Xu, 2020). Thus, there is an urgent need to explore an eco-friendly, sustainable, and cost-efficient resource for carbon material production.
As the only carbon-based renewable energy resource, biomass is considered an alternative to fossil fuels because it can not only be used for power generation and heat supply but can also be converted into syngas, bio-oil, and biochar products by thermochemical and biochemical techniques. Because biomass is derived from the photosynthetic process of CO 2 and H 2 O in nature, almost zero or even negative CO 2 emissions can be achieved during its cycle life. Due to the renewability, abundance, and accessibility of biomass feedstock, biochar is considered an effective electrode material for supercapacitors (Liang et al., 2018;Cuong et al., 2021). There are also other advantages for biochar application as electrode material, such as its physical and chemical stability, large surface area, and developed porous structure, which are beneficial to ion transport (Tang et al., 2017), the abundant surface functional groups (e.g., N-, O-, S-, and P-containing functional groups), and the ability to deal with solid waste in large quantities (Cuong et al., 2021). Moreover, biochar is low cost because it is often the main product from biomass or a by-product when biomass is used to produce bio-oil or syngas (Zhu and Xu, 2020). Meyer et al. also reported that the cost of biochar production is far less than that of activated carbon and graphitic carbon (Meyer et al., 2011).
Various techniques have been developed for biochar production, such as pyrolysis, hydrothermal carbonation, torrefaction, and microwave-assisted pyrolysis. However, biochar in its raw form often exhibits poor porous structure and low activity that is adverse to its utilization in supercapacitors (Cuong et al., 2021). To further improve the electrochemical performance, modification of biochar is essential. To date, two methods are commonly used: 1) activation by physical and chemical activators to defuse the porous structure of biochar . The physical activators refer to CO 2 , H 2 O, and air, while the frequently used chemical activators include KOH (Qin et al., 2022), H 3 PO 4 , and ZnCl 2 (Lima et al., 2022); 2) doping of heteroatoms such as N, P, and S to enrich surface functional groups Xia et al., 2022). Among these heteroatoms, N-doping is most implemented due to easily available and low-cost N sources such as NH 3 , urea, and melamine (Bai et al., 2021;Mehdi et al., 2022;. Doping of N heteroatoms can enhance conductivity and surface wettability, and induce a pseudo-capacitance effect of the carbon material, thereby improving its energy/power density with versatile properties (Gopalakrishnan and Badhulika, 2020). Thus, the specific capacitance of N-doped biochar is the sum of the electrical double-layer capacitance and the pseudo-capacitance, significantly improving the performance of supercapacitors. More importantly, doping of N atoms can reduce lattice mismatching and increase electronic conductivity because N is the neighboring element of carbon in the periodic table (Gopalakrishnan and Badhulika, 2020). Usually, to achieve a better modification effect, these two methods are often implemented in combination with each other.
All kinds of biomass can be employed as the feedstock for biochar production, including agricultural waste (Lang et al., 2021;, tea waste (Wesley et al., 2022), woody biomass , seeds , animal waste (Qin et al., 2022;, fungal waste , vegetables Xue et al., 2022), and starch . Among the various types of biomass, it is worth noting that some naturally have a higher N content, for example, algae , mushrooms (Xue et al., 2022), spent coffee ground (Sangprasert et al., 2022), bean pulp , pharmaceutical drug residues , amino acids (Guo et al., 2021), etc. The bio-oil and syngas production from these N-rich biomasses usually contain high levels of N-containing components, leading to the molecular oligomerization, viscosity, and emission of NOx during subsequent combustion . Therefore, N self-doped biochar is a preferentially expected product for N-rich biomass utilization. Compared with the co-pyrolysis of biomass and extra N precursors, the self-doping strategy via pyrolyzing N-rich biomass is eco-friendly and costeffective because the use of extra N sources is avoided . By comparing the environmental performance of a biochar aerogel-based electrode (BA-electrode) and a graphene oxide aerogel-based electrode (GOA-electrode) using the life cycle assessment method, Jiang et al. (2021) found that the life cycle global warming potential for the BA electrode was lower than that of GOA electrode, with a reduction of 53.1-68.1%. Compared to a GOA electrode, the environmental damages of a BA electrode were greatly decreased by 35.8-56.4%, 44.9-62.6%, and 87.0-91.2% for human health, ecosystems, and resources, respectively. Due to these advantages, producing N self-doped biochar using N-rich biomass feedstocks is attracting increasing attention. Various strategies for N self-doped biochar production have been reported. Understanding the existing strategies and the performance of supercapacitors using N self-doped biochar as the electrode material is of great significance to future research. In this study, the latest developments in the preparation, activation, and application of N self-doped biochar in supercapacitors are reviewed. Notably, the evolution of N-functionalities during N self-doped biochar production with or without activating agents and the impact of N self-doping on the electrochemical performance are discussed. Although numerous reports with respect to biochar utilization in supercapacitors are available, reviews on N self-doped biochar for supercapacitor application are still scarce.

Preparation of N self-doped biochar
The preparation of N self-doped biochar usually involves some or all of the following steps: 1) pretreatment of the raw biomass, 2) pre-carbonization or pre-activation in mild conditions, 3) pyrolysis/ carbonization or activation with one or more step(s), 4) posttreatment of the solid product. Because the activation is often implemented simultaneously with pre-carbonization or pyrolysis, the activation is introduced together with the preparation procedures in this review.

Pretreatment methods
The inorganic elements naturally occurring in biomass are considered to be unfavorable to the electrochemical performance of biochar. Zhu et al. reported that excessive residual metal content in algal biomass plays the role of "dead mass," resulting in a lessdeveloped porous structure . Therefore, raw material is often pretreated to remove the impurities before carbonization. Washing with acetone , ethanol (Yan, 2020), deionized water (Sinha et al., 2020), distilled water , or ultrapure water  or washing/ soaking in acid solutions such as HCl (Wen et al., 2019), H 2 SO 4 (Sattayarut et al., 2019), HNO 3 , and acetic acid/H 2 O 2 /HF/NaClO 2 , or the combination of them, are most frequently performed. It was reported that washing with water (H 2 O-CC), formic acid (FA-CC), acetic acid (AA-CC), oxalic acid (OA-CC), and propionic acid (PA-CC) showed significant effects on the pyrolysis characteristic of corn cob (CC) (Figure 1) . When acid washing is employed, water washing is required to remove the residual acids. Then, the washed biomass is dried in an oven at 60-110°C or freeze-dried Zhu et al., 2019) to remove the extra moisture. The washed and dried biomass is cut into small pieces or ground into powders with the desired sizes manually in a mortar or by an automatic mill. However, the washing of biomass is still under debate because some researchers Qin et al., 2022) have found that the presence of the inorganics in the raw biomass actually promoted the development of pores. This might be attributed to the diversity of biomass feedstock and types of inorganics. Thus, the impact of pretreatment on the performance of biochar is still unclear. It is necessary to clarify the effects of inorganics on the physiochemical properties of biochar so that the pretreatment of the feedstock can be rationally performed.

Pre-carbonization/pre-activation
Hydrothermal carbonization is a mild thermochemical conversion process requiring a liquid environment under autogenous pressures (2-10 MPa) at 150-300°C. It is mainly explored to deal with wetland plants and biomass with high moisture content to produce bio-oil and hydrochar (Soroush et al., 2022). It consumes less energy than pyrolysis because it does not require a pretreatment step (MacDermid-Watts et al., 2020;Stobernack et al., 2020). Generally, the hydrochar exhibits low surface area and poor porous structure. For example, the hydrochar derived from cow manure obtained its largest surface area and pore volume of only 6.114 m 2 /g and 0.021 cm 3 /g, respectively . However, due to the high hydrochar yield of 40-70 wt% (Zhu and Xu, 2020), hydrothermal treatment is sometimes employed as a precarbonization or pre-activation strategy before pyrolysis to yield carbon precursors for N self-doped biochar production, as shown FIGURE 1 (A) Thermogravity (TG) and (B) differential thermogravimetry (DTG) curves for raw and washing pretreated samples .

FIGURE 2
Typical procedure for hydrothermal treatment combined with pyrolysis.

Frontiers in Energy Research
frontiersin.org in Figure 2 (Si et al., 2013;Rong et al., 2019;Wen et al., 2019;Hu et al., 2022). A hydrothermal process also has the ability to insert or stabilize foreign atoms into the carbon matrix (Yu et al., 2021;Sangprasert et al., 2022) and etch pores to a certain extent due to the hydrolyzation of hemicellulose and cellulose Hu et al., 2022). Thus, modification of functional groups and the porous structure can be achieved by changing the solvent medium (Rawat et al., 2022). The formation of a pore structure and carbon skeleton is more beneficial to subsequent carbonization/activation compared to the parent biomass . Figure 3 displays the comparison of the morphologies of the peanut shell-derived biochar products prepared by Na 2 CO 3 -K 2 CO 3 activation with/ without hydrothermal pre-treatment. The surface structure of biochar was significantly enhanced by hydrothermal pretreatment.

Stepwise pyrolysis
Pyrolysis, which is performed in an oxygen-limited atmosphere at elevated temperatures, is a well-developed and widely used thermochemical conversion technique for biochar production due to its advantages of flexibility, speed, economy, eco-friendliness, and large capacity . Pyrolysis is traditionally divided into slow, fast, and flash pyrolysis according to the temperature, residence time, and heating rate Zhou et al., 2021). Slow pyrolysis refers to the pyrolysis process performed at temperatures lower than 500°C with a heating rate <10°C/min and a residence time of several hours to days. Fast pyrolysis is often conducted at a temperature ranging from 500°C to 900°C, with a heating rate of 10-100°C/min. The residence time assigned to fast pyrolysis is less than 10 s; however, it often varies from a few minutes to hours for biochar production. Flash pyrolysis, which is performed at a temperature of around 1,000°C, with a heating rate >1,000°C/min and a residence time <2 s, is explored, in particular for bio-oil production. For biochar preparation, slow pyrolysis is preferred due to the higher biochar yield of >30 wt%, followed by fast pyrolysis with a biochar yield of 10-12 wt%. Considering the preparation of N self-doped biochar, one-step and two-step pyrolysis procedures are frequently used. During onestep pyrolysis (Figure 4), the pretreated biomass Liu et al., 2017;He et al., 2019;Yu et al., 2019;Zhang et al., 2019; or the mixture of biomass and activating reagents Lian et al., 2019;Zhao et al., 2020) is directly pyrolyzed in a furnace. For the two-step method, the pretreated biomass is first pre-carbonized and then activated with reagents ( Figure 5A) Biegun et al., 2020;Yan, 2020), carbonized after preactivation ( Figure 5B) (Wen et al., 2019), or successively pyrolyzed without an activator ( Figure 5C) (Huang et al., 2018;Ma et al., 2019). Generally, the first step of the successive pyrolysis is also considered a pre-carbonization process (Wang and Liu, 2015). Precarbonization is reported to have the ability to remove impurities effectively and improve activation efficiency with reduced consumption of the activator (Jiao et al., 2022). In addition to these methods, a three-step strategy involving pre-carbonization, hydrothermal treatment, and activation was also implemented for N self-dope biochar production from walnut shells  and Enteromorpha prolifera .
Microwave-assisted pyrolysis is conducted using a microwave furnace with an electromagnetic spectrum frequency that ranges from 0.3 to 300 GHz and a wavelength that ranges from 1,000 to 1 mm . Microwave pyrolysis heats the samples uniformly based on the resonation of the microwave radiation frequency and that of water molecule vibration in the target samples. Therefore, microwave pyrolysis is typically appropriate to process biomass with a high moisture content. Microwave heating also has the advantages of energy efficiency and fast response . A two-step pyrolysis procedure involving carbonization and microwave-assisted activation was employed by Foo and Hameed (2013) to prepare biochar from oil palm shells. As shown in Figure 6, the oil palm shell was first carbonized at 700°C, and the produced char was then activated with KOH in a microwave oven.
Plasma is another effective technology to process material under mild conditions, with the advantages of being chemical-free and simple. For example, non-thermal plasma processing was applied to modify the biochar derived from bamboo shoot shells before it was used in contaminant removal and supercapacitor applications (Zhou et al., 2022). The biochar after plasma treatment exhibited enhanced hydrophilicity, larger surface area, and higher N/O content, leading to higher absorption capacity and the improvement of electrochemical performance.
Conventional pyrolysis, microwave-assisted pyrolysis, and plasma treatment are all effective techniques for N self-doped biochar preparation. Conventional pyrolysis in a heating FIGURE 3 SEM images of peanut shell-derived biochar: (A) carbonized in molten Na 2 CO 3 -K 2 CO 3 salt without hydrothermal pre-treatment, (B) hydrothermal pre-treatment for 12 h before carbonization, (C, E) hydrothermal pre-treatment for 24 h before carbonization, and (D, F) hydrothermal pre-treatment for 48 h before carbonization .
furnace with a one-step or two-step strategy is still the mainstream method, while microwave-assisted and plasma pyrolysis are rarely reported.

Posttreatment
After these steps, the obtained N self-doped biochar is washed with dilute acid (HCl, H 2 SO 4 , HNO 3 , etc.) solution to remove the inorganic impurities and subsequently washed by deionized/ distilled/ultrapure water until neutral (Raj et al., 2018;. Finally, the purified biochar is dried for further investigation of its electrochemical performance.

N self-doped biochar applications in supercapacitors
N self-doped biochar is produced from naturally N-rich biomass, including plants, animals, foods, algae, organic wastes, protein/amino acids, and fungus, as shown in Figure 7. Among these types, N-rich plant-based biomass is the most commonly used for N self-doped biochar production. Alkali hydroxides, especially KOH,

FIGURE 4
One-step method commonly used for N self-doped biochar production.

FIGURE 6
Two-step procedure of carbonization, followed by microwave activation.
are the favorite activating reagents due to their excellent pore etching ability, the mechanism of which is described as follows. First, KOH reacts with carbon to generate H 2 and CO 2 and simultaneously forms K 2 CO 3 (R1). As the temperature reaches 700°C, K 2 CO 3 decomposes into K 2 O and CO 2 (R2). Then, CO 2 reacts with carbon to form CO (R3). With the continuous increase of temperature, both K 2 CO 3 and K 2 O are reduced, accompanied by the release of CO and K vapor (R4 and R5). Finally, the gases and K vapor pass through the carbon matrix to activate the pore formation.

Plant-based N self-doped biochar
The N-rich plant-based biomass involves leaves, flowers, stems, barks, fruits, seeds, and roots of plants, as well as the derived straws that contain enriched protein or vitamins. For example, N-doping porous carbon fabricated from quinoa with KOH activation exhibited a special capacitance of 330 F/g at a density of 1 A/g . N, S co-doped hierarchical porous carbon was fabricated from ginkgo leaves via carbonization, followed by NaOH/KOH activation . Due to the high specific surface area SSA (975 m 2 /g) and higher heteroatom content (1.88% N and 1.87% S), the derived carbon exhibited a high specific capacitance of 333.4 F/g at 0.1 A/g. Jiao et al. reported a hierarchical porous biochar (1.7% N) from soybean straw produced by carbonization and mild activation with KOH (Jiao et al., 2022). The optimal sample exhibited a specific capacitance of 380.5 F/g at 0.5A/g. Protein-rich soybeans were also converted into a heteroatom self-doped biochar with KOH activation Yan et al., 2020;Yu et al., 2021). Other plants used to prepare N self-doped biochar involving KOH activation for supercapacitor application include corn silk , Broussonetia papyrifera stem bark , Moringa oleifera branches (Cai et al., 2016), walnut shells , longan shell (Yan, 2020), broad bean shells , longan pulp , lotus leaves , Viburnum sargentii leaves , Samanea saman leaves (Sattayarut et al., 2019), willow catkins , tobacco rods , fallen Camellia flowers (Guo et al., 2017), rose multiflora , pomelo peel , mung bean husk , cotton seed husks , bamboo shoot shells , metasequoia fruit (Jia et al., 2019), and soybean root (Guo et al., 2016), as shown in Table 1.
On account of the strong corrosivity of KOH, moderate activating reagents such as carbonates and chlorides are considered to be the alternatives. Foxtail grass seeds were carbonized at 550-750°C with NaHCO 3 /KHCO 3 to prepare a self-doped biochar . Benefiting from the large SSA of 819 m 2 /g and a high N content of 2.52 at.%, the as-prepared biochar displayed a high gravimetric capacitance of 358.0 F/g at 0.5 A/g. N self-doped carbon materials were also prepared from eucalyptus leaves (Mondal et al., 2017) and fallen flowers of Magnolia denudata  with KHCO 3 activation. A heteroatom self-doped porous biochar (1.02 at% N) from peanut shells was prepared via hydrothermal carbonization, followed by Na 2 CO 3 -K 2 CO 3 activation , showing a specific capacitance of 447 F/g at 0.2 A/g. Pine pollen was pyrolyzed with MgCO 3 , and the derived carbon possessed a high specific capacitance of 419.6 F/g at 1A/g . Lily was  . KMnO 4 was also employed as the activating reagent for spring onion peel-derived biochar (Zhao et al., 2020), the specific capacitance of which was 490.7 F/g at 1.0 A/g and the energy density was 92.0 Wh/kg at a power density of 1800 W/kg in supercapacitors. KCl and NaCl were utilized as activators when producing N self-doped biochar from clover  and flower petals of Salvia splendens . A comparison of KOH and other activating reagents was also performed. For example, chemically and physically activated pyrolysis of chestnut was compared using KOH and CO 2 as activators, respectively (Januszewicz et al., 2020). The KOHactivated sample exhibited much better electrochemical performance due to the higher SSA and well-developed porosity. N self-doped porous carbons were synthesized using vitaminenriched carrots and an Na 2 SiO 3 activator (Du et al., 2021). Na 2 SiO 3 showed a better activation performance than KOH, leading to a high capacitance of 268 F/g at 1 A/g for the derived biochar.
Without using any activating reagents, He et al. reported an N self-doped biochar obtained from the direct calcination of celery, the capacitance of which reached 245 F/g (He et al., 2019). Kapok fiber  and Perilla frutescens  were also directly pyrolyzed to synthesize an N self-doped biochar for supercapacitors.

Animal-based N self-doped biochar
The preparation and application of animal-based N self-doped biochar in supercapacitors are summarized in Table 2. Waste shrimp shells that contain N-rich poly-b (1/4)-N-acetyl-D-glucosamine were expected to be an excellent precursor for N self-doped carbon. For example, shrimp shell-derived carbon using hydrothermal treatment with KOH and carbonization obtained a specific capacitance of 239 F/ g at 0.5 A/g (Mondal et al., 2017). Mantis shrimp shells were directly carbonized at different temperatures, and the biochar derived at 750°C demonstrated a high specific capacitance of 201 F/g at a current density of 1 A/g due to the large SSA of 401 m 2 /g and high N content (8.2 wt%) (Huang et al., 2021).  (2017) C is the maximum specific capacitance of N self-doped biochar in a three-electrode system. Es and Ws are the maximum energy density and power density of the assembled supercapacitor, respectively.

Frontiers in Energy Research frontiersin.org
Animal bone is a natural composite composed of organic collagen. It is rich in C/N elements and can be used as the C/N source to form N self-doped carbons. It is also a source of inorganic hydroxyapatite that disperses homogeneously within the bone as a natural template (Shao et al., 2017). The cattle bone-derived carbon possessed an ultrahigh SSA (2,203 m 2 /g) with meso-and macropores, a high N content (2.3%), and a good specific capacitance (Shao et al., 2017). He et al. reported an N/O codoped carbon from cattle bones with a large SSA (2,520 m 2 /g), a high content of N (1.56%) and O (10.2%), and a large specific capacity (435 F/g at 0.1 A/g) (He et al., 2017). By simultaneous pyrolysis and activation, pork bone, blackfish bone, and eel bonederived carbon, which had a higher ratio of micropore surface area and N content, exhibited enhanced specific capacitance (Niu et al., 2019). N/P co-doped porous carbon was prepared from silkworm cocoons and phytic acid by the self-activation approach, achieving a gravimetric capacitance of 317 F/g at 1 A/g . After sufficient soaking with KOH solution, the beehive was then calcined to produce a multilevel gradient structural N/S codoped carbon . The obtained carbon materials exhibited a best capacitive capability of 296.1 F/g at a current density of 1 A/g. Human hair, rich in keratin, was carbonized with KOH, ZnCl 2 , and H 3 PO 4 . The KOH-activated biochar showed the best electrochemical performance with an outstanding specific capacitance of 999 F/g at a current density of 1 A/g (Sinha et al., 2020). After treatment with KOH, fish skin, primarily composed of collagen, such as glycine, proline, alanine, and methionine, was converted into ternary-doped carbon nanosheets (Niu et al., 2018), with a gravimetric capacitance of 438 F/g at 0.1 A/g. Using pig nail as N-rich biomass, a porous carbon was fabricated by carbonization and KOH activation. The supercapacitor derived from this product exhibited a remarkable energy density of 29.43 Wh/kg . An N-enriched biochar was fabricated from the natural casing, an inherently tough translucent film consisting of fat and protein, and exhibited a desirable SSA (3,100 m 2 /g), high N content (6.34 at.%), and high specific capacitance (307.5 F/g at 0.5 A/g) . Porcine bladders were also processed with the same strategy . The derived carbon material exhibited large SSA (1881.7 m 2 /g), high N content (5.38%), and, consequently, high specific capacitance (322.5 F/g at 0.5 A/g).

Food-based N self-doped biochar
Eggs, beancurd, and milk, which are rich in protein and can be used as human food, are assigned to N-rich food-based biomass. Table 3 shows the details of the preparation and application of foodbased N self-doped biochar in supercapacitors. A two-step method involving carbonization and KOH activation was employed to synthesize carbon materials from egg white (Zhu et al., 2019). The derived carbon showed a high SSA of 2,918 m 2 /g and a high specific capacitance of 335 F/g at 0.5 A/g. Egg white was also carbonized with a ZnO template to fabricate a carbon material with a capacitance of 205 F/g at 0.5 A/g (Chen et al., 2015). Ma et al. reported an N self-doped carbon from the mixture of fresh chicken eggs and graphene oxide via hydrothermal carbonization and KOH activation (Ma et al., 2017). Datetal. (2020)preparedanNself-dopedcarbonfromexpiredfresh milk via hydrothermal carbonization and sequential KOH-H 3 PO 4 activation. The derived biochar achieved a specific capacitance of 186.3 F/g. Yogurt was also used to synthesize highly N self-doped biochar for supercapacitor application via hydrothermal treatment and activation (Wahid et al., 2015). A strategy of simultaneous CaCO 3 template and KOH activation was explored for N self-doped biochar production from soybean milk (Chen etal., 2019). The obtained carbons exhibited a specific capacitance of 240.7 F/g at 1 A/g.
A one-step impregnation activation method ) and a two-step method with the CH 3 COOK activator  were reported for N self-doped biochar synthesis from beancurd. CH 3 COOK was decomposed into K 2 CO 3 at about 303°C and then as-formed K 2 CO 3 reacted with carbon to generate many micropores, following R2-R5. The derived carbon materials delivered capacitances of 284 F/g and 245 F/g, respectively, at 0.1 A/g. Zhang et al. reported an N, O-doped activated carbon from household expired coffee by direct water vapor activation, achieving a high gravimetric capacitance of 312 F/g at 1.0 A/g .

Algae-based N self-doped biochar
Algae are autotrophic and embryoless plants capable of photosynthesis involving macroalgae and microalgae, which are mainly composed of lipids, proteins, and carbohydrates . It was reported that a hierarchically porous structure with a balanced distribution of mesopores and micropores is more effective in the capacitive performance of algae-derived carbon than the components of raw algae, such as proteins . Therefore, the synthesis of N self-doped char with a well-developed pore structure is a promising pathway for algae utilization. The algae-based N self-doped biochar in supercapacitor results are presented in Table 4.
A two-step procedure of carbonization and KOH activation was used for biocarbon preparation from Lessonia trabeculata (Sankaranarayanan et al., 2021) and Laminaria japonica . The derived carbon materials exhibited good capacitances of 81.6 F/g at 1A/g and 192 F/g at 0.1 A/g, respectively. Chlorella-derived activated carbon was also prepared via the two-step procedure, exhibiting a gravimetric specific capacitance of 142 F/g at 1 mA/cm 2 . Ren et al. reported an N self-doped carbon from hydrothermal carbonization of Enteromorpha prolifera, followed by a mild KOH activation . Ascophyllum nodosum (Perez-Salcedo et al., 2020), Cladophora glomerata (Norouzi et al., 2021), and Enteromorpha (Yu et al., 2016) were also activated by KOH to fabricate N self-doped carbon material for supercapacitor application. Immersion with hydrofluoric acid increased the electrochemical performance of the biochar from Nostoc flagelliforme algae .
Three types of marine algae were carbonized at 800°C with in situ salts as activating reagents . The derived biochar possessed high SSA (621-1,140 m 2 /g) and N content (4.15-5.19%) and exhibited good energy storage performance (190.0-278.5 F/g at 0.5 A/g) and cyclic stabilities (96%-98% after 5,000 cycles). Chlorella mixed with reed and K 2 CO 3 was carbonized to produce 3D N-doped biochar . Due to the high N content (2.1 wt%), large SSA (1794 m 2 /g), and pore volume (1.32 cm 3 /g), the capacitance of the biochar reached 340.4 F/g at 1 A/g. Liu et al. reported a sponge-like carbon material from Spirulina platensis with NaHCO 3 activation, the largest specific capacitance of which was 234 F/g at 1 A/g . A comparison between KHCO 3 and CO 2 activation was conducted for Myriophyllum aquaticum-derived biochar production . The results showed that the KHCO 3 -activated carbon possessed a better electrochemical performance.

Organic waste-based N self-doped biochar
N-rich organic wastes are by-products with high N content generated during the industrial manufacturing process, such as antibiotic fermentation residue from antibiotic production, spent coffee ground from coffee brewing, bean pulp/oil cake from oil production, and composting leachate from biobased-waste composting. The application of organic waste-based N self-doped biochar in supercapacitors is summarized in Table 5.
Antibiotic fermentation residue, which is inevitably produced during the antibiotic fermentation process, can be used for N selfdoped biochar production due to its high N content and large volume. The oxytetracycline mycelial residue-derived biochar via carbonization and KOH activation showed an ultrahigh SSA (2,574.9 m 2 /g), a higher N content (2.27%), and, consequently, a distinguished specific capacitance (307 F/g) .  fabricated self-doped porous carbon nanosheets from fermentation residues of lincomycin hydrochloride via hightemperature pyrolysis and subsequent KOH activation. The derived biochar exhibited an excellent gravimetric capacitance of 296 F/g at 1 A/g. Hu et al. (2022) reported an N self-doped porous carbon from penicillin fermentation residue via hydrothermal carbonization combined with KOH or ZnCl 2 activation. The ZnCl 2 -activated biochar exhibited a larger SSA of 792.58 m 2 /g and a higher N content of 4.75%, resulting in a higher specific capacitance of 209.2 F/g at 1 A/g in a three-electrode system and an energy density of 8.79 Wh/kg for assembled supercapacitors.
N self-doped biochar was synthesized from spent coffee grounds via hydrothermal carbonization, followed by KOH activation (Sangprasert et al., 2022). The optimal biochar showed a high SSA of 1835 m 2 /g and 2.35 wt% N content, and, subsequently, a high energy density of 10.84 Wh/kg in a two-electrode system. A procedure of hydrothermal acidic hydrolysis, followed by KOH activation was also designed for spent coffee ground biochar production for use in supercapacitors (Biegun et al., 2020).
The high protein content in the defatted soybean, a solid residue generated from oil production, makes it highly suitable for the fabrication of N self-doped carbon materials. Zhou et al. reported an N/O co-doped porous carbon from soybean dregs through carbonization and KOH activation, possessing a high SSA (1837.26 m 2 /g) and a high N content (1.58 wt%), and then a superior specific capacitance . Another procedure of hydrothermal carbonization and KOH activation was implemented to convert soybean residue into an N selfdoped carbon with high specific capacitance (Ferrero et al., 2015). By carbonization and CO 2 activation, bean pulp was converted into a carbon material with a maximum SSA of 558.2 m 2 /g, an N content of up to 10%, and a maximum specific capacitance of 106 F/g at 0.25 A/g . The introduction of CO 2 retained more N atoms in biochar in the form of N-5, N-6, N-Q, and N-X. Oil cake, the main by-product of Idesia polycarpa oil production, also contributed to N self-doped porous biochar with K 2 FeO 4 impregnation and activation . During the impregnation process, K 2 FeO 4 was hydrolyzed into KOH and Fe(OH) 3 (R6). The activation process of KOH is described in R1-R5, and that of Fe(OH) 3 is shown in R7-R9. First, Fe(OH) 3 was transformed into Fe 2 O 3 and then further reduced to Fe 3 O 4 by carbon or reductive gases (H 2 , CO). Then, Fe 3 O 4 was further reduced into metallic Fe, which finally catalyzed the conversion of amorphous carbon into graphitized carbon.
Composting leachate, a type of organic wastewater produced during composting of biobased waste, mainly consists of oxidizable organics, ammonium, phosphorus, and pathogenic organisms. Due to its high moisturecontent,ahydrothermalpre-carbonizationandKOHactivation strategy was used to produce carbon materials for supercapacitors (Liu etal.,2020).ThecarbonmaterialexhibitedthehighestSSAof2,184.9 m 2 /g and an excellent capacitance of 228 F/g at 0.5 A/g.
Footwear leather waste generated from the cutting process of footwear manufacturing was also contributed to N self-doped biochar production. After carbonization and KOH activation, the leather-derived biochar obtained a specific capacitance of 268 F/g (Martínez-Casillas et al., 2018). N self-doped carbon materials (3.0 wt%) prepared from the waste of PTM bark generated from Xuan paper manufacturing exhibited a high specific capacitance of 206 F/g at 0.5 A/g (Sun, 2017).

Protein/amino acid-based N self-doped biochar
As green, highly accessible, and eco-friendly organic compounds, proteins and amino acids can not only be used as dopants of N atoms but also the precursor of both carbon and nitrogen directly to prepare N self-doped carbon materials. The application of protein/amino acid-based N self-doped biochar is shown in Table 6.
Using soy protein as a C/N precursor, N/O co-doped carbon coated graphene was prepared by one-pot hydrothermal synthesis, followed by carbonization . The resultant material demonstrated a high volumetric capacitance of 221 F/g at 0.2 A/g. Another N/O co-doped carbon was fabricated from pea protein, the specific capacitance of which reached 413 F/g at 1 A/g (Demir et al., 2018). Microporous carbon obtained from protein by KOH activation (Niu et al., 2019) exhibited an SSA of 1,117 m 2 /g, a high N content of 15.29 at.%, and a specific capacitance up to  (2017) Frontiers in Energy Research frontiersin.org supercapacitor application from sericin, a waste protein . Ma et al. reported a beer yeast protein-derived carbon via stepwise pyrolysis without an activator . Wheat gluten, a complex mixture of hundreds of proteins found in wheat and related grains , and electrospun plant protein fibers ) were also converted into N self-doped porous carbon for supercapacitor application.
There are many different kinds of amino acids with low price, abundance, accessibility, and low health use for N self-doped biochar fabrication. For example, the N self-doped carbon prepared from L-glutamic acid with ZnCl 2 activation exhibited a specific capacitance of 330.6 F/g at 1 A/g (Ma et al., 2016). N/S codoped carbons were prepared by KOH carbonization of the combination of L-cysteine and NaCl template at 600°C-800°C (Guo et al., 2021). Due to the highest N content, the 700°C-derived biochar showed the largest gravimetric capacitance of 363.1 F/g.

Fungus-based N self-doped biochar
By pyrolyzing Flammulina velutipes pickled with Mg(CH 3 COO) 2 , a self-doped biochar with an SSA of 1,174.2 m 2 / g and an N content of 3.97 at% was obtained, showing a specific capacitance of 470.5 F/g at 0.5 A/g (Xue et al., 2022). The FeCl 3activated mushroom-derived biochar exhibited larger SSA, higher N content, and better electrochemical performance than those activated by KOH (Hou et al., 2019). With the activation of KOH or ZnCl 2 , the Bacillus subtilis-derived carbon exhibited superior performance in capacitors (Zhu et al., 2013). Bamboo fungus  and fresh Agaricus (Wang and Liu, 2015) were also converted into N-doped carbon using a two-step procedure of carbonization and KOH activation, offering good specific capacitances. The natural spores of Lycoperdon boavista were directly pyrolyzed at 800°C, and the derived biochar showed a capacity of 260 F/g at 5 A/g . The details of the fungus-based N self-doped biochar application in a supercapacitor are presented in Table 7.

Other N self-doped biochars
Gelatin is an animal derivative composed of various proteins. It is produced by partial hydrolysis of collagen extracted from the skin, bones, and connective tissues of animals (Xu et al., 2014). By successive pyrolysis with citric acid and anhydrous iron (III) chloride, gelatin was converted into an N/O co-doped porous carbon with a specific capacitance of 312 F/g at 1 A/g . The mixture of gelatin and KNO 3 was also annealed for the synthesis of the N self-doped carbon used in supercapacitors (Deng et al., 2020).
Chitin, a polysaccharide substance extracted from the shell of marine crustaceans, also contributes to N self-doping. For example, chitin was carbonized with CuCl 2 .2H 2 O to prepare a natural structure-maintained O/N-enriched biochar . Reactions between the chitin and CuCl 2 .2H 2 O were confirmed according to the evident differences that appeared in thermogravimetry/differential thermogravimetry (TG)/(DTG) curves ranging from 450 to 750°C between the mixture of chitin and CuCl 2 .2H 2 O ( Figure 8A) and individual chitin ( Figure 8B). The obtained biochar exhibited an SSA range of 1,635-2,381 m 2 /g, a tunable micropore volume ratio of 63.5-96.8%, and high O/N contents (N: 3.1-9.0 wt% and O: 10.5-12.8 wt%), resulting in a high specific capacitance of 286 F/g at 0.5 A/g. Raj et al. also reported an O/N co-doped carbon from squid gladius chitin, achieving a maximum specific capacitance of 204 F/g (Raj et al., 2018).
N self-doped carbon material was synthesized directly from chitosan using a hydrothermal treatment, followed by KOH activation for supercapacitor application (Zhu et al., 2017). The synthesized carbon exhibited high SSA (2,200 m 2 /g), large pore volume (1.36 cm 3 /g), and high N content (6.3%), resulting in a specific capacitance of 305 F/g at 0.5 A/g in 6 M KOH electrolytes. Simultaneous carbonization and KOH activation of chitosan regenerated from prawn shells also resulted in an N self-doped biochar with a high specific capacitance of 357 F/g at 50 mA/g .
Activated carbon with high SSA (1841 m 2 /g) and N selfinherited (2.1 at%) were obtained from Artocarpus heterophyllus seed-derived starch with ZnCl 2 activation (Kasturi et al., 2019). N-doped carbon nanosheets were prepared via simultaneous activation and graphitization of biomass-derived natural silk (Hou et al., 2015). Due to the resulting product's high SSA (2,494 m 2 /g), high volume of hierarchical pores (2.28 cm 3 /g), and rich N-doping (4.7%), the as-obtained carbon exhibited a capacitance of 242 F/g. The results of the other N self-doped biochars in a supercapacitor are given in Table 8.

Evolution of N-functionalities during N self-doped biochar production
The N in the raw biomass mainly occurs in the form of protein-N/amino acid (N-A, 399.9 ± 0.2 eV), which occupies 60%-100% of the total N. During pyrolysis, N-A is quite easily converted to incondensable gas (NH 3 , HCN, HNCO, NO, and N 2 ), condensable organic components (amine-N, nitrile-N, and heterocyclic-N), and more stable N-functionalities in biochar (Zhu et al., 2016;Zhan et al., 2018;. Four types of N-functionalities involving pyrrolic N (N-5, 400.5 ± 0.3 eV), pyridinic N (N-6, 398.8 ± 0.2 eV), quaternary-N (N-Q, 401.4 ± 0.2 eV), and oxidized N (N-X, 402-405 eV) are found to exist in biochar by XPS, as shown in Figure 9  . For the carbons derived from most types of biomass, N-5 and N-6 are the dominant N-functionalities, contributing more than half of the total N content Yang et al., 2018;Lian et al., 2019;Wan et al., 2019;. Distinctively, N-Q was the most abundant N-functionality in cattle bone-derived biochar (Shao et al., 2017) and amino acid-derived biochar .
It was reported that the N content in the raw biomass and the pyrolysis temperature had a crucial effect on N distribution in biochar . The biochar produced from N-richer biomass also has a higher N content (Leng et al., 2020;Xu et al., 2021). Therefore, the N content of biochar can be expected to be regulated by the selection of raw material. However, biomass type Frontiers in Energy Research frontiersin.org shows a negligible influence on the distribution of N-functionalities in biochar (Zhan et al., 2018;. Pyrolysis temperature is most influential to N distribution in biochar. Generally, as temperature increased, the N content continuously decreased, accompanied by the variation of N-functionalities attributing to the decomposition of organic compounds such as proteins. More specifically, N-A was transformed into N-5 and N-6 easily via polymerization and rearrangement and completely vanished at lower temperatures (<500°C), which would then partially convert to more stable N-Q and N-X via polycondensation and oxygen reactions as temperature continuously increased (Zhan et al., 2018;. A decrease in N-5 and an increase in N-Q were observed for Spirulina platensis-derived N self-doped biochar as the carbonization temperature increased from 600°C to 800°C .  also reported decreases of N-5 and N-6 with activation temperature rising accompanied by the increase of N-Q and N-X. The intensity of N-5 and N-X in beehive-derived biochar was notably reduced as the carbonization temperature increased from 600°C to 1,000°C, whereas reserves of N-6 and N-Q were observed . Moreover, the N content in biochar was found to increase at temperatures lower than 300°C and then decrease at 400°C-800°C . The decrease of N-content at low temperatures was caused by the dehydration and decarbonization accompanied by the formation of more stable N-functionalities, such as N-5 and N-6, while the decrease is  attributed to the escape of N in the form of un-condensable gas. such as NH 3 , HCN, and condensable organic N compounds into the liquid. Nevertheless, the N-5 and N-6 types are reported to be independent of temperature because their percentage was still high, up to 2.1 at.%, even after high-temperature carbonization (Kasturi et al., 2019). Thus, the influence of temperature on N-functionality evolution is still under debate and needs to be further investigated.
The introduction of activating reagents would make the evolution pathways more complex. It can be deduced that the N distribution in N self-doped biochar is largely determined by the combined effects of biomass type, pyrolysis temperature, and activating reagent. Few studies have reported the influences of activating reagents on N distribution in the N self-doped biochar. Generally, the N content of biochar decreased after activation with chemical activators, such as KOH (Ma et al., 2017;Lin et al., 2018;Han et al., 2020;Sankaranarayanan et al., 2021), KHCO 3 , and Mg(CH 3 COO) 2 (Xue et al., 2022). However, N was found to be more effectively fixed into a carbon skeleton by NaOH (Sattayarut et al., 2019), a eutectic mixture of NaOH/KOH , Fe 2 O 3 , or ZnCl 2 (Sun, 2017;Han et al., 2018;Hu et al., 2022) activators. Considering the N-functionalities, the N-5 percentage significantly increased with the increasing KOH ratio (Sangprasert et al., 2022). After activation with NaOH, the proportion of N-5, N-6, and N-Q increased, while that of N-X decreased (Sattayarut et al., 2019). Two types of N-functionalities were found in water hyacinth-derived biochar involving N-6 and N-Q (Liang et al., 2018). The content of N-6 increased, while that of N-Q decreased with rising ZnCl 2 proportion. NaCl could promote the formation of N-Q and inhibit that of N-5 . Ding et al. found that the use of CO 2 , a typical physical activator, led to more N maintained in biochar, with a decrease of N-6, an increase of N-X, and little influence on N-Q content . However, CO 2 -activated carbons derived from hypha (Lian et al., 2019) and Ganoderma lucidum spores (Lian et al., 2019) showed lower N content than the pristine biochar. Compared with KHCO 3 activation, CO 2 -activated Myriophyllum aquaticum-derived biochar exhibited higher N content but fewer types of N-functionalities .
As an efficient pre-carbonization technique for N self-doped biochar production, hydrothermal treatment also affects the N distribution in the hydrochar. The N content in the hydrochar of Spirulina decreased from 17.12% to 0.20% as the temperature increased from 200°C to 260°C  in terms of four types of N-functionalities involving N-6, N-A, N-5, and N-Q. When the temperature was higher than 260°C, the hydrochar contained almost no N, which was attributed to the extensive cleavage of N-containing macromolecules at a higher temperature into small molecular compounds in the aqueous phase. Nevertheless, as the temperature increased from 180°C to 250°C, the N content in seaweed-based hydrochar slightly increased due to the Maillard and Mannich reactions (Soroush et al., 2022). Because the hydrochar often acts as a carbon precursor for subsequent pyrolysis or activation to produce biochar, the variation of N-functionalities in hydrochar will further lead to corresponding changes in N self-doped biochar. For example, evenly mixing with H 3 PO 4 , pretreatment of durian peel by heating in an oven, and hydrothermal pre-carbonization at 200°C were compared . Hydrothermal pre-carbonization significantly improved the pore structures of the derived biochar ( Figures 10A-C). With hydrothermal precarbonization, the N content in the biochar decreased, accompanied by N-Q vanishing ( Figure 10D). However, the hydrothermal process of carbonized soybean sample showed enhanced N content in the final biochar (Yu et al., 2021).
In addition to the aforementioned factors, pyrolysis pressure (Duan et al., 2017) and pyrolysis programs (Yang et al., 2023) also play effective roles in determining N distribution in biochar. However, to date, N self-doped biochar for supercapacitor application is mainly synthesized under atmospheric pressure with conventional procedures involving one-or two-step methods. Although the types of N-functionalities in N self-doped biochar have been extensively reported by the existing literature, the evolution of N-functionalities in biochar, especially the effects of various activating reagents, is still unclear. More efforts are needed to clarify the impact mechanism of these factors on N-functionality evolution to explore more efficient and novel strategies for N selfdoped biochar production.  .

Frontiers in Energy Research
frontiersin.org

Contribution of N-functionalities on supercapacitor performance
There is a consensus that all the N-functionalities contribute to the improvement of supercapacitor performance. Specifically, N-5 and N-6 produce defects in the alkaline electrolyte to provide more open channels and active sites for redox reactions, with electrolyte ions benefitting the pseudo-capacitance (Jiao et al., 2022). R10~R12 are the possible redox reactions of N-5 and N-6 in the KOH electrolyte . N-Q is the key factor facilitating the charge transfer across the electrode and electrolyte interface and improving the conductivity of carbonaceous materials . A higher N-X concentration indicates better wettability of the carbon materials (Sangprasert et al., 2022). Wang et al. suggested that N-Xs with high electron affinity and N-6s with less positive charge could generate redox pairs (R13) (Wang et al., 2012).
To quantify the contribution of N self-doping induced pseudocapacitance to the overall specific capacitance, the N self-doped biochar samples (PFC) from Perilla frutescens (PF) leaves were heattreated for a second time at 900°C to remove the surface functionalities . Around 38.8%-46.3% of the specific capacitance was confirmed to be contributed by pseudocapacitance, as shown in Figure 11. By dividing the corresponding charge by the potential window of CV curves, Xu et al. reported a considerable pseudo-capacitance contribution of 32-40% . A pseudo-capacitance contribution of 24.7%-41.7% was also estimated for the natural casing-derived carbons . For the penicillin fermentation residue-derived biochar, N-doping was responsible for 17.87-20.46% of the specific capacitance . Yao et al. found that the contribution of pseudocapacitance varied with electrolytes, the values of which were 41.5-83.3%, 12.2-32.6%, and 25.2-45.0% in H 2 SO 4 , KOH, and Na 2 SO 4 electrolytes, respectively . Deng et al. also reported different pseudo-capacitance contributions in KOH (~28%) and EMIBF 4 (16-47.3%) electrolytes (Deng et al., 2020).

FIGURE 9
Schematic illustration of N functionalities .

Frontiers in Energy Research frontiersin.org
However, note that biochar with higher N content is not equal to better electrochemical performance. For example, the Spirulina platensis biochar prepared at 600°C had a higher N content than that prepared at 700°C, whereas its electrochemical performance was weaker . Xu et al. also found that the casing-based biochar with the highest N content did not exhibit the best electrochemical performance . Yao et al. investigated the relationship between the specific capacitance (C p ) and N content of the biochar prepared from oil cake . As shown in Figure 12, the variations of the curves were extremely irregular, indicating a much more complex relationship between C p and N content. However, they reported that the pseudocapacitance contribution was much poorer than that from a sample with superior porosity due to high surface area and suitable pore size. Perez-Salcedo et al. found that the N influence is correlated with porosity (Perez-Salcedo et al., 2020). To date, the relationship between N content and the specific capacitance of N self-doped biochar is still unclear. Research on the interactions of the N functionalities with specific capacitance is unavailable.  .

FIGURE 12
Relationship between the specific capacitance and N content .

Frontiers in Energy Research frontiersin.org
It is widely accepted that the electrochemical performance of N selfdoped carbon material is mainly determined by the coupling effect of SSA, pore structure, N distribution, etc. Although many studies of N self-doped biochar production involving various N-rich biomass and fabrication strategies can be found, the relationship between N content and specific capacitance is still unclear. Due to this, enhancing the electrochemical performance of N self-doped biochar by regulating N content remains challenging. Meanwhile, although the N functionalities of N self-doped biochar have been analyzed in the literature, the connections between them and the specific capacitance are also undiscovered. In particular, the contribution of the N dopinginduced pseudo-capacitance to the overall capacitance is rarely reported. Thus, more effort is needed to reveal the impact of N selfdoping on the electrochemical performance to provide more information for the tunable fabrication of N self-doped biochar.

Conclusion and prospects
This review summarizes the development of N self-doped biochar applications as electrode materials for supercapacitors in the last 10 years. Compared with N-doping with external N precursors, the synthesis of N self-doped biochar from natural N-rich biomass is eco-friendly and cost-efficient. Numerous papers reporting on the preparation and characterization of N self-doped biochar are available, demonstrating the feasibility of N self-doping in improving the electrochemical performance. Some studies have also estimated the contribution of N self-dopinginduced pseudo-capacitance to the total specific capacitance. However, it remains challenging to achieve controllable N selfdoped biochar with the desired properties because the relationship between the specific capacitance and N self-doping is unclear. It is widely accepted that the electrochemical performance of N selfdoped biochar is mainly determined by the combined action of the pore structure, specific surface area, and N distribution, which are primarily influenced by the raw material and the preparation procedures. Therefore, efforts should be devoted to exploring the effect mechanisms of N self-doping on electrochemical performance in the future to provide more fundamental information for regulable N self-doped biochar production.

Author contributions
YH and LX contributed to the conception and design of the review. LX wrote the first draft of the manuscript. YH contributed to the manuscript revision and read and approved the submitted version.

Funding
This review was funded by the Natural Science Foundation of Jiangsu Province (BK20210511) and the National Natural Science Foundation of China Outstanding Youth Program (52125601).

Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Publisher's note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors, and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.