Facile synthesis of bio-based nitrogen- and oxygen-doped porous carbon derived from cotton for supercapacitors

Biomass-derived O- and N-doped porous carbon has become the most competitive supercapacitor electrode material because of its renewability and sustainability. We herein presented a facile approach to prepare O/N-doped porous carbon with cotton as the starting material. Absorbent cotton immersed in diammonium hydrogen phosphate (DAP) was activated at 800 °C (CDAP800s) and then was oxidized in a temperature range of 300–400 °C. The electrochemical capacitance of the impregnated cotton was significantly improved by doping with O and N, and the yield was improved from 13% to 38%. The sample oxidation at 350 °C (CDAP800-350) demonstrated superior electrical properties. CDAP800-350 showed the highest BET surface area (1022 m2 g−1) and a relatively high pore volume (0.53 cm3 g−1). In a three-electrode system, the CDAP800-350 electrodes had high specific capacitances of 292 F g−1 in 6 M KOH electrolyte at a current density of 0.5 A g−1. In the two-electrode system, CDAP800-350 electrode displayed a specific capacitance of 270 F g−1 at 0.5 A g−1 and 212 F g−1 at 10 A in KOH electrolyte. In addition, the CDAP800-350-based symmetric supercapacitor achieved a high stability with 87% of capacitance retained after 5000 cycles at 5 A g−1, as well as a high volumetric energy density (18 W h kg−1 at 250 W kg−1).


Introduction
The development of new materials for energy storage systems has attracted tremendous attention. With limited availability of fossils fuels, designing functional materials for sustainable and alternative energy resources is a feasible and promising approach.
Supercapacitors have been widely used in commercial and industrial equipment because of their higher power density, shorter charge-discharge times and longer lifetime than traditional energy storage devices. 1 Carbon materials, such as carbon nanotubes, templated carbons, carbon spheres and graphene, 2-4 are commonly studied. Carbon materials retain electrical charge by an electrostatic double layer and electrochemical pseudocapacitance. 5 Generally speaking, porous carbon materials have superior electrochemical performance as supercapacitor electrodes due to their good chemical and physical stability, large specic surface area, high conductivity, and special hierarchical structure. [6][7][8] Compared to the fossil-fuel based approach, the biomass-derived carbon materials display distinct advantages, such as low cost, availability and sustainability. 9 From a practical application perspective, it is highly desirable to develop a facile approach rather than a complicated and tedious one. 10 Notably, biomass-based carbon materials can be prepared by selecting proper raw materials; more and more research has been focused on nding biomass-derived materials such as cotton, 8 wood sawdust, 11 and orange peel 5 as desirable precursors.
During the chemical activation process, different carbon precursors are mixed with chemical reagents such as ZnCl 2 , 12 H 3 PO 4 , 13 NaOH 14 and KOH. 15 For example, Chen et al. 16 reported nitrogen-doped carbon by using melamine and carbonized at 800 C. The as-prepared carbon showed a capacitance of 180 F g À1 at 0.5 A g À1 . Tian et al. 15 reported micropore-activated carbon as supercapacitors from cotton stalk via KOH chemical activation method, showing a specic capacitance of 254 F g À1 at a current density of 0.2 A g À1 .
However, the disadvantages of using these corrosive chemicals are this type of process generates a large amount of wastewater during washing to remove the chemicals. Therefore, it is advantageous to develop a facile and green process with less corrosive and more benign chemical reagents. (NH 3 ) 2 HPO 4 (diammonium hydrogen phosphate, DAP) was found to be one of them because it is less corrosive aer carbonization. Furthermore, heteroatom doping, such as oxygen, nitrogen, uorine or phosphorus [17][18][19] is an effective strategy to enhance the electrochemical performance of the porous carbon materials. 20 Oxygen-containing groups can improve the surface wettability and facilitate more active sites for charge storage. 21 The introduction of nitrogen doping could facilitate the mobility of negative charges on the carbon surfaces, thus improving capacitance. 22 As one of the most important agricultural crops in the world, cotton contains abundant cellulose, hemicellulose and lignin. The annual cotton production is up to 2500 million tons. Herein, we reported a very facile, green pyrolysis strategy for preparing nitrogen-and oxygen-doped porous carbon for supercapacitor electrodes from bio-derived cotton resource. DAP was proved to be an effective activation reagent. Compared to other corrosive reagents, DAP was not only more eco-friendly and economical, but also signicantly improved the nal yield of porous carbon product (34%), which was improved by about 3-fold compared to that by unimpregnated cotton (13%). Furthermore, DAP was found to be an effective N-doped reagent and oxidation treatment helped introducing O, which facilitated better surface wettability and achieved larger specic surface area (1022 m 2 g À1 ). The CDAP800-350 exhibited superior performance (292 F g À1 at 0.5 A g À1 ) than the controls both in three-electrode systems and two-electrode systems (270 F g À1 , 0.5 A g À1 ), which was proposed to be because oxygen and nitrogen doping facilitated by DAP and the activation process. CDAP800-350 also showed outstanding durability and excellent rate capability, which made it a promising candidate for supercapacitor applications in the future.

