1 Introduction

With the limited obtainability of fossil fuel, continually growing energy consumption, and rising demand for environmental protection, it is now essential and urgent to find a green, highly efficient, and sustainable energy-storage system [1]. Based on its unique merit, supercapacitors have developed as one of the most capable energy-storage methods, as they possess multifold advantages of exceptionally high power density (103–104 W kg−1), which is needed to distribute high energy for a moment when required. In addition, it is also known for its fast charging-discharging, long cyclic stability, economical with better safety [2,3,4].

Most of the commercial SCs are made up of carbon materials with various forms are utilized as electrode materials for supercapacitor (Electrical double layer) owing to their superior electrical conductivity, stable electrochemical properties, excellent cyclic stability, low cost, and environmental friendliness [5,6,7,8,9,10] rather than complex, high cost, and low conducting redox behavior electrode materials [11,12,13]. However, the current carbon-based SCs often suffer from its relatively low energy density (typically 5–7 Wh kg−1 for commercial supercapacitors), limiting their wide area of applications [14,15,16]. Nowadays, researchers put tremendous effort to progress the energy density of supercapacitors simultaneously ensuring power density and life cycle are not affected. According to the equation E = (1/2)CV2 [1], the energy density (E) of the supercapacitor is straightforwardly relative to capacitance (C) of the electrode materials and square of the electrolytes operating voltage window (V). It was evident that there are two approaches to enhancing the energy density of a supercapacitor, one is developing the electrode materials specific capacitance (Csp) and the other is increasing the cell voltage of the assembled device.

It is well known that the carbon-based supercapacitor particularly heteroatoms (N, B, P and S) doped graphitic carbon sphere with the mesoporous structure are promising candidate as an electrode material for supercapacitors due to their relatively large surface area, mesoporous structure, excellent electrical conductivity, and heteroatom functionalities [17, 18]. Many works have already proven that pore size, surface area, and graphitic nature play significant roles for carbon-based supercapacitor as they provide a short diffusion route for easy ionic movement [19], massive ion accumulation [20] and, excellent electronic conductivity respectively [21]. The heteroatomic functional groups can influence the electron-donor behavior of carbon materials, which can improve the electrode–electrolyte wettability, ion-accessible surface area, and offering additional pseudocapacitance, thus improving the electrochemical performance of carbon-based supercapacitors [18]. Recently, numerous research studies on nitrogen and boron-doped carbon materials have been employed as electrode materials for supercapacitor application to enhance their desirable electrochemical properties [7, 22, 23].

The phosphorus-doped carbon materials have drawn substantial interest, particularly for oxygen reduction reaction (ORR) catalysis [24,25,26,27,28]. Though, countable literatures have been accounted on phosphorus-doped carbon architecture for supercapacitors. For instance, Yi et al. have investigated that phosphorus-doped carbon structures with porous construction were synthesized via solid-state process at elevated temperature with sodium dihydrogen phosphate as phosphorus precursor. The capacitance of the obtained phosphorus-doped porous carbon materials preserved 133 F g−1 at 10 A g−1 [29]. Ma et al. reported that the phosphorus-doped carbon structure through phosphoric acid activated pre-product and disclosed the consequence of phosphorus doping on surface chemistry and capacitive performances of porous carbon materials. The resulting electrodes show excellent cyclic stability [30].

Most importantly, the phosphorus-doped carbon can expand the cell voltage because of enhancing electro-oxidation prevention of carbon-based electrode provoked by phosphorus-containing functional groups, which significantly improves the energy density of supercapacitors [31]. Yangyang et al. [32] have reported, phosphorus-doped graphene synthesized by post-treatment of pre-synthesized graphene with phosphoric acid, the resultant P-doped graphene can operate at a wide cell voltage of 1.7 V with excellent cycling stability of 3% loss after 5000 cycles. Therefore, an advanced investigation is required to apply phosphorus-doped carbon architecture towards supercapacitors applications. Upto to our knowledge, in situ growth of P-doped graphitic hollow carbon spheres and their supercapacitor activity is seldom reported. In addition, generally ex situ method is used to preparation of the existing heteroatom doped carbon materials in which the carbon materials are first synthesized and then post-treated with phosphorus-containing acids or salts at elevated temperature. The synthesis process is relatively complex and/or expensive experiment setup to be needed [33], multiple procedure and time consuming [29] synthetic routes which lead to difficulty in practical application.

