1 Introduction

Alkali-ion hybrid capacitors incorporate the higher power density of supercapacitors with the higher energy density of storage batteries, making them a promising device for energy storage [1,2,3,4]. Currently, lithium-ion hybrid capacitors (LIHCs) are well studied with the practical use of some prototype devices. However, lithium-based electrochemical storage devices are facing the problems of high cost owing to the scarcity together with patchy distribution of lithium resources [5,6,7,8]. Thanks to the rich reserves of sodium and potassium in nature, Na+ or K+ hybrid capacitors (SIHCs or PIHCs) are considered to promising alternatives [9,10,11]. Although the low cost of sodium, the higher standard redox potential of Na+/Na (‒2.71 V) than Li+/Li (‒3.04 V) limits the further application of SIHCs. In contrast, the redox potential of K+/K (‒2.93 V) is comparable to the redox potential for lithium, making the potential high energy density of PIHCs. Moreover, compare with Na+, the K+ has a smaller radius in the solvent with low de-solvation energy, giving better diffusion kinetics [12].

To date, many anode materials for PIHCs including metal compounds, alloys, MXenes and carbon-based materials have been studied [13,14,15,16]. Carbon materials are one of the most attractive of PIHCs anodes due to their structural adjustable, environment-friendly, stable physical/chemical properties, and excellent electrical conductivity. Nevertheless, the unfavorable interlayer spacing always leads to poor reversible capacity and inadequate rate capability of electrochemical devices. The optimization of carbon-based anode materials can be affected by adapting structure and increasing the quantity of active sites. For instance, Ju et al. synthesized the hierarchical porous carbon (HPC) from zinc chloride as a template, confirming that higher specific surface area as well as plenty of pores are beneficial to the rapid transmission of electrons and ions, and the increased lattice spacing can promote the intercalation of K+ into the carbon material, thereby obtaining a good potassium storage performance [17]. Liu et al. synthesized nitrogen-doped porous carbon sub-microspheres, which improve the electronic conductivity of the material by nitrogen doping, but also offered more active sites to provide the specific capacity of the carbon-based material. Moreover, the doping of pyridine nitrogen can promote pseudocapacitive redox reactions for potassium ions storage [18].

Besides anode materials, the cathode materials with good electrochemical performances such as high capacities and cycling stability are also needed. So far, a wide variety of cathode materials including Prussian blue, transition metal oxides, and carbon-based materials are used for PIHCs [19,20,21]. Carbon materials show good stability and high conductivity. Among them, carbon-based materials are the kind of material which is commonly used for PIHCs cathodes. Nevertheless, the low capacity of carbon-based materials limits the overall electrochemical performance of PIHCs [22]. The well-matched dual-carbon electrodes offer the combination of low budget, environmentally friendliness, and high security. Note that the selection of cathode and anode materials for PIHCs and their matching to each other present a major challenge.

In this work, hierarchically porous nitrogen-doped carbon (N-HPC) was successfully prepared via a facile chemical-blow method with polyvinyl pyrrolidone (PVP, K30) as both carbon/nitrogen precursor and Zn(NO3)2·6H2O as the pore-forming agent. The obtained N-HPC with three-dimensional (3D) hierarchical porous structure and large interlayer spacing provides sufficient surface and inner space to allow the fast intercalation/de-intercalation of K+. Furthermore, the N-HPC can also be used as outstanding cathode materials for anion storage via a simple activation step. Due to the well structural and electrochemical match of double carbon electrodes, the as-assembled PIHCs provide an attractive energy density of 103.5 Wh kg‒1 at 1000.0 W kg‒1 and exhibit outstanding cyclic stability as 70.2% capacity retention can be kept after 10 000 cycles at 1.0 A g‒1.

2 Experimental

2.1 Chemicals

The chemical reagents including KOH, N-methyl-2-pyrrolidinone (NMP), Zn(NO3)2·6H2O, and PVP are of analytic grade and directly used as received from Sinopharm Chemical Reagent Co. Ltd. The chemical reagents without further treatment.

2.2 Materials synthesis