Preparation of samples
Absorbent cotton was used as the starting material and diammonium hydrogen phosphate (DAP) of analytical grade was used as both the doping and activation reagent. The weight ratio of cotton and DAP was 1 : 1. Absorbent cotton (10 g) was immersed in DAP solution (10 g DAP dissolved in 250 mL DI water) for 2 hours at ambient temperature and was dried at 100 C for 12 h. Then, the pretreated cotton and the control (cotton without pretreatment with DAP) were activated in a furnace at 800 C under nitrogen atmosphere at a heating rate of 5 C min À1 and were kept at 800 C for 2 hours. Aer activation, the products were washed with DI water to remove impurities, dried at 100 C for 5 h, and were designated as CDAP800 and C800.
Then CDAP800 samples were oxidized under air atmosphere for 5 h at different temperatures (300 C, 350 C and 400 C), and these samples were designated as CDAP800-300, CDAP800-350 and CDAP800-400, respectively.
(2) The Raman spectroscopy (Horiba Scientic, France) was used to characterize the synthesized porous carbon samples with 532 nm excitation-beam wavelength.
(3) The morphologies and structures of the samples were observed by using a scanning electron microscopy (SEM) instrument (FE-SEM, ZEISS, SUPRA 55VP, Oberkochen, Germany) and transmission electron microscopy (TEM) instrument (H-600, Hitachi, Japan). Before TEM characterization, the samples were dispersed in ethanol and the suspensions were attached on a carbon-coated copper grid for measurements.
(4) Samples were degassed in vacuum at 200 C for 3 h prior to the surface area analysis. Surface area was calculated by Brunauer-Emmet-Teller (BET) method from the adsorptiondesorption branch of the isotherms (V-Sorb 2800P, China). The pore size distribution was analyzed by the BJH method.
(5) X-ray photoelectron spectroscopy (XPS) was recorded on an ESCALAB 250Xi (Thermo Fisher Scientic, America) scanning XPS microprobe with monochromatic Al Ka as the excitation source.

Electrochemical measurements
The electrochemical measurements were carried out on a CHI660E electrochemical workstation (Chenhua, Shanghai, China) at ambient temperature. A square platinum plate and Hg/HgO were used as the counter electrode and reference electrode, respectively. In a typical procedure, the electrodes were prepared by mixing the active material, carbon black, and polytetrauoroethylene (PTFE) in a mass ratio of 80 : 10 : 10; all these were blended with ethanol, dropwise coated onto a titanium mesh (1 cm Â 1 cm) under a pressure of 15 MPa, and then dried at 60 C for 30 min in an oven to obtain electrodes. The loading mass of the active material on each electrode was 5.0 mg.
2.3.1 Three-electrode testing. The electrochemical tests were measured using a three-electrode cell system with 6.0 M aqueous KOH solution as the electrolyte. Cyclic voltammetry (CV), galvanostatic charge-discharge (GCD) technique and electrochemical impedance spectroscopy (EIS) were important parameters in the electrochemical investigations. The potential window was set as À1 to 0 V. CV tests were conducted at different scan rates of 5, 10, 20, 50, 100 mV s À1 , and GCD tests were conducted at a current density of 0.5, 1, 2, 5 and 10 A g À1 . EIS was measured in the frequency range of 0.01 Hz to 0.1 MHz at the alternating current amplitude of 5.0 mV. The gravimetric specic capacitance was calculated with the three-electrode method according to eqn (1).
where C (F g À1 ) is the specic capacitance, I is the current density (A), Dt (s) is the charge/discharge duration time, M is the overall mass loading of the active material in the coin device, and DV (V) is the potential window under the testing condition. 2.3.2 Two-electrode testing. In a two-electrode system, the mass loading of the active material on each electrode in the symmetric supercapacitor was 5.0 mg, and the electrodes were prepared by mixing the active material, carbon black, and polytetrauoroethylene (PTFE) in a mass ratio of 80 : 10 : 10; all these were blended with ethanol, coated onto a titanium mesh (1 cm Â 1 cm) under a pressure of 15 MPa, and then dried at 60 C for 30 min in an oven to obtain electrodes. The procedure is the same as that used for preparing the three-electrode system. The electrodes were made by the same above-mention method. A symmetrical supercapacitor was prepared from two similar-quality electrodes and separated by a lter paper membrane.
The electrochemical performance was tested in 6 M KOH aqueous solution. The specic capacitance was calculated according to eqn (2).
where C (F g À1 ) is the specic capacitance, I (A) is the discharge current, m (g) is the mass of materials, and DV (V) is the potential window. The energy density (E, W h kg À1 ) and power density (P, W kg À1 ) of the two-electrode system were calculated by eqn (3) and (4), respectively.
where C m is the gravimetric capacitance on one electrode of the two-electrode symmetrical supercapacitor cell, V (V) is the voltage change within the discharge time, and Dt (s) is discharge time.