Besides the electrode materials, an electrolyte is one of the most significant factors in increasing the cell voltage (V) and hence increasing the energy density of the supercapacitor [34]. Based on the electrode materials some organic and ionic liquid electrolytes are developed and used to promote increased cell voltage (0–4 V) of a supercapacitor [35, 36]. However, the electrolytes mentioned above with low electronic conductivity and limiting ionic mobility, produces poor electrochemical performance, as well as high cost and toxicity [34]. On the other hand, the aqueous electrolyte has the favourable features of high electronic conductivity, low cost, safety, and environmental friendliness. Unfortunately, the operating voltage window of the aqueous (acidic and alkaline) supercapacitor is narrowly restricted to 1.0 V, as the voltage of water decomposition is ~ 1.23 V [37]. However, aqueous neutral electrolytes with low H+ and OH concentrations could provide high overpotential for H and O evaluation reactions, resulting in carbon-based supercapacitors that can be stable at higher operating voltages (> 1.6 V) [38,39,40]. Hence, it is essential to hunt a kind of novel carbon based electrode materials with high oxygen and hydrogen evaluation overpotential to expand the operating voltage, and hence it can further enhance the energy density of supercapacitor. By considering the fact, developing novel electrode materials with outstanding electrochemical performance and selecting suitable electrolytes to widen potential window is necessary.

In our previous work [41], carbon spheres with mesoporous hollow structure was successfully grown over Fe-KIT-6 catalytic support using C2H2 as a carbon source by CVD technique and employed as an active electrode material for supercapacitor application. Enlightened by our previous results, it is further interesting in doping of heteroatom (phosphorus) into the mesoporous carbon sphere to enhance electrochemical performance. Here, we describes the growth of phosphorus-doped graphitic hollow carbon spheres (P-GHCS) via a simple and in-situ approach by bubbling the C2H2 gas through a container containing solution TPP/EtOH (triphenylphosphine (TPP) dissolved in absolute ethanol) for phosphorus source. The structural and textural properties of as-grown P-GHCS were carefully elucidated using distinct characterization techniques. The electrochemical performance of these P-GHCS electrodes was carried out by three-and two-electrode cell setup and those results were discussed. More importantly, the optimized PGHCS-800 has been engaged to build a symmetric supercapacitor system in a less corrosive aqueous neutral electrolyte and environment friendly manner. The assembled symmetric supercapacitor device can drive a larger potential window (2.0 V) with high cycling stability (89.09%).

2 Experimental

2.1 Synthesis of Fe-KIT-6 catalytic support

The mesoporous 3D cubic Fe-KIT-6 was synthesized alike to the previous report [41]. Briefly, P123 (4 g) was added to the solution mixture contains 7.9 g of 35% w/w HCl solution and 144 mL of distilled water. For complete dissolution, the obtained mixture was stirred at 35 °C. n-Butanol of 4 g was mixed to the solution and continuously stirred for 1 h at 35 °C. Then, silica source (TEOS) (8.6 g) and iron source of trace amount were mixed to the acquired homogeneous mixture, and the solution was stirred at 35 °C for 24 h. Hydrothermal treatment for 24 h at 100 °C was adopted, the above mixture was kept in a closed polypropylene bottle under static conditions. The attained white coloured product was filtered as well as dried for 8 h at 100 °C, and calcinated at 550 °C for 5 h in air ambiance.

2.2 Growth and purification of P-GHCS

The P-GHCS was prepared by CVD method by employing a catalytic support (Fe-KIT-6). A CVD horizontal tube furnace system comprising quartz tube (960 mm long and 45 mm i.d.,) and gas flow regulator units and a bubbler was utilized to provide P-GHCS. In a distinctive experimentation, Fe-KIT-6 of 200 mg was kept in a quartz boat inside a horizontal quartz tube. Argon gas (Ar) was purged towards the catalyst at 100 SCCM (SCCM—standard cubic centimetre per minute) as flow rate for 30 min to take away water molecules, i.e., pre-treat the catalyst and at a flow rate of 110 SCCM for 30 min hydrogen gas was passed to reduce the metal particles (Fe). The CVD process was performed at 750, 800 and 850 °C using C2H2 gas at a flow rate of 100 SCCM was bubbled through a bubbler containing mixer of triphenylphosphine (TPP) in absolute ethanol as P source for 30 min. After that, the furnace was taken back to the room temperature under Ar atmosphere.

The collected black-coloured powder (as-synthesized P-GHCS) from the quartz boat was treated with 40% HF solution (Hydro fluoric acid) to take away the Si segment. Also, to remove Fe particles the acquired sample was treated with HCl solution and cleaned with deionized water repetitively and air dried. Ensuing to drying, the sample was oxidized for 2 h at 400 °C in ambient air to remove carbonaceous layers like amorphous carbon and microcrystalline carbon to get the final P-doped hollow graphitic carbon spheres (P-GHCS). The calcined samples were denoted as P-GHCS-750, P-GHCS-800 and P-GHCS-850. Moreover, the sample without TPP was also prepared under the same condition for comparison, which is denoted as HCS-800.