Synthesis of N-HPC: Briefly, 1.0 g of PVP and different content of Zn(NO3)2·6H2O (0.5, 1.5 and 2.5 g) were solubilized into adequate amount of distilled water together with stirred for thirty minutes. Then, the resultant solution was placed into an oven and completely dried at 90 ºC. Finally, the completely dried powder was annealed at 800 ºC for 60 min. The atmosphere used for material annealing is N2, with a temperature rise rate of 5 ºC min‒1. Based on the weight ratio of PVP and Zn(NO3)2·6H2O, the samples were denominated as N-HPC-0.5, N-HPC-1.5, and N-HPC-2.5, respectively.

Synthesis of N-HPC-A: Briefly, 0.3 g of N-HPC-1.5 and 0.9 g of KOH were solubilized into adequate amount of distilled water together with stirred for thirty minutes. The resultant solution was completely dried at 90 ºC. Then the dried mixture was activated at 800 ºC for 3 h. The gas is N2 with a temperature rise rate of 5 ºC min‒1. The excess KOH in the product was neutralized by aqueous HCl solution (1.5 mol L‒1). The production was washed by large quantities of distilled water as well as dried in an oven at 60 ºC for 15 h, and the sample was denominated as N-HPC-A.

2.3 Materials characterizations

Characterization was carried out using X-ray diffraction (XRD, Rigaku Ultima IV powder X-ray diffractometer with Cu Ka radiation). The micro-structures were characterized using field-emission scanning electron microscopy (FESEM, JEOL-6300F), transmission electron microscopy (TEM), and high-resolution TEM (HRTEM, JEM-2100). Nitrogen adsorption isotherms were obtained by using a Micromeritics ASAP 2020 apparatus. Raman spectra were collected using 532 nm excitation on a LAB RAM HR spectrometer.

2.4 Electrochemical measurements

Polyvinylidene fluoride (PVDF), acetylene black and N-HPC were combined in N-methyl-2-pyrrolidinone (NMP) in a mass ratio of 1:2:7. The obtained paste was applied to copper foil as well as placed in an oven at 60 ºC to dry overnight. The anode electrodes were cut to a diameter of 12 mm, and a mass loading of 0.88 mg cm‒2. The reference electrode uses K foil. The assembled with 0.8 mol L‒1 KPF6 dissolved in the ethylene carbonate/dimethyl carbonate mixture (by 1: 1 in volume ratio) as electrolyte, glass fiber (Whatman GF/D) as diaphragm. To prepare the N-HPC-A cathode, PVDF, acetylene black and N-HPC-A were mixed well in NMP in a mass ratio of 1: 2: 7. The obtained paste was applied to aluminum foil as well as placed in a vacuum oven at 110 ºC to dry overnight. To enhance the stability, the N-HPC-1.5 electrodes were pre-potassiation before assembly. Specifically, the N-HPC-1.5 electrodes were directly contact with the potassium metal in the electrolyte. For charge balance, the cathode and anode was designed to be 2: 1 (the weight ratio) in the assembled N-HPC-1.5//N-HPC-A PIHCs. The total weight of the anode and cathode was approximately 3.0 mg.

All electrochemical properties were evaluated by a button battery (CR2032) assembled in an Ar-filled glove box (H2O and O2 contents both < 0.1 ppm). Charge/discharge measurements were carried out a Land CT2001A battery tester. Cyclic voltammetry (CV) curves were tested via an electrochemical workstation (Ivium). The power density (P, W kg‒1) as well as energy density (E, Wh kg‒1) of the PIHCs were evaluated using the follow equations [23].

$$P=\Delta V\times I/m$$
(1)
$$E=P\times t/3600$$
(2)
$$\Delta V=\left({ V}_{max}+{V}_{min}\right)/2$$
(3)

where Vmin, m, Vmax, t, and I were the minimum voltage (V), the total weight of the cathode as well as anode (g), the maximum voltage (V), discharge time (s), and the discharge current (A), respectively.

3 Results and discussions

3.1 Synthesis and structural analysis

The process for the preparation of porous carbon anode and cathode materials is schematically shown in Scheme 1. Firstly, PVP and Zn(NO3)2·6H2O were dissolved in distilled water in the weight ratio of 1: 0.5, 1: 1.5 and 1: 2.5, respectively. Then, the resultant solution was completely dried at 90 ºC. The collected yellow powder was annealed to obtain anode material (N-HPC). Furthermore, the N-HPC-1.5 was chosen and activated by KOH to produce the cathode material, i.e., N-HPC-A.

Scheme 1
scheme 1

Synthetic schematic for the N-HPC and N-HPC-A