Structural and textural characterization
The morphology and structure were investigated by scanning electron microscopy (SEM) and transmission electron microscopy (TEM). Fig. 1(a) shows the typical morphology of CDAP800-350. The diameter of the carbon ber is 8-10 mm. Fig. 1(b) is the microscopic structure of the CDAP800-350 sample obtained by TEM. The picture shows an amorphous structure with irregular domains, indicating some disorder defects and functional groups present in the samples. 23 In order to probe the elemental distribution of the sample, EDS (energy-dispersive X-ray spectroscopy) mapping of carbon, oxygen, nitrogen, and phosphorus elements were performed and the results are shown in Fig. 1(c-f). All elements demonstrated a homogeneous distribution on the carbon sample surface, which indicated that O, P and N were successfully incorporated onto the surface of the prepared carbon materials. Fig. 2 shows the TGA of cotton and CDAP; CDAP represents cotton immersed with DAP, and cotton represents the untreated cotton. From the gure, drastic thermal decomposition at 370 C was observed for the cotton sample without DAP, and a solid residue occupied only 13.0 wt% of its initial mass at 800 C. The low carbon yield of C800 was mainly due to levoglucose and tar formation. The more rapid the decomposition is, the larger the amount of volatiles produced. 24,25 It was observed that cotton treated with DAP showed a large mass loss in the temperature range of 150-200 C, which was attributed to the pyrolysis of cotton and DAP (to H 4 P 2 O 7 ). However, compared to C800, the weight loss was signicantly decreased aer 270 C. Aer the temperature increased beyond 800 C, there was still a small mass loss, which was proposed to be due to the pyrolysis of P 2 O 5 . 24 For the cotton treated with DAP, the solid residue retained 38.2 wt% of its initial mass at 800 C. This value was signicantly higher than for the sample without DAP treatment. This result suggested that DAP is an excellent impregnant to improve carbon yield. The possible explanation was that with pyrolysis of DAP, N and P were physically added or graed to cotton, promoting phosphorylation and forming a more thermally stable amorphous charred residue containing N-P-O. The phosphorylation reactions occurred and accelerated the dehydration of cellulose, which was capable of altering the mode of cellulose decomposition and resulting in improved carbon yield. 26 Wide-angle X-ray diffraction (XRD) was employed to characterize the crystallographic structures of the carbon materials. Fig. 3(a) showed two broad diffraction peaks around 25.0 and 43.5 , which were assigned to the (002) and (101) planes of graphitic carbon, respectively. The diffraction peak at 2q ¼ 20-30 broadened and weakened with elevated oxidation temperature. The position (angle) of the (002) band was believed to be  related to the inter-lamellar spacing. 23 The result implied that the CDAP800s had an amorphous structure with low graphitization degree. These smaller graphitic regions may be induced by the local lattice distortion with N and O doping. Another weak peak displayed at approximately 43.5 indicated the low degree of graphitization and high degree of interlayer condensation. 27 With the oxidation temperature increasing during the oxidation process, the intensity of the peaks decreased. When oxidation temperature increased to 400 C, the peak at 43.5 was just as small as that of C800. The result was probably caused by severe structural damage at elevated temperatures, which decreased the graphitization structure and electrical conductivity.
Raman spectra showed that all carbons exhibited two characteristic bands at around 1339 cm À1 (D band) and 1593 cm À1 (G band). D bands could be assigned as the disordered/defective structure of carbon, and G bands were associated with ordered graphitic structures due to the E 2g vibrational mode present in the sp 2 -hybridized carbon atoms in the graphitic layer. 27 The degree of graphitization and damage was estimated using the intensity ratio of D/G band (I D /I G ), which probably partially resulted from the decomposition of O-and N-containing functional groups at high temperature. 28 As shown in Fig. 3(b), the D/G band (I D /I G ) values of the oxidized samples were 1.01, 1.02, 1.05, and 1.03 for CDAP800, CDAP800-300, CDAP800-350, and CDAP800-400, respectively, implying these N-and O-doped porous carbons possessed disordered structures, especially CDAP800-350. N 2 adsorption-desorption measurements were conducted to evaluate the surface areas and pore structures of the asprepared materials and the control sample. The N 2 adsorption-desorption isotherms and pore size distribution are shown in Fig. 4. The isotherms were typical type I (typical of microporous carbons) with a pronounced N 2 uptake at relatively low pressure, according to IUPAC, which implied the existence of substantial micropores. 29 The pore size distribution of the samples is shown in Fig. 4(b). Results showed that the diameter of pore size distribution of all samples were in the range of 0.4 to 4 nm, which was consistent with the coexistence of micropores and mesopores.
The surface area and pore structure parameters of all samples are summarized in Table 1. The specic surface areas (T-plot) of C800, CDAP800, CDAP800-300, CDAP800-350, and CDAP800-400 samples were measured to be 268, 810, 967, 1022 and 772 m 2 g À1 , respectively, while the pore volumes of these samples were obtained as 0.228, 0.421, 0.495, 0.534 and 0.340 cm 3 g À1 , respectively. It was clear that the specic surface areas of the products obtained from DAP-pretreated cotton were much larger than from the control sample without pretreatment with DAP. From Table 1, it was found that majority of the pores were micropores, which was advantageous for improving specic capacitance because these pores could provide abundant active sites for ion storage.
However, mesopores could also be benecial for penetration and transportation of electrolyte ions as well as because of their low resistance to ion transport. 18,30 Results also demonstrated that different oxidation temperatures led to different in surface area and pore structure values even when using the same amount of DAP. The appropriate oxidation temperature could lead to the maximum surface area and pore volume. However, over oxidation at a very high temperature would actually destroy the carbon materials, which led to the destruction of its pore structure and reduction of the surface area. At high oxidation temperatures (400 C), over oxidation could collapse the carbon framework. The collapse led to the blocking of some of the    mesopores and micropores, resulting in a relatively low surface area and more amorphous carbon. 16,22 These results suggested that the BET surface area of the as-prepared carbon materials was signicantly inuenced by both DAP treatment and oxidation temperature. As shown in Fig. 5(a), four characteristic peaks were observed at 299, 400, 531 and 145.2 eV, which corresponded to C 1s, N 1s, O 1s and P 1s. The chemical compositions are summarized in Table 2. All samples were found to have the same content of P, about 1.3%. Nevertheless, the content of N increased from 1.9% to 5.8% with appropriate activation and oxidation. It implied that the DAP treatment could increase the nitrogen content and acted as an effective doping reagent. At the same time, the oxygen content increased with increasing oxidation temperature. N and O groups mainly provided pseudocapacitance and O groups were benecial for the wettability of the electrode. 31 High-resolution scans of N 1s of the samples are shown in Fig. 6(a, c, e and g). Nitrogen was tted by four component peaks, 398.1, 400.2, 401.2 and 403.6 eV, which were ascribed to pyridine-N-6, pyrrole or pyridine-N-5, quaternary-N-Q and pyridine N-oxide (N-X), respectively. XPS high-resolution scans indicated that nitrogen atoms were inserted into the porous carbon skeleton at different binding states, as shown in Fig. 5(b). N-6 is sp 2 N-bonded to two C atoms at the edge of the graphene layer and donates one p electron to the aromatic system. 32,33 N-5 represents pyrrolic N in a ve-membered ring that is associated with phenolic or carbonyl group on the neighboring carbon atom of the ring. N-Q is N bonded to three C atoms in the central or valley position of the graphene layer, and N-O is N bonded to O at the edges of graphene layer. In Table 3, N-5, N-6 and N-Q N accounted for a large proportion (over 80%) of N content in all samples. Generally speaking, the presence of N-6 and N-5 could enhance the pseudocapacitance by faradaic redox reactions, while intercalated N-Q between graphene sheets could facilitate the electron transfer in the carbon skeleton, enhancing the electronic conductivity of carbon to ensure rapid and reversible ion/charge transfer and exchange. [34][35][36] It was noteworthy that the CDAP800-350 sample had the largest proportion of the above-mentioned types of N bonding (90%).
In Table 3, it was found that with increasing oxidation temperature, the oxygen content increased accordingly. Oxygen greatly contributed to wettability of the carbon surface and specic capacitance. But very high oxygen content decreased the electrical conductivity, which was unfavorable for stability of the electrode at a high current density. XPS high-resolution scans of O 1s are shown in Fig. 6(b, d, f and h).    groups)/or water (O-III), which corresponded to peaks at 531.3, 532.7 and 534.2 eV, respectively. O in different chemical states within the carbon matrices are schematically shown in Fig. 5(b). 37 O-II is a type of O bonding where hydrogen bonds interact with a water molecule. O-II is benecial to the surface wettability of the carbon materials. All samples had large amount of O-II, which indicated that they showed low resistance to ion transport between the electrolyte and material surface. It should be pointed out that only the quinine-type oxygen (O-I) was electrochemically active, which was favorable for improving pseudocapacitance of the electrode. 30 CDAP800-350 and CDAP800-400 all showed high oxygen content, especially quinine-type oxygen, which may be one of the reasons why they performed well in the electrochemical measurements.

