1 Introduction

The expanding electrification of transportation and other industrial sectors increases the demand of different chemistries and materials in energy storage devices. Carbon materials are key electrode constituents in electrochemical energy storage (EES) devices, such as supercapacitors and batteries. They are used both as active materials (activated carbons, graphite) and as additives (conductive carbon black). However, being mainly fossil-based or naturally mined, carbon materials currently used in EES devices are unsustainable. Alternative carbon materials from renewable resources are therefore urgently needed to unsure the sustainability of EES solutions.

The recent development of lignin isolation processes in the pulp and paper mills [1, 2], as well as the advancement in different types of biorefining processes is expected to result in a significant volume increase of technical lignins with different degrees of purity and structural properties [3]. Recent estimations suggested that the production of Kraft and biorefineries lignins will reach respectively ~14 MT/y and 200 MT/y in a near future, overshadowing the production of lignosulfonates (~1 MT/y), which are currently the only commercially available form of lignins [4]. The high foreseen lignin production volumes combined to its high carbonization yield, compared to wood or other biopolymers [5, 6], offer an unprecedent opportunity for the engineering of a wide range of lignin-based renewable carbon materials [7].

Lignin-based activated carbons (ACs) received accordingly a lot of attention to replace non-renewable carbons in supercapacitor electrodes [8,9,10,11,12,13,14,15,16]. A bibliometric analysis of the field shows that number of publications related to the use of lignin in supercapacitor application increased markedly in the last two decades (see Figure S1 and S2 in the ESI).

Zhang et al. recently reviewed the synthesis and use of lignin-derived porous carbons for supercapacitor applications [17] and showed that ACs having high specific surface area (SSA) and high specific capacitance (Cs) can be obtained from various types of lignins.

Chemical activation seems overall to produce higher surface area [18] and better performing ACs [17]. The fusing of lignin during the thermal treatment explains the low reactivity towards gases during physical activation and can explain the better performance obtained with chemical activation methods [19]. High surface area ACs with hierarchical porosity can be synthesized from lignins using chemical activation methods [20, 21]. Potassium-based chemicals were particularly effective for the synthesis of lignin-based ACs and received accordingly a lot of attention [22,23,24,25,26].

Although the potential of lignin conversion into ACs for electrochemical energy storage is well proven [17, 27, 28], the effect of technical and botanical heterogeneity of lignins on the properties and performance of the derived ACs is not well addressed in the published literature. The presence of carbohydrates or mineral impurities, as well as the structural differences due to different technical or botanical origins significantly alter the thermal behavior and reactivity of lignins and consequently the yield and porous texture of the activated carbon [29,30,31,32]. The available literature is also difficult to synthesize meaningfully due to the lack of characterization information on the starting lignin materials (see examples in Table S1).

Structural heterogeneity of lignins can be traced back to major differences between different lignin isolation and recovery processes. For instance, in alkaline sulfate pulping, i.e., the kraft process, the aim is to solubilize the lignin and leave the cellulose intact. The solubilized lignin in black liquor needs to be isolated prior to valorisation. In bioethanol production, the cellulose and part of hemicellulose fraction of biomass is converted to mono sugars through pretreatment and enzymatic hydrolysis, followed by fermentation to ethanol. The aromatic polymer lignin is the major component in the solid residue after the enzymatic hydrolysis step. Due to these fundamental process differences, kraft and hydrolysis lignins differ chemically and structurally. Typically, hydrolysis lignin residue has notably high content of residual cellulose compared to other types of technical lignin. Whereas kraft lignin has relatively high purity and lignin content, hydrolysis lignins have up to 10–40% content of carbohydrates, depending on the process chemistry and conversion efficiency [33]. Hydrolysis lignin is more native-like lignin than kraft lignin, whose structure is significantly altered during the pulping process [34]. In addition, the sulfur content in hydrolysis lignin is lower compared to that on kraft lignin, while the hydrolysis lignin contains some nitrogen due to the enzyme residues from the hydrolysis step [33].

In the present work, we address the effects of lignin heterogeneity on its thermal reactivity during chemical activation using two potassium salts and investigate its influence on the properties of derived ACs and their performance in supercapacitor applications. Softwood kraft and softwood hydrolysis lignins were selected for this purpose and were observed to yield ACs with different properties and electrochemical performance. The possible reasons are discussed with the aim to devise more systematic approaches for the engineering of lignin-based ACs.

2 Experimental

2.1 Materials

Softwood kraft (KL) and softwood hydrolysis (HL) lignins were used to prepare the ACs. The KL was obtained from Domtar mill (North Carolina, USA). The HL was obtained from St1 Cellunolix® plant (Kajaani, Finland). Activation chemicals, KOH and K2CO3, were purchased from Merck. The supercapacitor electrolyte components (Na2SO4, TEABF4, and anhydrous acetonitrile) were purchased from Merck. For the screening tests, 0.5 M Na2SO4 was prepared in in-house deionized water. The slurry was mixed in N-methyl-2-pyrrolidone (Merck) with Solef 5130 polyvinylidene fluoride (PVDF) (Solvay) and a cconductive carbon black powder Super C65 (Imerys). Kuraray YP-50F activated carbon was used as the commercial reference material for comparison.