The microstructures of the N-HPC-1.5 are described by FESEM images. As shown in Fig. 1a, b. the N-HPC-1.5 displays a 3D beehive architecture packed with connected bubbles that are supported by graphitic pillars. In contrast, the N-HPC-0.5 sample reveals graphitic flake architecture, which is caused by the addition of insufficient Zn(NO3)2·6H2O (Fig. S1a, b). Moreover, the resulted porous carbon framework of N-HPC-2.5 is broken due to the addition of excess Zn(NO3)2·6H2O (Fig. S2a). As clearly observed in elemental mapping images, the C, O, and N elements are evenly distributed over N-HPC-1.5 (Fig. 1c). As seen in Fig. 1d, e, the TEM images further demonstrate the porous architecture that matches with the SEM image of N-HPC-1.5 (Fig. 1a, b), which is quietly different from the N-HPC-0.5 with lumpish structure (Fig. S1c) and N-HPC-2.5 with residual ZnO particles (Fig. S2b, d). Notably, the further HRTEM characterization further demonstrate that the N-HPC-1.5 has an carbon inter-layer spacing of 0.405 nm (Fig. 1f), much larger than those of N-HPC-0.5 (~ 0.379, Fig. S1d) and N-HPC-2.5 (~ 0.383, Fig. S2c), which is beneficial for the reversible intercalation/deintercalation process of potassium ion [24]. As seen in Fig. S3a-d, multiple lattices of N-HPC-1.5 are measured and counted. The lattice spacing of N-HPC-1.5 is the most distributed at 0.41 nm, and the average value is also 0.41 nm, which is also consistent with the HRTEM of N-HPC-1.5 (Fig. 1f).

Fig. 1
figure 1

a, b FESEM, and c corresponding elemental mapping images, d, e TEM and f HRTEM images of N-HPC-1.5

Figure 2a shows typical XRD patterns of the N-HPC. For N-HPC-0.5 and N-HPC-1.5, the broaden reflection peaks centered at ~ 23.0 and ~ 44.0 º are associated with the (002) and (100) planes of graphitic carbon [25]. Particularly, there is a left shift of N-HPC-1.5 (~ 23.2 º) compared with N-HPC-0.5 (~ 23.6 º), indicating the (002) interplanar space increasing up to ~ 0.405 from ~ 0.379 nm, which coincide with the HRTEM results. However, the introduced zinc source in N-HPC-2.5 cannot be completely removal during high-temperature annealing, resulting in the observation of sharp ZnO peaks [26], which also corresponds to the HRTEM images (Fig. S2d). Raman spectroscopy was conducted to evaluate of N-HPC. The G and D bands of the carbon are identified at 1600 cm‒1 and 1330 cm‒1, indicating the graphitic structure, and the existence of defects/disorders, respectively (Fig. 2b). The intensity ratios of the D and G bands (i.e., ID/IG) can be utilized to estimate the graphitization degree, which are 0.97, 0.94, and 1.04 for N-HPC-0.5 (Fig. S4a), N-HPC-1.5 (Fig. S4b), and N-HPC-2.5 (Fig. S4c), respectively. The N-HPC-1.5 has a minimum ID/IG value, suggesting better graphitization and the more ordered arrangement of carbon atoms [27].

Fig. 2
figure 2

a XRD patterns, b raman spectra, c N2 adsorption-desorption isothermal curves, d pore size distribution plots, and e XPS survey spectra of N-HPC-0.5, N-HPC-1.5 and N-HPC-2.5, N 1s spectra of f N-HPC-1.5, g N-HPC-0.5, and h N-HPC-2.5, i N/C ratios of various N in the samples as indicated

Figure 2c, d reveal the N2 adsorption-desorption isothermal curves of the N-HPC. All adsorption-desorption profiles of the N-HPC present typical characteristics of type IV isotherms with hysteresis loops, indicating the existence of mesopores and micropores [28]. The Brunner-Emmett-Teller (BET) surface areas for N-HPC-0.5, N-HPC-1.5 and N-HPC-2.5 are 117.3, 210.1 and 371.3 m2 g‒1, respectively. The pore size distribution peaks of N-HPC-1.5 are located at 1.5, 3.5, and 7.5 nm, respectively, proving the co-existence of some micropores and a high proportion of mesopores (Fig. 2d). The micropores and mesopores not only promote the rapid diffusion of K+ and the transfer of electrolytes, but improve the utilization efficiency of active substances. The macropores that are easy to observe in SEM, as electrolyte buffer reservoirs, mainly meet the needs of electrolyte ions.