Electrochemical properties
The electrochemical properties of the as-prepared carbon were evaluated as electrode materials in a three-electrode system using 6 M KOH as the electrolyte. The cyclic voltammograms (CVs) are shown in Fig. 7(a) at a scan rate of 10 mV s À1 . The proportion to the area of the CV curve is related to the capacitance of an electrode; generally, the larger the quasi-rectangular area of the CV curve, the higher the electrochemical capacitance. The CDAP800-350 had the largest proportion to the area of its CV curve; thus, it had larger electrochemical capacitance than other samples at the same scanning rate and in the same potential window. CV curves of all samples had a quasirectangular shape, which indicated that electrical energy was mainly stored in the electrical double layer. 38 The redox peaks were found at 0.6 V for all samples, which were attributed to faradaic pseudocapacitance resulting from redox reactions due to the O (hydroxyl, quinone, carboxyl and lactone groups) and N (pyridinic and pyrrolic groups) functionalities. 39 Fig. 7(b) shows the galvanostatic charge/discharge (GCD) curves at a current density of 0.5 A g À1 . The GCD curves of all samples were found to have a quasi-isosceles triangular shape between 0 and À1 V versus the Hg/HgO electrode. The chargedischarge curves of the electrodes were not straight lines but showed distinct distortion. This phenomenon indicated that double-layer capacitance was the major contributor to the performance and pseudocapacitance also existed. 40,41 From GCD results, the CDAP800-350 exhibited the highest capacitance of 292 F g À1 at a current density of 0.5 A g À1 , which was higher than that of C800 (160 F g À1 ), CDAP800-300 (240 F g À1 ) and CDAP800-400 (267 F g À1 ). The CV curves showed the same trend as well. CDAP800-350 had the largest specic capacitance. The specic capacitance was determined by both surface area and surface element content. CDAP800-350 had the largest specic surface area (1022 m 2 g À1 ) and largest total pore volume (0.534 cm 3 g À1 ), which offered abundant adsorbing sites for ions. CDAP800-350 also was found to have plenty of micropores and mesopores, which provided helpful transportation channels for the electrolyte to diffuse into the micropores. In addition, O and N content also helped improve the specic capacitance. O content was helpful in increasing electrode surface wettability as well as in generating more electrochemical active sites, but too much O decreased electron ow rate and increase charge-transfer resistance. This explained why CDAP800-400 had lower surface area and pore volume than CDAP800-300, but had larger specic capacitance.
Electrochemical impedance spectroscopy (EIS) was carried out with an alternating current voltage amplitude of 5 mV in a frequency range of 0.01 Hz to 100 kHz. EIS provided complementary information to further understand the capacitive behaviors of the samples, as shown in Fig. 7(c). At low frequencies (Warburg diffusion component), the slope of the impedance plots was nearly a vertical line, indicating the electrolyte ions could easily access the surface without diffusion limitations. The tail with a slope of 45 in the intermediate frequency region represented the Warburg diffusion resistance (Z w ), reecting the characteristics of ion diffusion into the active materials. The shorter the length of this diffusion section in capacitors, the lower the ion diffusion resistance, which was mainly attributed to the enhanced surface hydrophilicity by increasing O content. 36,42 At high frequency, the rst intersection point on the Z-axis corresponded to the solution resistance (R s ) and the semicircle intercepts on the Nyquist plot corresponded to the charge-transfer resistance (R ct ) of the electrode materials, derived from the reversible faradaic reactions of the oxygen-containing groups. 17 Furthermore, the stability at high current density is an important factor for the application of a supercapacitor.  Discharge capacitances at various current densities were calculated from the galvanostatic charge-discharge curves from 0.5 A g À1 to 10 A g À1 in Fig. 7(d). It was concluded that the calculated specic capacitance of CDAP800-350 was higher than that of other samples at all tested current densities. The specic capacitances of the CDAP800-350 electrode were measured to be 292, 284, 272, 250, and 233 F g À1 at current densities of 0.5, 1, 2, 5 and 10 A g À1 , respectively. A rate capability of 80% retention was achieved, which was much higher than that of other samples, suggesting good stability at high current density.
Remarkably, all samples showed small R s values, low Warburg diffusion resistance (Z w ) and large straight slopes. CDAP800-350 exhibited the best rate performance due to its high surface area, special pore size distribution and moderate O content. CDAP800-350 electrode presented the lowest R ct among all the electrodes, suggesting its superior rate capability. Thus, pretreatment with DAP and appropriate oxidation temperature was indeed of paramount importance for improving the capacitive performance of cellulose-derived carbon.
The electrochemical performance of CDAP800-350 in a threeelectrode system is presented in Fig. 8. Fig. 8(a) shows a quasirectangular shape at different scan rates (5-100 mV s À1 ), indicating good capacitive behavior of the electrode and fast iontransport into the electrochemically active surface. From GCD curves of the CDAP800-350 electrode in Fig. 8(b), it was found that the GCD curves were not straight lines but showed slight distortion, suggesting their combined capacitance originates from double-layer capacitance and faradaic pseudocapacitance, which is consistent with the CV results. 12,43 The evaluation of cycle stability for CDAP800-350 was conducted at a current density of 5 A g À1 . Results in Fig. 8(c) show that aer 5000 cycles, the specic supercapacitance of CDAP800-350 showed a moderate decrease from 250 F g À1 to 231 F g À1 . About 92% of the initial specic capacitance was retained.
A two-electrode conguration was used with 6 M KOH electrolyte to evaluate the use of the samples as electrodes of a symmetric supercapacitor. The carbon materials were packaged as symmetric devices with two identical electrodes and were tested with CV and GCD experiments. Fig. 9(a) shows typical square-shaped CV curves for both carbon electrodes at 10 mV s À1 , indicating good double-layer capacitance. The GCD plots of C800 and CDAP800 samples showed an isoscelestriangle shape at a current density of 0.5 A g À1 (Fig. 9(b)), implying good charge and discharge reversibility.
Discharge capacitances at various current densities were calculated from the galvanostatic charge-discharge curves from 0.5 A g À1 to 10 A g À1 in Fig. 9(c). Corresponding specic capacitances followed the order CDAP800-350 (270 F g À1 at 0.5 A g À1 ) > CDAP800-400 (250 F g À1 at 0.5 A g À1 ) > CDAP800-300 Fig. 8 Electrochemical performance of CDAP800-350 in a threeelectrode system. (a) CV curves at various scan rates of 5-100 mV s À1 , (b) GCD curves tested at 0.5-10 A g À1 , (c) capacitance retention of the as-prepared samples over 5000 cycles at 5 A g À1 . Fig. 9 Electrochemical performance in a two-electrode system with 6 M KOH as the electrolyte. (a) CV curves at 10 mV s À1 , (b) galvanostatic charge/discharge profiles at a current density of 0.5 A g À1 , (c) specific capacitance at different current densities. Paper (203 F g À1 at 0.5 A g À1 ) > CDAP800 (192 F g À1 at 0.5 A g À1 ) > C800 (116 F g À1 at 0.5 A g À1 ).
In order to further evaluate the supercapacitor performance for energy storage, a two-electrode symmetric supercapacitor based on the CDAP800-350 electrode was tested in 6 M KOH electrolyte. The typical CVs of the symmetric supercapacitor at different scan rates from 5 to 100 mV s À1 are displayed in Fig. 10(a). The CVs of CDAP800-350 showed a rectangular shape with a scan rate ranging from 5 mV s À1 to 100 mV s À1 . The shape of the CVs did not change signicantly even at a high scan rate of 100 mV s À1 , implying good double-layer capacitance, decent rate capability and rapid ion transportation and excellent rate capability. 5,22,29 The GCD curves in Fig. 10(b) show a regular symmetric triangular shape, suggesting good electrochemical charge and discharge reversibility, and the corresponding electrode specic capacitance of the symmetric supercapacitor was calculated from the GCD curves.
Results showed that the CDAP800-350-based symmetric supercapacitor achieved a high specic capacitance of 270 F g À1 at a current density of 0.5 A g À1 . Impressively, as shown in Table  4, under the same testing condition, CDAP800-350 also achieved higher gravimetric capacitances compared to similar carbon materials reported in the literature. 11,14,21,27,28,44,45 Fig. 10(c) shows a Nyquist plot of the symmetric cell of the CDAP800-350-based supercapacitor. The small semicircle in the high-frequency region indicated a low transfer resistance (R ct ) caused by faradaic reactions. The vertical part of the curve in the low-frequency region was ascribed to the standard electronic double-layer capacitor (C dl ) at the interface between the electrode and electrolyte. Furthermore, the specic capacitances of CDAP800-350 at different current densities are shown in Fig. 10(d). The specic capacitance was measured to be 270 F g À1 at a current density of 0.5 A g À1 and 212 F g À1 at 10 A g À1 , implying a rate capability of 79% retention.
Moreover, Fig. 11(a) shows the long-term cycling stability of the as-assembled supercapacitors. The cycle stability of CDAP800-350 is about 86% of the initial specic capacitance aer 5000 charge/discharge cycles at a high current density of 5.0 A g À1 . More importantly, volumetric Ragone plots ( Fig. 11(b)) of the assembled symmetric cell displayed a high energy density of 18 W h kg À1 at a power density of 250 W kg À1 .