2.2 Lignin characterization

The physical and chemical properties of the kraft and hydrolysis lignins were extensively characterized. Those include the proximate and ultimate analyses, the chemical composition, the morphology, and particle size distribution, as well as the thermal properties. Lignin structural characterization was performed using a combination of analytical techniques including 31P NMR for the hydroxyl and carboxyl content, size exclusion chromatography (SEC) for the molecular mass distribution and analytical Py-GC/MS for the structural fingerprinting. For both SEC and 31P NMR analysis, only the soluble fraction of the HL could be analyzed. The cross-linked structure of the HL and the presence of lignin–carbohydrate linkages prevents its full dissolution and characterization using those techniques. The detailed description of the analytical procedures and additional discussions about the results are given in the ESI.

2.3 Preparation of the lignin-based activated carbons

The lignin-derived ACs were prepared by chemical activation using KOH and K2CO3. A full factorial experimental design comprising four factors and two levels was used to conduct a total of 16 experiments and quantify the effects of the lignin precursor (L: HL or KL), the activator type (A: KOH or K2CO3), the impregnation ratio (IR: 1 : 0.5 or 1 : 1) and the heat treatment temperature (HTT: 800 or 900 °C) on the properties and performance of the lignin-derived ACs [35,36,37] (Figure S3). Statistical design of experiments (DOE) has several advantages compared to more widely used one variable at a time (OVAT) approaches for the engineering of ACs. It makes for instance possible to evaluate the effects and significance of experimental factors and interactions on the measured responses and to predict the response values in the entire design space using empirical mathematical models [35, 36]. Carbonization process diagram of the factorial experimental design can be found in the ESI section on (DOE). The experimental protocol is described in the following paragraphs.

The lignin was initially mixed with the chemical activator using a mortar grinder (Fritsch GmbH, Germany). A small amount of water (20 to 30 ml) was added to the mixture to obtain a slurry, which was mixed until it became homogeneous. The prepared slurries were dried in 105 °C overnight before the heat treatment. The dry mixtures were carbonized and activated at a heating rate of 5 °C/min up to the final HTT and held for 60 minutes before cooling to room temperature. After the carbonization, the produced materials were first washed with diluted HCl (5% v/v) followed by washing with ultrapure Milli-Q water until the washing water pH was nearly neutral or did not change anymore between several washing treatments. The washed ACs were finally dried at 105 °C before characterization or use in electrochemical cells.

2.4 Characterization of the lignin-based activated carbons

All carbon materials were analyzed for their morphology using scanning electron microscopy (SEM), texture using N2 adsorption manometry, nanostructure using Raman spectroscopy, and surface chemistry using temperature-programed decomposition coupled to mass-spectrometry (TPD-MS). Full details about the analytical protocols and data treatment are given in the ESI.

2.5 Specific capacitance tests in half cell

Commercial activated carbon, Kuraray YP-50F, was used as a reference material to compare the electrochemical performance of the lignin-derived ACs using three-electrode setup (half cell) and full cells. To prepare samples for the specific capacitance tests, the carbon materials were ground using pestle and mortar to form a fine powder which was dispersed in iso-propanol and water with 10 wt.% of Nafion® (Merck) as binder. Around 1–2 ml of this ink was deposited on a glassy carbon (GC) electrode (5 mm in diameter) to reach an active material loading of 1 mg cm−2. A simple 3-electrode setup was built using the GC as the working electrode, platinum wire as a counter electrode, and a commercial hydrogen electrode (Gaskatel) as the reference electrode in 0.5 M Na2SO4 aqueous electrolyte. The cell was bubbled with N2 throughout the whole experimental procedure. Autolab PGSTAT128N controlled by Nova2 software (Metrohm) was used for the characterization of this cell. A stable potential window of 0.0–1.3 V was used as the vertex points. The specific capacitance was determined using cyclic voltammetry (CV) after stabilizing with 50 scans at 20 mV s−1. The CVs were recorded at varying scan rates (5–200 mV s−1) but only the specific capacitance at a relatively high rate (100 mV s−1) was used for the data analysis. The average of the positive and negative sweep current in a voltage range of 0.2–1.1 V was calculated as the specific capacitance. The step time in the staircase CV profile was kept at 0.2 s for all the scan rates.

2.6 Chemometric analysis