The elemental valences and chemical compositions on the surfaces of N-HPC are investigated by X-ray photoelectron spectroscopy (XPS) in detail. The total XPS spectrum of N-HPC is seen in Fig. 2e. There are three elements including C, N, and O for the sample of N-HPC-1.5 and N-HPC-0.5 with N/C ratios of 8.4 and 6.9 atm%, respectively. In contrast, there is additional Zn element for N-HPC-2.5, which further confirms the residual of ZnO. Moreover, its N/C ratio is calculated to be 7.7 at.%. Fig. S5a further shows the C 1s spectrum of the N-HPC-1.5, which can be resolved into three peaks at 284.6, 285.3, and 286.8 eV, corresponding to C-C, C-O/C-N, and C=O [29], respectively. There is a peak for Zn 2p in the total XPS spectrum of N-HPC-2.5 and the results of the Zn 2p splitting are shown in Fig. S5b, which also coincides with the HRTEM (Fig. S2d) and XRD (Fig. 2a) data. The N 1s spectra of the N-HPC-0.5, N-HPC-1.5 and N-HPC-2.5 (Fig. 2f-h) can be divided into three peaks including the pyrrolic nitrogen (N-5, 400.4, 399.8, and 399.2 eV), pyridinic nitrogen (N-6, 398.5, 398.4, and 398.3 eV) and graphitic nitrogen (N-Q, 401.2, 401.0, and 400.9 eV). As shown in Fig. 2i, the N/C ratio statistics were performed to get a better comparison. The N-HPC-1.5 has higher N-6 content (~ 3.5 at.%) as well as the N-Q (~ 3.0 at.%). Generally, the higher-proportion N-Q facilitates the rapid transfer of electrons in porous carbon, thus enhancing the rate behavior of the electrode [10, 30]. At the same time, the large number of chemically active sites of N-6 can be attracted as additional defects with high affinity, contributing to their more capacitive contribution [31].

3.2 Electrochemical evaluation of the N-HPC anodes

Due to unique structure advantages, the N-HPC samples were tested as anode for K storage. Figure 3a shows the CV curves for the N-HPC-1.5 between 0.01 − 3.0 V (vs. K/K+) at 0.1 mV s‒1. A wide peak at 0.638 V is shown in the 1st discharge cycle but disappears afterwards, arising from the resolving of the electrolyte as well as the construction of the solid electrolyte interphase (SEI) layers [16]. The broad anodic peak at 0.475 V together with the sharp cathodic peak at 0.02 V is attributed to the intercalation/deintercalation of potassium ions. The nearly overlapping of CV curves in the 2nd and 3rd cycles, suggesting the good reversibility of the K+ storage process. In the first CV cycle of N-HPC-0.5, the reaction peak forming the SEI layer is not clear (Fig. S6a). Due to the existence of ZnO in N-HPC-2.5, the CV curve (Fig. S6b) shows some more impurity peaks. Figure 3b displays the first three galvanostatic charge-discharge (GCD) profiles of the N-HPC-1.5 at 0.05 A g‒1. The corresponding initial Columbic efficiency (ICE) is determined to be 20.1% based on the primary charge and discharge capacities (215.9 and 1028.1 mAh g‒1). The ICE could be attributed to irreversible electrolyte decomposition and the formation of the SEI films. Compared with the other two samples, N-HPC-1.5 has a higher initial capacity and reversible capacity (Fig. S6c, d). As shown in Fig. 3c, the N-HPC-1.5 anode displays superior capacity retentions at various current densities. The N-HPC-1.5 anode delivers the discharge capacity of 236.4, 217.4, 195.4, 164.5, 141.5, and 117.6 mAh g‒1 at current densities of 0.05, 0.1, 0.2, 0.5, 1.0, and 2.0 A g‒1, respectively, which outperform those of N-HPC-0.5 and N-HPC-2.5 electrode. Surprisingly, the capacity is recovered to 250.1 mAh g‒1 when the current density goes back again to 0.05 A g‒1. The excellent capacity of N-HPC-1.5 is due to the multi-effects of 3D hierarchical porous architecture, large layer interval, and high nitrogen doping content. Such rate performance is also comparable to many other carbonaceous anodes reported in literatures (Fig. 3d), such as activated carbon-2 (AC-2) [32], self-supporting sub-micro carbon fibers wrapped in carbon nanotubes (SMCF@CNTs) [33], nitrogen-doped carbon microsphere (NCS) [34], polynanocrystalline graphite (PG) [35], hierarchical porous carbon (HPC) [17], and oak-based hard-carbon (OHC1100) [36]. Figure 3e displays the outstanding long-term cycling stability of the N-HPC anode. Amazingly, the N-HPC-1.5 anode shows a lifespan over 800 cycles with a reversible capacity of 105.0 mAh g‒1 at 1.0 A g‒1 and a capacity retention rate of ~ 77.3%, resulting in an extremely low decay rate of only 0.03% per cycle.