2.3 Materials characterization

Powder X-ray diffraction (XRD) investigation was performed utilizing a Bruker D8 advance X-ray diffractometer equipped with a CuKα radiation source (λ = 1.54 Å). Raman spectra were obtained by engaging a Horiba Yvon LabRAM HR micro Raman system with He–Ne Laser at 633 nm at laser power below 5 mW. The morphology was studied by a high-resolution transmission electron microscopy operated at 200 kV as an accelerating voltage (JEOL JEM 2010) and Field emission scanning electron microscopy (Hitachi S-4800). EDS spectroscopy was carried out by a 4pi EDXS system at 20.0 kV as an accelerating voltage. N2 adsorption–desorption isotherms were acquired at − 196 °C with a Porosimeter ASAP 2020 V4.03. Samples were outgassed at 200 °C under vacuum conditions for overnight prior the analysis. Brunauer–Emmett–Teller (BET) theory and Barret–Joyner–Halenda (BJH) method were used to determine the specific surface area and pore size distribution at a relative pressure of about P/P0 = 0.995. Kratos Axis Ultra spectrometer was engaged to record the X-ray photoelectron spectroscopy (XPS) spectrum.

2.4 Electrode preparation and electrochemical characterization

The electrochemical performance of the prepared P-GHCS electrodes was conducted on an electrochemical workstation (Autolab PGSTAT 302 N) using cyclic voltammetry (CV), galvanostatic charge/discharge (GCD) and electrochemical impedance spectroscopy (EIS) in three-electrode and two-electrode cell configuration. In the three-electrode system, P-GHCS material, Ag/AgCl (saturated KCl solution) and a Pt wire were served as the working electrode, reference and counter electrodes, respectively. The working electrode was fabricated by mixing P-GHCS, conducting carbon black and polyvinylidene fluoride (PVDF) as binder in a weight ratio of 8:1:1 with DMF solution to form homogeneous slurry. The obtained mixture was then cast on Ni foam and pressed at 10 MPa and then dried at 80 °C overnight. Then the prepared electrodes were analysed in a three-electrode setup in 6 M KOH solution. CV and GCD analysis were carried out with the potential window range of 0.0 to − 1.0 V at various scan rates and current densities. The EIS spectra was recorded amid the frequency region of 100 kHz to 0.01 Hz with 5 mV as AC amplitude width. Based on the GCD measurements, the specific capacitance was calculated using the Eq. (1):

$$C_{{{\text{sp}}}} \left( {3E} \right) = \frac{I \times t}{{m \times V}}$$
(1)

where, Csp—specific capacitance (F g−1), I-charge/discharge current (A), t—discharge time (s), m electroactive mass of the electrode material (g) and V—potential window (V).

For the two-electrode symmetric system, the working electrodes were prepared as described in the three-electrode system. The symmetric cell was then assembled using two identical electrodes with the same or very close weight with a separator (Whatman filter paper) in Na2SO4 as electrolyte background (1 M) as sandwich-type cell (electrode/separator/electrode). The specific capacitance from GCD curves was estimated using the Eq. (2) for the two-electrode system.

$$C_{sp} \left( {2E} \right) = \frac{4 \times I \times t}{{m \times V}}$$
(2)

where, I (A)—discharge current, V (V)—potential window, t (s)—discharge time, m (g) is the total mass of the active materials.

The energy density E (Wh kg−1) and power density P (W kg−1) of prepared electrodes were calculated from the Eqs. (3) and (4)

$$E = \frac{1}{8} C_{{{\text{sp}}}} \left( {2E} \right) V^{2} \frac{1000}{{3600}}$$
(3)
$$P = 3600 \frac{E}{t}$$
(4)

where, Csp (2E) (F g−1)—specific capacitance, t (s)—discharge time and V (V)—potential window.

3 Results and discussion

The P-GHCSs were grown over Fe-KIT-6 catalytic support at various temperature ranges such as 750, 800, and 850 °C through CVD technique. The impact on determining the morphology and structures of Fe-KIT-6 was found by using SAXS, FESEM and HRTEM measurements. The detailed evidence for Fe-KIT-6 were produced in Fig. S1(a–d). As depicted in Fig. 1a–c, images from FESEM reveal the profiles of P-GHCS; all the samples possess a significant quantity of carbon particles with nearly spherical morphology. It was found that some of the carbon spheres were connected to one and another in all the three samples to form chain-like structure which is due to the effect of accretion while some of them overlapped. The HRTEM images of Fig. 1c–e retain the similar morphology what we observed in FESEM analysis, which shows carbon spheres with outer diameter of about 745–800 nm.

Fig. 1
figure 1