Conclusions
In summary, a facile and effective route to prepare N-and Odoped porous carbon from cotton was developed for supercapacitor electrode materials. The obtained CDAP800-350 electrode material exhibited a high surface area of 1022 m 2 g À1 and a high oxygen (11.8 wt%) and nitrogen (5.8 wt%) content, which played an important role in fast ion transport and good electrical conductivity as well as good charge storage. Moreover, the CDAP800-350 electrode exhibited excellent electrochemical performance with a maximum specic capacitance of 292 F g À1 in 6 M KOH aqueous electrolyte. In a two-electrode symmetric supercapacitor, the CDAP800-350 also showed a high capacitance of 270 F g À1 at 0.5 A g À1 and good cycling stability (89% retention at a current density of 5 A g À1 ) aer 5000 chargedischarge cycles. It also achieved a high energy density of 18 W h kg À1 at a power density of 250 W kg À1 .
This facile biomass based approach provides an alternative solution for preparing O-and N-doped porous carbon that could be a promising candidate for supercapacitor applications in the future.

Conflicts of interest
There are no conicts to declare. Materials Current density (A g À1 ) C g (F g À1 ) Ref. Cotton-derived N-doped carbon 0.5 270 This work Fig. 11 Electrochemical performance of CDAP800-350 in a twoelectrode system. (a) Capacitance retention of the as-prepared carbon materials over 5000 cycles at 5 A g À1 , (b) energy density vs. power density curve.