Fig. 3
figure 3

a Initial three CV curves (0.1 mV s‒1) and b charge-discharge plots (0.05 A g−1) of N-HPC-1.5, c rate behaviors (0.05 ‒ 2.0 A g−1) of N-HPC electrodes, d comparison in rate capacities of N-HPC-1.5 with other reported carbon-based anodes, e long cycling performance of N-HPC anodes at 1.0 A g−1

The galvanostatic intermittent titration technique (GITT) was used to further investigate the K+ diffusion coefficient (D) in N-HPC during the discharging/charging process (Fig. 4a). The testing time of discharge and charge is 10 min at the current density of 0.2 A g‒1, following a relaxation time of 30 min. The diffusion coefficients of three samples were calculated according to the GITT curves based on the following equation as illustrated [37]:

$$D=\frac{4}{\pi \tau }{\left(\frac{{m}_{B}{V}_{M}}{{M}_{B}S}\right)}^{2}{\left(\frac{{\Delta E}_{s}}{{\Delta E}_{\tau }}\right)}^{2}$$

where ΔEτ, ΔES, S, MB, VM, mB, and Γ were the voltage change during the current pulse, the steady-state voltage changes between before and after the current pulse, the area of the electrode-electrolyte interface, the molar mass of the electrode, the area of the electrode-electrolyte interface, the molar volume of the electrode, the quality load of active materials and the time duration of the current pulse, respectively.

Fig. 4
figure 4

a GITT plots, K+ diffusion coefficient plots over b discharge and charge processes, and d EIS spectra of the N-HPC electrodes as indicated

The D values in the N-HPC-1.5 are higher than those of the N-HPC electrodes at all potentials during cycling (Fig. 4b, c). The enhanced diffusion rate of K+ can be reasonably contributed to large interlayer distance. Figure 4d depicts the electrochemical impedance spectroscopy (EIS) of N-HPC. The inset of Fig. 4d shows the fitted equivalent circuit model with the specific parameters (Table S1) [38]. The semicircle and the diagonal line represent the charge transfer resistance (between the electrode material and the electrolyte) and the ion diffusion resistance, respectively. The Rct, Rsf, Cdl, Rs and W are the charge transfer resistance (the electrode-electrolyte interface), SEI film resistance, double layer capacitance, the electrolyte resistance and the Warburg resistance, respectively. The Rct of N-HPC-1.5 is much smaller than that of the other samples, indicating that the composite has fast K+ kinetic properties (Table S1) [39]. The Warburg resistance of N-HPC-1.5 is ~ 19.7 Ω, less than those of both N-HPC-0.5 and N-HPC-2.5, indicating its superior K+ transferring capability.

Capacitive behaviors of electrodes are tested, and the fast K+ storage behavior of N-HPC-1.5 are investigated with a scanning rate of 0.2 ‒ 1.8 mV s‒1, as presented in Fig. 5a. The capacitive effect is calculated based on the relationship between the current (i) and the scan rate (v) measured by the following equation: \(i \, = \, av^{b}\), where both a and b are constants [29, 37]. Values of b close to 0.5 and b close to 1 indicate ion diffusion control process and capacitance control process, respectively. The N-HPC-1.5 has b values of 0.92 and 0.91 for the anodic and cathodic peaks, respectively (Fig. 5b), indicating a surface capacitive-controlled process for potassium ion storage of N-HPC-1.5. The pseudo-capacitive contribution can be distinguished by the equation: i = k1v + k2v1/2, where k2v1/2 and k1v are the current fractions of the diffusion control part and the capacitive effect, respectively. As seen in Fig. 5c, the pseudocapacitive contribution (red part) has been calculated to be 90.2% for the N-HPC-1.5 at 1.4 mV s−1, which is clearly superior to N-HPC-0.5 and N-HPC-2.5 (Fig. 5d, e). As the shown in Fig. 5f, with the scan rate increase from 0.2 to 1.8 mV s‒1, the ratio of pseudocapacitive contribution of N-HPC-1.5 electrode rises from 62.1% to 93.6%. These results indicate that the N-HPC-1.5 electrode is capacitive-dominated in the K+ storage process. Such superior results evidence that the nitrogen doped, enlarged interlayer spacing and larger surface area could evoke more surface defect sites for potassium ion adsorption, thereby favoring the formation of fast kinetics.