a–c FESEM images and d and g, e and h, and f and i HRTEM images of P-GHCS-750, P-GHCS-800 and P-GHCS-850, respectively; j SEM with EDS mapping of P-GHCS-800

They are interconnected using graphitic link at boundary region resulting in interpenetrative graphitic conducting path among carbon spheres that favors better electronic movement while used as an electrode for supercapacitor [42]. As it can be evidently noticed from the inset of Fig. 1d–f, the remarkable appearance of carbon sphere was observable in between the dark edge and the pale center of P-GHCS indicates that hollow structure with shell thickness of about 90–120 nm. Such a hollow structure formation is possibly due to vapor liquid (VL) mechanism [41] during carbon sphere growth. Furthermore, as can be seen from Fig. 1g–i, numerous graphitic fringes with different interlayer distance (d002 = 0.341 to 0.350 nm) were noticed in all three samples, indicating the presence of some structural defects in the graphitic region which further ensured by XRD and Raman spectroscopy analysis. The SEM with EDS mapping of the P-GHCS-800 in Fig. 1j revealed a homogenous distribution of the P species on the surface of the carbon material, indicating that the P-atoms were successfully doped in the carbon network. Furthermore, the nature of bonding and chemical composition of P-GHCS was provided elaborately in XPS and EDX section.

As the crystallinity/graphitization of carbon material is crucial to improve the performance of supercapacitors, XRD was performed for doped and undoped carbon materials. The XRD patterns of P-GHCS-750, P-GHCS-800, P-GHCS-850, and HCS-800 showed two diffraction peaks at around 25° and 43° as depicted in Fig. 2a, which corresponding to (002) and (100) diffraction planes of typical graphitic carbon [43, 44]. The (002) diffraction peaks for all P-GHCS were slightly shifted to a lower angle and its width stays constant or even slightly broadens as compared with undoped carbon (HCS-800), implying a little increase in d(002)-spacing of about 0.35 nm for P-GHCS and 0.347 nm for HCS-800 sample. In our previous work, we reported that as the CVD temperature increases, the d-spacing value increases to a certain temperature and then decreases. However, further distortion was observed in the P-doping carbon sample, which was evidenced by Raman spectrum analysis.

Fig. 2
figure 2

a XRD and b Raman spectrum of P-GHCS-750, P-GHCS-800 and P-GHCS-850 samples

The Raman spectroscopy was employed further to confirm the P-doping effect on the carbon materials as depicted in Fig. 2b. all three samples showed two bands at about 1332 and 1591 cm−1 were ascribed to D-band (defective graphitic structures) and G-band (sp2-hybridized graphitic structures) of carbon material, correspondingly [45, 46]. The D-band to G-band’s (ID/IG) intensity ratio is usually utilized to measure the degree of structural order. The ID/IG values of P-GHCS-750, P-GHCS-800, P-GHCS-850 and undoped carbon HCS-800 were determined to be 1.04, 1.10 and 1.17, and 0.97 respectively. It was observed that the ID/IG values increase with increasing P-doping as well as CVD temperature. The increase in ID/IG value is due to P atom doping into the carbon network due to structural imperfection. Moreover, it was found that position of G-band for P-GHCSs were shifted to lower wave number compared to G- band (1597 cm−1) for P-free carbon, suggesting n-type doping which consistent with other reports for P-doped carbon materials [45].

The specific accessible surface area and appropriate distribution of pore size play a major role in improving electrochemical behavior of the electroactive materials [47]. We examined the pore size distribution and specific surface accessible area of all the prepared samples through N2 adsorption/desorption isotherms measurement.

As depicted in Fig. 3a all the samples exhibited a type-IV isotherms with H2 hysteresis loop at relative pressure (P/P0) of 0.45 to 0.95 which manifest characteristic feature of mesoporous structure [48, 49]. The BET surface area of all P-GHCS samples was evaluated to be 240–337 m2 g−1. The distribution of pore size of all samples from adsorption branch by BJH technique were depicted in Fig. 3b), which revealed a narrow distribution of pore size with a range of 3.05–3.51 nm. Thus, the obtained Brunauer–Emmett–Teller (BET) specific surface area, average pore size and the total pore volume of all samples were given in Table 1. The results suggested that heteroatoms doping in carbon materials affect the average pore size, specific accessible surface area, and pore volume. Such uniform with suitable mesopores, moderate surface area and pore volume are expected to offer plentiful charge storage space for efficient ion transport path and large specific capacitance.

Fig. 3
figure 3

a BET isotherms; b Pore size distribution of P-GHCS-750, P-GHCS-800 and P-GHCS-850

Table 1 BET specific surface area, total pore volume and average pore size of P-GHCS samples