We applied principal component analysis (PCA) on a data matrix composed of the 16 ACs in the row space, and the process variables, the AC properties, and the AC performances in the column space. PCA was used to better understand and discuss the correlations between the process parameters, the lignin–carbon properties, and their electrochemical performances [38]. The analysis and modelling were performed with Matlab (R2021b version, the Mathworks, Inc.) and PLS toolbox (Version 8.9 2022, Eigenvector https://eigenvector.com/).

3 Results and Discussion

3.1 Structural and chemical properties of softwood kraft and softwood hydrolysis lignins

The softwood KL and softwood HL were thoroughly characterized using complementary techniques (see the ESI section on lignin characterization). The two lignins have major morphological, compositional, and structural differences. HL has significantly more extractives and carbohydrates than KL (Table S2). Extractives and residual carbohydrates are left in the HL after softwood steam explosion, enzymatic hydrolysis, and fermentation steps. The higher fraction of carbohydrates in HL reduces its carbon content compared to the purer KL (Table S3). The nitrogen content is higher in HL compared to KL due the residual enzymes remaining in the HL structure. However, the sulfur content is much higher in KL due to its incorporation in the lignin structure during alkaline sulfate pulping.

The SEM images of HL and KL particles reveal different particle morphologies (Figure S4). Remaining fibrous domains from the parent wood structures are clearly visible in the HL particles, while no fibrous domains were visible for the KL. KL particles morphology shows an assembly of smaller lignin particles that would have aggregated together during the lignin acid precipitation process from the Kraft black liquor.

There are major difficulties in analyzing the structure of HL due to solubility problems. The presence of lignin–carbohydrate linkages [39] in HL might prevent the complete solubility of HL in common alkali or other organic solvents that are commonly used for solution state analyses of lignin. The molecular mass distribution could be obtained only for a small fraction of the HL that could be solubilized in NaOH. The soluble fraction from HL showed consequently a lower average molecular weight compared to KL (Figure S5 and Table S4). Those results are of course not representative of the whole HL structure. Due to the same solubility problems, OH group quantification using solution state 31P NMR could be only obtained for the KL (Table S5). KL has close to 7 mmol/g of OH groups, among which 2 mmol/g are aliphatic and 5 mmol/g are phenolic. The total OH group content of a KL is close to a milled softwood lignin (MWL) [40]. However, the OH group distribution is reversed—a MWL has more aliphatic OH groups than phenolic OH groups compared to a KL [40]. This major difference is attributed to the chemistry of the kraft pulping process, involving complex cleavage and condensation reactions promoted by the hydroxyl and hydrogen sulfide ions, which ultimately modify the amount and distribution of lignin OH groups [41, 42].

As the reactions that lignin undergoes during steam explosion are radically different from kraft pulping [43], we can safely assume that the distribution and amount of OH groups in HL differ from a KL. HL would likely have more ether linkages, less carbon–carbon linkages, and less free phenolic groups compared to a KL.

Finally, Py-GC-MS revealed that HL has a slightly higher fraction of p-hydroxyphenyl than KL and that both lignins have a negligible fraction of syringyl units (Table S6 and Table S7). Py-GC-MS also showed that KL contains a higher fraction of condensed β-5 units compared to HL (Figure S6). The degradation product yields (sum of lignin degradation products normalized to the sample mass) were higher for KL than for HL (Figure S7), which could indicate a different pyrolysis chemistry leading to the formation of more solid residue during HL flash pyrolysis.

Those fundamental lignin structural and compositional differences resulted into different thermal behaviors, notably the absence of a clear glass transition for HL compared to KL (Figure S8 and Table S8). Aspects related to thermal behavior and conversion will be more thoroughly discussed in Section 3.4.

3.2 Effects of the process parameters on the yield and electrochemical performance of the lignin-derived ACs

Gravimetric yield and specific capacitance are the two variables that defines the material performance and economic viability of the process. They should preferably be as high as possible. The yields and specific capacitances of the ACs are given in Table S9. The yields varied between 7 and 44 wt.%, and the specific capacitance values (at 0.1 V/s) varied between 29 and 113 F/g.

The specific capacitance values as a function of the scan rate are shown in Fig. 1. The CV profiles at varying scan rates are shown for the best performing AC activated carbon and the commercial reference material in the Supplementary Information (Figure S9). The commercial Kuraray YP-50F reached a specific capacitance of 101 F g−1 at 0.1 V s−1 in the 3-electrode test cell which is at the expected level. The results show that the best performing AC which come close to or perform better than the commercial Kuraray are derived from HL. The rate capability of Kuraray YP-50F is possibly better at very high rates (≥ 200 mV s−1) but at lower rates (5–100 mV s−1) the capacitance vs. rate trend is very similar. All the ACs derived from KL showed lower performances compared to the commercial Kuraray AC. There is a clear and major influence of the precursor lignin type on the performance of the lignin-based AC.

Fig. 1
figure 1

Specific capacitances of different activated carbons at different scan rates (5–200 mV s−1) in 3-electrode setup. ACs with K2CO3 as the activator on the left-hand and ACs with KOH as the activator on the right-hand side

The DOE modeling showed that the AC yield decreased when increasing the temperature or the IR (Figure S10). The latter factor had the biggest effect. Lower yields were observed for HL ACs, suggesting that the activation was more extensive with the carbonized HL—compared to the carbonized KL. The DOE model revealed interactions between temperature and IR, which further lower the AC yield.

Concerning the specific capacitance, DOE modeling showed that the lignin type is the most influencing factor. The largest model coefficient was obtained for HL which positively influence the specific capacitance value (Figure S10). The activation chemical was the second most influencing factor, with K2CO3 being a better activating agent compared to KOH. Nevertheless, a closer look into the interaction effects reveals that there are best combinations between the lignin type and the activator type. The best specific capacitances for KL-derived carbons were obtained with KOH, while for H-derived carbons, they were obtained with K2CO3. This can be explained by a difference in the reactivity of the carbonized lignins towards each of the alkali, which will be further discussed in the next sections. Although Xi et al. showed that potassium carbonate was the best activator for corn cob hydrolysis among different potassium-based alkali [23], our study suggest that the best activation strategy depends also on the pristine lignin structure.

Those results clearly show that the precursor lignin type determines to a great extent the performance of the AC. Further explanations are provided in the next sections in which the properties of the ACs and the thermal reactivity of the lignins are discussed.

3.3 Properties of the lignin-derived ACs and their influence on specific capacitance

3.3.1 Morphology and hierarchical porosity in the lignin ACs

The morphology and hierarchical porosity in HL and KL ACs (800 °C, K2CO3, IR = 1) were investigated using SEM (Fig. 2). The SEM images revealed macroscale morphological differences between the two ACs, which originate from the morphological differences between the lignin precursors. Most of the KL AC particles have an irregular shape with no visible dimensional heterogeneity, while some of the HL AC particles have an elongated shape, due to the presence of fibrous structures in the HL. Overall, both AC seem to have kept the main macromorphological features of the pristine lignins.

Fig. 2
figure 2

SEM images of K2CO3 lignin ACs (IR = 1, HTT = 800 °C). Top row: HL AC; bottom row: KL AC. Orange arrows point to macropores, and yellow arrows point to mesopores

The presence of macropores is visible on both type of ACs. Large macropores could be observed in the HL AC but were less frequent in the KL AC. Some of the large macropores in the HL AC originate most likely from the wood cell ultrastructure, which was still visible in some HL particles.

High-resolution images show the presence of large mesopores (20–50 nm) on the surface of both ACs. It also revealed the nanoscale organization of the AC walls, which is composed of aggregated nanospheres (~10 nm) forming 40–60-nm large domains separated by cracks which are a few nanometers wide. The micropores, which are not visible in the SEM images. are likely located within the nanospheres as well as in the interspace between adjacent nanospheres.

3.3.2 Microtexture of the lignin ACs—is the specific surface area a good predictor of the specific capacitance?

The ACs N2 adsorption isotherms are shown in Fig. 3. According to IUPAC classification, they are all mixtures of type II and type IV isotherms [44]. The proportion of micropores, mesopores, and macropores, as well as the total pore volume, are given in Table S9. The ACs are mostly microporous, but the amount of larger meso- or macropores varied with activation conditions. The best performing lignin AC (HL-K2CO3-0.5-800) and the Kuraray YP-50F were mainly microporous (Figure S11). The K2CO3 activation resulted in a highly microporous texture (80–95% of the total pore volume) in comparison with KOH activation (45–75% of the total pore volume). The DOE modeling results revealed a significant effect of the potassium activator type on the pore size distribution. K2CO3 favors the formation of a highly microporous texture compared to KOH (Figure S12).

Fig. 3
figure 3

N2 adsorption isotherms of K2CO3 lignin ACs. Color code: HL/blue and KL/red

Figure 4 shows the specific capacitance as a function of the BET SSA. We did not observe a linear relationship between both variables. Instead, we observed a clustering of the ACs according to precursor lignin type. ACs having SSA in the range of 1300–1400 m2/g showed an unexpectedly wide range of specific capacitances (~60–113 F/g). Although some ACs had SSA higher than 1500 m2/g, their specific capacitances were still close to 100 F/g. This observation is in accordance with the specific capacitance plateau close 4–5 μF/cm2 observed for microporous ACs having SSA larger than 1500 m2/g [45].

Fig. 4
figure 4

Left: specific capacitance VS BET SSA. Color code: HL/blue, KL/red. The star symbol refers to the commercial Kuraray YP-50F. Right: pore size distribution of selected HL ACs and Kuraray YP-50F

It might be also possible that a significant adsorption of a large amount of the binder can occur in mesopores and macropores, which can block the access of the electrolyte to the micropores and hence lead to lower specific capacitance. The two outlier ACs from HL which showed low specific capacitances were prepared with KOH (IR = 0.5) at 800 °C and 900 °C and had the lowest share of micropores compared to the other HL-derived ACs.

Although the BET SSA is the most often reported textural parameter when describing the internal porous area of an AC, it is important to remind that its underlying theory describes the multilayer physical adsorption of vapor in non-porous solids [46]. The BET model falls short in describing the texture of microporous AC because of its inability to distinguish between monolayer–multilayer adsorption and micropore filling in microporous carbons [47], which may lead to significant inaccuracies in the estimation of SSA.

In addition to the above-mentioned inaccuracies in the estimation of SSA, the lack of linear correlation between the specific capacitance and SSA can be explained by the capacitance increase in ultra-microporous carbons caused by ion desolvation and confinement in sub-nanopores [48,49,50]. This phenomenon, which appears to be universal for nanoporous carbons [51], overthrew the long-held view described by the Gouy–Chapman–Stern model on the linear dependence between the specific capacitance and SSA. The increase of specific capacitance in sub nanometer pores can be better described by endohedral capacitor models including surface curvature effects [52, 53]. The specific capacitance reaches a maximum in the presence of pores having the same dimension as the electrolytes [54]. It is hence not only the SSA that influences the specific capacitance but also the geometry and organization of the porous network through ion desolvation and confinement effects [55].

We calculated the pore size distributions (PSDs) of the different ACs using the 2D-NLDFT on carbon slit pore model, which considers the surface energetic heterogeneity and geometrical corrugation [56, 57]. PSDs of selected HL ACs and Kuraray YP-50F are illustrated in Fig. 4. The Kuraray YP-50F has a multimodal micropore size distribution showing two overlapping peaks in the ultramicropore range, at 0.62 nm and 0.8 nm, and two overlapping peaks in the supermicropores range, at 1.2 nm and 1.5 nm. The ACs from HL had exclusively ultramicropores, with a main peak centered at 0.62 nm for the best performing K2CO3 activated sample and 0.58 nm for the KOH activated samples. As the PSD of ACs from HL resembled each other regardless of the used alkali and were different from the commercial Kuraray, it remains difficult to explain the large differences in their specific capacitance based on their PSD.

Nevertheless, it is important to note that the presence of ultramicropores, which are not accessible to the N2 molecules due to activated diffusion phenomena [58], might cause significant increase in the specific capacitance values. As the size of the bare Na+ and SO42- ions are respectively close to ~0.227 nm and ~0.242 nm, ultramicropores should be accessible to those ions, but might not be visible using N2 adsorption manometry.

Overall, it seems hard to explain without ambiguity the observed differences in specific capacitances based on the analyzed AC textural properties using N2 as a probe molecule. In addition to the effects related to the porous network geometrical characteristics, the presence of nanostructural defects [59] and surface chemical functionalities [60] on the defective micrographene layers influence the specific capacitance values. Their effects are discussed in the next sections.

3.3.3 Nanostructure of the lignin ACs

When organic precursors such as lignins are carbonized at a certain HTT, their macromolecular structure reorganizes into a porous network of aromatic carbon layers (defective micrographene layers), representing structural position of minimum energy [61]. The defective micrographene layers form the wall of the AC and delimit the porous space representing the texture. The defective micrographene layers are in a quasi-equilibrium state and their structure can evolve by increasing the HTT.

Raman spectroscopy is one of the most appropriate tools to characterize the AC nanostructure [62, 63]. Care must however be taken to get meaningful spectra. To do so, we adjusted the laser power so that no local modification of nanostructure occurs during the analysis due to laser overheating effects (Figure S13).

The Raman scattering comes from the AC outermost surface corresponding to an interaction depth of 30–60 nm and from a lateral dimension close to the laser spot size (in the μm range). The Raman nanostructural information is local, averaged and mainly related to the sample outermost surface. We verified the volume representativeness of the Raman nanostructural information by performing the analysis in different locations of the same samples. For each of the AC samples, the Raman spectra collected from different locations were highly reproducible (Figure S14). The nanostructure of the lignin ACs can be then assumed to be homogenous in the particle volume, and the activation can be consequently assumed to have occurred homogenously in the carbonized lignin particles.

Examples of first-order region Raman spectra of lignin-based and commercial ACs is shown in Fig. 5. Two main overlapping bands can be distinguished, the D and G bands, which maxima can be located, respectively, at ~1345–1360 cm-1 and ~ 1585–1595 cm-1. The G mode involves the in-plane bond-stretching motion of pairs of sp2 carbon atoms, which may arise in both aliphatic and aromatic hydrocarbons. On the other hand, the D band is strictly connected to the presence of sixfold aromatic rings. Its intensity is proportional to the probability of finding them in the pore wall nanostructure of ACs [64].

Fig. 5
figure 5

Left: example of Raman spectra of HL, KL and commercial Kuraray YP50F ACs. Right: D band FWHM as a function of the G band intensity

The Raman spectra of the commercial and lignin ACs were decomposed into two bands (Figure S15). Details about the decomposition procedure are given in the ESI. The band parameters (position, half-width at half-maximum, intensity, and area) varied as a function of lignin type and experimental activation conditions (Figure S16). A clear difference between the first-order region Raman spectra of lignin-based ACs and the commercial Kuraray YP50F AC can be noticed. The D and G bands are broader and more overlapped in the lignin ACs, resulting in a higher valley intensity compared to the commercial Kuraray YP50F AC. The intensity of the D band for the lignin-based and commercial Kuraray ACs also shows differences. Variation in Raman spectra as a function of the precursor material and activation conditions have been reported for a wide variety of fossil-based precursors [65] and most likely the same observations apply for biobased precursors such as lignins.

The ratio of the D to G band intensities were similar for all the ACs, which suggests that the defective micrographene layers have essentially the same lateral size (Figure S17). It should be reminded here that the intensity of the D band and its FWHM are highly influenced by the texture of the AC and the orientation of its wall layers, which can make the calculations of nanostructural dimensions uncertain.

Overall, the D band position was lower for the KL ACs compared to the HL ACs, except for the two HL samples which were activated with KOH at 900 °C and contained a significant fraction of mesopores. According to the DOE model results (Figure S18), the lignin type was the only factor influencing the D band position. The reverse trend is observed for the G band position. Higher G band position were obtained for KL ACs. In addition, the DOE model showed that the G band position was influenced by the type of activator and temperature and revealed more complex interactions between the temperature and the lignin type, which are likely due to the different reactivities of the carbonized lignin during the activation.

The D and G band FWHM were larger for the HL ACs compared to the KL ACs but decreased with temperature for both lignin types, because of nanostructural ordering upon heat treatment at higher temperature. The G band intensity was lower for HL ACs compared to KL ACs but increased with temperature regardless of the lignin and alkali types. The DOE results shown in the ESI summarize well the effects of the experimental factors on the nanostructural Raman parameters. The differences in the Raman spectra of HL and KL ACs indicate nanostructural differences in the defective micrographene layers forming their derived AC pore walls [66, 67].

When plotting the D band FWHM as a function of the G band intensity (see Fig. 5), we observed that the ACs clustered according to the lignin type. The two outliers ACs from HL which had a low Cs were close to the KL ACs. These nanostructural clusters are similar to the clusters observed in the specific capacitance Vs SSA plot.

Differences in the AC nanostructure most likely reflect different nanoscale porosities, since the size, connections, defects, orientation, and corrugation of the defective micrographene layers forming the AC pore walls influence the geometrical characteristics of the nanoscale porous network space and hence the specific capacitance of the ACs. Although direct connections between the highly convoluted nanostructure and microtexture in isotropic carbons are identified, they are not yet fully understood [68]. Altogether, the variations in the Raman band parameters reflect nanostructural and microtextural differences between the KL and HL ACs, and the Kuraray YP50F commercial AC. The effects of nanostructural defects specific to each type of lignin AC can partly explain the observed differences in their specific capacitance as suggested recently by [59].

3.3.4 Surface chemistry of the lignin ACs

The defective micrographene layers forming the pore walls of the ACs have heteroatoms bonded to the carbon atoms in their prismatic edges as well as in their basal plane. Those heteroatoms form the surface chemistry. In case of lignin precursors and alkali-based chemical activation, the surface chemistry is mainly composed of oxygen functional groups (O-FG). The O-FG were analyzed by TPD-MS [69]. The details about the experimental protocol and examples of mass balances are given in the ESI (Figure S19 to Figure S22). During TPD-MS experiments, the mass loss of the lignin-based ACs varied between 5.9 and 13.9 wt.% and was associated with the emission of H2O, CO, and CO2, resulting from the decomposition of surface O-FG. The mass balance varied between 95.3 and 102.1 wt.%, with an average and a standard deviation of 99.1 ± 1.6 wt.% for 20 experiments.

Regarding the speciation of the O-FG, the following general trends are reported in the literature [70,71,72,73]: carboxylic acids and lactones decompose into CO2, respectively, at low and high temperatures. Acid anhydrides decompose into CO and CO2. Phenols, ethers, carbonyls, and quinones decompose into CO, with carbonyls being the most thermally stable FG. It is difficult to determine the speciation of the O-FG without ambiguity since it depends heavily on the experimental conditions during the TPD experiment [74] such as the heating rate, the device geometry, the pressure, and gas flow rate, as well as on the texture of the AC. Barco et al. [75] even showed that the chemical and geometric local environment at the molecular scale influences the decomposition temperature of O-FG. For clear discussion and less ambiguous interpretations, we will categorize the O-FG as CO and CO2 emitting groups, which already helps in understanding the surface chemistry of lignin ACs.

The amount of the total surface oxygen atoms in the lignin-based ACs varied between 2.9 and 10.0 mmol/g. The results are given in Fig. 6. The amount of oxygen from CO emitting functional groups varied between 0.6 and 2.6 mmol/g, while the amount of oxygen from CO2 emitting functional groups varied between 0.9 and 4.3 mmol/g. The DOE modeling results show that the concentration of O-FG on the surface of ACs from HL were higher than in ACs from KL in similar conditions, which can partly explain their better EC performance. The DOE modeling showed that the concentration of O-FG decreased with the activation temperature, most likely due to more pronounced thermal decomposition, but increased with IR due to a more extensive activation (Figure S23).

Fig. 6
figure 6

Total surface oxygen in ACs measured by TPD-MS. Bar edge color code: HL/blue, KL/red, and Kuraray: black. Bar face color code: from dark to light gray are the respective contribution from emitted H2O, CO, and CO2 to the total oxygen content. The two outlier AC samples from HL (N3 and N4) had the lowest total surface oxygen content

It is worth mentioning that the two ACs from HL which showed the lowest specific capacitances (HL-KOHR05-800 and HL-KOHR05-900) had also the lowest concentrations of surface O-FG compared to the others HL-ACs (sample N3 and N4 in Fig. 6). The presence of O-FG on carbon surfaces is known to be important regarding pseudocapacitive effects [76,77,78] and surface wettability [79,80,81].

The Kuraray YP50F had a total of 2.18 mmol/g of surface oxygen, among which 0.82 mmol/g of oxygen from CO emitting functional and 0.68 mmol/g of oxygen from CO2 emitting functional groups. The relatively low amount of O-FG in the Kuraray YP50F compared to HL-K2CO3R05-800 lignin-based AC (9.15 mmol/g of surface oxygen) suggest that its high specific capacitance stems mainly from its different porous texture and is much less influenced by its surface chemistry.

Most of the oxygen atoms are present in CO2 emitting O-FG, e.g., carboxylic acids, lactones, and anhydrides. The rest of oxygen belongs to CO emitting groups, and to a lower extent, to water adsorbed in the microporosity. It is interesting to note that although the Kuraray had lower absolute amount of oxygen on its surface, the relative distribution of CO and CO2 emitting functional groups is similar to the best performing HL-K2CO3R05-800 sample. We confirmed the TPD-MS results with complementary XPS analysis on selected carbon samples (results not shown here).

3.4 Multivariate data analysis

Principal component analysis was performed on the data matrix composed of 16 rows and 24 columns, where each row represents an AC sample, and each column corresponds to an experimental factors or measured response. The measured responses, include the gravimetric yield, the specific capacitance, and the AC properties. PCA is used here as a tool for pattern recognition and dimensionality reduction. The matrix was auto scaled prior to PCA to give a similar weight to the different variables. The venetian blind method was used to calculate the root mean square error of cross validation (RMSECV)

Based on the RMSECV, a PCA model comprising four principal components (PCs) was used for the modeling (Figure S24 and Figure S25). The four first principal components account for more than 80% of the variability in the data, and subsequent PCs do not improve the model quality based on the RMSECV values. The first two PCs account for more than 50% of the variability. The first PC mainly separates the ACs as a function of the precursor lignin. The type of activation chemical contributes to this first PC, but in a lower extent. The PC2 loading plot (see ESI section on PCA) reveals the correlations between the gravimetric yield, specific capacitance, SSA, and micropore volumes. The third PC is mainly related to the effect of the chemical activator. The loading plot reveals a strong correlation between the use of KOH and the macropore volume.

A biplot of the two first PC scores and loadings shown in Fig. 7 displays the clustering of ACs according to the lignin type and discloses important information about the underlying causes in a condensed graphical way. The samples having a high score on PC1 have a specific capacitance higher than the average value are obtained from HL with K2CO3 activation and have a higher micropore volume and CO2 emitting functional groups than the average values. Those samples have also higher Raman G and D band widths and areas and lower G band positions compared to the average values. Comparatively, the ACs having a specific capacitance lower than the average value are obtained from KL and/or activated with KOH. The samples having low PC2 scores have higher yields and CO emitting functional groups and lower SSA and total pore volumes compared to the average values. The biplot also shows that higher temperatures and impregnation ratios are correlated to higher SSA and pore volumes and inversely correlated to yields and CO emitting functional groups. Hotelling T2 Vs Q residuals plot (Figure S26) shows that all samples are well captured by the PCA model and that none of them has a high leverage.

Fig. 7
figure 7

Biplot of scores and loadings for the two first PCs

Altogether, PCA is a powerful tool to disclose information on the precursor–process–properties–performance relationships and could therefore guide the complex task of lignin-based carbon material engineering.

3.5 On the importance of lignin structure–thermal properties relationship in the engineering of lignin ACs

So far, we have seen that in the same thermal treatment and activation conditions, HL and KL result in ACs with different properties and electrochemical performance. The origin of this difference likely resides in the structural and chemical differences between the two lignins, which in their turn result into different thermal properties and reactivities during the carbonization and activation processes. To better understand this issue, we conducted different thermal analysis experiments which revealed a clear dependence between the thermal and structural properties of the starting lignins.

First, we observed that KL underwent a glass transition in the range of 141–151 °C as indicated by the endothermic shift in the DSC curve, but no glass transition could be identified for the HL (Fig. 8). Compared to HL, the KL chains have a greater thermal mobility and undergo a pronounced softening during carbonization before the structure hardens through cross-linking reactions [82]. We could observe the effect of softening, foaming and coalescence of the KL particles during carbonization through visual inspection of the STA crucibles after carbonization up to 1100 °C, at heating rates in the range of 2.5–20 °C/min (see Fig. 8). The carbonization of KL resulted in a shapeless and monolithic block of fused carbonized lignin particles. The foaming and coalescence were more pronounced at higher heating rates, indicating a complex process involving competing physical phenomena and chemical reactions, which relative rates govern the morphological evolution of the carbonized KL.

Fig. 8
figure 8

The upper panel shows DSC traces for HL and KL and stereo micrographs of HL and KL carbonized at different HR (2.5–20 °C/min) up to 1100 °C (note: the foamed and coalesced morphology of the carbonized KL). The bottom left panel shows Arrhenius plots and activation energies as a function of the conversion degree during carbonization of HL and KL (HR = 2.5–20 K/min, argon flowrate = 70 ml/min, sample mass ≈ 10 mg). The bottom right panel shows mass and DTG as a function of temperature during TGA of HL and KL mixed with K2CO3 (IR = 1) (HR = 10 K/min, Ar flowrate = 70 ml/min, sample mass≈10 mg)

In contrast with the KL, the structure of HL containing a higher proportion of high molecular weight chains, cross-links, and lignin–carbohydrate linkages might explain the lower thermal mobility of HL chains and the absence of a clear glass transition [31]. The structural difference between HL and KL, the presence of residual carbohydrates. and the persistence of fibrous structures in HL were revealed, respectively, by Py-GC-MS, chemical composition analysis, and scanning electron microscopy and discussed in the ESI section on lignin characterization.

Based on the thermogravimetric data obtained during the lignin carbonization at different heating rates (Figure S27 and Table S10), we analyzed the reactivity of HL and KL following an isoconversional kinetic modeling approach using the activation energy (Ea) as a reactivity criterion [83]. The calculation of Ea as a function of the conversion degree during carbonization was done according to Friedman’s isoconversional kinetic modeling method and following the ICTAC kinetics committee recommendations for performing kinetic computations on thermal analysis data [84]. The details are given in the ESI.

The calculations results are shown in Fig. 8. For both lignins, the calculated Ea changed markedly as a function of the carbonization conversion level, reflecting the complexity of the carbonization process with its multiple parallel and consecutive reactions occurring in the different temperature ranges [85]. The evolution of Ea as a function of the conversion degree is different for HL and KL. The sharp increase of Ea values for KL in the conversion degree range between 0.6 and 0.85, from 200 to 400 kJ/mol compared to HL, indicate the formation of a different and hypothetically more condensed and less reactive carbonized structure at higher temperature. As the activation energy represents the energy barrier to a thermal process under study, it reflects the reactivity of the lignin structure and its carbonized intermediate forms along the carbonization process.

In addition to the reactivity evaluation during carbonization, we compared the carbonization and activation dynamics of the two lignins mixed with K2CO3 (IR = 1). The results shown in Fig. 8 reveal a significantly lower reactivity of KL during the carbonization stage compared to the additivity case (weighted sum of KL and K2CO3 thermograms), as shown by its lower DTG peak. This observation can be explained by the catalytic charring action of K2CO3 [86], leading to a higher carbonised residue yield. The catalytic charring action of K2CO3 is more pronounced for KL compared to HL, which DTG peak changed little compared to additivity case. Most remarkably, the carbonized KL reacted with K2CO3 at significantly higher temperature than the HL, although much abruptly as evidenced by the sharp DTG peak in the activation region.

The more condensed structure of KL resulting from the kraft pulping [87] might explain the higher charring effects during the catalytic carbonization and the lower reactivity during the activation stage. A more condensed carbonized structure could have been formed from KL compared to HL during carbonization.

The presence of sulfur in KL (2.2 wt.%) might also result in a less reactive structure during activation with the potassium salts. The formation of C(O) surface complexes, which would decompose forming CO and extending the porosity, might be hindered by the presence of sulfur on the KL carbon surface.

Altogether, the different structural properties and reactivities of the two lignins can explain to great extent the differences in the properties and performance of their derived ACs. Indeed, the higher reactivity of the HL in mixture with K2CO3 suggest a better development of the porosity and surface oxygenation after the activation and hence the better electrochemical performance in supercapacitor application.

4 Conclusion

Lignins come with a wide spectrum of chemical and structural properties depending on their botanical and technical origins. Although it is agreed that lignin represents a promising precursor for renewable ACs, we have shown that a particular attention should be paid to the structural and chemical properties of the lignin feedstock during the engineering of lignin-based AC.

Using two representative kraft and hydrolysis lignins, we showed that structurally different lignins result into ACs having different multiscale properties and electrochemical performance in supercapacitor application. The two lignins had very different thermal properties and reactivities during the carbonization and activation stages, which explains to a great extent the observed differences in the properties and performance of their derived ACs.

We also observed that ACs from HL outperformed those from KL and had electrochemical performance close to the commercial YP-50F Kuraray AC. This implies that less pure, carbohydrate-containing lignins are no less advantaged compared to purer KL to produce high-performance ACs for supercapacitor application.

No simple relationships between AC surface area and specific capacitance could be identified. Rather, the electrochemical performance of lignin-derived ACs seem to derive from a combination of their multiscale properties, including their pore size distribution, their nanostructure, and their surface chemistry.

A systematic engineering of lignin-based CM for energy storage applications should be built on these important conclusions.