Fig. 5
figure 5

a CV curves of N-HPC-1.5 at different scan rates, b corresponding logi vs. logv plots of N-HPC-0.5, N-HPC-1.5, and N-HPC-2.5 CV curves (1.4 mV s‒1) with the pseudocapacitive contributions as colored in red, black and blue of c N-HPC-1.5, d N-HPC-0.5, and e N-HPC-2.5 as indicated, f normalized pseudocapacitive contribution ratios of the N-HPC anodes at different scanning rates

3.3 Characterizations and electrochemical evaluation of the N-HPC-A cathode

The N-HPC-A was synthesized by a typical activation process with N-HPC-1.5 as precursor and KOH as pore-maker. The N-HPC-A still retains its interconnected bubble-filled, 3D honeycombs structure (Fig. 6a). As seen in Fig. 6b, the porous structure is further demonstrated by the TEM image, which also matches the SEM image (Fig. 6a). The N-HPC-A has a large layer spacing of 0.410 nm (Fig. 6c). Figure 6d reveals the N2 adsorption-desorption isothermal curves of the N-HPC-A with a surface area of 1313.2 m2 g‒1. The inset in Fig. 6d shows the pore size distribution plot of the N-HPC-A. The pore size distribution peaks of N-HPC-A are 1.3, 3.6, 5.4, 7.4 and 10.6 nm, respectively. Compared with N-HPC-1.5 (Fig. 2d), the number of micropores of N-HPC-A increases and the size of mesopores is larger. This is due to the activation of KOH, which is generally ascribed to the main reaction: 6KOH + 2C→2+ 3H+ 2K2CO3. As shown in Fig. 6e, the CV curves for N-HPC-A appears as a near ideal rectangle with insignificant shape change as the scan rate increases. Figure 6f shows the GCD curves for N-HPC-A, providing the initial charge and discharge capacities (~ 52.4 and ~ 61.6 mAh g‒1) at 0.05 A g‒1 with an ICE of ~ 85.1%. In the following cycles, the discharge/charge curves almost overlap, suggesting the good reversibility.

Fig. 6
figure 6

a FESEM, b TEM and c HRTEM images, and d N2 adsorption-desorption isothermal curves (the inset for the aperture distribution), e CV curves and f charge-discharge plots (0.05 A g−1) for the N-HPC-A

HRTEM and TEM were used to investigate the morphology and structural stability of N-NPC-1.5 after 200 cycles. It can be visualized that N-HPC-1.5 still retains its 3D porous structure well (Fig. S7a), which is demonstrated by the TEM observation (Fig. S7b). Note that the interlayer spacing after 200 cycles is approximately 0.422 nm (Fig. S7c), clearly larger than that before cycle (Fig. 1f), which should result from the reversible intercalation/deintercalation process of potassium ion [24]. Besides, CV testing of the N-HPC-1.5 after 200 charge/discharge cycles (Fig. S8) showed a more desirable rectangular shape, and the shape did not change significantly as the scan rate increased, indicating good cycling stability.

3.4 Electrochemical properties of N-HPC-1.5//N-HPC-A PIHCs