The elemental composition was measured by EDS spectrum analysis for the prepared P-GHCS-750, P-GHCS-800, and P-GHCS-850 samples as presented in Fig. S2(a–c). All the spectra depict C, O, and P as the only elements present in the prepared all P-GHCS samples, indicating that the engaged samples for the fabrication of supercapacitor are highly pure and free from other impurities (Si, Fe) peaks as depicted in all the spectra. The elemental composition by weight percentage of C, O, and P varies in all the samples listed in Table 2. It can be clearly understood that the samples prepared at low temperature exhibited lower level of P-doping than the samples synthesized at higher temperatures. Furthermore, it was found that increasing the oxygen content when increasing phosphorus doping, possesses excellent concurrence with the previous report [50], which is coincide with and authenticated by the XPS investigation.

Table 2 Elemental analysis of P-GHCS-750, P-GHCS-8000, and P-GHCS-850

To examine the chemical composition and nature of bonding, the X-ray photoelectron spectroscopy was employed for the P-GHCS-800 sample is depicted in Fig. 4. The full survey spectrum of the P-GHCS-800 sample (Fig. 4a) revealed a higher intense peak at 284.5 eV ascribed to carbon (C1s), a peak at 532.3 eV ascribed to oxygen (O1s), and a peak at 131.0 eV attributed to phosphorus (P2p) and their corresponding atomic percentages were estimated to be 85.53, 14.3 and 0.17%, respectively. Furthermore, the C1s peak can be deconvoluted into four different components such as C=C, C–O, C=O and O–C=O as shown in Fig. 4b and their corresponding binding energies were at 284.5, 286.0, 288.1 and 289.9 eV, respectively [46, 51]. Moreover, the high-resolution P2p XPS spectrum (Fig. 4c) demonstrates the presence of both P–C at 130.7 eV and P–O at 133.5 eV (in the form of (CO)2PO2 and (CO)PO3), suggesting phosphorus atom was covalently incorporated with carbon on the edges of graphitic plane by bonding to one or more oxygen [28,29,30, 33].

Fig. 4
figure 4

a Wide scan XPS survey spectrum, b C1s spectrum and (c) P2p spectrum of the P-GHCS-800

This was demonstrated in Table 2 by the increase of O contents with P-doping. Therefore, it is believed that these P-containing functional groups contribute to pseudocapacitance by performing intricate faradic reaction with wide potential window. Furthermore, it can also improve surface wettability, which allows mesopores to effectively diffuse a large number of electrolyte ions, leading to a higher surface area for EDLC formation, thus achieving a higher capacitance as previously reported by Liu et al. [52].

To estimate the electrochemical behavior of the P-GHCS synthesized at 750, 800 and 850 °C, cyclic voltammetry (CV), galvanostatic charge–discharge (GCD) and electrochemical impedance spectroscopy (EIS) techniques were recorded in a three-electrode configuration in 6 M KOH electrolytic solution. Figure 5a and c depicts the CV curves of the P-GHCS-800 (TPP with EtOH) and HCS-800 (i.e., EtOH without TPP) electrodes at a scan rate of 10 mV/s. From the CV curves, both sample revealed a quasi-rectangular profile represents EDLC behavior [53]. Furthermore, it can be clearly observed a significant difference between the P-GHCS-800 and HCS-800 samples, with the P-GHCS-800 exhibiting an apparently distorted curve with broad reversible humps compared to the HCS-800, suggesting more pseudocapacitive performance associated with fast and reversible redox reaction which might be originated from the existence of P-containing functionalities on the surface of carbon sphere [54]. The undoped (HCS-800) electrode also gives a little pseudo capacitance that could be associated with oxygen only.

Fig. 5
figure 5

Electrochemical behavior of the P-GHCS tested by three-electrode setup in 6 M KOH; a CV patterns of HCS-800 and P-GHCS-800 at 10 mV s−1; b the GCD profiles of HCS-800 and P-GHCS-800 at 1 A g−1; c CV curves of HCS-800 and P-GHCS-800 at a scan rate of 400 mV s−1; d CV curves of P-GHCS-800 at various scan rates of 1–400 mV s−1; e the GCD profiles of P-GHCS-800 at various current densities of 0.2–10 A g−1; and f CV curves of P-GHCS-750, P-GHCS-800 and P-GHCS-850 at 10 mV s−1