The electrochemical performance of the dual carbon potassium ion hybrid capacitor was tested by assembling an asymmetric cell with N-HPC-1.5 as the anode and N-HPC-A as the cathode. To compensate for the low ICE of the anode, the N-HPC-1.5 anode was prepotassiated through the direct contact with potassium metal in the electrolyte. For charge balance, the cathode and anode was designed to be 2: 1 (the weight ratio) [40]. Total weight of both electrodes was approximately 3.0 mg. The electrochemical properties of the PIHCs were tested over a voltage range of 0.01 ‒ 4.0 V. CV tests of PIHCs were carried out at different scan rates of 5.0 ‒ 30.0 mV s‒1, with the outcome presented in Fig. 7a. To date, there has been less research into the suitability of the operating voltage window for PIHCs. It is a very effective method to evaluating the voltage range of the PIHCs by using the S-value (i.e., Faraday fraction) [41]. The electrochemical stable voltages of electrodes in the PIHCs can be determined by the S-value, thus the upper and lower potential limits are optimized. Commonly, the stable voltage window determination criterion is S < 0.1. For the case of the S value less than 0.1, the PIHCs are generally endowed with good stability. The CV curve for the PIHCs device at 40 mV s‒1 is seen in Fig. 7b. The value of S can be expressed as follows [41]:

Fig. 7
figure 7

Electrochemical evaluation of the N-HPC-1.5//N-HPC-A PIHCs: a CV curves at various scan rates, b typical CV curve (40 mV s‒1) of the device along long, c derived S-value from the E-I response, d charge–discharge plots at 0.05 ‒ 2.0 A g−1, e comparison of the energy/power density of the PIHCs with other reported hybrid cells, f self-discharge plot, g leakage current curve and (h) long-term cycling performance at 1.0 A g‒1

$$S=\frac{{A}_{pos}}{{A}_{neg}}-1$$

The area between a → b → c → a part is denoted as Apos (pink part), and the integrated area between c → d → a → c part is designed as Aneg (green part). As shown in Fig. 7c, the calculated values of S are less than 0.1 at scan rates of 5 ‒ 40 mV s‒1, indicating that the N-HPC-1.5//N-HPC-A PIHCs have good voltage window matching in the voltage range of 0.01 ‒ 4.0 V. Figure 7d shows the charge-discharge plots at current densities of 0.05 ‒ 2.0 A g‒1, which shows an almost straight line indicating that the characteristic capacitive properties of the N-HPC-1.5//N-HPC-A PIHCs [42]. As shown in Fig. 7e, the device provides an energy density of up to 103.5 Wh kg‒1 at an output power density of 1000.0 W kg‒1, with the N-HPC-1.5//N-HPC-A PIHCs exhibiting superior electrochemical performance compared to other reported devices. Such a superior power density is also comparable to the state-of-the-art PIHCs reported in the literature, such as N-doped carbon nanotubes//AC (NCNTS//AC) [43], carbon foam with microporous structure//carbon foam with microporous structure (CFMS//CFMS) [44], hierarchically porous nitrogen-doped carbon//AC (SHPNC//AC) [45], graphene armored TiO2 nanotubes//porous AC (G-TiO2 NTs//PAC) [46], nitrogen-doped hierarchical porous hollow carbon spheres//nitrogen-doped hierarchical porous hollow carbon spheres (NHCS/ANHCS) [47], and MoS2-xSex/carbon hybrid nanotubes//AC (MoS2/3Se4/3/C-HNT//AC) [48]. After fully charged to 4.0 V at 0.1 A g‒1, the voltage of the device dropped by 1.08 V after 20 h, corresponding to a voltage loss of only 27.0% (Fig. 7f) [49]. The leakage current of the N-HPC-1.5//N-HPC-A PIHCs is only 6 μA (Fig. 7g). Meanwhile, the PIHCs also exhibits outstanding cycling stability with an achieved capacity retention of ~ 70.2% after 10,000 charge-discharge cycles at a current density of 1.0 A g‒1.

4 Conclusion

To summarize, hierarchically porous nitrogen-doped carbon (N-HPC) was successfully prepared via a facile chemical blow method with Zn(NO3)2·6H2O as the pore-forming agent. The 3D hierarchical porous structure, large interlayer spacing provides sufficient diffusion ways and free space to accelerate the reaction kinetics and alleviate the volume expansion during K+ storage. Moreover, the high N doping level not only provided more active sites for K+ but enabled the fast capacitive storage behaviors. Furthermore, the activated N-HPC could also be utilized as an efficient cathode material for storing anions. The constructed PIHCs assembled with the dual carbon electrodes (i.e., N-HPC-1.5 and N-HPC-A) achieved an excellent energy density of 103.5 Wh kg‒1 at 1000.0 W kg‒1. Meanwhile, the PIHCs device also exhibited outstanding cycling stability, and modest leakage current/self-discharge capability. The developed synthesis method may further inspire the development of carbon-based electrodes toward advanced PIHCs or other electrochemical devices.