Moreover, it can be seen from Fig. 4b, the P-GHCS-800 exhibited a higher relative content of C–O (20.1 Rel. Int. (%)), C=O (12.9 Rel. Int. (%)), and a reduced amount of carboxylic groups O–C=O (6.7 Rel. Int. (%)). In contrast, undoped HCS-800 contains more extensive relative content of carboxylic and fewer C–O and C=O groups [41]. It has been reported that the P-originating functional group inhibits the formation of carboxylic groups, which is not beneficial for pseudocapacitance despite it destroy the capacitance. In addition, the P-originating functional group favors the formation of C=O and C–O group, which are more beneficial for stable pseudocapacitance by fast faradic redox reactions and also improves the surface wettability of electrode–electrolyte interface, which facilitates more electrolyte ions to penetrate into mesopores, leading to larger electrochemically active surface area and thus increase the specific capacitance [52, 54]. Hence, our as prepared P-doped electrode material exhibits superior electrochemical performance than pristine and thus demonstrated that merged effect of both EDLC and pseudocapacitance [55,56,57].

Moreover, increasing the scan rate even at 400 mV s−1 both samples still retain typical rectangular CV curves suggesting that a rapid and proficient charge transfer, implying that P-GHCS-800 and HCS-800 electrodes acquire a highly capacitive character and a small equivalent series resistance (ESR) with quick charge–discharge because of our prepared materials having well-developed mesoporosity with good graphitization which is consistent with EIS result explained in the subsequent section. However, it is noteworthy that the HCS-800 also showed rather excellent capacitive behaviour, however evidently lower than P-GHCS-800. The result suggests that the capacitive performance was substantially improved after P doping.

The GCD profiles of the P-GHCS-800 and HCS-800 samples in 1 A g−1 are shown in Fig. 5b, in which the P-GHCS-800 exhibited a non-linear curve than the HCS-800, revealing pseudo-capacitive properties orginated from the P-doping effect. It is evident that P-GHCS-800 depicts a lengthy discharge time than that of undoped counterpart, thus the P-GHCS-800 yielding a higher capacitance. CV profiles of P-GHCS-800 at different scan rates in the range from 1 to 400 mV s−1 are presented in Fig. 5d. It is vital to observe the CV profile is slightly distorted with no obvious change even at a high scan rate of 400 mV s−1, signifying a notable level of rate behavior compared to the undoped counterpart. Similar results can be acquired from the GCD outcomes of P-GHCS-800 studied at various current densities in the range from 0.2 to 10 A g−1 as depicted in Fig. 5e.

The P-GHCS-800 electrode’s specific capacitance was evaluated from the GCD pattern is 321 F g−1 at 0.2 A g−1 using the Eq. (1), which is larger than that of P-GHCS-750 (223 F g−1), P-GHCS-850 (165 F g−1), and HCS-800 (157 F g−1). The GCD profiles of the P-GHCS-750, P-GHCS-850, and HCS-800 samples are given in Fig. S3(b, d) and Fig. S4(b), respectively. Moreover, the specific capacitance of the P-GHCS-800 was superior than that of previous investigated P-doped carbon and N/P co-doped carbon materials such as P-3DOMC (282 F g−1 at 0.1 A g−1) [52], NPHCMS (200 F g−1 at 0.5 A g−1) [49], NPC-700 (312 F g−1 at 0.2 A g−1) [58], SNPPC-800 (227 F g−1 at 0.5 A g−1) [59], and NPG (219 F g−1 at 0.25 A g−1) [60]. Clearly, the doping of phosphorus into framework of carbon spheres significantly improved the specific capacitance. Such a good supercapacitive performance of our P-doped carbon samples ensues from the combined effect of suitable mesoporous structure, good graphitization and the appropriate amount of phosphorous contents. The mesopores provide a path for ion penetration and transportation and facilitate effective active sites for large charge-storage, while graphitic nature offers improved electronic conductivity. The phosphorous doping into the carbon network contributes pseudocapacitance as well the active functional groups also enhance the wettability of the structured carbon electrode, is an advantage to augment the capacitance performance. Figures 5f and 6a presents the CV profiles at 10 mV s−1 and GCD patterns at 1 A g−1 of the P-GHCS-750, P-GHCS-800 and P-GHCS-850, delivers the best capability. Further, the CV and GCD profiles of the P-GHCS-750 and P-GHCS-850 at different scan rates and current densities, correspondingly, are depicted in Fig. S3(a–d).

Fig. 6
figure 6

a GCD pattern of P-GHCS-750, P-GHCS-800 and P-GHCS-850 at 1 A g−1; b rate performance of P-GHCS-750, P-GHCS-800 and P-GHCS-850; c cyclic stability test of P-GHCS-800 after 2000 cycles at 2 A g−1; and d EIS of P-GHCS-750, P-GHCS-800 and P-GHCS-850 electrodes

Figure 6b shows the rate capabilities of P-GHCS samples. As depicted in Fig. 6b, the specific capacitance of all the three electrodes decrease with increasing current density owing to the result of ions diffusion limitation [48]. At low current density 0.2 A g−1, all three electrodes exhibit high specific capacitance, which gradually decreases up to 1 A g−1. However, even at high current densities (1–10 A g−1) specific capacitance was retained in the range of 68.1%, 73.1%, and 75.5% for P-GHCS-750, P-GHCS-800, and P-GHCS-850, respectively. From this, it is clear that good rate performance for all P-GHCS samples at high current density.

Furthermore, the cyclic stability of the P-GHCS-800 sample was carried out by employing the GCD cycling test. The changes of specific capacitance Vs. the number of cycles for P-GHCS-800 at current density of 2 A g−1 is depicted in Fig. 6c, where the capacitance still remains 97.1% after 2000 consecutive cycles, indicating good cycling stability as a modified electrode material for high-performance supercapacitors. The reason for such long-term stability can be attributed to the blockage of electroactive oxidation groups by phosphorus-containing oxygen functionalities [31]. To further explore the electrochemical behaviors such as ion diffusion and conductivity within the electrode, as well as to evaluate the contribution of the heteroatom functionalities to the EDL capacitance of P-GHCS-750, P-GHCS-800, and P-GHCS-850 electrodes, the EIS investigations were performed in the frequency range from 100 kHz to 0.01 Hz with 5 mV. The Nyquist plots for all P-GHCS electrodes are revealed in Fig. 6d. As depicted in Fig. 6d, the Nyquist plots of three samples show a small semicircle in high-frequency region depicts the charge transfer resistance (Rct) occurred at interface amid the electrode–electrolyte. Further, the approximate straight slopes at low frequency section revealed high capacitive nature of carbon structures.

Furthermore, the equivalent serious resistance (Rs) is related to electrolyte resistance, intrinsic and interfacial resistance of the current collector and active materials which can be acquired by the Nyquist plots first intercept on the real axis [49, 61]. The determined Rs values are to be 0.53 Ω, 0.51 Ω and 0.57 Ω for P-GHCS-750, P-GHCS-800, and P-GHCS-850, respectively. From this, it could be found that among three carbon electrodes, the P-GHCS-800 electrode exhibits the lowest Rs value and a straight slope than the other two electrodes, which demonstrates good electrochemical performance.

The excellent electrochemical performance of the optimized P-GHCS-800 ascribed the following possible reasons: (i) the optimal pore structure of P-GHCS-800 leads to faster ion movement and efficient ion-accessible surface area; (ii) the graphitic nature of the P-GHCS-800 increases the conductivity of the electrode and (iii) the presence of an appropriate amount of heteroatoms on the surface of carbon spheres i.e., suitable phosphorus-containing oxygen functional group increases electrode–electrolyte wettability, leading to enhanced electroactive surface area and favoring large pseudocapacitance. Therefore, the prepared sample P-GHCS-800 exhibits better capacitive performance.

As it is known, the energy density of a supercapacitor is directly related to the square of the potential window (V), thus increasing the potential window that can progress the energy density of the supercapacitor. Therefore, to probe the possibility of widening the potential window of the P-GHCS-800 electrode, we constructed a symmetric two-electrode (P-GHCS-800//P-GHCS-800) supercapacitor device with 1 M Na2SO4 aqueous neutral electrolyte. To select the cell voltage of the fabricated symmetric supercapacitor, the cell voltage was tested in a wider range by step-wise increasing in the positive applied potential width above 1.6 V in 1 M Na2SO4 electrolyte. The CV curves of P-GHCS-800//P-GHCS-800 symmetric supercapacitor at a scan rate of 50 mV s−1 with various cell voltages of 1.6–2.2 V are presented in Fig. 7a.

Fig. 7
figure 7

Electrochemical behavior of the carbon samples studied by two-electrode setup in 1 M Na2SO4; a CV profiles and b GCD profiles of symmetric cell with various cell voltages; c CV patterns and d GCD profiles of symmetric cell at various scan rates, current densities, respectively

As shown in CV profiles, it can be clearly revealed that when the potential window of the symmetric cell extended up to 2.0 V, the CV peaks of the supercapacitor tranquil preserve a good rectangular profile, which indicates excellent capacitive behavior as well as good reversibility. Furthermore, the potential window increases to 2.2 V, the current was raised sharply as the electrolyte decomposed with hydrogen and/or oxygen evaluation. Moreover, the same we tested by galvanostatic charging-discharging method. The GCD patterns are depicted in Fig. 7b, the triangular shapes are retained up to the potential width of 2.0 V at 1 A g−1, further increase in the potential window leads to a decline from the triangular shape of the GCD shape. The acquired result designates a stable high cell voltage of up to 2.0 V for P-GHCS-800 could be possible and it is reached. Hence, the potential width of 2.0 V is selected to further evaluate the electrochemical behavior of the symmetric cell, which is significantly higher than the previously investigated P-doped carbon (Table 3). The possibility to explain the widening of the cell voltage up to 2.0 V is the improved oxidation stability of the P-GHCS electrode by blocking the active oxidation sites of carbon materials with P-containing functional groups [32, 62].

Table 3 The comparison of energy density, power density and operating voltage of doped-carbon-based symmetric supercapacitors with the present work

The CV profiles of the symmetric supercapacitor device at various scan rates raning from 5 to 100 mV s−1 are shown in Fig. 7c. Even at a high scan rate of 100 mV s−1, the rectangular shape of the CV peak has not changed, which suggests an excellent capacitive property and fast ionic transport. Figure 7d depicts the GCD patterns of the P-GHCS-800 symmetric supercapacitor at various current densities in the range from 0.2 to 5 A g−1, demonstrating superior capacitive performance with good reversibility. The specific capacitance of the P-GHCS-800 symmetric supercapacitor calculated from the Eq. (2) is 78 F g−1. Furthermore, the rate capability of the symmetric supercapacitor is depicted in Fig. 8a. At a current density of 0.2 A g−1, the symmetric supercapacitor reveals a high capacitance (78 F g−1) and it retains 41.3 F g−1 at a current density of 5 A g−1, possesses decent rate capability. Cyclic stability is the most important key factor of a supercapacitor for the implementing of commercialization. As depicted in Fig. 8b, the galvanostatic cycling of the P-GHCS-800 symmetric supercapacitor at the high current density (1 A g−1) of the cell was performed in 2.0 V. We found that it can be drive stably on a larger potential window of 2.0 V for 2000 cycles with capacitance retention of 89.09%. We believe that this may be due to the P functionalities that inhibit the oxidation of carbon electrode, along with well-developed mesoporous structure and graphitic nature that facilitate fast ionic and electronic transport of carbon spheres during cycling test [31, 62]. It demonstrates a stable capacitive performance of our fabricated device with high cell voltage.

Fig. 8
figure 8

a Rate capabilities, b cycling test for 2000 cycles at 1 A g−1, and c Ragone plot of P-GHCS-800//P-GHCS-800 respectively, and d photograph of the single P-GHCS-800//P-GHCS-800 device lighting a red LED

Furthermore, the energy density and power density of the symmetric supercapacitor device were assessed to evaluate its potential application. The Ragone plots of the symmetric supercapacitor are shown in Fig. 8c. It shows that the P-GHCS-800 based symmetric supercapacitor shows a high energy density of 10.83 Wh kg−1 with a power density of 222.78 W kg−1. Even at a high power density of 5200 W kg−1, the energy density can still retain 5.74 Wh kg−1. Additionally, the fabricated P-GHCS-800 symmetric supercapacitor displays a high energy density than the commercial aqueous supercapacitor of 5 Wh kg−1 [14]. Moreover, the cell voltage and energy density of the supercapacitor are higher than the previously reported literature given in Table 3.

To test the practical feasibility of our symmetric supercapacitor device and its workability within a higher potential window, we assembled a single cell symmetric supercapacitor to successfully light up a red LED (2.0 V, 20 mA) with adequate intensity. As illustrated in Fig. 8d, the fabricated symmetric supercapacitor (single cell only) was charged at a current density of 0.5 A g−1 up to higher potential window of 2.0 V, after the charged symmetric cell can efficiently light up a red LED for a certain period of time, demonstrating the reliable practical applicability of the P-GHCS electrode.

4 Conclusion

In summary, the P-doped graphitic hollow carbon spheres (P-GHCS) were successfully grown over Fe-KIT-6 by an in situ approach via a simple CVD technique. Owing to its good graphitization, relatively high surface area with mesoporous structure (240–337 m2 g−1), and high electrochemically active functional groups induced by P-doping (0.17 at. %) in carbon sphere, the optimized P-GHCS-800 electrode exhibited high-specific capacitance (Csp) of 321 F g−1 at 0.2 A g−1 and long-term cyclic stability with capacitive maintenance of 97.1% over 2000 cycles in a three-electrode setup with 6 M KOH solution. More importantly, the P-GHCS-800 fabricated symmetric supercapacitor with environmentally safe, non-corrosive and cost-effective aqueous electrolyte (1 M Na2SO4) device can endure at a large voltage window (2.0 V), together with good cyclic stability (89.09%) and providing appreciable energy density of 10.83 Wh kg−1 with 222.78 W kg−1 as its power density. This finding would encourage the structural design of carbon materials with mesoporous structure, graphitic and P-containing oxygen functional group derived from CVD method can be suitable for advanced supercapacitors active electrode materials especially for high voltage (2.0 V) with good cycle stability for future energy storage devices.